diff --git a/CoqOfRust/CoqOfRust.v b/CoqOfRust/CoqOfRust.v index b3bfca405..d6f95aabf 100644 --- a/CoqOfRust/CoqOfRust.v +++ b/CoqOfRust/CoqOfRust.v @@ -34,10 +34,8 @@ Export List.ListNotations. Require Export CoqOfRust.M. Export M.Notations. -Parameter pointer_coercion : string -> Value.t -> Value.t. - (** We replace assembly blocks by this special axiom. *) -Parameter InlineAssembly : Value.t. +Parameter InlineAssembly : A.t. (* Require CoqOfRust.std.arch. Require CoqOfRust.std.ascii. diff --git a/CoqOfRust/M.v b/CoqOfRust/M.v index 5e6fb66e9..d5ba9d71f 100644 --- a/CoqOfRust/M.v +++ b/CoqOfRust/M.v @@ -177,7 +177,7 @@ End Pointer. Module Value. Inductive t : Set := | Bool : bool -> t - | Integer : Integer.t -> Z -> t + | Integer : Z -> t (** For now we do not know how to represent floats so we use a string *) | Float : string -> t | UnicodeChar : Z -> t @@ -328,7 +328,7 @@ Module Value. Definition eqb (v1 v2 : Value.t) : bool := match v1, v2 with | Value.Bool b1, Value.Bool b2 => Bool.eqb b1 b2 - | Value.Integer _ i1, Value.Integer _ i2 => Z.eqb i1 i2 + | Value.Integer i1, Value.Integer i2 => Z.eqb i1 i2 | Value.Float f1, Value.Float f2 => String.eqb f1 f2 | Value.UnicodeChar c1, Value.UnicodeChar c2 => Z.eqb c1 c2 | Value.String s1, Value.String s2 => String.eqb s1 s2 @@ -354,17 +354,29 @@ Module Value. Qed. End Value. +Module A. + Inductive t : Set := + (** We set [to_value] as implicit so that it does not appear when printing the expressions. *) + | Make {A : Set} {to_value : A -> Value.t} (value : A). + + Definition to_value (v : t) : Value.t := + match v with + | @Make _ to_value value => to_value value + end. +End A. + Module Primitive. Inductive t : Set := - | StateAlloc (value : Value.t) + | StateAlloc (value : A.t) | StateRead {A : Set} {to_value : A -> Value.t} (mutable : Pointer.Mutable.t Value.t to_value) | StateWrite {A : Set} {to_value : A -> Value.t} (mutable : Pointer.Mutable.t Value.t to_value) - (value : Value.t) + (value : A.t) | GetSubPointer {A : Set} {to_value : A -> Value.t} (mutable : Pointer.Mutable.t Value.t to_value) (index : Pointer.Index.t) + | OfValue (value : Value.t) | EnvRead | GetFunction (path : string) (generic_tys : list Ty.t) | GetAssociatedFunction (ty : Ty.t) (name : string) (generic_tys : list Ty.t) @@ -379,8 +391,8 @@ End Primitive. Module LowM. Inductive t (A : Set) : Set := | Pure (value : A) - | CallPrimitive (primitive : Primitive.t) (k : Value.t -> t A) - | CallClosure (closure : Value.t) (args : list Value.t) (k : A -> t A) + | CallPrimitive (primitive : Primitive.t) (k : A.t -> t A) + | CallClosure (closure : A.t) (args : list A.t) (k : A -> t A) | Loop (body : t A) (k : A -> t A) | Impossible. Arguments Pure {_}. @@ -405,7 +417,7 @@ End LowM. Module Exception. Inductive t : Set := (** exceptions for Rust's `return` *) - | Return : Value.t -> t + | Return : A.t -> t (** exceptions for Rust's `continue` *) | Continue : t (** exceptions for Rust's `break` *) @@ -416,12 +428,12 @@ Module Exception. End Exception. Definition M : Set := - LowM.t (Value.t + Exception.t). + LowM.t (A.t + Exception.t). -Definition pure (v : Value.t) : M := +Definition pure (v : A.t) : M := LowM.Pure (inl v). -Definition let_ (e1 : M) (e2 : Value.t -> M) : M := +Definition let_ (e1 : M) (e2 : A.t -> M) : M := LowM.let_ e1 (fun v1 => match v1 with | inl v1 => e2 v1 @@ -430,8 +442,8 @@ Definition let_ (e1 : M) (e2 : Value.t -> M) : M := Module InstanceField. Inductive t : Set := - | Constant (constant : Value.t) - | Method (method : list Ty.t -> list Value.t -> M) + | Constant (constant : A.t) + | Method (method : list Ty.t -> list A.t -> M) | Ty (ty : Ty.t). End InstanceField. @@ -451,21 +463,21 @@ Parameter IsAssociatedFunction : forall (Self : Ty.t) (function_name : string) - (function : list Ty.t -> list Value.t -> M), + (function : list Ty.t -> list A.t -> M), Prop. Parameter IsAssociatedConstant : forall (Self : Ty.t) (constant_name : string) - (constant : Value.t), + (constant : A.t), Prop. Parameter IsProvidedMethod : forall (trait_name : string) (method_name : string) - (method : Ty.t -> list Ty.t -> list Value.t -> M), + (method : Ty.t -> list Ty.t -> list A.t -> M), Prop. Module Option. @@ -487,7 +499,7 @@ End Option. this markers can be translated to a regular monadic computation using [M.monadic] tactic. Additionally, this parameter is used for the definitions of "const".*) -Parameter run : M -> Value.t. +Parameter run : M -> A.t. Module Notations. Notation "'let-' a := b 'in' c" := @@ -554,10 +566,23 @@ Ltac monadic e := end end. +Module MList. + Fixpoint map_aux (acc : list A.t) (l : list M) (k : list A.t -> M) : M := + match l with + | [] => k (List.rev acc) + | e :: l => + let* v := e in + map_aux (v :: acc) l k + end. + + Definition map (l : list M) (k : list A.t -> M) : M := + map_aux [] l k. +End MList. + Definition raise (exception : Exception.t) : M := LowM.Pure (inr exception). -Definition return_ (r : Value.t) : M := +Definition return_ (r : A.t) : M := raise (Exception.Return r). Definition continue : M := @@ -572,7 +597,7 @@ Definition break_match : M := Definition panic (message : string) : M := raise (Exception.Panic message). -Definition call_closure (f : Value.t) (args : list Value.t) : M := +Definition call_closure (f : A.t) (args : list A.t) : M := LowM.CallClosure f args LowM.Pure. Definition impossible : M := @@ -584,36 +609,41 @@ Definition call_primitive (primitive : Primitive.t) : M := (* Make it transparent *) Arguments call_primitive /. -Definition alloc (v : Value.t) : M := +Definition of_value (v : Value.t) : M := + call_primitive (Primitive.OfValue v). + +Definition alloc (v : A.t) : M := call_primitive (Primitive.StateAlloc v). -Definition read (r : Value.t) : M := - match r with - | Value.Pointer (Pointer.Immediate v) => LowM.Pure (inl v) +Definition read (r : A.t) : M := + match A.to_value r with + | Value.Pointer (Pointer.Immediate v) => of_value v | Value.Pointer (Pointer.Mutable mutable) => call_primitive (Primitive.StateRead mutable) | _ => impossible end. -Definition write (r : Value.t) (update : Value.t) : M := - match r with +Definition write (r : A.t) (update : A.t) : M := + match A.to_value r with | Value.Pointer (Pointer.Immediate _) => impossible | Value.Pointer (Pointer.Mutable mutable) => call_primitive (Primitive.StateWrite mutable update) | _ => impossible end. -Definition copy (r : Value.t) : M := +Definition copy (r : A.t) : M := let* v := read r in alloc v. (** 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]. *) -Definition get_sub_pointer (r : Value.t) (index : Pointer.Index.t) : M := - match r with +Definition get_sub_pointer (r : A.t) (index : Pointer.Index.t) : M := + match A.to_value r with | Value.Pointer (Pointer.Immediate v) => match Value.read_path v [index] with - | Some v => alloc v + | Some v => + let* v := of_value v in + alloc v | None => break_match end | Value.Pointer (Pointer.Mutable mutable) => @@ -669,7 +699,9 @@ Definition catch_continue (body : M) : M := body (fun exception => match exception with - | Exception.Continue => alloc (Value.Tuple []) + | Exception.Continue => + let* tt := of_value (Value.Tuple []) in + alloc tt | _ => raise exception end ). @@ -679,7 +711,9 @@ Definition catch_break (body : M) : M := body (fun exception => match exception with - | Exception.Break => alloc (Value.Tuple []) + | Exception.Break => + let* tt := of_value (Value.Tuple []) in + alloc tt | _ => raise exception end ). @@ -691,8 +725,8 @@ Definition loop (body : M) : M := catch_break (LowM.Pure result)). Fixpoint match_operator - (scrutinee : Value.t) - (arms : list (Value.t -> M)) : + (scrutinee : A.t) + (arms : list (A.t -> M)) : M := match arms with | nil => impossible @@ -710,8 +744,8 @@ Fixpoint match_operator (** Each arm must return a tuple of the free variables found in the pattern. If no arms are valid, we raise an [Exception.BreakMatch]. *) Fixpoint find_or_pattern_aux - (scrutinee : Value.t) - (arms : list (Value.t -> M)) : + (scrutinee : A.t) + (arms : list (A.t -> M)) : M := match arms with | nil => break_match @@ -728,68 +762,70 @@ Fixpoint find_or_pattern_aux (** The [body] must be a closure. *) Definition find_or_pattern - (scrutinee : Value.t) - (arms : list (Value.t -> M)) - (body : Value.t) : + (scrutinee : A.t) + (arms : list (A.t -> M)) + (body : A.t) : M := let* free_vars := find_or_pattern_aux scrutinee arms in - match free_vars with - | Value.Tuple free_vars => call_closure body free_vars + match A.to_value free_vars with + | Value.Tuple free_vars => + MList.map (List.map of_value free_vars) (fun free_vars => + call_closure body free_vars) | _ => impossible end. -Definition never_to_any (x : Value.t) : M := +Definition never_to_any (x : A.t) : M := M.impossible. -Definition use (x : Value.t) : Value.t := +Definition use (x : A.t) : A.t := x. Module SubPointer. - Definition get_tuple_field (value : Value.t) (index : Z) : M := + Definition get_tuple_field (value : A.t) (index : Z) : M := get_sub_pointer value (Pointer.Index.Tuple index). - Definition get_array_field (value : Value.t) (index : Value.t) : M := - match index with - | Value.Integer Integer.Usize index => - get_sub_pointer value (Pointer.Index.Array index) + Definition get_array_field (value : A.t) (index : A.t) : M := + match A.to_value index with + | Value.Integer index => get_sub_pointer value (Pointer.Index.Array index) | _ => impossible end. - Definition get_struct_tuple_field (value : Value.t) (constructor : string) (index : Z) : M := + Definition get_struct_tuple_field (value : A.t) (constructor : string) (index : Z) : M := get_sub_pointer value (Pointer.Index.StructTuple constructor index). - Definition get_struct_record_field (value : Value.t) (constructor field : string) : M := + Definition get_struct_record_field (value : A.t) (constructor field : string) : M := get_sub_pointer value (Pointer.Index.StructRecord constructor field). (** Get an element of a slice by index. *) - Parameter get_slice_index : Value.t -> Z -> M. + Parameter get_slice_index : A.t -> Z -> M. (** Get an element of a slice by index counting from the end. *) - Parameter get_slice_rev_index : Value.t -> Z -> M. + Parameter get_slice_rev_index : A.t -> Z -> M. (** For two indices n and k, get all elements of a slice without the first n elements and without the last k elements. *) - Parameter get_slice_rest : Value.t -> Z -> Z -> M. + Parameter get_slice_rest : A.t -> Z -> Z -> M. End SubPointer. -Definition is_constant_or_break_match (value expected_value : Value.t) : M := - if Value.eqb value expected_value then - pure (Value.Tuple []) +Definition is_constant_or_break_match (value : A.t) (expected_value : Value.t) : M := + if Value.eqb (A.to_value value) expected_value then + let* tt := of_value (Value.Tuple []) in + pure tt else break_match. -Parameter pointer_coercion : Value.t -> Value.t. +Parameter pointer_coercion : A.t -> M. (** This function is explicitely called in the Rust AST, and should take two types that are actually different but convertible, like different kinds of integers. *) -Parameter rust_cast : Value.t -> Value.t. +Parameter rust_cast : A.t -> M. -Definition closure (f : list Value.t -> M) : Value.t := - Value.Closure (existS (Value.t, M) f). +Definition closure (f : list A.t -> M) : M := + of_value (Value.Closure (existS (A.t, M) f)). -Definition constructor_as_closure (constructor : string) : Value.t := +Definition constructor_as_closure (constructor : string) : M := closure (fun args => - pure (Value.StructTuple constructor args)). + of_value (Value.StructTuple constructor (List.map A.to_value args))). -Parameter struct_record_update : Value.t -> list (string * Value.t) -> Value.t. +Parameter struct_record_update : A.t -> list (string * Value.t) -> Value.t. diff --git a/CoqOfRust/alloc/alloc.v b/CoqOfRust/alloc/alloc.v index a911d8f4b..52930c144 100644 --- a/CoqOfRust/alloc/alloc.v +++ b/CoqOfRust/alloc/alloc.v @@ -26,7 +26,7 @@ Module alloc. Definition Self : Ty.t := Ty.path "alloc::alloc::Global". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47,9 +47,9 @@ Module alloc. Definition Self : Ty.t := Ty.path "alloc::alloc::Global". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "alloc::alloc::Global" [])) + | [], [] => ltac:(M.monadic (M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |))) | _, _ => M.impossible end. @@ -65,7 +65,7 @@ Module alloc. Definition Self : Ty.t := Ty.path "alloc::alloc::Global". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -73,7 +73,7 @@ Module alloc. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Global" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Global" |) |) ] |))) | _, _ => M.impossible end. @@ -97,7 +97,7 @@ Module alloc. } } *) - Definition alloc (τ : list Ty.t) (α : list Value.t) : M := + Definition alloc (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ layout ] => ltac:(M.monadic @@ -139,7 +139,7 @@ Module alloc. unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } } *) - Definition dealloc (τ : list Ty.t) (α : list Value.t) : M := + Definition dealloc (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr; layout ] => ltac:(M.monadic @@ -167,7 +167,7 @@ Module alloc. unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) } } *) - Definition realloc (τ : list Ty.t) (α : list Value.t) : M := + Definition realloc (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr; layout; new_size ] => ltac:(M.monadic @@ -197,7 +197,7 @@ Module alloc. unsafe { __rust_alloc_zeroed(layout.size(), layout.align()) } } *) - Definition alloc_zeroed (τ : list Ty.t) (α : list Value.t) : M := + Definition alloc_zeroed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ layout ] => ltac:(M.monadic @@ -234,7 +234,7 @@ Module alloc. } } *) - Definition alloc_impl (τ : list Ty.t) (α : list Value.t) : M := + Definition alloc_impl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; layout; zeroed ] => ltac:(M.monadic @@ -259,35 +259,35 @@ Module alloc. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - "slice_from_raw_parts", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "dangling", + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "slice_from_raw_parts", [] |), - [ layout ] - |); - Value.Integer Integer.Usize 0 - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "dangling", + [] + |), + [ layout ] + |); + M.of_value (| Value.Integer 0 |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -295,7 +295,7 @@ Module alloc. let raw_ptr := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -365,7 +365,9 @@ Module alloc. |), [ M.read (| raw_ptr |) ] |); - Value.StructTuple "core::alloc::AllocError" [] + M.of_value (| + Value.StructTuple "core::alloc::AllocError" [] + |) ] |) ] @@ -428,20 +430,23 @@ Module alloc. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - "slice_from_raw_parts", - [] - |), - [ M.read (| ptr |); M.read (| size |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "slice_from_raw_parts", + [] + |), + [ M.read (| ptr |); M.read (| size |) ] + |)) + ] + |) |))) ] |) @@ -498,7 +503,7 @@ Module alloc. } } *) - Definition grow_impl (τ : list Ty.t) (α : list Value.t) : M := + Definition grow_impl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ptr; old_layout; new_layout; zeroed ] => ltac:(M.monadic @@ -512,40 +517,42 @@ Module alloc. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ new_layout ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ old_layout ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -565,27 +572,34 @@ Module alloc. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "`new_layout.size()` must be greater than or equal to `old_layout.size()`" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "`new_layout.size()` must be greater than or equal to `old_layout.size()`" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -603,10 +617,7 @@ Module alloc. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -622,23 +633,24 @@ Module alloc. (let old_size := M.copy (| γ |) in let γ := M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "align", [] |), [ old_layout ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "align", [] |), [ new_layout ] - |)) + |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -658,16 +670,17 @@ Module alloc. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.ge - (M.read (| new_size |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| new_size |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ old_layout ] - |)) + |) + |) ] |) |) in @@ -734,7 +747,9 @@ Module alloc. |), [ M.read (| raw_ptr |) ] |); - Value.StructTuple "core::alloc::AllocError" [] + M.of_value (| + Value.StructTuple "core::alloc::AllocError" [] + |) ] |) ] @@ -798,7 +813,7 @@ Module alloc. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -825,33 +840,38 @@ Module alloc. |), [ M.read (| raw_ptr |); M.read (| old_size |) ] |); - Value.Integer Integer.U8 0; + M.of_value (| Value.Integer 0 |); BinOp.Panic.sub (| + Integer.Usize, M.read (| new_size |), M.read (| old_size |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - "slice_from_raw_parts", - [] - |), - [ M.read (| ptr |); M.read (| new_size |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "slice_from_raw_parts", + [] + |), + [ M.read (| ptr |); M.read (| new_size |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -956,8 +976,8 @@ Module alloc. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -966,7 +986,8 @@ Module alloc. [] |), [ M.read (| ptr |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -995,7 +1016,11 @@ Module alloc. |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| new_ptr |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| new_ptr |)) ] + |) |))) ] |) @@ -1015,7 +1040,7 @@ Module alloc. self.alloc_impl(layout, false) } *) - Definition allocate (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; layout ] => ltac:(M.monadic @@ -1023,7 +1048,7 @@ Module alloc. let layout := M.alloc (| layout |) in M.call_closure (| M.get_associated_function (| Ty.path "alloc::alloc::Global", "alloc_impl", [] |), - [ M.read (| self |); M.read (| layout |); Value.Bool false ] + [ M.read (| self |); M.read (| layout |); M.of_value (| Value.Bool false |) ] |))) | _, _ => M.impossible end. @@ -1033,7 +1058,7 @@ Module alloc. self.alloc_impl(layout, true) } *) - Definition allocate_zeroed (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_zeroed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; layout ] => ltac:(M.monadic @@ -1041,7 +1066,7 @@ Module alloc. let layout := M.alloc (| layout |) in M.call_closure (| M.get_associated_function (| Ty.path "alloc::alloc::Global", "alloc_impl", [] |), - [ M.read (| self |); M.read (| layout |); Value.Bool true ] + [ M.read (| self |); M.read (| layout |); M.of_value (| Value.Bool true |) ] |))) | _, _ => M.impossible end. @@ -1055,7 +1080,7 @@ Module alloc. } } *) - Definition deallocate (τ : list Ty.t) (α : list Value.t) : M := + Definition deallocate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ptr; layout ] => ltac:(M.monadic @@ -1064,23 +1089,24 @@ Module alloc. let layout := M.alloc (| layout |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ layout ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1099,7 +1125,7 @@ Module alloc. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -1117,7 +1143,7 @@ Module alloc. unsafe { self.grow_impl(ptr, old_layout, new_layout, false) } } *) - Definition grow (τ : list Ty.t) (α : list Value.t) : M := + Definition grow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ptr; old_layout; new_layout ] => ltac:(M.monadic @@ -1132,7 +1158,7 @@ Module alloc. M.read (| ptr |); M.read (| old_layout |); M.read (| new_layout |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |))) | _, _ => M.impossible @@ -1149,7 +1175,7 @@ Module alloc. unsafe { self.grow_impl(ptr, old_layout, new_layout, true) } } *) - Definition grow_zeroed (τ : list Ty.t) (α : list Value.t) : M := + Definition grow_zeroed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ptr; old_layout; new_layout ] => ltac:(M.monadic @@ -1164,7 +1190,7 @@ Module alloc. M.read (| ptr |); M.read (| old_layout |); M.read (| new_layout |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |))) | _, _ => M.impossible @@ -1213,7 +1239,7 @@ Module alloc. } } *) - Definition shrink (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ptr; old_layout; new_layout ] => ltac:(M.monadic @@ -1226,40 +1252,42 @@ Module alloc. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ new_layout ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ old_layout ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1279,27 +1307,34 @@ Module alloc. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "`new_layout.size()` must be smaller than or equal to `old_layout.size()`" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "`new_layout.size()` must be smaller than or equal to `old_layout.size()`" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -1317,10 +1352,7 @@ Module alloc. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in let _ := M.alloc (| M.call_closure (| @@ -1335,53 +1367,57 @@ Module alloc. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - "slice_from_raw_parts", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "dangling", + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "slice_from_raw_parts", [] |), - [ new_layout ] - |); - Value.Integer Integer.Usize 0 - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "dangling", + [] + |), + [ new_layout ] + |); + M.of_value (| Value.Integer 0 |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let new_size := M.copy (| γ |) in let γ := M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "align", [] |), [ old_layout ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "align", [] |), [ new_layout ] - |)) + |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1390,16 +1426,17 @@ Module alloc. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| new_size |)) - (M.call_closure (| + BinOp.Pure.le (| + M.read (| new_size |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ old_layout ] - |)) + |) + |) ] |) |) in @@ -1466,7 +1503,9 @@ Module alloc. |), [ M.read (| raw_ptr |) ] |); - Value.StructTuple "core::alloc::AllocError" [] + M.of_value (| + Value.StructTuple "core::alloc::AllocError" [] + |) ] |) ] @@ -1529,20 +1568,23 @@ Module alloc. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - "slice_from_raw_parts", - [] - |), - [ M.read (| ptr |); M.read (| new_size |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "slice_from_raw_parts", + [] + |), + [ M.read (| ptr |); M.read (| new_size |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1645,8 +1687,8 @@ Module alloc. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -1655,7 +1697,8 @@ Module alloc. [] |), [ M.read (| ptr |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -1684,7 +1727,11 @@ Module alloc. |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| new_ptr |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| new_ptr |)) ] + |) |))) ] |) @@ -1718,7 +1765,7 @@ Module alloc. } } *) - Definition exchange_malloc (τ : list Ty.t) (α : list Value.t) : M := + Definition exchange_malloc (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ size; align ] => ltac:(M.monadic @@ -1746,7 +1793,10 @@ Module alloc. "allocate", [] |), - [ M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); M.read (| layout |) ] + [ + M.alloc (| M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) |); + M.read (| layout |) + ] |) |), [ @@ -1809,7 +1859,7 @@ Module alloc. ct_error(layout) } *) - Definition handle_alloc_error (τ : list Ty.t) (α : list Value.t) : M := + Definition handle_alloc_error (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ layout ] => ltac:(M.monadic @@ -1825,7 +1875,7 @@ Module alloc. ] |), [ - Value.Tuple [ M.read (| layout |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| layout |)) ] |); M.get_function (| "alloc::alloc::handle_alloc_error.ct_error", [] |); M.get_function (| "alloc::alloc::handle_alloc_error.rt_error", [] |) ] @@ -1839,7 +1889,7 @@ Module alloc. panic!("allocation failed"); } *) - Definition ct_error (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_error (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0 ] => ltac:(M.monadic @@ -1860,10 +1910,19 @@ Module alloc. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "allocation failed" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "allocation failed" |) + |)) + ] + |) + |) + |) ] |) ] @@ -1880,7 +1939,7 @@ Module alloc. } } *) - Definition rt_error (τ : list Ty.t) (α : list Value.t) : M := + Definition rt_error (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ layout ] => ltac:(M.monadic @@ -1921,7 +1980,7 @@ Module alloc. } } *) - Definition __rdl_oom (τ : list Ty.t) (α : list Value.t) : M := + Definition __rdl_oom (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ size; _align ] => ltac:(M.monadic @@ -1929,22 +1988,23 @@ Module alloc. let _align := M.alloc (| _align |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.read (| M.get_constant (| "alloc::alloc::__alloc_error_handler::__rdl_oom::__rust_alloc_error_handler_should_panic" |) |) - |)) - (Value.Integer Integer.U8 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1959,29 +2019,42 @@ Module alloc. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "memory allocation of " |); - M.read (| Value.String " bytes failed" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "memory allocation of " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes failed" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ size ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ size ] + |)) + ] + |) + |) + |) ] |) ] @@ -2001,32 +2074,45 @@ Module alloc. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "memory allocation of " |); - M.read (| Value.String " bytes failed" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "memory allocation of " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes failed" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ size ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ size ] + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |))) @@ -2054,7 +2140,7 @@ Module alloc. unsafe { target.write(self.clone()) }; } *) - Definition write_clone_into_raw (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_clone_into_raw (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; target ] => @@ -2075,7 +2161,7 @@ Module alloc. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2098,7 +2184,7 @@ Module alloc. unsafe { target.copy_from_nonoverlapping(self, 1) }; } *) - Definition write_clone_into_raw (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_clone_into_raw (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; target ] => @@ -2114,10 +2200,10 @@ Module alloc. "copy_from_nonoverlapping", [] |), - [ M.read (| target |); M.read (| self |); Value.Integer Integer.Usize 1 ] + [ M.read (| target |); M.read (| self |); M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/borrow.v b/CoqOfRust/alloc/borrow.v index 9b99d96bd..791a13ec0 100644 --- a/CoqOfRust/alloc/borrow.v +++ b/CoqOfRust/alloc/borrow.v @@ -10,7 +10,7 @@ Module borrow. &**self } *) - Definition borrow (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self ] => @@ -40,7 +40,7 @@ Module borrow. (* Trait *) Module ToOwned. - Definition clone_into (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_into (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; target ] => ltac:(M.monadic @@ -55,7 +55,7 @@ Module borrow. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -75,7 +75,7 @@ Module borrow. self.clone() } *) - Definition to_owned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_owned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -93,7 +93,7 @@ Module borrow. target.clone_from(self); } *) - Definition clone_into (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_into (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; target ] => @@ -108,7 +108,7 @@ Module borrow. [ M.read (| target |); M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -161,7 +161,7 @@ Module borrow. } } *) - Definition clone (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self ] => @@ -181,7 +181,11 @@ Module borrow. |) in let b := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "alloc::borrow::Cow::Borrowed" [ M.read (| b |) ] + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Borrowed" + [ A.to_value (M.read (| b |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -202,20 +206,23 @@ Module borrow. |) |) in M.alloc (| - Value.StructTuple - "alloc::borrow::Cow::Owned" - [ - M.call_closure (| - M.get_trait_method (| - "alloc::borrow::ToOwned", - B, - [], - "to_owned", - [] - |), - [ M.read (| b |) ] - |) - ] + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Owned" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "alloc::borrow::ToOwned", + B, + [], + "to_owned", + [] + |), + [ M.read (| b |) ] + |)) + ] + |) |))) ] |) @@ -231,7 +238,7 @@ Module borrow. } } *) - Definition clone_from (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self; source ] => @@ -240,7 +247,11 @@ Module borrow. let source := M.alloc (| source |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| source |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| source |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -329,7 +340,7 @@ Module borrow. } } *) - Definition is_borrowed (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_borrowed (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self ] => @@ -347,12 +358,12 @@ Module borrow. "alloc::borrow::Cow::Borrowed", 0 |) in - M.alloc (| Value.Bool true |))); + M.alloc (| M.of_value (| Value.Bool true |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "alloc::borrow::Cow::Owned", 0 |) in - M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -368,21 +379,22 @@ Module borrow. !self.is_borrowed() } *) - Definition is_owned (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_owned (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::borrow::Cow") [ B ], "is_borrowed", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -404,7 +416,7 @@ Module borrow. } } *) - Definition to_mut (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_mut (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self ] => @@ -428,20 +440,23 @@ Module borrow. let _ := M.write (| M.read (| self |), - Value.StructTuple - "alloc::borrow::Cow::Owned" - [ - M.call_closure (| - M.get_trait_method (| - "alloc::borrow::ToOwned", - B, - [], - "to_owned", - [] - |), - [ M.read (| borrowed |) ] - |) - ] + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Owned" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "alloc::borrow::ToOwned", + B, + [], + "to_owned", + [] + |), + [ M.read (| borrowed |) ] + |)) + ] + |) |) in M.alloc (| M.read (| @@ -456,8 +471,10 @@ Module borrow. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "internal error: entered unreachable code" + M.of_value (| + Value.String + "internal error: entered unreachable code" + |) |) ] |) @@ -503,7 +520,7 @@ Module borrow. } } *) - Definition into_owned (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_owned (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self ] => @@ -559,7 +576,7 @@ Module borrow. } } *) - Definition deref (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self ] => @@ -628,7 +645,7 @@ Module borrow. Ord::cmp(&**self, &**other) } *) - Definition cmp (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self; other ] => @@ -680,7 +697,7 @@ Module borrow. PartialEq::eq(&**self, &**other) } *) - Definition eq (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self; other ] => @@ -732,7 +749,7 @@ Module borrow. PartialOrd::partial_cmp(&**self, &**other) } *) - Definition partial_cmp (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self; other ] => @@ -787,7 +804,7 @@ Module borrow. } } *) - Definition fmt (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self; f ] => @@ -856,7 +873,7 @@ Module borrow. } } *) - Definition fmt (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ self; f ] => @@ -922,19 +939,28 @@ Module borrow. Owned(::Owned::default()) } *) - Definition default (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "alloc::borrow::Cow::Owned" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.associated, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Owned" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.associated, + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -955,7 +981,7 @@ Module borrow. Hash::hash(&**self, state) } *) - Definition hash (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [ H ], [ self; state ] => @@ -998,7 +1024,7 @@ Module borrow. self } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1038,7 +1064,7 @@ Module borrow. self } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1083,7 +1109,7 @@ Module borrow. self } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1134,7 +1160,7 @@ Module borrow. } } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1142,7 +1168,7 @@ Module borrow. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1168,29 +1194,34 @@ Module borrow. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.write (| M.read (| self |), - Value.StructTuple "alloc::borrow::Cow::Borrowed" [ M.read (| rhs |) ] + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Borrowed" + [ A.to_value (M.read (| rhs |)) ] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_empty", [] |), [ M.read (| rhs |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1212,6 +1243,7 @@ Module borrow. |), [ BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "str", @@ -1246,12 +1278,15 @@ Module borrow. let _ := M.write (| M.read (| self |), - Value.StructTuple - "alloc::borrow::Cow::Owned" - [ M.read (| s |) ] + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Owned" + [ A.to_value (M.read (| s |)) ] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1275,8 +1310,8 @@ Module borrow. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -1310,7 +1345,7 @@ Module borrow. } } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1318,7 +1353,7 @@ Module borrow. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1346,15 +1381,15 @@ Module borrow. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_empty", [] |), [ M.call_closure (| @@ -1370,13 +1405,14 @@ Module borrow. [ rhs ] |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1398,6 +1434,7 @@ Module borrow. |), [ BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "str", @@ -1445,12 +1482,15 @@ Module borrow. let _ := M.write (| M.read (| self |), - Value.StructTuple - "alloc::borrow::Cow::Owned" - [ M.read (| s |) ] + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Owned" + [ A.to_value (M.read (| s |)) ] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1483,8 +1523,8 @@ Module borrow. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] diff --git a/CoqOfRust/alloc/boxed.v b/CoqOfRust/alloc/boxed.v index 5e6301e83..237c53c3b 100644 --- a/CoqOfRust/alloc/boxed.v +++ b/CoqOfRust/alloc/boxed.v @@ -19,7 +19,7 @@ Module boxed. Box::new(x) } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ x ] => @@ -45,7 +45,7 @@ Module boxed. Self::new_uninit_in(Global) } *) - Definition new_uninit (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -56,7 +56,7 @@ Module boxed. "new_uninit_in", [] |), - [ Value.StructTuple "alloc::alloc::Global" [] ] + [ M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -70,7 +70,7 @@ Module boxed. Self::new_zeroed_in(Global) } *) - Definition new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -81,7 +81,7 @@ Module boxed. "new_zeroed_in", [] |), - [ Value.StructTuple "alloc::alloc::Global" [] ] + [ M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -95,7 +95,7 @@ Module boxed. Box::new(x).into() } *) - Definition pin (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pin (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ x ] => @@ -134,7 +134,7 @@ Module boxed. Self::try_new_in(x, Global) } *) - Definition try_new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ x ] => @@ -146,7 +146,7 @@ Module boxed. "try_new_in", [] |), - [ M.read (| x |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| x |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -160,7 +160,7 @@ Module boxed. Box::try_new_uninit_in(Global) } *) - Definition try_new_uninit (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_uninit (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -171,7 +171,7 @@ Module boxed. "try_new_uninit_in", [] |), - [ Value.StructTuple "alloc::alloc::Global" [] ] + [ M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -185,7 +185,7 @@ Module boxed. Box::try_new_zeroed_in(Global) } *) - Definition try_new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -196,7 +196,7 @@ Module boxed. "try_new_zeroed_in", [] |), - [ Value.StructTuple "alloc::alloc::Global" [] ] + [ M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -209,7 +209,7 @@ Module boxed. unsafe { Self::from_raw_in(raw, Global) } } *) - Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ raw ] => @@ -221,7 +221,7 @@ Module boxed. "from_raw_in", [] |), - [ M.read (| raw |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| raw |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -246,7 +246,7 @@ Module boxed. } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ x; alloc ] => @@ -314,7 +314,7 @@ Module boxed. } } *) - Definition try_new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ x; alloc ] => @@ -429,20 +429,24 @@ Module boxed. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], - "assume_init", - [] - |), - [ M.read (| boxed |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A + ], + "assume_init", + [] + |), + [ M.read (| boxed |) ] + |)) + ] + |) |) |))) |))) @@ -467,7 +471,7 @@ Module boxed. } } *) - Definition new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -539,7 +543,7 @@ Module boxed. unsafe { Ok(Box::from_raw_in(ptr.as_ptr(), alloc)) } } *) - Definition try_new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -551,7 +555,7 @@ Module boxed. let ptr := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -704,32 +708,40 @@ Module boxed. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], - "from_raw_in", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ], - "as_ptr", + (Ty.path "alloc::boxed::Box") + [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A + ], + "from_raw_in", [] |), - [ M.read (| ptr |) ] - |); - M.read (| alloc |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ], + "as_ptr", + [] + |), + [ M.read (| ptr |) ] + |); + M.read (| alloc |) + ] + |)) + ] + |) |) |))) |))) @@ -754,7 +766,7 @@ Module boxed. } } *) - Definition new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -826,7 +838,7 @@ Module boxed. unsafe { Ok(Box::from_raw_in(ptr.as_ptr(), alloc)) } } *) - Definition try_new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -838,7 +850,7 @@ Module boxed. let ptr := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -991,32 +1003,40 @@ Module boxed. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], - "from_raw_in", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ], - "as_ptr", + (Ty.path "alloc::boxed::Box") + [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A + ], + "from_raw_in", [] |), - [ M.read (| ptr |) ] - |); - M.read (| alloc |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ], + "as_ptr", + [] + |), + [ M.read (| ptr |) ] + |); + M.read (| alloc |) + ] + |)) + ] + |) |) |))) |))) @@ -1035,7 +1055,7 @@ Module boxed. Self::into_pin(Self::new_in(x, alloc)) } *) - Definition pin_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pin_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ x; alloc ] => @@ -1072,7 +1092,7 @@ Module boxed. unsafe { Box::from_raw_in(raw as *mut [T; 1], alloc) } } *) - Definition into_boxed_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_boxed_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ boxed ] => @@ -1107,7 +1127,7 @@ Module boxed. [] |), [ - (* Unsize *) M.pointer_coercion (M.rust_cast (M.read (| raw |))); + (* Unsize *) M.pointer_coercion (| M.rust_cast (| M.read (| raw |) |) |); M.read (| alloc |) ] |) @@ -1127,7 +1147,7 @@ Module boxed. *boxed } *) - Definition into_inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ boxed ] => @@ -1145,26 +1165,29 @@ Module boxed. Box(unsafe { Unique::new_unchecked(raw) }, alloc) } *) - Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ raw; alloc ] => ltac:(M.monadic (let raw := M.alloc (| raw |) in let alloc := M.alloc (| alloc |) in - Value.StructTuple - "alloc::boxed::Box" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], - "new_unchecked", - [] - |), - [ M.read (| raw |) ] - |); - M.read (| alloc |) - ])) + M.of_value (| + Value.StructTuple + "alloc::boxed::Box" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], + "new_unchecked", + [] + |), + [ M.read (| raw |) ] + |)); + A.to_value (M.read (| alloc |)) + ] + |))) | _, _ => M.impossible end. @@ -1177,7 +1200,7 @@ Module boxed. Self::into_raw_with_allocator(b).0 } *) - Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ b ] => @@ -1211,7 +1234,7 @@ Module boxed. (leaked.as_ptr(), alloc) } *) - Definition into_raw_with_allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw_with_allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ b ] => @@ -1237,18 +1260,21 @@ Module boxed. let leaked := M.copy (| γ0_0 |) in let alloc := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], - "as_ptr", - [] - |), - [ M.read (| leaked |) ] - |); - M.read (| alloc |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], + "as_ptr", + [] + |), + [ M.read (| leaked |) ] + |)); + A.to_value (M.read (| alloc |)) + ] + |) |))) ] |) @@ -1271,7 +1297,7 @@ Module boxed. (Unique::from(Box::leak(b)), alloc) } *) - Definition into_unique (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_unique (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ b ] => @@ -1286,29 +1312,32 @@ Module boxed. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], - [ Ty.apply (Ty.path "&mut") [ T ] ], - "from", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::boxed::Box") [ T; A ], - "leak", + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], + [ Ty.apply (Ty.path "&mut") [ T ] ], + "from", [] |), - [ M.read (| b |) ] - |) - ] - |); - M.read (| alloc |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::boxed::Box") [ T; A ], + "leak", + [] + |), + [ M.read (| b |) ] + |) + ] + |)); + A.to_value (M.read (| alloc |)) + ] + |) |) |))) | _, _ => M.impossible @@ -1323,7 +1352,7 @@ Module boxed. &b.1 } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ b ] => @@ -1345,7 +1374,7 @@ Module boxed. unsafe { &mut *mem::ManuallyDrop::new(b).0.as_ptr() } } *) - Definition leak (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition leak (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ b ] => @@ -1409,7 +1438,7 @@ Module boxed. unsafe { Pin::new_unchecked(boxed) } } *) - Definition into_pin (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_pin (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ boxed ] => @@ -1444,7 +1473,7 @@ Module boxed. unsafe { RawVec::with_capacity(len).into_box(len) } } *) - Definition new_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -1480,7 +1509,7 @@ Module boxed. unsafe { RawVec::with_capacity_zeroed(len).into_box(len) } } *) - Definition new_zeroed_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -1525,7 +1554,7 @@ Module boxed. unsafe { Ok(RawVec::from_raw_parts_in(ptr.as_ptr(), len, Global).into_box(len)) } } *) - Definition try_new_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -1537,7 +1566,7 @@ Module boxed. let ptr := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1549,9 +1578,10 @@ Module boxed. M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| len |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -1608,9 +1638,18 @@ Module boxed. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::alloc::AllocError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::alloc::AllocError" + [] + |)) + ] + |) |) |) |) @@ -1657,7 +1696,9 @@ Module boxed. |), [ M.alloc (| - Value.StructTuple "alloc::alloc::Global" [] + M.of_value (| + Value.StructTuple "alloc::alloc::Global" [] + |) |); M.read (| layout |) ] @@ -1737,43 +1778,46 @@ Module boxed. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::raw_vec::RawVec") - [ T; Ty.path "alloc::alloc::Global" ], - "into_box", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; Ty.path "alloc::alloc::Global" ], - "from_raw_parts_in", + "into_box", [] |), [ M.call_closure (| M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ptr", + Ty.apply + (Ty.path "alloc::raw_vec::RawVec") + [ T; Ty.path "alloc::alloc::Global" ], + "from_raw_parts_in", [] |), - [ M.read (| ptr |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_ptr", + [] + |), + [ M.read (| ptr |) ] + |); + M.read (| len |); + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + ] |); - M.read (| len |); - Value.StructTuple "alloc::alloc::Global" [] + M.read (| len |) ] - |); - M.read (| len |) - ] - |) - ] + |)) + ] + |) |) |))) |))) @@ -1798,7 +1842,7 @@ Module boxed. unsafe { Ok(RawVec::from_raw_parts_in(ptr.as_ptr(), len, Global).into_box(len)) } } *) - Definition try_new_zeroed_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_zeroed_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -1810,7 +1854,7 @@ Module boxed. let ptr := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1822,9 +1866,10 @@ Module boxed. M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| len |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -1881,9 +1926,18 @@ Module boxed. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::alloc::AllocError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::alloc::AllocError" + [] + |)) + ] + |) |) |) |) @@ -1930,7 +1984,9 @@ Module boxed. |), [ M.alloc (| - Value.StructTuple "alloc::alloc::Global" [] + M.of_value (| + Value.StructTuple "alloc::alloc::Global" [] + |) |); M.read (| layout |) ] @@ -2010,43 +2066,46 @@ Module boxed. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::raw_vec::RawVec") - [ T; Ty.path "alloc::alloc::Global" ], - "into_box", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; Ty.path "alloc::alloc::Global" ], - "from_raw_parts_in", + "into_box", [] |), [ M.call_closure (| M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ptr", + Ty.apply + (Ty.path "alloc::raw_vec::RawVec") + [ T; Ty.path "alloc::alloc::Global" ], + "from_raw_parts_in", [] |), - [ M.read (| ptr |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_ptr", + [] + |), + [ M.read (| ptr |) ] + |); + M.read (| len |); + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + ] |); - M.read (| len |); - Value.StructTuple "alloc::alloc::Global" [] + M.read (| len |) ] - |); - M.read (| len |) - ] - |) - ] + |)) + ] + |) |) |))) |))) @@ -2067,7 +2126,7 @@ Module boxed. unsafe { RawVec::with_capacity_in(len, alloc).into_box(len) } } *) - Definition new_uninit_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ len; alloc ] => @@ -2104,7 +2163,7 @@ Module boxed. unsafe { RawVec::with_capacity_zeroed_in(len, alloc).into_box(len) } } *) - Definition new_zeroed_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ len; alloc ] => @@ -2149,7 +2208,7 @@ Module boxed. unsafe { Box::from_raw_in(raw as *mut T, alloc) } } *) - Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2183,7 +2242,7 @@ Module boxed. "from_raw_in", [] |), - [ M.rust_cast (M.read (| raw |)); M.read (| alloc |) ] + [ M.rust_cast (| M.read (| raw |) |); M.read (| alloc |) ] |) |))) ] @@ -2204,7 +2263,7 @@ Module boxed. } } *) - Definition write (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ boxed; value ] => @@ -2261,7 +2320,7 @@ Module boxed. unsafe { Box::from_raw_in(raw as *mut [T], alloc) } } *) - Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2302,7 +2361,7 @@ Module boxed. "from_raw_in", [] |), - [ M.rust_cast (M.read (| raw |)); M.read (| alloc |) ] + [ M.rust_cast (| M.read (| raw |) |); M.read (| alloc |) ] |) |))) ] @@ -2335,7 +2394,7 @@ Module boxed. } } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2356,36 +2415,38 @@ Module boxed. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], "as_ptr", [] |), [ M.read (| ptr |) ] - |)) + |) + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ layout ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -2427,8 +2488,8 @@ Module boxed. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2453,7 +2514,7 @@ Module boxed. Box::new(T::default()) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -2495,7 +2556,7 @@ Module boxed. Box(ptr, Global) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -2504,8 +2565,8 @@ Module boxed. let ptr := M.alloc (| (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::unique::Unique") @@ -2514,12 +2575,18 @@ Module boxed. [] |), [] - |)) + |) + |) |) in M.alloc (| - Value.StructTuple - "alloc::boxed::Box" - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + M.of_value (| + Value.StructTuple + "alloc::boxed::Box" + [ + A.to_value (M.read (| ptr |)); + A.to_value (M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |)) + ] + |) |) |))) | _, _ => M.impossible @@ -2548,7 +2615,7 @@ Module boxed. Box(ptr, Global) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -2558,8 +2625,8 @@ Module boxed. let bytes := M.alloc (| (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::unique::Unique") @@ -2568,7 +2635,8 @@ Module boxed. [] |), [] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -2578,8 +2646,8 @@ Module boxed. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::unique::Unique") @@ -2588,15 +2656,21 @@ Module boxed. [] |), [ M.read (| bytes |) ] - |)) + |) + |) ] |) |) |) in M.alloc (| - Value.StructTuple - "alloc::boxed::Box" - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + M.of_value (| + Value.StructTuple + "alloc::boxed::Box" + [ + A.to_value (M.read (| ptr |)); + A.to_value (M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |)) + ] + |) |) |))) | _, _ => M.impossible @@ -2623,7 +2697,7 @@ Module boxed. } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2696,7 +2770,7 @@ Module boxed. ( **self).clone_from(&( **source)); } *) - Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; source ] => @@ -2711,7 +2785,7 @@ Module boxed. [ M.read (| M.read (| self |) |); M.read (| M.read (| source |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2740,7 +2814,7 @@ Module boxed. unsafe { from_boxed_utf8_unchecked(buf) } } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2797,7 +2871,7 @@ Module boxed. PartialEq::eq(&**self, &**other) } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2816,7 +2890,7 @@ Module boxed. PartialEq::ne(&**self, &**other) } *) - Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2848,7 +2922,7 @@ Module boxed. PartialOrd::partial_cmp(&**self, &**other) } *) - Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2867,7 +2941,7 @@ Module boxed. PartialOrd::lt(&**self, &**other) } *) - Definition lt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2886,7 +2960,7 @@ Module boxed. PartialOrd::le(&**self, &**other) } *) - Definition le (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2905,7 +2979,7 @@ Module boxed. PartialOrd::ge(&**self, &**other) } *) - Definition ge (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2924,7 +2998,7 @@ Module boxed. PartialOrd::gt(&**self, &**other) } *) - Definition gt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2962,7 +3036,7 @@ Module boxed. Ord::cmp(&**self, &**other) } *) - Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -3005,7 +3079,7 @@ Module boxed. ( **self).hash(state); } *) - Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ H ], [ self; state ] => @@ -3020,7 +3094,7 @@ Module boxed. [ M.read (| M.read (| self |) |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3042,7 +3116,7 @@ Module boxed. ( **self).finish() } *) - Definition finish (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3060,7 +3134,7 @@ Module boxed. ( **self).write(bytes) } *) - Definition write (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; bytes ] => @@ -3079,7 +3153,7 @@ Module boxed. ( **self).write_u8(i) } *) - Definition write_u8 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u8 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3098,7 +3172,7 @@ Module boxed. ( **self).write_u16(i) } *) - Definition write_u16 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u16 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3117,7 +3191,7 @@ Module boxed. ( **self).write_u32(i) } *) - Definition write_u32 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u32 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3136,7 +3210,7 @@ Module boxed. ( **self).write_u64(i) } *) - Definition write_u64 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u64 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3155,7 +3229,7 @@ Module boxed. ( **self).write_u128(i) } *) - Definition write_u128 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u128 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3174,7 +3248,7 @@ Module boxed. ( **self).write_usize(i) } *) - Definition write_usize (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_usize (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3193,7 +3267,7 @@ Module boxed. ( **self).write_i8(i) } *) - Definition write_i8 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i8 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3212,7 +3286,7 @@ Module boxed. ( **self).write_i16(i) } *) - Definition write_i16 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i16 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3231,7 +3305,7 @@ Module boxed. ( **self).write_i32(i) } *) - Definition write_i32 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i32 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3250,7 +3324,7 @@ Module boxed. ( **self).write_i64(i) } *) - Definition write_i64 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i64 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3269,7 +3343,7 @@ Module boxed. ( **self).write_i128(i) } *) - Definition write_i128 (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i128 (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3288,7 +3362,7 @@ Module boxed. ( **self).write_isize(i) } *) - Definition write_isize (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_isize (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -3307,7 +3381,7 @@ Module boxed. ( **self).write_length_prefix(len) } *) - Definition write_length_prefix (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_length_prefix (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len ] => @@ -3326,7 +3400,7 @@ Module boxed. ( **self).write_str(s) } *) - Definition write_str (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; s ] => @@ -3376,7 +3450,7 @@ Module boxed. Box::new(t) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -3411,7 +3485,7 @@ Module boxed. Box::into_pin(boxed) } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ boxed ] => @@ -3451,7 +3525,7 @@ Module boxed. slice.to_vec().into_boxed_slice() } *) - Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -3498,7 +3572,7 @@ Module boxed. } } *) - Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -3610,7 +3684,7 @@ Module boxed. >::from_slice(slice) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -3655,7 +3729,7 @@ Module boxed. } } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ cow ] => @@ -3736,7 +3810,7 @@ Module boxed. unsafe { from_boxed_utf8_unchecked(Box::from(s.as_bytes())) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -3786,7 +3860,7 @@ Module boxed. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ cow ] => ltac:(M.monadic @@ -3862,7 +3936,7 @@ Module boxed. unsafe { Box::from_raw_in(raw as *mut [u8], alloc) } } *) - Definition from (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ s ] => @@ -3896,7 +3970,7 @@ Module boxed. "from_raw_in", [] |), - [ M.rust_cast (M.read (| raw |)); M.read (| alloc |) ] + [ M.rust_cast (| M.read (| raw |) |); M.read (| alloc |) ] |) |))) ] @@ -3926,15 +4000,15 @@ Module boxed. Box::new(array) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => ltac:(M.monadic (let array := M.alloc (| array |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -3943,7 +4017,8 @@ Module boxed. [] |), [ M.read (| array |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -3968,7 +4043,7 @@ Module boxed. unsafe { Box::from_raw_in(ptr as *mut [T; N], alloc) } } *) - Definition boxed_slice_as_array_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition boxed_slice_as_array_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; A ], [ boxed_slice ] => ltac:(M.monadic @@ -3976,29 +4051,35 @@ Module boxed. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| boxed_slice |) ] - |) - |); - M.get_constant (| "alloc::boxed::boxed_slice_as_array_unchecked::N" |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| boxed_slice |) ] + |) + |)); + A.to_value + (M.get_constant (| + "alloc::boxed::boxed_slice_as_array_unchecked::N" + |)) + ] + |) |), [ fun γ => @@ -4008,17 +4089,19 @@ Module boxed. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4030,9 +4113,11 @@ Module boxed. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -4044,20 +4129,25 @@ Module boxed. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -4087,7 +4177,7 @@ Module boxed. "from_raw_in", [] |), - [ M.rust_cast (M.read (| ptr |)); M.read (| alloc |) ] + [ M.rust_cast (| M.read (| ptr |) |); M.read (| alloc |) ] |) |))) ] @@ -4117,7 +4207,7 @@ Module boxed. } } *) - Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ boxed_slice ] => @@ -4125,42 +4215,50 @@ Module boxed. (let boxed_slice := M.alloc (| boxed_slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| boxed_slice |) ] - |)) - (M.read (| M.get_constant (| "alloc::boxed::N" |) |)) + |), + M.read (| M.get_constant (| "alloc::boxed::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_function (| - "alloc::boxed::boxed_slice_as_array_unchecked", - [ T; Ty.path "alloc::alloc::Global" ] - |), - [ M.read (| boxed_slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "alloc::boxed::boxed_slice_as_array_unchecked", + [ T; Ty.path "alloc::alloc::Global" ] + |), + [ M.read (| boxed_slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| boxed_slice |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| boxed_slice |)) ] + |) |))) ] |) @@ -4204,7 +4302,7 @@ Module boxed. } } *) - Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ vec ] => @@ -4212,15 +4310,15 @@ Module boxed. (let vec := M.alloc (| vec |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -4229,8 +4327,9 @@ Module boxed. [] |), [ vec ] - |)) - (M.read (| M.get_constant (| "alloc::boxed::N" |) |)) + |), + 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 := @@ -4247,22 +4346,29 @@ Module boxed. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_function (| - "alloc::boxed::boxed_slice_as_array_unchecked", - [ T; Ty.path "alloc::alloc::Global" ] - |), - [ M.read (| boxed_slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "alloc::boxed::boxed_slice_as_array_unchecked", + [ T; Ty.path "alloc::alloc::Global" ] + |), + [ M.read (| boxed_slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| vec |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| vec |)) ] + |) |))) ] |) @@ -4290,7 +4396,7 @@ Module boxed. if self.is::() { unsafe { Ok(self.downcast_unchecked::()) } } else { Err(self) } } *) - Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -4298,7 +4404,7 @@ Module boxed. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4316,27 +4422,32 @@ Module boxed. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.dyn [ ("core::any::Any::Trait", []) ]; A ], - "downcast_unchecked", - [ T ] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.dyn [ ("core::any::Any::Trait", []) ]; A ], + "downcast_unchecked", + [ T ] + |), + [ M.read (| self |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (* Unsize *) (M.pointer_coercion (| M.read (| self |) |)) ] + |) |))) ] |) @@ -4357,7 +4468,7 @@ Module boxed. } } *) - Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -4366,30 +4477,31 @@ Module boxed. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.dyn [ ("core::any::Any::Trait", []) ], "is", [ T ] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4400,16 +4512,22 @@ Module boxed. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: self.is::()" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: self.is::()" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -4422,7 +4540,7 @@ Module boxed. "into_raw_with_allocator", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |) |), [ @@ -4439,7 +4557,7 @@ Module boxed. "from_raw_in", [] |), - [ M.rust_cast (M.read (| raw |)); M.read (| alloc |) ] + [ M.rust_cast (| M.read (| raw |) |); M.read (| alloc |) ] |) |))) ] @@ -4456,7 +4574,7 @@ Module boxed. if self.is::() { unsafe { Ok(self.downcast_unchecked::()) } } else { Err(self) } } *) - Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -4464,7 +4582,7 @@ Module boxed. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4482,27 +4600,32 @@ Module boxed. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.dyn [ ("core::any::Any::Trait", []) ]; A ], - "downcast_unchecked", - [ T ] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.dyn [ ("core::any::Any::Trait", []) ]; A ], + "downcast_unchecked", + [ T ] + |), + [ M.read (| self |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (* Unsize *) (M.pointer_coercion (| M.read (| self |) |)) ] + |) |))) ] |) @@ -4523,7 +4646,7 @@ Module boxed. } } *) - Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -4532,30 +4655,31 @@ Module boxed. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.dyn [ ("core::any::Any::Trait", []) ], "is", [ T ] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4566,16 +4690,22 @@ Module boxed. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: self.is::()" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: self.is::()" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -4588,7 +4718,7 @@ Module boxed. "into_raw_with_allocator", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |) |), [ @@ -4605,7 +4735,7 @@ Module boxed. "from_raw_in", [] |), - [ M.rust_cast (M.read (| raw |)); M.read (| alloc |) ] + [ M.rust_cast (| M.read (| raw |) |); M.read (| alloc |) ] |) |))) ] @@ -4622,7 +4752,7 @@ Module boxed. if self.is::() { unsafe { Ok(self.downcast_unchecked::()) } } else { Err(self) } } *) - Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -4630,7 +4760,7 @@ Module boxed. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4648,27 +4778,32 @@ Module boxed. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.dyn [ ("core::any::Any::Trait", []) ]; A ], - "downcast_unchecked", - [ T ] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.dyn [ ("core::any::Any::Trait", []) ]; A ], + "downcast_unchecked", + [ T ] + |), + [ M.read (| self |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (* Unsize *) (M.pointer_coercion (| M.read (| self |) |)) ] + |) |))) ] |) @@ -4690,7 +4825,7 @@ Module boxed. } } *) - Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -4699,30 +4834,31 @@ Module boxed. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.dyn [ ("core::any::Any::Trait", []) ], "is", [ T ] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4733,16 +4869,22 @@ Module boxed. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: self.is::()" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: self.is::()" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -4755,7 +4897,7 @@ Module boxed. "into_raw_with_allocator", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |) |), [ @@ -4772,7 +4914,7 @@ Module boxed. "from_raw_in", [] |), - [ M.rust_cast (M.read (| raw |)); M.read (| alloc |) ] + [ M.rust_cast (| M.read (| raw |) |); M.read (| alloc |) ] |) |))) ] @@ -4796,7 +4938,7 @@ Module boxed. fmt::Display::fmt(&**self, f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -4827,7 +4969,7 @@ Module boxed. fmt::Debug::fmt(&**self, f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -4861,7 +5003,7 @@ Module boxed. fmt::Pointer::fmt(&ptr, f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -4906,7 +5048,7 @@ Module boxed. &**self } *) - Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4934,7 +5076,7 @@ Module boxed. &mut **self } *) - Definition deref_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4976,7 +5118,7 @@ Module boxed. ( **self).next() } *) - Definition next (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -4994,7 +5136,7 @@ Module boxed. ( **self).size_hint() } *) - Definition size_hint (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -5018,7 +5160,7 @@ Module boxed. ( **self).nth(n) } *) - Definition nth (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self; n ] => @@ -5037,7 +5179,7 @@ Module boxed. BoxIter::last(self) } *) - Definition last (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -5091,7 +5233,7 @@ Module boxed. self.fold(None, some) } *) - Definition last (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -5112,7 +5254,7 @@ Module boxed. |), [ M.read (| self |); - Value.StructTuple "core::option::Option::None" []; + M.of_value (| Value.StructTuple "core::option::Option::None" [] |); M.get_associated_function (| Self, "some.last", [] |) ] |))) @@ -5137,7 +5279,7 @@ Module boxed. ( *self).last() } *) - Definition last (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -5167,7 +5309,7 @@ Module boxed. ( **self).next_back() } *) - Definition next_back (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -5191,7 +5333,7 @@ Module boxed. ( **self).nth_back(n) } *) - Definition nth_back (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self; n ] => @@ -5232,7 +5374,7 @@ Module boxed. ( **self).len() } *) - Definition len (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -5256,7 +5398,7 @@ Module boxed. ( **self).is_empty() } *) - Definition is_empty (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -5309,7 +5451,7 @@ Module boxed. >::call_once( *self, args) } *) - Definition call_once (Args F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (Args F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Args F A in match τ, α with | [], [ self; args ] => @@ -5344,7 +5486,7 @@ Module boxed. >::call_mut(self, args) } *) - Definition call_mut (Args F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (Args F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Args F A in match τ, α with | [], [ self; args ] => @@ -5375,7 +5517,7 @@ Module boxed. >::call(self, args) } *) - Definition call (Args F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call (Args F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Args F A in match τ, α with | [], [ self; args ] => @@ -5435,7 +5577,7 @@ Module boxed. iter.into_iter().collect::>().into_boxed_slice() } *) - Definition from_iter (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ T ], [ iter ] => @@ -5493,7 +5635,7 @@ Module boxed. self.to_vec_in(alloc).into_boxed_slice() } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5550,7 +5692,7 @@ Module boxed. } } *) - Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -5559,30 +5701,31 @@ Module boxed. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| M.read (| self |) |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| M.read (| other |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -5596,7 +5739,7 @@ Module boxed. [ M.read (| M.read (| self |) |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -5615,7 +5758,7 @@ Module boxed. [ M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -5643,7 +5786,7 @@ Module boxed. &**self } *) - Definition borrow (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5670,7 +5813,7 @@ Module boxed. &mut **self } *) - Definition borrow_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5697,7 +5840,7 @@ Module boxed. &**self } *) - Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5724,7 +5867,7 @@ Module boxed. &mut **self } *) - Definition as_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5769,7 +5912,7 @@ Module boxed. G::resume(Pin::new(&mut *self), arg) } *) - Definition resume (G R A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition resume (G R A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self G R A in match τ, α with | [], [ self; arg ] => @@ -5841,7 +5984,7 @@ Module boxed. G::resume(( *self).as_mut(), arg) } *) - Definition resume (G R A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition resume (G R A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self G R A in match τ, α with | [], [ self; arg ] => @@ -5913,7 +6056,7 @@ Module boxed. F::poll(Pin::new(&mut *self), cx) } *) - Definition poll (F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll (F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F A in match τ, α with | [], [ self; cx ] => @@ -5978,7 +6121,7 @@ Module boxed. Pin::new(&mut **self).poll_next(cx) } *) - Definition poll_next (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll_next (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self; cx ] => @@ -6036,7 +6179,7 @@ Module boxed. ( **self).size_hint() } *) - Definition size_hint (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self ] => @@ -6084,14 +6227,14 @@ Module boxed. } } *) - Definition downcast (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6111,8 +6254,8 @@ Module boxed. let raw := M.alloc (| (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -6123,31 +6266,37 @@ Module boxed. "into_raw", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] - |)) + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] + |) + |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ T; Ty.path "alloc::alloc::Global" ], - "from_raw", - [] - |), - [ M.rust_cast (M.read (| raw |)) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ T; Ty.path "alloc::alloc::Global" ], + "from_raw", + [] + |), + [ M.rust_cast (| M.read (| raw |) |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (* Unsize *) (M.pointer_coercion (| M.read (| self |) |)) ] + |) |))) ] |) @@ -6165,13 +6314,13 @@ Module boxed. }) } *) - Definition downcast (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => 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 (| @@ -6219,10 +6368,10 @@ Module boxed. "downcast", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| err |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| err |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6233,8 +6382,8 @@ Module boxed. ltac:(M.monadic (let s := M.copy (| γ |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -6246,8 +6395,8 @@ Module boxed. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -6259,13 +6408,16 @@ Module boxed. [] |), [ M.read (| s |) ] - |)) + |) + |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -6283,13 +6435,13 @@ Module boxed. }) } *) - Definition downcast (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => 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 (| @@ -6337,10 +6489,10 @@ Module boxed. "downcast", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| err |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| err |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6351,8 +6503,8 @@ Module boxed. ltac:(M.monadic (let s := M.copy (| γ |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -6364,8 +6516,8 @@ Module boxed. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -6377,13 +6529,16 @@ Module boxed. [] |), [ M.read (| s |) ] - |)) + |) + |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -6407,24 +6562,26 @@ Module boxed. Box::new(err) } *) - Definition from (E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E in match τ, α with | [], [ err ] => ltac:(M.monadic (let err := M.alloc (| err |) in (* Unsize *) - M.pointer_coercion + M.pointer_coercion (| (* Unsize *) - (M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") [ E; Ty.path "alloc::alloc::Global" ], "new", [] |), [ M.read (| err |) ] - |))))) + |) + |) + |))) | _, _ => M.impossible end. @@ -6448,24 +6605,26 @@ Module boxed. Box::new(err) } *) - Definition from (E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E in match τ, α with | [], [ err ] => ltac:(M.monadic (let err := M.alloc (| err |) in (* Unsize *) - M.pointer_coercion + M.pointer_coercion (| (* Unsize *) - (M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") [ E; Ty.path "alloc::alloc::Global" ], "new", [] |), [ M.read (| err |) ] - |))))) + |) + |) + |))) | _, _ => M.impossible end. @@ -6511,16 +6670,16 @@ Module boxed. Box::new(StringError(err)) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ err ] => ltac:(M.monadic (let err := M.alloc (| err |) in (* Unsize *) - M.pointer_coercion + M.pointer_coercion (| (* Unsize *) - (M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -6528,8 +6687,16 @@ Module boxed. "new", [] |), - [ Value.StructTuple "alloc::boxed::from::StringError" [ M.read (| err |) ] ] - |))))) + [ + M.of_value (| + Value.StructTuple + "alloc::boxed::from::StringError" + [ A.to_value (M.read (| err |)) ] + |) + ] + |) + |) + |))) | _, _ => M.impossible end. @@ -6546,14 +6713,14 @@ Module boxed. err2 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ str_err ] => ltac:(M.monadic (let str_err := M.alloc (| str_err |) in (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| let err1 := M.alloc (| M.call_closure (| @@ -6572,9 +6739,10 @@ Module boxed. [ M.read (| str_err |) ] |) |) in - let err2 := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| err1 |)) |) in - M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| err2 |)) |) - |)))) + let err2 := M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| err1 |) |) |) in + M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| err2 |) |) |) + |) + |))) | _, _ => M.impossible end. @@ -6598,14 +6766,14 @@ Module boxed. From::from(String::from(err)) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ err ] => ltac:(M.monadic (let err := M.alloc (| err |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.apply @@ -6627,7 +6795,8 @@ Module boxed. [ M.read (| err |) ] |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -6642,14 +6811,14 @@ Module boxed. From::from(String::from(err)) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ err ] => ltac:(M.monadic (let err := M.alloc (| err |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.apply @@ -6671,7 +6840,8 @@ Module boxed. [ M.read (| err |) ] |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -6695,14 +6865,14 @@ Module boxed. From::from(String::from(err)) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ err ] => ltac:(M.monadic (let err := M.alloc (| err |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.apply @@ -6724,7 +6894,8 @@ Module boxed. [ M.read (| err |) ] |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -6740,14 +6911,14 @@ Module boxed. From::from(String::from(err)) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ err ] => ltac:(M.monadic (let err := M.alloc (| err |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.apply @@ -6769,7 +6940,8 @@ Module boxed. [ M.read (| err |) ] |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -6792,7 +6964,7 @@ Module boxed. core::error::Error::description(&**self) } *) - Definition description (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition description (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6810,7 +6982,7 @@ Module boxed. core::error::Error::cause(&**self) } *) - Definition cause (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cause (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6828,7 +7000,7 @@ Module boxed. core::error::Error::source(&**self) } *) - Definition source (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition source (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6846,7 +7018,7 @@ Module boxed. core::error::Error::provide(&**self, request); } *) - Definition provide (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition provide (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; request ] => @@ -6861,7 +7033,7 @@ Module boxed. [ M.read (| M.read (| self |) |); M.read (| request |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/boxed/thin.v b/CoqOfRust/alloc/boxed/thin.v index 82200a00c..5cc513db7 100644 --- a/CoqOfRust/alloc/boxed/thin.v +++ b/CoqOfRust/alloc/boxed/thin.v @@ -48,7 +48,7 @@ Module boxed. ThinBox { ptr, _marker: PhantomData } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => @@ -74,12 +74,16 @@ Module boxed. |) |) in M.alloc (| - Value.StructRecord - "alloc::boxed::thin::ThinBox" - [ - ("ptr", M.read (| ptr |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::boxed::thin::ThinBox" + [ + ("ptr", A.to_value (M.read (| ptr |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -95,7 +99,7 @@ Module boxed. unsafe { *self.with_header().header() } } *) - Definition meta (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition meta (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -132,7 +136,7 @@ Module boxed. self.with_header().value() } *) - Definition data (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition data (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -168,14 +172,14 @@ Module boxed. unsafe { &*((&self.ptr) as *const WithOpaqueHeader as *const WithHeader<_>) } } *) - Definition with_header (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_header (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -184,7 +188,8 @@ Module boxed. "ptr" |) |)) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -207,7 +212,7 @@ Module boxed. ThinBox { ptr, _marker: PhantomData } } *) - Definition new_unsize (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unsize (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [ T ], [ value ] => @@ -218,7 +223,8 @@ Module boxed. M.alloc (| M.call_closure (| M.get_function (| "core::ptr::metadata::metadata", [ Dyn ] |), - [ M.read (| M.use (M.alloc (| (* Unsize *) M.pointer_coercion value |)) |) ] + [ M.read (| M.use (M.alloc (| (* Unsize *) M.pointer_coercion (| value |) |)) |) + ] |) |) in let ptr := @@ -233,12 +239,16 @@ Module boxed. |) |) in M.alloc (| - Value.StructRecord - "alloc::boxed::thin::ThinBox" - [ - ("ptr", M.read (| ptr |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::boxed::thin::ThinBox" + [ + ("ptr", A.to_value (M.read (| ptr |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -257,7 +267,7 @@ Module boxed. Debug::fmt(self.deref(), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -300,7 +310,7 @@ Module boxed. Display::fmt(self.deref(), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -349,7 +359,7 @@ Module boxed. unsafe { &*pointer } } *) - Definition deref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -382,7 +392,7 @@ Module boxed. M.alloc (| M.call_closure (| M.get_function (| "core::ptr::metadata::from_raw_parts", [ T ] |), - [ M.rust_cast (M.read (| value |)); M.read (| metadata |) ] + [ M.rust_cast (| M.read (| value |) |); M.read (| metadata |) ] |) |) in M.alloc (| M.read (| pointer |) |) @@ -411,7 +421,7 @@ Module boxed. unsafe { &mut *pointer } } *) - Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -444,7 +454,7 @@ Module boxed. M.alloc (| M.call_closure (| M.get_function (| "core::ptr::metadata::from_raw_parts_mut", [ T ] |), - [ M.rust_cast (M.read (| value |)); M.read (| metadata |) ] + [ M.rust_cast (| M.read (| value |) |); M.read (| metadata |) ] |) |) in M.alloc (| M.read (| pointer |) |) @@ -473,7 +483,7 @@ Module boxed. } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -515,7 +525,7 @@ Module boxed. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -557,7 +567,7 @@ Module boxed. Self(ptr.0) } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H; T ], [ header; value ] => ltac:(M.monadic @@ -576,17 +586,20 @@ Module boxed. |) |) in M.alloc (| - Value.StructTuple - "alloc::boxed::thin::WithOpaqueHeader" - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - ptr, - "alloc::boxed::thin::WithHeader", - 0 - |) - |) - ] + M.of_value (| + Value.StructTuple + "alloc::boxed::thin::WithOpaqueHeader" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + ptr, + "alloc::boxed::thin::WithHeader", + 0 + |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -641,7 +654,7 @@ Module boxed. } } *) - Definition new (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [ T ], [ header; value ] => @@ -687,23 +700,24 @@ Module boxed. let ptr := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ layout ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -712,11 +726,13 @@ Module boxed. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -724,19 +740,20 @@ Module boxed. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| + UnOp.Pure.not (| + LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| value_offset |)) - (Value.Integer Integer.Usize 0), + BinOp.Pure.eq (| + M.read (| value_offset |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (M.read (| M.get_constant (| @@ -750,7 +767,8 @@ Module boxed. "core::mem::SizedTypeProperties::IS_ZST" |) |))) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -766,19 +784,26 @@ Module boxed. |), [ M.read (| - Value.String - "assertion failed: value_offset == 0 && T::IS_ZST && H::IS_ZST" + M.of_value (| + Value.String + "assertion failed: value_offset == 0 && T::IS_ZST && H::IS_ZST" + |) |) ] |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -802,7 +827,7 @@ Module boxed. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -834,20 +859,23 @@ Module boxed. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "add", [] |), [ M.read (| ptr |); M.read (| value_offset |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -866,9 +894,17 @@ Module boxed. |) in let result := M.alloc (| - Value.StructTuple - "alloc::boxed::thin::WithHeader" - [ M.read (| ptr |); Value.StructTuple "core::marker::PhantomData" [] ] + M.of_value (| + Value.StructTuple + "alloc::boxed::thin::WithHeader" + [ + A.to_value (M.read (| ptr |)); + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |)) + ] + |) |) in let _ := M.alloc (| @@ -966,7 +1002,7 @@ Module boxed. } } *) - Definition drop (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [ T ], [ self; value ] => @@ -976,28 +1012,35 @@ Module boxed. M.read (| let _guard := M.alloc (| - Value.StructRecord - "alloc::boxed::thin::drop::DropGuard" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "alloc::boxed::thin::WithHeader", - 0 - |) - |)); - ("value_layout", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "for_value_raw", - [ T ] - |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| value |)) ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::boxed::thin::drop::DropGuard" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "alloc::boxed::thin::WithHeader", + 0 + |) + |))); + ("value_layout", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "for_value_raw", + [ T ] + |), + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| value |) |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) in let _ := M.alloc (| @@ -1006,7 +1049,7 @@ Module boxed. [ M.read (| value |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1029,7 +1072,7 @@ Module boxed. hp } *) - Definition header (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition header (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self ] => @@ -1038,8 +1081,8 @@ Module boxed. M.read (| let hp := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "sub", @@ -1071,35 +1114,37 @@ Module boxed. [] |) ] - |)) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ H ], "is_aligned", [] |), [ M.read (| hp |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1112,17 +1157,20 @@ Module boxed. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: hp.is_aligned()" + M.of_value (| + Value.String "assertion failed: hp.is_aligned()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in hp @@ -1139,7 +1187,7 @@ Module boxed. self.0.as_ptr() } *) - Definition value (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition value (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self ] => @@ -1173,7 +1221,7 @@ Module boxed. mem::size_of::() } *) - Definition header_size (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition header_size (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [] => @@ -1191,7 +1239,7 @@ Module boxed. Layout::new::().extend(value_layout) } *) - Definition alloc_layout (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition alloc_layout (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ value_layout ] => @@ -1229,7 +1277,7 @@ Module boxed. self.deref().source() } *) - Definition source (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition source (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/alloc/collections/binary_heap/mod.v b/CoqOfRust/alloc/collections/binary_heap/mod.v index 0cd3ee40a..c429f999c 100644 --- a/CoqOfRust/alloc/collections/binary_heap/mod.v +++ b/CoqOfRust/alloc/collections/binary_heap/mod.v @@ -36,7 +36,7 @@ Module collections. f.debug_tuple("PeekMut").field(&self.heap.data[0]).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -64,12 +64,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "PeekMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "PeekMut" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::ops::index::Index", Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], @@ -89,9 +89,10 @@ Module collections. "alloc::collections::binary_heap::BinaryHeap", "data" |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] - |)) + |) + |) ] |) ] @@ -127,7 +128,7 @@ Module collections. } } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -135,7 +136,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -201,12 +202,12 @@ Module collections. "heap" |) |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -236,7 +237,7 @@ Module collections. unsafe { self.heap.data.get_unchecked(0) } } *) - Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -245,25 +246,25 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -281,7 +282,9 @@ Module collections. |) |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -294,17 +297,20 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: !self.heap.is_empty()" + M.of_value (| + Value.String "assertion failed: !self.heap.is_empty()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -337,7 +343,7 @@ Module collections. |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) @@ -387,7 +393,7 @@ Module collections. unsafe { self.heap.data.get_unchecked_mut(0) } } *) - Definition deref_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -396,25 +402,25 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -432,7 +438,9 @@ Module collections. |) |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -445,17 +453,20 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: !self.heap.is_empty()" + M.of_value (| + Value.String "assertion failed: !self.heap.is_empty()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := @@ -479,14 +490,14 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| len |)) (Value.Integer Integer.Usize 1) + BinOp.Pure.gt (| M.read (| len |), M.of_value (| Value.Integer 1 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -497,18 +508,21 @@ Module collections. "alloc::collections::binary_heap::PeekMut", "original_len" |), - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "new_unchecked", - [] - |), - [ M.read (| len |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "new_unchecked", + [] + |), + [ M.read (| len |) ] + |)) + ] + |) |) in let _ := M.alloc (| @@ -530,12 +544,12 @@ Module collections. "alloc::collections::binary_heap::BinaryHeap", "data" |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -568,7 +582,7 @@ Module collections. |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) @@ -603,7 +617,7 @@ Module collections. this.heap.pop().unwrap() } *) - Definition pop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -612,7 +626,7 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -673,8 +687,8 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -722,33 +736,36 @@ Module collections. BinaryHeap { data: self.data.clone() } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::binary_heap::BinaryHeap" - [ - ("data", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::binary_heap::BinaryHeap", - "data" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::BinaryHeap" + [ + ("data", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::binary_heap::BinaryHeap", + "data" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -757,7 +774,7 @@ Module collections. self.data.clone_from(&source.data); } *) - Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; source ] => @@ -789,7 +806,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -818,7 +835,7 @@ Module collections. BinaryHeap::new() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -854,7 +871,7 @@ Module collections. f.debug_list().entries(self.iter()).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -935,7 +952,7 @@ Module collections. self.heap.rebuild_tail(self.rebuild_from); } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -968,7 +985,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -993,24 +1010,29 @@ Module collections. BinaryHeap { data: vec![] } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::binary_heap::BinaryHeap" - [ - ("data", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::BinaryHeap" + [ + ("data", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ T; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1023,25 +1045,30 @@ Module collections. BinaryHeap { data: Vec::with_capacity(capacity) } } *) - Definition with_capacity (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ capacity ] => ltac:(M.monadic (let capacity := M.alloc (| capacity |) in - Value.StructRecord - "alloc::collections::binary_heap::BinaryHeap" - [ - ("data", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; Ty.path "alloc::alloc::Global" ], - "with_capacity", - [] - |), - [ M.read (| capacity |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::BinaryHeap" + [ + ("data", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ T; Ty.path "alloc::alloc::Global" ], + "with_capacity", + [] + |), + [ M.read (| capacity |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1059,25 +1086,28 @@ Module collections. BinaryHeap { data: Vec::new_in(alloc) } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => ltac:(M.monadic (let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::collections::binary_heap::BinaryHeap" - [ - ("data", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "new_in", - [] - |), - [ M.read (| alloc |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::BinaryHeap" + [ + ("data", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "new_in", + [] + |), + [ M.read (| alloc |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1090,26 +1120,29 @@ Module collections. BinaryHeap { data: Vec::with_capacity_in(capacity, alloc) } } *) - Definition with_capacity_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ capacity; alloc ] => ltac:(M.monadic (let capacity := M.alloc (| capacity |) in let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::collections::binary_heap::BinaryHeap" - [ - ("data", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "with_capacity_in", - [] - |), - [ M.read (| capacity |); M.read (| alloc |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::BinaryHeap" + [ + ("data", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "with_capacity_in", + [] + |), + [ M.read (| capacity |); M.read (| alloc |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1122,7 +1155,7 @@ Module collections. if self.is_empty() { None } else { Some(PeekMut { heap: self, original_len: None }) } } *) - Definition peek_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1130,7 +1163,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1149,20 +1182,31 @@ Module collections. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "alloc::collections::binary_heap::PeekMut" - [ - ("heap", M.read (| self |)); - ("original_len", Value.StructTuple "core::option::Option::None" []) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::PeekMut" + [ + ("heap", A.to_value (M.read (| self |))); + ("original_len", + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |))) + ] + |)) + ] + |) |))) ] |) @@ -1186,7 +1230,7 @@ Module collections. }) } *) - Definition pop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1213,8 +1257,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1227,15 +1271,15 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1245,7 +1289,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1274,7 +1319,7 @@ Module collections. "alloc::collections::binary_heap::BinaryHeap", "data" |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) ] @@ -1291,12 +1336,16 @@ Module collections. "sift_down_to_bottom", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0 + [ + M.read (| self |); + M.of_value (| Value.Integer 0 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in item @@ -1304,7 +1353,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1323,7 +1373,7 @@ Module collections. unsafe { self.sift_up(0, old_len) }; } *) - Definition push (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; item ] => @@ -1368,10 +1418,10 @@ Module collections. "sift_up", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0; M.read (| old_len |) ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |); M.read (| old_len |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1401,7 +1451,7 @@ Module collections. self.into_vec() } *) - Definition into_sorted_vec (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_sorted_vec (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1423,14 +1473,17 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| end_ |)) (Value.Integer Integer.Usize 1) + BinOp.Pure.gt (| + M.read (| end_ |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1438,7 +1491,11 @@ Module collections. let β := end_ in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := let ptr := @@ -1475,7 +1532,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -1486,10 +1543,10 @@ Module collections. "sift_down_range", [] |), - [ self; Value.Integer Integer.Usize 0; M.read (| end_ |) ] + [ self; M.of_value (| Value.Integer 0 |); M.read (| end_ |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1497,7 +1554,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1546,7 +1603,7 @@ Module collections. hole.pos() } *) - Definition sift_up (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sift_up (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; start; pos ] => @@ -1588,15 +1645,15 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::Hole") @@ -1605,15 +1662,18 @@ Module collections. [] |), [ hole ] - |)) - (M.read (| start |)) + |), + M.read (| start |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let parent := M.alloc (| BinOp.Panic.div (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -1624,14 +1684,14 @@ Module collections. |), [ hole ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1684,7 +1744,8 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1700,7 +1761,7 @@ Module collections. [ hole; M.read (| parent |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1708,7 +1769,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1771,7 +1832,7 @@ Module collections. } } *) - Definition sift_down_range (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sift_down_range (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; pos; end_ ] => @@ -1814,8 +1875,10 @@ Module collections. let child := M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::Hole") [ T ], @@ -1825,30 +1888,31 @@ Module collections. [ hole ] |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| child |)) - (M.call_closure (| + BinOp.Pure.le (| + M.read (| child |), + M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), - [ M.read (| end_ |); Value.Integer Integer.Usize 2 ] - |)) + [ M.read (| end_ |); M.of_value (| Value.Integer 2 |) ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1860,9 +1924,10 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Ty.apply (Ty.path "&") [ T ], @@ -1897,19 +1962,21 @@ Module collections. [ hole; BinOp.Panic.add (| + Integer.Usize, M.read (| child |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) ] - |)) + |) + |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1961,10 +2028,14 @@ Module collections. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Tuple [] |) |) + M.read (| + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1984,8 +2055,10 @@ Module collections. M.write (| child, BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.call_closure (| M.get_associated_function (| Ty.apply @@ -1997,10 +2070,10 @@ Module collections. [ hole ] |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2010,7 +2083,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2018,7 +2091,7 @@ Module collections. |))) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2026,12 +2099,14 @@ Module collections. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| child |)) - (BinOp.Panic.sub (| + BinOp.Pure.eq (| + M.read (| child |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| end_ |), - Value.Integer Integer.Usize 1 - |)), + M.of_value (| Value.Integer 1 |) + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -2083,8 +2158,8 @@ Module collections. [ hole; M.read (| child |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2104,7 +2179,7 @@ Module collections. unsafe { self.sift_down_range(pos, len) }; } *) - Definition sift_down (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sift_down (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; pos ] => @@ -2134,7 +2209,7 @@ Module collections. [ M.read (| self |); M.read (| pos |); M.read (| len |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2180,7 +2255,7 @@ Module collections. unsafe { self.sift_up(start, pos) }; } *) - Definition sift_down_to_bottom (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sift_down_to_bottom (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; pos ] => @@ -2232,8 +2307,10 @@ Module collections. let child := M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::Hole") [ T ], @@ -2243,30 +2320,31 @@ Module collections. [ hole ] |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| child |)) - (M.call_closure (| + BinOp.Pure.le (| + M.read (| child |), + M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), - [ M.read (| end_ |); Value.Integer Integer.Usize 2 ] - |)) + [ M.read (| end_ |); M.of_value (| Value.Integer 2 |) ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2275,9 +2353,10 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Ty.apply (Ty.path "&") [ T ], @@ -2310,14 +2389,16 @@ Module collections. [ hole; BinOp.Panic.add (| + Integer.Usize, M.read (| child |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) ] - |)) + |) + |) |) |) in let _ := @@ -2337,8 +2418,10 @@ Module collections. M.write (| child, BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.call_closure (| M.get_associated_function (| Ty.apply @@ -2350,10 +2433,10 @@ Module collections. [ hole ] |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2361,7 +2444,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2370,19 +2453,21 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| child |)) - (BinOp.Panic.sub (| + BinOp.Pure.eq (| + M.read (| child |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| end_ |), - Value.Integer Integer.Usize 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2397,8 +2482,8 @@ Module collections. [ hole; M.read (| child |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2434,7 +2519,7 @@ Module collections. [ M.read (| self |); M.read (| start |); M.read (| pos |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2480,7 +2565,7 @@ Module collections. } } *) - Definition rebuild_tail (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rebuild_tail (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; start ] => @@ -2492,16 +2577,16 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| start |)) - (M.call_closure (| + BinOp.Pure.eq (| + M.read (| start |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::BinaryHeap") @@ -2510,19 +2595,23 @@ Module collections. [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let tail_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -2539,33 +2628,33 @@ Module collections. let better_to_rebuild := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| start |)) (M.read (| tail_len |)) + BinOp.Pure.lt (| M.read (| start |), M.read (| tail_len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Bool true |))); + M.alloc (| M.of_value (| Value.Bool true |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -2575,8 +2664,9 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 2048) + |), + M.of_value (| Value.Integer 2048 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2584,9 +2674,10 @@ Module collections. Value.Bool true |) in M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + BinOp.Pure.lt (| + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.call_closure (| M.get_associated_function (| Ty.apply @@ -2598,8 +2689,9 @@ Module collections. |), [ M.read (| self |) ] |) - |)) - (BinOp.Panic.mul (| + |), + BinOp.Panic.mul (| + Integer.Usize, M.read (| tail_len |), M.call_closure (| M.get_associated_function (| @@ -2609,14 +2701,16 @@ Module collections. |), [ M.read (| start |) ] |) - |)) + |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + BinOp.Pure.lt (| + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.call_closure (| M.get_associated_function (| Ty.apply @@ -2628,11 +2722,13 @@ Module collections. |), [ M.read (| self |) ] |) - |)) - (BinOp.Panic.mul (| + |), + BinOp.Panic.mul (| + Integer.Usize, M.read (| tail_len |), - Value.Integer Integer.Usize 11 - |)) + M.of_value (| Value.Integer 11 |) + |) + |) |))) ] |))) @@ -2640,7 +2736,7 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2660,7 +2756,7 @@ Module collections. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.use @@ -2677,23 +2773,26 @@ Module collections. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| start |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::binary_heap::BinaryHeap") - [ T; A ], - "len", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::binary_heap::BinaryHeap") + [ T; A ], + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |), @@ -2747,15 +2846,15 @@ Module collections. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| i |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))) @@ -2782,7 +2881,7 @@ Module collections. } } *) - Definition rebuild (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rebuild (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2792,6 +2891,7 @@ Module collections. let n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::BinaryHeap") [ T; A ], @@ -2800,20 +2900,20 @@ Module collections. |), [ M.read (| self |) ] |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| n |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2821,7 +2921,11 @@ Module collections. let β := n in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.alloc (| @@ -2836,7 +2940,7 @@ Module collections. [ M.read (| self |); M.read (| n |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2844,7 +2948,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2872,7 +2976,7 @@ Module collections. self.rebuild_tail(start); } *) - Definition append (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition append (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2882,15 +2986,15 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::BinaryHeap") @@ -2899,8 +3003,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::BinaryHeap") @@ -2909,7 +3013,8 @@ Module collections. [] |), [ M.read (| other |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2927,8 +3032,8 @@ Module collections. [ M.read (| self |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let start := @@ -2981,7 +3086,7 @@ Module collections. [ M.read (| self |); M.read (| start |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2995,15 +3100,17 @@ Module collections. DrainSorted { inner: self } } *) - Definition drain_sorted (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drain_sorted (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::binary_heap::DrainSorted" - [ ("inner", M.read (| self |)) ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::DrainSorted" + [ ("inner", A.to_value (M.read (| self |))) ] + |))) | _, _ => M.impossible end. @@ -3031,7 +3138,7 @@ Module collections. }); } *) - Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; f ] => @@ -3041,24 +3148,27 @@ Module collections. M.read (| let guard := M.alloc (| - Value.StructRecord - "alloc::collections::binary_heap::RebuildOnDrop" - [ - ("rebuild_from", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::binary_heap::BinaryHeap") - [ T; A ], - "len", - [] - |), - [ M.read (| self |) ] - |)); - ("heap", M.read (| self |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::RebuildOnDrop" + [ + ("rebuild_from", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::binary_heap::BinaryHeap") + [ T; A ], + "len", + [] + |), + [ M.read (| self |) ] + |))); + ("heap", A.to_value (M.read (| self |))) + ] + |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.alloc (| M.call_closure (| @@ -3079,8 +3189,8 @@ Module collections. "alloc::collections::binary_heap::BinaryHeap", "data" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3101,12 +3211,17 @@ Module collections. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| e |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| e |)) ] + |) + ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3114,17 +3229,18 @@ Module collections. M.use (M.alloc (| LogicalOp.and (| - UnOp.Pure.not (M.read (| keep |)), + UnOp.Pure.not (| M.read (| keep |) |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| i |)) - (M.read (| + (BinOp.Pure.lt (| + M.read (| i |), + M.read (| M.SubPointer.get_struct_record_field (| guard, "alloc::collections::binary_heap::RebuildOnDrop", "rebuild_from" |) - |)))) + |) + |))) |) |)) in let _ := @@ -3141,9 +3257,10 @@ Module collections. |), M.read (| i |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -3151,8 +3268,9 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in keep @@ -3160,11 +3278,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3177,38 +3296,45 @@ Module collections. Iter { iter: self.data.iter() } } *) - Definition iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::binary_heap::Iter" - [ - ("iter", - M.call_closure (| - M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "iter", [] |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - [], - "deref", + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::Iter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "iter", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::binary_heap::BinaryHeap", - "data" + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::binary_heap::BinaryHeap", + "data" + |) + ] |) ] - |) - ] - |)) - ])) + |))) + ] + |))) | _, _ => M.impossible end. @@ -3221,15 +3347,17 @@ Module collections. IntoIterSorted { inner: self } } *) - Definition into_iter_sorted (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter_sorted (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::binary_heap::IntoIterSorted" - [ ("inner", M.read (| self |)) ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::IntoIterSorted" + [ ("inner", A.to_value (M.read (| self |))) ] + |))) | _, _ => M.impossible end. @@ -3242,7 +3370,7 @@ Module collections. self.data.get(0) } *) - Definition peek (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3271,7 +3399,7 @@ Module collections. |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |))) | _, _ => M.impossible @@ -3286,7 +3414,7 @@ Module collections. self.data.capacity() } *) - Definition capacity (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition capacity (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3318,7 +3446,7 @@ Module collections. self.data.reserve_exact(additional); } *) - Definition reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -3344,7 +3472,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3358,7 +3486,7 @@ Module collections. self.data.reserve(additional); } *) - Definition reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -3384,7 +3512,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3398,7 +3526,7 @@ Module collections. self.data.try_reserve_exact(additional) } *) - Definition try_reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -3432,7 +3560,7 @@ Module collections. self.data.try_reserve(additional) } *) - Definition try_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -3466,7 +3594,7 @@ Module collections. self.data.shrink_to_fit(); } *) - Definition shrink_to_fit (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink_to_fit (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3490,7 +3618,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3504,7 +3632,7 @@ Module collections. self.data.shrink_to(min_capacity) } *) - Definition shrink_to (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink_to (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; min_capacity ] => @@ -3538,7 +3666,7 @@ Module collections. self.data.as_slice() } *) - Definition as_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3570,7 +3698,7 @@ Module collections. self.into() } *) - Definition into_vec (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_vec (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3598,7 +3726,7 @@ Module collections. self.data.allocator() } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3630,7 +3758,7 @@ Module collections. self.data.len() } *) - Definition len (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3662,22 +3790,23 @@ Module collections. self.len() == 0 } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::BinaryHeap") [ T; A ], "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -3690,32 +3819,35 @@ Module collections. Drain { iter: self.data.drain(..) } } *) - Definition drain (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drain (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::binary_heap::Drain" - [ - ("iter", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "drain", - [ Ty.path "core::ops::range::RangeFull" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::binary_heap::BinaryHeap", - "data" - |); - Value.StructTuple "core::ops::range::RangeFull" [] - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::Drain" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "drain", + [ Ty.path "core::ops::range::RangeFull" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::binary_heap::BinaryHeap", + "data" + |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3728,7 +3860,7 @@ Module collections. self.drain(); } *) - Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3746,7 +3878,7 @@ Module collections. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3781,7 +3913,7 @@ Module collections. Hole { data, elt: ManuallyDrop::new(elt), pos } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ data; pos ] => @@ -3791,33 +3923,35 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| pos |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| pos |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| data |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3830,17 +3964,20 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: pos < data.len()" + M.of_value (| + Value.String "assertion failed: pos < data.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let elt := @@ -3860,21 +3997,24 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::binary_heap::Hole" - [ - ("data", M.read (| data |)); - ("elt", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ], - "new", - [] - |), - [ M.read (| elt |) ] - |)); - ("pos", M.read (| pos |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::Hole" + [ + ("data", A.to_value (M.read (| data |))); + ("elt", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ], + "new", + [] + |), + [ M.read (| elt |) ] + |))); + ("pos", A.to_value (M.read (| pos |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3889,7 +4029,7 @@ Module collections. self.pos } *) - Definition pos (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pos (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3914,7 +4054,7 @@ Module collections. &self.elt } *) - Definition element (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition element (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3950,7 +4090,7 @@ Module collections. unsafe { self.data.get_unchecked(index) } } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; index ] => @@ -3960,32 +4100,34 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| index |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| index |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::binary_heap::Hole", "pos" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3998,41 +4140,44 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: index != self.pos" + M.of_value (| + Value.String "assertion failed: index != self.pos" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| index |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| index |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -4047,7 +4192,9 @@ Module collections. |) |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4060,17 +4207,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: index < self.data.len()" + M.of_value (| + Value.String + "assertion failed: index < self.data.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -4113,7 +4264,7 @@ Module collections. self.pos = index; } *) - Definition move_to (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_to (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; index ] => @@ -4123,32 +4274,34 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| index |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| index |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::binary_heap::Hole", "pos" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4161,41 +4314,44 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: index != self.pos" + M.of_value (| + Value.String "assertion failed: index != self.pos" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| index |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| index |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -4210,7 +4366,9 @@ Module collections. |) |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4223,17 +4381,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: index < self.data.len()" + M.of_value (| + Value.String + "assertion failed: index < self.data.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -4259,11 +4421,12 @@ Module collections. let index_ptr := M.alloc (| (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ M.read (| ptr |); M.read (| index |) ] - |)) + |) + |) |) in let hole_ptr := M.alloc (| @@ -4285,11 +4448,14 @@ Module collections. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), - [ M.read (| index_ptr |); M.read (| hole_ptr |); Value.Integer Integer.Usize 1 + [ + M.read (| index_ptr |); + M.read (| hole_ptr |); + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -4299,7 +4465,7 @@ Module collections. |), M.read (| index |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4322,7 +4488,7 @@ Module collections. } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4375,11 +4541,11 @@ Module collections. M.read (| pos |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4409,7 +4575,7 @@ Module collections. f.debug_tuple("Iter").field(&self.iter.as_slice()).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -4437,12 +4603,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Iter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Iter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], @@ -4457,7 +4623,8 @@ Module collections. |) ] |) - |)) + |) + |) ] |) ] @@ -4483,33 +4650,36 @@ Module collections. Iter { iter: self.iter.clone() } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::binary_heap::Iter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::binary_heap::Iter", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::Iter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::binary_heap::Iter", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4534,7 +4704,7 @@ Module collections. self.iter.next() } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4564,7 +4734,7 @@ Module collections. self.iter.size_hint() } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4594,7 +4764,7 @@ Module collections. self.iter.last() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4645,7 +4815,7 @@ Module collections. self.iter.next_back() } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4688,7 +4858,7 @@ Module collections. self.iter.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4747,33 +4917,36 @@ Module collections. Ty.apply (Ty.path "alloc::collections::binary_heap::IntoIter") [ T; A ]. (* Clone *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::binary_heap::IntoIter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "alloc::vec::into_iter::IntoIter") [ T; A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::binary_heap::IntoIter", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::IntoIter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "alloc::vec::into_iter::IntoIter") [ T; A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::binary_heap::IntoIter", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4795,7 +4968,7 @@ Module collections. self.iter.allocator() } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4832,7 +5005,7 @@ Module collections. f.debug_tuple("IntoIter").field(&self.iter.as_slice()).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -4860,12 +5033,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "IntoIter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "IntoIter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::into_iter::IntoIter") [ T; A ], @@ -4880,7 +5053,8 @@ Module collections. |) ] |) - |)) + |) + |) ] |) ] @@ -4909,7 +5083,7 @@ Module collections. self.iter.next() } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4939,7 +5113,7 @@ Module collections. self.iter.size_hint() } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4987,7 +5161,7 @@ Module collections. self.iter.next_back() } *) - Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5030,7 +5204,7 @@ Module collections. self.iter.is_empty() } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5101,28 +5275,31 @@ Module collections. IntoIter { iter: Default::default() } } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::binary_heap::IntoIter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::vec::into_iter::IntoIter") - [ T; Ty.path "alloc::alloc::Global" ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::IntoIter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::vec::into_iter::IntoIter") + [ T; Ty.path "alloc::alloc::Global" ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5148,7 +5325,7 @@ Module collections. self } *) - Definition as_inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5177,7 +5354,7 @@ Module collections. (* const EXPAND_BY: Option = NonZeroUsize::new(1); *) (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I A : Ty.t) : Value.t := + Definition value_EXPAND_BY (I A : Ty.t) : A.t := let Self : Ty.t := Self I A in M.run ltac:(M.monadic @@ -5188,13 +5365,13 @@ Module collections. "new", [] |), - [ Value.Integer Integer.Usize 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). (* const MERGE_BY: Option = NonZeroUsize::new(1); *) (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I A : Ty.t) : Value.t := + Definition value_MERGE_BY (I A : Ty.t) : A.t := let Self : Ty.t := Self I A in M.run ltac:(M.monadic @@ -5205,7 +5382,7 @@ Module collections. "new", [] |), - [ Value.Integer Integer.Usize 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). @@ -5236,7 +5413,7 @@ Module collections. &mut self.iter } *) - Definition as_into_iter (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_into_iter (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -5276,33 +5453,36 @@ Module collections. Ty.apply (Ty.path "alloc::collections::binary_heap::IntoIterSorted") [ T; A ]. (* Clone *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::binary_heap::IntoIterSorted" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "alloc::collections::binary_heap::BinaryHeap") [ T; A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::binary_heap::IntoIterSorted", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::IntoIterSorted" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "alloc::collections::binary_heap::BinaryHeap") [ T; A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::binary_heap::IntoIterSorted", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5320,7 +5500,7 @@ Module collections. Ty.apply (Ty.path "alloc::collections::binary_heap::IntoIterSorted") [ T; A ]. (* Debug *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -5335,17 +5515,18 @@ Module collections. |), [ M.read (| f |); - M.read (| Value.String "IntoIterSorted" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "IntoIterSorted" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::binary_heap::IntoIterSorted", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5369,7 +5550,7 @@ Module collections. self.inner.allocator() } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5409,7 +5590,7 @@ Module collections. self.inner.pop() } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5438,7 +5619,7 @@ Module collections. (exact, Some(exact)) } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5463,11 +5644,18 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| exact |); - Value.StructTuple "core::option::Option::Some" [ M.read (| exact |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| exact |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| exact |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -5538,7 +5726,7 @@ Module collections. Ty.apply (Ty.path "alloc::collections::binary_heap::Drain") [ T; A ]. (* Debug *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -5553,17 +5741,18 @@ Module collections. |), [ M.read (| f |); - M.read (| Value.String "Drain" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "Drain" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::binary_heap::Drain", "iter" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5587,7 +5776,7 @@ Module collections. self.iter.allocator() } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5627,7 +5816,7 @@ Module collections. self.iter.next() } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5657,7 +5846,7 @@ Module collections. self.iter.size_hint() } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5705,7 +5894,7 @@ Module collections. self.iter.next_back() } *) - Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5748,7 +5937,7 @@ Module collections. self.iter.is_empty() } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5813,7 +6002,7 @@ Module collections. Ty.apply (Ty.path "alloc::collections::binary_heap::DrainSorted") [ T; A ]. (* Debug *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -5828,17 +6017,18 @@ Module collections. |), [ M.read (| f |); - M.read (| Value.String "DrainSorted" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "DrainSorted" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::binary_heap::DrainSorted", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5862,7 +6052,7 @@ Module collections. self.inner.allocator() } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5913,7 +6103,7 @@ Module collections. } } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5923,7 +6113,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5957,9 +6147,11 @@ Module collections. let item := M.copy (| γ0_0 |) in let guard := M.alloc (| - Value.StructTuple - "alloc::collections::binary_heap::drop::DropGuard" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::binary_heap::drop::DropGuard" + [ A.to_value (M.read (| self |)) ] + |) |) in let _ := M.alloc (| @@ -5982,7 +6174,7 @@ Module collections. [ M.read (| guard |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5990,7 +6182,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -6022,7 +6214,7 @@ Module collections. self.inner.pop() } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6053,7 +6245,7 @@ Module collections. (exact, Some(exact)) } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6080,11 +6272,18 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| exact |); - Value.StructTuple "core::option::Option::Some" [ M.read (| exact |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| exact |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| exact |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -6154,7 +6353,7 @@ Module collections. heap } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ vec ] => @@ -6163,9 +6362,11 @@ Module collections. M.read (| let heap := M.alloc (| - Value.StructRecord - "alloc::collections::binary_heap::BinaryHeap" - [ ("data", M.read (| vec |)) ] + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::BinaryHeap" + [ ("data", A.to_value (M.read (| vec |))) ] + |) |) in let _ := M.alloc (| @@ -6203,7 +6404,7 @@ Module collections. Self::from_iter(arr) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ arr ] => @@ -6241,7 +6442,7 @@ Module collections. heap.data } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ heap ] => @@ -6278,7 +6479,7 @@ Module collections. BinaryHeap::from(iter.into_iter().collect::>()) } *) - Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ iter ] => @@ -6346,35 +6547,38 @@ Module collections. IntoIter { iter: self.data.into_iter() } } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::binary_heap::IntoIter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - [], - "into_iter", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::binary_heap::BinaryHeap", - "data" - |) - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::IntoIter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + [], + "into_iter", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::binary_heap::BinaryHeap", + "data" + |) + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -6410,7 +6614,7 @@ Module collections. self.iter() } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6451,7 +6655,7 @@ Module collections. guard.heap.data.extend(iter); } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -6461,22 +6665,25 @@ Module collections. M.read (| let guard := M.alloc (| - Value.StructRecord - "alloc::collections::binary_heap::RebuildOnDrop" - [ - ("rebuild_from", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::binary_heap::BinaryHeap") - [ T; A ], - "len", - [] - |), - [ M.read (| self |) ] - |)); - ("heap", M.read (| self |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::binary_heap::RebuildOnDrop" + [ + ("rebuild_from", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::binary_heap::BinaryHeap") + [ T; A ], + "len", + [] + |), + [ M.read (| self |) ] + |))); + ("heap", A.to_value (M.read (| self |))) + ] + |) |) in let _ := M.alloc (| @@ -6504,7 +6711,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6514,7 +6721,7 @@ Module collections. self.push(item); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; item ] => @@ -6533,7 +6740,7 @@ Module collections. [ M.read (| self |); M.read (| item |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6543,7 +6750,7 @@ Module collections. self.reserve(additional); } *) - Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -6562,7 +6769,7 @@ Module collections. [ M.read (| self |); M.read (| additional |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6590,7 +6797,7 @@ Module collections. self.extend(iter.into_iter().cloned()); } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -6635,7 +6842,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6645,7 +6852,7 @@ Module collections. self.push(item); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; β1 ] => @@ -6673,7 +6880,7 @@ Module collections. [ M.read (| self |); M.read (| item |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) @@ -6685,7 +6892,7 @@ Module collections. self.reserve(additional); } *) - Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -6704,7 +6911,7 @@ Module collections. [ M.read (| self |); M.read (| additional |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/collections/btree/append.v b/CoqOfRust/alloc/collections/btree/append.v index e74ee1967..7d12b840e 100644 --- a/CoqOfRust/alloc/collections/btree/append.v +++ b/CoqOfRust/alloc/collections/btree/append.v @@ -33,7 +33,7 @@ Module collections. self.bulk_push(iter, length, alloc) } *) - Definition append_from_sorted_iters (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition append_from_sorted_iters (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ _ as I; A ], [ self; _ as left; _ as right; length; alloc ] => @@ -46,20 +46,23 @@ Module collections. M.read (| let iter := M.alloc (| - Value.StructTuple - "alloc::collections::btree::append::MergeIter" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") - [ I ], - "new", - [] - |), - [ M.read (| left |); M.read (| right |) ] - |) - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::append::MergeIter" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") + [ I ], + "new", + [] + |), + [ M.read (| left |); M.read (| right |) ] + |)) + ] + |) |) in M.alloc (| M.call_closure (| @@ -150,7 +153,7 @@ Module collections. self.fix_right_border_of_plentiful(); } *) - Definition bulk_push (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition bulk_push (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ _ as I; A ], [ self; iter; length; alloc ] => @@ -271,15 +274,15 @@ Module collections. let value := M.copy (| γ1_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -296,12 +299,13 @@ Module collections. [] |), [ cur_node ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -333,11 +337,13 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let open_node := - M.copy (| Value.DeclaredButUndefined |) in + M.copy (| + M.of_value (| Value.DeclaredButUndefined |) + |) in let test_node := M.alloc (| M.call_closure (| @@ -422,15 +428,19 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -447,12 +457,13 @@ Module collections. [] |), [ parent ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -502,7 +513,9 @@ Module collections. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))); @@ -561,6 +574,7 @@ Module collections. let tree_height := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -579,7 +593,7 @@ Module collections. |), [ open_node ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let right_tree := @@ -630,16 +644,22 @@ Module collections. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - Value.Integer - Integer.Usize - 0); - ("end_", - M.read (| tree_height |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value + (M.read (| + tree_height + |))) + ] + |) ] |) |), @@ -718,11 +738,17 @@ Module collections. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) |))) ] |)) in @@ -819,7 +845,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -827,14 +853,15 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -856,7 +883,7 @@ Module collections. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -887,7 +914,7 @@ Module collections. b_next.or(a_next) } *) - Definition next (K V I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V I in match τ, α with | [], [ self ] => @@ -920,8 +947,8 @@ Module collections. "alloc::collections::btree::append::MergeIter", 0 |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -961,7 +988,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), diff --git a/CoqOfRust/alloc/collections/btree/borrow.v b/CoqOfRust/alloc/collections/btree/borrow.v index 2aecd7330..2b7b29582 100644 --- a/CoqOfRust/alloc/collections/btree/borrow.v +++ b/CoqOfRust/alloc/collections/btree/borrow.v @@ -55,7 +55,7 @@ Module collections. (new_ref, Self { ptr, _marker: PhantomData }) } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -87,16 +87,25 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| new_ref |); - Value.StructRecord - "alloc::collections::btree::borrow::DormantMutRef" - [ - ("ptr", M.read (| ptr |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| new_ref |)); + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::borrow::DormantMutRef" + [ + ("ptr", A.to_value (M.read (| ptr |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -112,7 +121,7 @@ Module collections. unsafe { &mut *self.ptr.as_ptr() } } *) - Definition awaken (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition awaken (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -147,7 +156,7 @@ Module collections. unsafe { &mut *self.ptr.as_ptr() } } *) - Definition reborrow (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reborrow (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -182,7 +191,7 @@ Module collections. unsafe { &*self.ptr.as_ptr() } } *) - Definition reborrow_shared (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reborrow_shared (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/alloc/collections/btree/dedup_sorted_iter.v b/CoqOfRust/alloc/collections/btree/dedup_sorted_iter.v index 85155e834..c82ecb04e 100644 --- a/CoqOfRust/alloc/collections/btree/dedup_sorted_iter.v +++ b/CoqOfRust/alloc/collections/btree/dedup_sorted_iter.v @@ -23,27 +23,30 @@ Module collections. Self { iter: iter.peekable() } } *) - Definition new (K V I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (K V I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V I in match τ, α with | [], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "alloc::collections::btree::dedup_sorted_iter::DedupSortedIter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - I, - [], - "peekable", - [] - |), - [ M.read (| iter |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::dedup_sorted_iter::DedupSortedIter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + I, + [], + "peekable", + [] + |), + [ M.read (| iter |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -80,7 +83,7 @@ Module collections. } } *) - Definition next (K V I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V I in match τ, α with | [], [ self ] => @@ -132,7 +135,9 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -178,9 +183,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| next |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| next |)) ] + |) |) |) |) @@ -189,7 +196,7 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -222,14 +229,17 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| next |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| next |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) diff --git a/CoqOfRust/alloc/collections/btree/fix.v b/CoqOfRust/alloc/collections/btree/fix.v index df0fc0fa6..2370f1a08 100644 --- a/CoqOfRust/alloc/collections/btree/fix.v +++ b/CoqOfRust/alloc/collections/btree/fix.v @@ -54,7 +54,7 @@ Module collections. } } *) - Definition fix_node_through_parent (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fix_node_through_parent (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -81,25 +81,33 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| len |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| len |), + M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -139,7 +147,7 @@ Module collections. |) in let left_parent_kv := M.copy (| γ1_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -178,13 +186,18 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructTuple - "core::option::Option::Some" - [ M.read (| parent |) ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| parent |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -202,6 +215,7 @@ Module collections. [ left_parent_kv; BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" @@ -213,9 +227,18 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |)) + ] + |) |))) ] |))); @@ -235,7 +258,7 @@ Module collections. |) in let right_parent_kv := M.copy (| γ1_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -274,13 +297,18 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructTuple - "core::option::Option::Some" - [ M.read (| parent |) ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| parent |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -298,6 +326,7 @@ Module collections. [ right_parent_kv; BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" @@ -309,9 +338,18 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |)) + ] + |) |))) ] |))); @@ -325,16 +363,17 @@ Module collections. |) in let root := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| len |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -342,16 +381,27 @@ Module collections. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ M.read (| root |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| root |)) ] + |) |))) ] |))) @@ -380,7 +430,7 @@ Module collections. Definition fix_node_and_affected_ancestors (K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with @@ -470,7 +520,7 @@ Module collections. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool true |) |) + M.read (| M.return_ (| M.of_value (| Value.Bool true |) |) |) |) |))); fun γ => @@ -483,7 +533,7 @@ Module collections. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool false |) |) + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) |) |))) ] @@ -522,7 +572,7 @@ Module collections. } } *) - Definition fix_top (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fix_top (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -533,7 +583,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -541,8 +591,8 @@ Module collections. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -558,11 +608,12 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.call_closure (| + (BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -578,8 +629,9 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -615,7 +667,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -623,7 +675,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -647,7 +699,7 @@ Module collections. } } *) - Definition fix_right_border (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fix_right_border (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -680,15 +732,15 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -703,8 +755,9 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -790,8 +843,8 @@ Module collections. [ M.read (| self |); M.read (| alloc |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -811,7 +864,7 @@ Module collections. } } *) - Definition fix_left_border (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fix_left_border (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -844,15 +897,15 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -867,8 +920,9 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -954,8 +1008,8 @@ Module collections. [ M.read (| self |); M.read (| alloc |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -984,11 +1038,7 @@ Module collections. } } *) - Definition fix_right_border_of_plentiful - (K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition fix_right_border_of_plentiful (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -1016,7 +1066,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1089,11 +1139,12 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1101,16 +1152,16 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1120,15 +1171,18 @@ Module collections. [] |), [ last_kv ] - |)) - (BinOp.Panic.mul (| + |), + BinOp.Panic.mul (| + Integer.Usize, M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) |), - Value.Integer Integer.Usize 2 - |))) + M.of_value (| Value.Integer 2 |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1144,18 +1198,23 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: last_kv.left_child_len() >= MIN_LEN * 2" + M.of_value (| + Value.String + "assertion failed: last_kv.left_child_len() >= MIN_LEN * 2" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let right_child_len := @@ -1173,20 +1232,21 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| right_child_len |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| right_child_len |), + M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1207,6 +1267,7 @@ Module collections. [ last_kv; BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" @@ -1217,8 +1278,9 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1235,7 +1297,7 @@ Module collections. [ M.read (| last_kv |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1243,7 +1305,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1286,11 +1348,7 @@ Module collections. } } *) - Definition fix_left_border_of_left_edge - (K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition fix_left_border_of_left_edge (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -1301,7 +1359,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1393,11 +1451,12 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1405,16 +1464,16 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1485,12 +1544,14 @@ Module collections. |) |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1506,21 +1567,26 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: self.reborrow().into_node().len() > MIN_LEN" + M.of_value (| + Value.String + "assertion failed: self.reborrow().into_node().len() > MIN_LEN" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1528,7 +1594,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1554,11 +1620,7 @@ Module collections. } } *) - Definition fix_right_border_of_right_edge - (K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition fix_right_border_of_right_edge (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -1569,7 +1631,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1661,11 +1723,12 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1673,16 +1736,16 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1753,12 +1816,14 @@ Module collections. |) |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1774,21 +1839,26 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: self.reborrow().into_node().len() > MIN_LEN" + M.of_value (| + Value.String + "assertion failed: self.reborrow().into_node().len() > MIN_LEN" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1796,7 +1866,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1851,7 +1921,7 @@ Module collections. } } *) - Definition fix_left_child (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fix_left_child (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -1897,25 +1967,25 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1925,12 +1995,14 @@ Module collections. [] |), [ internal_kv ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1943,22 +2015,25 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: internal_kv.right_child_len() >= MIN_LEN" + M.of_value (| + Value.String + "assertion failed: internal_kv.right_child_len() >= MIN_LEN" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1998,10 +2073,11 @@ Module collections. M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); M.read (| left_len |) ] @@ -2009,16 +2085,17 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| count |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| count |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2039,8 +2116,9 @@ Module collections. [ internal_kv; M.read (| count |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2085,7 +2163,7 @@ Module collections. } } *) - Definition fix_right_child (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fix_right_child (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -2131,25 +2209,25 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -2159,12 +2237,14 @@ Module collections. [] |), [ internal_kv ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2177,22 +2257,25 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: internal_kv.left_child_len() >= MIN_LEN" + M.of_value (| + Value.String + "assertion failed: internal_kv.left_child_len() >= MIN_LEN" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2232,10 +2315,11 @@ Module collections. M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); M.read (| right_len |) ] @@ -2243,16 +2327,17 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| count |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| count |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2273,8 +2358,9 @@ Module collections. [ internal_kv; M.read (| count |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| diff --git a/CoqOfRust/alloc/collections/btree/map.v b/CoqOfRust/alloc/collections/btree/map.v index e90565bbf..618effd85 100644 --- a/CoqOfRust/alloc/collections/btree/map.v +++ b/CoqOfRust/alloc/collections/btree/map.v @@ -4,7 +4,7 @@ Require Import CoqOfRust.CoqOfRust. Module collections. Module btree. Module map. - Definition value_MIN_LEN : Value.t := + Definition value_MIN_LEN : A.t := M.run ltac:(M.monadic (M.get_constant (| "alloc::collections::btree::node::MIN_LEN_AFTER_SPLIT" |))). @@ -50,7 +50,7 @@ Module collections. drop(unsafe { ptr::read(self) }.into_iter()) } *) - Definition drop (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -199,7 +199,7 @@ Module collections. } } *) - Definition clone (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -207,7 +207,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -398,7 +398,7 @@ Module collections. } } *) - Definition get (K Q A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (K Q A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K Q A in match τ, α with | [], [ self; key ] => @@ -564,42 +564,46 @@ Module collections. |) in let handle := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + Ty.path + "alloc::collections::btree::set_val::SetValZST"; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Immut"; - K; - Ty.path - "alloc::collections::btree::set_val::SetValZST"; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "into_kv", - [] + "alloc::collections::btree::node::marker::KV" + ], + "into_kv", + [] + |), + [ M.read (| handle |) ] + |) |), - [ M.read (| handle |) ] + 0 |) - |), - 0 - |) - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -609,7 +613,9 @@ Module collections. "alloc::collections::btree::search::SearchResult::GoDown", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -636,7 +642,7 @@ Module collections. } } *) - Definition take (K Q A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take (K Q A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K Q A in match τ, α with | [], [ self; key ] => @@ -831,75 +837,87 @@ Module collections. |) in let handle := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::map::entry::OccupiedEntry") - [ - K; - Ty.path - "alloc::collections::btree::set_val::SetValZST"; - A - ], - "remove_kv", - [] - |), - [ - Value.StructRecord - "alloc::collections::btree::map::entry::OccupiedEntry" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::map::entry::OccupiedEntry") + [ + K; + Ty.path + "alloc::collections::btree::set_val::SetValZST"; + A + ], + "remove_kv", + [] + |), [ - ("handle", M.read (| handle |)); - ("dormant_map", M.read (| dormant_map |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::entry::OccupiedEntry" [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| map |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |) + ("handle", + A.to_value (M.read (| handle |))); + ("dormant_map", + A.to_value + (M.read (| dormant_map |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| map |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple + "core::marker::PhantomData" + [] + |))) ] - |)); - ("_marker", - Value.StructTuple - "core::marker::PhantomData" - []) + |) ] - ] + |) + |), + 0 |) - |), - 0 - |) - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -910,7 +928,9 @@ Module collections. 0 |) in M.alloc (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |))) @@ -942,7 +962,7 @@ Module collections. } } *) - Definition replace (K Q A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (K Q A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K Q A in match τ, α with | [], [ self; key ] => @@ -1029,8 +1049,8 @@ Module collections. "alloc::collections::btree::map::BTreeMap", "root" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1092,7 +1112,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -1128,41 +1149,45 @@ Module collections. |) in let kv := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::mem::replace", [ K ] |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::replace", [ K ] |), + [ + M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + Ty.path + "alloc::collections::btree::set_val::SetValZST"; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - Ty.path - "alloc::collections::btree::set_val::SetValZST"; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "key_mut", - [] - |), - [ kv ] - |); - M.read (| key |) - ] - |) - ] + "alloc::collections::btree::node::marker::KV" + ], + "key_mut", + [] + |), + [ kv ] + |); + M.read (| key |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1189,49 +1214,59 @@ Module collections. [] |), [ - Value.StructRecord - "alloc::collections::btree::map::entry::VacantEntry" - [ - ("key", M.read (| key |)); - ("handle", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| handle |) ]); - ("dormant_map", M.read (| dormant_map |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::entry::VacantEntry" + [ + ("key", A.to_value (M.read (| key |))); + ("handle", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| handle |)) ] + |))); + ("dormant_map", + A.to_value (M.read (| dormant_map |))); + ("alloc", + A.to_value + (M.call_closure (| M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ A ], + "core::clone::Clone", + A, [], - "deref", + "clone", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| map |), - "alloc::collections::btree::map::BTreeMap", - "alloc" + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| map |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] |) ] - |) - ] - |)); - ("_marker", - Value.StructTuple "core::marker::PhantomData" []) - ]; + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |); M.call_closure (| M.get_trait_method (| "core::default::Default", @@ -1245,7 +1280,9 @@ Module collections. ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))) ] @@ -1292,7 +1329,7 @@ Module collections. f.debug_list().entries(self.clone()).finish() } *) - Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; f ] => @@ -1361,29 +1398,32 @@ Module collections. Iter { range: Default::default(), length: 0 } } *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::map::Iter" - [ - ("range", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ], - [], - "default", - [] - |), - [] - |)); - ("length", Value.Integer Integer.Usize 0) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Iter" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ], + [], + "default", + [] + |), + [] + |))); + ("length", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -1424,7 +1464,7 @@ Module collections. f.debug_list().entries(range).finish() } *) - Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; f ] => @@ -1434,35 +1474,43 @@ Module collections. M.read (| let range := M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::Iter" - [ - ("range", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::ValMut"; K; V ], - "reborrow", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IterMut", - "range" - |) - ] - |)); - ("length", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IterMut", - "length" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Iter" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path "alloc::collections::btree::node::marker::ValMut"; + K; + V + ], + "reborrow", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IterMut", + "range" + |) + ] + |))); + ("length", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IterMut", + "length" + |) + |))) + ] + |) |) in M.alloc (| M.call_closure (| @@ -1520,30 +1568,35 @@ Module collections. IterMut { range: Default::default(), length: 0, _marker: PhantomData {} } } *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::map::IterMut" - [ - ("range", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::ValMut"; K; V ], - [], - "default", - [] - |), - [] - |)); - ("length", Value.Integer Integer.Usize 0); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IterMut" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + [ Ty.path "alloc::collections::btree::node::marker::ValMut"; K; V ], + [], + "default", + [] + |), + [] + |))); + ("length", A.to_value (M.of_value (| Value.Integer 0 |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -1580,41 +1633,45 @@ Module collections. Iter { range: self.range.reborrow(), length: self.length } } *) - Definition iter (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::Iter" - [ - ("range", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Dying"; K; V ], - "reborrow", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IntoIter", - "range" - |) - ] - |)); - ("length", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IntoIter", - "length" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Iter" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + [ Ty.path "alloc::collections::btree::node::marker::Dying"; K; V ], + "reborrow", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IntoIter", + "range" + |) + ] + |))); + ("length", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IntoIter", + "length" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -1634,7 +1691,7 @@ Module collections. } } *) - Definition dying_next (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dying_next (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -1642,22 +1699,23 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::IntoIter", "length" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1691,7 +1749,9 @@ Module collections. ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -1703,46 +1763,57 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Dying"; K; V - ], - "deallocating_next_unchecked", - [ A ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IntoIter", - "range" - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path "alloc::collections::btree::node::marker::Dying"; + K; + V + ], + "deallocating_next_unchecked", + [ A ] |), [ M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::IntoIter", - "alloc" + "range" + |); + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IntoIter", + "alloc" + |) + ] |) ] - |) - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -1767,7 +1838,7 @@ Module collections. } } *) - Definition dying_next_back (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dying_next_back (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -1775,22 +1846,23 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::IntoIter", "length" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1824,7 +1896,9 @@ Module collections. ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -1836,46 +1910,57 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Dying"; K; V - ], - "deallocating_next_back_unchecked", - [ A ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IntoIter", - "range" - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path "alloc::collections::btree::node::marker::Dying"; + K; + V + ], + "deallocating_next_back_unchecked", + [ A ] |), [ M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::IntoIter", - "alloc" + "range" + |); + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IntoIter", + "alloc" + |) + ] |) ] - |) - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -1897,7 +1982,7 @@ Module collections. f.debug_list().entries(self.iter()).finish() } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -1964,34 +2049,38 @@ Module collections. IntoIter { range: Default::default(), length: 0, alloc: Default::default() } } *) - Definition default (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::map::IntoIter" - [ - ("range", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Dying"; K; V ], - [], - "default", - [] - |), - [] - |)); - ("length", Value.Integer Integer.Usize 0); - ("alloc", - M.call_closure (| - M.get_trait_method (| "core::default::Default", A, [], "default", [] |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IntoIter" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + [ Ty.path "alloc::collections::btree::node::marker::Dying"; K; V ], + [], + "default", + [] + |), + [] + |))); + ("length", A.to_value (M.of_value (| Value.Integer 0 |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", A, [], "default", [] |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -2021,7 +2110,7 @@ Module collections. f.debug_list().entries(self.clone()).finish() } *) - Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; f ] => @@ -2098,7 +2187,7 @@ Module collections. f.debug_list().entries(self.clone()).finish() } *) - Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; f ] => @@ -2175,7 +2264,7 @@ Module collections. f.debug_list().entries(self.inner.iter().map(|(_, val)| val)).finish() } *) - Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; f ] => @@ -2256,8 +2345,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2273,7 +2362,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -2310,7 +2400,7 @@ Module collections. f.debug_list().entries(self.inner.iter().map(|(key, _)| key)).finish() } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -2393,8 +2483,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2410,7 +2500,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -2447,7 +2538,7 @@ Module collections. f.debug_list().entries(self.inner.iter().map(|(_, val)| val)).finish() } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -2530,8 +2621,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2547,7 +2638,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -2588,7 +2680,7 @@ Module collections. f.debug_list().entries(self.clone()).finish() } *) - Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; f ] => @@ -2675,7 +2767,7 @@ Module collections. f.debug_list().entries(range).finish() } *) - Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; f ] => @@ -2685,27 +2777,34 @@ Module collections. M.read (| let range := M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::Range" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LeafRange") - [ Ty.path "alloc::collections::btree::node::marker::ValMut"; K; V ], - "reborrow", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::RangeMut", - "inner" - |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Range" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LeafRange") + [ + Ty.path "alloc::collections::btree::node::marker::ValMut"; + K; + V + ], + "reborrow", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::RangeMut", + "inner" + |) + ] + |))) + ] + |) |) in M.alloc (| M.call_closure (| @@ -2765,29 +2864,36 @@ Module collections. BTreeMap { root: None, length: 0, alloc: ManuallyDrop::new(Global), _marker: PhantomData } } *) - Definition new (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::map::BTreeMap" - [ - ("root", Value.StructTuple "core::option::Option::None" []); - ("length", Value.Integer Integer.Usize 0); - ("alloc", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [ Value.StructTuple "alloc::alloc::Global" [] ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::BTreeMap" + [ + ("root", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("length", A.to_value (M.of_value (| Value.Integer 0 |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [ M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -2811,7 +2917,7 @@ Module collections. }); } *) - Definition clear (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clear (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -2827,74 +2933,87 @@ Module collections. ] |), [ - Value.StructRecord - "alloc::collections::btree::map::BTreeMap" - [ - ("root", - M.call_closure (| - M.get_function (| - "core::mem::replace", - [ - Ty.apply - (Ty.path "core::option::Option") + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::BTreeMap" + [ + ("root", + A.to_value + (M.call_closure (| + M.get_function (| + "core::mem::replace", [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "core::option::Option") [ - Ty.path - "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ] ] ] - ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "root" - |); - Value.StructTuple "core::option::Option::None" [] - ] - |)); - ("length", - M.call_closure (| - M.get_function (| "core::mem::replace", [ Ty.path "usize" ] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "length" - |); - Value.Integer Integer.Usize 0 - ] - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "root" + |); + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + ] + |))); + ("length", + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::replace", [ Ty.path "usize" ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "length" + |); + M.of_value (| Value.Integer 0 |) + ] + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2908,28 +3027,35 @@ Module collections. BTreeMap { root: None, length: 0, alloc: ManuallyDrop::new(alloc), _marker: PhantomData } } *) - Definition new_in (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ alloc ] => ltac:(M.monadic (let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::collections::btree::map::BTreeMap" - [ - ("root", Value.StructTuple "core::option::Option::None" []); - ("length", Value.Integer Integer.Usize 0); - ("alloc", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ A ], - "new", - [] - |), - [ M.read (| alloc |) ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::BTreeMap" + [ + ("root", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("length", A.to_value (M.of_value (| Value.Integer 0 |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ A ], + "new", + [] + |), + [ M.read (| alloc |) ] + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -2949,7 +3075,7 @@ Module collections. } } *) - Definition get (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; key ] => @@ -3113,41 +3239,45 @@ Module collections. |) in let handle := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "into_kv", - [] + "alloc::collections::btree::node::marker::KV" + ], + "into_kv", + [] + |), + [ M.read (| handle |) ] + |) |), - [ M.read (| handle |) ] + 1 |) - |), - 1 - |) - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3157,7 +3287,9 @@ Module collections. "alloc::collections::btree::search::SearchResult::GoDown", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3182,7 +3314,7 @@ Module collections. } } *) - Definition get_key_value (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_key_value (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; k ] => @@ -3352,32 +3484,35 @@ Module collections. |) in let handle := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path - "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ], - "into_kv", - [] - |), - [ M.read (| handle |) ] - |) - ] + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ], + "into_kv", + [] + |), + [ M.read (| handle |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3387,7 +3522,9 @@ Module collections. "alloc::collections::btree::search::SearchResult::GoDown", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3408,7 +3545,7 @@ Module collections. root_node.first_leaf_edge().right_kv().ok().map(Handle::into_kv) } *) - Definition first_key_value (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition first_key_value (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -3712,7 +3849,7 @@ Module collections. }) } *) - Definition first_entry (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition first_entry (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -4060,71 +4197,84 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "alloc::collections::btree::map::entry::OccupiedEntry" - [ - ("handle", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "forget_node_type", - [] - |), - [ M.read (| kv |) ] - |)); - ("dormant_map", M.read (| dormant_map |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::entry::OccupiedEntry" [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| map |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |) + ("handle", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ], + "forget_node_type", + [] + |), + [ M.read (| kv |) ] + |))); + ("dormant_map", A.to_value (M.read (| dormant_map |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| map |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + |)) + ] + |) |))) ] |) @@ -4145,7 +4295,7 @@ Module collections. self.first_entry().map(|entry| entry.remove_entry()) } *) - Definition pop_first (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_first (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -4184,8 +4334,8 @@ Module collections. |), [ M.read (| self |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4209,7 +4359,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4228,7 +4379,7 @@ Module collections. root_node.last_leaf_edge().left_kv().ok().map(Handle::into_kv) } *) - Definition last_key_value (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last_key_value (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -4532,7 +4683,7 @@ Module collections. }) } *) - Definition last_entry (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last_entry (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -4880,71 +5031,84 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "alloc::collections::btree::map::entry::OccupiedEntry" - [ - ("handle", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "forget_node_type", - [] - |), - [ M.read (| kv |) ] - |)); - ("dormant_map", M.read (| dormant_map |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::entry::OccupiedEntry" [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| map |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |) + ("handle", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ], + "forget_node_type", + [] + |), + [ M.read (| kv |) ] + |))); + ("dormant_map", A.to_value (M.read (| dormant_map |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| map |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + |)) + ] + |) |))) ] |) @@ -4965,7 +5129,7 @@ Module collections. self.last_entry().map(|entry| entry.remove_entry()) } *) - Definition pop_last (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_last (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -5004,8 +5168,8 @@ Module collections. |), [ M.read (| self |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5029,7 +5193,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5048,7 +5213,7 @@ Module collections. self.get(key).is_some() } *) - Definition contains_key (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains_key (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; key ] => @@ -5094,7 +5259,7 @@ Module collections. } } *) - Definition get_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; key ] => @@ -5258,32 +5423,35 @@ Module collections. |) in let handle := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ], - "into_val_mut", - [] - |), - [ M.read (| handle |) ] - |) - ] + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ], + "into_val_mut", + [] + |), + [ M.read (| handle |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -5293,7 +5461,9 @@ Module collections. "alloc::collections::btree::search::SearchResult::GoDown", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5319,7 +5489,7 @@ Module collections. } } *) - Definition insert (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; key; value ] => @@ -5350,20 +5520,24 @@ Module collections. |) in let entry := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::map::entry::OccupiedEntry") - [ K; V; A ], - "insert", - [] - |), - [ entry; M.read (| value |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::map::entry::OccupiedEntry") + [ K; V; A ], + "insert", + [] + |), + [ entry; M.read (| value |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -5387,7 +5561,9 @@ Module collections. [ M.read (| entry |); M.read (| value |) ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5409,7 +5585,7 @@ Module collections. } } *) - Definition try_insert (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_insert (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; key; value ] => @@ -5440,13 +5616,21 @@ Module collections. |) in let entry := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "alloc::collections::btree::map::entry::OccupiedError" - [ ("entry", M.read (| entry |)); ("value", M.read (| value |)) ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::entry::OccupiedError" + [ + ("entry", A.to_value (M.read (| entry |))); + ("value", A.to_value (M.read (| value |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -5458,27 +5642,31 @@ Module collections. |) in let entry := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::map::entry::VacantEntry") - [ K; V; A ], - "insert", - [] - |), - [ M.read (| entry |); M.read (| value |) ] - |) - ] - |))) - ] - |) - |))) - | _, _ => M.impossible - end. - + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::map::entry::VacantEntry") + [ K; V; A ], + "insert", + [] + |), + [ M.read (| entry |); M.read (| value |) ] + |)) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + Axiom AssociatedFunction_try_insert : forall (K V A : Ty.t), M.IsAssociatedFunction (Self K V A) "try_insert" (try_insert K V A). @@ -5492,7 +5680,7 @@ Module collections. self.remove_entry(key).map(|(_, v)| v) } *) - Definition remove (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; key ] => @@ -5514,8 +5702,8 @@ Module collections. |), [ M.read (| self |); M.read (| key |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5531,7 +5719,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5563,7 +5752,7 @@ Module collections. } } *) - Definition remove_entry (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_entry (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; key ] => @@ -5756,63 +5945,74 @@ Module collections. |) in let handle := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::map::entry::OccupiedEntry") - [ K; V; A ], - "remove_entry", - [] - |), - [ - Value.StructRecord - "alloc::collections::btree::map::entry::OccupiedEntry" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::map::entry::OccupiedEntry") + [ K; V; A ], + "remove_entry", + [] + |), [ - ("handle", M.read (| handle |)); - ("dormant_map", M.read (| dormant_map |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::entry::OccupiedEntry" [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| map |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |) + ("handle", + A.to_value (M.read (| handle |))); + ("dormant_map", + A.to_value (M.read (| dormant_map |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| map |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple + "core::marker::PhantomData" + [] + |))) ] - |)); - ("_marker", - Value.StructTuple - "core::marker::PhantomData" - []) + |) ] - ] - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -5823,7 +6023,9 @@ Module collections. 0 |) in M.alloc (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |))) @@ -5847,7 +6049,7 @@ Module collections. self.extract_if(|k, v| !f(k, v)).for_each(drop); } *) - Definition retain (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition retain (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ F ], [ self; f ] => @@ -5896,8 +6098,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5913,8 +6115,8 @@ Module collections. fun γ => ltac:(M.monadic (let v := M.copy (| γ |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -5930,23 +6132,30 @@ Module collections. |), [ f; - Value.Tuple - [ M.read (| k |); M.read (| v |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value (M.read (| v |)) + ] + |) ] - |)))) + |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.get_function (| "core::mem::drop", [ Ty.tuple [ K; V ] ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5983,7 +6192,7 @@ Module collections. ) } *) - Definition append (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition append (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; other ] => @@ -5995,7 +6204,7 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6019,14 +6228,16 @@ Module collections. Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6066,11 +6277,11 @@ Module collections. [ M.read (| self |); M.read (| other |) ] |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let self_iter := @@ -6249,8 +6460,8 @@ Module collections. "alloc::collections::btree::map::BTreeMap", "root" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6311,7 +6522,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -6390,7 +6602,7 @@ Module collections. } } *) - Definition range (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition range (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ T; R ], [ self; range ] => @@ -6399,7 +6611,7 @@ Module collections. let range := M.alloc (| range |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6420,69 +6632,77 @@ Module collections. |) in let root := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::Range" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "range_search", - [ T; R ] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Range" + [ + ("inner", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ Ty.path - "alloc::collections::btree::node::marker::Owned"; + "alloc::collections::btree::node::marker::Immut"; K; V; Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" ], - "reborrow", - [] + "range_search", + [ T; R ] |), - [ M.read (| root |) ] - |); - M.read (| range |) - ] - |)) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "reborrow", + [] + |), + [ M.read (| root |) ] + |); + M.read (| range |) + ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::Range" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LeafRange") - [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V - ], - "none", - [] - |), - [] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Range" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LeafRange") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V + ], + "none", + [] + |), + [] + |))) + ] + |) |))) ] |) @@ -6508,7 +6728,7 @@ Module collections. } } *) - Definition range_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition range_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ T; R ], [ self; range ] => @@ -6517,7 +6737,7 @@ Module collections. let range := M.alloc (| range |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6538,71 +6758,87 @@ Module collections. |) in let root := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::RangeMut" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::ValMut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "range_search", - [ T; R ] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::RangeMut" + [ + ("inner", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ Ty.path - "alloc::collections::btree::node::marker::Owned"; + "alloc::collections::btree::node::marker::ValMut"; K; V; Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" ], - "borrow_valmut", - [] + "range_search", + [ T; R ] |), - [ M.read (| root |) ] - |); - M.read (| range |) - ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "borrow_valmut", + [] + |), + [ M.read (| root |) ] + |); + M.read (| range |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::RangeMut" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LeafRange") - [ - Ty.path "alloc::collections::btree::node::marker::ValMut"; - K; - V - ], - "none", - [] - |), - [] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::RangeMut" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LeafRange") + [ + Ty.path + "alloc::collections::btree::node::marker::ValMut"; + K; + V + ], + "none", + [] + |), + [] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) |))) ] |) @@ -6646,7 +6882,7 @@ Module collections. } } *) - Definition entry (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition entry (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; key ] => @@ -6688,51 +6924,68 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "alloc::collections::btree::map::entry::Entry::Vacant" - [ - Value.StructRecord - "alloc::collections::btree::map::entry::VacantEntry" - [ - ("key", M.read (| key |)); - ("handle", - Value.StructTuple "core::option::Option::None" []); - ("dormant_map", M.read (| dormant_map |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), + M.of_value (| + Value.StructTuple + "alloc::collections::btree::map::entry::Entry::Vacant" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::entry::VacantEntry" [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| map |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |) + ("key", A.to_value (M.read (| key |))); + ("handle", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))); + ("dormant_map", + A.to_value (M.read (| dormant_map |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| map |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple + "core::marker::PhantomData" + [] + |))) ] - |)); - ("_marker", - Value.StructTuple "core::marker::PhantomData" []) - ] - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -6792,51 +7045,62 @@ Module collections. |) in let handle := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::map::entry::Entry::Occupied" - [ - Value.StructRecord - "alloc::collections::btree::map::entry::OccupiedEntry" - [ - ("handle", M.read (| handle |)); - ("dormant_map", M.read (| dormant_map |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), + M.of_value (| + Value.StructTuple + "alloc::collections::btree::map::entry::Entry::Occupied" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::entry::OccupiedEntry" [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| map |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |) + ("handle", + A.to_value (M.read (| handle |))); + ("dormant_map", + A.to_value (M.read (| dormant_map |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| map |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple + "core::marker::PhantomData" + [] + |))) ] - |)); - ("_marker", - Value.StructTuple - "core::marker::PhantomData" - []) - ] - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -6848,55 +7112,68 @@ Module collections. |) in let handle := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::map::entry::Entry::Vacant" - [ - Value.StructRecord - "alloc::collections::btree::map::entry::VacantEntry" - [ - ("key", M.read (| key |)); - ("handle", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| handle |) ]); - ("dormant_map", M.read (| dormant_map |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), + M.of_value (| + Value.StructTuple + "alloc::collections::btree::map::entry::Entry::Vacant" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::entry::VacantEntry" [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| map |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |) + ("key", A.to_value (M.read (| key |))); + ("handle", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| handle |)) ] + |))); + ("dormant_map", + A.to_value (M.read (| dormant_map |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| map |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple + "core::marker::PhantomData" + [] + |))) ] - |)); - ("_marker", - Value.StructTuple - "core::marker::PhantomData" - []) - ] - ] + |)) + ] + |) |))) ] |))) @@ -6938,7 +7215,7 @@ Module collections. } } *) - Definition split_off (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_off (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; key ] => @@ -6950,7 +7227,7 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7022,7 +7299,7 @@ Module collections. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let total_num := @@ -7171,35 +7448,45 @@ Module collections. M.read (| new_left_len |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::BTreeMap" - [ - ("root", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| right_root |) ]); - ("length", M.read (| right_len |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::BTreeMap" + [ + ("root", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| right_root |)) ] + |))); + ("length", A.to_value (M.read (| right_len |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) |))) ] |) @@ -7222,7 +7509,7 @@ Module collections. ExtractIf { pred, inner, alloc } } *) - Definition extract_if (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extract_if (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ F ], [ self; pred ] => @@ -7249,13 +7536,15 @@ Module collections. let inner := M.copy (| γ0_0 |) in let alloc := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::ExtractIf" - [ - ("pred", M.read (| pred |)); - ("inner", M.read (| inner |)); - ("alloc", M.read (| alloc |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::ExtractIf" + [ + ("pred", A.to_value (M.read (| pred |))); + ("inner", A.to_value (M.read (| inner |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |) |))) ] |) @@ -7295,7 +7584,7 @@ Module collections. } } *) - Definition extract_if_inner (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extract_if_inner (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -7303,7 +7592,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7411,102 +7700,135 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - Value.StructRecord - "alloc::collections::btree::map::ExtractIfInner" - [ - ("length", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "length" - |)); - ("dormant_root", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| dormant_root |) ]); - ("cur_leaf_edge", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| front |) ]) - ]; - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::ExtractIfInner" + [ + ("length", + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "length" + |))); + ("dormant_root", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| dormant_root |)) ] + |))); + ("cur_leaf_edge", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| front |)) ] + |))) + ] + |)); + A.to_value + (M.call_closure (| M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], + "core::clone::Clone", + A, [], - "deref", + "clone", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |) ] - |) - ] - |) - ] + |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.StructRecord - "alloc::collections::btree::map::ExtractIfInner" - [ - ("length", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "length" - |)); - ("dormant_root", - Value.StructTuple "core::option::Option::None" []); - ("cur_leaf_edge", - Value.StructTuple "core::option::Option::None" []) - ]; - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::ExtractIfInner" + [ + ("length", + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "length" + |))); + ("dormant_root", + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |))); + ("cur_leaf_edge", + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |))) + ] + |)); + A.to_value + (M.call_closure (| M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], + "core::clone::Clone", + A, [], - "deref", + "clone", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "alloc" + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] |) ] - |) - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -7523,27 +7845,32 @@ Module collections. IntoKeys { inner: self.into_iter() } } *) - Definition into_keys (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_keys (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::IntoKeys" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.apply (Ty.path "alloc::collections::btree::map::BTreeMap") [ K; V; A ], - [], - "into_iter", - [] - |), - [ M.read (| self |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IntoKeys" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ K; V; A ], + [], + "into_iter", + [] + |), + [ M.read (| self |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -7556,27 +7883,32 @@ Module collections. IntoValues { inner: self.into_iter() } } *) - Definition into_values (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_values (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::IntoValues" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.apply (Ty.path "alloc::collections::btree::map::BTreeMap") [ K; V; A ], - [], - "into_iter", - [] - |), - [ M.read (| self |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IntoValues" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ K; V; A ], + [], + "into_iter", + [] + |), + [ M.read (| self |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -7596,11 +7928,7 @@ Module collections. BTreeMap { root: Some(root), length, alloc: ManuallyDrop::new(alloc), _marker: PhantomData } } *) - Definition bulk_build_from_sorted_iter - (K V A : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition bulk_build_from_sorted_iter (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ _ as I ], [ iter; alloc ] => @@ -7631,7 +7959,7 @@ Module collections. ] |) |) in - let length := M.alloc (| Value.Integer Integer.Usize 0 |) in + let length := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.alloc (| M.call_closure (| @@ -7686,23 +8014,33 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::BTreeMap" - [ - ("root", - Value.StructTuple "core::option::Option::Some" [ M.read (| root |) ]); - ("length", M.read (| length |)); - ("alloc", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ A ], - "new", - [] - |), - [ M.read (| alloc |) ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::BTreeMap" + [ + ("root", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| root |)) ] + |))); + ("length", A.to_value (M.read (| length |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ A ], + "new", + [] + |), + [ M.read (| alloc |) ] + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -7725,7 +8063,7 @@ Module collections. } } *) - Definition iter (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -7733,7 +8071,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7790,43 +8128,51 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::Iter" - [ - ("range", M.read (| full_range |)); - ("length", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "length" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Iter" + [ + ("range", A.to_value (M.read (| full_range |))); + ("length", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "length" + |) + |))) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::Iter" - [ - ("range", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V - ], - "none", - [] - |), - [] - |)); - ("length", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Iter" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V + ], + "none", + [] + |), + [] + |))); + ("length", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |))) ] |) @@ -7849,7 +8195,7 @@ Module collections. } } *) - Definition iter_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -7857,7 +8203,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7914,45 +8260,61 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::IterMut" - [ - ("range", M.read (| full_range |)); - ("length", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "length" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IterMut" + [ + ("range", A.to_value (M.read (| full_range |))); + ("length", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "length" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::IterMut" - [ - ("range", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ - Ty.path "alloc::collections::btree::node::marker::ValMut"; - K; - V - ], - "none", - [] - |), - [] - |)); - ("length", Value.Integer Integer.Usize 0); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IterMut" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path + "alloc::collections::btree::node::marker::ValMut"; + K; + V + ], + "none", + [] + |), + [] + |))); + ("length", A.to_value (M.of_value (| Value.Integer 0 |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) |))) ] |) @@ -7969,25 +8331,30 @@ Module collections. Keys { inner: self.iter() } } *) - Definition keys (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition keys (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::Keys" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::btree::map::BTreeMap") [ K; V; A ], - "iter", - [] - |), - [ M.read (| self |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Keys" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ K; V; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -8000,26 +8367,31 @@ Module collections. Values { inner: self.iter() } } *) - Definition values (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition values (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::Values" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::btree::map::BTreeMap") [ K; V; A ], - "iter", - [] - |), - [ M.read (| self |) ] - |)) - ])) - | _, _ => M.impossible + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Values" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ K; V; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |))) + ] + |))) + | _, _ => M.impossible end. Axiom AssociatedFunction_values : @@ -8031,25 +8403,30 @@ Module collections. ValuesMut { inner: self.iter_mut() } } *) - Definition values_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition values_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::ValuesMut" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::btree::map::BTreeMap") [ K; V; A ], - "iter_mut", - [] - |), - [ M.read (| self |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::ValuesMut" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ K; V; A ], + "iter_mut", + [] + |), + [ M.read (| self |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -8062,7 +8439,7 @@ Module collections. self.length } *) - Definition len (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -8087,22 +8464,23 @@ Module collections. self.len() == 0 } *) - Definition is_empty (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::map::BTreeMap") [ K; V; A ], "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -8124,7 +8502,7 @@ Module collections. Cursor { current: edge.next_kv().ok(), root: self.root.as_ref() } } *) - Definition lower_bound (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lower_bound (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; bound ] => @@ -8172,14 +8550,26 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::collections::btree::map::Cursor" - [ - ("current", - Value.StructTuple "core::option::Option::None" []); - ("root", - Value.StructTuple "core::option::Option::None" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Cursor" + [ + ("current", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))); + ("root", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))) + ] + |) |) |) |) @@ -8245,18 +8635,32 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::Cursor" - [ - ("current", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::result::Result") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Cursor" + [ + ("current", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "core::result::Result") [ + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ]; Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ @@ -8266,74 +8670,67 @@ Module collections. V; Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ]; - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ], - "ok", - [] - |), - [ - M.call_closure (| + ] + ], + "ok", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ], + "next_kv", + [] + |), + [ M.read (| edge |) ] + |) + ] + |))); + ("root", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "core::option::Option") [ Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ Ty.path - "alloc::collections::btree::node::marker::Immut"; + "alloc::collections::btree::node::marker::Owned"; K; V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ] ], - "next_kv", + "as_ref", [] |), - [ M.read (| edge |) ] - |) - ] - |)); - ("root", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") [ - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ], - "as_ref", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "root" - |) - ] - |)) - ] + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "root" + |) + ] + |))) + ] + |) |) |))) |))) @@ -8371,7 +8768,7 @@ Module collections. } } *) - Definition lower_bound_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lower_bound_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; bound ] => @@ -8454,41 +8851,49 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::collections::btree::map::CursorMut" - [ - ("current", - Value.StructTuple - "core::option::Option::None" - []); - ("root", M.read (| dormant_root |)); - ("length", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "length" - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref_mut", - [] - |), - [ - M.SubPointer.get_struct_record_field (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::CursorMut" + [ + ("current", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))); + ("root", + A.to_value (M.read (| dormant_root |))); + ("length", + A.to_value + (M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |)) - ] + "length" + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |))) + ] + |) |) |) |) @@ -8556,52 +8961,35 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::CursorMut" - [ - ("current", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::result::Result") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::CursorMut" + [ + ("current", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "core::result::Result") [ Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" + "alloc::collections::btree::node::marker::KV" ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ]; - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ], - "ok", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -8611,45 +8999,70 @@ Module collections. K; V; Ty.path - "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path - "alloc::collections::btree::node::marker::Edge" + "alloc::collections::btree::node::marker::LeafOrInternal" + ] ], - "next_kv", + "ok", [] |), - [ M.read (| edge |) ] - |) - ] - |)); - ("root", M.read (| dormant_root |)); - ("length", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "length" - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref_mut", - [] - |), - [ - M.SubPointer.get_struct_record_field (| + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path + "alloc::collections::btree::node::marker::Edge" + ], + "next_kv", + [] + |), + [ M.read (| edge |) ] + |) + ] + |))); + ("root", A.to_value (M.read (| dormant_root |))); + ("length", + A.to_value + (M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |)) - ] + "length" + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |))) + ] + |) |))) ] |) @@ -8676,7 +9089,7 @@ Module collections. Cursor { current: edge.next_back_kv().ok(), root: self.root.as_ref() } } *) - Definition upper_bound (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition upper_bound (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; bound ] => @@ -8724,14 +9137,26 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::collections::btree::map::Cursor" - [ - ("current", - Value.StructTuple "core::option::Option::None" []); - ("root", - Value.StructTuple "core::option::Option::None" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Cursor" + [ + ("current", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))); + ("root", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))) + ] + |) |) |) |) @@ -8797,18 +9222,32 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::Cursor" - [ - ("current", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::result::Result") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Cursor" + [ + ("current", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "core::result::Result") [ + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ]; Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ @@ -8818,74 +9257,67 @@ Module collections. V; Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ]; - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ], - "ok", - [] - |), - [ - M.call_closure (| + ] + ], + "ok", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ], + "next_back_kv", + [] + |), + [ M.read (| edge |) ] + |) + ] + |))); + ("root", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "core::option::Option") [ Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ Ty.path - "alloc::collections::btree::node::marker::Immut"; + "alloc::collections::btree::node::marker::Owned"; K; V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ] ], - "next_back_kv", + "as_ref", [] |), - [ M.read (| edge |) ] - |) - ] - |)); - ("root", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") [ - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ], - "as_ref", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "root" - |) - ] - |)) - ] + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "root" + |) + ] + |))) + ] + |) |) |))) |))) @@ -8923,7 +9355,7 @@ Module collections. } } *) - Definition upper_bound_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition upper_bound_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ Q ], [ self; bound ] => @@ -9006,41 +9438,49 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::collections::btree::map::CursorMut" - [ - ("current", - Value.StructTuple - "core::option::Option::None" - []); - ("root", M.read (| dormant_root |)); - ("length", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "length" - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref_mut", - [] - |), - [ - M.SubPointer.get_struct_record_field (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::CursorMut" + [ + ("current", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))); + ("root", + A.to_value (M.read (| dormant_root |))); + ("length", + A.to_value + (M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |)) - ] + "length" + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |))) + ] + |) |) |) |) @@ -9108,52 +9548,35 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::CursorMut" - [ - ("current", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::result::Result") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::CursorMut" + [ + ("current", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "core::result::Result") [ Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" + "alloc::collections::btree::node::marker::KV" ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ]; - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ], - "ok", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -9163,45 +9586,70 @@ Module collections. K; V; Ty.path - "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path - "alloc::collections::btree::node::marker::Edge" + "alloc::collections::btree::node::marker::LeafOrInternal" + ] ], - "next_back_kv", + "ok", [] |), - [ M.read (| edge |) ] - |) - ] - |)); - ("root", M.read (| dormant_root |)); - ("length", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::BTreeMap", - "length" - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], - [], - "deref_mut", - [] - |), - [ - M.SubPointer.get_struct_record_field (| + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path + "alloc::collections::btree::node::marker::Edge" + ], + "next_back_kv", + [] + |), + [ M.read (| edge |) ] + |) + ] + |))); + ("root", A.to_value (M.read (| dormant_root |))); + ("length", + A.to_value + (M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |)) - ] + "length" + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |))) + ] + |) |))) ] |) @@ -9235,7 +9683,7 @@ Module collections. self.iter() } *) - Definition into_iter (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -9284,7 +9732,7 @@ Module collections. } } *) - Definition next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9292,26 +9740,29 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::Iter", "length" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -9323,30 +9774,41 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V - ], - "next_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::Iter", - "range" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path "alloc::collections::btree::node::marker::Immut"; + K; + V + ], + "next_unchecked", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::Iter", + "range" + |) + ] + |)) + ] + |) |))) ] |) @@ -9359,33 +9821,40 @@ Module collections. (self.length, Some(self.length)) } *) - Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::Iter", - "length" - |) - |); - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::Iter", "length" |) - |) - ] - ])) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::Iter", + "length" + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9394,7 +9863,7 @@ Module collections. self.next_back() } *) - Definition last (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9421,7 +9890,7 @@ Module collections. self.next() } *) - Definition min (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9448,7 +9917,7 @@ Module collections. self.next_back() } *) - Definition max (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9511,7 +9980,7 @@ Module collections. } } *) - Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9519,26 +9988,29 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::Iter", "length" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -9550,30 +10022,41 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V - ], - "next_back_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::Iter", - "range" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path "alloc::collections::btree::node::marker::Immut"; + K; + V + ], + "next_back_unchecked", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::Iter", + "range" + |) + ] + |)) + ] + |) |))) ] |) @@ -9599,7 +10082,7 @@ Module collections. self.length } *) - Definition len (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9633,43 +10116,47 @@ Module collections. Iter { range: self.range.clone(), length: self.length } } *) - Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::Iter" - [ - ("range", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::Iter", - "range" - |) - ] - |)); - ("length", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::Iter", - "length" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Iter" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::Iter", + "range" + |) + ] + |))); + ("length", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::Iter", + "length" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -9701,7 +10188,7 @@ Module collections. self.iter_mut() } *) - Definition into_iter (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -9750,7 +10237,7 @@ Module collections. } } *) - Definition next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9758,26 +10245,29 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::IterMut", "length" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -9789,33 +10279,41 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path "alloc::collections::btree::node::marker::ValMut"; + K; + V + ], + "next_unchecked", + [] + |), [ - Ty.path "alloc::collections::btree::node::marker::ValMut"; - K; - V - ], - "next_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IterMut", - "range" - |) - ] - |) - ] + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IterMut", + "range" + |) + ] + |)) + ] + |) |))) ] |) @@ -9828,33 +10326,40 @@ Module collections. (self.length, Some(self.length)) } *) - Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IterMut", - "length" - |) - |); - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::IterMut", "length" |) - |) - ] - ])) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IterMut", + "length" + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9863,7 +10368,7 @@ Module collections. self.next_back() } *) - Definition last (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9890,7 +10395,7 @@ Module collections. self.next() } *) - Definition min (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9917,7 +10422,7 @@ Module collections. self.next_back() } *) - Definition max (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9967,7 +10472,7 @@ Module collections. } } *) - Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -9975,26 +10480,29 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::IterMut", "length" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -10006,33 +10514,41 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path "alloc::collections::btree::node::marker::ValMut"; + K; + V + ], + "next_back_unchecked", + [] + |), [ - Ty.path "alloc::collections::btree::node::marker::ValMut"; - K; - V - ], - "next_back_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IterMut", - "range" - |) - ] - |) - ] + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IterMut", + "range" + |) + ] + |)) + ] + |) |))) ] |) @@ -10058,7 +10574,7 @@ Module collections. self.length } *) - Definition len (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -10105,41 +10621,45 @@ Module collections. Iter { range: self.range.reborrow(), length: self.length } } *) - Definition iter (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with - | [], [ self ] => - ltac:(M.monadic - (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::Iter" - [ - ("range", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") - [ Ty.path "alloc::collections::btree::node::marker::ValMut"; K; V ], - "reborrow", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IterMut", - "range" - |) - ] - |)); - ("length", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IterMut", - "length" - |) - |)) - ])) + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Iter" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + [ Ty.path "alloc::collections::btree::node::marker::ValMut"; K; V ], + "reborrow", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IterMut", + "range" + |) + ] + |))); + ("length", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IterMut", + "length" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -10179,7 +10699,7 @@ Module collections. } } *) - Definition into_iter (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -10204,7 +10724,7 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10296,122 +10816,135 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::IntoIter" - [ - ("range", M.read (| full_range |)); - ("length", - M.read (| - M.SubPointer.get_struct_record_field (| - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IntoIter" + [ + ("range", A.to_value (M.read (| full_range |))); + ("length", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::map::BTreeMap") + [ K; V; A ] + ], + [], + "deref", + [] + |), + [ me ] + |), + "alloc::collections::btree::map::BTreeMap", + "length" + |) + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ - Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ K; V; A ] - ], - [], - "deref", + [ A ], + "take", [] |), - [ me ] - |), - "alloc::collections::btree::map::BTreeMap", - "length" - |) - |)); - ("alloc", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], - "take", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ + [ + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ K; V; A ] - ], - [], - "deref_mut", - [] - |), - [ me ] - |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |)) - ] + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::map::BTreeMap") + [ K; V; A ] + ], + [], + "deref_mut", + [] + |), + [ me ] + |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::IntoIter" - [ - ("range", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafRange") + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IntoIter" + [ + ("range", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafRange") + [ + Ty.path + "alloc::collections::btree::node::marker::Dying"; + K; + V + ], + "none", + [] + |), + [] + |))); + ("length", A.to_value (M.of_value (| Value.Integer 0 |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ A ], + "take", + [] + |), [ - Ty.path "alloc::collections::btree::node::marker::Dying"; - K; - V - ], - "none", - [] - |), - [] - |)); - ("length", Value.Integer Integer.Usize 0); - ("alloc", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], - "take", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ K; V; A ] - ], - [], - "deref_mut", - [] - |), - [ me ] - |), - "alloc::collections::btree::map::BTreeMap", - "alloc" - |) - ] - |)) - ] + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::map::BTreeMap") + [ K; V; A ] + ], + [], + "deref_mut", + [] + |), + [ me ] + |), + "alloc::collections::btree::map::BTreeMap", + "alloc" + |) + ] + |))) + ] + |) |))) ] |) @@ -10460,7 +10993,7 @@ Module collections. } } *) - Definition drop (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -10470,7 +11003,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10496,9 +11029,11 @@ Module collections. let kv := M.copy (| γ0_0 |) in let guard := M.alloc (| - Value.StructTuple - "alloc::collections::btree::map::drop::DropGuard" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::map::drop::DropGuard" + [ A.to_value (M.read (| self |)) ] + |) |) in let _ := M.alloc (| @@ -10539,7 +11074,7 @@ Module collections. [ M.read (| guard |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -10547,7 +11082,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -10581,7 +11116,7 @@ Module collections. self.dying_next().map(unsafe { |kv| kv.into_key_val() }) } *) - Definition next (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -10641,8 +11176,8 @@ Module collections. |), [ M.read (| self |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10677,7 +11212,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10688,33 +11224,40 @@ Module collections. (self.length, Some(self.length)) } *) - Definition size_hint (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::IntoIter", - "length" - |) - |); - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::IntoIter", "length" |) - |) - ] - ])) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::IntoIter", + "length" + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10742,7 +11285,7 @@ Module collections. self.dying_next_back().map(unsafe { |kv| kv.into_key_val() }) } *) - Definition next_back (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -10802,8 +11345,8 @@ Module collections. |), [ M.read (| self |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10838,7 +11381,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10862,7 +11406,7 @@ Module collections. self.length } *) - Definition len (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -10912,7 +11456,7 @@ Module collections. self.inner.next().map(|(k, _)| k) } *) - Definition next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -10952,8 +11496,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10969,7 +11513,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10980,7 +11525,7 @@ Module collections. self.inner.size_hint() } *) - Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11010,7 +11555,7 @@ Module collections. self.next_back() } *) - Definition last (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11037,7 +11582,7 @@ Module collections. self.next() } *) - Definition min (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11064,7 +11609,7 @@ Module collections. self.next_back() } *) - Definition max (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11109,7 +11654,7 @@ Module collections. self.inner.next_back().map(|(k, _)| k) } *) - Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11149,8 +11694,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11166,7 +11711,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11190,7 +11736,7 @@ Module collections. self.inner.len() } *) - Definition len (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11246,33 +11792,36 @@ Module collections. Keys { inner: self.inner.clone() } } *) - Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::Keys" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "alloc::collections::btree::map::Iter") [ K; V ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::Keys", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Keys" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "alloc::collections::btree::map::Iter") [ K; V ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::Keys", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -11294,26 +11843,29 @@ Module collections. Keys { inner: Default::default() } } *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::map::Keys" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "alloc::collections::btree::map::Iter") [ K; V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Keys" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "alloc::collections::btree::map::Iter") [ K; V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -11338,7 +11890,7 @@ Module collections. self.inner.next().map(|(_, v)| v) } *) - Definition next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11378,8 +11930,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11395,7 +11947,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11406,7 +11959,7 @@ Module collections. self.inner.size_hint() } *) - Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11436,7 +11989,7 @@ Module collections. self.next_back() } *) - Definition last (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11479,7 +12032,7 @@ Module collections. self.inner.next_back().map(|(_, v)| v) } *) - Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11519,8 +12072,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11536,7 +12089,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11560,7 +12114,7 @@ Module collections. self.inner.len() } *) - Definition len (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11616,33 +12170,36 @@ Module collections. Values { inner: self.inner.clone() } } *) - Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::Values" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "alloc::collections::btree::map::Iter") [ K; V ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::Values", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Values" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "alloc::collections::btree::map::Iter") [ K; V ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::Values", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -11664,26 +12221,29 @@ Module collections. Values { inner: Default::default() } } *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::map::Values" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "alloc::collections::btree::map::Iter") [ K; V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Values" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "alloc::collections::btree::map::Iter") [ K; V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -11765,7 +12325,7 @@ Module collections. f.debug_tuple("ExtractIf").field(&self.inner.peek()).finish() } *) - Definition fmt (K V F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V F in match τ, α with | [], [ self; f ] => @@ -11793,12 +12353,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "ExtractIf" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "ExtractIf" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -11815,7 +12375,8 @@ Module collections. |) ] |) - |)) + |) + |) ] |) ] @@ -11844,7 +12405,7 @@ Module collections. self.inner.next(&mut self.pred, self.alloc.clone()) } *) - Definition next (K V F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V F A in match τ, α with | [], [ self ] => @@ -11887,7 +12448,7 @@ Module collections. self.inner.size_hint() } *) - Definition size_hint (K V F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V F A in match τ, α with | [], [ self ] => @@ -11934,7 +12495,7 @@ Module collections. edge.reborrow().next_kv().ok().map(Handle::into_kv) } *) - Definition peek (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -12247,7 +12808,7 @@ Module collections. None } *) - Definition next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ F; A ], [ self; pred; alloc ] => @@ -12262,7 +12823,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12455,7 +13016,7 @@ Module collections. let v := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12478,8 +13039,13 @@ Module collections. |), [ M.read (| pred |); - Value.Tuple - [ M.read (| k |); M.read (| v |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value (M.read (| v |)) + ] + |) ] |) |)) in @@ -12503,8 +13069,9 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| @@ -12539,8 +13106,8 @@ Module collections. |), [ M.read (| kv |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12688,53 +13255,60 @@ Module collections. "alloc::collections::btree::map::ExtractIfInner", "dormant_root" |), - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::borrow::DormantMutRef") - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::borrow::DormantMutRef") [ - Ty.path - "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ], - "new", - [] - |), - [ - M.read (| - root + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ] + ], + "new", + [] + |), + [ + M.read (| + root + |) + ] |) - ] + |), + 1 |) - |), - 1 - |) - |) - ] + |)) + ] + |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple + [] + |) |) |))) ] |) | _ => M.impossible (||) - end)); + end) + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", @@ -12770,14 +13344,24 @@ Module collections. "alloc::collections::btree::map::ExtractIfInner", "cur_leaf_edge" |), - Value.StructTuple - "core::option::Option::Some" - [ M.read (| pos |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| pos |)) + ] + |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| kv |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| kv |)) + ] + |) |))) ] |) @@ -12785,7 +13369,8 @@ Module collections. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -12795,37 +13380,40 @@ Module collections. "alloc::collections::btree::map::ExtractIfInner", "cur_leaf_edge" |), - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "next_leaf_edge", - [] - |), - [ M.read (| kv |) ] - |) - ] + "alloc::collections::btree::node::marker::KV" + ], + "next_leaf_edge", + [] + |), + [ M.read (| kv |) ] + |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -12837,14 +13425,14 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -12863,29 +13451,35 @@ Module collections. (0, Some( *self.length)) } *) - Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::ExtractIfInner", - "length" - |) - |) - |) - ] - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::ExtractIfInner", + "length" + |) + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12922,7 +13516,7 @@ Module collections. self.inner.next_checked() } *) - Definition next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -12952,7 +13546,7 @@ Module collections. self.next_back() } *) - Definition last (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -12979,7 +13573,7 @@ Module collections. self.next() } *) - Definition min (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -13006,7 +13600,7 @@ Module collections. self.next_back() } *) - Definition max (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -13050,28 +13644,31 @@ Module collections. Range { inner: Default::default() } } *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::map::Range" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Range" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LeafRange") + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -13096,7 +13693,7 @@ Module collections. self.inner.next().map(|(_, v)| v) } *) - Definition next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -13138,8 +13735,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13155,7 +13752,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13166,7 +13764,7 @@ Module collections. self.inner.size_hint() } *) - Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -13196,7 +13794,7 @@ Module collections. self.next_back() } *) - Definition last (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -13239,7 +13837,7 @@ Module collections. self.inner.next_back().map(|(_, v)| v) } *) - Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -13281,8 +13879,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13298,7 +13896,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13322,7 +13921,7 @@ Module collections. self.inner.len() } *) - Definition len (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -13381,7 +13980,7 @@ Module collections. self.inner.next().map(|(k, _)| k) } *) - Definition next (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13410,8 +14009,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13427,7 +14026,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13438,7 +14038,7 @@ Module collections. self.inner.size_hint() } *) - Definition size_hint (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13468,7 +14068,7 @@ Module collections. self.next_back() } *) - Definition last (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13495,7 +14095,7 @@ Module collections. self.next() } *) - Definition min (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13522,7 +14122,7 @@ Module collections. self.next_back() } *) - Definition max (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13567,7 +14167,7 @@ Module collections. self.inner.next_back().map(|(k, _)| k) } *) - Definition next_back (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13596,8 +14196,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13613,7 +14213,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13637,7 +14238,7 @@ Module collections. self.inner.len() } *) - Definition len (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13693,26 +14294,31 @@ Module collections. IntoKeys { inner: Default::default() } } *) - Definition default (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::map::IntoKeys" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "alloc::collections::btree::map::IntoIter") [ K; V; A ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IntoKeys" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::collections::btree::map::IntoIter") + [ K; V; A ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -13737,7 +14343,7 @@ Module collections. self.inner.next().map(|(_, v)| v) } *) - Definition next (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13766,8 +14372,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13783,7 +14389,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13794,7 +14401,7 @@ Module collections. self.inner.size_hint() } *) - Definition size_hint (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13824,7 +14431,7 @@ Module collections. self.next_back() } *) - Definition last (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13867,7 +14474,7 @@ Module collections. self.inner.next_back().map(|(_, v)| v) } *) - Definition next_back (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13896,8 +14503,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13913,7 +14520,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13937,7 +14545,7 @@ Module collections. self.inner.len() } *) - Definition len (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -13993,26 +14601,31 @@ Module collections. IntoValues { inner: Default::default() } } *) - Definition default (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::map::IntoValues" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "alloc::collections::btree::map::IntoIter") [ K; V; A ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::IntoValues" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::collections::btree::map::IntoIter") + [ K; V; A ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -14034,7 +14647,7 @@ Module collections. self.inner.next_back_checked() } *) - Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -14090,35 +14703,38 @@ Module collections. Range { inner: self.inner.clone() } } *) - Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::Range" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LeafRange") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::Range", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Range" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LeafRange") + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::Range", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -14144,7 +14760,7 @@ Module collections. self.inner.next_checked() } *) - Definition next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -14174,7 +14790,7 @@ Module collections. self.next_back() } *) - Definition last (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -14201,7 +14817,7 @@ Module collections. self.next() } *) - Definition min (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -14228,7 +14844,7 @@ Module collections. self.next_back() } *) - Definition max (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -14272,7 +14888,7 @@ Module collections. self.inner.next_back_checked() } *) - Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -14338,7 +14954,7 @@ Module collections. BTreeMap::bulk_build_from_sorted_iter(inputs, Global) } *) - Definition from_iter (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ T ], [ iter ] => @@ -14377,7 +14993,7 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14418,7 +15034,7 @@ Module collections. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -14452,8 +15068,8 @@ Module collections. |), [ inputs ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -14493,7 +15109,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -14510,7 +15127,10 @@ Module collections. [ Ty.tuple [ K; V ]; Ty.path "alloc::alloc::Global" ] ] |), - [ M.read (| inputs |); Value.StructTuple "alloc::alloc::Global" [] ] + [ + M.read (| inputs |); + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + ] |) |) |))) @@ -14538,7 +15158,7 @@ Module collections. }); } *) - Definition extend (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ T ], [ self; iter ] => @@ -14567,8 +15187,8 @@ Module collections. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14597,16 +15217,17 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14616,7 +15237,7 @@ Module collections. self.insert(k, v); } *) - Definition extend_one (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; β1 ] => @@ -14646,7 +15267,7 @@ Module collections. [ M.read (| self |); M.read (| k |); M.read (| v |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) @@ -14675,7 +15296,7 @@ Module collections. self.extend(iter.into_iter().map(|(&key, &value)| (key, value))); } *) - Definition extend (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -14742,8 +15363,8 @@ Module collections. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14758,17 +15379,24 @@ Module collections. let key := M.copy (| γ0_0 |) in let γ0_1 := M.read (| γ0_1 |) in let value := M.copy (| γ0_1 |) in - Value.Tuple [ M.read (| key |); M.read (| value |) ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| key |)); + A.to_value (M.read (| value |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14778,7 +15406,7 @@ Module collections. self.insert(k, v); } *) - Definition extend_one (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; β1 ] => @@ -14810,7 +15438,7 @@ Module collections. [ M.read (| self |); M.read (| k |); M.read (| v |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) @@ -14843,7 +15471,7 @@ Module collections. } } *) - Definition hash (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ H ], [ self; state ] => @@ -14950,10 +15578,10 @@ Module collections. [ elt; M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -14981,7 +15609,7 @@ Module collections. BTreeMap::new() } *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => @@ -15017,7 +15645,7 @@ Module collections. self.len() == other.len() && self.iter().zip(other).all(|(a, b)| a == b) } *) - Definition eq (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; other ] => @@ -15025,23 +15653,24 @@ Module collections. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::map::BTreeMap") [ K; V; A ], "len", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::map::BTreeMap") [ K; V; A ], "len", [] |), [ M.read (| other |) ] - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -15105,8 +15734,8 @@ Module collections. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15142,7 +15771,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) |))) @@ -15180,7 +15810,7 @@ Module collections. self.iter().partial_cmp(other.iter()) } *) - Definition partial_cmp (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; other ] => @@ -15235,7 +15865,7 @@ Module collections. self.iter().cmp(other.iter()) } *) - Definition cmp (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; other ] => @@ -15290,7 +15920,7 @@ Module collections. f.debug_map().entries(self.iter()).finish() } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -15361,7 +15991,7 @@ Module collections. self.get(key).expect("no entry found for key") } *) - Definition index (K Q V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (K Q V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K Q V A in match τ, α with | [], [ self; key ] => @@ -15383,7 +16013,7 @@ Module collections. |), [ M.read (| self |); M.read (| key |) ] |); - M.read (| Value.String "no entry found for key" |) + M.read (| M.of_value (| Value.String "no entry found for key" |) |) ] |))) | _, _ => M.impossible @@ -15419,7 +16049,7 @@ Module collections. BTreeMap::bulk_build_from_sorted_iter(arr, Global) } *) - Definition from (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ arr ] => @@ -15430,18 +16060,19 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.get_constant (| "alloc::collections::btree::map::N" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -15466,7 +16097,7 @@ Module collections. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -15488,9 +16119,9 @@ Module collections. ] |), [ - (* Unsize *) M.pointer_coercion arr; - M.closure - (fun γ => + (* Unsize *) M.pointer_coercion (| arr |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -15530,7 +16161,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -15543,7 +16175,10 @@ Module collections. "bulk_build_from_sorted_iter", [ Ty.apply (Ty.path "array") [ Ty.tuple [ K; V ] ] ] |), - [ M.read (| arr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ + M.read (| arr |); + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + ] |) |) |))) @@ -15616,7 +16251,7 @@ Module collections. Cursor { current, root } } *) - Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -15643,9 +16278,14 @@ Module collections. let current := M.copy (| γ0_0 |) in let root := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::map::Cursor" - [ ("current", M.read (| current |)); ("root", M.read (| root |)) ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Cursor" + [ + ("current", A.to_value (M.read (| current |))); + ("root", A.to_value (M.read (| root |))) + ] + |) |))) ] |) @@ -15671,7 +16311,7 @@ Module collections. f.debug_tuple("Cursor").field(&self.key_value()).finish() } *) - Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; f ] => @@ -15699,12 +16339,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Cursor" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Cursor" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::map::Cursor") [ K; V ], @@ -15713,7 +16353,8 @@ Module collections. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -15785,7 +16426,7 @@ Module collections. f.debug_tuple("CursorMut").field(&self.key_value()).finish() } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -15813,12 +16454,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "CursorMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "CursorMut" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -15829,7 +16470,8 @@ Module collections. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -15864,7 +16506,7 @@ Module collections. } } *) - Definition move_next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -16000,8 +16642,8 @@ Module collections. "root" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16151,11 +16793,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -16253,7 +16896,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -16278,7 +16921,7 @@ Module collections. } } *) - Definition move_prev (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_prev (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -16414,8 +17057,8 @@ Module collections. "root" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16565,11 +17208,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -16667,7 +17311,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -16683,7 +17327,7 @@ Module collections. self.current.as_ref().map(|current| current.into_kv().0) } *) - Definition key (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -16773,8 +17417,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16818,7 +17462,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16833,7 +17478,7 @@ Module collections. self.current.as_ref().map(|current| current.into_kv().1) } *) - Definition value (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition value (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -16923,8 +17568,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16968,7 +17613,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16983,7 +17629,7 @@ Module collections. self.current.as_ref().map(|current| current.into_kv()) } *) - Definition key_value (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key_value (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -17073,8 +17719,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17109,7 +17755,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17126,7 +17773,7 @@ Module collections. next.current.as_ref().map(|current| current.into_kv()) } *) - Definition peek_next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -17245,8 +17892,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17281,7 +17928,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -17300,7 +17948,7 @@ Module collections. prev.current.as_ref().map(|current| current.into_kv()) } *) - Definition peek_prev (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_prev (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -17419,8 +18067,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17455,7 +18103,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -17487,7 +18136,7 @@ Module collections. } } *) - Definition move_next (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_next (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -17671,8 +18320,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17822,11 +18471,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -17922,7 +18572,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -17948,7 +18598,7 @@ Module collections. } } *) - Definition move_prev (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_prev (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -18132,8 +18782,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18283,11 +18933,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -18383,7 +19034,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -18399,7 +19050,7 @@ Module collections. self.current.as_ref().map(|current| current.reborrow().into_kv().0) } *) - Definition key (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -18489,8 +19140,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18560,7 +19211,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18575,7 +19227,7 @@ Module collections. self.current.as_ref().map(|current| current.reborrow().into_kv().1) } *) - Definition value (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition value (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -18665,8 +19317,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18736,7 +19388,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18751,7 +19404,7 @@ Module collections. self.current.as_ref().map(|current| current.reborrow().into_kv()) } *) - Definition key_value (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key_value (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -18841,8 +19494,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18900,7 +19553,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18915,7 +19569,7 @@ Module collections. self.current.as_mut().map(|current| current.kv_mut().1) } *) - Definition value_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition value_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -19005,8 +19659,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -19050,7 +19704,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -19068,7 +19723,7 @@ Module collections. }) } *) - Definition key_value_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key_value_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -19158,8 +19813,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -19205,7 +19860,13 @@ Module collections. let k := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple [ M.read (| k |); M.read (| v |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value (M.read (| v |)) + ] + |) |))) ] |) @@ -19213,7 +19874,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -19228,7 +19890,7 @@ Module collections. self.current.as_mut().map(|current| current.kv_mut().0) } *) - Definition key_mut_unchecked (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key_mut_unchecked (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -19318,8 +19980,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -19363,7 +20025,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -19394,7 +20057,7 @@ Module collections. Some((k, v)) } *) - Definition peek_next (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_next (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -20045,9 +20708,18 @@ Module collections. let k := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| k |); M.read (| v |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| k |)); A.to_value (M.read (| v |)) + ] + |)) + ] + |) |))) ] |) @@ -20085,7 +20757,7 @@ Module collections. Some((k, v)) } *) - Definition peek_prev (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_prev (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -20764,9 +21436,18 @@ Module collections. let k := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| k |); M.read (| v |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| k |)); A.to_value (M.read (| v |)) + ] + |)) + ] + |) |))) ] |) @@ -20788,221 +21469,230 @@ Module collections. } } *) - Definition as_cursor (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_cursor (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::map::Cursor" - [ - ("root", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ], - "as_ref", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::map::Cursor" + [ + ("root", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::borrow::DormantMutRef") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "core::option::Option") + (Ty.path "alloc::collections::btree::node::NodeRef") [ - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] + Ty.path "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" ] ], - "reborrow_shared", + "as_ref", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::CursorMut", - "root" + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::borrow::DormantMutRef") + [ + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ] + ] + ], + "reborrow_shared", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::CursorMut", + "root" + |) + ] |) ] - |) - ] - |)); - ("current", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ + |))); + ("current", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "&") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "&") [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path "alloc::collections::btree::node::marker::KV" + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ] ] - ] - ], - "map", - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + ], + "map", [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ]; - Ty.function - [ - Ty.tuple + Ty.function [ - Ty.apply - (Ty.path "&") + Ty.tuple [ Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "&") [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path "alloc::collections::btree::node::marker::KV" + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ] ] ] - ] - ] - (Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ]) - ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply + ] + (Ty.apply (Ty.path "alloc::collections::btree::node::Handle") [ Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ - Ty.path "alloc::collections::btree::node::marker::Mut"; + Ty.path "alloc::collections::btree::node::marker::Immut"; K; V; Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" ]; Ty.path "alloc::collections::btree::node::marker::KV" - ] - ], - "as_ref", - [] + ]) + ] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::CursorMut", - "current" - |) - ] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") [ - fun γ => - ltac:(M.monadic - (let current := M.copy (| γ |) in - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ] + ], + "as_ref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::CursorMut", + "current" + |) + ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let current := M.copy (| γ |) in + M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "reborrow", - [] - |), - [ M.read (| current |) ] - |))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |)) - ])) + "alloc::collections::btree::node::marker::KV" + ], + "reborrow", + [] + |), + [ M.read (| current |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -21040,7 +21730,7 @@ Module collections. *self.length += 1; } *) - Definition insert_after_unchecked (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_after_unchecked (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; key; value ] => @@ -21221,28 +21911,31 @@ Module collections. let _ := M.write (| M.read (| root |), - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Leaf" - ], - "forget_type", - [] - |), - [ M.read (| node |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ], + "forget_type", + [] + |), + [ M.read (| node |) ] + |)) + ] + |) |) in let _ := let β := @@ -21256,11 +21949,12 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); @@ -21403,8 +22097,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -21623,7 +22317,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -21722,9 +22417,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -21768,7 +22467,7 @@ Module collections. *self.length += 1; } *) - Definition insert_before_unchecked (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_before_unchecked (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; key; value ] => @@ -21949,28 +22648,31 @@ Module collections. let _ := M.write (| M.read (| root |), - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Leaf" - ], - "forget_type", - [] - |), - [ M.read (| node |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ], + "forget_type", + [] + |), + [ M.read (| node |) ] + |)) + ] + |) |) in let _ := let β := @@ -21984,11 +22686,12 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); @@ -22131,8 +22834,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -22351,7 +23054,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -22450,9 +23154,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -22482,7 +23190,7 @@ Module collections. } } *) - Definition insert_after (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_after (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; key; value ] => @@ -22493,7 +23201,7 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22518,7 +23226,7 @@ Module collections. |) in let current := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22554,31 +23262,38 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "key must be ordered above the current element" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "key must be ordered above the current element" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22605,7 +23320,7 @@ Module collections. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let next := M.copy (| γ1_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22641,26 +23356,33 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "key must be ordered below the next element" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "key must be ordered below the next element" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -22674,7 +23396,7 @@ Module collections. [ M.read (| self |); M.read (| key |); M.read (| value |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -22700,7 +23422,7 @@ Module collections. } } *) - Definition insert_before (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_before (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; key; value ] => @@ -22711,7 +23433,7 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22736,7 +23458,7 @@ Module collections. |) in let current := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22772,31 +23494,38 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "key must be ordered below the current element" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "key must be ordered below the current element" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22823,7 +23552,7 @@ Module collections. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let prev := M.copy (| γ1_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22859,26 +23588,33 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "key must be ordered above the previous element" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "key must be ordered above the previous element" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -22892,7 +23628,7 @@ Module collections. [ M.read (| self |); M.read (| key |); M.read (| value |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -22918,7 +23654,7 @@ Module collections. Some(kv) } *) - Definition remove_current (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_current (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -23039,7 +23775,7 @@ Module collections. ] |) |) in - let emptied_internal_root := M.alloc (| Value.Bool false |) in + let emptied_internal_root := M.alloc (| M.of_value (| Value.Bool false |) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23063,8 +23799,8 @@ Module collections. |), [ M.read (| current |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -23074,12 +23810,16 @@ Module collections. fun γ => ltac:(M.monadic (M.read (| - M.write (| emptied_internal_root, Value.Bool true |) + M.write (| + emptied_internal_root, + M.of_value (| Value.Bool true |) + |) |))) ] |) | _ => M.impossible (||) - end)); + end) + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), [ @@ -23179,11 +23919,15 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -23319,12 +24063,17 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| kv |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| kv |)) ] + |) |))) ] |) @@ -23354,11 +24103,7 @@ Module collections. Some(kv) } *) - Definition remove_current_and_move_back - (K V A : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition remove_current_and_move_back (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -23479,7 +24224,7 @@ Module collections. ] |) |) in - let emptied_internal_root := M.alloc (| Value.Bool false |) in + let emptied_internal_root := M.alloc (| M.of_value (| Value.Bool false |) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23503,8 +24248,8 @@ Module collections. |), [ M.read (| current |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -23514,12 +24259,16 @@ Module collections. fun γ => ltac:(M.monadic (M.read (| - M.write (| emptied_internal_root, Value.Bool true |) + M.write (| + emptied_internal_root, + M.of_value (| Value.Bool true |) + |) |))) ] |) | _ => M.impossible (||) - end)); + end) + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), [ @@ -23619,11 +24368,15 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -23759,12 +24512,17 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| kv |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| kv |)) ] + |) |))) ] |) diff --git a/CoqOfRust/alloc/collections/btree/map/entry.v b/CoqOfRust/alloc/collections/btree/map/entry.v index 4dd1a4cf7..a40ebc652 100644 --- a/CoqOfRust/alloc/collections/btree/map/entry.v +++ b/CoqOfRust/alloc/collections/btree/map/entry.v @@ -49,7 +49,7 @@ Module collections. } } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -91,10 +91,13 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Entry" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Entry" |) |) + ] |) |); - (* Unsize *) M.pointer_coercion (M.read (| v |)) + (* Unsize *) M.pointer_coercion (| M.read (| v |) |) ] |) ] @@ -131,10 +134,13 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Entry" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Entry" |) |) + ] |) |); - (* Unsize *) M.pointer_coercion (M.read (| o |)) + (* Unsize *) M.pointer_coercion (| M.read (| o |) |) ] |) ] @@ -201,7 +207,7 @@ Module collections. f.debug_tuple("VacantEntry").field(self.key()).finish() } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -229,12 +235,15 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "VacantEntry" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "VacantEntry" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::map::entry::VacantEntry") @@ -243,7 +252,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) + |) + |) ] |) ] @@ -301,7 +311,7 @@ Module collections. f.debug_struct("OccupiedEntry").field("key", self.key()).field("value", self.get()).finish() } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -336,13 +346,16 @@ Module collections. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "OccupiedEntry" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "OccupiedEntry" |) |) + ] |) |); - M.read (| Value.String "key" |); + M.read (| M.of_value (| Value.String "key" |) |); (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::map::entry::OccupiedEntry") @@ -351,13 +364,14 @@ Module collections. [] |), [ M.read (| self |) ] - |)) + |) + |) ] |); - M.read (| Value.String "value" |); + M.read (| M.of_value (| Value.String "value" |) |); (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::map::entry::OccupiedEntry") @@ -366,7 +380,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) + |) + |) ] |) ] @@ -410,7 +425,7 @@ Module collections. .finish() } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -452,13 +467,16 @@ Module collections. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "OccupiedError" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "OccupiedError" |) |) + ] |) |); - M.read (| Value.String "key" |); + M.read (| M.of_value (| Value.String "key" |) |); (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -474,13 +492,14 @@ Module collections. "entry" |) ] - |)) + |) + |) ] |); - M.read (| Value.String "old_value" |); + M.read (| M.of_value (| Value.String "old_value" |) |); (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::map::entry::OccupiedEntry") @@ -495,17 +514,19 @@ Module collections. "entry" |) ] - |)) + |) + |) ] |); - M.read (| Value.String "new_value" |); + M.read (| M.of_value (| Value.String "new_value" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::map::entry::OccupiedError", "value" - |)) + |) + |) ] |) ] @@ -537,7 +558,7 @@ Module collections. ) } *) - Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; f ] => @@ -552,92 +573,107 @@ Module collections. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "failed to insert " |); - M.read (| Value.String ", key " |); - M.read (| Value.String " already exists with value " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "failed to insert " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ", key " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " already exists with value " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ V ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::entry::OccupiedError", - "value" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ K ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::map::entry::OccupiedEntry") - [ K; V; A ], - "key", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::entry::OccupiedError", - "entry" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ V ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::entry::OccupiedError", + "value" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ K ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::map::entry::OccupiedEntry") + [ K; V; A ], + "key", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::entry::OccupiedError", + "entry" + |) + ] |) - ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ V ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::map::entry::OccupiedEntry") - [ K; V; A ], - "get", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::map::entry::OccupiedError", - "entry" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ V ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::map::entry::OccupiedEntry") + [ K; V; A ], + "get", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::map::entry::OccupiedError", + "entry" + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -665,13 +701,13 @@ Module collections. "key already exists" } *) - Definition description (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition description (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "key already exists" |))) + M.read (| M.of_value (| Value.String "key already exists" |) |))) | _, _ => M.impossible end. @@ -696,7 +732,7 @@ Module collections. } } *) - Definition or_insert (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition or_insert (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; default ] => @@ -767,7 +803,7 @@ Module collections. } } *) - Definition or_insert_with (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition or_insert_with (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ F ], [ self; default ] => @@ -827,7 +863,7 @@ Module collections. "call_once", [] |), - [ M.read (| default |); Value.Tuple [] ] + [ M.read (| default |); M.of_value (| Value.Tuple [] |) ] |) ] |) @@ -853,7 +889,7 @@ Module collections. } } *) - Definition or_insert_with_key (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition or_insert_with_key (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ F ], [ self; default ] => @@ -906,20 +942,23 @@ Module collections. |), [ M.read (| default |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::map::entry::VacantEntry") - [ K; V; A ], - "key", - [] - |), - [ entry ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::map::entry::VacantEntry") + [ K; V; A ], + "key", + [] + |), + [ entry ] + |)) + ] + |) ] |) |) in @@ -953,7 +992,7 @@ Module collections. } } *) - Definition key (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -1029,7 +1068,7 @@ Module collections. } } *) - Definition and_modify (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition and_modify (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [ F ], [ self; f ] => @@ -1061,27 +1100,32 @@ Module collections. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::map::entry::OccupiedEntry") - [ K; V; A ], - "get_mut", - [] - |), - [ entry ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::map::entry::OccupiedEntry") + [ K; V; A ], + "get_mut", + [] + |), + [ entry ] + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::map::entry::Entry::Occupied" - [ M.read (| entry |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::map::entry::Entry::Occupied" + [ A.to_value (M.read (| entry |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -1093,9 +1137,11 @@ Module collections. |) in let entry := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::map::entry::Entry::Vacant" - [ M.read (| entry |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::map::entry::Entry::Vacant" + [ A.to_value (M.read (| entry |)) ] + |) |))) ] |) @@ -1114,7 +1160,7 @@ Module collections. } } *) - Definition or_default (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition or_default (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -1199,7 +1245,7 @@ Module collections. &self.key } *) - Definition key (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -1222,7 +1268,7 @@ Module collections. self.key } *) - Definition into_key (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_key (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -1280,7 +1326,7 @@ Module collections. unsafe { &mut *out_ptr } } *) - Definition insert (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; value ] => @@ -1418,27 +1464,30 @@ Module collections. "alloc::collections::btree::map::BTreeMap", "root" |), - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Leaf" - ], - "forget_type", - [] - |), - [ M.read (| root |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ], + "forget_type", + [] + |), + [ M.read (| root |) ] + |)) + ] + |) |) in let _ := M.write (| @@ -1447,7 +1496,7 @@ Module collections. "alloc::collections::btree::map::BTreeMap", "length" |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) in val_ptr)); fun γ => @@ -1528,8 +1577,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1736,7 +1785,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -1801,8 +1851,9 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in val_ptr @@ -1830,7 +1881,7 @@ Module collections. self.handle.reborrow().into_kv().0 } *) - Definition key (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -1903,7 +1954,7 @@ Module collections. self.remove_kv() } *) - Definition remove_entry (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_entry (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -1931,7 +1982,7 @@ Module collections. self.handle.reborrow().into_kv().1 } *) - Definition get (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -2004,7 +2055,7 @@ Module collections. self.handle.kv_mut().1 } *) - Definition get_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -2055,7 +2106,7 @@ Module collections. self.handle.into_val_mut() } *) - Definition into_mut (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_mut (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -2101,7 +2152,7 @@ Module collections. mem::replace(self.get_mut(), value) } *) - Definition insert (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self; value ] => @@ -2136,7 +2187,7 @@ Module collections. self.remove_kv().1 } *) - Definition remove (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => @@ -2181,14 +2232,14 @@ Module collections. old_kv } *) - Definition remove_kv (K V A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_kv (K V A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V A in match τ, α with | [], [ self ] => 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 (| M.of_value (| Value.Bool false |) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -2217,8 +2268,8 @@ Module collections. "handle" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2228,12 +2279,16 @@ Module collections. fun γ => ltac:(M.monadic (M.read (| - M.write (| emptied_internal_root, Value.Bool true |) + M.write (| + emptied_internal_root, + M.of_value (| Value.Bool true |) + |) |))) ] |) | _ => M.impossible (||) - end)); + end) + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), [ @@ -2287,11 +2342,15 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2388,8 +2447,9 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in old_kv)) diff --git a/CoqOfRust/alloc/collections/btree/mem.v b/CoqOfRust/alloc/collections/btree/mem.v index f751ff2a7..ee8efaa94 100644 --- a/CoqOfRust/alloc/collections/btree/mem.v +++ b/CoqOfRust/alloc/collections/btree/mem.v @@ -9,7 +9,7 @@ Module collections. replace(v, |value| (change(value), ())) } *) - Definition take_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition take_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; impl_FnOnce_T__arrow_T ], [ v; change ] => ltac:(M.monadic @@ -22,8 +22,8 @@ Module collections. |), [ M.read (| v |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -33,24 +33,33 @@ Module collections. fun γ => ltac:(M.monadic (let value := M.copy (| γ |) in - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - impl_FnOnce_T__arrow_T, - [ Ty.tuple [ T ] ], - "call_once", - [] - |), - [ M.read (| change |); Value.Tuple [ M.read (| value |) ] ] - |); - Value.Tuple [] - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + impl_FnOnce_T__arrow_T, + [ Ty.tuple [ T ] ], + "call_once", + [] + |), + [ + M.read (| change |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| value |)) ] + |) + ] + |)); + A.to_value (M.of_value (| Value.Tuple [] |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -74,7 +83,7 @@ Module collections. ret } *) - Definition replace (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; R; impl_FnOnce_T__arrow__T__R_ ], [ v; change ] => ltac:(M.monadic @@ -83,7 +92,9 @@ Module collections. M.read (| let guard := M.alloc (| - Value.StructTuple "alloc::collections::btree::mem::replace::PanicGuard" [] + M.of_value (| + Value.StructTuple "alloc::collections::btree::mem::replace::PanicGuard" [] + |) |) in let value := M.alloc (| @@ -102,7 +113,10 @@ Module collections. "call_once", [] |), - [ M.read (| change |); Value.Tuple [ M.read (| value |) ] ] + [ + M.read (| change |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| value |)) ] |) + ] |) |), [ @@ -120,7 +134,7 @@ Module collections. [ M.read (| v |); M.read (| new_value |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -154,7 +168,7 @@ Module collections. intrinsics::abort() } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/alloc/collections/btree/merge_iter.v b/CoqOfRust/alloc/collections/btree/merge_iter.v index 41fabb5e5..206d452dc 100644 --- a/CoqOfRust/alloc/collections/btree/merge_iter.v +++ b/CoqOfRust/alloc/collections/btree/merge_iter.v @@ -44,7 +44,7 @@ Module collections. Ty.apply (Ty.path "alloc::collections::btree::merge_iter::Peeked") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -65,20 +65,23 @@ Module collections. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::merge_iter::Peeked::A" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.associated, - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::merge_iter::Peeked::A" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.associated, + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -91,20 +94,23 @@ Module collections. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::merge_iter::Peeked::B" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.associated, - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::merge_iter::Peeked::B" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.associated, + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))) ] |) @@ -126,7 +132,7 @@ Module collections. Ty.apply (Ty.path "alloc::collections::btree::merge_iter::Peeked") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -156,8 +162,8 @@ Module collections. |), [ M.read (| f |); - M.read (| Value.String "A" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "A" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -180,8 +186,8 @@ Module collections. |), [ M.read (| f |); - M.read (| Value.String "B" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "B" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -209,58 +215,66 @@ Module collections. Self { a: self.a.clone(), b: self.b.clone(), peeked: self.peeked.clone() } } *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::merge_iter::MergeIterInner" - [ - ("a", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::merge_iter::MergeIterInner", - "a" - |) - ] - |)); - ("b", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::merge_iter::MergeIterInner", - "b" - |) - ] - |)); - ("peeked", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "alloc::collections::btree::merge_iter::Peeked") [ I ] - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::merge_iter::MergeIterInner", - "peeked" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::merge_iter::MergeIterInner" + [ + ("a", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::merge_iter::MergeIterInner", + "a" + |) + ] + |))); + ("b", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::merge_iter::MergeIterInner", + "b" + |) + ] + |))); + ("peeked", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "alloc::collections::btree::merge_iter::Peeked") + [ I ] + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::merge_iter::MergeIterInner", + "peeked" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -282,7 +296,7 @@ Module collections. f.debug_tuple("MergeIterInner").field(&self.a).field(&self.b).field(&self.peeked).finish() } *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -324,34 +338,40 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "MergeIterInner" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "MergeIterInner" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::merge_iter::MergeIterInner", "a" - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::merge_iter::MergeIterInner", "b" - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::merge_iter::MergeIterInner", "peeked" - |)) + |) + |) ] |) ] @@ -377,20 +397,24 @@ Module collections. MergeIterInner { a, b, peeked: None } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - Value.StructRecord - "alloc::collections::btree::merge_iter::MergeIterInner" - [ - ("a", M.read (| a |)); - ("b", M.read (| b |)); - ("peeked", Value.StructTuple "core::option::Option::None" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::merge_iter::MergeIterInner" + [ + ("a", A.to_value (M.read (| a |))); + ("b", A.to_value (M.read (| b |))); + ("peeked", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -432,7 +456,7 @@ Module collections. (a_next, b_next) } *) - Definition nexts (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nexts (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Cmp ], [ self; cmp ] => @@ -440,8 +464,8 @@ 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 a_next := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in + let b_next := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.match_operator (| M.alloc (| @@ -485,7 +509,11 @@ Module collections. let _ := M.write (| a_next, - Value.StructTuple "core::option::Option::Some" [ M.read (| next |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| next |)) ] + |) |) in let _ := M.write (| @@ -507,7 +535,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -526,7 +554,11 @@ Module collections. let _ := M.write (| b_next, - Value.StructTuple "core::option::Option::Some" [ M.read (| next |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| next |)) ] + |) |) in let _ := M.write (| @@ -548,7 +580,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -591,16 +623,19 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.alloc (| Value.Tuple [ a_next; b_next ] |) in + (let γ := + M.alloc (| + M.of_value (| Value.Tuple [ A.to_value a_next; A.to_value b_next ] |) + |) in 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 @@ -635,7 +670,13 @@ Module collections. "call", [] |), - [ cmp; Value.Tuple [ M.read (| a1 |); M.read (| b1 |) ] ] + [ + cmp; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| a1 |)); A.to_value (M.read (| b1 |)) ] + |) + ] |) |), [ @@ -675,8 +716,9 @@ Module collections. |), [ b_next ] |); - M.constructor_as_closure + M.constructor_as_closure (| "alloc::collections::btree::merge_iter::Peeked::B" + |) ] |) |))); @@ -716,18 +758,25 @@ Module collections. |), [ a_next ] |); - M.constructor_as_closure + M.constructor_as_closure (| "alloc::collections::btree::merge_iter::Peeked::A" + |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [ M.read (| a_next |); M.read (| b_next |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| a_next |)); A.to_value (M.read (| b_next |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -748,7 +797,7 @@ Module collections. } } *) - Definition lens (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lens (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -777,44 +826,49 @@ Module collections. 0 |) in M.alloc (| - Value.Tuple - [ - BinOp.Panic.add (| - Value.Integer Integer.Usize 1, - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - I, - [], - "len", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::merge_iter::MergeIterInner", - "a" + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.of_value (| Value.Integer 1 |), + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + I, + [], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::merge_iter::MergeIterInner", + "a" + |) + ] |) - ] - |) - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - I, - [], - "len", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::merge_iter::MergeIterInner", - "b" - |) - ] - |) - ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + I, + [], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::merge_iter::MergeIterInner", + "b" + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -831,83 +885,92 @@ Module collections. 0 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - I, - [], - "len", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::merge_iter::MergeIterInner", - "a" - |) - ] - |); - BinOp.Panic.add (| - Value.Integer Integer.Usize 1, - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - I, - [], - "len", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::merge_iter::MergeIterInner", - "b" + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + I, + [], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::merge_iter::MergeIterInner", + "a" + |) + ] + |)); + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.of_value (| Value.Integer 1 |), + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + I, + [], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::merge_iter::MergeIterInner", + "b" + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - I, - [], - "len", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::merge_iter::MergeIterInner", - "a" - |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - I, - [], - "len", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::merge_iter::MergeIterInner", - "b" - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + I, + [], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::merge_iter::MergeIterInner", + "a" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + I, + [], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::merge_iter::MergeIterInner", + "b" + |) + ] + |)) + ] + |) |))) ] |) diff --git a/CoqOfRust/alloc/collections/btree/navigate.v b/CoqOfRust/alloc/collections/btree/navigate.v index e6bc4aad4..4cfed4d98 100644 --- a/CoqOfRust/alloc/collections/btree/navigate.v +++ b/CoqOfRust/alloc/collections/btree/navigate.v @@ -60,82 +60,86 @@ Module collections. LeafRange { front: self.front.clone(), back: self.back.clone() } } *) - Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::navigate::LeafRange" - [ - ("front", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::option::Option") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LeafRange" + [ + ("front", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ] - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::navigate::LeafRange", - "front" - |) - ] - |)); - ("back", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::option::Option") + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ] + ], + [], + "clone", + [] + |), [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::navigate::LeafRange", + "front" + |) + ] + |))); + ("back", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ] - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::navigate::LeafRange", - "back" - |) - ] - |)) - ])) + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ] + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::navigate::LeafRange", + "back" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -157,17 +161,23 @@ Module collections. LeafRange { front: None, back: None } } *) - Definition default (B K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (B K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::navigate::LeafRange" - [ - ("front", Value.StructTuple "core::option::Option::None" []); - ("back", Value.StructTuple "core::option::Option::None" []) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LeafRange" + [ + ("front", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("back", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -189,17 +199,23 @@ Module collections. LeafRange { front: None, back: None } } *) - Definition none (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition none (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::navigate::LeafRange" - [ - ("front", Value.StructTuple "core::option::Option::None" []); - ("back", Value.StructTuple "core::option::Option::None" []) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LeafRange" + [ + ("front", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("back", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -212,7 +228,7 @@ Module collections. self.front == self.back } *) - Definition is_empty (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -288,314 +304,324 @@ Module collections. } } *) - Definition reborrow (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reborrow (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::navigate::LeafRange" - [ - ("front", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LeafRange" + [ + ("front", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "&") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "&") [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ] ] - ] - ], - "map", - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + ], + "map", [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ]; - Ty.function - [ - Ty.tuple + Ty.function [ - Ty.apply - (Ty.path "&") + Ty.tuple [ Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "&") [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; Ty.path - "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" + "alloc::collections::btree::node::marker::Edge" + ] ] ] ] - ] - (Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ]) - ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply + (Ty.apply (Ty.path "alloc::collections::btree::node::Handle") [ Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ - BorrowType; + Ty.path "alloc::collections::btree::node::marker::Immut"; K; V; Ty.path "alloc::collections::btree::node::marker::Leaf" ]; Ty.path "alloc::collections::btree::node::marker::Edge" - ] - ], - "as_ref", - [] + ]) + ] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::navigate::LeafRange", - "front" - |) - ] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let f := M.copy (| γ |) in - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - BorrowType; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path - "alloc::collections::btree::node::marker::Edge" - ], - "reborrow", - [] - |), - [ M.read (| f |) ] - |))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |)); - ("back", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply - (Ty.path "&") - [ + M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ] + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ] + ], + "as_ref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::navigate::LeafRange", + "front" + |) ] - ], - "map", - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let f := M.copy (| γ |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path + "alloc::collections::btree::node::marker::Edge" + ], + "reborrow", + [] + |), + [ M.read (| f |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |))); + ("back", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ] + ] + ], + "map", [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ]; - Ty.function - [ - Ty.tuple + Ty.function [ - Ty.apply - (Ty.path "&") + Ty.tuple [ Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") + (Ty.path "&") [ Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; Ty.path - "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" + "alloc::collections::btree::node::marker::Edge" + ] ] ] ] - ] - (Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ]) - ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply + (Ty.apply (Ty.path "alloc::collections::btree::node::Handle") [ Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ - BorrowType; + Ty.path "alloc::collections::btree::node::marker::Immut"; K; V; Ty.path "alloc::collections::btree::node::marker::Leaf" ]; Ty.path "alloc::collections::btree::node::marker::Edge" - ] - ], - "as_ref", - [] + ]) + ] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::navigate::LeafRange", - "back" - |) - ] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") [ - fun γ => - ltac:(M.monadic - (let b := M.copy (| γ |) in - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ] + ], + "as_ref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::navigate::LeafRange", + "back" + |) + ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let b := M.copy (| γ |) in + M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; Ty.path - "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path - "alloc::collections::btree::node::marker::Edge" - ], - "reborrow", - [] - |), - [ M.read (| b |) ] - |))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |)) - ])) + "alloc::collections::btree::node::marker::Edge" + ], + "reborrow", + [] + |), + [ M.read (| b |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -621,7 +647,7 @@ Module collections. Definition perform_next_checked (BorrowType K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with @@ -631,7 +657,7 @@ Module collections. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -651,7 +677,9 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -777,8 +805,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -919,46 +947,58 @@ Module collections. "call", [] |), - [ f; Value.Tuple [ kv ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value kv ] + |) + ] |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "next_leaf_edge", - [] - |), - [ M.read (| kv |) ] - |); - Value.StructTuple - "core::option::Option::Some" - [ M.read (| result |) ] - ] - |) - |))) - ] - |) + "alloc::collections::btree::node::marker::KV" + ], + "next_leaf_edge", + [] + |), + [ M.read (| kv |) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| result |)) ] + |)) + ] + |) + |) + |))) + ] + |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -994,7 +1034,7 @@ Module collections. Definition perform_next_back_checked (BorrowType K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with @@ -1004,7 +1044,7 @@ Module collections. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1024,7 +1064,9 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1150,8 +1192,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1292,46 +1334,58 @@ Module collections. "call", [] |), - [ f; Value.Tuple [ kv ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value kv ] + |) + ] |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "next_back_leaf_edge", - [] - |), - [ M.read (| kv |) ] - |); - Value.StructTuple - "core::option::Option::Some" - [ M.read (| result |) ] - ] + "alloc::collections::btree::node::marker::KV" + ], + "next_back_leaf_edge", + [] + |), + [ M.read (| kv |) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| result |)) ] + |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -1360,7 +1414,7 @@ Module collections. self.perform_next_checked(|kv| kv.into_kv()) } *) - Definition next_checked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_checked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -1403,8 +1457,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1439,7 +1493,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1454,7 +1509,7 @@ Module collections. self.perform_next_back_checked(|kv| kv.into_kv()) } *) - Definition next_back_checked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_checked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -1497,8 +1552,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1533,7 +1588,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1555,7 +1611,7 @@ Module collections. self.perform_next_checked(|kv| unsafe { ptr::read(kv) }.into_kv_valmut()) } *) - Definition next_checked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_checked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -1598,8 +1654,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1660,7 +1716,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1675,7 +1732,7 @@ Module collections. self.perform_next_back_checked(|kv| unsafe { ptr::read(kv) }.into_kv_valmut()) } *) - Definition next_back_checked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_checked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -1718,8 +1775,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1780,7 +1837,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1853,7 +1911,7 @@ Module collections. } } *) - Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -1874,9 +1932,11 @@ Module collections. |) in let root := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::navigate::LazyLeafHandle::Root" - [ M.read (| M.read (| root |) |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::LazyLeafHandle::Root" + [ A.to_value (M.read (| M.read (| root |) |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -1889,9 +1949,11 @@ Module collections. |) in let edge := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::navigate::LazyLeafHandle::Edge" - [ M.read (| M.read (| edge |) |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::LazyLeafHandle::Edge" + [ A.to_value (M.read (| M.read (| edge |) |)) ] + |) |))) ] |) @@ -1922,7 +1984,7 @@ Module collections. } } *) - Definition reborrow (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reborrow (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -1943,26 +2005,29 @@ Module collections. |) in let root := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::navigate::LazyLeafHandle::Root" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - BorrowType; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "reborrow", - [] - |), - [ M.read (| root |) ] - |) - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::LazyLeafHandle::Root" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "reborrow", + [] + |), + [ M.read (| root |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1975,30 +2040,34 @@ Module collections. |) in let edge := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::navigate::LazyLeafHandle::Edge" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::LazyLeafHandle::Edge" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ], - "reborrow", - [] - |), - [ M.read (| edge |) ] - |) - ] + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ], + "reborrow", + [] + |), + [ M.read (| edge |) ] + |)) + ] + |) |))) ] |) @@ -2045,17 +2114,23 @@ Module collections. LazyLeafRange { front: None, back: None } } *) - Definition default (B K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (B K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::navigate::LazyLeafRange" - [ - ("front", Value.StructTuple "core::option::Option::None" []); - ("back", Value.StructTuple "core::option::Option::None" []) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LazyLeafRange" + [ + ("front", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("back", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -2079,62 +2154,66 @@ Module collections. LazyLeafRange { front: self.front.clone(), back: self.back.clone() } } *) - Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::navigate::LazyLeafRange" - [ - ("front", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::option::Option") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LazyLeafRange" + [ + ("front", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ] - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::navigate::LazyLeafRange", - "front" - |) - ] - |)); - ("back", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::option::Option") + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ] + ], + [], + "clone", + [] + |), [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::navigate::LazyLeafRange", + "front" + |) + ] + |))); + ("back", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ] - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::navigate::LazyLeafRange", - "back" - |) - ] - |)) - ])) + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ] + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::navigate::LazyLeafRange", + "back" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -2158,17 +2237,23 @@ Module collections. LazyLeafRange { front: None, back: None } } *) - Definition none (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition none (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::navigate::LazyLeafRange" - [ - ("front", Value.StructTuple "core::option::Option::None" []); - ("back", Value.StructTuple "core::option::Option::None" []) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LazyLeafRange" + [ + ("front", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("back", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -2184,190 +2269,202 @@ Module collections. } } *) - Definition reborrow (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reborrow (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::navigate::LazyLeafRange" - [ - ("front", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LazyLeafRange" + [ + ("front", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "&") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ BorrowType; K; V ] - ] - ], - "map", - [ - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ]; - Ty.function + (Ty.path "&") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafHandle") + [ BorrowType; K; V ] + ] + ], + "map", [ - Ty.tuple + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ]; + Ty.function [ - Ty.apply - (Ty.path "&") + Ty.tuple [ Ty.apply - (Ty.path - "alloc::collections::btree::navigate::LazyLeafHandle") - [ BorrowType; K; V ] + (Ty.path "&") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafHandle") + [ BorrowType; K; V ] + ] ] ] - ] - (Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ]) - ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply + (Ty.apply (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ BorrowType; K; V ] - ], - "as_ref", - [] + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V + ]) + ] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::navigate::LazyLeafRange", - "front" - |) - ] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") [ - fun γ => - ltac:(M.monadic - (let f := M.copy (| γ |) in - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::navigate::LazyLeafHandle") - [ BorrowType; K; V ], - "reborrow", - [] - |), - [ M.read (| f |) ] - |))) - ] + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafHandle") + [ BorrowType; K; V ] + ], + "as_ref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::navigate::LazyLeafRange", + "front" |) - | _ => M.impossible (||) - end)) - ] - |)); - ("back", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ + ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let f := M.copy (| γ |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafHandle") + [ BorrowType; K; V ], + "reborrow", + [] + |), + [ M.read (| f |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |))); + ("back", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "&") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ BorrowType; K; V ] - ] - ], - "map", - [ - Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ]; - Ty.function + (Ty.path "&") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafHandle") + [ BorrowType; K; V ] + ] + ], + "map", [ - Ty.tuple + Ty.apply + (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ]; + Ty.function [ - Ty.apply - (Ty.path "&") + Ty.tuple [ Ty.apply - (Ty.path - "alloc::collections::btree::navigate::LazyLeafHandle") - [ BorrowType; K; V ] + (Ty.path "&") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafHandle") + [ BorrowType; K; V ] + ] ] ] - ] - (Ty.apply - (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V ]) - ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply + (Ty.apply (Ty.path "alloc::collections::btree::navigate::LazyLeafHandle") - [ BorrowType; K; V ] - ], - "as_ref", - [] + [ Ty.path "alloc::collections::btree::node::marker::Immut"; K; V + ]) + ] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::navigate::LazyLeafRange", - "back" - |) - ] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") [ - fun γ => - ltac:(M.monadic - (let b := M.copy (| γ |) in - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::navigate::LazyLeafHandle") - [ BorrowType; K; V ], - "reborrow", - [] - |), - [ M.read (| b |) ] - |))) - ] + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafHandle") + [ BorrowType; K; V ] + ], + "as_ref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::navigate::LazyLeafRange", + "back" |) - | _ => M.impossible (||) - end)) - ] - |)) - ])) + ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let b := M.copy (| γ |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::navigate::LazyLeafHandle") + [ BorrowType; K; V ], + "reborrow", + [] + |), + [ M.read (| b |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -2389,7 +2486,7 @@ Module collections. } } *) - Definition init_front (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition init_front (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -2398,7 +2495,7 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2431,52 +2528,59 @@ Module collections. "alloc::collections::btree::navigate::LazyLeafRange", "front" |), - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "alloc::collections::btree::navigate::LazyLeafHandle::Edge" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - BorrowType; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "first_leaf_edge", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::read", - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - BorrowType; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ] - |), - [ M.read (| root |) ] - |) - ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::LazyLeafHandle::Edge" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "first_leaf_edge", + [] + |), + [ + M.call_closure (| + M.get_function (| + "core::ptr::read", + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ] + ] + |), + [ M.read (| root |) ] + |) + ] + |)) + ] + |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -2491,7 +2595,9 @@ Module collections. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in @@ -2509,7 +2615,11 @@ Module collections. |) in let edge := M.alloc (| γ2_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| edge |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| edge |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -2559,7 +2669,7 @@ Module collections. } } *) - Definition init_back (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition init_back (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -2568,7 +2678,7 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2601,52 +2711,59 @@ Module collections. "alloc::collections::btree::navigate::LazyLeafRange", "back" |), - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "alloc::collections::btree::navigate::LazyLeafHandle::Edge" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - BorrowType; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "last_leaf_edge", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::read", - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - BorrowType; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ] - ] - |), - [ M.read (| root |) ] - |) - ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::LazyLeafHandle::Edge" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "last_leaf_edge", + [] + |), + [ + M.call_closure (| + M.get_function (| + "core::ptr::read", + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ] + ] + |), + [ M.read (| root |) ] + |) + ] + |)) + ] + |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -2661,7 +2778,9 @@ Module collections. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in @@ -2679,7 +2798,11 @@ Module collections. |) in let edge := M.alloc (| γ2_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| edge |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| edge |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -2726,7 +2849,7 @@ Module collections. unsafe { self.init_front().unwrap().next_unchecked() } } *) - Definition next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -2804,7 +2927,7 @@ Module collections. unsafe { self.init_back().unwrap().next_back_unchecked() } } *) - Definition next_back_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -2889,7 +3012,7 @@ Module collections. unsafe { self.init_front().unwrap().next_unchecked() } } *) - Definition next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -2967,7 +3090,7 @@ Module collections. unsafe { self.init_back().unwrap().next_back_unchecked() } } *) - Definition next_back_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -3057,7 +3180,7 @@ Module collections. } } *) - Definition take_front (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_front (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -3188,26 +3311,30 @@ Module collections. |) in let root := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Dying"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "first_leaf_edge", - [] - |), - [ M.read (| root |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Dying"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "first_leaf_edge", + [] + |), + [ M.read (| root |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3219,7 +3346,11 @@ Module collections. |) in let edge := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| edge |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| edge |)) ] + |) |))) ] |) @@ -3242,11 +3373,7 @@ Module collections. unsafe { front.deallocating_next_unchecked(alloc) } } *) - Definition deallocating_next_unchecked - (K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition deallocating_next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -3256,24 +3383,24 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -3298,7 +3425,8 @@ Module collections. "front" |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3311,17 +3439,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.front.is_some()" + M.of_value (| + Value.String + "assertion failed: self.front.is_some()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let front := @@ -3412,7 +3544,7 @@ Module collections. Definition deallocating_next_back_unchecked (K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with @@ -3423,24 +3555,24 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -3465,7 +3597,8 @@ Module collections. "back" |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3478,17 +3611,20 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.back.is_some()" + M.of_value (| + Value.String "assertion failed: self.back.is_some()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let back := @@ -3573,7 +3709,7 @@ Module collections. } } *) - Definition deallocating_end (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deallocating_end (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -3582,7 +3718,7 @@ Module collections. let alloc := M.alloc (| alloc |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3629,7 +3765,7 @@ Module collections. [ M.read (| front |); M.read (| alloc |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3688,7 +3824,7 @@ Module collections. Definition find_leaf_edges_spanning_range (BorrowType K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with @@ -3830,57 +3966,61 @@ Module collections. ltac:(M.monadic (M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::Edge" - ], - "force", - [] - |), - [ M.read (| lower_edge |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ + "alloc::collections::btree::node::marker::Edge" + ], + "force", + [] + |), + [ M.read (| lower_edge |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ - BorrowType; - K; - V; + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::Edge" - ], - "force", - [] - |), - [ M.read (| upper_edge |) ] - |) - ] + "alloc::collections::btree::node::marker::Edge" + ], + "force", + [] + |), + [ M.read (| upper_edge |) ] + |)) + ] + |) |), [ fun γ => @@ -3906,18 +4046,26 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::collections::btree::navigate::LeafRange" - [ - ("front", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| f |) ]); - ("back", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| b |) ]) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LeafRange" + [ + ("front", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| f |)) ] + |))); + ("back", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| b |)) ] + |))) + ] + |) |) |) |) @@ -4007,7 +4155,9 @@ Module collections. lower_child_bound, M.read (| lhs |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -4076,10 +4226,12 @@ Module collections. upper_child_bound, M.read (| lhs |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4098,19 +4250,25 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "internal error: entered unreachable code: BTreeMap has different depths" - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: BTreeMap has different depths" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -4119,7 +4277,8 @@ Module collections. |), [] |) - |)) + |) + |) ] |) ] @@ -4156,7 +4315,7 @@ Module collections. } } *) - Definition first_leaf_edge (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition first_leaf_edge (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -4307,7 +4466,7 @@ Module collections. } } *) - Definition last_leaf_edge (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last_leaf_edge (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -4468,7 +4627,7 @@ Module collections. } } *) - Definition lower_bound (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lower_bound (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [ Q ], [ self; bound ] => @@ -4590,7 +4749,7 @@ Module collections. |) in let _ := M.write (| bound, M.read (| new_bound |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -4630,7 +4789,7 @@ Module collections. } } *) - Definition upper_bound (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition upper_bound (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [ Q ], [ self; bound ] => @@ -4752,7 +4911,7 @@ Module collections. |) in let _ := M.write (| bound, M.read (| new_bound |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -4782,32 +4941,46 @@ Module collections. } } *) - Definition full_range (τ : list Ty.t) (α : list Value.t) : M := + Definition full_range (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ BorrowType; K; V ], [ root1; root2 ] => ltac:(M.monadic (let root1 := M.alloc (| root1 |) in let root2 := M.alloc (| root2 |) in - Value.StructRecord - "alloc::collections::btree::navigate::LazyLeafRange" - [ - ("front", - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "alloc::collections::btree::navigate::LazyLeafHandle::Root" - [ M.read (| root1 |) ] - ]); - ("back", - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "alloc::collections::btree::navigate::LazyLeafHandle::Root" - [ M.read (| root2 |) ] - ]) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::navigate::LazyLeafRange" + [ + ("front", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::LazyLeafHandle::Root" + [ A.to_value (M.read (| root1 |)) ] + |)) + ] + |))); + ("back", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::LazyLeafHandle::Root" + [ A.to_value (M.read (| root2 |)) ] + |)) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4833,7 +5006,7 @@ Module collections. unsafe { self.find_leaf_edges_spanning_range(range) } } *) - Definition range_search (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition range_search (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ Q; R ], [ self; range ] => @@ -4867,7 +5040,7 @@ Module collections. full_range(self, self) } *) - Definition full_range (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition full_range (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -4918,7 +5091,7 @@ Module collections. } } *) - Definition visit_nodes_in_order (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition visit_nodes_in_order (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ F ], [ self; visit ] => @@ -4979,12 +5152,17 @@ Module collections. |), [ visit; - Value.Tuple - [ - Value.StructTuple - "alloc::collections::btree::navigate::Position::Leaf" - [ M.read (| leaf |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::Position::Leaf" + [ A.to_value (M.read (| leaf |)) ] + |)) + ] + |) ] |) |))); @@ -5022,12 +5200,17 @@ Module collections. |), [ visit; - Value.Tuple - [ - Value.StructTuple - "alloc::collections::btree::navigate::Position::Internal" - [ M.read (| internal |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::Position::Internal" + [ A.to_value (M.read (| internal |)) ] + |)) + ] + |) ] |) |) in @@ -5139,12 +5322,20 @@ Module collections. |), [ visit; - Value.Tuple - [ - Value.StructTuple - "alloc::collections::btree::navigate::Position::Leaf" - [ M.read (| leaf |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::Position::Leaf" + [ + A.to_value + (M.read (| leaf |)) + ] + |)) + ] + |) ] |) |) in @@ -5211,12 +5402,20 @@ Module collections. |), [ visit; - Value.Tuple - [ - Value.StructTuple - "alloc::collections::btree::navigate::Position::InternalKV" - [ M.read (| kv |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::Position::InternalKV" + [ + A.to_value + (M.read (| kv |)) + ] + |)) + ] + |) ] |) |) in @@ -5258,7 +5457,9 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Tuple [] |) + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) |) |) |))) @@ -5298,12 +5499,20 @@ Module collections. |), [ visit; - Value.Tuple - [ - Value.StructTuple - "alloc::collections::btree::navigate::Position::Internal" - [ M.read (| internal |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::navigate::Position::Internal" + [ + A.to_value + (M.read (| internal |)) + ] + |)) + ] + |) ] |) |) in @@ -5357,14 +5566,14 @@ Module collections. result } *) - Definition calc_length (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition calc_length (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := M.alloc (| Value.Integer Integer.Usize 0 |) in + let result := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.alloc (| M.call_closure (| @@ -5394,8 +5603,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5422,6 +5631,7 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -5456,6 +5666,7 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -5485,14 +5696,15 @@ Module collections. "alloc::collections::btree::navigate::Position::InternalKV", 0 |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -5527,7 +5739,7 @@ Module collections. unsafe { self.find_leaf_edges_spanning_range(range) } } *) - Definition range_search (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition range_search (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ Q; R ], [ self; range ] => @@ -5564,7 +5776,7 @@ Module collections. full_range(self, self2) } *) - Definition full_range (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition full_range (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -5627,7 +5839,7 @@ Module collections. full_range(self, self2) } *) - Definition full_range (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition full_range (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -5701,7 +5913,7 @@ Module collections. } } *) - Definition next_kv (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_kv (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -5780,9 +5992,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ M.read (| kv |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| kv |)) ] + |) |) |) |) @@ -5890,9 +6104,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ M.read (| root |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| root |)) ] + |) |) |) |) @@ -5935,7 +6151,7 @@ Module collections. } } *) - Definition next_back_kv (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_kv (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -6014,9 +6230,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ M.read (| kv |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| kv |)) ] + |) |) |) |) @@ -6124,9 +6342,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ M.read (| root |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| root |)) ] + |) |) |) |) @@ -6181,7 +6401,7 @@ Module collections. } } *) - Definition next_kv (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_kv (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -6238,9 +6458,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ M.read (| internal_kv |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| internal_kv |)) ] + |) |) |) |) @@ -6323,9 +6545,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ M.read (| root |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| root |)) ] + |) |) |) |) @@ -6386,7 +6610,7 @@ Module collections. } } *) - Definition deallocating_next (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deallocating_next (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -6467,66 +6691,72 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Dying"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ], + "next_leaf_edge", + [] + |), [ - Ty.path - "alloc::collections::btree::node::marker::Dying"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "next_leaf_edge", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::read", - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") + M.call_closure (| + M.get_function (| + "core::ptr::read", [ - Ty.path - "alloc::collections::btree::node::marker::Dying"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ] - ] - |), - [ kv ] - |) - ] - |); - M.read (| kv |) - ] - ] + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Dying"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ] + ] + |), + [ kv ] + |) + ] + |)); + A.to_value (M.read (| kv |)) + ] + |)) + ] + |) |) |) |) @@ -6640,9 +6870,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -6686,7 +6918,7 @@ Module collections. } } *) - Definition deallocating_next_back (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deallocating_next_back (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -6767,66 +6999,72 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Dying"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ], + "next_back_leaf_edge", + [] + |), [ - Ty.path - "alloc::collections::btree::node::marker::Dying"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "next_back_leaf_edge", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::read", - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") + M.call_closure (| + M.get_function (| + "core::ptr::read", [ - Ty.path - "alloc::collections::btree::node::marker::Dying"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ] - ] - |), - [ kv ] - |) - ] - |); - M.read (| kv |) - ] - ] + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Dying"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ] + ] + |), + [ kv ] + |) + ] + |)); + A.to_value (M.read (| kv |)) + ] + |)) + ] + |) |) |) |) @@ -6940,9 +7178,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -6976,7 +7216,7 @@ Module collections. } } *) - Definition deallocating_end (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deallocating_end (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -7010,7 +7250,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7099,7 +7339,7 @@ Module collections. [ M.read (| parent_edge |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7107,7 +7347,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7131,11 +7371,7 @@ Module collections. }) } *) - Definition deallocating_next_unchecked - (K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition deallocating_next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -7224,8 +7460,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7310,7 +7546,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7336,7 +7573,7 @@ Module collections. Definition deallocating_next_back_unchecked (K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with @@ -7426,8 +7663,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7512,7 +7749,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7550,7 +7788,7 @@ Module collections. }) } *) - Definition next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -7614,8 +7852,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7726,63 +7964,70 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "next_leaf_edge", - [] - |), - [ M.read (| kv |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + "alloc::collections::btree::node::marker::KV" + ], + "next_leaf_edge", + [] + |), + [ M.read (| kv |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Immut"; - K; - V; + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "into_kv", - [] - |), - [ M.read (| kv |) ] - |) - ] + "alloc::collections::btree::node::marker::KV" + ], + "into_kv", + [] + |), + [ M.read (| kv |) ] + |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7800,7 +8045,7 @@ Module collections. }) } *) - Definition next_back_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -7864,8 +8109,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7976,63 +8221,70 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "next_back_leaf_edge", - [] - |), - [ M.read (| kv |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + "alloc::collections::btree::node::marker::KV" + ], + "next_back_leaf_edge", + [] + |), + [ M.read (| kv |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Immut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "into_kv", - [] - |), - [ M.read (| kv |) ] - |) - ] + "alloc::collections::btree::node::marker::KV" + ], + "into_kv", + [] + |), + [ M.read (| kv |) ] + |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8069,7 +8321,7 @@ Module collections. kv.into_kv_valmut() } *) - Definition next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -8161,8 +8413,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -8273,68 +8525,72 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::ValMut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::ValMut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "next_leaf_edge", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::read", - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") + "alloc::collections::btree::node::marker::KV" + ], + "next_leaf_edge", + [] + |), + [ + M.call_closure (| + M.get_function (| + "core::ptr::read", [ Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::ValMut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::ValMut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" + "alloc::collections::btree::node::marker::KV" + ] ] - ] - |), - [ kv ] - |) - ] - |); - M.read (| kv |) - ] + |), + [ kv ] + |) + ] + |)); + A.to_value (M.read (| kv |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -8378,7 +8634,7 @@ Module collections. kv.into_kv_valmut() } *) - Definition next_back_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -8470,8 +8726,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -8582,68 +8838,72 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::ValMut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::ValMut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "next_back_leaf_edge", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::read", - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") + "alloc::collections::btree::node::marker::KV" + ], + "next_back_leaf_edge", + [] + |), + [ + M.call_closure (| + M.get_function (| + "core::ptr::read", [ Ty.apply (Ty.path - "alloc::collections::btree::node::NodeRef") + "alloc::collections::btree::node::Handle") [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::ValMut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; Ty.path - "alloc::collections::btree::node::marker::ValMut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" + "alloc::collections::btree::node::marker::KV" + ] ] - ] - |), - [ kv ] - |) - ] - |); - M.read (| kv |) - ] + |), + [ kv ] + |) + ] + |)); + A.to_value (M.read (| kv |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -8766,7 +9026,7 @@ Module collections. } } *) - Definition next_leaf_edge (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_leaf_edge (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -8925,11 +9185,7 @@ Module collections. } } *) - Definition next_back_leaf_edge - (BorrowType K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition next_back_leaf_edge (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/alloc/collections/btree/node.v b/CoqOfRust/alloc/collections/btree/node.v index b258bdbc3..c2b71506d 100644 --- a/CoqOfRust/alloc/collections/btree/node.v +++ b/CoqOfRust/alloc/collections/btree/node.v @@ -4,53 +4,58 @@ Require Import CoqOfRust.CoqOfRust. Module collections. Module btree. Module node. - Definition value_B : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 6 |))). + Definition value_B : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 6 |) |))). - Definition value_CAPACITY : Value.t := + Definition value_CAPACITY : A.t := M.run ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.read (| M.get_constant (| "alloc::collections::btree::node::B" |) |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))). - Definition value_MIN_LEN_AFTER_SPLIT : Value.t := + Definition value_MIN_LEN_AFTER_SPLIT : A.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 Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))). - Definition value_KV_IDX_CENTER : Value.t := + Definition value_KV_IDX_CENTER : A.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 Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))). - Definition value_EDGE_IDX_LEFT_OF_CENTER : Value.t := + Definition value_EDGE_IDX_LEFT_OF_CENTER : A.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 Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))). - Definition value_EDGE_IDX_RIGHT_OF_CENTER : Value.t := + Definition value_EDGE_IDX_RIGHT_OF_CENTER : A.t := M.run ltac:(M.monadic (M.get_constant (| "alloc::collections::btree::node::B" |))). (* StructRecord @@ -97,7 +102,7 @@ Module collections. } } *) - Definition init (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition init (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ this ] => @@ -132,7 +137,7 @@ Module collections. "alloc::collections::btree::node::LeafNode", "parent" |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) ] |) |) in @@ -150,11 +155,11 @@ Module collections. "alloc::collections::btree::node::LeafNode", "len" |); - Value.Integer Integer.U16 0 + M.of_value (| Value.Integer 0 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -172,7 +177,7 @@ Module collections. } } *) - Definition new (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ alloc ] => @@ -288,7 +293,7 @@ Module collections. } } *) - Definition new (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ alloc ] => @@ -434,7 +439,7 @@ Module collections. *self } *) - Definition clone (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => @@ -557,7 +562,7 @@ Module collections. Self::from_new_leaf(LeafNode::new(alloc)) } *) - Definition new_leaf (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_leaf (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ alloc ] => @@ -599,56 +604,64 @@ Module collections. NodeRef { height: 0, node: NonNull::from(Box::leak(leaf)), _marker: PhantomData } } *) - Definition from_new_leaf (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_new_leaf (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ leaf ] => ltac:(M.monadic (let leaf := M.alloc (| leaf |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", Value.Integer Integer.Usize 0); - ("node", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::collections::btree::node::LeafNode") [ K; V ] - ], - [ - Ty.apply - (Ty.path "&mut") - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::LeafNode") - [ K; V ] - ] - ], - "from", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", A.to_value (M.of_value (| Value.Integer 0 |))); + ("node", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", Ty.apply - (Ty.path "alloc::boxed::Box") + (Ty.path "core::ptr::non_null::NonNull") [ Ty.apply (Ty.path "alloc::collections::btree::node::LeafNode") - [ K; V ]; - A + [ K; V ] ], - "leak", + [ + Ty.apply + (Ty.path "&mut") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::LeafNode") + [ K; V ] + ] + ], + "from", [] |), - [ M.read (| leaf |) ] - |) - ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::LeafNode") + [ K; V ]; + A + ], + "leak", + [] + |), + [ M.read (| leaf |) ] + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -675,7 +688,7 @@ Module collections. unsafe { NodeRef::from_new_internal(new_node, child.height + 1) } } *) - Definition new_internal (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_internal (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ child; alloc ] => @@ -719,7 +732,7 @@ Module collections. "alloc::collections::btree::node::InternalNode", "edges" |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |); M.read (| M.SubPointer.get_struct_record_field (| @@ -748,6 +761,7 @@ Module collections. [ M.read (| new_node |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| child, @@ -755,7 +769,7 @@ Module collections. "height" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -780,7 +794,7 @@ Module collections. this } *) - Definition from_new_internal (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_new_internal (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ internal; height ] => @@ -790,26 +804,28 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| height |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| height |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -820,16 +836,22 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: height > 0" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: height > 0" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let node := @@ -892,13 +914,17 @@ Module collections. |) in let this := M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", M.read (| height |)); - ("node", M.read (| node |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", A.to_value (M.read (| height |))); + ("node", A.to_value (M.read (| node |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) in let _ := M.alloc (| @@ -958,7 +984,7 @@ Module collections. NodeRef { height, node: node.cast(), _marker: PhantomData } } *) - Definition from_internal (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_internal (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ node; height ] => @@ -968,26 +994,28 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| height |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| height |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -998,44 +1026,55 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: height > 0" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: height > 0" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", M.read (| height |)); - ("node", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", A.to_value (M.read (| height |))); + ("node", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::InternalNode") - [ K; V ] - ], - "cast", - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::LeafNode") - [ K; V ] - ] - |), - [ M.read (| node |) ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + (Ty.path "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::InternalNode") + [ K; V ] + ], + "cast", + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::LeafNode") + [ K; V ] + ] + |), + [ M.read (| node |) ] + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -1053,14 +1092,14 @@ Module collections. this.node.as_ptr() as *mut InternalNode } *) - Definition as_internal_ptr (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_internal_ptr (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -1077,7 +1116,8 @@ Module collections. |) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1092,33 +1132,39 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition forget_type (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition forget_type (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -1145,7 +1191,7 @@ Module collections. unsafe { &mut *ptr } } *) - Definition as_internal_mut (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_internal_mut (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -1189,7 +1235,7 @@ Module collections. unsafe { self.as_internal_mut().edges.as_mut_slice().get_unchecked_mut(index) } } *) - Definition edge_area_mut (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition edge_area_mut (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ _ as I; Output ], [ self; index ] => @@ -1276,11 +1322,7 @@ Module collections. } } *) - Definition correct_childrens_parent_links - (K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition correct_childrens_parent_links (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ R ], [ self; range ] => @@ -1339,11 +1381,15 @@ Module collections. let i := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1351,17 +1397,17 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| i |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| i |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1378,7 +1424,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1394,8 +1442,10 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: i <= self.len()" + M.of_value (| + Value.String + "assertion failed: i <= self.len()" + |) |) ] |) @@ -1403,12 +1453,15 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1485,10 +1538,10 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -1512,7 +1565,7 @@ Module collections. Definition correct_all_childrens_parent_links (K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with @@ -1564,12 +1617,12 @@ Module collections. "new", [] |), - [ Value.Integer Integer.Usize 0; M.read (| len |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| len |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1596,7 +1649,7 @@ Module collections. } } *) - Definition push (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; key; val; edge ] => @@ -1608,23 +1661,24 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| edge, "alloc::collections::btree::node::NodeRef", "height" |) - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1632,8 +1686,10 @@ Module collections. "height" |) |), - Value.Integer Integer.Usize 1 - |))) + M.of_value (| Value.Integer 1 |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1643,13 +1699,16 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: edge.height == self.height - 1" + M.of_value (| + Value.String + "assertion failed: edge.height == self.height - 1" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := @@ -1685,21 +1744,23 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| idx |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| idx |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1707,18 +1768,26 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: idx < CAPACITY" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: idx < CAPACITY" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := M.read (| len |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U16 1 |) + BinOp.Panic.add (| + Integer.U16, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.alloc (| @@ -1829,7 +1898,11 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.add (| M.read (| idx |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| idx |), + M.of_value (| Value.Integer 1 |) + |) ] |); M.read (| @@ -1897,13 +1970,17 @@ Module collections. |), [ M.read (| self |) ] |); - BinOp.Panic.add (| M.read (| idx |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| idx |), + M.of_value (| Value.Integer 1 |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1924,7 +2001,7 @@ Module collections. unsafe { usize::from(( *Self::as_leaf_ptr(self)).len) } } *) - Definition len (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self ] => @@ -1969,7 +2046,7 @@ Module collections. self.height } *) - Definition height (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition height (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self ] => @@ -1994,33 +2071,39 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition reborrow (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reborrow (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -2039,11 +2122,7 @@ Module collections. this.node.as_ptr() } *) - Definition as_leaf_ptr - (BorrowType K V Type_ : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition as_leaf_ptr (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ this ] => @@ -2097,7 +2176,7 @@ Module collections. .ok_or(self) } *) - Definition ascend (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ascend (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self ] => @@ -2109,8 +2188,8 @@ Module collections. let leaf_ptr := M.alloc (| (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -2119,7 +2198,8 @@ Module collections. [] |), [ self ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -2239,8 +2319,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2250,77 +2330,88 @@ Module collections. fun γ => ltac:(M.monadic (let parent := M.copy (| γ |) in - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - BorrowType; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Internal" - ], - "from_internal", - [] - |), - [ - M.read (| M.read (| parent |) |); - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "height" - |) - |), - Value.Integer Integer.Usize 1 - |) - ] - |)); - ("idx", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "usize", - [ Ty.path "u16" ], - "from", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u16" ], - "assume_init", + "alloc::collections::btree::node::NodeRef") + [ + BorrowType; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Internal" + ], + "from_internal", [] |), [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| leaf_ptr |), - "alloc::collections::btree::node::LeafNode", - "parent_idx" - |) + M.read (| M.read (| parent |) |); + BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "height" + |) + |), + M.of_value (| Value.Integer 1 |) |) ] - |) - ] - |)); - ("_marker", - Value.StructTuple "core::marker::PhantomData" []) - ])) - ] - |) - | _ => M.impossible (||) - end)) + |))); + ("idx", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "usize", + [ Ty.path "u16" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u16" ], + "assume_init", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| leaf_ptr |), + "alloc::collections::btree::node::LeafNode", + "parent_idx" + |) + |) + ] + |) + ] + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple + "core::marker::PhantomData" + [] + |))) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) ] |); M.read (| self |) @@ -2340,11 +2431,7 @@ Module collections. unsafe { Handle::new_edge(self, 0) } } *) - Definition first_edge - (BorrowType K V Type_ : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition first_edge (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self ] => @@ -2363,7 +2450,7 @@ Module collections. "new_edge", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0 ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |) ] |))) | _, _ => M.impossible end. @@ -2381,7 +2468,7 @@ Module collections. unsafe { Handle::new_edge(self, len) } } *) - Definition last_edge (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last_edge (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self ] => @@ -2436,7 +2523,7 @@ Module collections. unsafe { Handle::new_kv(self, 0) } } *) - Definition first_kv (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition first_kv (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self ] => @@ -2458,15 +2545,19 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt (M.read (| len |)) (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2474,11 +2565,15 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: len > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: len > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2495,7 +2590,7 @@ Module collections. "new_kv", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0 ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |) ] |) |) |))) @@ -2516,7 +2611,7 @@ Module collections. unsafe { Handle::new_kv(self, len - 1) } } *) - Definition last_kv (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last_kv (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self ] => @@ -2538,15 +2633,19 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt (M.read (| len |)) (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2554,11 +2653,15 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: len > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: len > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2577,7 +2680,11 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) ] |) |) @@ -2602,7 +2709,7 @@ Module collections. } } *) - Definition eq (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self; other ] => @@ -2638,7 +2745,7 @@ Module collections. let height := M.alloc (| γ1_1 |) in let _marker := M.alloc (| γ1_2 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2686,11 +2793,13 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2699,15 +2808,18 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.read (| height |); - M.SubPointer.get_struct_record_field (| - M.read (| other |), - "alloc::collections::btree::node::NodeRef", - "height" - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| height |)); + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| other |), + "alloc::collections::btree::node::NodeRef", + "height" + |)) + ] + |) |), [ fun γ => @@ -2719,21 +2831,23 @@ Module collections. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2745,9 +2859,11 @@ Module collections. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -2762,9 +2878,11 @@ Module collections. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -2773,17 +2891,22 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |))) ] @@ -2812,7 +2935,7 @@ Module collections. unsafe { &*ptr } } *) - Definition into_leaf (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_leaf (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => @@ -2849,7 +2972,7 @@ Module collections. } } *) - Definition keys (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition keys (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => @@ -2887,35 +3010,39 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "keys" - |)); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "usize", - [ Ty.path "u16" ], - "from", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| leaf |), - "alloc::collections::btree::node::LeafNode", - "len" - |) - |) - ] - |)) - ] + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "usize", + [ Ty.path "u16" ], + "from", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| leaf |), + "alloc::collections::btree::node::LeafNode", + "len" + |) + |) + ] + |))) + ] + |) ] |) ] @@ -2962,7 +3089,7 @@ Module collections. ret } *) - Definition deallocate_and_ascend (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deallocate_and_ascend (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -3060,16 +3187,17 @@ Module collections. |); M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| height |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| height |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3113,7 +3241,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in ret |))) | _, _ => M.impossible @@ -3135,33 +3263,39 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition reborrow_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reborrow_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -3176,7 +3310,7 @@ Module collections. unsafe { &mut *ptr } } *) - Definition as_leaf_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_leaf_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => @@ -3212,7 +3346,7 @@ Module collections. unsafe { &mut *ptr } } *) - Definition into_leaf_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_leaf_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => @@ -3246,33 +3380,39 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition dormant (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dormant (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -3290,7 +3430,7 @@ Module collections. unsafe { self.as_leaf_mut().keys.as_mut_slice().get_unchecked_mut(index) } } *) - Definition key_area_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key_area_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [ _ as I; Output ], [ self; index ] => @@ -3353,7 +3493,7 @@ Module collections. unsafe { self.as_leaf_mut().vals.as_mut_slice().get_unchecked_mut(index) } } *) - Definition val_area_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition val_area_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [ _ as I; Output ], [ self; index ] => @@ -3409,7 +3549,7 @@ Module collections. &mut self.as_leaf_mut().len } *) - Definition len_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => @@ -3448,33 +3588,39 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition awaken (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition awaken (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -3496,7 +3642,7 @@ Module collections. unsafe { &mut *ptr } } *) - Definition as_leaf_dying (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_leaf_dying (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => @@ -3550,7 +3696,7 @@ Module collections. (key, val) } *) - Definition into_key_val_mut_at (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_key_val_mut_at (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self; idx ] => @@ -3588,8 +3734,8 @@ 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 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 (| @@ -3644,7 +3790,11 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [ M.read (| key |); M.read (| val |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| key |)); A.to_value (M.read (| val |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -3677,7 +3827,7 @@ Module collections. unsafe { ( *leaf).parent_idx.write(parent_idx as u16) }; } *) - Definition set_parent_link (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition set_parent_link (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; parent; parent_idx ] => @@ -3711,7 +3861,11 @@ Module collections. "alloc::collections::btree::node::LeafNode", "parent" |), - Value.StructTuple "core::option::Option::Some" [ M.read (| parent |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| parent |)) ] + |) |) in let _ := M.alloc (| @@ -3727,11 +3881,11 @@ Module collections. "alloc::collections::btree::node::LeafNode", "parent_idx" |); - M.rust_cast (M.read (| parent_idx |)) + M.rust_cast (| M.read (| parent_idx |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3745,7 +3899,7 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition cast_to_leaf_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cast_to_leaf_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -3754,32 +3908,34 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::NodeRef", "height" |) - |)) - (Value.Integer Integer.Usize 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3792,41 +3948,50 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.height == 0" + M.of_value (| + Value.String "assertion failed: self.height == 0" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3842,7 +4007,7 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition cast_to_internal_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cast_to_internal_unchecked (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -3851,32 +4016,34 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::NodeRef", "height" |) - |)) - (Value.Integer Integer.Usize 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3889,41 +4056,50 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.height > 0" + M.of_value (| + Value.String "assertion failed: self.height > 0" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3957,7 +4133,7 @@ Module collections. } } *) - Definition choose_parent_kv (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition choose_parent_kv (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -4043,98 +4219,109 @@ Module collections. |) in let left_parent_kv := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructTuple - "alloc::collections::btree::node::LeftOrRight::Left" - [ - Value.StructRecord - "alloc::collections::btree::node::BalancingContext" - [ - ("parent", - M.call_closure (| - M.get_function (| - "core::ptr::read", - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Internal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ] - ] - |), - [ left_parent_kv ] - |)); - ("left_child", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::LeftOrRight::Left" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::BalancingContext" [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Internal" - ]; - Ty.path - "alloc::collections::btree::node::marker::Edge" - ], - "descend", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") + ("parent", + A.to_value + (M.call_closure (| + M.get_function (| + "core::ptr::read", + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Internal" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ] + ] + |), + [ left_parent_kv ] + |))); + ("left_child", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Internal" + ]; + Ty.path + "alloc::collections::btree::node::marker::Edge" + ], + "descend", + [] + |), [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Internal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "left_edge", - [] - |), - [ M.read (| left_parent_kv |) ] - |) - ] - |)); - ("right_child", M.read (| self |)) - ] - ] - ] + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Internal" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ], + "left_edge", + [] + |), + [ M.read (| left_parent_kv |) ] + |) + ] + |))); + ("right_child", + A.to_value (M.read (| self |))) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -4181,98 +4368,113 @@ Module collections. |) in let right_parent_kv := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructTuple - "alloc::collections::btree::node::LeftOrRight::Right" - [ - Value.StructRecord - "alloc::collections::btree::node::BalancingContext" - [ - ("parent", - M.call_closure (| - M.get_function (| - "core::ptr::read", - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Internal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ] - ] - |), - [ right_parent_kv ] - |)); - ("left_child", M.read (| self |)); - ("right_child", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::LeftOrRight::Right" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::BalancingContext" [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Internal" - ]; - Ty.path - "alloc::collections::btree::node::marker::Edge" - ], - "descend", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") + ("parent", + A.to_value + (M.call_closure (| + M.get_function (| + "core::ptr::read", + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Internal" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ] + ] + |), + [ right_parent_kv ] + |))); + ("left_child", + A.to_value (M.read (| self |))); + ("right_child", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Internal" + ]; + Ty.path + "alloc::collections::btree::node::marker::Edge" + ], + "descend", + [] + |), [ - Ty.path - "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::Internal" - ]; - Ty.path - "alloc::collections::btree::node::marker::KV" - ], - "right_edge", - [] - |), - [ M.read (| right_parent_kv |) ] - |) - ] - |)) - ] - ] - ] + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Internal" + ]; + Ty.path + "alloc::collections::btree::node::marker::KV" + ], + "right_edge", + [] + |), + [ + M.read (| + right_parent_kv + |) + ] + |) + ] + |))) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -4295,19 +4497,25 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "internal error: entered unreachable code: empty internal node" - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: empty internal node" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -4316,7 +4524,8 @@ Module collections. |), [] |) - |)) + |) + |) ] |) ] @@ -4337,7 +4546,11 @@ Module collections. |) in let root := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| root |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| root |)) ] + |) |))) ] |) @@ -4368,7 +4581,7 @@ Module collections. leaf.parent = None; } *) - Definition clear_parent_link (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clear_parent_link (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -4418,9 +4631,9 @@ Module collections. "alloc::collections::btree::node::LeafNode", "parent" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4433,7 +4646,7 @@ Module collections. NodeRef::new_leaf(alloc).forget_type() } *) - Definition new (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ alloc ] => @@ -4488,7 +4701,7 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition push_internal_level (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_internal_level (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -4537,8 +4750,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4587,32 +4800,39 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -4642,7 +4862,7 @@ Module collections. } } *) - Definition pop_internal_level (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_internal_level (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -4652,23 +4872,25 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::NodeRef", "height" |) - |)) - (Value.Integer Integer.Usize 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4676,11 +4898,17 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: self.height > 0" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: self.height > 0" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let top := @@ -4773,7 +5001,7 @@ Module collections. "alloc::collections::btree::node::InternalNode", "edges" |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) ] |) @@ -4787,7 +5015,11 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.alloc (| @@ -4842,7 +5074,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4864,33 +5096,39 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition borrow_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow_mut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -4903,33 +5141,39 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition borrow_valmut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow_valmut (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -4942,33 +5186,39 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition into_dying (K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_dying (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -5000,7 +5250,7 @@ Module collections. } } *) - Definition push (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; key; val ] => @@ -5042,21 +5292,23 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| idx |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| idx |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5064,18 +5316,26 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: idx < CAPACITY" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: idx < CAPACITY" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := M.read (| len |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U16 1 |) + BinOp.Panic.add (| + Integer.U16, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| M.read (| @@ -5163,33 +5423,39 @@ Module collections. NodeRef { height: self.height, node: self.node, _marker: PhantomData } } *) - Definition forget_type (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition forget_type (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -5227,7 +5493,7 @@ Module collections. } } *) - Definition force (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition force (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -5235,80 +5501,103 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::NodeRef", "height" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::node::ForceResult::Leaf'1" - [ - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::ForceResult::Leaf'1" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "alloc::collections::btree::node::ForceResult::Internal'1" - [ - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("height", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "height" - |) - |)); - ("node", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::NodeRef", - "node" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::ForceResult::Internal'1" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("height", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "height" + |) + |))); + ("node", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::NodeRef", + "node" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)) + ] + |) |))) ] |) @@ -5356,7 +5645,7 @@ Module collections. *self } *) - Definition clone (Node Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (Node Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Node Type_ in match τ, α with | [], [ self ] => @@ -5384,7 +5673,7 @@ Module collections. self.node } *) - Definition into_node (Node Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_node (Node Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Node Type_ in match τ, α with | [], [ self ] => @@ -5409,7 +5698,7 @@ Module collections. self.idx } *) - Definition idx (Node Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition idx (Node Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Node Type_ in match τ, α with | [], [ self ] => @@ -5448,7 +5737,7 @@ Module collections. Handle { node, idx, _marker: PhantomData } } *) - Definition new_kv (BorrowType K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_kv (BorrowType K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V NodeType in match τ, α with | [], [ node; idx ] => @@ -5458,26 +5747,26 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| idx |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| idx |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -5487,7 +5776,9 @@ Module collections. [] |), [ node ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5500,27 +5791,34 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: idx < node.len()" + M.of_value (| + Value.String "assertion failed: idx < node.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", M.read (| node |)); - ("idx", M.read (| idx |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", A.to_value (M.read (| node |))); + ("idx", A.to_value (M.read (| idx |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -5538,11 +5836,7 @@ Module collections. unsafe { Handle::new_edge(self.node, self.idx) } } *) - Definition left_edge - (BorrowType K V NodeType : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition left_edge (BorrowType K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V NodeType in match τ, α with | [], [ self ] => @@ -5593,11 +5887,7 @@ Module collections. unsafe { Handle::new_edge(self.node, self.idx + 1) } } *) - Definition right_edge - (BorrowType K V NodeType : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition right_edge (BorrowType K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V NodeType in match τ, α with | [], [ self ] => @@ -5625,6 +5915,7 @@ Module collections. |) |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -5632,7 +5923,7 @@ Module collections. "idx" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |))) @@ -5667,7 +5958,7 @@ Module collections. Definition eq (BorrowType K V NodeType HandleType : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V NodeType HandleType in match τ, α with @@ -5723,15 +6014,16 @@ Module collections. ] |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| M.read (| idx |) |)) - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.read (| idx |) |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "alloc::collections::btree::node::Handle", "idx" |) - |)))) + |) + |))) |) |))) ] @@ -5769,43 +6061,49 @@ Module collections. Definition reborrow (BorrowType K V NodeType HandleType : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V NodeType HandleType in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ BorrowType; K; V; NodeType ], - "reborrow", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::Handle", - "node" - |) - ] - |)); - ("idx", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::Handle", - "idx" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ BorrowType; K; V; NodeType ], + "reborrow", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::Handle", + "node" + |) + ] + |))); + ("idx", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::Handle", + "idx" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -5839,44 +6137,54 @@ Module collections. Definition reborrow_mut (K V NodeType HandleType : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self K V NodeType HandleType in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ Ty.path "alloc::collections::btree::node::marker::Mut"; K; V; NodeType - ], - "reborrow_mut", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::Handle", - "node" - |) - ] - |)); - ("idx", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::Handle", - "idx" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + NodeType + ], + "reborrow_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::Handle", + "node" + |) + ] + |))); + ("idx", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::Handle", + "idx" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -5892,47 +6200,53 @@ Module collections. Handle { node: self.node.dormant(), idx: self.idx, _marker: PhantomData } } *) - Definition dormant - (K V NodeType HandleType : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition dormant (K V NodeType HandleType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType HandleType in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ Ty.path "alloc::collections::btree::node::marker::Mut"; K; V; NodeType - ], - "dormant", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::Handle", - "node" - |) - ] - |)); - ("idx", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::Handle", - "idx" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + NodeType + ], + "dormant", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::Handle", + "node" + |) + ] + |))); + ("idx", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::Handle", + "idx" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -5960,49 +6274,55 @@ Module collections. Handle { node: unsafe { self.node.awaken() }, idx: self.idx, _marker: PhantomData } } *) - Definition awaken (K V NodeType HandleType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition awaken (K V NodeType HandleType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType HandleType in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::DormantMut"; + K; + V; + NodeType + ], + "awaken", + [] + |), [ - Ty.path "alloc::collections::btree::node::marker::DormantMut"; - K; - V; - NodeType - ], - "awaken", - [] - |), - [ - M.read (| + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "node" + |) + |) + ] + |))); + ("idx", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", - "node" + "idx" |) - |) - ] - |)); - ("idx", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "idx" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -6032,11 +6352,7 @@ Module collections. Handle { node, idx, _marker: PhantomData } } *) - Definition new_edge - (BorrowType K V NodeType : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition new_edge (BorrowType K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V NodeType in match τ, α with | [], [ node; idx ] => @@ -6046,26 +6362,26 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| idx |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| idx |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -6075,7 +6391,9 @@ Module collections. [] |), [ node ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6088,27 +6406,34 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: idx <= node.len()" + M.of_value (| + Value.String "assertion failed: idx <= node.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", M.read (| node |)); - ("idx", M.read (| idx |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", A.to_value (M.read (| node |))); + ("idx", A.to_value (M.read (| idx |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -6130,11 +6455,7 @@ Module collections. } } *) - Definition left_kv - (BorrowType K V NodeType : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition left_kv (BorrowType K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V NodeType in match τ, α with | [], [ self ] => @@ -6142,68 +6463,77 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ BorrowType; K; V; NodeType ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ], - "new_kv", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "node" - |) - |); - BinOp.Panic.sub (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "idx" - |) + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ BorrowType; K; V; NodeType ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ], + "new_kv", + [] |), - Value.Integer Integer.Usize 1 - |) - ] - |) - ] + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "node" + |) + |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "idx" + |) + |), + M.of_value (| Value.Integer 1 |) + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -6227,11 +6557,7 @@ Module collections. } } *) - Definition right_kv - (BorrowType K V NodeType : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition right_kv (BorrowType K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V NodeType in match τ, α with | [], [ self ] => @@ -6239,22 +6565,22 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -6269,50 +6595,58 @@ Module collections. "node" |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ BorrowType; K; V; NodeType ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ], - "new_kv", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "node" - |) - |); - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "idx" - |) - |) - ] - |) - ] + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ BorrowType; K; V; NodeType ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ], + "new_kv", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "node" + |) + |); + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "idx" + |) + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -6360,7 +6694,7 @@ Module collections. } } *) - Definition splitpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition splitpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ edge_idx ] => ltac:(M.monadic @@ -6368,30 +6702,32 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| edge_idx |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| edge_idx |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6404,17 +6740,20 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: edge_idx <= CAPACITY" + M.of_value (| + Value.String "assertion failed: edge_idx <= CAPACITY" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -6423,89 +6762,117 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.sub (| - M.read (| - M.get_constant (| - "alloc::collections::btree::node::KV_IDX_CENTER" - |) - |), - Value.Integer Integer.Usize 1 - |); - Value.StructTuple - "alloc::collections::btree::node::LeftOrRight::Left" - [ M.read (| edge_idx |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| + M.get_constant (| + "alloc::collections::btree::node::KV_IDX_CENTER" + |) + |), + M.of_value (| Value.Integer 1 |) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::LeftOrRight::Left" + [ A.to_value (M.read (| edge_idx |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 5 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 5 |) in M.alloc (| - Value.Tuple - [ - M.read (| - M.get_constant (| "alloc::collections::btree::node::KV_IDX_CENTER" |) - |); - Value.StructTuple - "alloc::collections::btree::node::LeftOrRight::Left" - [ M.read (| edge_idx |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.get_constant (| + "alloc::collections::btree::node::KV_IDX_CENTER" + |) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::LeftOrRight::Left" + [ A.to_value (M.read (| edge_idx |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 6 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 6 |) in M.alloc (| - Value.Tuple - [ - M.read (| - M.get_constant (| "alloc::collections::btree::node::KV_IDX_CENTER" |) - |); - Value.StructTuple - "alloc::collections::btree::node::LeftOrRight::Right" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.get_constant (| + "alloc::collections::btree::node::KV_IDX_CENTER" + |) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::LeftOrRight::Right" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| - M.get_constant (| - "alloc::collections::btree::node::KV_IDX_CENTER" - |) - |), - Value.Integer Integer.Usize 1 - |); - Value.StructTuple - "alloc::collections::btree::node::LeftOrRight::Right" - [ - BinOp.Panic.sub (| - M.read (| edge_idx |), - BinOp.Panic.add (| - BinOp.Panic.add (| - M.read (| - M.get_constant (| - "alloc::collections::btree::node::KV_IDX_CENTER" - |) - |), - Value.Integer Integer.Usize 1 - |), - Value.Integer Integer.Usize 1 - |) - |) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.get_constant (| + "alloc::collections::btree::node::KV_IDX_CENTER" + |) + |), + M.of_value (| Value.Integer 1 |) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::LeftOrRight::Right" + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| edge_idx |), + BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.get_constant (| + "alloc::collections::btree::node::KV_IDX_CENTER" + |) + |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) + |)) + ] + |)) + ] + |) |))) ] |) @@ -6547,7 +6914,7 @@ Module collections. } } *) - Definition insert_fit (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_fit (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; key; val ] => @@ -6558,25 +6925,25 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -6599,12 +6966,14 @@ Module collections. "node" |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6617,23 +6986,27 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.node.len() < CAPACITY" + M.of_value (| + Value.String + "assertion failed: self.node.len() < CAPACITY" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_len := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -6655,7 +7028,7 @@ Module collections. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -6687,9 +7060,11 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_len |))) ] + |) ] |); M.read (| @@ -6732,9 +7107,11 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_len |))) ] + |) ] |); M.read (| @@ -6771,7 +7148,7 @@ Module collections. |) ] |), - M.rust_cast (M.read (| new_len |)) + M.rust_cast (| M.read (| new_len |) |) |) in M.alloc (| M.call_closure (| @@ -6850,7 +7227,7 @@ Module collections. } } *) - Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; key; val; alloc ] => @@ -6861,15 +7238,15 @@ Module collections. let alloc := M.alloc (| alloc |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -6889,10 +7266,11 @@ Module collections. "node" |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6920,30 +7298,38 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - Value.StructTuple "core::option::Option::None" []; - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ], - "dormant", - [] - |), - [ handle ] - |) - ] + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ], + "dormant", + [] + |), + [ handle ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -7220,13 +7606,18 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - Value.StructTuple - "core::option::Option::Some" - [ M.read (| result |) ]; - M.read (| handle |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| result |)) ] + |)); + A.to_value (M.read (| handle |)) + ] + |) |))) ] |))) @@ -7274,7 +7665,7 @@ Module collections. } } *) - Definition insert_recursing (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_recursing (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A; impl_FnOnce_SplitResult_'a__K__V__marker_LeafOrInternal__ ], @@ -7369,24 +7760,29 @@ Module collections. let split := M.copy (| γ1_0 |) in let handle := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::SplitResult") - [ - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ], - "forget_node_type", - [] - |), - [ M.read (| split |) ] - |); - M.read (| handle |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::SplitResult") + [ + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Leaf" + ], + "forget_node_type", + [] + |), + [ M.read (| split |) ] + |)); + A.to_value (M.read (| handle |)) + ] + |) |))) ] |), @@ -7614,15 +8010,23 @@ Module collections. |), [ M.read (| split_root |); - Value.Tuple - [ - M.struct_record_update - (M.read (| split |)) - [ - ("left", - M.read (| root |)) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + M.struct_record_update + (M.read (| split |)) + [ + ("left", + A.to_value + (M.read (| + root + |))) + ] + |)) + ] + |) ] |) |) in @@ -7660,7 +8064,7 @@ Module collections. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) |) |) @@ -7703,7 +8107,7 @@ Module collections. child.set_parent_link(ptr, idx); } *) - Definition correct_parent_link (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition correct_parent_link (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -7798,7 +8202,7 @@ Module collections. [ child; M.read (| ptr |); M.read (| idx |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7822,7 +8226,7 @@ Module collections. } } *) - Definition insert_fit (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_fit (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; key; val; edge ] => @@ -7834,25 +8238,25 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -7875,12 +8279,14 @@ Module collections. "node" |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7893,48 +8299,52 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.node.len() < CAPACITY" + M.of_value (| + Value.String + "assertion failed: self.node.len() < CAPACITY" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| edge, "alloc::collections::btree::node::NodeRef", "height" |) - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -7946,8 +8356,10 @@ Module collections. "height" |) |), - Value.Integer Integer.Usize 1 - |))) + M.of_value (| Value.Integer 1 |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7960,23 +8372,27 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: edge.height == self.node.height - 1" + M.of_value (| + Value.String + "assertion failed: edge.height == self.node.height - 1" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_len := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -7998,7 +8414,7 @@ Module collections. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -8030,9 +8446,11 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_len |))) ] + |) ] |); M.read (| @@ -8075,9 +8493,11 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_len |))) ] + |) ] |); M.read (| @@ -8143,18 +8563,23 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.add (| - M.read (| new_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8162,7 +8587,7 @@ Module collections. "idx" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); M.read (| M.SubPointer.get_struct_record_field (| @@ -8197,7 +8622,7 @@ Module collections. |) ] |), - M.rust_cast (M.read (| new_len |)) + M.rust_cast (| M.read (| new_len |) |) |) in let _ := M.alloc (| @@ -8220,30 +8645,36 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::Handle", - "idx" - |) - |), - Value.Integer Integer.Usize 1 - |)); - ("end_", - BinOp.Panic.add (| - M.read (| new_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::Handle", + "idx" + |) + |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8282,7 +8713,7 @@ Module collections. } } *) - Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; key; val; edge; alloc ] => @@ -8295,23 +8726,24 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| edge, "alloc::collections::btree::node::NodeRef", "height" |) - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -8323,8 +8755,10 @@ Module collections. "height" |) |), - Value.Integer Integer.Usize 1 - |))) + M.of_value (| Value.Integer 1 |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -8334,26 +8768,28 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: edge.height == self.node.height - 1" + M.of_value (| + Value.String + "assertion failed: edge.height == self.node.height - 1" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -8373,10 +8809,11 @@ Module collections. "node" |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -8403,7 +8840,9 @@ Module collections. [ self; M.read (| key |); M.read (| val |); M.read (| edge |) ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -8653,9 +9092,11 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| result |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| result |)) ] + |) |))) ] |))) @@ -8701,7 +9142,7 @@ Module collections. NodeRef { node, height: self.node.height - 1, _marker: PhantomData } } *) - Definition descend (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition descend (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -8775,12 +9216,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| parent_ptr |), "alloc::collections::btree::node::InternalNode", "edges" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -8794,27 +9236,33 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::NodeRef" - [ - ("node", M.read (| node |)); - ("height", - BinOp.Panic.sub (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "node" + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::NodeRef" + [ + ("node", A.to_value (M.read (| node |))); + ("height", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "node" + |), + "alloc::collections::btree::node::NodeRef", + "height" + |) |), - "alloc::collections::btree::node::NodeRef", - "height" - |) - |), - Value.Integer Integer.Usize 1 - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| Value.Integer 1 |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -8830,11 +9278,7 @@ Module collections. unsafe { Handle::new_edge(self.node.forget_type(), self.idx) } } *) - Definition forget_node_type - (BorrowType K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition forget_node_type (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -8922,7 +9366,7 @@ Module collections. (k, v) } *) - Definition into_kv (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_kv (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self ] => @@ -8931,32 +9375,32 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -8978,7 +9422,9 @@ Module collections. "node" |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8991,18 +9437,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.idx < self.node.len()" + M.of_value (| + Value.String + "assertion failed: self.idx < self.node.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let leaf := @@ -9046,12 +9495,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "keys" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -9083,12 +9533,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "vals" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -9101,7 +9552,11 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [ M.read (| k |); M.read (| v |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| k |)); A.to_value (M.read (| v |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -9127,7 +9582,7 @@ Module collections. unsafe { self.node.key_area_mut(self.idx).assume_init_mut() } } *) - Definition key_mut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition key_mut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self ] => @@ -9182,7 +9637,7 @@ Module collections. unsafe { leaf.vals.get_unchecked_mut(self.idx).assume_init_mut() } } *) - Definition into_val_mut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_val_mut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self ] => @@ -9191,32 +9646,32 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -9238,7 +9693,9 @@ Module collections. "node" |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9251,18 +9708,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.idx < self.node.len()" + M.of_value (| + Value.String + "assertion failed: self.idx < self.node.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let leaf := @@ -9305,12 +9765,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "vals" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -9340,7 +9801,7 @@ Module collections. (k, v) } *) - Definition into_kv_valmut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_kv_valmut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self ] => @@ -9349,32 +9810,32 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -9396,7 +9857,9 @@ Module collections. "node" |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9409,18 +9872,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.idx < self.node.len()" + M.of_value (| + Value.String + "assertion failed: self.idx < self.node.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let leaf := @@ -9464,12 +9930,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "keys" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -9501,12 +9968,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "vals" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -9519,7 +9987,11 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [ M.read (| k |); M.read (| v |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| k |)); A.to_value (M.read (| v |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -9540,7 +10012,7 @@ Module collections. } } *) - Definition kv_mut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition kv_mut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self ] => @@ -9549,32 +10021,32 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::Handle", "idx" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -9596,7 +10068,9 @@ Module collections. "node" |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9609,18 +10083,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.idx < self.node.len()" + M.of_value (| + Value.String + "assertion failed: self.idx < self.node.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let leaf := @@ -9662,12 +10139,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "keys" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9699,12 +10177,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "vals" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9717,7 +10196,11 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [ M.read (| key |); M.read (| val |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| key |)); A.to_value (M.read (| val |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -9732,7 +10215,7 @@ Module collections. (mem::replace(key, k), mem::replace(val, v)) } *) - Definition replace_kv (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition replace_kv (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self; k; v ] => @@ -9772,17 +10255,21 @@ Module collections. let key := M.copy (| γ0_0 |) in let val := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::mem::replace", [ K ] |), - [ M.read (| key |); M.read (| k |) ] - |); - M.call_closure (| - M.get_function (| "core::mem::replace", [ V ] |), - [ M.read (| val |); M.read (| v |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::replace", [ K ] |), + [ M.read (| key |); M.read (| k |) ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::replace", [ V ] |), + [ M.read (| val |); M.read (| v |) ] + |)) + ] + |) |))) ] |) @@ -9817,7 +10304,7 @@ Module collections. } } *) - Definition split_leaf_data (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_leaf_data (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self; new_node ] => @@ -9827,32 +10314,32 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::Handle", "idx" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -9874,7 +10361,9 @@ Module collections. "node" |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9887,18 +10376,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.idx < self.node.len()" + M.of_value (| + Value.String + "assertion failed: self.idx < self.node.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let old_len := @@ -9924,7 +10416,9 @@ Module collections. let new_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| old_len |), M.read (| M.SubPointer.get_struct_record_field (| @@ -9934,7 +10428,7 @@ Module collections. |) |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -9944,7 +10438,7 @@ Module collections. "alloc::collections::btree::node::LeafNode", "len" |), - M.rust_cast (M.read (| new_len |)) + M.rust_cast (| M.read (| new_len |) |) |) in let k := M.alloc (| @@ -10061,22 +10555,26 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::Handle", - "idx" - |) - |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| old_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::Handle", + "idx" + |) + |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| old_len |))) + ] + |) ] |); M.call_closure (| @@ -10095,9 +10593,11 @@ Module collections. "alloc::collections::btree::node::LeafNode", "keys" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_len |))) ] + |) ] |) ] @@ -10131,23 +10631,27 @@ Module collections. M.read (| self |), "alloc::collections::btree::node::Handle", "node" - |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::node::Handle", - "idx" - |) - |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| old_len |)) - ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::node::Handle", + "idx" + |) + |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| old_len |))) + ] + |) ] |); M.call_closure (| @@ -10166,9 +10670,11 @@ Module collections. "alloc::collections::btree::node::LeafNode", "vals" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_len |))) ] + |) ] |) ] @@ -10193,16 +10699,21 @@ Module collections. |) ] |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::Handle", "idx" |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [ M.read (| k |); M.read (| v |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| k |)); A.to_value (M.read (| v |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -10231,7 +10742,7 @@ Module collections. unsafe { self.node.into_key_val_mut_at(self.idx) } } *) - Definition into_kv_valmut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_kv_valmut (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self ] => @@ -10293,7 +10804,7 @@ Module collections. } } *) - Definition into_key_val (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_key_val (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self ] => @@ -10302,32 +10813,32 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -10349,7 +10860,9 @@ Module collections. "node" |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10362,18 +10875,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.idx < self.node.len()" + M.of_value (| + Value.String + "assertion failed: self.idx < self.node.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let leaf := @@ -10415,12 +10931,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "keys" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -10452,12 +10969,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "vals" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -10470,7 +10988,11 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [ M.read (| key |); M.read (| val |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| key |)); A.to_value (M.read (| val |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -10489,7 +11011,7 @@ Module collections. } } *) - Definition drop_key_val (K V NodeType : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop_key_val (K V NodeType : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V NodeType in match τ, α with | [], [ self ] => @@ -10498,32 +11020,32 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -10545,7 +11067,9 @@ Module collections. "node" |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10558,18 +11082,21 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.idx < self.node.len()" + M.of_value (| + Value.String + "assertion failed: self.idx < self.node.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let leaf := @@ -10611,12 +11138,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "keys" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -10648,12 +11176,13 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| leaf |), "alloc::collections::btree::node::LeafNode", "vals" - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -10666,7 +11195,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10703,7 +11232,7 @@ Module collections. SplitResult { left: self.node, kv, right } } *) - Definition split (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -10764,20 +11293,23 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::SplitResult" - [ - ("left", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "node" - |) - |)); - ("kv", M.read (| kv |)); - ("right", M.read (| right |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::SplitResult" + [ + ("left", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "node" + |) + |))); + ("kv", A.to_value (M.read (| kv |))); + ("right", A.to_value (M.read (| right |))) + ] + |) |) |))) | _, _ => M.impossible @@ -10800,7 +11332,7 @@ Module collections. } } *) - Definition remove (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -10860,9 +11392,11 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| old_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| old_len |))) ] + |) ] |); M.read (| @@ -10904,9 +11438,11 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| old_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| old_len |))) ] + |) ] |); M.read (| @@ -10942,34 +11478,45 @@ Module collections. |) ] |), - M.rust_cast - (BinOp.Panic.sub (| M.read (| old_len |), Value.Integer Integer.Usize 1 |)) + M.rust_cast (| + BinOp.Panic.sub (| + Integer.Usize, + M.read (| old_len |), + M.of_value (| Value.Integer 1 |) + |) + |) |) in M.alloc (| - Value.Tuple - [ - Value.Tuple [ M.read (| k |); M.read (| v |) ]; - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.Tuple [ A.to_value (M.read (| k |)); A.to_value (M.read (| v |)) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ], - "left_edge", - [] - |), - [ M.read (| self |) ] - |) - ] + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ], + "left_edge", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -11018,7 +11565,7 @@ Module collections. } } *) - Definition split (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -11168,26 +11715,32 @@ Module collections. "alloc::collections::btree::node::Handle", "node" |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "idx" - |) - |), - Value.Integer Integer.Usize 1 - |)); - ("end_", - BinOp.Panic.add (| - M.read (| old_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "idx" + |) + |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); M.call_closure (| @@ -11218,15 +11771,19 @@ Module collections. "alloc::collections::btree::node::InternalNode", "edges" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.add (| - M.read (| new_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) ] @@ -11263,20 +11820,23 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::SplitResult" - [ - ("left", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "node" - |) - |)); - ("kv", M.read (| kv |)); - ("right", M.read (| right |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::SplitResult" + [ + ("left", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "node" + |) + |))); + ("kv", A.to_value (M.read (| kv |))); + ("right", A.to_value (M.read (| right |))) + ] + |) |) |))) | _, _ => M.impossible @@ -11296,7 +11856,7 @@ Module collections. } } *) - Definition consider_for_balancing (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition consider_for_balancing (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11352,31 +11912,14 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::BalancingContext" - [ - ("parent", M.read (| self |)); - ("left_child", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Internal" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ], - "descend", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::BalancingContext" + [ + ("parent", A.to_value (M.read (| self |))); + ("left_child", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::Handle") @@ -11389,36 +11932,38 @@ Module collections. V; Ty.path "alloc::collections::btree::node::marker::Internal" ]; - Ty.path "alloc::collections::btree::node::marker::KV" + Ty.path "alloc::collections::btree::node::marker::Edge" ], - "left_edge", + "descend", [] |), - [ M.read (| self1 |) ] - |) - ] - |)); - ("right_child", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") [ - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Internal" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ], - "descend", - [] - |), - [ - M.call_closure (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Internal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ], + "left_edge", + [] + |), + [ M.read (| self1 |) ] + |) + ] + |))); + ("right_child", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::Handle") @@ -11431,16 +11976,37 @@ Module collections. V; Ty.path "alloc::collections::btree::node::marker::Internal" ]; - Ty.path "alloc::collections::btree::node::marker::KV" + Ty.path "alloc::collections::btree::node::marker::Edge" ], - "right_edge", + "descend", [] |), - [ M.read (| self2 |) ] - |) - ] - |)) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::Internal" + ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ], + "right_edge", + [] + |), + [ M.read (| self2 |) ] + |) + ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -11503,7 +12069,7 @@ Module collections. self.left_child.len() } *) - Definition left_child_len (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition left_child_len (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11542,7 +12108,7 @@ Module collections. self.right_child.len() } *) - Definition right_child_len (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition right_child_len (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11581,7 +12147,7 @@ Module collections. self.left_child } *) - Definition into_left_child (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_left_child (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11606,7 +12172,7 @@ Module collections. self.right_child } *) - Definition into_right_child (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_right_child (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => @@ -11631,15 +12197,17 @@ Module collections. self.left_child.len() + 1 + self.right_child.len() <= CAPACITY } *) - Definition can_merge (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition can_merge (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.le - (BinOp.Panic.add (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -11661,7 +12229,7 @@ Module collections. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |), M.call_closure (| M.get_associated_function (| @@ -11684,8 +12252,9 @@ Module collections. |) ] |) - |)) - (M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) |)))) + |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) |) + |))) | _, _ => M.impossible end. @@ -11756,7 +12325,7 @@ Module collections. result(parent_node, left_node) } *) - Definition do_merge (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition do_merge (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ F; R; A ], [ self; result; alloc ] => @@ -11870,30 +12439,34 @@ Module collections. let new_left_len := M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| + Integer.Usize, M.read (| old_left_len |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |), M.read (| right_len |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| new_left_len |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| new_left_len |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11906,14 +12479,17 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: new_left_len <= CAPACITY" + M.of_value (| + Value.String + "assertion failed: new_left_len <= CAPACITY" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -11935,7 +12511,7 @@ Module collections. |), [ left_node ] |), - M.rust_cast (M.read (| new_left_len |)) + M.rust_cast (| M.read (| new_left_len |) |) |) in let parent_key := M.alloc (| @@ -11972,9 +12548,11 @@ Module collections. |), [ parent_node; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| old_parent_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| old_parent_len |))) ] + |) ] |); M.read (| parent_idx |) @@ -12050,9 +12628,11 @@ Module collections. |), [ right_node; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| right_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| right_len |))) ] + |) ] |); M.call_closure (| @@ -12082,16 +12662,20 @@ Module collections. |), [ left_node; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| new_left_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| new_left_len |))) + ] + |) ] |) ] @@ -12132,9 +12716,11 @@ Module collections. |), [ parent_node; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| old_parent_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| old_parent_len |))) ] + |) ] |); M.read (| parent_idx |) @@ -12210,9 +12796,11 @@ Module collections. |), [ right_node; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| right_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| right_len |))) ] + |) ] |); M.call_closure (| @@ -12242,16 +12830,20 @@ Module collections. |), [ left_node; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| new_left_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| new_left_len |))) + ] + |) ] |) ] @@ -12309,20 +12901,25 @@ Module collections. |), [ parent_node; - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.add (| - M.read (| old_parent_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_parent_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); BinOp.Panic.add (| + Integer.Usize, M.read (| parent_idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -12345,16 +12942,20 @@ Module collections. |), [ parent_node; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| parent_idx |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| old_parent_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| parent_idx |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| old_parent_len |))) + ] + |) ] |) |) in @@ -12377,25 +12978,30 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.U16 1 |) + BinOp.Panic.sub (| + Integer.U16, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| parent_node, "alloc::collections::btree::node::NodeRef", "height" |) - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12515,15 +13121,19 @@ Module collections. |), [ right_node; - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.add (| - M.read (| right_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| right_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); M.call_closure (| @@ -12564,20 +13174,26 @@ Module collections. |), [ left_node; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", - BinOp.Panic.add (| - M.read (| new_left_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_left_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) ] @@ -12606,20 +13222,26 @@ Module collections. |), [ left_node; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", - BinOp.Panic.add (| - M.read (| new_left_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_left_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in @@ -12674,7 +13296,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -12728,7 +13350,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -12763,7 +13385,13 @@ Module collections. |), [ M.read (| result |); - Value.Tuple [ M.read (| parent_node |); M.read (| left_node |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| parent_node |)); + A.to_value (M.read (| left_node |)) + ] + |) ] |) |))) @@ -12785,7 +13413,7 @@ Module collections. self.do_merge(|parent, _child| parent, alloc) } *) - Definition merge_tracking_parent (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition merge_tracking_parent (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -12840,8 +13468,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -12863,7 +13491,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)); + end) + |); M.read (| alloc |) ] |))) @@ -12882,7 +13511,7 @@ Module collections. self.do_merge(|_parent, child| child, alloc) } *) - Definition merge_tracking_child (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition merge_tracking_child (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; alloc ] => @@ -12937,8 +13566,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -12960,7 +13589,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)); + end) + |); M.read (| alloc |) ] |))) @@ -12991,7 +13621,7 @@ Module collections. unsafe { Handle::new_edge(child, new_idx) } } *) - Definition merge_tracking_child_edge (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition merge_tracking_child_edge (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ self; track_edge_idx; alloc ] => @@ -13050,15 +13680,15 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.match_operator (| track_edge_idx, [ @@ -13072,9 +13702,10 @@ Module collections. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Pure.le - (M.read (| idx |)) - (M.read (| old_left_len |)) + BinOp.Pure.le (| + M.read (| idx |), + M.read (| old_left_len |) + |) |))); fun γ => ltac:(M.monadic @@ -13086,13 +13717,15 @@ Module collections. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Pure.le - (M.read (| idx |)) - (M.read (| right_len |)) + BinOp.Pure.le (| + M.read (| idx |), + M.read (| right_len |) + |) |))) ] |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13102,17 +13735,19 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: match track_edge_idx { + M.of_value (| + Value.String + "assertion failed: match track_edge_idx { LeftOrRight::Left(idx) => idx <= old_left_len, LeftOrRight::Right(idx) => idx <= right_len, }" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let child := @@ -13154,9 +13789,11 @@ Module collections. 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 Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |), M.read (| idx |) |) @@ -13206,7 +13843,7 @@ Module collections. unsafe { Handle::new_edge(self.right_child, 1 + track_right_edge_idx) } } *) - Definition steal_left (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition steal_left (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; track_right_edge_idx ] => @@ -13224,7 +13861,7 @@ Module collections. "bulk_steal_left", [] |), - [ self; Value.Integer Integer.Usize 1 ] + [ self; M.of_value (| Value.Integer 1 |) ] |) |) in M.alloc (| @@ -13255,7 +13892,8 @@ Module collections. |) |); BinOp.Panic.add (| - Value.Integer Integer.Usize 1, + Integer.Usize, + M.of_value (| Value.Integer 1 |), M.read (| track_right_edge_idx |) |) ] @@ -13278,7 +13916,7 @@ Module collections. unsafe { Handle::new_edge(self.left_child, track_left_edge_idx) } } *) - Definition steal_right (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition steal_right (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; track_left_edge_idx ] => @@ -13296,7 +13934,7 @@ Module collections. "bulk_steal_right", [] |), - [ self; Value.Integer Integer.Usize 1 ] + [ self; M.of_value (| Value.Integer 1 |) ] |) |) in M.alloc (| @@ -13401,7 +14039,7 @@ Module collections. } } *) - Definition bulk_steal_left (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition bulk_steal_left (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; count ] => @@ -13411,17 +14049,19 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| count |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| count |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13429,11 +14069,15 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: count > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: count > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let left_node := @@ -13490,24 +14134,27 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| old_right_len |), M.read (| count |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13517,27 +14164,30 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: old_right_len + count <= CAPACITY" + M.of_value (| + Value.String + "assertion failed: old_right_len + count <= CAPACITY" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| old_left_len |)) (M.read (| count |))) + UnOp.Pure.not (| + BinOp.Pure.ge (| M.read (| old_left_len |), M.read (| count |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13547,22 +14197,32 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: old_left_len >= count" + M.of_value (| + Value.String "assertion failed: old_left_len >= count" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_left_len := M.alloc (| - BinOp.Panic.sub (| M.read (| old_left_len |), M.read (| count |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| old_left_len |), + M.read (| count |) + |) |) in let new_right_len := M.alloc (| - BinOp.Panic.add (| M.read (| old_right_len |), M.read (| count |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| old_right_len |), + M.read (| count |) + |) |) in let _ := M.write (| @@ -13581,7 +14241,7 @@ Module collections. |), [ M.read (| left_node |) ] |), - M.rust_cast (M.read (| new_left_len |)) + M.rust_cast (| M.read (| new_left_len |) |) |) in let _ := M.write (| @@ -13600,7 +14260,7 @@ Module collections. |), [ M.read (| right_node |) ] |), - M.rust_cast (M.read (| new_right_len |)) + M.rust_cast (| M.read (| new_right_len |) |) |) in let _ := let _ := @@ -13629,9 +14289,11 @@ Module collections. |), [ M.read (| right_node |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_right_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_right_len |))) ] + |) ] |); M.read (| count |) @@ -13664,9 +14326,11 @@ Module collections. |), [ M.read (| right_node |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_right_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_right_len |))) ] + |) ] |); M.read (| count |) @@ -13702,16 +14366,20 @@ Module collections. |), [ M.read (| left_node |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| new_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| old_left_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| old_left_len |))) + ] + |) ] |); M.call_closure (| @@ -13735,15 +14403,19 @@ Module collections. |), [ M.read (| right_node |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.read (| count |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| count |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) ] @@ -13778,16 +14450,20 @@ Module collections. |), [ M.read (| left_node |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| new_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| old_left_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| old_left_len |))) + ] + |) ] |); M.call_closure (| @@ -13811,15 +14487,19 @@ Module collections. |), [ M.read (| right_node |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.read (| count |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| count |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) ] @@ -13954,8 +14634,9 @@ Module collections. [ M.read (| right_node |); BinOp.Panic.sub (| + Integer.Usize, M.read (| count |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -13994,37 +14675,26 @@ Module collections. [ M.read (| right_node |); BinOp.Panic.sub (| - M.read (| count |), - Value.Integer Integer.Usize 1 - |) - ] - |); - M.read (| v |) - ] - |) - |) in - M.alloc (| Value.Tuple [] |))) - ] - |) in - M.match_operator (| - M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "force", - [] - |), - [ - M.call_closure (| + Integer.Usize, + M.read (| count |), + M.of_value (| Value.Integer 1 |) + |) + ] + |); + M.read (| v |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -14035,28 +14705,30 @@ Module collections. Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" ], - "reborrow_mut", + "force", [] |), - [ M.read (| left_node |) ] - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "force", - [] - |), - [ - M.call_closure (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "reborrow_mut", + [] + |), + [ M.read (| left_node |) ] + |) + ] + |)); + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -14067,14 +14739,30 @@ Module collections. Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" ], - "reborrow_mut", + "force", [] |), - [ M.read (| right_node |) ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "reborrow_mut", + [] + |), + [ M.read (| right_node |) ] + |) + ] + |)) + ] + |) |), [ fun γ => @@ -14146,15 +14834,19 @@ Module collections. |), [ right; - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.add (| - M.read (| new_right_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_right_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); M.read (| count |) @@ -14212,20 +14904,26 @@ Module collections. |), [ left; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| new_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); M.call_closure (| @@ -14263,9 +14961,11 @@ Module collections. |), [ right; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| count |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| count |))) ] + |) ] |) ] @@ -14288,20 +14988,24 @@ Module collections. |), [ right; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.add (| - M.read (| new_right_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_right_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -14318,14 +15022,19 @@ Module collections. "alloc::collections::btree::node::ForceResult::Leaf", 0 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "internal error: entered unreachable code" |) + [ + M.read (| + M.of_value (| + Value.String "internal error: entered unreachable code" + |) + |) ] |) |) @@ -14404,7 +15113,7 @@ Module collections. } } *) - Definition bulk_steal_right (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition bulk_steal_right (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; count ] => @@ -14414,17 +15123,19 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| count |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| count |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14432,11 +15143,15 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: count > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: count > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let left_node := @@ -14493,24 +15208,27 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| old_left_len |), M.read (| count |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14520,27 +15238,30 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: old_left_len + count <= CAPACITY" + M.of_value (| + Value.String + "assertion failed: old_left_len + count <= CAPACITY" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| old_right_len |)) (M.read (| count |))) + UnOp.Pure.not (| + BinOp.Pure.ge (| M.read (| old_right_len |), M.read (| count |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14550,22 +15271,32 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: old_right_len >= count" + M.of_value (| + Value.String "assertion failed: old_right_len >= count" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_left_len := M.alloc (| - BinOp.Panic.add (| M.read (| old_left_len |), M.read (| count |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.read (| count |) + |) |) in let new_right_len := M.alloc (| - BinOp.Panic.sub (| M.read (| old_right_len |), M.read (| count |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| old_right_len |), + M.read (| count |) + |) |) in let _ := M.write (| @@ -14584,7 +15315,7 @@ Module collections. |), [ M.read (| left_node |) ] |), - M.rust_cast (M.read (| new_left_len |)) + M.rust_cast (| M.read (| new_left_len |) |) |) in let _ := M.write (| @@ -14603,7 +15334,7 @@ Module collections. |), [ M.read (| right_node |) ] |), - M.rust_cast (M.read (| new_right_len |)) + M.rust_cast (| M.read (| new_right_len |) |) |) in let _ := let k := @@ -14634,8 +15365,9 @@ Module collections. [ M.read (| right_node |); BinOp.Panic.sub (| + Integer.Usize, M.read (| count |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -14670,8 +15402,9 @@ Module collections. [ M.read (| right_node |); BinOp.Panic.sub (| + Integer.Usize, M.read (| count |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -14819,15 +15552,19 @@ Module collections. |), [ M.read (| right_node |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.read (| count |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| count |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); M.call_closure (| @@ -14857,16 +15594,20 @@ Module collections. |), [ M.read (| left_node |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| new_left_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| new_left_len |))) + ] + |) ] |) ] @@ -14907,15 +15648,19 @@ Module collections. |), [ M.read (| right_node |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.read (| count |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| count |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); M.call_closure (| @@ -14945,16 +15690,20 @@ Module collections. |), [ M.read (| left_node |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| new_left_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| new_left_len |))) + ] + |) ] |) ] @@ -14995,9 +15744,11 @@ Module collections. |), [ M.read (| right_node |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| old_right_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| old_right_len |))) ] + |) ] |); M.read (| count |) @@ -15039,37 +15790,27 @@ Module collections. |), [ M.read (| right_node |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| old_right_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| old_right_len |))) ] + |) ] |); M.read (| count |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "force", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -15080,28 +15821,30 @@ Module collections. Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" ], - "reborrow_mut", + "force", [] |), - [ M.read (| left_node |) ] - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "force", - [] - |), - [ - M.call_closure (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "reborrow_mut", + [] + |), + [ M.read (| left_node |) ] + |) + ] + |)); + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -15112,14 +15855,30 @@ Module collections. Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" ], - "reborrow_mut", + "force", [] |), - [ M.read (| right_node |) ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "reborrow_mut", + [] + |), + [ M.read (| right_node |) ] + |) + ] + |)) + ] + |) |), [ fun γ => @@ -15191,9 +15950,11 @@ Module collections. |), [ right; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| count |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| count |))) ] + |) ] |); M.call_closure (| @@ -15231,20 +15992,26 @@ Module collections. |), [ left; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", - BinOp.Panic.add (| - M.read (| new_left_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_left_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) ] @@ -15301,15 +16068,19 @@ Module collections. |), [ right; - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.add (| - M.read (| old_right_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_right_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); M.read (| count |) @@ -15333,20 +16104,26 @@ Module collections. |), [ left; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", - BinOp.Panic.add (| - M.read (| new_left_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_left_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in @@ -15367,20 +16144,24 @@ Module collections. |), [ right; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.add (| - M.read (| new_right_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_right_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -15397,14 +16178,19 @@ Module collections. "alloc::collections::btree::node::ForceResult::Leaf", 0 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "internal error: entered unreachable code" |) + [ + M.read (| + M.of_value (| + Value.String "internal error: entered unreachable code" + |) + |) ] |) |) @@ -15439,11 +16225,7 @@ Module collections. unsafe { Handle::new_edge(self.node.forget_type(), self.idx) } } *) - Definition forget_node_type - (BorrowType K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition forget_node_type (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -15526,11 +16308,7 @@ Module collections. unsafe { Handle::new_kv(self.node.forget_type(), self.idx) } } *) - Definition forget_node_type - (BorrowType K V : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition forget_node_type (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [], [ self ] => @@ -15627,7 +16405,7 @@ Module collections. } } *) - Definition force (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition force (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [], [ self ] => @@ -15671,24 +16449,34 @@ Module collections. |) in let node := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::node::ForceResult::Leaf'1" - [ - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", M.read (| node |)); - ("idx", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "idx" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::ForceResult::Leaf'1" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", A.to_value (M.read (| node |))); + ("idx", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "idx" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -15700,24 +16488,34 @@ Module collections. |) in let node := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::node::ForceResult::Internal'1" - [ - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", M.read (| node |)); - ("idx", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "idx" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::ForceResult::Internal'1" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", A.to_value (M.read (| node |))); + ("idx", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "idx" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)) + ] + |) |))) ] |) @@ -15754,11 +16552,7 @@ Module collections. Handle { node, idx: self.idx, _marker: PhantomData } } *) - Definition cast_to_leaf_unchecked - (K V Type_ : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition cast_to_leaf_unchecked (K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V Type_ in match τ, α with | [], [ self ] => @@ -15792,20 +16586,25 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::node::Handle" - [ - ("node", M.read (| node |)); - ("idx", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::Handle", - "idx" - |) - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::Handle" + [ + ("node", A.to_value (M.read (| node |))); + ("idx", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::Handle", + "idx" + |) + |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -15878,7 +16677,7 @@ Module collections. } } *) - Definition move_suffix (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_suffix (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self; _ as right ] => @@ -15959,7 +16758,11 @@ Module collections. |) in let new_right_len := M.alloc (| - BinOp.Panic.sub (| M.read (| old_left_len |), M.read (| new_left_len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| old_left_len |), + M.read (| new_left_len |) + |) |) in let right_node := M.alloc (| @@ -15981,16 +16784,16 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -16005,8 +16808,10 @@ Module collections. [] |), [ right_node ] - |)) - (Value.Integer Integer.Usize 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -16016,40 +16821,44 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: right_node.len() == 0" + M.of_value (| + Value.String "assertion failed: right_node.len() == 0" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| left_node, "alloc::collections::btree::node::NodeRef", "height" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| right_node, "alloc::collections::btree::node::NodeRef", "height" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -16059,27 +16868,30 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: left_node.height == right_node.height" + M.of_value (| + Value.String + "assertion failed: left_node.height == right_node.height" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| new_right_len |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| new_right_len |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -16101,7 +16913,7 @@ Module collections. |), [ left_node ] |), - M.rust_cast (M.read (| new_left_len |)) + M.rust_cast (| M.read (| new_left_len |) |) |) in let _ := M.write (| @@ -16121,7 +16933,7 @@ Module collections. |), [ right_node ] |), - M.rust_cast (M.read (| new_right_len |)) + M.rust_cast (| M.read (| new_right_len |) |) |) in let _ := M.alloc (| @@ -16158,12 +16970,14 @@ Module collections. |), [ left_node; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| new_left_len |)); - ("end_", M.read (| old_left_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| new_left_len |))); + ("end_", A.to_value (M.read (| old_left_len |))) + ] + |) ] |); M.call_closure (| @@ -16193,9 +17007,11 @@ Module collections. |), [ right_node; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_right_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_right_len |))) ] + |) ] |) ] @@ -16236,12 +17052,14 @@ Module collections. |), [ left_node; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| new_left_len |)); - ("end_", M.read (| old_left_len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| new_left_len |))); + ("end_", A.to_value (M.read (| old_left_len |))) + ] + |) ] |); M.call_closure (| @@ -16271,9 +17089,11 @@ Module collections. |), [ right_node; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| new_right_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| new_right_len |))) ] + |) ] |) ] @@ -16281,41 +17101,45 @@ Module collections. |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "force", - [] - |), - [ M.read (| left_node |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "force", - [] - |), - [ M.read (| right_node |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "force", + [] + |), + [ M.read (| left_node |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "force", + [] + |), + [ M.read (| right_node |) ] + |)) + ] + |) |), [ fun γ => @@ -16390,20 +17214,26 @@ Module collections. |), [ left; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| new_left_len |), - Value.Integer Integer.Usize 1 - |)); - ("end_", - BinOp.Panic.add (| - M.read (| old_left_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_left_len |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| old_left_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |); M.call_closure (| @@ -16443,16 +17273,21 @@ Module collections. |), [ right; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 1); - ("end_", - BinOp.Panic.add (| - M.read (| new_right_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_right_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) ] @@ -16480,20 +17315,25 @@ Module collections. |), [ right; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 1); - ("end_", - BinOp.Panic.add (| - M.read (| new_right_len |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| new_right_len |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -16510,7 +17350,7 @@ Module collections. "alloc::collections::btree::node::ForceResult::Leaf", 0 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -16519,7 +17359,9 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "internal error: entered unreachable code" + M.of_value (| + Value.String "internal error: entered unreachable code" + |) |) ] |) @@ -16527,7 +17369,7 @@ Module collections. |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -16588,72 +17430,77 @@ Module collections. SplitResult { left: self.left.forget_type(), kv: self.kv, right: self.right.forget_type() } } *) - Definition forget_node_type (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition forget_node_type (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::SplitResult" - [ - ("left", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::SplitResult" + [ + ("left", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ], + "forget_type", + [] + |), [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ], - "forget_type", - [] - |), - [ - M.read (| + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::SplitResult", + "left" + |) + |) + ] + |))); + ("kv", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::SplitResult", - "left" + "kv" |) - |) - ] - |)); - ("kv", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::SplitResult", - "kv" - |) - |)); - ("right", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + |))); + ("right", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Leaf" + ], + "forget_type", + [] + |), [ - Ty.path "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Leaf" - ], - "forget_type", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::SplitResult", - "right" - |) - |) - ] - |)) - ])) + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::SplitResult", + "right" + |) + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -16673,72 +17520,77 @@ Module collections. SplitResult { left: self.left.forget_type(), kv: self.kv, right: self.right.forget_type() } } *) - Definition forget_node_type (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition forget_node_type (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::node::SplitResult" - [ - ("left", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + M.of_value (| + Value.StructRecord + "alloc::collections::btree::node::SplitResult" + [ + ("left", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Internal" + ], + "forget_type", + [] + |), [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Internal" - ], - "forget_type", - [] - |), - [ - M.read (| + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::SplitResult", + "left" + |) + |) + ] + |))); + ("kv", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::SplitResult", - "left" + "kv" |) - |) - ] - |)); - ("kv", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::SplitResult", - "kv" - |) - |)); - ("right", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") + |))); + ("right", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path "alloc::collections::btree::node::marker::Internal" + ], + "forget_type", + [] + |), [ - Ty.path "alloc::collections::btree::node::marker::Owned"; - K; - V; - Ty.path "alloc::collections::btree::node::marker::Internal" - ], - "forget_type", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::node::SplitResult", - "right" - |) - |) - ] - |)) - ])) + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::node::SplitResult", + "right" + |) + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -16840,8 +17692,8 @@ Module collections. (* const TRAVERSAL_PERMIT: bool = false; *) (* Ty.path "bool" *) - Definition value_TRAVERSAL_PERMIT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_TRAVERSAL_PERMIT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -16937,7 +17789,7 @@ Module collections. } } *) - Definition slice_insert (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_insert (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ slice; idx; val ] => ltac:(M.monadic @@ -16960,24 +17812,25 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt (M.read (| len |)) (M.read (| idx |))) + UnOp.Pure.not (| + BinOp.Pure.gt (| M.read (| len |), M.read (| idx |) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16988,15 +17841,22 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: len > idx" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: len > idx" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let slice_ptr := @@ -17014,19 +17874,21 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| len |)) - (BinOp.Panic.add (| + BinOp.Pure.gt (| + M.read (| len |), + BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - Value.Integer Integer.Usize 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -17039,8 +17901,8 @@ Module collections. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -17053,7 +17915,8 @@ Module collections. [] |), [ M.read (| slice_ptr |); M.read (| idx |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -17069,20 +17932,26 @@ Module collections. [ M.read (| slice_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), M.read (| idx |) |), - Value.Integer Integer.Usize 1 + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| idx |) + |), + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -17108,7 +17977,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17125,7 +17994,7 @@ Module collections. } } *) - Definition slice_remove (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_remove (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ slice; idx ] => ltac:(M.monadic @@ -17147,24 +18016,25 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt (M.read (| idx |)) (M.read (| len |))) + UnOp.Pure.not (| + BinOp.Pure.lt (| M.read (| idx |), M.read (| len |) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17175,15 +18045,22 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: idx < len" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: idx < len" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let slice_ptr := @@ -17230,8 +18107,8 @@ Module collections. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -17241,9 +18118,14 @@ Module collections. |), [ M.read (| slice_ptr |); - BinOp.Panic.add (| M.read (| idx |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| idx |), + M.of_value (| Value.Integer 1 |) + |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -17255,8 +18137,9 @@ Module collections. [ M.read (| slice_ptr |); M.read (| idx |) ] |); BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), M.read (| idx |) |), - Value.Integer Integer.Usize 1 + Integer.Usize, + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| idx |) |), + M.of_value (| Value.Integer 1 |) |) ] |) @@ -17274,7 +18157,7 @@ Module collections. } } *) - Definition slice_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ slice; distance ] => ltac:(M.monadic @@ -17303,8 +18186,8 @@ Module collections. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -17313,9 +18196,11 @@ Module collections. [] |), [ M.read (| slice_ptr |); M.read (| distance |) ] - |)); + |) + |); M.read (| slice_ptr |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -17331,7 +18216,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17344,7 +18229,7 @@ Module collections. } } *) - Definition slice_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ slice; distance ] => ltac:(M.monadic @@ -17372,7 +18257,7 @@ Module collections. [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| slice_ptr |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| slice_ptr |) |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -17384,6 +18269,7 @@ Module collections. [ M.read (| slice_ptr |); M.read (| distance |) ] |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -17399,7 +18285,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17412,7 +18298,7 @@ Module collections. } } *) - Definition move_to_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition move_to_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src; dst ] => ltac:(M.monadic @@ -17421,16 +18307,16 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -17443,8 +18329,8 @@ Module collections. [] |), [ M.read (| src |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -17457,7 +18343,9 @@ Module collections. [] |), [ M.read (| dst |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -17465,12 +18353,17 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: src.len() == dst.len()" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: src.len() == dst.len()" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -17514,7 +18407,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/collections/btree/remove.v b/CoqOfRust/alloc/collections/btree/remove.v index 8b242bfea..f93178221 100644 --- a/CoqOfRust/alloc/collections/btree/remove.v +++ b/CoqOfRust/alloc/collections/btree/remove.v @@ -32,7 +32,7 @@ Module collections. } } *) - Definition remove_kv_tracking (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_kv_tracking (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ F; A ], [ self; handle_emptied_internal_root; alloc ] => @@ -214,7 +214,7 @@ Module collections. (old_kv, pos) } *) - Definition remove_leaf_kv (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_leaf_kv (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ F; A ], [ self; handle_emptied_internal_root; alloc ] => @@ -322,20 +322,21 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| len |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| len |), + M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -453,12 +454,15 @@ Module collections. let left_parent_kv := M.copy (| γ1_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| Value.Bool true |)) in + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -466,16 +470,18 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -485,17 +491,20 @@ Module collections. [] |), [ left_parent_kv ] - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) |), - Value.Integer - Integer.Usize - 1 - |))) + M.of_value (| + Value.Integer 1 + |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -511,8 +520,10 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: left_parent_kv.right_child_len() == MIN_LEN - 1" + M.of_value (| + Value.String + "assertion failed: left_parent_kv.right_child_len() == MIN_LEN - 1" + |) |) ] |) @@ -520,17 +531,23 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -566,9 +583,11 @@ Module collections. |), [ M.read (| left_parent_kv |); - Value.StructTuple - "alloc::collections::btree::node::LeftOrRight::Right" - [ M.read (| idx |) ]; + M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::LeftOrRight::Right" + [ A.to_value (M.read (| idx |)) ] + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", @@ -586,14 +605,18 @@ Module collections. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -602,16 +625,20 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -623,12 +650,14 @@ Module collections. [ left_parent_kv ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -644,8 +673,10 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: left_parent_kv.left_child_len() > MIN_LEN" + M.of_value (| + Value.String + "assertion failed: left_parent_kv.left_child_len() > MIN_LEN" + |) |) ] |) @@ -654,14 +685,20 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.alloc (| @@ -699,12 +736,15 @@ Module collections. let right_parent_kv := M.copy (| γ1_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| Value.Bool true |)) in + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -712,16 +752,18 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -731,17 +773,20 @@ Module collections. [] |), [ right_parent_kv ] - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) |), - Value.Integer - Integer.Usize - 1 - |))) + M.of_value (| + Value.Integer 1 + |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -757,8 +802,10 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: right_parent_kv.left_child_len() == MIN_LEN - 1" + M.of_value (| + Value.String + "assertion failed: right_parent_kv.left_child_len() == MIN_LEN - 1" + |) |) ] |) @@ -766,17 +813,23 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -812,9 +865,11 @@ Module collections. |), [ M.read (| right_parent_kv |); - Value.StructTuple - "alloc::collections::btree::node::LeftOrRight::Left" - [ M.read (| idx |) ]; + M.of_value (| + Value.StructTuple + "alloc::collections::btree::node::LeftOrRight::Left" + [ A.to_value (M.read (| idx |)) ] + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", @@ -832,14 +887,18 @@ Module collections. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -848,16 +907,20 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -869,12 +932,14 @@ Module collections. [ right_parent_kv ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -890,8 +955,10 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: right_parent_kv.right_child_len() > MIN_LEN" + M.of_value (| + Value.String + "assertion failed: right_parent_kv.right_child_len() > MIN_LEN" + |) |) ] |) @@ -900,14 +967,20 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.alloc (| @@ -995,7 +1068,7 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1080,15 +1153,15 @@ Module collections. |) in let parent := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1151,7 +1224,8 @@ Module collections. |); M.read (| alloc |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1170,22 +1244,31 @@ Module collections. |), [ M.read (| handle_emptied_internal_root |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [ M.read (| old_kv |); M.read (| pos |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| old_kv |)); A.to_value (M.read (| pos |)) ] + |) + |))) ] |) |))) @@ -1234,7 +1317,7 @@ Module collections. (old_kv, pos) } *) - Definition remove_internal_kv (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_internal_kv (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ F; A ], [ self; handle_emptied_internal_root; alloc ] => @@ -1563,7 +1646,12 @@ Module collections. [ M.read (| internal |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| old_kv |); M.read (| pos |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| old_kv |)); A.to_value (M.read (| pos |)) ] + |) + |))) ] |) |))) diff --git a/CoqOfRust/alloc/collections/btree/search.v b/CoqOfRust/alloc/collections/btree/search.v index 328ea5b8b..aeae60e52 100644 --- a/CoqOfRust/alloc/collections/btree/search.v +++ b/CoqOfRust/alloc/collections/btree/search.v @@ -47,7 +47,7 @@ Module collections. } } *) - Definition from_range (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_range (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ range_bound ] => @@ -67,9 +67,11 @@ Module collections. |) in let t := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::search::SearchBound::Included" - [ M.read (| t |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::Included" + [ A.to_value (M.read (| t |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -81,16 +83,20 @@ Module collections. |) in let t := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::search::SearchBound::Excluded" - [ M.read (| t |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::Excluded" + [ A.to_value (M.read (| t |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "alloc::collections::btree::search::SearchBound::AllIncluded" - [] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::AllIncluded" + [] + |) |))) ] |) @@ -191,7 +197,7 @@ Module collections. } } *) - Definition search_tree (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition search_tree (BorrowType K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with | [ Q ], [ self; key ] => @@ -240,9 +246,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "alloc::collections::btree::search::SearchResult::Found" - [ M.read (| handle |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchResult::Found" + [ A.to_value (M.read (| handle |)) ] + |) |) |) |) @@ -296,9 +304,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "alloc::collections::btree::search::SearchResult::GoDown" - [ M.read (| leaf |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchResult::GoDown" + [ A.to_value (M.read (| leaf |)) ] + |) |) |) |) @@ -430,7 +440,7 @@ Module collections. Definition search_tree_for_bifurcation (BorrowType K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with @@ -456,29 +466,33 @@ Module collections. |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::range::RangeBounds", - R, - [ Q ], - "start_bound", - [] - |), - [ M.read (| range |) ] - |); - M.call_closure (| - M.get_trait_method (| - "core::ops::range::RangeBounds", - R, - [ Q ], - "end_bound", - [] - |), - [ M.read (| range |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::range::RangeBounds", + R, + [ Q ], + "start_bound", + [] + |), + [ M.read (| range |) ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::range::RangeBounds", + R, + [ Q ], + "end_bound", + [] + |), + [ M.read (| range |) ] + |)) + ] + |) |), [ fun γ => @@ -489,7 +503,15 @@ Module collections. let end_ := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| start |); M.read (| end_ |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| start |)); + A.to_value (M.read (| end_ |)) + ] + |) + |), [ fun γ => ltac:(M.monadic @@ -528,7 +550,7 @@ Module collections. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -554,16 +576,22 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "range start and end are equal and excluded in BTreeSet" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "range start and end are equal and excluded in BTreeSet" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -588,16 +616,22 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "range start and end are equal and excluded in BTreeMap" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "range start and end are equal and excluded in BTreeMap" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -622,7 +656,7 @@ Module collections. 0 |) in let s := M.copy (| γ0_0 |) in - Value.Tuple [ s ])); + M.of_value (| Value.Tuple [ A.to_value s ] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -632,10 +666,10 @@ Module collections. 0 |) in let s := M.copy (| γ0_0 |) in - Value.Tuple [ s ])) + M.of_value (| Value.Tuple [ A.to_value s ] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ s ] => @@ -651,7 +685,9 @@ Module collections. 0 |) in let e := M.copy (| γ0_0 |) in - Value.Tuple [ e ])); + M.of_value (| + Value.Tuple [ A.to_value e ] + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -661,10 +697,12 @@ Module collections. 0 |) in let e := M.copy (| γ0_0 |) in - Value.Tuple [ e ])) + M.of_value (| + Value.Tuple [ A.to_value e ] + |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ e ] => @@ -687,7 +725,9 @@ Module collections. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic @@ -714,16 +754,22 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "range start is greater than range end in BTreeSet" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "range start is greater than range end in BTreeSet" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -749,16 +795,22 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "range start is greater than range end in BTreeMap" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "range start is greater than range end in BTreeMap" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -768,12 +820,15 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let lower_bound := @@ -869,20 +924,19 @@ Module collections. let upper_child_bound := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| - lower_edge_idx - |)) - (M.read (| - upper_edge_idx - |)) + BinOp.Pure.lt (| + M.read (| lower_edge_idx |), + M.read (| upper_edge_idx |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -893,45 +947,63 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.Tuple - [ - M.read (| self |); - M.read (| - lower_edge_idx - |); - M.read (| - upper_edge_idx - |); - M.read (| - lower_child_bound - |); - M.read (| - upper_child_bound - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + self + |)); + A.to_value + (M.read (| + lower_edge_idx + |)); + A.to_value + (M.read (| + upper_edge_idx + |)); + A.to_value + (M.read (| + lower_child_bound + |)); + A.to_value + (M.read (| + upper_child_bound + |)) + ] + |)) + ] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -941,11 +1013,15 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - lower_edge_idx; - upper_edge_idx - ] + M.of_value (| + Value.Tuple + [ + A.to_value + lower_edge_idx; + A.to_value + upper_edge_idx + ] + |) |), [ fun γ => @@ -966,7 +1042,9 @@ Module collections. M.copy (| γ0_1 |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -974,18 +1052,20 @@ Module collections. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1000,9 +1080,11 @@ Module collections. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -1025,9 +1107,11 @@ Module collections. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -1037,16 +1121,22 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let common_edge := @@ -1121,9 +1211,16 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ M.read (| common_edge |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.read (| + common_edge + |)) + ] + |) |) |) |) @@ -1176,7 +1273,9 @@ Module collections. upper_bound, M.read (| upper_child_bound |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] @@ -1218,7 +1317,7 @@ Module collections. Definition find_lower_bound_edge (BorrowType K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with @@ -1276,7 +1375,12 @@ Module collections. [ M.read (| self |); M.read (| edge_idx |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| edge |); M.read (| bound |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| edge |)); A.to_value (M.read (| bound |)) ] + |) + |))) ] |) |))) @@ -1307,7 +1411,7 @@ Module collections. Definition find_upper_bound_edge (BorrowType K V : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V in match τ, α with @@ -1331,7 +1435,7 @@ Module collections. "find_upper_bound_index", [ Q ] |), - [ self; M.read (| bound |); Value.Integer Integer.Usize 0 ] + [ self; M.read (| bound |); M.of_value (| Value.Integer 0 |) ] |) |), [ @@ -1365,7 +1469,12 @@ Module collections. [ M.read (| self |); M.read (| edge_idx |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| edge |); M.read (| bound |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| edge |)); A.to_value (M.read (| bound |)) ] + |) + |))) ] |) |))) @@ -1396,11 +1505,7 @@ Module collections. } } *) - Definition search_node - (BorrowType K V Type_ : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition search_node (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with | [ Q ], [ self; key ] => @@ -1418,7 +1523,7 @@ Module collections. "find_key_index", [ Q ] |), - [ self; M.read (| key |); Value.Integer Integer.Usize 0 ] + [ self; M.read (| key |); M.of_value (| Value.Integer 0 |) ] |) |), [ @@ -1432,25 +1537,28 @@ Module collections. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::search::SearchResult::Found" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchResult::Found" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ BorrowType; K; V; Type_ ]; - Ty.path "alloc::collections::btree::node::marker::KV" - ], - "new_kv", - [] - |), - [ M.read (| self |); M.read (| idx |) ] - |) - ] + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ BorrowType; K; V; Type_ ]; + Ty.path "alloc::collections::btree::node::marker::KV" + ], + "new_kv", + [] + |), + [ M.read (| self |); M.read (| idx |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1462,25 +1570,28 @@ Module collections. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::search::SearchResult::GoDown" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchResult::GoDown" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ BorrowType; K; V; Type_ ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ], - "new_edge", - [] - |), - [ M.read (| self |); M.read (| idx |) ] - |) - ] + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ BorrowType; K; V; Type_ ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ], + "new_edge", + [] + |), + [ M.read (| self |); M.read (| idx |) ] + |)) + ] + |) |))) ] |) @@ -1517,7 +1628,7 @@ Module collections. Definition find_key_index (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with @@ -1562,11 +1673,11 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1574,24 +1685,26 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| start_index |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| start_index |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ K ], "len", [] |), [ M.read (| keys |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1604,18 +1717,22 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: start_index <= keys.len()" + M.of_value (| + Value.String + "assertion failed: start_index <= keys.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1661,9 +1778,11 @@ Module collections. |), [ M.read (| keys |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| start_index |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| start_index |))) ] + |) ] |) ] @@ -1744,21 +1863,28 @@ Module collections. |), [ fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))); + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "alloc::collections::btree::search::IndexResult::KV" - [ - BinOp.Panic.add (| - M.read (| start_index |), - M.read (| offset |) - |) - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::IndexResult::KV" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| start_index |), + M.read (| offset |) + |)) + ] + |) |) |) |) @@ -1769,14 +1895,18 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "alloc::collections::btree::search::IndexResult::Edge" - [ - BinOp.Panic.add (| - M.read (| start_index |), - M.read (| offset |) - |) - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::IndexResult::Edge" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| start_index |), + M.read (| offset |) + |)) + ] + |) |) |) |) @@ -1785,23 +1915,26 @@ Module collections. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.alloc (| - Value.StructTuple - "alloc::collections::btree::search::IndexResult::Edge" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ K ], - "len", - [] - |), - [ M.read (| keys |) ] - |) - ] + M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::IndexResult::Edge" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ K ], + "len", + [] + |), + [ M.read (| keys |) ] + |)) + ] + |) |) |))) |))) @@ -1841,7 +1974,7 @@ Module collections. Definition find_lower_bound_index (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with @@ -1872,7 +2005,11 @@ Module collections. "find_key_index", [ Q ] |), - [ M.read (| self |); M.read (| key |); Value.Integer Integer.Usize 0 ] + [ + M.read (| self |); + M.read (| key |); + M.of_value (| Value.Integer 0 |) + ] |) |), [ @@ -1886,13 +2023,18 @@ Module collections. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - Value.Tuple - [ - M.read (| idx |); - Value.StructTuple - "alloc::collections::btree::search::SearchBound::AllExcluded" - [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| idx |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::AllExcluded" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1903,7 +2045,15 @@ Module collections. 0 |) in let idx := M.copy (| γ0_0 |) in - M.alloc (| Value.Tuple [ M.read (| idx |); M.read (| bound |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| idx |)); + A.to_value (M.read (| bound |)) + ] + |) + |))) ] |))); fun γ => @@ -1925,7 +2075,11 @@ Module collections. "find_key_index", [ Q ] |), - [ M.read (| self |); M.read (| key |); Value.Integer Integer.Usize 0 ] + [ + M.read (| self |); + M.read (| key |); + M.of_value (| Value.Integer 0 |) + ] |) |), [ @@ -1939,16 +2093,23 @@ Module collections. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| idx |), - Value.Integer Integer.Usize 1 - |); - Value.StructTuple - "alloc::collections::btree::search::SearchBound::AllIncluded" - [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| idx |), + M.of_value (| Value.Integer 1 |) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::AllIncluded" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1959,39 +2120,58 @@ Module collections. 0 |) in let idx := M.copy (| γ0_0 |) in - M.alloc (| Value.Tuple [ M.read (| idx |); M.read (| bound |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| idx |)); + A.to_value (M.read (| bound |)) + ] + |) + |))) ] |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "alloc::collections::btree::search::SearchBound::AllIncluded" - [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::AllIncluded" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ BorrowType; K; V; Type_ ], - "len", - [] - |), - [ M.read (| self |) ] - |); - Value.StructTuple - "alloc::collections::btree::search::SearchBound::AllExcluded" - [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ BorrowType; K; V; Type_ ], + "len", + [] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::AllExcluded" + [] + |)) + ] + |) |))) ] |) @@ -2033,7 +2213,7 @@ Module collections. Definition find_upper_bound_index (BorrowType K V Type_ : Ty.t) (τ : list Ty.t) - (α : list Value.t) + (α : list A.t) : M := let Self : Ty.t := Self BorrowType K V Type_ in match τ, α with @@ -2079,16 +2259,23 @@ Module collections. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| idx |), - Value.Integer Integer.Usize 1 - |); - Value.StructTuple - "alloc::collections::btree::search::SearchBound::AllExcluded" - [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| idx |), + M.of_value (| Value.Integer 1 |) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::AllExcluded" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2099,7 +2286,15 @@ Module collections. 0 |) in let idx := M.copy (| γ0_0 |) in - M.alloc (| Value.Tuple [ M.read (| idx |); M.read (| bound |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| idx |)); + A.to_value (M.read (| bound |)) + ] + |) + |))) ] |))); fun γ => @@ -2135,13 +2330,18 @@ Module collections. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - Value.Tuple - [ - M.read (| idx |); - Value.StructTuple - "alloc::collections::btree::search::SearchBound::AllIncluded" - [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| idx |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::AllIncluded" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2152,39 +2352,58 @@ Module collections. 0 |) in let idx := M.copy (| γ0_0 |) in - M.alloc (| Value.Tuple [ M.read (| idx |); M.read (| bound |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| idx |)); + A.to_value (M.read (| bound |)) + ] + |) + |))) ] |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ BorrowType; K; V; Type_ ], - "len", - [] - |), - [ M.read (| self |) ] - |); - Value.StructTuple - "alloc::collections::btree::search::SearchBound::AllIncluded" - [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ BorrowType; K; V; Type_ ], + "len", + [] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::AllIncluded" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.read (| start_index |); - Value.StructTuple - "alloc::collections::btree::search::SearchBound::AllExcluded" - [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| start_index |)); + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::search::SearchBound::AllExcluded" + [] + |)) + ] + |) |))) ] |) diff --git a/CoqOfRust/alloc/collections/btree/set.v b/CoqOfRust/alloc/collections/btree/set.v index e860e2e2d..0004ee5e4 100644 --- a/CoqOfRust/alloc/collections/btree/set.v +++ b/CoqOfRust/alloc/collections/btree/set.v @@ -26,7 +26,7 @@ Module collections. self.map.hash(state) } *) - Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ H ], [ self; state ] => @@ -73,7 +73,7 @@ Module collections. self.map.eq(&other.map) } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -141,7 +141,7 @@ Module collections. self.map.partial_cmp(&other.map) } *) - Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -196,7 +196,7 @@ Module collections. self.map.cmp(&other.map) } *) - Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -247,35 +247,38 @@ Module collections. BTreeSet { map: self.map.clone() } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::set::BTreeSet" - [ - ("map", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::set::BTreeSet", - "map" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::BTreeSet" + [ + ("map", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::set::BTreeSet", + "map" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -284,7 +287,7 @@ Module collections. self.map.clone_from(&other.map); } *) - Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -318,7 +321,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -358,7 +361,7 @@ Module collections. f.debug_tuple("Iter").field(&self.iter.clone()).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -386,12 +389,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Iter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Iter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", @@ -410,7 +413,8 @@ Module collections. |) ] |) - |)) + |) + |) ] |) ] @@ -445,7 +449,7 @@ Module collections. Ty.apply (Ty.path "alloc::collections::btree::set::IntoIter") [ T; A ]. (* Debug *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -460,17 +464,18 @@ Module collections. |), [ M.read (| f |); - M.read (| Value.String "IntoIter" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "IntoIter" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::set::IntoIter", "iter" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -503,7 +508,7 @@ Module collections. Ty.apply (Ty.path "alloc::collections::btree::set::Range") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -518,17 +523,18 @@ Module collections. |), [ M.read (| f |); - M.read (| Value.String "Range" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "Range" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::set::Range", "iter" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -617,7 +623,7 @@ Module collections. } } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -674,15 +680,18 @@ Module collections. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Stitch" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Stitch" |) |) + ] |) |); - M.read (| Value.String "self_iter" |); - (* Unsize *) M.pointer_coercion (M.read (| self_iter |)) + M.read (| M.of_value (| Value.String "self_iter" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| self_iter |) |) ] |); - M.read (| Value.String "other_iter" |); - (* Unsize *) M.pointer_coercion (M.read (| other_iter |)) + M.read (| M.of_value (| Value.String "other_iter" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| other_iter |) |) ] |) ] @@ -734,15 +743,18 @@ Module collections. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Search" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Search" |) |) + ] |) |); - M.read (| Value.String "self_iter" |); - (* Unsize *) M.pointer_coercion (M.read (| self_iter |)) + M.read (| M.of_value (| Value.String "self_iter" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| self_iter |) |) ] |); - M.read (| Value.String "other_iter" |); - (* Unsize *) M.pointer_coercion (M.read (| other_set |)) + M.read (| M.of_value (| Value.String "other_iter" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| other_set |) |) ] |) ] @@ -780,10 +792,13 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Iterate" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Iterate" |) |) + ] |) |); - (* Unsize *) M.pointer_coercion (M.read (| x |)) + (* Unsize *) M.pointer_coercion (| M.read (| x |) |) ] |) ] @@ -813,7 +828,7 @@ Module collections. f.debug_tuple("Difference").field(&self.inner).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -841,16 +856,18 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Difference" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Difference" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::set::Difference", "inner" - |)) + |) + |) ] |) ] @@ -888,7 +905,7 @@ Module collections. f.debug_tuple("SymmetricDifference").field(&self.0).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -916,16 +933,20 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "SymmetricDifference" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SymmetricDifference" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "alloc::collections::btree::set::SymmetricDifference", 0 - |)) + |) + |) ] |) ] @@ -1012,7 +1033,7 @@ Module collections. } } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -1069,15 +1090,18 @@ Module collections. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Stitch" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Stitch" |) |) + ] |) |); - M.read (| Value.String "a" |); - (* Unsize *) M.pointer_coercion (M.read (| a |)) + M.read (| M.of_value (| Value.String "a" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| a |) |) ] |); - M.read (| Value.String "b" |); - (* Unsize *) M.pointer_coercion (M.read (| b |)) + M.read (| M.of_value (| Value.String "b" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| b |) |) ] |) ] @@ -1129,15 +1153,18 @@ Module collections. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Search" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Search" |) |) + ] |) |); - M.read (| Value.String "small_iter" |); - (* Unsize *) M.pointer_coercion (M.read (| small_iter |)) + M.read (| M.of_value (| Value.String "small_iter" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| small_iter |) |) ] |); - M.read (| Value.String "large_set" |); - (* Unsize *) M.pointer_coercion (M.read (| large_set |)) + M.read (| M.of_value (| Value.String "large_set" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| large_set |) |) ] |) ] @@ -1175,10 +1202,13 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Answer" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Answer" |) |) + ] |) |); - (* Unsize *) M.pointer_coercion (M.read (| x |)) + (* Unsize *) M.pointer_coercion (| M.read (| x |) |) ] |) ] @@ -1208,7 +1238,7 @@ Module collections. f.debug_tuple("Intersection").field(&self.inner).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -1236,16 +1266,20 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Intersection" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Intersection" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::set::Intersection", "inner" - |)) + |) + |) ] |) ] @@ -1283,7 +1317,7 @@ Module collections. f.debug_tuple("Union").field(&self.0).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -1311,16 +1345,17 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Union" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Union" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "alloc::collections::btree::set::Union", 0 - |)) + |) + |) ] |) ] @@ -1337,8 +1372,8 @@ Module collections. (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ]. End Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_alloc_collections_btree_set_Union_T. - Definition value_ITER_PERFORMANCE_TIPPING_SIZE_DIFF : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 16 |))). + Definition value_ITER_PERFORMANCE_TIPPING_SIZE_DIFF : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 16 |) |))). Module Impl_alloc_collections_btree_set_BTreeSet_T_alloc_alloc_Global. Definition Self (T : Ty.t) : Ty.t := @@ -1351,30 +1386,33 @@ Module collections. BTreeSet { map: BTreeMap::new() } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::set::BTreeSet" - [ - ("map", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ - T; - Ty.path "alloc::collections::btree::set_val::SetValZST"; - Ty.path "alloc::alloc::Global" - ], - "new", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::BTreeSet" + [ + ("map", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ + T; + Ty.path "alloc::collections::btree::set_val::SetValZST"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1392,27 +1430,30 @@ Module collections. BTreeSet { map: BTreeMap::new_in(alloc) } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => ltac:(M.monadic (let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::collections::btree::set::BTreeSet" - [ - ("map", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], - "new_in", - [] - |), - [ M.read (| alloc |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::BTreeSet" + [ + ("map", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], + "new_in", + [] + |), + [ M.read (| alloc |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1430,35 +1471,38 @@ Module collections. Range { iter: self.map.range(range) } } *) - Definition range (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition range (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ K; R ], [ self; range ] => ltac:(M.monadic (let self := M.alloc (| self |) in let range := M.alloc (| range |) in - Value.StructRecord - "alloc::collections::btree::set::Range" - [ - ("iter", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], - "range", - [ K; R ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::set::BTreeSet", - "map" - |); - M.read (| range |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Range" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], + "range", + [ K; R ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::set::BTreeSet", + "map" + |); + M.read (| range |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1507,7 +1551,7 @@ Module collections. } } *) - Definition difference (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition difference (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -1519,35 +1563,39 @@ Module collections. (M.read (| M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "first", - [] - |), - [ M.read (| self |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "last", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "first", + [] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "last", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) |) in let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in @@ -1566,7 +1614,13 @@ Module collections. |) in let self_max := M.copy (| γ1_0 |) in M.alloc (| - Value.Tuple [ M.read (| self_min |); M.read (| self_max |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self_min |)); + A.to_value (M.read (| self_max |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1574,26 +1628,32 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::collections::btree::set::Difference" - [ - ("inner", - Value.StructTuple - "alloc::collections::btree::set::DifferenceInner::Iterate" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", - [] - |), - [ M.read (| self |) ] - |) - ]) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Difference" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::DifferenceInner::Iterate" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |)) + ] + |))) + ] + |) |) |) |) @@ -1609,37 +1669,41 @@ Module collections. let self_max := M.copy (| γ0_1 |) in M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "first", - [] - |), - [ M.read (| other |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "last", - [] - |), - [ M.read (| other |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "first", + [] + |), + [ M.read (| other |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "last", + [] + |), + [ M.read (| other |) ] + |)) + ] + |) |) in let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in @@ -1658,8 +1722,13 @@ Module collections. |) in let other_max := M.copy (| γ1_0 |) in M.alloc (| - Value.Tuple - [ M.read (| other_min |); M.read (| other_max |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| other_min |)); + A.to_value (M.read (| other_max |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1667,26 +1736,32 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::collections::btree::set::Difference" - [ - ("inner", - Value.StructTuple - "alloc::collections::btree::set::DifferenceInner::Iterate" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", - [] - |), - [ M.read (| self |) ] - |) - ]) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Difference" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::DifferenceInner::Iterate" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |)) + ] + |))) + ] + |) |) |) |) @@ -1701,249 +1776,178 @@ Module collections. let other_min := M.copy (| γ0_0 |) in let other_max := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::Difference" - [ - ("inner", - M.read (| - M.match_operator (| - M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - T, - [], - "cmp", - [] - |), - [ - M.read (| self_min |); - M.read (| other_max |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - T, - [], - "cmp", - [] - |), - [ - M.read (| self_max |); - M.read (| other_min |) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Difference" + [ + ("inner", + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + T, + [], + "cmp", + [] + |), + [ + M.read (| self_min |); + M.read (| other_max |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + T, + [], + "cmp", + [] + |), + [ + M.read (| self_max |); + M.read (| other_min |) + ] + |)) + ] |) - ] - |), - [ - fun γ => - ltac:(M.monadic - (M.find_or_pattern (| - γ, - [ - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_tuple_field (| - γ, - 0 - |) in - let γ0_1 := - M.SubPointer.get_tuple_field (| - γ, - 1 - |) in - Value.Tuple [])); - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_tuple_field (| - γ, - 0 - |) in - let γ0_1 := - M.SubPointer.get_tuple_field (| - γ, - 1 - |) in - Value.Tuple [])) - ], - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [] => - M.alloc (| - Value.StructTuple - "alloc::collections::btree::set::DifferenceInner::Iterate" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", - [] - |), - [ M.read (| self |) ] + |), + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_tuple_field (| + γ, + 0 + |) in + let γ0_1 := + M.SubPointer.get_tuple_field (| + γ, + 1 + |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_tuple_field (| + γ, + 0 + |) in + let γ0_1 := + M.SubPointer.get_tuple_field (| + γ, + 1 + |) in + M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::DifferenceInner::Iterate" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| self |) + ] + |)) + ] |) - ] - |) - | _ => M.impossible (||) - end)) - |))); - 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 self_iter := - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", - [] - |), - [ M.read (| self |) ] - |) - |) in - let _ := - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path - "alloc::collections::btree::set::Iter") - [ T ], - [], - "next", - [] - |), - [ self_iter ] - |) - |) in - M.alloc (| - Value.StructTuple - "alloc::collections::btree::set::DifferenceInner::Iterate" - [ M.read (| self_iter |) ] - |))); - 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 self_iter := - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", - [] - |), - [ M.read (| self |) ] - |) - |) in - let _ := - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::double_ended::DoubleEndedIterator", - Ty.apply - (Ty.path - "alloc::collections::btree::set::Iter") - [ T ], - [], - "next_back", - [] - |), - [ self_iter ] - |) - |) in - M.alloc (| - Value.StructTuple - "alloc::collections::btree::set::DifferenceInner::Iterate" - [ M.read (| self_iter |) ] - |))); - fun γ => - ltac:(M.monadic - (let γ := - M.alloc (| - BinOp.Pure.le - (M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "len", - [] - |), - [ M.read (| self |) ] - |)) - (BinOp.Panic.div (| + |) + | _ => M.impossible (||) + end) + |) + |))); + 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 self_iter := + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::set::BTreeSet") [ T; A ], - "len", + "iter", [] |), - [ M.read (| other |) ] - |), - M.read (| - M.get_constant (| - "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" - |) + [ M.read (| self |) ] |) - |)) - |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::DifferenceInner::Search" - [ - ("self_iter", + |) in + let _ := + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", Ty.apply (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", + "alloc::collections::btree::set::Iter") + [ T ], + [], + "next", [] |), - [ M.read (| self |) ] - |)); - ("other_set", M.read (| other |)) - ] - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::DifferenceInner::Stitch" - [ - ("self_iter", + [ self_iter ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::DifferenceInner::Iterate" + [ + A.to_value + (M.read (| self_iter |)) + ] + |) + |))); + 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 self_iter := + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -1954,39 +1958,154 @@ Module collections. [] |), [ M.read (| self |) ] - |)); - ("other_iter", + |) + |) in + let _ := + M.alloc (| M.call_closure (| M.get_trait_method (| - "core::iter::traits::iterator::Iterator", + "core::iter::traits::double_ended::DoubleEndedIterator", Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ], [], - "peekable", + "next_back", [] |), + [ self_iter ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::DifferenceInner::Iterate" [ + A.to_value + (M.read (| self_iter |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + BinOp.Pure.le (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "len", + [] + |), + [ M.read (| self |) ] + |), + BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::set::BTreeSet") [ T; A ], - "iter", + "len", [] |), [ M.read (| other |) ] + |), + M.read (| + M.get_constant (| + "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" + |) |) + |) + |) + |) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::DifferenceInner::Search" + [ + ("self_iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |))); + ("other_set", + A.to_value (M.read (| other |))) ] - |)) - ] - |))) - ] - |) - |)) - ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::DifferenceInner::Stitch" + [ + ("self_iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |))); + ("other_iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path + "alloc::collections::btree::set::Iter") + [ T ], + [], + "peekable", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| other |) ] + |) + ] + |))) + ] + |) + |))) + ] + |) + |))) + ] + |) |))) ] |))) @@ -2012,44 +2131,51 @@ Module collections. SymmetricDifference(MergeIterInner::new(self.iter(), other.iter())) } *) - Definition symmetric_difference (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition symmetric_difference (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "alloc::collections::btree::set::SymmetricDifference" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") - [ Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ] ], - "new", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::btree::set::BTreeSet") [ T; A ], - "iter", - [] - |), - [ M.read (| self |) ] - |); - M.call_closure (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::SymmetricDifference" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::btree::set::BTreeSet") [ T; A ], - "iter", + Ty.apply + (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") + [ Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ] ], + "new", [] |), - [ M.read (| other |) ] - |) - ] - |) - ])) + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| other |) ] + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2090,7 +2216,7 @@ Module collections. } } *) - Definition intersection (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition intersection (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2102,35 +2228,39 @@ Module collections. (M.read (| M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "first", - [] - |), - [ M.read (| self |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "last", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "first", + [] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "last", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) |) in let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in @@ -2149,7 +2279,13 @@ Module collections. |) in let self_max := M.copy (| γ1_0 |) in M.alloc (| - Value.Tuple [ M.read (| self_min |); M.read (| self_max |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self_min |)); + A.to_value (M.read (| self_max |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2157,14 +2293,26 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::collections::btree::set::Intersection" - [ - ("inner", - Value.StructTuple - "alloc::collections::btree::set::IntersectionInner::Answer" - [ Value.StructTuple "core::option::Option::None" [] ]) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Intersection" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::IntersectionInner::Answer" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |)) + ] + |))) + ] + |) |) |) |) @@ -2180,37 +2328,41 @@ Module collections. let self_max := M.copy (| γ0_1 |) in M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "first", - [] - |), - [ M.read (| other |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "last", - [] - |), - [ M.read (| other |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "first", + [] + |), + [ M.read (| other |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "last", + [] + |), + [ M.read (| other |) ] + |)) + ] + |) |) in let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in @@ -2229,8 +2381,13 @@ Module collections. |) in let other_max := M.copy (| γ1_0 |) in M.alloc (| - Value.Tuple - [ M.read (| other_min |); M.read (| other_max |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| other_min |)); + A.to_value (M.read (| other_max |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2238,18 +2395,26 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::collections::btree::set::Intersection" - [ - ("inner", - Value.StructTuple - "alloc::collections::btree::set::IntersectionInner::Answer" - [ - Value.StructTuple - "core::option::Option::None" - [] - ]) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Intersection" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::IntersectionInner::Answer" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |)) + ] + |))) + ] + |) |) |) |) @@ -2264,277 +2429,334 @@ Module collections. let other_min := M.copy (| γ0_0 |) in let other_max := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::Intersection" - [ - ("inner", - M.read (| - M.match_operator (| - M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - T, - [], - "cmp", - [] - |), - [ - M.read (| self_min |); - M.read (| other_max |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - T, - [], - "cmp", - [] - |), - [ - M.read (| self_max |); - M.read (| other_min |) - ] - |) - ] - |), - [ - fun γ => - ltac:(M.monadic - (M.find_or_pattern (| - γ, - [ - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_tuple_field (| - γ, - 0 - |) in - let γ0_1 := - M.SubPointer.get_tuple_field (| - γ, - 1 - |) in - Value.Tuple [])); - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_tuple_field (| - γ, - 0 - |) in - let γ0_1 := - M.SubPointer.get_tuple_field (| - γ, - 1 - |) in - Value.Tuple [])) - ], - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [] => - M.alloc (| - Value.StructTuple - "alloc::collections::btree::set::IntersectionInner::Answer" - [ - Value.StructTuple - "core::option::Option::None" - [] - ] - |) - | _ => M.impossible (||) - end)) - |))); - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_tuple_field (| γ, 0 |) in - let γ0_1 := - M.SubPointer.get_tuple_field (| γ, 1 |) in - M.alloc (| - Value.StructTuple - "alloc::collections::btree::set::IntersectionInner::Answer" - [ - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self_min |) ] - ] - |))); - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_tuple_field (| γ, 0 |) in - let γ0_1 := - M.SubPointer.get_tuple_field (| γ, 1 |) in - M.alloc (| - Value.StructTuple - "alloc::collections::btree::set::IntersectionInner::Answer" + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Intersection" + [ + ("inner", + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [ - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self_max |) ] - ] - |))); - fun γ => - ltac:(M.monadic - (let γ := - M.alloc (| - BinOp.Pure.le - (M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "len", - [] - |), - [ M.read (| self |) ] - |)) - (BinOp.Panic.div (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "len", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + T, + [], + "cmp", [] |), - [ M.read (| other |) ] - |), - M.read (| - M.get_constant (| - "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" - |) - |) - |)) - |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::IntersectionInner::Search" - [ - ("small_iter", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", + [ + M.read (| self_min |); + M.read (| other_max |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + T, + [], + "cmp", [] |), - [ M.read (| self |) ] - |)); - ("large_set", M.read (| other |)) + [ + M.read (| self_max |); + M.read (| other_min |) + ] + |)) ] - |))); - fun γ => - ltac:(M.monadic - (let γ := - M.alloc (| - BinOp.Pure.le - (M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "len", - [] - |), - [ M.read (| other |) ] - |)) - (BinOp.Panic.div (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "len", - [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_tuple_field (| + γ, + 0 + |) in + let γ0_1 := + M.SubPointer.get_tuple_field (| + γ, + 1 + |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_tuple_field (| + γ, + 0 + |) in + let γ0_1 := + M.SubPointer.get_tuple_field (| + γ, + 1 + |) in + M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::IntersectionInner::Answer" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |)) + ] + |) + |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_tuple_field (| + γ, + 0 + |) in + let γ0_1 := + M.SubPointer.get_tuple_field (| + γ, + 1 + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::IntersectionInner::Answer" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| self_min |)) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_tuple_field (| + γ, + 0 + |) in + let γ0_1 := + M.SubPointer.get_tuple_field (| + γ, + 1 + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::IntersectionInner::Answer" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| self_max |)) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + BinOp.Pure.le (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "len", + [] + |), + [ M.read (| self |) ] |), - [ M.read (| self |) ] - |), - M.read (| - M.get_constant (| - "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" + BinOp.Panic.div (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "len", + [] + |), + [ M.read (| other |) ] + |), + M.read (| + M.get_constant (| + "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" + |) + |) |) |) - |)) - |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::IntersectionInner::Search" - [ - ("small_iter", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", - [] - |), - [ M.read (| other |) ] - |)); - ("large_set", M.read (| self |)) - ] - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::IntersectionInner::Stitch" - [ - ("a", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", - [] - |), - [ M.read (| self |) ] - |)); - ("b", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "iter", - [] + |) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::IntersectionInner::Search" + [ + ("small_iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |))); + ("large_set", + A.to_value (M.read (| other |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + BinOp.Pure.le (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "len", + [] + |), + [ M.read (| other |) ] |), - [ M.read (| other |) ] - |)) - ] - |))) - ] - |) - |)) - ] + BinOp.Panic.div (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "len", + [] + |), + [ M.read (| self |) ] + |), + M.read (| + M.get_constant (| + "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" + |) + |) + |) + |) + |) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::IntersectionInner::Search" + [ + ("small_iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| other |) ] + |))); + ("large_set", + A.to_value (M.read (| self |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::IntersectionInner::Stitch" + [ + ("a", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |))); + ("b", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| other |) ] + |))) + ] + |) + |))) + ] + |) + |))) + ] + |) |))) ] |))) @@ -2557,44 +2779,51 @@ Module collections. Union(MergeIterInner::new(self.iter(), other.iter())) } *) - Definition union (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition union (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "alloc::collections::btree::set::Union" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") - [ Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ] ], - "new", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::btree::set::BTreeSet") [ T; A ], - "iter", - [] - |), - [ M.read (| self |) ] - |); - M.call_closure (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::Union" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::btree::set::BTreeSet") [ T; A ], - "iter", + Ty.apply + (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") + [ Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ] ], + "new", [] |), - [ M.read (| other |) ] - |) - ] - |) - ])) + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| self |) ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "iter", + [] + |), + [ M.read (| other |) ] + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2610,7 +2839,7 @@ Module collections. self.map.clear() } *) - Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2648,7 +2877,7 @@ Module collections. self.map.contains_key(value) } *) - Definition contains (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ Q ], [ self; value ] => @@ -2688,7 +2917,7 @@ Module collections. Recover::get(&self.map, value) } *) - Definition get (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ Q ], [ self; value ] => @@ -2729,7 +2958,7 @@ Module collections. self.intersection(other).next().is_none() } *) - Definition is_disjoint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_disjoint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2836,7 +3065,7 @@ Module collections. true } *) - Definition is_subset (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_subset (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -2848,15 +3077,15 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::set::BTreeSet") @@ -2865,8 +3094,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::set::BTreeSet") @@ -2875,7 +3104,8 @@ Module collections. [] |), [ M.read (| other |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2883,42 +3113,48 @@ Module collections. Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "first", - [] - |), - [ M.read (| self |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "last", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "first", + [] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "last", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) |) in let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in @@ -2937,12 +3173,20 @@ Module collections. |) in let self_max := M.copy (| γ1_0 |) in M.alloc (| - Value.Tuple [ M.read (| self_min |); M.read (| self_max |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self_min |)); + A.to_value (M.read (| self_max |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool true |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool true |) |) |) + |) |))) ] |), @@ -2955,37 +3199,41 @@ Module collections. let self_max := M.copy (| γ0_1 |) in M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "first", - [] - |), - [ M.read (| other |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "last", - [] - |), - [ M.read (| other |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "first", + [] + |), + [ M.read (| other |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "last", + [] + |), + [ M.read (| other |) ] + |)) + ] + |) |) in let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in @@ -3004,14 +3252,21 @@ Module collections. |) in let other_max := M.copy (| γ1_0 |) in M.alloc (| - Value.Tuple - [ M.read (| other_min |); M.read (| other_max |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| other_min |)); + A.to_value (M.read (| other_max |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool false |) |) + M.read (| + M.return_ (| M.of_value (| Value.Bool false |) |) + |) |) |))) ] @@ -3055,7 +3310,11 @@ Module collections. ltac:(M.monadic (M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool false |) |) + M.read (| + M.return_ (| + M.of_value (| Value.Bool false |) + |) + |) |) |))); fun γ => @@ -3076,8 +3335,10 @@ Module collections. [ self_iter ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -3099,7 +3360,11 @@ Module collections. ltac:(M.monadic (M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool false |) |) + M.read (| + M.return_ (| + M.of_value (| Value.Bool false |) + |) + |) |) |))); fun γ => @@ -3120,21 +3385,23 @@ Module collections. [ self_iter ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -3146,8 +3413,9 @@ Module collections. [] |), [ self_iter ] - |)) - (BinOp.Panic.div (| + |), + BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -3164,7 +3432,8 @@ Module collections. "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3231,7 +3500,9 @@ Module collections. M.copy (| γ0_0 |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -3239,8 +3510,8 @@ Module collections. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -3258,7 +3529,8 @@ Module collections. next |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3269,8 +3541,10 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.Bool - false + M.of_value (| + Value.Bool + false + |) |) |) |) @@ -3278,13 +3552,17 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)))); @@ -3355,7 +3633,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3405,11 +3683,13 @@ Module collections. |), [ other_iter ] |); - Value.StructTuple - "core::cmp::Ordering::Less" - []; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3442,7 +3722,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -3453,7 +3734,9 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.Bool false + M.of_value (| + Value.Bool false + |) |) |) |) @@ -3478,7 +3761,9 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => @@ -3492,7 +3777,9 @@ Module collections. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |) |) |))) @@ -3501,7 +3788,7 @@ Module collections. |))) ] |) in - M.alloc (| Value.Bool true |))) + M.alloc (| M.of_value (| Value.Bool true |) |))) ] |))) ] @@ -3523,7 +3810,7 @@ Module collections. other.is_subset(self) } *) - Definition is_superset (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_superset (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -3553,7 +3840,7 @@ Module collections. self.map.first_key_value().map(|(k, _)| k) } *) - Definition first (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition first (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3608,8 +3895,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3625,7 +3912,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3643,7 +3931,7 @@ Module collections. self.map.last_key_value().map(|(k, _)| k) } *) - Definition last (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3698,8 +3986,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3715,7 +4003,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3733,7 +4022,7 @@ Module collections. self.map.pop_first().map(|kv| kv.0) } *) - Definition pop_first (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_first (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3773,8 +4062,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3788,7 +4077,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3806,7 +4096,7 @@ Module collections. self.map.pop_last().map(|kv| kv.0) } *) - Definition pop_last (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_last (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3846,8 +4136,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3861,7 +4151,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3879,7 +4170,7 @@ Module collections. self.map.insert(value, SetValZST::default()).is_none() } *) - Definition insert (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; value ] => @@ -3941,7 +4232,7 @@ Module collections. Recover::replace(&mut self.map, value) } *) - Definition replace (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; value ] => @@ -3983,7 +4274,7 @@ Module collections. self.map.remove(value).is_some() } *) - Definition remove (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ Q ], [ self; value ] => @@ -4036,7 +4327,7 @@ Module collections. Recover::take(&mut self.map, value) } *) - Definition take (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ Q ], [ self; value ] => @@ -4078,7 +4369,7 @@ Module collections. self.extract_if(|v| !f(v)).for_each(drop); } *) - Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; f ] => @@ -4117,8 +4408,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4128,8 +4419,8 @@ Module collections. fun γ => ltac:(M.monadic (let v := M.copy (| γ |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -4137,19 +4428,26 @@ Module collections. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| v |) ] ] - |)))) + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| v |)) ] + |) + ] + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.get_function (| "core::mem::drop", [ T ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4167,7 +4465,7 @@ Module collections. self.map.append(&mut other.map); } *) - Definition append (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition append (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -4199,7 +4497,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4217,35 +4515,38 @@ Module collections. BTreeSet { map: self.map.split_off(value) } } *) - Definition split_off (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_off (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ Q ], [ self; value ] => ltac:(M.monadic (let self := M.alloc (| self |) in let value := M.alloc (| value |) in - Value.StructRecord - "alloc::collections::btree::set::BTreeSet" - [ - ("map", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], - "split_off", - [ Q ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::set::BTreeSet", - "map" - |); - M.read (| value |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::BTreeSet" + [ + ("map", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], + "split_off", + [ Q ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::set::BTreeSet", + "map" + |); + M.read (| value |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4263,7 +4564,7 @@ Module collections. ExtractIf { pred, inner, alloc } } *) - Definition extract_if (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extract_if (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; pred ] => @@ -4298,13 +4599,15 @@ Module collections. let inner := M.copy (| γ0_0 |) in let alloc := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::ExtractIf" - [ - ("pred", M.read (| pred |)); - ("inner", M.read (| inner |)); - ("alloc", M.read (| alloc |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::ExtractIf" + [ + ("pred", A.to_value (M.read (| pred |))); + ("inner", A.to_value (M.read (| inner |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |) |))) ] |) @@ -4321,33 +4624,36 @@ Module collections. Iter { iter: self.map.keys() } } *) - Definition iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::set::Iter" - [ - ("iter", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], - "keys", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::set::BTreeSet", - "map" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Iter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], + "keys", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::set::BTreeSet", + "map" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4360,7 +4666,7 @@ Module collections. self.map.len() } *) - Definition len (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4394,22 +4700,23 @@ Module collections. self.len() == 0 } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::set::BTreeSet") [ T; A ], "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -4423,7 +4730,7 @@ Module collections. BTreeSet { map } } *) - Definition from_sorted_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_sorted_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ iter; alloc ] => @@ -4449,8 +4756,8 @@ Module collections. |), [ M.read (| iter |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4460,25 +4767,29 @@ Module collections. fun γ => ltac:(M.monadic (let k := M.copy (| γ |) in - Value.Tuple - [ - M.read (| k |); - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path - "alloc::collections::btree::set_val::SetValZST", - [], - "default", - [] - |), - [] - |) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path + "alloc::collections::btree::set_val::SetValZST", + [], + "default", + [] + |), + [] + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -4506,9 +4817,11 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::BTreeSet" - [ ("map", M.read (| map |)) ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::BTreeSet" + [ ("map", A.to_value (M.read (| map |))) ] + |) |) |))) | _, _ => M.impossible @@ -4538,7 +4851,7 @@ Module collections. BTreeSet::from_sorted_iter(inputs.into_iter(), Global) } *) - Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ iter ] => @@ -4577,7 +4890,7 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4618,7 +4931,7 @@ Module collections. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -4671,7 +4984,7 @@ Module collections. |), [ M.read (| inputs |) ] |); - Value.StructTuple "alloc::alloc::Global" [] + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |) |) @@ -4709,7 +5022,7 @@ Module collections. BTreeSet { map } } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ arr ] => @@ -4720,18 +5033,19 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.get_constant (| "alloc::collections::btree::set::N" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4756,7 +5070,7 @@ Module collections. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -4767,7 +5081,7 @@ Module collections. "sort", [] |), - [ (* Unsize *) M.pointer_coercion arr ] + [ (* Unsize *) M.pointer_coercion (| arr |) ] |) |) in let iter := @@ -4798,8 +5112,8 @@ Module collections. |), [ M.read (| arr |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4809,25 +5123,29 @@ Module collections. fun γ => ltac:(M.monadic (let k := M.copy (| γ |) in - Value.Tuple - [ - M.read (| k |); - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path - "alloc::collections::btree::set_val::SetValZST", - [], - "default", - [] - |), - [] - |) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path + "alloc::collections::btree::set_val::SetValZST", + [], + "default", + [] + |), + [] + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -4856,13 +5174,18 @@ Module collections. ] ] |), - [ M.read (| iter |); Value.StructTuple "alloc::alloc::Global" [] ] + [ + M.read (| iter |); + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + ] |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::BTreeSet" - [ ("map", M.read (| map |)) ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::BTreeSet" + [ ("map", A.to_value (M.read (| map |))) ] + |) |) |))) |))) @@ -4894,37 +5217,40 @@ Module collections. IntoIter { iter: self.map.into_iter() } } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::set::IntoIter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.apply - (Ty.path "alloc::collections::btree::map::BTreeMap") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], - [], - "into_iter", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "alloc::collections::btree::set::BTreeSet", - "map" - |) - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::IntoIter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "alloc::collections::btree::map::BTreeMap") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], + [], + "into_iter", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "alloc::collections::btree::set::BTreeSet", + "map" + |) + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4960,7 +5286,7 @@ Module collections. self.iter() } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5015,7 +5341,7 @@ Module collections. f.debug_tuple("ExtractIf").field(&self.inner.peek().map(|(k, _)| k)).finish() } *) - Definition fmt (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self; f ] => @@ -5043,12 +5369,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "ExtractIf" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "ExtractIf" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -5101,8 +5427,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5119,10 +5445,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) - |)) + |) + |) ] |) ] @@ -5153,7 +5481,7 @@ Module collections. self.inner.next(&mut mapped_pred, self.alloc.clone()).map(|(k, _)| k) } *) - Definition next (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self ] => @@ -5170,8 +5498,8 @@ Module collections. |) in let mapped_pred := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5195,14 +5523,20 @@ Module collections. "call_mut", [] |), - [ M.read (| pred |); Value.Tuple [ M.read (| k |) ] ] + [ + M.read (| pred |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| k |)) ] + |) + ] |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in M.alloc (| M.call_closure (| @@ -5265,8 +5599,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5282,7 +5616,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -5295,7 +5630,7 @@ Module collections. self.inner.size_hint() } *) - Definition size_hint (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self ] => @@ -5358,7 +5693,7 @@ Module collections. }); } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ Iter ], [ self; iter ] => @@ -5387,8 +5722,8 @@ Module collections. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5413,16 +5748,17 @@ Module collections. [ M.read (| self |); M.read (| elem |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5432,7 +5768,7 @@ Module collections. self.insert(elem); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; elem ] => @@ -5451,7 +5787,7 @@ Module collections. [ M.read (| self |); M.read (| elem |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5478,7 +5814,7 @@ Module collections. self.extend(iter.into_iter().cloned()); } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -5526,7 +5862,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5536,7 +5872,7 @@ Module collections. self.insert(elem); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; β1 ] => @@ -5564,7 +5900,7 @@ Module collections. [ M.read (| self |); M.read (| elem |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) @@ -5595,7 +5931,7 @@ Module collections. BTreeSet::new() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -5640,7 +5976,7 @@ Module collections. ) } *) - Definition sub (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; rhs ] => @@ -5745,7 +6081,7 @@ Module collections. ) } *) - Definition bitxor (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; rhs ] => @@ -5859,7 +6195,7 @@ Module collections. ) } *) - Definition bitand (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; rhs ] => @@ -5967,7 +6303,7 @@ Module collections. ) } *) - Definition bitor (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; rhs ] => @@ -6066,7 +6402,7 @@ Module collections. f.debug_set().entries(self.iter()).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -6133,35 +6469,38 @@ Module collections. Iter { iter: self.iter.clone() } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::set::Iter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::map::Keys") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::set::Iter", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Iter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::map::Keys") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::set::Iter", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -6186,7 +6525,7 @@ Module collections. self.iter.next() } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6218,7 +6557,7 @@ Module collections. self.iter.size_hint() } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6250,7 +6589,7 @@ Module collections. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6277,7 +6616,7 @@ Module collections. self.next() } *) - Definition min (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6304,7 +6643,7 @@ Module collections. self.next_back() } *) - Definition max (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6349,7 +6688,7 @@ Module collections. self.iter.next_back() } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6394,7 +6733,7 @@ Module collections. self.iter.len() } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6455,7 +6794,7 @@ Module collections. self.iter.next().map(|(k, _)| k) } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6497,8 +6836,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6514,7 +6853,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6525,7 +6865,7 @@ Module collections. self.iter.size_hint() } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6575,28 +6915,31 @@ Module collections. Iter { iter: Default::default() } } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::set::Iter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::collections::btree::map::Keys") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST" ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Iter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::collections::btree::map::Keys") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST" ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -6618,7 +6961,7 @@ Module collections. self.iter.next_back().map(|(k, _)| k) } *) - Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6660,8 +7003,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6677,7 +7020,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6701,7 +7045,7 @@ Module collections. self.iter.len() } *) - Definition len (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6759,28 +7103,31 @@ Module collections. IntoIter { iter: Default::default() } } *) - Definition default (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::set::IntoIter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::collections::btree::map::IntoIter") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::IntoIter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::collections::btree::map::IntoIter") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST"; A ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -6802,35 +7149,38 @@ Module collections. Range { iter: self.iter.clone() } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::set::Range" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::map::Range") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::set::Range", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Range" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::map::Range") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::set::Range", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -6855,7 +7205,7 @@ Module collections. self.iter.next().map(|(k, _)| k) } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6912,8 +7262,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6929,7 +7279,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6940,7 +7291,7 @@ Module collections. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6967,7 +7318,7 @@ Module collections. self.next() } *) - Definition min (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6994,7 +7345,7 @@ Module collections. self.next_back() } *) - Definition max (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -7038,7 +7389,7 @@ Module collections. self.iter.next_back().map(|(k, _)| k) } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -7095,8 +7446,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7112,7 +7463,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7149,28 +7501,31 @@ Module collections. Range { iter: Default::default() } } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::btree::set::Range" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::collections::btree::map::Range") - [ T; Ty.path "alloc::collections::btree::set_val::SetValZST" ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Range" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::collections::btree::map::Range") + [ T; Ty.path "alloc::collections::btree::set_val::SetValZST" ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -7203,148 +7558,164 @@ Module collections. } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::set::Difference" - [ - ("inner", - M.read (| - M.match_operator (| - M.alloc (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::set::Difference", - "inner" - |) - |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let γ1_0 := - M.SubPointer.get_struct_record_field (| - γ, - "alloc::collections::btree::set::DifferenceInner::Stitch", - "self_iter" - |) in - let γ1_1 := - M.SubPointer.get_struct_record_field (| - γ, - "alloc::collections::btree::set::DifferenceInner::Stitch", - "other_iter" - |) in - let self_iter := M.alloc (| γ1_0 |) in - let other_iter := M.alloc (| γ1_1 |) in - M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::DifferenceInner::Stitch" - [ - ("self_iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ], - [], - "clone", - [] - |), - [ M.read (| self_iter |) ] - |)); - ("other_iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::peekable::Peekable") - [ - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ] - ], - [], - "clone", - [] - |), - [ M.read (| other_iter |) ] - |)) - ] - |))); - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let γ1_0 := - M.SubPointer.get_struct_record_field (| - γ, - "alloc::collections::btree::set::DifferenceInner::Search", - "self_iter" - |) in - let γ1_1 := - M.SubPointer.get_struct_record_field (| - γ, - "alloc::collections::btree::set::DifferenceInner::Search", - "other_set" - |) in - let self_iter := M.alloc (| γ1_0 |) in - let other_set := M.alloc (| γ1_1 |) in - M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::DifferenceInner::Search" - [ - ("self_iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ], - [], - "clone", - [] - |), - [ M.read (| self_iter |) ] - |)); - ("other_set", M.read (| M.read (| other_set |) |)) - ] - |))); - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let γ1_0 := - M.SubPointer.get_struct_tuple_field (| - γ, - "alloc::collections::btree::set::DifferenceInner::Iterate", - 0 - |) in - let iter := M.alloc (| γ1_0 |) in - M.alloc (| - Value.StructTuple - "alloc::collections::btree::set::DifferenceInner::Iterate" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ], - [], - "clone", - [] - |), - [ M.read (| iter |) ] + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Difference" + [ + ("inner", + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::set::Difference", + "inner" + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "alloc::collections::btree::set::DifferenceInner::Stitch", + "self_iter" + |) in + let γ1_1 := + M.SubPointer.get_struct_record_field (| + γ, + "alloc::collections::btree::set::DifferenceInner::Stitch", + "other_iter" + |) in + let self_iter := M.alloc (| γ1_0 |) in + let other_iter := M.alloc (| γ1_1 |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::DifferenceInner::Stitch" + [ + ("self_iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "clone", + [] + |), + [ M.read (| self_iter |) ] + |))); + ("other_iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path + "core::iter::adapters::peekable::Peekable") + [ + Ty.apply + (Ty.path + "alloc::collections::btree::set::Iter") + [ T ] + ], + [], + "clone", + [] + |), + [ M.read (| other_iter |) ] + |))) + ] |) - ] - |))) - ] - |) - |)) - ])) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "alloc::collections::btree::set::DifferenceInner::Search", + "self_iter" + |) in + let γ1_1 := + M.SubPointer.get_struct_record_field (| + γ, + "alloc::collections::btree::set::DifferenceInner::Search", + "other_set" + |) in + let self_iter := M.alloc (| γ1_0 |) in + let other_set := M.alloc (| γ1_1 |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::DifferenceInner::Search" + [ + ("self_iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "clone", + [] + |), + [ M.read (| self_iter |) ] + |))); + ("other_set", + A.to_value (M.read (| M.read (| other_set |) |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "alloc::collections::btree::set::DifferenceInner::Iterate", + 0 + |) in + let iter := M.alloc (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::DifferenceInner::Iterate" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "clone", + [] + |), + [ M.read (| iter |) ] + |)) + ] + |) + |))) + ] + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -7392,7 +7763,7 @@ Module collections. } } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7552,9 +7923,11 @@ Module collections. |), [ M.read (| other_iter |) ] |); - Value.StructTuple "core::cmp::Ordering::Less" []; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7582,7 +7955,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -7593,9 +7967,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self_next |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self_next |)) ] + |) |) |) |) @@ -7713,7 +8089,7 @@ Module collections. [ M.read (| other_iter |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -7737,7 +8113,7 @@ Module collections. [ M.read (| other_iter |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) @@ -7848,15 +8224,15 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -7869,7 +8245,8 @@ Module collections. M.read (| M.read (| other_set |) |); M.read (| self_next |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7880,14 +8257,18 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self_next |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self_next |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) @@ -7935,7 +8316,7 @@ Module collections. (self_len.saturating_sub(other_len), Some(self_len)) } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7970,35 +8351,41 @@ Module collections. let self_iter := M.alloc (| γ1_0 |) in let other_iter := M.alloc (| γ1_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ], - [], - "len", - [] - |), - [ M.read (| self_iter |) ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - Ty.apply - (Ty.path "core::iter::adapters::peekable::Peekable") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply (Ty.path "alloc::collections::btree::set::Iter") - [ T ] - ], - [], - "len", - [] - |), - [ M.read (| other_iter |) ] - |) - ] + [ T ], + [], + "len", + [] + |), + [ M.read (| self_iter |) ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + Ty.apply + (Ty.path "core::iter::adapters::peekable::Peekable") + [ + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ] + ], + [], + "len", + [] + |), + [ M.read (| other_iter |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -8018,29 +8405,35 @@ Module collections. let self_iter := M.alloc (| γ1_0 |) in let other_set := M.alloc (| γ1_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ], - [], - "len", - [] - |), - [ M.read (| self_iter |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::set::BTreeSet") - [ T; A ], - "len", - [] - |), - [ M.read (| M.read (| other_set |) |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "len", + [] + |), + [ M.read (| self_iter |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::set::BTreeSet") + [ T; A ], + "len", + [] + |), + [ M.read (| M.read (| other_set |) |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -8053,20 +8446,25 @@ Module collections. |) in let iter := M.alloc (| γ1_0 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ], - [], - "len", - [] - |), - [ M.read (| iter |) ] - |); - Value.Integer Integer.Usize 0 - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "len", + [] + |), + [ M.read (| iter |) ] + |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))) ] |), @@ -8078,20 +8476,26 @@ Module collections. let self_len := M.copy (| γ0_0 |) in let other_len := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_sub", - [] - |), - [ M.read (| self_len |); M.read (| other_len |) ] - |); - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self_len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ M.read (| self_len |); M.read (| other_len |) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self_len |)) ] + |)) + ] + |) |))) ] |) @@ -8104,7 +8508,7 @@ Module collections. self.next() } *) - Definition min (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8157,37 +8561,40 @@ Module collections. (* fn clone(&self) -> Self { - SymmetricDifference(self.0.clone()) - } - *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := - let Self : Ty.t := Self T in - match τ, α with - | [], [ self ] => - ltac:(M.monadic - (let self := M.alloc (| self |) in - Value.StructTuple - "alloc::collections::btree::set::SymmetricDifference" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") - [ Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "alloc::collections::btree::set::SymmetricDifference", - 0 - |) - ] - |) - ])) + SymmetricDifference(self.0.clone()) + } + *) + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self T in + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::SymmetricDifference" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") + [ Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "alloc::collections::btree::set::SymmetricDifference", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8217,7 +8624,7 @@ Module collections. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8275,7 +8682,7 @@ Module collections. let a_next := M.copy (| γ0_0 |) in let b_next := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8329,7 +8736,9 @@ Module collections. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -8350,7 +8759,7 @@ Module collections. (0, Some(a_len + b_len)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8384,13 +8793,25 @@ Module collections. let a_len := M.copy (| γ0_0 |) in let b_len := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ BinOp.Panic.add (| M.read (| a_len |), M.read (| b_len |) |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| a_len |), + M.read (| b_len |) + |)) + ] + |)) + ] + |) |))) ] |) @@ -8403,7 +8824,7 @@ Module collections. self.next() } *) - Definition min (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8469,131 +8890,144 @@ Module collections. } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::btree::set::Intersection" - [ - ("inner", - M.read (| - M.match_operator (| - M.alloc (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::btree::set::Intersection", - "inner" + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::Intersection" + [ + ("inner", + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::btree::set::Intersection", + "inner" + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "alloc::collections::btree::set::IntersectionInner::Stitch", + "a" + |) in + let γ1_1 := + M.SubPointer.get_struct_record_field (| + γ, + "alloc::collections::btree::set::IntersectionInner::Stitch", + "b" + |) in + let a := M.alloc (| γ1_0 |) in + let b := M.alloc (| γ1_1 |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::IntersectionInner::Stitch" + [ + ("a", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "clone", + [] + |), + [ M.read (| a |) ] + |))); + ("b", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "clone", + [] + |), + [ M.read (| b |) ] + |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "alloc::collections::btree::set::IntersectionInner::Search", + "small_iter" + |) in + let γ1_1 := + M.SubPointer.get_struct_record_field (| + γ, + "alloc::collections::btree::set::IntersectionInner::Search", + "large_set" + |) in + let small_iter := M.alloc (| γ1_0 |) in + let large_set := M.alloc (| γ1_1 |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::collections::btree::set::IntersectionInner::Search" + [ + ("small_iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "clone", + [] + |), + [ M.read (| small_iter |) ] + |))); + ("large_set", + A.to_value (M.read (| M.read (| large_set |) |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "alloc::collections::btree::set::IntersectionInner::Answer", + 0 + |) in + let answer := M.alloc (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::IntersectionInner::Answer" + [ A.to_value (M.read (| M.read (| answer |) |)) ] + |) + |))) + ] |) - |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let γ1_0 := - M.SubPointer.get_struct_record_field (| - γ, - "alloc::collections::btree::set::IntersectionInner::Stitch", - "a" - |) in - let γ1_1 := - M.SubPointer.get_struct_record_field (| - γ, - "alloc::collections::btree::set::IntersectionInner::Stitch", - "b" - |) in - let a := M.alloc (| γ1_0 |) in - let b := M.alloc (| γ1_1 |) in - M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::IntersectionInner::Stitch" - [ - ("a", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ], - [], - "clone", - [] - |), - [ M.read (| a |) ] - |)); - ("b", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ], - [], - "clone", - [] - |), - [ M.read (| b |) ] - |)) - ] - |))); - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let γ1_0 := - M.SubPointer.get_struct_record_field (| - γ, - "alloc::collections::btree::set::IntersectionInner::Search", - "small_iter" - |) in - let γ1_1 := - M.SubPointer.get_struct_record_field (| - γ, - "alloc::collections::btree::set::IntersectionInner::Search", - "large_set" - |) in - let small_iter := M.alloc (| γ1_0 |) in - let large_set := M.alloc (| γ1_1 |) in - M.alloc (| - Value.StructRecord - "alloc::collections::btree::set::IntersectionInner::Search" - [ - ("small_iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ], - [], - "clone", - [] - |), - [ M.read (| small_iter |) ] - |)); - ("large_set", M.read (| M.read (| large_set |) |)) - ] - |))); - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let γ1_0 := - M.SubPointer.get_struct_tuple_field (| - γ, - "alloc::collections::btree::set::IntersectionInner::Answer", - 0 - |) in - let answer := M.alloc (| γ1_0 |) in - M.alloc (| - Value.StructTuple - "alloc::collections::btree::set::IntersectionInner::Answer" - [ M.read (| M.read (| answer |) |) ] - |))) - ] - |) - |)) - ])) + |))) + ] + |))) | _, _ => M.impossible end. @@ -8637,7 +9071,7 @@ Module collections. } } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9033,9 +9467,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| a_next |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a_next |)) ] + |) |) |) |) @@ -9150,7 +9586,7 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9181,14 +9617,18 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| small_next |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| small_next |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) @@ -9234,7 +9674,7 @@ Module collections. } } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9268,43 +9708,52 @@ Module collections. let a := M.alloc (| γ1_0 |) in let b := M.alloc (| γ1_1 |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ], - [], - "len", - [] - |), - [ M.read (| a |) ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ], - [], - "len", - [] - |), - [ M.read (| b |) ] - |) - ] - |) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::cmp::min", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "len", + [] + |), + [ M.read (| a |) ] + |); + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "len", + [] + |), + [ M.read (| b |) ] + |) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -9317,26 +9766,32 @@ Module collections. |) in let small_iter := M.alloc (| γ1_0 |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - Ty.apply - (Ty.path "alloc::collections::btree::set::Iter") - [ T ], - [], - "len", - [] - |), - [ M.read (| small_iter |) ] - |) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + Ty.apply + (Ty.path "alloc::collections::btree::set::Iter") + [ T ], + [], + "len", + [] + |), + [ M.read (| small_iter |) ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -9348,13 +9803,18 @@ Module collections. 0 |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -9372,13 +9832,18 @@ Module collections. 0 |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 1; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 1 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |)) + ] + |) |))) ] |) @@ -9391,7 +9856,7 @@ Module collections. self.next() } *) - Definition min (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9447,34 +9912,37 @@ Module collections. Union(self.0.clone()) } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "alloc::collections::btree::set::Union" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") - [ Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "alloc::collections::btree::set::Union", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "alloc::collections::btree::set::Union" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::collections::btree::merge_iter::MergeIterInner") + [ Ty.apply (Ty.path "alloc::collections::btree::set::Iter") [ T ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "alloc::collections::btree::set::Union", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9500,7 +9968,7 @@ Module collections. a_next.or(b_next) } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9572,7 +10040,7 @@ Module collections. (max(a_len, b_len), Some(a_len + b_len)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9606,16 +10074,29 @@ Module collections. let a_len := M.copy (| γ0_0 |) in let b_len := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), - [ M.read (| a_len |); M.read (| b_len |) ] - |); - Value.StructTuple - "core::option::Option::Some" - [ BinOp.Panic.add (| M.read (| a_len |), M.read (| b_len |) |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), + [ M.read (| a_len |); M.read (| b_len |) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| a_len |), + M.read (| b_len |) + |)) + ] + |)) + ] + |) |))) ] |) @@ -9628,7 +10109,7 @@ Module collections. self.next() } *) - Definition min (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/alloc/collections/btree/set_val.v b/CoqOfRust/alloc/collections/btree/set_val.v index 28b558b22..b7371e225 100644 --- a/CoqOfRust/alloc/collections/btree/set_val.v +++ b/CoqOfRust/alloc/collections/btree/set_val.v @@ -15,7 +15,7 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::btree::set_val::SetValZST". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -23,7 +23,7 @@ Module collections. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "SetValZST" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "SetValZST" |) |) ] |))) | _, _ => M.impossible end. @@ -51,12 +51,12 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::btree::set_val::SetValZST". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -84,13 +84,13 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::btree::set_val::SetValZST". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -106,13 +106,13 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::btree::set_val::SetValZST". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple "core::cmp::Ordering::Equal" [])) + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))) | _, _ => M.impossible end. @@ -128,15 +128,18 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::btree::set_val::SetValZST". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Equal" [] ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |)) + ] + |))) | _, _ => M.impossible end. @@ -152,13 +155,13 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::btree::set_val::SetValZST". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic (let self := M.alloc (| self |) in let state := M.alloc (| state |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -174,12 +177,14 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::btree::set_val::SetValZST". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "alloc::collections::btree::set_val::SetValZST" [])) + M.of_value (| + Value.StructTuple "alloc::collections::btree::set_val::SetValZST" [] + |))) | _, _ => M.impossible end. @@ -195,10 +200,13 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::btree::set_val::SetValZST". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => - ltac:(M.monadic (Value.StructTuple "alloc::collections::btree::set_val::SetValZST" [])) + ltac:(M.monadic + (M.of_value (| + Value.StructTuple "alloc::collections::btree::set_val::SetValZST" [] + |))) | _, _ => M.impossible end. @@ -221,10 +229,10 @@ Module collections. false } *) - Definition is_set_val (V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_set_val (V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V in match τ, α with - | [], [] => ltac:(M.monadic (Value.Bool false)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Bool false |))) | _, _ => M.impossible end. @@ -245,8 +253,11 @@ Module collections. true } *) - Definition is_set_val (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Bool true)) | _, _ => M.impossible end. + Definition is_set_val (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Bool true |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/alloc/collections/btree/split.v b/CoqOfRust/alloc/collections/btree/split.v index 5a62d5d6f..864be64e7 100644 --- a/CoqOfRust/alloc/collections/btree/split.v +++ b/CoqOfRust/alloc/collections/btree/split.v @@ -34,7 +34,7 @@ Module collections. (length_a, length_b) } *) - Definition calc_split_length (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition calc_split_length (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [ total_num; root_a; root_b ] => @@ -44,7 +44,7 @@ Module collections. let root_b := M.alloc (| root_b |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic @@ -54,15 +54,15 @@ Module collections. let length_b := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -78,8 +78,8 @@ Module collections. [] |), [ M.read (| root_a |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -95,7 +95,8 @@ Module collections. [] |), [ M.read (| root_b |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -145,17 +146,20 @@ Module collections. M.write (| length_b, BinOp.Panic.sub (| + Integer.Usize, M.read (| total_num |), M.read (| length_a |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -164,27 +168,12 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - length_b; - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "calc_length", - [] - |), - [ + M.of_value (| + Value.Tuple + [ + A.to_value length_b; + A.to_value + (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -192,21 +181,39 @@ Module collections. "alloc::collections::btree::node::NodeRef") [ Ty.path - "alloc::collections::btree::node::marker::Owned"; + "alloc::collections::btree::node::marker::Immut"; K; V; Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" ], - "reborrow", + "calc_length", [] |), - [ M.read (| root_b |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "reborrow", + [] + |), + [ M.read (| root_b |) ] + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -218,21 +225,25 @@ Module collections. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -244,9 +255,11 @@ Module collections. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -261,9 +274,11 @@ Module collections. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -272,16 +287,20 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -327,17 +346,20 @@ Module collections. M.write (| length_a, BinOp.Panic.sub (| + Integer.Usize, M.read (| total_num |), M.read (| length_b |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -346,27 +368,12 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - length_a; - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::btree::node::NodeRef") - [ - Ty.path - "alloc::collections::btree::node::marker::Immut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "calc_length", - [] - |), - [ + M.of_value (| + Value.Tuple + [ + A.to_value length_a; + A.to_value + (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -374,21 +381,39 @@ Module collections. "alloc::collections::btree::node::NodeRef") [ Ty.path - "alloc::collections::btree::node::marker::Owned"; + "alloc::collections::btree::node::marker::Immut"; K; V; Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" ], - "reborrow", + "calc_length", [] |), - [ M.read (| root_a |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Owned"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ], + "reborrow", + [] + |), + [ M.read (| root_a |) ] + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -400,21 +425,25 @@ Module collections. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -426,9 +455,11 @@ Module collections. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -443,9 +474,11 @@ Module collections. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -454,19 +487,31 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [ M.read (| length_a |); M.read (| length_b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| length_a |)); + A.to_value (M.read (| length_b |)) + ] + |) + |))) ] |) |))) @@ -511,7 +556,7 @@ Module collections. right_root } *) - Definition split_off (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_off (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ Q; A ], [ self; key; alloc ] => @@ -692,13 +737,35 @@ Module collections. |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::Handle") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::btree::node::Handle") + [ + Ty.apply + (Ty.path "alloc::collections::btree::node::NodeRef") + [ + Ty.path + "alloc::collections::btree::node::marker::Mut"; + K; + V; + Ty.path + "alloc::collections::btree::node::marker::LeafOrInternal" + ]; + Ty.path "alloc::collections::btree::node::marker::Edge" + ], + "force", + [] + |), + [ M.read (| split_edge |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") [ @@ -707,31 +774,14 @@ Module collections. V; Ty.path "alloc::collections::btree::node::marker::LeafOrInternal" - ]; - Ty.path "alloc::collections::btree::node::marker::Edge" - ], - "force", - [] - |), - [ M.read (| split_edge |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::btree::node::NodeRef") - [ - Ty.path "alloc::collections::btree::node::marker::Mut"; - K; - V; - Ty.path - "alloc::collections::btree::node::marker::LeafOrInternal" - ], - "force", - [] - |), - [ M.read (| right_node |) ] - |) - ] + ], + "force", + [] + |), + [ M.read (| right_node |) ] + |)) + ] + |) |), [ fun γ => @@ -822,7 +872,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -848,7 +898,9 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "internal error: entered unreachable code" + M.of_value (| + Value.String "internal error: entered unreachable code" + |) |) ] |) @@ -917,7 +969,7 @@ Module collections. root } *) - Definition new_pillar (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_pillar (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [ A ], [ height; alloc ] => @@ -961,12 +1013,14 @@ Module collections. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| height |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| height |))) + ] + |) ] |) |), @@ -1039,10 +1093,10 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in diff --git a/CoqOfRust/alloc/collections/linked_list.v b/CoqOfRust/alloc/collections/linked_list.v index 608693149..19655f67d 100644 --- a/CoqOfRust/alloc/collections/linked_list.v +++ b/CoqOfRust/alloc/collections/linked_list.v @@ -116,7 +116,7 @@ Module collections. .finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -151,12 +151,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Iter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Iter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::ops::deref::Deref", Ty.apply @@ -185,50 +185,65 @@ Module collections. [] |), [ - Value.StructRecord - "alloc::collections::linked_list::LinkedList" - [ - ("head", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::Iter", - "head" - |) - |)); - ("tail", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::Iter", - "tail" - |) - |)); - ("len", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::Iter", - "len" - |) - |)); - ("alloc", Value.StructTuple "alloc::alloc::Global" []); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::LinkedList" + [ + ("head", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::Iter", + "head" + |) + |))); + ("tail", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::Iter", + "tail" + |) + |))); + ("len", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::Iter", + "len" + |) + |))); + ("alloc", + A.to_value + (M.of_value (| + Value.StructTuple "alloc::alloc::Global" [] + |))); + ("marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) ] |) |) ] - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::Iter", "len" - |)) + |) + |) ] |) ] @@ -254,13 +269,13 @@ Module collections. Iter { ..*self } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "alloc::collections::linked_list::Iter" [])) + M.of_value (| Value.StructTuple "alloc::collections::linked_list::Iter" [] |))) | _, _ => M.impossible end. @@ -325,7 +340,7 @@ Module collections. .finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -360,12 +375,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "IterMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "IterMut" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::ops::deref::Deref", Ty.apply @@ -394,50 +409,65 @@ Module collections. [] |), [ - Value.StructRecord - "alloc::collections::linked_list::LinkedList" - [ - ("head", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::IterMut", - "head" - |) - |)); - ("tail", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::IterMut", - "tail" - |) - |)); - ("len", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::IterMut", - "len" - |) - |)); - ("alloc", Value.StructTuple "alloc::alloc::Global" []); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::LinkedList" + [ + ("head", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::IterMut", + "head" + |) + |))); + ("tail", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::IterMut", + "tail" + |) + |))); + ("len", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::IterMut", + "len" + |) + |))); + ("alloc", + A.to_value + (M.of_value (| + Value.StructTuple "alloc::alloc::Global" [] + |))); + ("marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) ] |) |) ] - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::IterMut", "len" - |)) + |) + |) ] |) ] @@ -467,33 +497,36 @@ Module collections. Ty.apply (Ty.path "alloc::collections::linked_list::IntoIter") [ T; A ]. (* Clone *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::linked_list::IntoIter" - [ - ("list", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "alloc::collections::linked_list::LinkedList") [ T; A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::IntoIter", - "list" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::IntoIter" + [ + ("list", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "alloc::collections::linked_list::LinkedList") [ T; A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::IntoIter", + "list" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -515,7 +548,7 @@ Module collections. f.debug_tuple("IntoIter").field(&self.list).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -543,16 +576,17 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "IntoIter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "IntoIter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::IntoIter", "list" - |)) + |) + |) ] |) ] @@ -578,19 +612,25 @@ Module collections. Node { next: None, prev: None, element } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ element ] => ltac:(M.monadic (let element := M.alloc (| element |) in - Value.StructRecord - "alloc::collections::linked_list::Node" - [ - ("next", Value.StructTuple "core::option::Option::None" []); - ("prev", Value.StructTuple "core::option::Option::None" []); - ("element", M.read (| element |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::Node" + [ + ("next", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("prev", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("element", A.to_value (M.read (| element |))) + ] + |))) | _, _ => M.impossible end. @@ -603,7 +643,7 @@ Module collections. self.element } *) - Definition into_element (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_element (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ A ], [ self ] => @@ -648,7 +688,7 @@ Module collections. } } *) - Definition push_front_node (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_front_node (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; node ] => @@ -696,11 +736,15 @@ Module collections. "alloc::collections::linked_list::Node", "prev" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let node := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| node |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| node |)) ] + |) |) in let _ := M.match_operator (| @@ -767,9 +811,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -797,7 +845,7 @@ Module collections. }) } *) - Definition pop_front_node (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_front_node (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -845,8 +893,8 @@ Module collections. "head" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -927,7 +975,9 @@ Module collections. "alloc::collections::linked_list::LinkedList", "tail" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))); fun γ => ltac:(M.monadic @@ -958,7 +1008,9 @@ Module collections. "alloc::collections::linked_list::Node", "prev" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |) in @@ -972,8 +1024,9 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in node @@ -981,7 +1034,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1011,7 +1065,7 @@ Module collections. } } *) - Definition push_back_node (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_back_node (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; node ] => @@ -1035,7 +1089,7 @@ Module collections. "alloc::collections::linked_list::Node", "next" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.write (| @@ -1063,7 +1117,11 @@ Module collections. |) in let node := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| node |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| node |)) ] + |) |) in let _ := M.match_operator (| @@ -1130,9 +1188,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1160,7 +1222,7 @@ Module collections. }) } *) - Definition pop_back_node (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_back_node (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1208,8 +1270,8 @@ Module collections. "tail" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1290,7 +1352,9 @@ Module collections. "alloc::collections::linked_list::LinkedList", "head" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))); fun γ => ltac:(M.monadic @@ -1321,7 +1385,9 @@ Module collections. "alloc::collections::linked_list::Node", "next" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |) in @@ -1335,8 +1401,9 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in node @@ -1344,7 +1411,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1374,7 +1442,7 @@ Module collections. self.len -= 1; } *) - Definition unlink_node (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unlink_node (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; node ] => @@ -1522,9 +1590,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1566,7 +1638,7 @@ Module collections. self.len += splice_length; } *) - Definition splice_nodes (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition splice_nodes (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; existing_prev; existing_next; splice_start; splice_end; splice_length ] => @@ -1580,7 +1652,7 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1612,11 +1684,13 @@ Module collections. "alloc::collections::linked_list::Node", "next" |), - Value.StructTuple - "core::option::Option::Some" - [ M.read (| splice_start |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| splice_start |)) ] + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1626,16 +1700,18 @@ Module collections. "alloc::collections::linked_list::LinkedList", "head" |), - Value.StructTuple - "core::option::Option::Some" - [ M.read (| splice_start |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| splice_start |)) ] + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1667,11 +1743,13 @@ Module collections. "alloc::collections::linked_list::Node", "prev" |), - Value.StructTuple - "core::option::Option::Some" - [ M.read (| splice_end |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| splice_end |)) ] + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1681,11 +1759,13 @@ Module collections. "alloc::collections::linked_list::LinkedList", "tail" |), - Value.StructTuple - "core::option::Option::Some" - [ M.read (| splice_end |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| splice_end |)) ] + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1725,7 +1805,7 @@ Module collections. |), M.read (| existing_next |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -1733,8 +1813,11 @@ Module collections. "alloc::collections::linked_list::LinkedList", "len" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| splice_length |) |) |) in - M.alloc (| Value.Tuple [] |) + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| splice_length |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1759,7 +1842,7 @@ Module collections. } } *) - Definition detach_all_nodes (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition detach_all_nodes (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1822,12 +1905,12 @@ Module collections. "alloc::collections::linked_list::LinkedList", "len" |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1861,13 +1944,27 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| head |); M.read (| tail |); M.read (| len |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| head |)); + A.to_value (M.read (| tail |)); + A.to_value (M.read (| len |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1921,7 +2018,7 @@ Module collections. } } *) - Definition split_off_before_node (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_off_before_node (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; split_node; at_ ] => @@ -1931,7 +2028,7 @@ Module collections. let at_ := M.alloc (| at_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1943,8 +2040,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 first_part_head := + M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in + let first_part_tail := + M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := let _ := M.write (| @@ -1987,10 +2086,10 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2023,9 +2122,11 @@ Module collections. "alloc::collections::linked_list::Node", "next" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| first_part_head, @@ -2037,38 +2138,53 @@ Module collections. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := M.write (| first_part_head, - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let first_part := M.alloc (| - Value.StructRecord - "alloc::collections::linked_list::LinkedList" - [ - ("head", M.read (| first_part_head |)); - ("tail", M.read (| first_part_tail |)); - ("len", M.read (| at_ |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "alloc" - |) - ] - |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::LinkedList" + [ + ("head", A.to_value (M.read (| first_part_head |))); + ("tail", A.to_value (M.read (| first_part_tail |))); + ("len", A.to_value (M.read (| at_ |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "alloc" + |) + ] + |))); + ("marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) |) in let _ := M.write (| @@ -2077,7 +2193,11 @@ Module collections. "alloc::collections::linked_list::LinkedList", "head" |), - Value.StructTuple "core::option::Option::Some" [ M.read (| split_node |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| split_node |)) ] + |) |) in let _ := M.write (| @@ -2087,6 +2207,7 @@ Module collections. "len" |), BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2190,7 +2311,7 @@ Module collections. } } *) - Definition split_off_after_node (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_off_after_node (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; split_node; at_ ] => @@ -2200,7 +2321,7 @@ Module collections. let at_ := M.alloc (| at_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2212,8 +2333,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 second_part_head := + M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in + let second_part_tail := + M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := let _ := M.write (| @@ -2256,10 +2379,10 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2292,9 +2415,11 @@ Module collections. "alloc::collections::linked_list::Node", "prev" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| second_part_tail, @@ -2306,48 +2431,65 @@ Module collections. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := M.write (| second_part_tail, - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let second_part := M.alloc (| - Value.StructRecord - "alloc::collections::linked_list::LinkedList" - [ - ("head", M.read (| second_part_head |)); - ("tail", M.read (| second_part_tail |)); - ("len", - BinOp.Panic.sub (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "len" - |) - |), - M.read (| at_ |) - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "alloc" - |) - ] - |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::LinkedList" + [ + ("head", A.to_value (M.read (| second_part_head |))); + ("tail", A.to_value (M.read (| second_part_tail |))); + ("len", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "len" + |) + |), + M.read (| at_ |) + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "alloc" + |) + ] + |))); + ("marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) |) in let _ := M.write (| @@ -2356,7 +2498,11 @@ Module collections. "alloc::collections::linked_list::LinkedList", "tail" |), - Value.StructTuple "core::option::Option::Some" [ M.read (| split_node |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| split_node |)) ] + |) |) in let _ := M.write (| @@ -2420,21 +2566,28 @@ Module collections. LinkedList { head: None, tail: None, len: 0, alloc, marker: PhantomData } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => ltac:(M.monadic (let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::collections::linked_list::LinkedList" - [ - ("head", Value.StructTuple "core::option::Option::None" []); - ("tail", Value.StructTuple "core::option::Option::None" []); - ("len", Value.Integer Integer.Usize 0); - ("alloc", M.read (| alloc |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::LinkedList" + [ + ("head", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("tail", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("alloc", A.to_value (M.read (| alloc |))); + ("marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -2447,41 +2600,47 @@ Module collections. Iter { head: self.head, tail: self.tail, len: self.len, marker: PhantomData } } *) - Definition iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::linked_list::Iter" - [ - ("head", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "head" - |) - |)); - ("tail", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "tail" - |) - |)); - ("len", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "len" - |) - |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::Iter" + [ + ("head", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "head" + |) + |))); + ("tail", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "tail" + |) + |))); + ("len", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "len" + |) + |))); + ("marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -2494,41 +2653,47 @@ Module collections. IterMut { head: self.head, tail: self.tail, len: self.len, marker: PhantomData } } *) - Definition iter_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::linked_list::IterMut" - [ - ("head", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "head" - |) - |)); - ("tail", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "tail" - |) - |)); - ("len", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "len" - |) - |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::IterMut" + [ + ("head", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "head" + |) + |))); + ("tail", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "tail" + |) + |))); + ("len", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "len" + |) + |))); + ("marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -2541,26 +2706,29 @@ Module collections. Cursor { index: 0, current: self.head, list: self } } *) - Definition cursor_front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cursor_front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::linked_list::Cursor" - [ - ("index", Value.Integer Integer.Usize 0); - ("current", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "head" - |) - |)); - ("list", M.read (| self |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::Cursor" + [ + ("index", A.to_value (M.of_value (| Value.Integer 0 |))); + ("current", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "head" + |) + |))); + ("list", A.to_value (M.read (| self |))) + ] + |))) | _, _ => M.impossible end. @@ -2573,26 +2741,29 @@ Module collections. CursorMut { index: 0, current: self.head, list: self } } *) - Definition cursor_front_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cursor_front_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::linked_list::CursorMut" - [ - ("index", Value.Integer Integer.Usize 0); - ("current", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "head" - |) - |)); - ("list", M.read (| self |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::CursorMut" + [ + ("index", A.to_value (M.of_value (| Value.Integer 0 |))); + ("current", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "head" + |) + |))); + ("list", A.to_value (M.read (| self |))) + ] + |))) | _, _ => M.impossible end. @@ -2605,49 +2776,53 @@ Module collections. Cursor { index: self.len.checked_sub(1).unwrap_or(0), current: self.tail, list: self } } *) - Definition cursor_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cursor_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::linked_list::Cursor" - [ - ("index", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], - "unwrap_or", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "checked_sub", [] |), + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::Cursor" + [ + ("index", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], + "unwrap_or", + [] + |), [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "len" - |) + M.call_closure (| + M.get_associated_function (| Ty.path "usize", "checked_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "len" + |) + |); + M.of_value (| Value.Integer 1 |) + ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 0 |) ] - |); - Value.Integer Integer.Usize 0 - ] - |)); - ("current", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "tail" - |) - |)); - ("list", M.read (| self |)) - ])) + |))); + ("current", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "tail" + |) + |))); + ("list", A.to_value (M.read (| self |))) + ] + |))) | _, _ => M.impossible end. @@ -2660,49 +2835,53 @@ Module collections. CursorMut { index: self.len.checked_sub(1).unwrap_or(0), current: self.tail, list: self } } *) - Definition cursor_back_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cursor_back_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::linked_list::CursorMut" - [ - ("index", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], - "unwrap_or", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "checked_sub", [] |), + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::CursorMut" + [ + ("index", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], + "unwrap_or", + [] + |), [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "len" - |) + M.call_closure (| + M.get_associated_function (| Ty.path "usize", "checked_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "len" + |) + |); + M.of_value (| Value.Integer 1 |) + ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 0 |) ] - |); - Value.Integer Integer.Usize 0 - ] - |)); - ("current", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "tail" - |) - |)); - ("list", M.read (| self |)) - ])) + |))); + ("current", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "tail" + |) + |))); + ("list", A.to_value (M.read (| self |))) + ] + |))) | _, _ => M.impossible end. @@ -2715,7 +2894,7 @@ Module collections. self.head.is_none() } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2753,7 +2932,7 @@ Module collections. self.len } *) - Definition len (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2786,7 +2965,7 @@ Module collections. }); } *) - Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2805,82 +2984,90 @@ Module collections. ] |), [ - Value.StructRecord - "alloc::collections::linked_list::LinkedList" - [ - ("head", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::LinkedList" + [ + ("head", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "core::ptr::non_null::NonNull") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "alloc::collections::linked_list::Node") - [ T ] - ] - ], - "take", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "head" - |) - ] - |)); - ("tail", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") + (Ty.path "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path "alloc::collections::linked_list::Node") + [ T ] + ] + ], + "take", + [] + |), [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "head" + |) + ] + |))); + ("tail", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "core::ptr::non_null::NonNull") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "alloc::collections::linked_list::Node") - [ T ] - ] - ], - "take", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "tail" - |) - ] - |)); - ("len", - M.call_closure (| - M.get_function (| "core::mem::take", [ Ty.path "usize" ] |), - [ - M.SubPointer.get_struct_record_field (| + (Ty.path "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path "alloc::collections::linked_list::Node") + [ T ] + ] + ], + "take", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "tail" + |) + ] + |))); + ("len", + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::take", [ Ty.path "usize" ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::LinkedList", + "len" + |) + ] + |))); + ("alloc", + A.to_value + (M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", - "len" - |) - ] - |)); - ("alloc", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::LinkedList", - "alloc" - |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] + "alloc" + |))); + ("marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2897,7 +3084,7 @@ Module collections. self.iter().any(|e| e == x) } *) - Definition contains (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; x ] => @@ -2923,8 +3110,8 @@ Module collections. [ M.read (| self |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2947,7 +3134,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2962,7 +3150,7 @@ Module collections. unsafe { self.head.as_ref().map(|node| &node.as_ref().element) } } *) - Definition front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3021,8 +3209,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3053,7 +3241,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3068,7 +3257,7 @@ Module collections. unsafe { self.head.as_mut().map(|node| &mut node.as_mut().element) } } *) - Definition front_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition front_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3127,8 +3316,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3159,7 +3348,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3174,7 +3364,7 @@ Module collections. unsafe { self.tail.as_ref().map(|node| &node.as_ref().element) } } *) - Definition back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3233,8 +3423,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3265,7 +3455,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3280,7 +3471,7 @@ Module collections. unsafe { self.tail.as_mut().map(|node| &mut node.as_mut().element) } } *) - Definition back_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition back_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3339,8 +3530,8 @@ Module collections. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3371,7 +3562,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3391,7 +3583,7 @@ Module collections. } } *) - Definition push_front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; elt ] => @@ -3473,7 +3665,7 @@ Module collections. [ M.read (| self |); M.read (| node_ptr |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3487,7 +3679,7 @@ Module collections. self.pop_front_node().map(Node::into_element) } *) - Definition pop_front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3553,7 +3745,7 @@ Module collections. } } *) - Definition push_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; elt ] => @@ -3635,7 +3827,7 @@ Module collections. [ M.read (| self |); M.read (| node_ptr |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3649,7 +3841,7 @@ Module collections. self.pop_back_node().map(Node::into_element) } *) - Definition pop_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3740,7 +3932,7 @@ Module collections. unsafe { self.split_off_after_node(split_node, at) } } *) - Definition split_off (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_off (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; at_ ] => @@ -3763,15 +3955,16 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le (M.read (| at_ |)) (M.read (| len |))) + UnOp.Pure.not (| + BinOp.Pure.le (| M.read (| at_ |), M.read (| len |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3788,35 +3981,44 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "Cannot split off at a nonexistent index" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Cannot split off at a nonexistent index" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| at_ |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| at_ |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3872,14 +4074,14 @@ Module collections. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| at_ |)) (M.read (| len |)) + BinOp.Pure.eq (| M.read (| at_ |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -3922,7 +4124,8 @@ Module collections. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -3930,28 +4133,33 @@ Module collections. let split_node := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (BinOp.Panic.sub (| + BinOp.Pure.le (| + BinOp.Panic.sub (| + Integer.Usize, M.read (| at_ |), - Value.Integer Integer.Usize 1 - |)) - (BinOp.Panic.sub (| + M.of_value (| Value.Integer 1 |) + |), + BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |), BinOp.Panic.sub (| + Integer.Usize, M.read (| at_ |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3986,16 +4194,21 @@ Module collections. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - M.read (| at_ |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| at_ |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |), @@ -4053,10 +4266,12 @@ Module collections. [ iter ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4095,22 +4310,29 @@ Module collections. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - BinOp.Panic.sub (| - M.read (| len |), - Value.Integer Integer.Usize 1 - |), - BinOp.Panic.sub (| - M.read (| at_ |), - Value.Integer Integer.Usize 1 - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |), + BinOp.Panic.sub (| + Integer.Usize, + M.read (| at_ |), + M.of_value (| Value.Integer 1 |) + |) + |))) + ] + |) ] |) |), @@ -4168,10 +4390,12 @@ Module collections. [ iter ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4225,7 +4449,7 @@ Module collections. } } *) - Definition remove (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; at_ ] => @@ -4246,14 +4470,16 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (BinOp.Pure.lt (M.read (| at_ |)) (M.read (| len |))) + UnOp.Pure.not (| + BinOp.Pure.lt (| M.read (| at_ |), M.read (| len |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4270,41 +4496,48 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "Cannot remove at an index outside of the list bounds" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Cannot remove at an index outside of the list bounds" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let offset_from_end := M.alloc (| BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), M.read (| at_ |) |), - Value.Integer Integer.Usize 1 + Integer.Usize, + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| at_ |) |), + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| at_ |)) (M.read (| offset_from_end |)) + 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 := @@ -4333,12 +4566,14 @@ Module collections. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| at_ |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| at_ |))) + ] + |) ] |) |), @@ -4392,10 +4627,10 @@ Module collections. [ cursor ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4448,12 +4683,14 @@ Module collections. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| offset_from_end |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| offset_from_end |))) + ] + |) ] |) |), @@ -4507,10 +4744,10 @@ Module collections. [ cursor ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4553,7 +4790,7 @@ Module collections. self.retain_mut(|elem| f(elem)); } *) - Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; f ] => @@ -4575,8 +4812,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4594,16 +4831,22 @@ Module collections. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| elem |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| elem |)) ] + |) + ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4627,7 +4870,7 @@ Module collections. } } *) - Definition retain_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition retain_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; f ] => @@ -4649,7 +4892,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4674,15 +4917,15 @@ Module collections. |) in let node := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -4690,8 +4933,14 @@ Module collections. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| node |) ] ] - |)) + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| node |)) ] + |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4721,7 +4970,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -4737,7 +4986,7 @@ Module collections. [ cursor ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -4747,7 +4996,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4774,7 +5023,7 @@ Module collections. ExtractIf { list: self, it, pred: filter, idx: 0, old_len } } *) - Definition extract_if (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extract_if (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; filter ] => @@ -4799,15 +5048,17 @@ Module collections. |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::linked_list::ExtractIf" - [ - ("list", M.read (| self |)); - ("it", M.read (| it |)); - ("pred", M.read (| filter |)); - ("idx", Value.Integer Integer.Usize 0); - ("old_len", M.read (| old_len |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::ExtractIf" + [ + ("list", A.to_value (M.read (| self |))); + ("it", A.to_value (M.read (| it |))); + ("pred", A.to_value (M.read (| filter |))); + ("idx", A.to_value (M.of_value (| Value.Integer 0 |))); + ("old_len", A.to_value (M.read (| old_len |))) + ] + |) |) |))) | _, _ => M.impossible @@ -4829,7 +5080,7 @@ Module collections. Self::new() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -4867,20 +5118,28 @@ Module collections. LinkedList { head: None, tail: None, len: 0, alloc: Global, marker: PhantomData } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::linked_list::LinkedList" - [ - ("head", Value.StructTuple "core::option::Option::None" []); - ("tail", Value.StructTuple "core::option::Option::None" []); - ("len", Value.Integer Integer.Usize 0); - ("alloc", Value.StructTuple "alloc::alloc::Global" []); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::LinkedList" + [ + ("head", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("tail", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("alloc", + A.to_value (M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |))); + ("marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -4908,7 +5167,7 @@ Module collections. } } *) - Definition append (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition append (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -4948,7 +5207,7 @@ Module collections. |) in let tail := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5007,9 +5266,11 @@ Module collections. "alloc::collections::linked_list::Node", "next" |), - Value.StructTuple - "core::option::Option::Some" - [ M.read (| other_head |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| other_head |)) ] + |) |) in let _ := M.write (| @@ -5031,11 +5292,13 @@ Module collections. "alloc::collections::linked_list::Node", "prev" |), - Value.StructTuple - "core::option::Option::Some" - [ M.read (| tail |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tail |)) ] + |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -5078,6 +5341,7 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_function (| @@ -5090,13 +5354,13 @@ Module collections. "alloc::collections::linked_list::LinkedList", "len" |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -5133,7 +5397,7 @@ Module collections. mem::forget(guard); } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5142,15 +5406,17 @@ Module collections. M.read (| let guard := M.alloc (| - Value.StructTuple - "alloc::collections::linked_list::drop::DropGuard" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::linked_list::drop::DropGuard" + [ A.to_value (M.read (| self |)) ] + |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5201,7 +5467,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5209,7 +5475,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -5230,7 +5496,7 @@ Module collections. [ M.read (| guard |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5266,7 +5532,7 @@ Module collections. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -5274,25 +5540,28 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::Iter", "len" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5333,8 +5602,8 @@ Module collections. "head" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5373,8 +5642,9 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -5403,7 +5673,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -5418,33 +5689,40 @@ Module collections. (self.len, Some(self.len)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::Iter", - "len" - |) - |); - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::Iter", "len" |) - |) - ] - ])) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::Iter", + "len" + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5453,7 +5731,7 @@ Module collections. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -5506,7 +5784,7 @@ Module collections. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -5514,25 +5792,28 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::Iter", "len" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5573,8 +5854,8 @@ Module collections. "tail" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5613,8 +5894,9 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -5643,7 +5925,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -5697,35 +5980,42 @@ Module collections. Iter { head: None, tail: None, len: 0, marker: Default::default() } } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::linked_list::Iter" - [ - ("head", Value.StructTuple "core::option::Option::None" []); - ("tail", Value.StructTuple "core::option::Option::None" []); - ("len", Value.Integer Integer.Usize 0); - ("marker", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "core::marker::PhantomData") - [ + (M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::Iter" + [ + ("head", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("tail", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("marker", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "alloc::collections::linked_list::Node") [ T ] ] - ], - [], - "default", - [] - |), - [] - |)) - ])) + (Ty.path "core::marker::PhantomData") + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "alloc::collections::linked_list::Node") [ T ] ] + ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5760,7 +6050,7 @@ Module collections. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -5768,25 +6058,28 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::IterMut", "len" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5827,8 +6120,8 @@ Module collections. "head" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5867,8 +6160,9 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -5897,7 +6191,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -5912,33 +6207,40 @@ Module collections. (self.len, Some(self.len)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::IterMut", - "len" - |) - |); - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::IterMut", "len" |) - |) - ] - ])) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::IterMut", + "len" + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5947,7 +6249,7 @@ Module collections. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6000,7 +6302,7 @@ Module collections. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6008,25 +6310,28 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::IterMut", "len" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -6067,8 +6372,8 @@ Module collections. "tail" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6107,8 +6412,9 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -6137,7 +6443,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -6191,35 +6498,42 @@ Module collections. IterMut { head: None, tail: None, len: 0, marker: Default::default() } } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::linked_list::IterMut" - [ - ("head", Value.StructTuple "core::option::Option::None" []); - ("tail", Value.StructTuple "core::option::Option::None" []); - ("len", Value.Integer Integer.Usize 0); - ("marker", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "core::marker::PhantomData") - [ + (M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::IterMut" + [ + ("head", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("tail", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("marker", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", Ty.apply - (Ty.path "&mut") - [ Ty.apply (Ty.path "alloc::collections::linked_list::Node") [ T ] ] - ], - [], - "default", - [] - |), - [] - |)) - ])) + (Ty.path "core::marker::PhantomData") + [ + Ty.apply + (Ty.path "&mut") + [ Ty.apply (Ty.path "alloc::collections::linked_list::Node") [ T ] ] + ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -6264,7 +6578,7 @@ Module collections. Cursor { index, current, list } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6298,13 +6612,15 @@ Module collections. let current := M.copy (| γ0_1 |) in let list := M.copy (| γ0_2 |) in M.alloc (| - Value.StructRecord - "alloc::collections::linked_list::Cursor" - [ - ("index", M.read (| index |)); - ("current", M.read (| current |)); - ("list", M.read (| list |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::Cursor" + [ + ("index", A.to_value (M.read (| index |))); + ("current", A.to_value (M.read (| current |))); + ("list", A.to_value (M.read (| list |))) + ] + |) |))) ] |) @@ -6330,7 +6646,7 @@ Module collections. f.debug_tuple("Cursor").field(&self.list).field(&self.index()).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -6365,21 +6681,22 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Cursor" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Cursor" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::Cursor", "list" - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::linked_list::Cursor") [ T; A ], @@ -6388,7 +6705,8 @@ Module collections. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -6436,7 +6754,7 @@ Module collections. f.debug_tuple("CursorMut").field(&self.list).field(&self.index()).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -6471,21 +6789,23 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "CursorMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "CursorMut" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::CursorMut", "list" - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -6496,7 +6816,8 @@ Module collections. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -6523,7 +6844,7 @@ Module collections. Some(self.index) } *) - Definition index (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6611,17 +6932,20 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::Cursor", - "index" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::Cursor", + "index" + |) + |)) + ] + |) |))) ] |) @@ -6651,7 +6975,7 @@ Module collections. } } *) - Definition move_next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6712,9 +7036,9 @@ Module collections. "alloc::collections::linked_list::Cursor", "index" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -6761,9 +7085,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -6790,7 +7118,7 @@ Module collections. } } *) - Definition move_prev (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_prev (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6879,14 +7207,14 @@ Module collections. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -6948,11 +7276,11 @@ Module collections. "index" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6983,11 +7311,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -7003,7 +7332,7 @@ Module collections. unsafe { self.current.map(|current| &( *current.as_ptr()).element) } } *) - Definition current (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition current (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7041,8 +7370,8 @@ Module collections. "current" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7073,7 +7402,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7094,7 +7424,7 @@ Module collections. } } *) - Definition peek_next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7177,8 +7507,8 @@ Module collections. |), [ M.read (| next |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7209,7 +7539,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -7232,7 +7563,7 @@ Module collections. } } *) - Definition peek_prev (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_prev (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7315,8 +7646,8 @@ Module collections. |), [ M.read (| prev |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7347,7 +7678,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -7364,7 +7696,7 @@ Module collections. self.list.front() } *) - Definition front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7398,7 +7730,7 @@ Module collections. self.list.back() } *) - Definition back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7438,7 +7770,7 @@ Module collections. Some(self.index) } *) - Definition index (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7526,17 +7858,20 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::CursorMut", - "index" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::CursorMut", + "index" + |) + |)) + ] + |) |))) ] |) @@ -7566,7 +7901,7 @@ Module collections. } } *) - Definition move_next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7627,9 +7962,9 @@ Module collections. "alloc::collections::linked_list::CursorMut", "index" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -7676,9 +8011,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -7705,7 +8044,7 @@ Module collections. } } *) - Definition move_prev (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_prev (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7794,14 +8133,14 @@ Module collections. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -7863,11 +8202,11 @@ Module collections. "index" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7898,11 +8237,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -7918,7 +8258,7 @@ Module collections. unsafe { self.current.map(|current| &mut ( *current.as_ptr()).element) } } *) - Definition current (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition current (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7956,8 +8296,8 @@ Module collections. "current" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7988,7 +8328,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8009,7 +8350,7 @@ Module collections. } } *) - Definition peek_next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8092,8 +8433,8 @@ Module collections. |), [ M.read (| next |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -8124,7 +8465,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -8147,7 +8489,7 @@ Module collections. } } *) - Definition peek_prev (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_prev (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8230,8 +8572,8 @@ Module collections. |), [ M.read (| prev |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -8262,7 +8604,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -8270,52 +8613,57 @@ Module collections. | _, _ => M.impossible end. - Axiom AssociatedFunction_peek_prev : - forall (T A : Ty.t), - M.IsAssociatedFunction (Self T A) "peek_prev" (peek_prev T A). - - (* - pub fn as_cursor(&self) -> Cursor<'_, T, A> { - Cursor { list: self.list, current: self.current, index: self.index } - } - *) - Definition as_cursor (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := - let Self : Ty.t := Self T A in - match τ, α with - | [], [ self ] => - ltac:(M.monadic - (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::linked_list::Cursor" - [ - ("list", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::CursorMut", - "list" - |) - |)); - ("current", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::CursorMut", - "current" - |) - |)); - ("index", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::CursorMut", - "index" - |) - |)) - ])) - | _, _ => M.impossible - end. - + Axiom AssociatedFunction_peek_prev : + forall (T A : Ty.t), + M.IsAssociatedFunction (Self T A) "peek_prev" (peek_prev T A). + + (* + pub fn as_cursor(&self) -> Cursor<'_, T, A> { + Cursor { list: self.list, current: self.current, index: self.index } + } + *) + Definition as_cursor (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self T A in + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::Cursor" + [ + ("list", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::CursorMut", + "list" + |) + |))); + ("current", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::CursorMut", + "current" + |) + |))); + ("index", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::CursorMut", + "index" + |) + |))) + ] + |))) + | _, _ => M.impossible + end. + Axiom AssociatedFunction_as_cursor : forall (T A : Ty.t), M.IsAssociatedFunction (Self T A) "as_cursor" (as_cursor T A). @@ -8335,7 +8683,7 @@ Module collections. } } *) - Definition insert_after (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_after (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; item ] => @@ -8485,12 +8833,12 @@ Module collections. M.read (| node_next |); M.read (| spliced_node |); M.read (| spliced_node |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8544,8 +8892,8 @@ Module collections. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -8569,7 +8917,7 @@ Module collections. } } *) - Definition insert_before (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_before (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; item ] => @@ -8719,7 +9067,7 @@ Module collections. |); M.read (| spliced_node |); M.read (| spliced_node |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -8732,9 +9080,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8754,7 +9106,7 @@ Module collections. } } *) - Definition remove_current (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_current (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8915,17 +9267,20 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| unlinked_node |), - "alloc::collections::linked_list::Node", - "element" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| unlinked_node |), + "alloc::collections::linked_list::Node", + "element" + |) + |)) + ] + |) |) |))) |))) @@ -8958,7 +9313,7 @@ Module collections. } } *) - Definition remove_current_as_list (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_current_as_list (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9113,7 +9468,7 @@ Module collections. "alloc::collections::linked_list::Node", "prev" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.write (| @@ -9131,44 +9486,66 @@ Module collections. "alloc::collections::linked_list::Node", "next" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "alloc::collections::linked_list::LinkedList" - [ - ("head", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| unlinked_node |) ]); - ("tail", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| unlinked_node |) ]); - ("len", Value.Integer Integer.Usize 1); - ("alloc", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::LinkedList" [ - M.SubPointer.get_struct_record_field (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::CursorMut", - "list" - |) - |), - "alloc::collections::linked_list::LinkedList", - "alloc" - |) + ("head", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| unlinked_node |)) ] + |))); + ("tail", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| unlinked_node |)) ] + |))); + ("len", A.to_value (M.of_value (| Value.Integer 1 |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::CursorMut", + "list" + |) + |), + "alloc::collections::linked_list::LinkedList", + "alloc" + |) + ] + |))); + ("marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) ] - |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + |)) + ] + |) |) |))) |))) @@ -9192,7 +9569,7 @@ Module collections. unsafe { self.list.split_off_after_node(self.current, split_off_idx) } } *) - Definition split_after (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_after (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9202,22 +9579,22 @@ Module collections. let split_off_idx := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::CursorMut", "index" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| @@ -9229,15 +9606,17 @@ Module collections. "alloc::collections::linked_list::LinkedList", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9245,7 +9624,7 @@ Module collections. "index" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -9253,22 +9632,22 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::CursorMut", "index" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| @@ -9280,7 +9659,8 @@ Module collections. "alloc::collections::linked_list::LinkedList", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -9291,10 +9671,10 @@ Module collections. "alloc::collections::linked_list::CursorMut", "index" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -9341,7 +9721,7 @@ Module collections. unsafe { self.list.split_off_before_node(self.current, split_off_idx) } } *) - Definition split_before (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_before (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9363,7 +9743,7 @@ Module collections. "alloc::collections::linked_list::CursorMut", "index" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in M.alloc (| M.call_closure (| @@ -9408,7 +9788,7 @@ Module collections. self.index += 1; } *) - Definition push_front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; elt ] => @@ -9445,9 +9825,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9469,7 +9853,7 @@ Module collections. } } *) - Definition push_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; elt ] => @@ -9498,7 +9882,7 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9539,10 +9923,14 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -9574,7 +9962,7 @@ Module collections. } } *) - Definition pop_front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9582,7 +9970,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9609,12 +9997,14 @@ Module collections. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9691,7 +10081,7 @@ Module collections. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -9704,11 +10094,12 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -9758,7 +10149,7 @@ Module collections. } } *) - Definition pop_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9766,7 +10157,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9793,12 +10184,14 @@ Module collections. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9869,13 +10262,15 @@ Module collections. "alloc::collections::linked_list::CursorMut", "current" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9921,6 +10316,7 @@ Module collections. "index" |), BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -9934,11 +10330,13 @@ Module collections. "len" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -9978,7 +10376,7 @@ Module collections. self.list.front() } *) - Definition front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -10012,7 +10410,7 @@ Module collections. self.list.front_mut() } *) - Definition front_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition front_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -10046,7 +10444,7 @@ Module collections. self.list.back() } *) - Definition back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -10080,7 +10478,7 @@ Module collections. self.list.back_mut() } *) - Definition back_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition back_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -10135,7 +10533,7 @@ Module collections. } } *) - Definition splice_after (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition splice_after (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; list ] => @@ -10173,7 +10571,9 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))) ] |), @@ -10271,7 +10671,7 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10330,8 +10730,9 @@ Module collections. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -10361,7 +10762,7 @@ Module collections. } } *) - Definition splice_before (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition splice_before (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; list ] => @@ -10399,7 +10800,9 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))) ] |), @@ -10505,9 +10908,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| splice_len |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.read (| splice_len |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -10570,7 +10977,7 @@ Module collections. None } *) - Definition next (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self ] => @@ -10583,7 +10990,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10638,12 +11045,13 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10664,29 +11072,32 @@ Module collections. "alloc::collections::linked_list::ExtractIf", "pred" |); - Value.Tuple - [ - M.SubPointer.get_struct_record_field (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::ptr::non_null::NonNull") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "alloc::collections::linked_list::Node") - [ T ] - ], - "as_mut", - [] - |), - [ node ] - |), - "alloc::collections::linked_list::Node", - "element" - |) - ] + "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path + "alloc::collections::linked_list::Node") + [ T ] + ], + "as_mut", + [] + |), + [ node ] + |), + "alloc::collections::linked_list::Node", + "element" + |)) + ] + |) ] |) |)) in @@ -10722,54 +11133,59 @@ Module collections. |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ - Ty.apply - (Ty.path - "alloc::collections::linked_list::Node") - [ T ]; - Ty.path "alloc::alloc::Global" - ], - "from_raw", - [] - |), - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path - "core::ptr::non_null::NonNull") + (Ty.path "alloc::boxed::Box") [ Ty.apply (Ty.path "alloc::collections::linked_list::Node") - [ T ] + [ T ]; + Ty.path "alloc::alloc::Global" ], - "as_ptr", + "from_raw", [] |), - [ M.read (| node |) ] - |) - ] - |), - "alloc::collections::linked_list::Node", - "element" - |) - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path + "alloc::collections::linked_list::Node") + [ T ] + ], + "as_ptr", + [] + |), + [ M.read (| node |) ] + |) + ] + |), + "alloc::collections::linked_list::Node", + "element" + |) + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -10781,14 +11197,14 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -10799,36 +11215,43 @@ Module collections. (0, Some(self.old_len - self.idx)) } *) - Definition size_hint (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.sub (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::ExtractIf", - "old_len" - |) - |), - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::ExtractIf", - "idx" - |) - |) - |) - ] - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::ExtractIf", + "old_len" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::ExtractIf", + "idx" + |) + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10857,7 +11280,7 @@ Module collections. f.debug_tuple("ExtractIf").field(&self.list).finish() } *) - Definition fmt (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self; f ] => @@ -10885,16 +11308,17 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "ExtractIf" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "ExtractIf" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::ExtractIf", "list" - |)) + |) + |) ] |) ] @@ -10923,7 +11347,7 @@ Module collections. self.list.pop_front() } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -10951,29 +11375,17 @@ Module collections. (self.list.len, Some(self.list.len)) } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::linked_list::IntoIter", - "list" - |), - "alloc::collections::linked_list::LinkedList", - "len" - |) - |); - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10983,9 +11395,28 @@ Module collections. "alloc::collections::linked_list::LinkedList", "len" |) - |) - ] - ])) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::linked_list::IntoIter", + "list" + |), + "alloc::collections::linked_list::LinkedList", + "len" + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11012,7 +11443,7 @@ Module collections. self.list.pop_back() } *) - Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -11081,7 +11512,7 @@ Module collections. LinkedList::new().into_iter() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -11134,7 +11565,7 @@ Module collections. list } *) - Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ iter ] => @@ -11199,15 +11630,17 @@ Module collections. IntoIter { list: self } } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::linked_list::IntoIter" - [ ("list", M.read (| self |)) ])) + M.of_value (| + Value.StructRecord + "alloc::collections::linked_list::IntoIter" + [ ("list", A.to_value (M.read (| self |))) ] + |))) | _, _ => M.impossible end. @@ -11243,7 +11676,7 @@ Module collections. self.iter() } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -11292,7 +11725,7 @@ Module collections. self.iter_mut() } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -11332,7 +11765,7 @@ Module collections. >::spec_extend(self, iter); } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -11353,7 +11786,7 @@ Module collections. [ M.read (| self |); M.read (| iter |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11363,7 +11796,7 @@ Module collections. self.push_back(elem); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; elem ] => @@ -11382,7 +11815,7 @@ Module collections. [ M.read (| self |); M.read (| elem |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11409,7 +11842,7 @@ Module collections. iter.into_iter().for_each(move |elt| self.push_back(elt)); } *) - Definition spec_extend (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self; iter ] => @@ -11438,8 +11871,8 @@ Module collections. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11462,11 +11895,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11491,7 +11925,7 @@ Module collections. self.append(other); } *) - Definition spec_extend (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; β1 ] => @@ -11518,7 +11952,7 @@ Module collections. [ M.read (| self |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) @@ -11549,7 +11983,7 @@ Module collections. self.extend(iter.into_iter().cloned()); } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -11594,7 +12028,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11604,7 +12038,7 @@ Module collections. self.push_back(elem); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; β1 ] => @@ -11632,7 +12066,7 @@ Module collections. [ M.read (| self |); M.read (| elem |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) @@ -11661,7 +12095,7 @@ Module collections. self.len() == other.len() && self.iter().eq(other) } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -11669,23 +12103,24 @@ Module collections. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::linked_list::LinkedList") [ T; A ], "len", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::linked_list::LinkedList") [ T; A ], "len", [] |), [ M.read (| other |) ] - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -11721,7 +12156,7 @@ Module collections. self.len() != other.len() || self.iter().ne(other) } *) - Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -11729,23 +12164,24 @@ Module collections. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.or (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::linked_list::LinkedList") [ T; A ], "len", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::linked_list::LinkedList") [ T; A ], "len", [] |), [ M.read (| other |) ] - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -11808,7 +12244,7 @@ Module collections. self.iter().partial_cmp(other) } *) - Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -11860,7 +12296,7 @@ Module collections. self.iter().cmp(other) } *) - Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -11914,7 +12350,7 @@ Module collections. list } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -12002,7 +12438,7 @@ Module collections. } } *) - Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -12023,15 +12459,15 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::linked_list::LinkedList") @@ -12040,8 +12476,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::linked_list::LinkedList") @@ -12050,7 +12486,8 @@ Module collections. [] |), [ M.read (| other |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -12079,8 +12516,8 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -12197,23 +12634,23 @@ Module collections. [ M.read (| elem |); M.read (| elem_other |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply (Ty.path "alloc::collections::linked_list::Iter") [ T ], @@ -12222,7 +12659,8 @@ Module collections. [] |), [ iter_other ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -12257,8 +12695,8 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -12287,7 +12725,7 @@ Module collections. f.debug_list().entries(self).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -12353,7 +12791,7 @@ Module collections. } } *) - Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ H ], [ self; state ] => @@ -12448,10 +12886,10 @@ Module collections. [ M.read (| elt |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -12479,7 +12917,7 @@ Module collections. Self::from_iter(arr) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ arr ] => @@ -12522,8 +12960,11 @@ Module collections. } } *) - Definition assert_covariance (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. + Definition assert_covariance (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. Module assert_covariance. (* @@ -12531,7 +12972,7 @@ Module collections. x } *) - Definition a (τ : list Ty.t) (α : list Value.t) : M := + Definition a (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -12545,7 +12986,7 @@ Module collections. x } *) - Definition b (τ : list Ty.t) (α : list Value.t) : M := + Definition b (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -12559,7 +13000,7 @@ Module collections. x } *) - Definition c (τ : list Ty.t) (α : list Value.t) : M := + Definition c (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic diff --git a/CoqOfRust/alloc/collections/mod.v b/CoqOfRust/alloc/collections/mod.v index cbe23b04a..1d7adf6bb 100644 --- a/CoqOfRust/alloc/collections/mod.v +++ b/CoqOfRust/alloc/collections/mod.v @@ -13,32 +13,35 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::TryReserveError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::TryReserveError" - [ - ("kind", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "alloc::collections::TryReserveErrorKind", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::TryReserveError", - "kind" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::TryReserveError" + [ + ("kind", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloc::collections::TryReserveErrorKind", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::TryReserveError", + "kind" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -65,7 +68,7 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::TryReserveError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -118,15 +121,15 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::TryReserveError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -145,7 +148,7 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::TryReserveError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -159,17 +162,18 @@ Module collections. |), [ M.read (| f |); - M.read (| Value.String "TryReserveError" |); - M.read (| Value.String "kind" |); + M.read (| M.of_value (| Value.String "TryReserveError" |) |); + M.read (| M.of_value (| Value.String "kind" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::TryReserveError", "kind" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -191,7 +195,7 @@ Module collections. self.kind.clone() } *) - Definition kind (τ : list Ty.t) (α : list Value.t) : M := + Definition kind (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -245,7 +249,7 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::TryReserveErrorKind". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -258,9 +262,11 @@ Module collections. ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [] + M.of_value (| + Value.StructTuple + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + [] + |) |))); fun γ => ltac:(M.monadic @@ -280,32 +286,36 @@ Module collections. let __self_0 := M.alloc (| γ1_0 |) in let __self_1 := M.alloc (| γ1_1 |) in M.alloc (| - Value.StructRecord - "alloc::collections::TryReserveErrorKind::AllocError" - [ - ("layout", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::alloc::layout::Layout", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |)); - ("non_exhaustive", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.tuple [], - [], - "clone", - [] - |), - [ M.read (| __self_1 |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::TryReserveErrorKind::AllocError" + [ + ("layout", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::alloc::layout::Layout", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |))); + ("non_exhaustive", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.tuple [], + [], + "clone", + [] + |), + [ M.read (| __self_1 |) ] + |))) + ] + |) |))) ] |) @@ -336,7 +346,7 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::TryReserveErrorKind". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -365,11 +375,16 @@ Module collections. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -430,7 +445,7 @@ Module collections. |))) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -463,20 +478,20 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::TryReserveErrorKind". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) @@ -497,7 +512,7 @@ Module collections. Definition Self : Ty.t := Ty.path "alloc::collections::TryReserveErrorKind". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -517,7 +532,10 @@ Module collections. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "CapacityOverflow" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "CapacityOverflow" |) |) + ] |) |))); fun γ => @@ -546,11 +564,11 @@ Module collections. |), [ M.read (| f |); - M.read (| Value.String "AllocError" |); - M.read (| Value.String "layout" |); - (* Unsize *) M.pointer_coercion (M.read (| __self_0 |)); - M.read (| Value.String "non_exhaustive" |); - (* Unsize *) M.pointer_coercion __self_1 + M.read (| M.of_value (| Value.String "AllocError" |) |); + M.read (| M.of_value (| Value.String "layout" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| __self_0 |) |); + M.read (| M.of_value (| Value.String "non_exhaustive" |) |); + (* Unsize *) M.pointer_coercion (| __self_1 |) ] |) |))) @@ -576,12 +594,16 @@ Module collections. Self { kind } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ kind ] => ltac:(M.monadic (let kind := M.alloc (| kind |) in - Value.StructRecord "alloc::collections::TryReserveError" [ ("kind", M.read (| kind |)) ])) + M.of_value (| + Value.StructRecord + "alloc::collections::TryReserveError" + [ ("kind", A.to_value (M.read (| kind |))) ] + |))) | _, _ => M.impossible end. @@ -601,7 +623,7 @@ Module collections. TryReserveErrorKind::CapacityOverflow } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0 ] => ltac:(M.monadic @@ -611,9 +633,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [])) + (M.of_value (| + Value.StructTuple "alloc::collections::TryReserveErrorKind::CapacityOverflow" [] + |))) ] |))) | _, _ => M.impossible @@ -647,7 +669,7 @@ Module collections. fmt.write_str(reason) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -676,7 +698,9 @@ Module collections. "write_str", [] |), - [ M.read (| fmt |); M.read (| Value.String "memory allocation failed" |) + [ + M.read (| fmt |); + M.read (| M.of_value (| Value.String "memory allocation failed" |) |) ] |) ] @@ -742,13 +766,17 @@ Module collections. [ fun γ => ltac:(M.monadic - (Value.String - " because the computed capacity exceeded the collection's maximum")); + (M.of_value (| + Value.String + " because the computed capacity exceeded the collection's maximum" + |))); fun γ => ltac:(M.monadic (M.alloc (| M.read (| - Value.String " because the memory allocator returned an error" + M.of_value (| + 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 6ef6138af..6b804bc3a 100644 --- a/CoqOfRust/alloc/collections/vec_deque/drain.v +++ b/CoqOfRust/alloc/collections/vec_deque/drain.v @@ -45,7 +45,7 @@ Module collections. } } *) - Definition new (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ deque; drain_start; drain_len ] => @@ -71,45 +71,55 @@ Module collections. let tail_len := M.alloc (| BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| orig_len |), M.read (| drain_start |) |), + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| orig_len |), + M.read (| drain_start |) + |), M.read (| drain_len |) |) |) in M.alloc (| - Value.StructRecord - "alloc::collections::vec_deque::drain::Drain" - [ - ("deque", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::drain::Drain" + [ + ("deque", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ] - ], - [ - Ty.apply - (Ty.path "&mut") + (Ty.path "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ] + ], [ Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ] - ] - ], - "from", - [] - |), - [ M.read (| deque |) ] - |)); - ("drain_len", M.read (| drain_len |)); - ("idx", M.read (| drain_start |)); - ("tail_len", M.read (| tail_len |)); - ("remaining", M.read (| drain_len |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + (Ty.path "&mut") + [ + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ] + ] + ], + "from", + [] + |), + [ M.read (| deque |) ] + |))); + ("drain_len", A.to_value (M.read (| drain_len |))); + ("idx", A.to_value (M.read (| drain_start |))); + ("tail_len", A.to_value (M.read (| tail_len |))); + ("remaining", A.to_value (M.read (| drain_len |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -138,7 +148,7 @@ Module collections. } } *) - Definition as_slices (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slices (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -166,35 +176,40 @@ Module collections. |) in let logical_remaining_range := M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::drain::Drain", - "idx" - |) - |)); - ("end_", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::drain::Drain", - "idx" - |) - |), - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::drain::Drain", - "remaining" - |) - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::drain::Drain", + "idx" + |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::drain::Drain", + "idx" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::drain::Drain", + "remaining" + |) + |) + |))) + ] + |) |) in M.match_operator (| M.alloc (| @@ -234,29 +249,33 @@ Module collections. let a_range := M.copy (| γ0_0 |) in let b_range := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "buffer_range", - [] - |), - [ M.read (| deque |); M.read (| a_range |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "buffer_range", - [] - |), - [ M.read (| deque |); M.read (| b_range |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_range", + [] + |), + [ M.read (| deque |); M.read (| a_range |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_range", + [] + |), + [ M.read (| deque |); M.read (| b_range |) ] + |)) + ] + |) |))) ] |) @@ -283,7 +302,7 @@ Module collections. .finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -332,43 +351,50 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Drain" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Drain" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "drain_len" - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "idx" - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "tail_len" - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "remaining" - |)) + |) + |) ] |) ] @@ -498,7 +524,7 @@ Module collections. // Dropping `guard` handles moving the remaining elements into place. } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -507,20 +533,22 @@ Module collections. M.read (| let guard := M.alloc (| - Value.StructTuple - "alloc::collections::vec_deque::drain::drop::DropGuard" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::vec_deque::drain::drop::DropGuard" + [ A.to_value (M.read (| self |)) ] + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_tuple_field (| @@ -532,8 +560,9 @@ Module collections. "alloc::collections::vec_deque::drain::Drain", "remaining" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -581,6 +610,7 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -610,6 +640,7 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -646,7 +677,7 @@ Module collections. "alloc::collections::vec_deque::drain::Drain", "remaining" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.alloc (| @@ -658,10 +689,10 @@ Module collections. [ M.read (| back |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -695,7 +726,7 @@ Module collections. Some(unsafe { self.deque.as_mut().buffer_read(wrapped_idx) }) } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -706,22 +737,23 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "remaining" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -732,12 +764,14 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let wrapped_idx := @@ -788,7 +822,11 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := let β := @@ -799,43 +837,52 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], - "buffer_read", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ] - ], - "as_mut", + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_read", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::drain::Drain", - "deque" - |) + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ] + ], + "as_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::drain::Drain", + "deque" + |) + ] + |); + M.read (| wrapped_idx |) ] - |); - M.read (| wrapped_idx |) - ] - |) - ] + |)) + ] + |) |) |))) |))) @@ -848,7 +895,7 @@ Module collections. (len, Some(len)) } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -864,11 +911,18 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| len |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -902,7 +956,7 @@ Module collections. Some(unsafe { self.deque.as_mut().buffer_read(wrapped_idx) }) } *) - Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -913,22 +967,23 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "remaining" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -939,12 +994,14 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -956,7 +1013,11 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let wrapped_idx := M.alloc (| @@ -988,6 +1049,7 @@ Module collections. ] |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1007,40 +1069,45 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], - "buffer_read", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ] - ], - "as_mut", + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_read", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::drain::Drain", - "deque" - |) + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ] + ], + "as_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::drain::Drain", + "deque" + |) + ] + |); + M.read (| wrapped_idx |) ] - |); - M.read (| wrapped_idx |) - ] - |) - ] + |)) + ] + |) |) |))) |))) diff --git a/CoqOfRust/alloc/collections/vec_deque/into_iter.v b/CoqOfRust/alloc/collections/vec_deque/into_iter.v index 112af53c3..3e233e72c 100644 --- a/CoqOfRust/alloc/collections/vec_deque/into_iter.v +++ b/CoqOfRust/alloc/collections/vec_deque/into_iter.v @@ -17,33 +17,36 @@ Module collections. Ty.apply (Ty.path "alloc::collections::vec_deque::into_iter::IntoIter") [ T; A ]. (* Clone *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::vec_deque::into_iter::IntoIter" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::into_iter::IntoIter", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::into_iter::IntoIter" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::into_iter::IntoIter", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -65,15 +68,17 @@ Module collections. IntoIter { inner } } *) - Definition new (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ inner ] => ltac:(M.monadic (let inner := M.alloc (| inner |) in - Value.StructRecord - "alloc::collections::vec_deque::into_iter::IntoIter" - [ ("inner", M.read (| inner |)) ])) + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::into_iter::IntoIter" + [ ("inner", A.to_value (M.read (| inner |))) ] + |))) | _, _ => M.impossible end. @@ -86,7 +91,7 @@ Module collections. self.inner } *) - Definition into_vecdeque (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_vecdeque (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -116,7 +121,7 @@ Module collections. f.debug_tuple("IntoIter").field(&self.inner).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -144,16 +149,17 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "IntoIter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "IntoIter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::into_iter::IntoIter", "inner" - |)) + |) + |) ] |) ] @@ -182,7 +188,7 @@ Module collections. self.inner.pop_front() } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -211,7 +217,7 @@ Module collections. (len, Some(len)) } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -236,11 +242,18 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| len |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -259,7 +272,7 @@ Module collections. NonZeroUsize::new(rem).map_or(Ok(()), Err) } *) - Definition advance_by (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; n ] => @@ -282,13 +295,15 @@ Module collections. let rem := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| len |)) (M.read (| n |)) |)) in + (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 _ := @@ -310,7 +325,9 @@ Module collections. ] |) |) in - M.alloc (| BinOp.Panic.sub (| M.read (| n |), M.read (| len |) |) |))); + M.alloc (| + BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| len |) |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -333,13 +350,15 @@ Module collections. "alloc::collections::vec_deque::into_iter::IntoIter", "inner" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| n |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| n |))) ] + |) ] |) |) in - M.alloc (| Value.Integer Integer.Usize 0 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -370,8 +389,12 @@ Module collections. |), [ M.read (| rem |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -384,7 +407,7 @@ Module collections. self.inner.len } *) - Definition count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -447,7 +470,7 @@ Module collections. .try_fold(init, &mut f) } *) - Definition try_fold (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -460,17 +483,20 @@ Module collections. (M.read (| let guard := M.alloc (| - Value.StructRecord - "alloc::collections::vec_deque::into_iter::try_fold::Guard" - [ - ("deque", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::into_iter::IntoIter", - "inner" - |)); - ("consumed", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::into_iter::try_fold::Guard" + [ + ("deque", + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::into_iter::IntoIter", + "inner" + |))); + ("consumed", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in M.match_operator (| M.alloc (| @@ -557,8 +583,8 @@ Module collections. |), [ M.read (| head |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -579,10 +605,11 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in M.alloc (| @@ -598,7 +625,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |); @@ -689,8 +717,8 @@ Module collections. |), [ M.read (| tail |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -711,8 +739,9 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| @@ -728,7 +757,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |); @@ -755,7 +785,7 @@ Module collections. } } *) - Definition fold (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ B; F ], [ self; init; f ] => @@ -785,8 +815,8 @@ Module collections. [ self; M.read (| init |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -802,30 +832,39 @@ Module collections. fun γ => ltac:(M.monadic (let item := M.copy (| γ |) in - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnMut", - F, - [ Ty.tuple [ B; T ] ], - "call_mut", - [] - |), - [ - f; - Value.Tuple - [ M.read (| b |); M.read (| item |) ] - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + F, + [ Ty.tuple [ B; T ] ], + "call_mut", + [] + |), + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| b |)); + A.to_value (M.read (| item |)) + ] + |) + ] + |)) + ] + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -863,7 +902,7 @@ Module collections. self.inner.pop_back() } *) - Definition last (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -932,7 +971,7 @@ Module collections. } } *) - Definition next_chunk (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_chunk (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -972,7 +1011,7 @@ Module collections. "as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion raw_arr ] + [ (* Unsize *) M.pointer_coercion (| raw_arr |) ] |) ] |) @@ -1003,27 +1042,28 @@ Module collections. let tail := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| head |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "alloc::collections::vec_deque::into_iter::next_chunk::N" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1106,6 +1146,7 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| M.get_constant (| @@ -1115,42 +1156,46 @@ Module collections. |) |) in M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.apply (Ty.path "array") [ T ] ], - "assume_init", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "array") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ], - "transpose", + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.apply (Ty.path "array") [ T ] ], + "assume_init", [] |), - [ M.read (| raw_arr |) ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "array") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ], + "transpose", + [] + |), + [ M.read (| raw_arr |) ] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1184,6 +1229,7 @@ Module collections. let remaining := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "alloc::collections::vec_deque::into_iter::next_chunk::N" @@ -1200,23 +1246,24 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| tail |) ] - |)) - (M.read (| remaining |)) + |), + M.read (| remaining |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1308,6 +1355,7 @@ Module collections. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| M.get_constant (| @@ -1317,36 +1365,39 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.apply (Ty.path "array") [ T ] ], - "assume_init", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "array") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ], - "transpose", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.apply (Ty.path "array") [ T ] ], + "assume_init", [] |), - [ M.read (| raw_arr |) ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "array") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ], + "transpose", + [] + |), + [ M.read (| raw_arr |) ] + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1398,6 +1449,7 @@ Module collections. let init := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1427,7 +1479,7 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| @@ -1440,31 +1492,38 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "len" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::array::iter::IntoIter") - [ T ], - "new_unchecked", - [] - |), - [ - M.read (| raw_arr |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::array::iter::IntoIter") + [ T ], + "new_unchecked", + [] + |), [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| init |)) + M.read (| raw_arr |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| init |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |))) @@ -1504,7 +1563,7 @@ Module collections. self.inner.pop_back() } *) - Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1540,7 +1599,7 @@ Module collections. NonZeroUsize::new(rem).map_or(Ok(()), Err) } *) - Definition advance_back_by (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; n ] => @@ -1563,13 +1622,15 @@ Module collections. let rem := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| len |)) (M.read (| n |)) |)) in + (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 _ := @@ -1591,7 +1652,9 @@ Module collections. ] |) |) in - M.alloc (| BinOp.Panic.sub (| M.read (| n |), M.read (| len |) |) |))); + M.alloc (| + BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| len |) |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -1610,11 +1673,15 @@ Module collections. "alloc::collections::vec_deque::into_iter::IntoIter", "inner" |); - BinOp.Panic.sub (| M.read (| len |), M.read (| n |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| n |) + |) ] |) |) in - M.alloc (| Value.Integer Integer.Usize 0 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -1645,8 +1712,12 @@ Module collections. |), [ M.read (| rem |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -1694,7 +1765,7 @@ Module collections. .try_rfold(init, &mut f) } *) - Definition try_rfold (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -1707,17 +1778,20 @@ Module collections. (M.read (| let guard := M.alloc (| - Value.StructRecord - "alloc::collections::vec_deque::into_iter::try_rfold::Guard" - [ - ("deque", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::into_iter::IntoIter", - "inner" - |)); - ("consumed", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::into_iter::try_rfold::Guard" + [ + ("deque", + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::into_iter::IntoIter", + "inner" + |))); + ("consumed", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in M.match_operator (| M.alloc (| @@ -1804,8 +1878,8 @@ Module collections. |), [ M.read (| tail |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1826,10 +1900,11 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in M.alloc (| @@ -1845,7 +1920,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |); @@ -1936,8 +2012,8 @@ Module collections. |), [ M.read (| head |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1958,8 +2034,9 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| @@ -1975,7 +2052,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |); @@ -2002,7 +2080,7 @@ Module collections. } } *) - Definition rfold (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ B; F ], [ self; init; f ] => @@ -2032,8 +2110,8 @@ Module collections. [ self; M.read (| init |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2049,30 +2127,39 @@ Module collections. fun γ => ltac:(M.monadic (let item := M.copy (| γ |) in - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnMut", - F, - [ Ty.tuple [ B; T ] ], - "call_mut", - [] - |), - [ - f; - Value.Tuple - [ M.read (| b |); M.read (| item |) ] - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + F, + [ Ty.tuple [ B; T ] ], + "call_mut", + [] + |), + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| b |)); + A.to_value (M.read (| item |)) + ] + |) + ] + |)) + ] + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -2129,7 +2216,7 @@ Module collections. self.inner.is_empty() } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/alloc/collections/vec_deque/iter.v b/CoqOfRust/alloc/collections/vec_deque/iter.v index dbd596b30..c01bc8a97 100644 --- a/CoqOfRust/alloc/collections/vec_deque/iter.v +++ b/CoqOfRust/alloc/collections/vec_deque/iter.v @@ -24,16 +24,18 @@ Module collections. Self { i1, i2 } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ i1; i2 ] => ltac:(M.monadic (let i1 := M.alloc (| i1 |) in let i2 := M.alloc (| i2 |) in - Value.StructRecord - "alloc::collections::vec_deque::iter::Iter" - [ ("i1", M.read (| i1 |)); ("i2", M.read (| i2 |)) ])) + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::iter::Iter" + [ ("i1", A.to_value (M.read (| i1 |))); ("i2", A.to_value (M.read (| i2 |))) ] + |))) | _, _ => M.impossible end. @@ -51,7 +53,7 @@ Module collections. f.debug_tuple("Iter").field(&self.i1.as_slice()).field(&self.i2.as_slice()).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -86,12 +88,12 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Iter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Iter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], @@ -106,12 +108,13 @@ Module collections. |) ] |) - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], @@ -126,7 +129,8 @@ Module collections. |) ] |) - |)) + |) + |) ] |) ] @@ -152,50 +156,54 @@ Module collections. Iter { i1: self.i1.clone(), i2: self.i2.clone() } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::collections::vec_deque::iter::Iter" - [ - ("i1", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::iter::Iter", - "i1" - |) - ] - |)); - ("i2", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::iter::Iter", - "i2" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::iter::Iter" + [ + ("i1", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::iter::Iter", + "i1" + |) + ] + |))); + ("i2", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::iter::Iter", + "i2" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -231,7 +239,7 @@ Module collections. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -268,7 +276,11 @@ Module collections. |) in let val := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -329,7 +341,7 @@ Module collections. } } *) - Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -374,7 +386,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) |) |) @@ -448,7 +464,7 @@ Module collections. (len, Some(len)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -469,11 +485,18 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| len |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -488,7 +511,7 @@ Module collections. self.i2.fold(accum, &mut f) } *) - Definition fold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ Acc; F ], [ self; accum; f ] => @@ -556,7 +579,7 @@ Module collections. self.i2.try_fold(acc, &mut f) } *) - Definition try_fold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -672,7 +695,7 @@ Module collections. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -705,7 +728,7 @@ Module collections. } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -733,14 +756,14 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| idx |)) (M.read (| i1_len |)) + BinOp.Pure.lt (| M.read (| idx |), M.read (| i1_len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -780,7 +803,11 @@ Module collections. "alloc::collections::vec_deque::iter::Iter", "i2" |); - BinOp.Panic.sub (| M.read (| idx |), M.read (| i1_len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| idx |), + M.read (| i1_len |) + |) ] |) |))) @@ -829,7 +856,7 @@ Module collections. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -866,7 +893,11 @@ Module collections. |) in let val := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -926,7 +957,7 @@ Module collections. } } *) - Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -969,7 +1000,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) |) |) @@ -1046,7 +1081,7 @@ Module collections. self.i1.rfold(accum, &mut f) } *) - Definition rfold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ Acc; F ], [ self; accum; f ] => @@ -1114,7 +1149,7 @@ Module collections. self.i1.try_rfold(acc, &mut f) } *) - Definition try_rfold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -1249,13 +1284,14 @@ Module collections. self.i1.len() + self.i2.len() } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", @@ -1297,7 +1333,7 @@ Module collections. self.i1.is_empty() && self.i2.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1397,9 +1433,9 @@ Module collections. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), diff --git a/CoqOfRust/alloc/collections/vec_deque/iter_mut.v b/CoqOfRust/alloc/collections/vec_deque/iter_mut.v index 51801ee22..2c2eba4d4 100644 --- a/CoqOfRust/alloc/collections/vec_deque/iter_mut.v +++ b/CoqOfRust/alloc/collections/vec_deque/iter_mut.v @@ -24,16 +24,18 @@ Module collections. Self { i1, i2 } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ i1; i2 ] => ltac:(M.monadic (let i1 := M.alloc (| i1 |) in let i2 := M.alloc (| i2 |) in - Value.StructRecord - "alloc::collections::vec_deque::iter_mut::IterMut" - [ ("i1", M.read (| i1 |)); ("i2", M.read (| i2 |)) ])) + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::iter_mut::IterMut" + [ ("i1", A.to_value (M.read (| i1 |))); ("i2", A.to_value (M.read (| i2 |))) ] + |))) | _, _ => M.impossible end. @@ -51,7 +53,7 @@ Module collections. f.debug_tuple("IterMut").field(&self.i1.as_slice()).field(&self.i2.as_slice()).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -86,12 +88,13 @@ Module collections. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "IterMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "IterMut" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], @@ -106,12 +109,13 @@ Module collections. |) ] |) - |)) + |) + |) ] |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], @@ -126,7 +130,8 @@ Module collections. |) ] |) - |)) + |) + |) ] |) ] @@ -166,7 +171,7 @@ Module collections. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -203,7 +208,11 @@ Module collections. |) in let val := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -263,7 +272,7 @@ Module collections. } } *) - Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -306,7 +315,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) |) |) @@ -380,7 +393,7 @@ Module collections. (len, Some(len)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -401,11 +414,18 @@ Module collections. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| len |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -420,7 +440,7 @@ Module collections. self.i2.fold(accum, &mut f) } *) - Definition fold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ Acc; F ], [ self; accum; f ] => @@ -488,7 +508,7 @@ Module collections. self.i2.try_fold(acc, &mut f) } *) - Definition try_fold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -604,7 +624,7 @@ Module collections. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -637,7 +657,7 @@ Module collections. } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -667,14 +687,14 @@ Module collections. M.alloc (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| idx |)) (M.read (| i1_len |)) + BinOp.Pure.lt (| M.read (| idx |), M.read (| i1_len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -714,7 +734,11 @@ Module collections. "alloc::collections::vec_deque::iter_mut::IterMut", "i2" |); - BinOp.Panic.sub (| M.read (| idx |), M.read (| i1_len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| idx |), + M.read (| i1_len |) + |) ] |) |))) @@ -765,7 +789,7 @@ Module collections. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -802,7 +826,11 @@ Module collections. |) in let val := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -862,7 +890,7 @@ Module collections. } } *) - Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -905,7 +933,11 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) |) |) @@ -982,7 +1014,7 @@ Module collections. self.i1.rfold(accum, &mut f) } *) - Definition rfold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ Acc; F ], [ self; accum; f ] => @@ -1050,7 +1082,7 @@ Module collections. self.i1.try_rfold(acc, &mut f) } *) - Definition try_rfold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -1185,13 +1217,14 @@ Module collections. self.i1.len() + self.i2.len() } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", @@ -1233,7 +1266,7 @@ Module collections. self.i1.is_empty() && self.i2.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1333,9 +1366,9 @@ Module collections. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), diff --git a/CoqOfRust/alloc/collections/vec_deque/macros.v b/CoqOfRust/alloc/collections/vec_deque/macros.v index 63cda35a1..45f8da3d0 100644 --- a/CoqOfRust/alloc/collections/vec_deque/macros.v +++ b/CoqOfRust/alloc/collections/vec_deque/macros.v @@ -17,7 +17,7 @@ Module collections. sa == oa && sb == ob } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -29,15 +29,15 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -46,22 +46,25 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ U; A ], "len", [] |), [ M.read (| other |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -101,7 +104,9 @@ Module collections. |), [ M.read (| other |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| + Value.StructTuple "core::ops::range::RangeFull" [] + |) ] |); M.call_closure (| @@ -191,7 +196,7 @@ Module collections. sa == oa && sb == ob } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -203,15 +208,15 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -220,22 +225,25 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ U ], "len", [] |), [ M.read (| M.read (| other |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -275,7 +283,9 @@ Module collections. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| + Value.StructTuple "core::ops::range::RangeFull" [] + |) ] |); M.call_closure (| @@ -366,7 +376,7 @@ Module collections. sa == oa && sb == ob } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -378,15 +388,15 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -395,22 +405,25 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ U ], "len", [] |), [ M.read (| M.read (| other |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -450,7 +463,9 @@ Module collections. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| + Value.StructTuple "core::ops::range::RangeFull" [] + |) ] |); M.call_closure (| @@ -541,7 +556,7 @@ Module collections. sa == oa && sb == ob } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -553,15 +568,15 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -570,22 +585,25 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ U ], "len", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| other |)) ] - |)) + [ (* Unsize *) M.pointer_coercion (| M.read (| other |) |) ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -625,7 +643,9 @@ Module collections. |), [ M.read (| other |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| + Value.StructTuple "core::ops::range::RangeFull" [] + |) ] |); M.call_closure (| @@ -715,7 +735,7 @@ Module collections. sa == oa && sb == ob } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -727,15 +747,15 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -744,8 +764,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ U ], "len", @@ -753,16 +773,19 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion (M.read (| M.read (| other |) |)) + M.pointer_coercion (| M.read (| M.read (| other |) |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -802,7 +825,9 @@ Module collections. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| + Value.StructTuple "core::ops::range::RangeFull" [] + |) ] |); M.call_closure (| @@ -893,7 +918,7 @@ Module collections. sa == oa && sb == ob } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -905,15 +930,15 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -922,8 +947,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ U ], "len", @@ -931,16 +956,19 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion (M.read (| M.read (| other |) |)) + M.pointer_coercion (| M.read (| M.read (| other |) |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -980,7 +1008,9 @@ Module collections. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| + Value.StructTuple "core::ops::range::RangeFull" [] + |) ] |); M.call_closure (| diff --git a/CoqOfRust/alloc/collections/vec_deque/mod.v b/CoqOfRust/alloc/collections/vec_deque/mod.v index fc72f1dd0..3468dca14 100644 --- a/CoqOfRust/alloc/collections/vec_deque/mod.v +++ b/CoqOfRust/alloc/collections/vec_deque/mod.v @@ -26,7 +26,7 @@ Module collections. deq } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -115,7 +115,7 @@ Module collections. self.extend(other.iter().cloned()); } *) - Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -172,7 +172,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -217,7 +217,7 @@ Module collections. // RawVec handles deallocation } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -244,9 +244,11 @@ Module collections. let back := M.copy (| γ0_1 |) in let _back_dropper := M.alloc (| - Value.StructTuple - "alloc::collections::vec_deque::drop::Dropper" - [ M.read (| back |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::vec_deque::drop::Dropper" + [ A.to_value (M.read (| back |)) ] + |) |) in let _ := M.alloc (| @@ -258,7 +260,7 @@ Module collections. [ M.read (| front |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -285,7 +287,7 @@ Module collections. VecDeque::new() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -321,7 +323,7 @@ Module collections. self.buf.ptr() } *) - Definition ptr (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ptr (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -353,7 +355,7 @@ Module collections. unsafe { ptr::read(self.ptr().add(off)) } } *) - Definition buffer_read (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition buffer_read (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; off ] => @@ -364,8 +366,8 @@ Module collections. M.get_function (| "core::ptr::read", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ M.call_closure (| @@ -378,7 +380,8 @@ Module collections. |); M.read (| off |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -395,7 +398,7 @@ Module collections. } } *) - Definition buffer_write (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition buffer_write (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; off; value ] => @@ -427,7 +430,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -443,7 +446,7 @@ Module collections. } } *) - Definition buffer_range (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition buffer_range (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; range ] => @@ -474,6 +477,7 @@ Module collections. ] |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| range, @@ -503,28 +507,29 @@ Module collections. self.len == self.capacity() } *) - Definition is_full (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_full (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + 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 "alloc::collections::vec_deque::VecDeque") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -537,7 +542,7 @@ Module collections. wrap_index(idx.wrapping_add(addend), self.capacity()) } *) - Definition wrap_add (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrap_add (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; idx; addend ] => @@ -574,7 +579,7 @@ Module collections. self.wrap_add(self.head, idx) } *) - Definition to_physical_idx (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_physical_idx (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; idx ] => @@ -611,7 +616,7 @@ Module collections. wrap_index(idx.wrapping_sub(subtrahend).wrapping_add(self.capacity()), self.capacity()) } *) - Definition wrap_sub (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrap_sub (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; idx; subtrahend ] => @@ -679,7 +684,7 @@ Module collections. } } *) - Definition copy (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; src; dst; len ] => @@ -691,29 +696,30 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| dst |), M.read (| len |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -723,7 +729,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -743,107 +751,131 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "cpy dst=" |); - M.read (| Value.String " src=" |); - M.read (| Value.String " len=" |); - M.read (| Value.String " cap=" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "cpy dst=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " src=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " len=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " cap=" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ dst ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ src ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ len ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "capacity", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ dst ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ src ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ len ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "capacity", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| src |), M.read (| len |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -853,7 +885,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -873,80 +907,103 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "cpy dst=" |); - M.read (| Value.String " src=" |); - M.read (| Value.String " len=" |); - M.read (| Value.String " cap=" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "cpy dst=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " src=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " len=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " cap=" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ dst ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ src ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ len ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "capacity", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ dst ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ src ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ len ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "capacity", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -955,8 +1012,8 @@ Module collections. M.get_function (| "core::intrinsics::copy", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", @@ -975,7 +1032,8 @@ Module collections. |); M.read (| src |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ @@ -994,7 +1052,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1026,7 +1084,7 @@ Module collections. } } *) - Definition copy_nonoverlapping (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_nonoverlapping (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; src; dst; len ] => @@ -1038,29 +1096,30 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| dst |), M.read (| len |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1070,7 +1129,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1090,107 +1151,131 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "cno dst=" |); - M.read (| Value.String " src=" |); - M.read (| Value.String " len=" |); - M.read (| Value.String " cap=" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "cno dst=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " src=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " len=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " cap=" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ dst ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ src ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ len ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "capacity", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ dst ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ src ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ len ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "capacity", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| src |), M.read (| len |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1200,7 +1285,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1220,80 +1307,103 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "cno dst=" |); - M.read (| Value.String " src=" |); - M.read (| Value.String " len=" |); - M.read (| Value.String " cap=" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "cno dst=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " src=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " len=" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " cap=" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ dst ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ src ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ len ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "capacity", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ dst ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ src ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ len ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "capacity", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1302,8 +1412,8 @@ Module collections. M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", @@ -1322,7 +1432,8 @@ Module collections. |); M.read (| src |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ @@ -1341,7 +1452,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1482,7 +1593,7 @@ Module collections. } } *) - Definition wrap_copy (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrap_copy (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; src; dst; len ] => @@ -1496,25 +1607,26 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_function (| "core::cmp::min", @@ -1530,6 +1642,7 @@ Module collections. [ M.read (| src |); M.read (| dst |) ] |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -1553,8 +1666,8 @@ Module collections. ] |), M.read (| len |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1564,7 +1677,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1584,85 +1699,116 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "wrc dst=" |); - M.read (| Value.String " src=" |); - M.read (| Value.String " len=" |); - M.read (| Value.String " cap=" |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ dst ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ src ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ len ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "capacity", - [] - |), - [ M.read (| self |) ] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "wrc dst=" |) - |) - ] - |) - ] - |)) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " src=" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " len=" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " cap=" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ dst ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ src ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ len ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "capacity", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1677,38 +1823,43 @@ Module collections. |) |), ltac:(M.monadic - (BinOp.Pure.eq (M.read (| src |)) (M.read (| dst |)))) + (BinOp.Pure.eq (| M.read (| src |), M.read (| dst |) |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| len |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let dst_after_src := M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], "wrap_sub", [] |), [ M.read (| self |); M.read (| dst |); M.read (| src |) ] - |)) - (M.read (| len |)) + |), + M.read (| len |) + |) |) in let src_pre_wrap_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], @@ -1723,6 +1874,7 @@ Module collections. let dst_pre_wrap_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], @@ -1736,17 +1888,22 @@ Module collections. |) in let src_wraps := M.alloc (| - BinOp.Pure.lt (M.read (| src_pre_wrap_len |)) (M.read (| len |)) + BinOp.Pure.lt (| M.read (| src_pre_wrap_len |), M.read (| len |) |) |) in let dst_wraps := M.alloc (| - BinOp.Pure.lt (M.read (| dst_pre_wrap_len |)) (M.read (| len |)) + BinOp.Pure.lt (| M.read (| dst_pre_wrap_len |), M.read (| len |) |) |) in M.match_operator (| M.alloc (| - Value.Tuple - [ M.read (| dst_after_src |); M.read (| src_wraps |); M.read (| dst_wraps |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| dst_after_src |)); + A.to_value (M.read (| src_wraps |)); + A.to_value (M.read (| dst_wraps |)) + ] + |) |), [ fun γ => @@ -1782,7 +1939,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -1831,18 +1988,20 @@ Module collections. [ M.read (| self |); BinOp.Panic.add (| + Integer.Usize, M.read (| src |), M.read (| dst_pre_wrap_len |) |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| dst_pre_wrap_len |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -1870,11 +2029,13 @@ Module collections. [ M.read (| self |); BinOp.Panic.add (| + Integer.Usize, M.read (| src |), M.read (| dst_pre_wrap_len |) |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| dst_pre_wrap_len |) |) @@ -1899,7 +2060,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -1947,19 +2108,21 @@ Module collections. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| 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 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -1986,12 +2149,14 @@ Module collections. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| 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 |) |) @@ -2016,7 +2181,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -2033,11 +2198,12 @@ Module collections. M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2045,17 +2211,19 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| dst_pre_wrap_len |)) - (M.read (| src_pre_wrap_len |))) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| dst_pre_wrap_len |), + M.read (| src_pre_wrap_len |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2071,23 +2239,29 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: dst_pre_wrap_len > src_pre_wrap_len" + M.of_value (| + Value.String + "assertion failed: dst_pre_wrap_len > src_pre_wrap_len" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let delta := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| dst_pre_wrap_len |), M.read (| src_pre_wrap_len |) |) @@ -2122,8 +2296,9 @@ Module collections. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); BinOp.Panic.add (| + Integer.Usize, M.read (| dst |), M.read (| src_pre_wrap_len |) |); @@ -2144,15 +2319,16 @@ Module collections. [ M.read (| self |); M.read (| delta |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| dst_pre_wrap_len |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -2166,11 +2342,12 @@ Module collections. M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2178,17 +2355,19 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| src_pre_wrap_len |)) - (M.read (| dst_pre_wrap_len |))) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| src_pre_wrap_len |), + M.read (| dst_pre_wrap_len |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2204,23 +2383,29 @@ Module collections. |), [ M.read (| - Value.String - "assertion failed: src_pre_wrap_len > dst_pre_wrap_len" + M.of_value (| + Value.String + "assertion failed: src_pre_wrap_len > dst_pre_wrap_len" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let delta := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| src_pre_wrap_len |), M.read (| dst_pre_wrap_len |) |) @@ -2237,9 +2422,10 @@ Module collections. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| delta |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| src_pre_wrap_len |) |) @@ -2259,6 +2445,7 @@ Module collections. [ M.read (| self |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -2271,7 +2458,7 @@ Module collections. |), M.read (| delta |) |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| delta |) ] |) @@ -2294,7 +2481,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2323,7 +2510,7 @@ Module collections. } } *) - Definition copy_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; dst; src ] => @@ -2334,33 +2521,33 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| src |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -2370,7 +2557,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2383,23 +2572,27 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: src.len() <= self.capacity()" + M.of_value (| + Value.String + "assertion failed: src.len() <= self.capacity()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let head_room := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], @@ -2412,23 +2605,24 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| src |) ] - |)) - (M.read (| head_room |)) + |), + M.read (| head_room |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -2475,7 +2669,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -2580,7 +2774,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -2606,7 +2800,7 @@ Module collections. }); } *) - Definition write_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ impl_Iterator_Item___T_ ], [ self; dst; iter; written ] => @@ -2639,8 +2833,8 @@ Module collections. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2668,6 +2862,7 @@ Module collections. [ M.read (| self |); BinOp.Panic.add (| + Integer.Usize, M.read (| dst |), M.read (| i |) |); @@ -2680,20 +2875,22 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2740,7 +2937,7 @@ Module collections. guard.written } *) - Definition write_iter_wrapping (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_iter_wrapping (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ impl_Iterator_Item___T_ ], [ self; dst; iter; len ] => @@ -2753,6 +2950,7 @@ Module collections. let head_room := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], @@ -2766,20 +2964,25 @@ Module collections. |) in let guard := M.alloc (| - Value.StructRecord - "alloc::collections::vec_deque::write_iter_wrapping::Guard" - [ ("deque", M.read (| self |)); ("written", Value.Integer Integer.Usize 0) ] + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::write_iter_wrapping::Guard" + [ + ("deque", A.to_value (M.read (| self |))); + ("written", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| head_room |)) (M.read (| len |)) + BinOp.Pure.ge (| M.read (| head_room |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2811,7 +3014,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -2853,9 +3056,11 @@ Module collections. [] |), [ - Value.StructTuple - "core::iter::adapters::by_ref_sized::ByRefSized" - [ iter ]; + M.of_value (| + Value.StructTuple + "core::iter::adapters::by_ref_sized::ByRefSized" + [ A.to_value iter ] + |); M.read (| head_room |) ] |); @@ -2884,7 +3089,7 @@ Module collections. "deque" |) |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| iter |); M.SubPointer.get_struct_record_field (| guard, @@ -2894,7 +3099,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.SubPointer.get_struct_record_field (| @@ -2959,7 +3164,7 @@ Module collections. debug_assert!(self.head < self.capacity() || self.capacity() == 0); } *) - Definition handle_capacity_increase (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition handle_capacity_increase (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; old_capacity ] => @@ -2980,26 +3185,28 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.read (| new_capacity |)) - (M.read (| old_capacity |))) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| new_capacity |), + M.read (| old_capacity |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3012,38 +3219,42 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: new_capacity >= old_capacity" + M.of_value (| + Value.String + "assertion failed: new_capacity >= old_capacity" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| old_capacity |), M.read (| M.SubPointer.get_struct_record_field (| @@ -3052,16 +3263,18 @@ Module collections. "len" |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let head_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| old_capacity |), M.read (| M.SubPointer.get_struct_record_field (| @@ -3075,6 +3288,7 @@ Module collections. let tail_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3086,7 +3300,7 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3094,16 +3308,19 @@ Module collections. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| head_len |)) - (M.read (| tail_len |)), + BinOp.Pure.gt (| + M.read (| head_len |), + M.read (| tail_len |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (BinOp.Panic.sub (| + (BinOp.Pure.ge (| + BinOp.Panic.sub (| + Integer.Usize, M.read (| new_capacity |), M.read (| old_capacity |) - |)) - (M.read (| tail_len |)))) + |), + M.read (| tail_len |) + |))) |) |)) in let _ := @@ -3123,18 +3340,19 @@ Module collections. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| old_capacity |); M.read (| tail_len |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let new_head := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| new_capacity |), M.read (| head_len |) |) @@ -3164,7 +3382,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -3174,40 +3392,40 @@ Module collections. |), M.read (| new_head |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| - BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -3217,10 +3435,11 @@ Module collections. [] |), [ M.read (| self |) ] - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.call_closure (| + (BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -3230,9 +3449,11 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) - |)) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3245,21 +3466,24 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.head < self.capacity() || self.capacity() == 0" + M.of_value (| + Value.String + "assertion failed: self.head < self.capacity() || self.capacity() == 0" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3272,27 +3496,30 @@ Module collections. VecDeque { head: 0, len: 0, buf: RawVec::new_in(alloc) } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => ltac:(M.monadic (let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::collections::vec_deque::VecDeque" - [ - ("head", Value.Integer Integer.Usize 0); - ("len", Value.Integer Integer.Usize 0); - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], - "new_in", - [] - |), - [ M.read (| alloc |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::VecDeque" + [ + ("head", A.to_value (M.of_value (| Value.Integer 0 |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], + "new_in", + [] + |), + [ M.read (| alloc |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3305,28 +3532,31 @@ Module collections. VecDeque { head: 0, len: 0, buf: RawVec::with_capacity_in(capacity, alloc) } } *) - Definition with_capacity_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ capacity; alloc ] => ltac:(M.monadic (let capacity := M.alloc (| capacity |) in let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::collections::vec_deque::VecDeque" - [ - ("head", Value.Integer Integer.Usize 0); - ("len", Value.Integer Integer.Usize 0); - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], - "with_capacity_in", - [] - |), - [ M.read (| capacity |); M.read (| alloc |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::VecDeque" + [ + ("head", A.to_value (M.of_value (| Value.Integer 0 |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], + "with_capacity_in", + [] + |), + [ M.read (| capacity |); M.read (| alloc |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3355,7 +3585,7 @@ Module collections. } } *) - Definition from_contiguous_raw_parts_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_contiguous_raw_parts_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; initialized; capacity; alloc ] => @@ -3367,38 +3597,40 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| initialized, "core::ops::range::Range", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| initialized, "core::ops::range::Range", "end" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3411,48 +3643,53 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: initialized.start <= initialized.end" + M.of_value (| + Value.String + "assertion failed: initialized.start <= initialized.end" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| initialized, "core::ops::range::Range", "end" |) - |)) - (M.read (| capacity |))) + |), + M.read (| capacity |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3465,62 +3702,70 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: initialized.end <= capacity" + M.of_value (| + Value.String + "assertion failed: initialized.end <= capacity" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "alloc::collections::vec_deque::VecDeque" - [ - ("head", - M.read (| - M.SubPointer.get_struct_record_field (| - initialized, - "core::ops::range::Range", - "start" - |) - |)); - ("len", - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "unchecked_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - initialized, - "core::ops::range::Range", - "end" - |) - |); - M.read (| + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::VecDeque" + [ + ("head", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| initialized, "core::ops::range::Range", "start" |) - |) - ] - |)); - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], - "from_raw_parts_in", - [] - |), - [ M.read (| ptr |); M.read (| capacity |); M.read (| alloc |) ] - |)) - ] + |))); + ("len", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "unchecked_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + initialized, + "core::ops::range::Range", + "end" + |) + |); + M.read (| + M.SubPointer.get_struct_record_field (| + initialized, + "core::ops::range::Range", + "start" + |) + |) + ] + |))); + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], + "from_raw_parts_in", + [] + |), + [ M.read (| ptr |); M.read (| capacity |); M.read (| alloc |) ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3543,7 +3788,7 @@ Module collections. } } *) - Definition get (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index ] => @@ -3552,22 +3797,23 @@ Module collections. let index := M.alloc (| index |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| index |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| index |), + 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 let idx := @@ -3582,34 +3828,39 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "add", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "ptr", + Ty.apply (Ty.path "*mut") [ T ], + "add", [] |), - [ M.read (| self |) ] - |); - M.read (| idx |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "ptr", + [] + |), + [ M.read (| self |) ] + |); + M.read (| idx |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3630,7 +3881,7 @@ Module collections. } } *) - Definition get_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index ] => @@ -3639,22 +3890,23 @@ Module collections. let index := M.alloc (| index |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| index |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| index |), + 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 let idx := @@ -3669,34 +3921,39 @@ Module collections. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "add", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "ptr", + Ty.apply (Ty.path "*mut") [ T ], + "add", [] |), - [ M.read (| self |) ] - |); - M.read (| idx |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "ptr", + [] + |), + [ M.read (| self |) ] + |); + M.read (| idx |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3716,7 +3973,7 @@ Module collections. unsafe { ptr::swap(self.ptr().add(ri), self.ptr().add(rj)) } } *) - Definition swap (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i; j ] => @@ -3727,17 +3984,17 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| i |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| i |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -3746,7 +4003,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3754,26 +4013,30 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: i < self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: i < self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| j |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| j |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -3782,7 +4045,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3790,11 +4055,15 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: j < self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: j < self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ri := @@ -3867,7 +4136,7 @@ Module collections. if T::IS_ZST { usize::MAX } else { self.buf.capacity() } } *) - Definition capacity (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition capacity (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3875,7 +4144,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3924,7 +4193,7 @@ Module collections. } } *) - Definition reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -3954,7 +4223,7 @@ Module collections. M.read (| additional |) ] |); - M.read (| Value.String "capacity overflow" |) + M.read (| M.of_value (| Value.String "capacity overflow" |) |) ] |) |) in @@ -3970,14 +4239,14 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| new_cap |)) (M.read (| old_cap |)) + 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 _ := @@ -4016,8 +4285,8 @@ Module collections. [ M.read (| self |); M.read (| old_cap |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -4043,7 +4312,7 @@ Module collections. } } *) - Definition reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -4073,7 +4342,7 @@ Module collections. M.read (| additional |) ] |); - M.read (| Value.String "capacity overflow" |) + M.read (| M.of_value (| Value.String "capacity overflow" |) |) ] |) |) in @@ -4089,14 +4358,14 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| new_cap |)) (M.read (| old_cap |)) + 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 _ := @@ -4135,8 +4404,8 @@ Module collections. [ M.read (| self |); M.read (| old_cap |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -4162,7 +4431,7 @@ Module collections. Ok(()) } *) - Definition try_reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -4211,10 +4480,12 @@ Module collections. |); M.read (| additional |) ] - |); - Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [] + |); + M.of_value (| + Value.StructTuple + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + [] + |) ] |) ] @@ -4286,14 +4557,14 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| new_cap |)) (M.read (| old_cap |)) + 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 @@ -4403,11 +4674,17 @@ Module collections. [ M.read (| self |); M.read (| old_cap |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -4432,7 +4709,7 @@ Module collections. Ok(()) } *) - Definition try_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -4482,9 +4759,11 @@ Module collections. M.read (| additional |) ] |); - Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [] + M.of_value (| + Value.StructTuple + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + [] + |) ] |) ] @@ -4556,14 +4835,14 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| new_cap |)) (M.read (| old_cap |)) + 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 @@ -4673,11 +4952,17 @@ Module collections. [ M.read (| self |); M.read (| old_cap |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -4692,7 +4977,7 @@ Module collections. self.shrink_to(0); } *) - Definition shrink_to_fit (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink_to_fit (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4707,10 +4992,10 @@ Module collections. "shrink_to", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0 ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4796,7 +5081,7 @@ Module collections. debug_assert!(self.len <= self.capacity()); } *) - Definition shrink_to (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink_to (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; min_capacity ] => @@ -4824,7 +5109,7 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4836,8 +5121,8 @@ Module collections. M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |) |), ltac:(M.monadic - (BinOp.Pure.le - (M.call_closure (| + (BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -4846,16 +5131,19 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (M.read (| target_cap |)))) + |), + M.read (| target_cap |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let tail_outside := @@ -4878,8 +5166,9 @@ Module collections. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| target_cap |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); M.call_closure (| M.get_associated_function (| @@ -4896,6 +5185,7 @@ Module collections. |); M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4917,22 +5207,23 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4943,13 +5234,13 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4957,15 +5248,16 @@ Module collections. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |)) - (M.read (| target_cap |)), + |), + M.read (| target_cap |) + |), ltac:(M.monadic (M.read (| tail_outside |))) |) |)) in @@ -4994,7 +5286,7 @@ Module collections. "head" |) |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5005,7 +5297,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -5013,13 +5305,13 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5027,15 +5319,16 @@ Module collections. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |)) - (M.read (| target_cap |)), + |), + M.read (| target_cap |) + |), ltac:(M.monadic (M.read (| tail_outside |))) |) |)) in @@ -5047,7 +5340,9 @@ Module collections. let len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5080,24 +5375,24 @@ Module collections. [ M.read (| self |); M.read (| target_cap |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| len |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -5107,7 +5402,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5117,6 +5413,7 @@ Module collections. let head_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -5140,6 +5437,7 @@ Module collections. let new_head := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| target_cap |), M.read (| head_len |) |) @@ -5170,7 +5468,9 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -5180,9 +5480,10 @@ Module collections. |), M.read (| new_head |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -5211,33 +5512,33 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| - BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -5247,10 +5548,11 @@ Module collections. [] |), [ M.read (| self |) ] - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.call_closure (| + (BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -5260,9 +5562,11 @@ Module collections. [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) - |)) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5275,48 +5579,51 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.head < self.capacity() || self.capacity() == 0" + M.of_value (| + Value.String + "assertion failed: self.head < self.capacity() || self.capacity() == 0" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + 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 @@ -5326,7 +5633,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5339,21 +5648,24 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.len <= self.capacity()" + M.of_value (| + Value.String + "assertion failed: self.len <= self.capacity()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -5408,7 +5720,7 @@ Module collections. } } *) - Definition truncate (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition truncate (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len ] => @@ -5420,29 +5732,32 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| len |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| len |), + 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 (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -5464,23 +5779,24 @@ Module collections. let front := M.copy (| γ0_0 |) in let back := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| len |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| len |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| front |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5490,6 +5806,7 @@ Module collections. let begin := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.call_closure (| M.get_associated_function (| @@ -5517,9 +5834,11 @@ Module collections. |), [ M.read (| back |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| begin |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| begin |))) ] + |) ] |) |)) @@ -5543,7 +5862,7 @@ Module collections. [ M.read (| drop_back |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let drop_back := @@ -5564,9 +5883,11 @@ Module collections. |), [ M.read (| front |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| len |))) ] + |) ] |) |)) @@ -5582,9 +5903,11 @@ Module collections. |) in let _back_dropper := M.alloc (| - Value.StructTuple - "alloc::collections::vec_deque::truncate::Dropper" - [ M.read (| drop_back |) ] + M.of_value (| + Value.StructTuple + "alloc::collections::vec_deque::truncate::Dropper" + [ A.to_value (M.read (| drop_back |)) ] + |) |) in let _ := M.alloc (| @@ -5596,7 +5919,7 @@ Module collections. [ M.read (| drop_front |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -5615,7 +5938,7 @@ Module collections. self.buf.allocator() } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5648,7 +5971,7 @@ Module collections. Iter::new(a.iter(), b.iter()) } *) - Definition iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5716,7 +6039,7 @@ Module collections. IterMut::new(a.iter_mut(), b.iter_mut()) } *) - Definition iter_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5788,7 +6111,7 @@ Module collections. unsafe { (&*self.buffer_range(a_range), &*self.buffer_range(b_range)) } } *) - Definition as_slices (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slices (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5805,7 +6128,7 @@ Module collections. |), [ M.read (| self |); - Value.StructTuple "core::ops::range::RangeFull" []; + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |); M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5824,29 +6147,33 @@ Module collections. let a_range := M.copy (| γ0_0 |) in let b_range := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "buffer_range", - [] - |), - [ M.read (| self |); M.read (| a_range |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "buffer_range", - [] - |), - [ M.read (| self |); M.read (| b_range |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_range", + [] + |), + [ M.read (| self |); M.read (| a_range |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_range", + [] + |), + [ M.read (| self |); M.read (| b_range |) ] + |)) + ] + |) |))) ] |) @@ -5866,7 +6193,7 @@ Module collections. unsafe { (&mut *self.buffer_range(a_range), &mut *self.buffer_range(b_range)) } } *) - Definition as_mut_slices (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_slices (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5883,7 +6210,7 @@ Module collections. |), [ M.read (| self |); - Value.StructTuple "core::ops::range::RangeFull" []; + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |); M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5902,29 +6229,33 @@ Module collections. let a_range := M.copy (| γ0_0 |) in let b_range := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "buffer_range", - [] - |), - [ M.read (| self |); M.read (| a_range |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "buffer_range", - [] - |), - [ M.read (| self |); M.read (| b_range |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_range", + [] + |), + [ M.read (| self |); M.read (| a_range |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_range", + [] + |), + [ M.read (| self |); M.read (| b_range |) ] + |)) + ] + |) |))) ] |) @@ -5941,7 +6272,7 @@ Module collections. self.len } *) - Definition len (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5966,21 +6297,22 @@ Module collections. self.len == 0 } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -6020,7 +6352,7 @@ Module collections. } } *) - Definition slice_ranges (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_ranges (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ R ], [ self; range; len ] => @@ -6035,7 +6367,11 @@ Module collections. M.get_function (| "core::slice::index::range", [ R ] |), [ M.read (| range |); - Value.StructRecord "core::ops::range::RangeTo" [ ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| len |))) ] + |) ] |) |), @@ -6057,16 +6393,21 @@ Module collections. let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in let len := - M.alloc (| BinOp.Panic.sub (| M.read (| end_ |), M.read (| start |) |) |) in + M.alloc (| + BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| len |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6074,21 +6415,33 @@ Module collections. Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", Value.Integer Integer.Usize 0) - ]; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", Value.Integer Integer.Usize 0) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |)); + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -6108,6 +6461,7 @@ Module collections. let head_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -6122,14 +6476,17 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| head_len |)) (M.read (| len |)) + BinOp.Pure.ge (| + M.read (| head_len |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6137,62 +6494,90 @@ Module collections. Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| wrapped_start |)); - ("end_", - BinOp.Panic.add (| - M.read (| wrapped_start |), - M.read (| len |) - |)) - ]; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", Value.Integer Integer.Usize 0) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.read (| wrapped_start |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| wrapped_start |), + M.read (| len |) + |))) + ] + |)); + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.of_value (| Value.Integer 0 |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let tail_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| head_len |) |) |) in M.alloc (| - Value.Tuple - [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| wrapped_start |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "capacity", - [] - |), - [ M.read (| self |) ] - |)) - ]; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| tail_len |)) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.read (| wrapped_start |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "capacity", + [] + |), + [ M.read (| self |) ] + |))) + ] + |)); + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| tail_len |))) + ] + |)) + ] + |) |))) ] |))) @@ -6223,7 +6608,7 @@ Module collections. Iter::new(a.iter(), b.iter()) } *) - Definition range (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition range (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ R ], [ self; range ] => @@ -6333,7 +6718,7 @@ Module collections. IterMut::new(a.iter_mut(), b.iter_mut()) } *) - Definition range_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition range_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ R ], [ self; range ] => @@ -6471,7 +6856,7 @@ Module collections. unsafe { Drain::new(self, drain_start, drain_len) } } *) - Definition drain (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drain (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ R ], [ self; range ] => @@ -6485,18 +6870,21 @@ Module collections. M.get_function (| "core::slice::index::range", [ R ] |), [ M.read (| range |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::VecDeque", - "len" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::VecDeque", + "len" + |) + |))) + ] + |) ] |) |), @@ -6519,7 +6907,9 @@ Module collections. let end_ := M.copy (| γ0_1 |) in let drain_start := M.copy (| start |) in let drain_len := - M.alloc (| BinOp.Panic.sub (| M.read (| end_ |), M.read (| start |) |) |) in + M.alloc (| + BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6549,7 +6939,7 @@ Module collections. self.head = 0; } *) - Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6564,7 +6954,7 @@ Module collections. "truncate", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0 ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |) ] |) |) in let _ := @@ -6574,9 +6964,9 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6594,7 +6984,7 @@ Module collections. a.contains(x) || b.contains(x) } *) - Definition contains (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; x ] => @@ -6656,7 +7046,7 @@ Module collections. self.get(0) } *) - Definition front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6668,7 +7058,7 @@ Module collections. "get", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0 ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |) ] |))) | _, _ => M.impossible end. @@ -6682,7 +7072,7 @@ Module collections. self.get_mut(0) } *) - Definition front_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition front_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6694,7 +7084,7 @@ Module collections. "get_mut", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0 ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |) ] |))) | _, _ => M.impossible end. @@ -6708,7 +7098,7 @@ Module collections. self.get(self.len.wrapping_sub(1)) } *) - Definition back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6732,7 +7122,7 @@ Module collections. "len" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) ] @@ -6749,7 +7139,7 @@ Module collections. self.get_mut(self.len.wrapping_sub(1)) } *) - Definition back_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition back_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6773,7 +7163,7 @@ Module collections. "len" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) ] @@ -6797,7 +7187,7 @@ Module collections. } } *) - Definition pop_front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6805,7 +7195,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6824,7 +7214,9 @@ Module collections. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let old_head := @@ -6848,7 +7240,7 @@ Module collections. "to_physical_idx", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -6856,27 +7248,34 @@ Module collections. M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", - "len" - |) in - M.write (| - β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) - |) in - M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "buffer_read", - [] - |), - [ M.read (| self |); M.read (| old_head |) ] - |) - ] + "len" + |) in + M.write (| + β, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_read", + [] + |), + [ M.read (| self |); M.read (| old_head |) ] + |)) + ] + |) |))) ] |) @@ -6898,7 +7297,7 @@ Module collections. } } *) - Definition pop_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6906,7 +7305,7 @@ Module collections. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6925,7 +7324,9 @@ Module collections. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -6937,44 +7338,51 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "buffer_read", - [] - |), - [ - M.read (| self |); - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], - "to_physical_idx", + "buffer_read", [] |), [ M.read (| self |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::VecDeque", - "len" - |) + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "to_physical_idx", + [] + |), + [ + M.read (| self |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::VecDeque", + "len" + |) + |) + ] |) ] - |) - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -7000,7 +7408,7 @@ Module collections. } } *) - Definition push_front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; value ] => @@ -7010,7 +7418,7 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7043,8 +7451,8 @@ Module collections. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -7069,7 +7477,7 @@ Module collections. "head" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -7082,7 +7490,11 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.alloc (| @@ -7105,7 +7517,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7124,7 +7536,7 @@ Module collections. self.len += 1; } *) - Definition push_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; value ] => @@ -7134,7 +7546,7 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7167,8 +7579,8 @@ Module collections. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -7211,9 +7623,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7228,21 +7644,22 @@ Module collections. self.head <= self.capacity() - self.len } *) - Definition is_contiguous (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contiguous (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], @@ -7258,7 +7675,8 @@ Module collections. "len" |) |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -7277,7 +7695,7 @@ Module collections. self.pop_front() } *) - Definition swap_remove_front (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_remove_front (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index ] => @@ -7297,7 +7715,7 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7305,11 +7723,12 @@ Module collections. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| index |)) (M.read (| length |)), + BinOp.Pure.lt (| M.read (| index |), M.read (| length |) |), ltac:(M.monadic - (BinOp.Pure.ne - (M.read (| index |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.ne (| + M.read (| index |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -7327,22 +7746,25 @@ Module collections. [ M.read (| self |); M.read (| index |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| index |)) (M.read (| length |)) + BinOp.Pure.ge (| + M.read (| index |), + M.read (| length |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7353,12 +7775,15 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -7393,7 +7818,7 @@ Module collections. self.pop_back() } *) - Definition swap_remove_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_remove_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index ] => @@ -7413,7 +7838,7 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7421,16 +7846,19 @@ Module collections. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| length |)) - (Value.Integer Integer.Usize 0), + BinOp.Pure.gt (| + M.read (| length |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| index |)) - (BinOp.Panic.sub (| + (BinOp.Pure.lt (| + M.read (| index |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| length |), - Value.Integer Integer.Usize 1 - |)))) + M.of_value (| Value.Integer 1 |) + |) + |))) |) |)) in let _ := @@ -7449,24 +7877,28 @@ Module collections. M.read (| self |); M.read (| index |); BinOp.Panic.sub (| + Integer.Usize, M.read (| length |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| index |)) (M.read (| length |)) + BinOp.Pure.ge (| + M.read (| index |), + M.read (| length |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7477,12 +7909,15 @@ Module collections. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -7535,7 +7970,7 @@ Module collections. } } *) - Definition insert (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index; value ] => @@ -7546,17 +7981,17 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| index |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| index |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -7565,7 +8000,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -7582,23 +8019,33 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "index out of bounds" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "index out of bounds" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7631,13 +8078,14 @@ Module collections. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let k := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7649,12 +8097,13 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.lt (M.read (| k |)) (M.read (| index |)) |)) in + 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 _ := M.alloc (| @@ -7687,8 +8136,9 @@ Module collections. [ M.read (| self |); BinOp.Panic.add (| + Integer.Usize, M.read (| index |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -7729,9 +8179,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let old_head := @@ -7764,7 +8218,7 @@ Module collections. "head" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -7823,9 +8277,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -7863,7 +8321,7 @@ Module collections. elem } *) - Definition remove (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index ] => @@ -7875,33 +8333,38 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |)) - (M.read (| index |)) + |), + M.read (| index |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let wrapped_idx := @@ -7917,23 +8380,30 @@ Module collections. |) in let elem := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], - "buffer_read", - [] - |), - [ M.read (| self |); M.read (| wrapped_idx |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "buffer_read", + [] + |), + [ M.read (| self |); M.read (| wrapped_idx |) ] + |)) + ] + |) |) in let k := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7943,19 +8413,19 @@ Module collections. |), M.read (| index |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| k |)) (M.read (| index |)) + BinOp.Pure.lt (| M.read (| k |), M.read (| index |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -7982,7 +8452,7 @@ Module collections. [ M.read (| self |); M.read (| wrapped_idx |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); M.read (| wrapped_idx |); @@ -7999,9 +8469,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let old_head := @@ -8027,7 +8501,7 @@ Module collections. "to_physical_idx", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -8063,9 +8537,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in elem @@ -8126,7 +8604,7 @@ Module collections. other } *) - Definition split_off (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_off (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; at_ ] => @@ -8144,14 +8622,16 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (BinOp.Pure.le (M.read (| at_ |)) (M.read (| len |))) + UnOp.Pure.not (| + BinOp.Pure.le (| M.read (| at_ |), M.read (| len |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -8168,22 +8648,32 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "`at` out of bounds" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "`at` out of bounds" |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let other_len := - M.alloc (| BinOp.Panic.sub (| M.read (| len |), M.read (| at_ |) |) |) in + M.alloc (| + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| at_ |) |) + |) in let other := M.alloc (| M.call_closure (| @@ -8252,14 +8742,14 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| at_ |)) (M.read (| first_len |)) + BinOp.Pure.lt (| M.read (| at_ |), M.read (| first_len |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -8268,7 +8758,11 @@ Module collections. |) in let amount_in_first := M.alloc (| - BinOp.Panic.sub (| M.read (| first_len |), M.read (| at_ |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| first_len |), + M.read (| at_ |) + |) |) in let _ := M.alloc (| @@ -8351,16 +8845,21 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let offset := M.alloc (| - BinOp.Panic.sub (| M.read (| at_ |), M.read (| first_len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| at_ |), + M.read (| first_len |) + |) |) in let amount_in_second := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| second_len |), M.read (| offset |) |) @@ -8405,7 +8904,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -8461,7 +8960,7 @@ Module collections. other.head = 0; } *) - Definition append (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition append (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -8473,7 +8972,7 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8524,7 +9023,9 @@ Module collections. |) ] |); - M.read (| Value.String "capacity overflow" |) + M.read (| + M.of_value (| Value.String "capacity overflow" |) + |) ] |) |) in @@ -8535,7 +9036,7 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "len" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| @@ -8544,13 +9045,13 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -8650,6 +9151,7 @@ Module collections. [ M.read (| self |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8672,7 +9174,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -8685,6 +9187,7 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| M.SubPointer.get_struct_record_field (| @@ -8702,7 +9205,7 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "len" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| @@ -8711,9 +9214,9 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -8731,7 +9234,7 @@ Module collections. self.retain_mut(|elem| f(elem)); } *) - Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; f ] => @@ -8753,8 +9256,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -8772,16 +9275,22 @@ Module collections. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| elem |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| elem |)) ] + |) + ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8825,7 +9334,7 @@ Module collections. } } *) - Definition retain_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition retain_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; f ] => @@ -8841,34 +9350,34 @@ Module collections. "len" |) |) in - let idx := M.alloc (| Value.Integer Integer.Usize 0 |) in - let cur := M.alloc (| Value.Integer Integer.Usize 0 |) in + let idx := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let cur := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| cur |)) (M.read (| len |)) + BinOp.Pure.lt (| M.read (| cur |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -8878,24 +9387,28 @@ Module collections. |), [ f; - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::IndexMut", - Ty.apply - (Ty.path - "alloc::collections::vec_deque::VecDeque") - [ T; A ], - [ Ty.path "usize" ], - "index_mut", - [] - |), - [ M.read (| self |); M.read (| cur |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply + (Ty.path + "alloc::collections::vec_deque::VecDeque") + [ T; A ], + [ Ty.path "usize" ], + "index_mut", + [] + |), + [ M.read (| self |); M.read (| cur |) ] + |)) + ] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8910,30 +9423,40 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := cur in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := let β := idx in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -8941,7 +9464,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -8952,28 +9475,28 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| cur |)) (M.read (| len |)) + BinOp.Pure.lt (| M.read (| cur |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -8983,24 +9506,28 @@ Module collections. |), [ f; - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::IndexMut", - Ty.apply - (Ty.path - "alloc::collections::vec_deque::VecDeque") - [ T; A ], - [ Ty.path "usize" ], - "index_mut", - [] - |), - [ M.read (| self |); M.read (| cur |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply + (Ty.path + "alloc::collections::vec_deque::VecDeque") + [ T; A ], + [ Ty.path "usize" ], + "index_mut", + [] + |), + [ M.read (| self |); M.read (| cur |) ] + |)) + ] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9015,15 +9542,17 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.continue (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -9043,15 +9572,23 @@ Module collections. let β := cur in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := let β := idx in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -9059,7 +9596,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -9067,12 +9604,13 @@ Module collections. |))) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.ne (M.read (| cur |)) (M.read (| idx |)) |)) in + 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 _ := M.alloc (| @@ -9085,8 +9623,8 @@ Module collections. [ M.read (| self |); M.read (| idx |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -9110,7 +9648,7 @@ Module collections. debug_assert!(!self.is_full()); } *) - Definition grow (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition grow (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9119,24 +9657,24 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -9145,7 +9683,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9158,17 +9697,20 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.is_full()" + M.of_value (| + Value.String "assertion failed: self.is_full()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let old_cap := @@ -9212,28 +9754,28 @@ Module collections. [ M.read (| self |); M.read (| old_cap |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -9243,7 +9785,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9256,20 +9800,23 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: !self.is_full()" + M.of_value (| + Value.String "assertion failed: !self.is_full()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9289,7 +9836,7 @@ Module collections. } } *) - Definition resize_with (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition resize_with (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ impl_FnMut___arrow_T ], [ self; new_len; generator ] => @@ -9307,13 +9854,15 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| new_len |)) (M.read (| len |)) |)) in + (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 M.alloc (| M.call_closure (| @@ -9352,7 +9901,11 @@ Module collections. |), [ M.read (| generator |) ] |); - BinOp.Panic.sub (| M.read (| new_len |), M.read (| len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| new_len |), + M.read (| len |) + |) ] |) ] @@ -9371,7 +9924,7 @@ Module collections. [ M.read (| self |); M.read (| new_len |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -9509,7 +10062,7 @@ Module collections. unsafe { slice::from_raw_parts_mut(ptr.add(self.head), self.len) } } *) - Definition make_contiguous (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition make_contiguous (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9520,7 +10073,7 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9536,15 +10089,15 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9614,7 +10167,7 @@ Module collections. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -9665,27 +10218,42 @@ Module collections. |) in let free := M.alloc (| - BinOp.Panic.sub (| M.read (| cap |), M.read (| len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| cap |), + M.read (| len |) + |) |) in let head_len := M.alloc (| - BinOp.Panic.sub (| M.read (| cap |), M.read (| head |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| cap |), + M.read (| head |) + |) |) in let tail := M.alloc (| - BinOp.Panic.sub (| M.read (| len |), M.read (| head_len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| head_len |) + |) |) in let tail_len := M.copy (| tail |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| free |)) (M.read (| head_len |)) + BinOp.Pure.ge (| + M.read (| free |), + M.read (| head_len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9705,7 +10273,7 @@ Module collections. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| head_len |); M.read (| tail_len |) ] @@ -9724,12 +10292,12 @@ Module collections. [ M.read (| self |); M.read (| head |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| head_len |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -9737,22 +10305,23 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| free |)) - (M.read (| tail_len |)) + BinOp.Pure.ge (| + M.read (| free |), + M.read (| tail_len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9792,8 +10361,9 @@ Module collections. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); BinOp.Panic.add (| + Integer.Usize, M.read (| tail |), M.read (| head_len |) |); @@ -9801,7 +10371,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -9811,20 +10381,21 @@ Module collections. |), M.read (| tail |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| head_len |)) - (M.read (| tail_len |)) + BinOp.Pure.gt (| + M.read (| head_len |), + M.read (| tail_len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9833,18 +10404,21 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| free |)) - (Value.Integer - Integer.Usize - 0) + BinOp.Pure.ne (| + M.read (| free |), + M.of_value (| + Value.Integer 0 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9864,16 +10438,22 @@ Module collections. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| + Value.Integer 0 + |); M.read (| free |); M.read (| tail_len |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let slice := @@ -9885,27 +10465,31 @@ Module collections. "alloc::collections::vec_deque::VecDeque") [ T; A ], "buffer_range", - [] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| free |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "alloc::collections::vec_deque::VecDeque") - [ T; A ], - "capacity", - [] - |), - [ M.read (| self |) ] - |)) - ] + [] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.read (| free |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::collections::vec_deque::VecDeque") + [ T; A ], + "capacity", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |) in @@ -9932,23 +10516,26 @@ Module collections. |), M.read (| free |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| free |)) - (Value.Integer - Integer.Usize - 0) + BinOp.Pure.ne (| + M.read (| free |), + M.of_value (| + Value.Integer 0 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9980,10 +10567,14 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let slice := @@ -9999,20 +10590,26 @@ Module collections. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::collections::vec_deque::VecDeque", - "len" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::collections::vec_deque::VecDeque", + "len" + |) + |))) + ] + |) ] |) |) in @@ -10037,9 +10634,9 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -10099,7 +10696,7 @@ Module collections. } } *) - Definition rotate_left (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; n ] => @@ -10109,17 +10706,17 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| n |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| n |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -10128,7 +10725,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -10136,16 +10735,21 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: n <= self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: n <= self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let k := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10157,12 +10761,12 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.le (M.read (| n |)) (M.read (| k |)) |)) in + M.use (M.alloc (| BinOp.Pure.le (| M.read (| n |), M.read (| k |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| @@ -10207,7 +10811,7 @@ Module collections. } } *) - Definition rotate_right (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; n ] => @@ -10217,17 +10821,17 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| n |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| n |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -10236,7 +10840,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -10244,16 +10850,21 @@ Module collections. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: n <= self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: n <= self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let k := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10265,12 +10876,12 @@ Module collections. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.le (M.read (| n |)) (M.read (| k |)) |)) in + M.use (M.alloc (| BinOp.Pure.le (| M.read (| n |), M.read (| k |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| @@ -10313,7 +10924,7 @@ Module collections. self.head = self.to_physical_idx(mid); } *) - Definition rotate_left_inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left_inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; mid ] => @@ -10323,29 +10934,30 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.mul (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.mul (| + Integer.Usize, M.read (| mid |), - Value.Integer Integer.Usize 2 - |)) - (M.call_closure (| + M.of_value (| Value.Integer 2 |) + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -10355,7 +10967,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10368,17 +10982,20 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: mid * 2 <= self.len()" + M.of_value (| + Value.String "assertion failed: mid * 2 <= self.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -10420,7 +11037,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -10437,7 +11054,7 @@ Module collections. [ M.read (| self |); M.read (| mid |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10455,7 +11072,7 @@ Module collections. } } *) - Definition rotate_right_inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right_inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; k ] => @@ -10465,29 +11082,30 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.mul (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.mul (| + Integer.Usize, M.read (| k |), - Value.Integer Integer.Usize 2 - |)) - (M.call_closure (| + M.of_value (| Value.Integer 2 |) + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -10497,7 +11115,9 @@ Module collections. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10510,17 +11130,20 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: k * 2 <= self.len()" + M.of_value (| + Value.String "assertion failed: k * 2 <= self.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -10587,7 +11210,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10604,7 +11227,7 @@ Module collections. self.binary_search_by(|e| e.cmp(x)) } *) - Definition binary_search (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition binary_search (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; x ] => @@ -10623,8 +11246,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10641,7 +11264,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10668,7 +11292,7 @@ Module collections. } } *) - Definition binary_search_by (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition binary_search_by (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; f ] => @@ -10718,8 +11342,8 @@ Module collections. |), [ M.read (| back |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10737,17 +11361,23 @@ Module collections. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| elem |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| elem |)) ] + |) + ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10759,23 +11389,26 @@ Module collections. 0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| front |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| front |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10823,8 +11456,8 @@ Module collections. |), [ M.read (| back |); M.read (| f |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10835,6 +11468,7 @@ Module collections. ltac:(M.monadic (let idx := M.copy (| γ |) in BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), M.call_closure (| M.get_associated_function (| @@ -10850,11 +11484,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10865,6 +11500,7 @@ Module collections. ltac:(M.monadic (let idx := M.copy (| γ |) in BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), M.call_closure (| M.get_associated_function (| @@ -10878,7 +11514,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))); @@ -10917,7 +11554,7 @@ Module collections. self.binary_search_by(|k| f(k).cmp(b)) } *) - Definition binary_search_by_key (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition binary_search_by_key (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ B; F ], [ self; b; f ] => @@ -10937,8 +11574,8 @@ Module collections. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10960,7 +11597,12 @@ Module collections. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| k |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| k |)) ] + |) + ] |) |); M.read (| b |) @@ -10969,7 +11611,8 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10993,7 +11636,7 @@ Module collections. } } *) - Definition partition_point (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_point (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ P ], [ self; pred ] => @@ -11020,7 +11663,7 @@ Module collections. let front := M.copy (| γ0_0 |) in let back := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11048,8 +11691,8 @@ Module collections. |), [ M.read (| back |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11070,12 +11713,19 @@ Module collections. "call_mut", [] |), - [ pred; Value.Tuple [ M.read (| v |) ] ] + [ + pred; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| v |)) ] + |) + ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -11092,6 +11742,7 @@ Module collections. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -11143,7 +11794,7 @@ Module collections. } } *) - Definition resize (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition resize (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; new_len; value ] => @@ -11153,16 +11804,16 @@ Module collections. let value := M.alloc (| value |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| new_len |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| new_len |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -11171,12 +11822,14 @@ Module collections. [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let extra := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| new_len |), M.call_closure (| M.get_associated_function (| @@ -11221,7 +11874,7 @@ Module collections. [ M.read (| self |); M.read (| new_len |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -11245,18 +11898,20 @@ Module collections. VecDeque { head: 0, len: 0, buf: RawVec::NEW } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::vec_deque::VecDeque" - [ - ("head", Value.Integer Integer.Usize 0); - ("len", Value.Integer Integer.Usize 0); - ("buf", M.read (| M.get_constant (| "alloc::raw_vec::NEW" |) |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::VecDeque" + [ + ("head", A.to_value (M.of_value (| Value.Integer 0 |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("buf", A.to_value (M.read (| M.get_constant (| "alloc::raw_vec::NEW" |) |))) + ] + |))) | _, _ => M.impossible end. @@ -11269,7 +11924,7 @@ Module collections. Self::with_capacity_in(capacity, Global) } *) - Definition with_capacity (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ capacity ] => @@ -11283,7 +11938,8 @@ Module collections. "with_capacity_in", [] |), - [ M.read (| capacity |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| capacity |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + ] |))) | _, _ => M.impossible end. @@ -11305,7 +11961,7 @@ Module collections. if logical_index >= capacity { logical_index - capacity } else { logical_index } } *) - Definition wrap_index (τ : list Ty.t) (α : list Value.t) : M := + Definition wrap_index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ logical_index; capacity ] => ltac:(M.monadic @@ -11314,46 +11970,52 @@ Module collections. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| + UnOp.Pure.not (| + LogicalOp.or (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| logical_index |)) - (Value.Integer Integer.Usize 0), + BinOp.Pure.eq (| + M.read (| logical_index |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| capacity |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.eq (| + M.read (| capacity |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| logical_index |)) - (M.read (| capacity |)))) + (BinOp.Pure.lt (| + M.read (| logical_index |), + M.read (| capacity |) + |))) |), ltac:(M.monadic - (BinOp.Pure.lt - (BinOp.Panic.sub (| + (BinOp.Pure.lt (| + BinOp.Panic.sub (| + Integer.Usize, M.read (| logical_index |), M.read (| capacity |) - |)) - (M.read (| capacity |)))) - |)) + |), + M.read (| capacity |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11366,34 +12028,41 @@ Module collections. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: (logical_index == 0 && capacity == 0) || logical_index < capacity || + M.of_value (| + Value.String + "assertion failed: (logical_index == 0 && capacity == 0) || logical_index < capacity || (logical_index - capacity) < capacity" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| logical_index |)) (M.read (| capacity |)) + BinOp.Pure.ge (| M.read (| logical_index |), M.read (| capacity |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| logical_index |), M.read (| capacity |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| logical_index |), + M.read (| capacity |) + |) |))); fun γ => ltac:(M.monadic logical_index) ] @@ -11443,7 +12112,7 @@ Module collections. } } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -11455,22 +12124,22 @@ Module collections. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + 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 "alloc::collections::vec_deque::VecDeque") @@ -11479,14 +12148,17 @@ Module collections. [] |), [ M.read (| other |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -11528,30 +12200,31 @@ Module collections. let oa := M.copy (| γ0_0 |) in let ob := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| sa |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| oa |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11598,30 +12271,31 @@ Module collections. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| sa |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| oa |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11642,6 +12316,7 @@ Module collections. let mid := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -11709,14 +12384,20 @@ Module collections. M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11726,43 +12407,51 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - sa + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + sa + |) + ] |) - ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - oa_front + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + oa_front + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -11789,8 +12478,10 @@ Module collections. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -11799,18 +12490,20 @@ Module collections. γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := @@ -11827,9 +12520,11 @@ Module collections. let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -11852,9 +12547,11 @@ Module collections. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -11864,33 +12561,45 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11900,43 +12609,51 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - sb_mid + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + sb_mid + |) + ] |) - ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - oa_mid + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + oa_mid + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -11963,8 +12680,10 @@ Module collections. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -11973,18 +12692,20 @@ Module collections. γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := @@ -12001,9 +12722,11 @@ Module collections. let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -12026,9 +12749,11 @@ Module collections. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -12038,33 +12763,45 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12074,43 +12811,51 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - sb_back + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + sb_back + |) + ] |) - ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - ob + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + ob + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -12137,8 +12882,10 @@ Module collections. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -12147,18 +12894,20 @@ Module collections. γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := @@ -12175,9 +12924,11 @@ Module collections. let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -12200,9 +12951,11 @@ Module collections. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -12212,20 +12965,26 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -12333,6 +13092,7 @@ Module collections. let mid := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -12400,14 +13160,20 @@ Module collections. M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12417,43 +13183,51 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - sa_front + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + sa_front + |) + ] |) - ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - oa + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + oa + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -12480,8 +13254,10 @@ Module collections. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -12490,18 +13266,20 @@ Module collections. γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := @@ -12518,9 +13296,11 @@ Module collections. let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -12543,9 +13323,11 @@ Module collections. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -12555,33 +13337,45 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12591,43 +13385,51 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - sa_mid + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + sa_mid + |) + ] |) - ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - ob_mid + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + ob_mid + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -12654,8 +13456,10 @@ Module collections. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -12664,18 +13468,20 @@ Module collections. γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := @@ -12692,9 +13498,11 @@ Module collections. let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -12717,9 +13525,11 @@ Module collections. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -12729,33 +13539,45 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12765,43 +13587,51 @@ Module collections. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - sb + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + sb + |) + ] |) - ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ T ], - "len", - [] - |), - [ - M.read (| - ob_back + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + T + ], + "len", + [] + |), + [ + M.read (| + ob_back + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -12828,8 +13658,10 @@ Module collections. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -12838,18 +13670,20 @@ Module collections. γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := @@ -12866,9 +13700,11 @@ Module collections. let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -12891,9 +13727,11 @@ Module collections. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -12903,20 +13741,26 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -13052,7 +13896,7 @@ Module collections. self.iter().partial_cmp(other.iter()) } *) - Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -13107,7 +13951,7 @@ Module collections. self.iter().cmp(other.iter()) } *) - Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -13169,7 +14013,7 @@ Module collections. self.iter().for_each(|elem| elem.hash(state)); } *) - Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ H ], [ self; state ] => @@ -13212,8 +14056,8 @@ Module collections. |), [ M.read (| self |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13236,11 +14080,12 @@ Module collections. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13266,7 +14111,7 @@ Module collections. self.get(index).expect("Out of bounds access") } *) - Definition index (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index ] => @@ -13288,7 +14133,7 @@ Module collections. |), [ M.read (| self |); M.read (| index |) ] |); - M.read (| Value.String "Out of bounds access" |) + M.read (| M.of_value (| Value.String "Out of bounds access" |) |) ] |))) | _, _ => M.impossible @@ -13314,7 +14159,7 @@ Module collections. self.get_mut(index).expect("Out of bounds access") } *) - Definition index_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index ] => @@ -13336,7 +14181,7 @@ Module collections. |), [ M.read (| self |); M.read (| index |) ] |); - M.read (| Value.String "Out of bounds access" |) + M.read (| M.of_value (| Value.String "Out of bounds access" |) |) ] |))) | _, _ => M.impossible @@ -13362,7 +14207,7 @@ Module collections. SpecFromIter::spec_from_iter(iter.into_iter()) } *) - Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ iter ] => @@ -13419,7 +14264,7 @@ Module collections. IntoIter::new(self) } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -13468,7 +14313,7 @@ Module collections. self.iter() } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -13517,7 +14362,7 @@ Module collections. self.iter_mut() } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -13557,7 +14402,7 @@ Module collections. >::spec_extend(self, iter.into_iter()); } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -13590,7 +14435,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13600,7 +14445,7 @@ Module collections. self.push_back(elem); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; elem ] => @@ -13619,7 +14464,7 @@ Module collections. [ M.read (| self |); M.read (| elem |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13629,7 +14474,7 @@ Module collections. self.reserve(additional); } *) - Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -13648,7 +14493,7 @@ Module collections. [ M.read (| self |); M.read (| additional |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13676,7 +14521,7 @@ Module collections. self.spec_extend(iter.into_iter()); } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -13709,7 +14554,7 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13719,7 +14564,7 @@ Module collections. self.push_back(elem); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; β1 ] => @@ -13745,7 +14590,7 @@ Module collections. [ M.read (| self |); M.read (| elem |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) @@ -13757,7 +14602,7 @@ Module collections. self.reserve(additional); } *) - Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -13776,7 +14621,7 @@ Module collections. [ M.read (| self |); M.read (| additional |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13804,7 +14649,7 @@ Module collections. f.debug_list().entries(self.iter()).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -13872,7 +14717,7 @@ Module collections. Self { head: 0, len, buf: unsafe { RawVec::from_raw_parts_in(ptr, cap, alloc) } } } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ other ] => @@ -13902,21 +14747,24 @@ Module collections. let cap := M.copy (| γ0_2 |) in let alloc := M.copy (| γ0_3 |) in M.alloc (| - Value.StructRecord - "alloc::collections::vec_deque::VecDeque" - [ - ("head", Value.Integer Integer.Usize 0); - ("len", M.read (| len |)); - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], - "from_raw_parts_in", - [] - |), - [ M.read (| ptr |); M.read (| cap |); M.read (| alloc |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::vec_deque::VecDeque" + [ + ("head", A.to_value (M.of_value (| Value.Integer 0 |))); + ("len", A.to_value (M.read (| len |))); + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], + "from_raw_parts_in", + [] + |), + [ M.read (| ptr |); M.read (| cap |); M.read (| alloc |) ] + |))) + ] + |) |))) ] |) @@ -13954,7 +14802,7 @@ Module collections. } } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ other ] => @@ -14102,15 +14950,15 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_struct_record_field (| M.call_closure (| M.get_trait_method (| @@ -14131,8 +14979,9 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14142,8 +14991,8 @@ Module collections. M.get_function (| "core::intrinsics::copy", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", @@ -14175,14 +15024,15 @@ Module collections. |) |) ] - |)); + |) + |); M.read (| buf |); M.read (| len |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -14230,7 +15080,7 @@ Module collections. deq } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ arr ] => @@ -14265,17 +15115,18 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14292,8 +15143,8 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::ops::deref::Deref", Ty.apply @@ -14304,7 +15155,8 @@ Module collections. [] |), [ arr ] - |)) + |) + |) ] |); M.call_closure (| @@ -14321,8 +15173,8 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -14332,7 +15184,7 @@ Module collections. "alloc::collections::vec_deque::VecDeque", "head" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| diff --git a/CoqOfRust/alloc/collections/vec_deque/spec_extend.v b/CoqOfRust/alloc/collections/vec_deque/spec_extend.v index ce2799402..3c306f30f 100644 --- a/CoqOfRust/alloc/collections/vec_deque/spec_extend.v +++ b/CoqOfRust/alloc/collections/vec_deque/spec_extend.v @@ -46,7 +46,7 @@ Module collections. } } *) - Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I A in match τ, α with | [], [ self; iter ] => @@ -57,7 +57,7 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -118,7 +118,8 @@ Module collections. "saturating_add", [] |), - [ M.read (| lower |); Value.Integer Integer.Usize 1 ] + [ M.read (| lower |); M.of_value (| Value.Integer 1 |) + ] |) ] |) @@ -137,22 +138,22 @@ Module collections. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + 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 @@ -162,7 +163,8 @@ Module collections. [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -206,7 +208,9 @@ Module collections. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => @@ -220,7 +224,7 @@ Module collections. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -236,7 +240,7 @@ Module collections. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -291,7 +295,7 @@ Module collections. } } *) - Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I A in match τ, α with | [], [ self; iter ] => @@ -320,7 +324,7 @@ Module collections. let low := M.copy (| γ0_0 |) in let high := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -334,11 +338,13 @@ Module collections. let additional := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -346,7 +352,12 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ low; additional ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value low; A.to_value additional ] + |) + |), [ fun γ => ltac:(M.monadic @@ -357,21 +368,23 @@ Module collections. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -383,9 +396,11 @@ Module collections. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -400,72 +415,89 @@ Module collections. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::Arguments", - "new_v1", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "TrustedLen iterator's size hint is not exact: " + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "TrustedLen iterator's size hint is not exact: " + |) + |)) + ] |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_debug", + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array [ - Ty.tuple - [ - Ty.path - "usize"; - Ty.apply - (Ty.path - "core::option::Option") + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_debug", [ - Ty.path - "usize" + Ty.tuple + [ + Ty.path + "usize"; + Ty.apply + (Ty.path + "core::option::Option") + [ + Ty.path + "usize" + ] + ] ] - ] + |), + [ + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + low + |)); + A.to_value + (M.read (| + high + |)) + ] + |) + |) + ] + |)) ] - |), - [ - M.alloc (| - Value.Tuple - [ - M.read (| - low - |); - M.read (| - high - |) - ] - |) - ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) @@ -474,13 +506,17 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -534,11 +570,13 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -546,7 +584,12 @@ Module collections. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ additional; written ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value additional; A.to_value written ] + |) + |), [ fun γ => ltac:(M.monadic @@ -557,21 +600,23 @@ Module collections. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -583,9 +628,11 @@ Module collections. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -600,31 +647,40 @@ Module collections. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::Arguments", - "new_const", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "The number of items written to VecDeque doesn't match the TrustedLen size hint" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "The number of items written to VecDeque doesn't match the TrustedLen size hint" + |) + |)) + ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) @@ -633,16 +689,20 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -658,11 +718,21 @@ Module collections. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "capacity overflow" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "capacity overflow" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -702,7 +772,7 @@ Module collections. iterator.forget_remaining_elements(); } *) - Definition spec_extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; iterator ] => @@ -786,6 +856,7 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -797,7 +868,7 @@ Module collections. |) |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -811,7 +882,7 @@ Module collections. [ iterator ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -841,7 +912,7 @@ Module collections. self.spec_extend(iterator.copied()) } *) - Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I A in match τ, α with | [], [ self; iterator ] => @@ -897,7 +968,7 @@ Module collections. } } *) - Definition spec_extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; iterator ] => @@ -978,6 +1049,7 @@ Module collections. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), @@ -985,7 +1057,7 @@ Module collections. |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/collections/vec_deque/spec_from_iter.v b/CoqOfRust/alloc/collections/vec_deque/spec_from_iter.v index c1ebf76f9..e31cedbaf 100644 --- a/CoqOfRust/alloc/collections/vec_deque/spec_from_iter.v +++ b/CoqOfRust/alloc/collections/vec_deque/spec_from_iter.v @@ -22,7 +22,7 @@ Module collections. crate::vec::Vec::from_iter(iterator).into() } *) - Definition spec_from_iter (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_from_iter (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ iterator ] => @@ -76,7 +76,7 @@ Module collections. iterator.into_vecdeque() } *) - Definition spec_from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ iterator ] => @@ -122,7 +122,7 @@ Module collections. iterator.into_vecdeque() } *) - Definition spec_from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ iterator ] => diff --git a/CoqOfRust/alloc/ffi/c_str.v b/CoqOfRust/alloc/ffi/c_str.v index 30355aa7f..1bfc5dc05 100644 --- a/CoqOfRust/alloc/ffi/c_str.v +++ b/CoqOfRust/alloc/ffi/c_str.v @@ -31,7 +31,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::CString". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79,7 +79,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::CString". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -138,15 +138,15 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::CString". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -165,7 +165,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::CString". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -209,7 +209,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::CString". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -249,37 +249,40 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::CString". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::ffi::c_str::CString" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::boxed::Box") + M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::CString" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "slice") [ Ty.path "u8" ]; + Ty.path "alloc::alloc::Global" + ], + [], + "clone", + [] + |), [ - Ty.apply (Ty.path "slice") [ Ty.path "u8" ]; - Ty.path "alloc::alloc::Global" - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::ffi::c_str::CString", - "inner" - |) - ] - |)) - ])) + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::ffi::c_str::CString", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -306,43 +309,53 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::NulError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "alloc::ffi::c_str::NulError" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "alloc::ffi::c_str::NulError", - 0 - |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "alloc::ffi::c_str::NulError", - 1 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "alloc::ffi::c_str::NulError" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "alloc::ffi::c_str::NulError", + 0 + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "alloc::ffi::c_str::NulError", + 1 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -369,28 +382,29 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::NulError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "alloc::ffi::c_str::NulError", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "alloc::ffi::c_str::NulError", 0 |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -446,20 +460,21 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::NulError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -480,7 +495,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::NulError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -494,23 +509,25 @@ Module ffi. |), [ M.read (| f |); - M.read (| Value.String "NulError" |); + M.read (| M.of_value (| Value.String "NulError" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "alloc::ffi::c_str::NulError", 0 - |)); + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "alloc::ffi::c_str::NulError", 1 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -548,7 +565,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::FromBytesWithNulErrorKind". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -568,28 +585,33 @@ Module ffi. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "alloc::ffi::c_str::FromBytesWithNulErrorKind::InteriorNul" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "alloc::ffi::c_str::FromBytesWithNulErrorKind::InteriorNul" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple - "alloc::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" - [] + M.of_value (| + Value.StructTuple + "alloc::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + [] + |) |))) ] |) @@ -620,7 +642,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::FromBytesWithNulErrorKind". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -649,11 +671,16 @@ Module ffi. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -676,11 +703,12 @@ Module ffi. |) in let __arg1_0 := M.alloc (| γ2_0 |) in M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| __self_0 |) |)) - (M.read (| M.read (| __arg1_0 |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| __self_0 |) |), + M.read (| M.read (| __arg1_0 |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -713,15 +741,15 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::FromBytesWithNulErrorKind". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -740,7 +768,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::FromBytesWithNulErrorKind". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -769,8 +797,8 @@ Module ffi. |), [ M.read (| f |); - M.read (| Value.String "InteriorNul" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "InteriorNul" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -784,7 +812,10 @@ Module ffi. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "NotNulTerminated" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "NotNulTerminated" |) |) + ] |) |))) ] @@ -817,51 +848,55 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::FromVecWithNulError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::ffi::c_str::FromVecWithNulError" - [ - ("error_kind", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "alloc::ffi::c_str::FromBytesWithNulErrorKind", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::ffi::c_str::FromVecWithNulError", - "error_kind" - |) - ] - |)); - ("bytes", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::ffi::c_str::FromVecWithNulError", - "bytes" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::FromVecWithNulError" + [ + ("error_kind", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloc::ffi::c_str::FromBytesWithNulErrorKind", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::ffi::c_str::FromVecWithNulError", + "error_kind" + |) + ] + |))); + ("bytes", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::ffi::c_str::FromVecWithNulError", + "bytes" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -888,7 +923,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::FromVecWithNulError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -971,20 +1006,21 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::FromVecWithNulError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -1005,7 +1041,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::FromVecWithNulError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1019,25 +1055,27 @@ Module ffi. |), [ M.read (| f |); - M.read (| Value.String "FromVecWithNulError" |); - M.read (| Value.String "error_kind" |); + M.read (| M.of_value (| Value.String "FromVecWithNulError" |) |); + M.read (| M.of_value (| Value.String "error_kind" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::ffi::c_str::FromVecWithNulError", "error_kind" - |)); - M.read (| Value.String "bytes" |); + |) + |); + M.read (| M.of_value (| Value.String "bytes" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::ffi::c_str::FromVecWithNulError", "bytes" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1059,7 +1097,7 @@ Module ffi. &self.bytes[..] } *) - Definition as_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1080,7 +1118,7 @@ Module ffi. "alloc::ffi::c_str::FromVecWithNulError", "bytes" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |))) | _, _ => M.impossible @@ -1093,7 +1131,7 @@ Module ffi. self.bytes } *) - Definition into_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition into_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1126,49 +1164,53 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::IntoStringError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::ffi::c_str::IntoStringError" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "alloc::ffi::c_str::CString", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::ffi::c_str::IntoStringError", - "inner" - |) - ] - |)); - ("error", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::str::error::Utf8Error", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::ffi::c_str::IntoStringError", - "error" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::IntoStringError" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloc::ffi::c_str::CString", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::ffi::c_str::IntoStringError", + "inner" + |) + ] + |))); + ("error", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::str::error::Utf8Error", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::ffi::c_str::IntoStringError", + "error" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1195,7 +1237,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::IntoStringError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1272,20 +1314,21 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::IntoStringError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -1306,7 +1349,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "alloc::ffi::c_str::IntoStringError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1320,25 +1363,27 @@ Module ffi. |), [ M.read (| f |); - M.read (| Value.String "IntoStringError" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "IntoStringError" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::ffi::c_str::IntoStringError", "inner" - |)); - M.read (| Value.String "error" |); + |) + |); + M.read (| M.of_value (| Value.String "error" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::ffi::c_str::IntoStringError", "error" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1414,7 +1459,7 @@ Module ffi. t.spec_new_impl() } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -1440,7 +1485,7 @@ Module ffi. unsafe { Self::_from_vec_unchecked(v) } } *) - Definition from_vec_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_vec_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -1448,24 +1493,24 @@ Module ffi. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -1481,7 +1526,7 @@ Module ffi. [] |), [ - Value.Integer Integer.U8 0; + M.of_value (| Value.Integer 0 |); M.call_closure (| M.get_trait_method (| "core::ops::deref::Deref", @@ -1501,7 +1546,8 @@ Module ffi. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1514,18 +1560,21 @@ Module ffi. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: memchr::memchr(0, &v).is_none()" + M.of_value (| + Value.String + "assertion failed: memchr::memchr(0, &v).is_none()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1552,7 +1601,7 @@ Module ffi. Self { inner: v.into_boxed_slice() } } *) - Definition _from_vec_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition _from_vec_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -1568,7 +1617,7 @@ Module ffi. "reserve_exact", [] |), - [ v; Value.Integer Integer.Usize 1 ] + [ v; M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -1581,25 +1630,28 @@ Module ffi. "push", [] |), - [ v; Value.Integer Integer.U8 0 ] + [ v; M.of_value (| Value.Integer 0 |) ] |) |) in M.alloc (| - Value.StructRecord - "alloc::ffi::c_str::CString" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - "into_boxed_slice", - [] - |), - [ M.read (| v |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::CString" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "into_boxed_slice", + [] + |), + [ M.read (| v |) ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -1626,7 +1678,7 @@ Module ffi. } } *) - Definition from_raw (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -1635,11 +1687,12 @@ Module ffi. let len := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_function (| "alloc::ffi::c_str::from_raw::strlen", [] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| ptr |)) ] + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| ptr |) |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let slice := @@ -1650,24 +1703,31 @@ Module ffi. |) |) in M.alloc (| - Value.StructRecord - "alloc::ffi::c_str::CString" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") + M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::CString" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "slice") [ Ty.path "u8" ]; + Ty.path "alloc::alloc::Global" + ], + "from_raw", + [] + |), [ - Ty.apply (Ty.path "slice") [ Ty.path "u8" ]; - Ty.path "alloc::alloc::Global" - ], - "from_raw", - [] - |), - [ M.rust_cast (M.read (| M.use (M.alloc (| M.read (| slice |) |)) |)) ] - |)) - ] + M.rust_cast (| + M.read (| M.use (M.alloc (| M.read (| slice |) |)) |) + |) + ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -1680,13 +1740,13 @@ Module ffi. Box::into_raw(self.into_inner()) as *mut c_char } *) - Definition into_raw (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -1704,7 +1764,8 @@ Module ffi. [ M.read (| self |) ] |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1718,7 +1779,7 @@ Module ffi. }) } *) - Definition into_string (τ : list Ty.t) (α : list Value.t) : M := + Definition into_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1750,8 +1811,8 @@ Module ffi. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1761,41 +1822,46 @@ Module ffi. fun γ => ltac:(M.monadic (let e := M.copy (| γ |) in - Value.StructRecord - "alloc::ffi::c_str::IntoStringError" - [ - ("error", - M.call_closure (| - M.get_associated_function (| - Ty.path "alloc::string::FromUtf8Error", - "utf8_error", - [] - |), - [ e ] - |)); - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.path "alloc::ffi::c_str::CString", - "_from_vec_unchecked", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::IntoStringError" + [ + ("error", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::FromUtf8Error", - "into_bytes", + "utf8_error", [] |), - [ M.read (| e |) ] - |) - ] - |)) - ])) + [ e ] + |))); + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "alloc::ffi::c_str::CString", + "_from_vec_unchecked", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "alloc::string::FromUtf8Error", + "into_bytes", + [] + |), + [ M.read (| e |) ] + |) + ] + |))) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1811,7 +1877,7 @@ Module ffi. vec } *) - Definition into_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition into_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1851,25 +1917,30 @@ Module ffi. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - _nul; - M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.U8 0 ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value _nul; + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |) + |)) + ] + |) |), [ fun γ => @@ -1879,15 +1950,15 @@ Module ffi. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply @@ -1903,7 +1974,8 @@ Module ffi. |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1915,9 +1987,11 @@ Module ffi. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -1936,22 +2010,26 @@ Module ffi. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in vec @@ -1966,7 +2044,7 @@ Module ffi. into_vec(self.into_inner()) } *) - Definition into_bytes_with_nul (τ : list Ty.t) (α : list Value.t) : M := + Definition into_bytes_with_nul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1999,7 +2077,7 @@ Module ffi. unsafe { self.inner.get_unchecked(..self.inner.len() - 1) } } *) - Definition as_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2018,30 +2096,34 @@ Module ffi. "inner" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::ffi::c_str::CString", - "inner" - |) - |) - ] - |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::ffi::c_str::CString", + "inner" + |) + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |))) | _, _ => M.impossible @@ -2054,7 +2136,7 @@ Module ffi. &self.inner } *) - Definition as_bytes_with_nul (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes_with_nul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2077,7 +2159,7 @@ Module ffi. &*self } *) - Definition as_c_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_c_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2102,7 +2184,7 @@ Module ffi. unsafe { Box::from_raw(Box::into_raw(self.into_inner()) as *mut CStr) } } *) - Definition into_boxed_c_str (τ : list Ty.t) (α : list Value.t) : M := + Definition into_boxed_c_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2116,8 +2198,8 @@ Module ffi. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -2138,7 +2220,8 @@ Module ffi. [ M.read (| self |) ] |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -2157,7 +2240,7 @@ Module ffi. unsafe { ptr::read(&this.inner) } } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2221,7 +2304,7 @@ Module ffi. unsafe { Self::_from_vec_with_nul_unchecked(v) } } *) - Definition from_vec_with_nul_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_vec_with_nul_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -2229,25 +2312,26 @@ Module ffi. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -2263,7 +2347,7 @@ Module ffi. [] |), [ - Value.Integer Integer.U8 0; + M.of_value (| Value.Integer 0 |); M.call_closure (| M.get_trait_method (| "core::ops::deref::Deref", @@ -2283,9 +2367,9 @@ Module ffi. |) ] |), - Value.Integer Integer.Usize 1 - |)) - (M.call_closure (| + M.of_value (| Value.Integer 1 |) + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -2294,7 +2378,9 @@ Module ffi. [] |), [ v ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2307,18 +2393,21 @@ Module ffi. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: memchr::memchr(0, &v).unwrap() + 1 == v.len()" + M.of_value (| + Value.String + "assertion failed: memchr::memchr(0, &v).unwrap() + 1 == v.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2343,26 +2432,29 @@ Module ffi. Self { inner: v.into_boxed_slice() } } *) - Definition _from_vec_with_nul_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition _from_vec_with_nul_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "alloc::ffi::c_str::CString" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - "into_boxed_slice", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::CString" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "into_boxed_slice", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -2389,7 +2481,7 @@ Module ffi. } } *) - Definition from_vec_with_nul (τ : list Ty.t) (α : list Value.t) : M := + Definition from_vec_with_nul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -2400,7 +2492,7 @@ Module ffi. M.call_closure (| M.get_function (| "core::slice::memchr::memchr", [] |), [ - Value.Integer Integer.U8 0; + M.of_value (| Value.Integer 0 |); M.call_closure (| M.get_trait_method (| "core::ops::deref::Deref", @@ -2430,12 +2522,13 @@ Module ffi. let nul_pos := M.copy (| γ0_0 |) in let γ := M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.add (| + BinOp.Pure.eq (| + BinOp.Panic.add (| + Integer.Usize, M.read (| nul_pos |), - Value.Integer Integer.Usize 1 - |)) - (M.call_closure (| + M.of_value (| Value.Integer 1 |) + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -2444,22 +2537,26 @@ Module ffi. [] |), [ v ] - |)) + |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "alloc::ffi::c_str::CString", - "_from_vec_with_nul_unchecked", - [] - |), - [ M.read (| v |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "alloc::ffi::c_str::CString", + "_from_vec_with_nul_unchecked", + [] + |), + [ M.read (| v |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2471,36 +2568,52 @@ Module ffi. |) in let nul_pos := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "alloc::ffi::c_str::FromVecWithNulError" - [ - ("error_kind", - Value.StructTuple - "alloc::ffi::c_str::FromBytesWithNulErrorKind::InteriorNul" - [ M.read (| nul_pos |) ]); - ("bytes", M.read (| v |)) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::FromVecWithNulError" + [ + ("error_kind", + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::ffi::c_str::FromBytesWithNulErrorKind::InteriorNul" + [ A.to_value (M.read (| nul_pos |)) ] + |))); + ("bytes", A.to_value (M.read (| v |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "alloc::ffi::c_str::FromVecWithNulError" - [ - ("error_kind", - Value.StructTuple - "alloc::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" - []); - ("bytes", M.read (| v |)) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::FromVecWithNulError" + [ + ("error_kind", + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + [] + |))); + ("bytes", A.to_value (M.read (| v |))) + ] + |)) + ] + |) |))) ] |) @@ -2522,7 +2635,7 @@ Module ffi. } } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2544,12 +2657,12 @@ Module ffi. "inner" |) |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |), - Value.Integer Integer.U8 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2573,7 +2686,7 @@ Module ffi. unsafe { CStr::from_bytes_with_nul_unchecked(self.as_bytes_with_nul()) } } *) - Definition deref (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2615,7 +2728,7 @@ Module ffi. fmt::Debug::fmt(&**self, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2663,7 +2776,7 @@ Module ffi. s.into_bytes() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -2696,7 +2809,7 @@ Module ffi. a.to_owned() } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -2746,7 +2859,7 @@ Module ffi. self } *) - Definition borrow (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2780,7 +2893,7 @@ Module ffi. s.into_owned() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -2817,7 +2930,7 @@ Module ffi. unsafe { Box::from_raw(Box::into_raw(boxed) as *mut CStr) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -2860,8 +2973,8 @@ Module ffi. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -2873,7 +2986,8 @@ Module ffi. [] |), [ M.read (| boxed |) ] - |)) + |) + |) ] |) |) @@ -2904,7 +3018,7 @@ Module ffi. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ cow ] => ltac:(M.monadic @@ -2983,7 +3097,7 @@ Module ffi. CString { inner: unsafe { Box::from_raw(raw) } } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -2991,8 +3105,8 @@ Module ffi. M.read (| let raw := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -3001,27 +3115,31 @@ Module ffi. [] |), [ M.read (| s |) ] - |)) + |) + |) |) in M.alloc (| - Value.StructRecord - "alloc::ffi::c_str::CString" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ - Ty.apply (Ty.path "slice") [ Ty.path "u8" ]; - Ty.path "alloc::alloc::Global" - ], - "from_raw", - [] - |), - [ M.read (| raw |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::CString" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "slice") [ Ty.path "u8" ]; + Ty.path "alloc::alloc::Global" + ], + "from_raw", + [] + |), + [ M.read (| raw |) ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3061,7 +3179,7 @@ Module ffi. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -3161,7 +3279,7 @@ Module ffi. ( **self).into() } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3202,7 +3320,7 @@ Module ffi. s.into_boxed_c_str() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -3235,12 +3353,14 @@ Module ffi. Cow::Owned(s) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in - Value.StructTuple "alloc::borrow::Cow::Owned" [ M.read (| s |) ])) + M.of_value (| + Value.StructTuple "alloc::borrow::Cow::Owned" [ A.to_value (M.read (| s |)) ] + |))) | _, _ => M.impossible end. @@ -3261,12 +3381,14 @@ Module ffi. Cow::Borrowed(s) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in - Value.StructTuple "alloc::borrow::Cow::Borrowed" [ M.read (| s |) ])) + M.of_value (| + Value.StructTuple "alloc::borrow::Cow::Borrowed" [ A.to_value (M.read (| s |)) ] + |))) | _, _ => M.impossible end. @@ -3288,23 +3410,26 @@ Module ffi. Cow::Borrowed(s.as_c_str()) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in - Value.StructTuple - "alloc::borrow::Cow::Borrowed" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "alloc::ffi::c_str::CString", - "as_c_str", - [] - |), - [ M.read (| s |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Borrowed" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "alloc::ffi::c_str::CString", + "as_c_str", + [] + |), + [ M.read (| s |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3329,7 +3454,7 @@ Module ffi. unsafe { Arc::from_raw(Arc::into_raw(arc) as *const CStr) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -3379,8 +3504,8 @@ Module ffi. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::sync::Arc") @@ -3392,7 +3517,8 @@ Module ffi. [] |), [ M.read (| arc |) ] - |)) + |) + |) ] |) |) @@ -3420,7 +3546,7 @@ Module ffi. unsafe { Arc::from_raw(Arc::into_raw(arc) as *const CStr) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -3463,8 +3589,8 @@ Module ffi. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::sync::Arc") @@ -3476,7 +3602,8 @@ Module ffi. [] |), [ M.read (| arc |) ] - |)) + |) + |) ] |) |) @@ -3505,7 +3632,7 @@ Module ffi. unsafe { Rc::from_raw(Rc::into_raw(rc) as *const CStr) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -3555,8 +3682,8 @@ Module ffi. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") @@ -3568,7 +3695,8 @@ Module ffi. [] |), [ M.read (| rc |) ] - |)) + |) + |) ] |) |) @@ -3596,7 +3724,7 @@ Module ffi. unsafe { Rc::from_raw(Rc::into_raw(rc) as *const CStr) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -3639,8 +3767,8 @@ Module ffi. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") @@ -3652,7 +3780,8 @@ Module ffi. [] |), [ M.read (| rc |) ] - |)) + |) + |) ] |) |) @@ -3681,7 +3810,7 @@ Module ffi. unsafe { Box::from_raw(Box::into_raw(boxed) as *mut CStr) } } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -3701,7 +3830,8 @@ Module ffi. "from", [] |), - [ Value.Array [ Value.Integer Integer.U8 0 ] ] + [ M.of_value (| Value.Array [ A.to_value (M.of_value (| Value.Integer 0 |)) ] |) + ] |) |) in M.alloc (| @@ -3714,8 +3844,8 @@ Module ffi. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -3727,7 +3857,8 @@ Module ffi. [] |), [ M.read (| boxed |) ] - |)) + |) + |) ] |) |) @@ -3751,7 +3882,7 @@ Module ffi. self.0 } *) - Definition nul_position (τ : list Ty.t) (α : list Value.t) : M := + Definition nul_position (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3774,7 +3905,7 @@ Module ffi. self.1 } *) - Definition into_vec (τ : list Ty.t) (α : list Value.t) : M := + Definition into_vec (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3796,7 +3927,7 @@ Module ffi. write!(f, "nul byte found in provided data at position: {}", self.0) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3810,36 +3941,46 @@ Module ffi. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "nul byte found in provided data at position: " - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "nul byte found in provided data at position: " + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "alloc::ffi::c_str::NulError", - 0 - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "alloc::ffi::c_str::NulError", + 0 + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -3870,7 +4011,7 @@ Module ffi. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3910,31 +4051,41 @@ Module ffi. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "data provided contains an interior nul byte at pos " - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "data provided contains an interior nul byte at pos " + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ pos ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ pos ] + |)) + ] + |) + |) + |) ] |) ] @@ -3959,15 +4110,21 @@ Module ffi. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "data provided is not nul terminated" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "data provided is not nul terminated" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -3995,7 +4152,7 @@ Module ffi. self.inner } *) - Definition into_cstring (τ : list Ty.t) (α : list Value.t) : M := + Definition into_cstring (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4018,7 +4175,7 @@ Module ffi. self.error } *) - Definition utf8_error (τ : list Ty.t) (α : list Value.t) : M := + Definition utf8_error (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4039,12 +4196,12 @@ Module ffi. "C string contained non-utf8 bytes" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "C string contained non-utf8 bytes" |))) + M.read (| M.of_value (| Value.String "C string contained non-utf8 bytes" |) |))) | _, _ => M.impossible end. @@ -4060,7 +4217,7 @@ Module ffi. self.description().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4102,42 +4259,45 @@ Module ffi. CString { inner: self.to_bytes_with_nul().into() } } *) - Definition to_owned (τ : list Ty.t) (α : list Value.t) : M := + Definition to_owned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::ffi::c_str::CString" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - [ - Ty.apply - (Ty.path "alloc::boxed::Box") + M.of_value (| + Value.StructRecord + "alloc::ffi::c_str::CString" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], [ - Ty.apply (Ty.path "slice") [ Ty.path "u8" ]; - Ty.path "alloc::alloc::Global" - ] - ], - "into", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ffi::c_str::CStr", - "to_bytes_with_nul", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "slice") [ Ty.path "u8" ]; + Ty.path "alloc::alloc::Global" + ] + ], + "into", [] |), - [ M.read (| self |) ] - |) - ] - |)) - ])) + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::ffi::c_str::CStr", + "to_bytes_with_nul", + [] + |), + [ M.read (| self |) ] + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4148,7 +4308,7 @@ Module ffi. target.inner = b.into_boxed_slice(); } *) - Definition clone_into (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_into (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; target ] => ltac:(M.monadic @@ -4227,7 +4387,7 @@ Module ffi. [ M.read (| b |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4253,7 +4413,7 @@ Module ffi. s.to_owned() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -4291,7 +4451,7 @@ Module ffi. self } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _index ] => ltac:(M.monadic @@ -4327,7 +4487,7 @@ Module ffi. self } *) - Definition as_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4361,7 +4521,7 @@ Module ffi. String::from_utf8_lossy(self.to_bytes()) } *) - Definition to_string_lossy (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string_lossy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4390,7 +4550,7 @@ Module ffi. CString::from(self) } *) - Definition into_c_string (τ : list Ty.t) (α : list Value.t) : M := + Definition into_c_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4424,12 +4584,12 @@ Module ffi. "nul byte found in data" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "nul byte found in data" |))) + M.read (| M.of_value (| Value.String "nul byte found in data" |) |))) | _, _ => M.impossible end. @@ -4460,12 +4620,12 @@ Module ffi. "C string contained non-utf8 bytes" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "C string contained non-utf8 bytes" |))) + M.read (| M.of_value (| Value.String "C string contained non-utf8 bytes" |) |))) | _, _ => M.impossible end. @@ -4474,22 +4634,26 @@ Module ffi. Some(&self.error) } *) - Definition source (τ : list Ty.t) (α : list Value.t) : M := + Definition source (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::option::Option::Some" - [ - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::ffi::c_str::IntoStringError", - "error" - |)) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::ffi::c_str::IntoStringError", + "error" + |) + |)) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/fmt.v b/CoqOfRust/alloc/fmt.v index 7e761fa22..00fdb4fda 100644 --- a/CoqOfRust/alloc/fmt.v +++ b/CoqOfRust/alloc/fmt.v @@ -14,7 +14,7 @@ Module fmt. args.as_str().map_or_else(|| format_inner(args), crate::borrow::ToOwned::to_owned) } *) - Definition format (τ : list Ty.t) (α : list Value.t) : M := + Definition format (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ args ] => ltac:(M.monadic @@ -34,8 +34,8 @@ Module fmt. M.get_associated_function (| Ty.path "core::fmt::Arguments", "as_str", [] |), [ args ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -51,7 +51,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)); + end) + |); M.get_trait_method (| "alloc::borrow::ToOwned", Ty.path "str", [], "to_owned", [] |) ] |))) @@ -67,7 +68,7 @@ Module fmt. output } *) - Definition format_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition format_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ args ] => ltac:(M.monadic @@ -116,7 +117,11 @@ Module fmt. |), [ output; M.read (| args |) ] |); - M.read (| Value.String "a formatting trait implementation returned an error" |) + M.read (| + M.of_value (| + Value.String "a formatting trait implementation returned an error" + |) + |) ] |) |) in diff --git a/CoqOfRust/alloc/raw_vec.v b/CoqOfRust/alloc/raw_vec.v index 169293bc7..f2be5e4f2 100644 --- a/CoqOfRust/alloc/raw_vec.v +++ b/CoqOfRust/alloc/raw_vec.v @@ -40,7 +40,7 @@ Module raw_vec. (* pub const NEW: Self = Self::new(); *) (* Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; Ty.path "alloc::alloc::Global" ] *) - Definition value_NEW (T : Ty.t) : Value.t := + Definition value_NEW (T : Ty.t) : A.t := let Self : Ty.t := Self T in M.run ltac:(M.monadic @@ -64,7 +64,7 @@ Module raw_vec. Self::new_in(Global) } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -75,7 +75,7 @@ Module raw_vec. "new_in", [] |), - [ Value.StructTuple "alloc::alloc::Global" [] ] + [ M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -87,7 +87,7 @@ Module raw_vec. Self::with_capacity_in(capacity, Global) } *) - Definition with_capacity (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ capacity ] => @@ -99,7 +99,7 @@ Module raw_vec. "with_capacity_in", [] |), - [ M.read (| capacity |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| capacity |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -113,7 +113,7 @@ Module raw_vec. Self::with_capacity_zeroed_in(capacity, Global) } *) - Definition with_capacity_zeroed (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity_zeroed (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ capacity ] => @@ -125,7 +125,7 @@ Module raw_vec. "with_capacity_zeroed_in", [] |), - [ M.read (| capacity |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| capacity |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -148,48 +148,47 @@ Module raw_vec. }; *) (* Ty.path "usize" *) - Definition value_MIN_NON_ZERO_CAP (T A : Ty.t) : Value.t := + Definition value_MIN_NON_ZERO_CAP (T A : Ty.t) : A.t := let Self : Ty.t := Self T A in M.run ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| - M.get_function (| "core::mem::size_of", [ T ] |), - [] - |)) - (Value.Integer Integer.Usize 1) + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 8 |))); + M.alloc (| M.of_value (| Value.Integer 8 |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |)) - (Value.Integer Integer.Usize 1024) + |), + M.of_value (| Value.Integer 1024 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 4 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 1 |))) + M.alloc (| M.of_value (| Value.Integer 4 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |))) ] @@ -205,27 +204,30 @@ Module raw_vec. Self { ptr: Unique::dangling(), cap: 0, alloc } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => ltac:(M.monadic (let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::raw_vec::RawVec" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], - "dangling", - [] - |), - [] - |)); - ("cap", Value.Integer Integer.Usize 0); - ("alloc", M.read (| alloc |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::raw_vec::RawVec" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], + "dangling", + [] + |), + [] + |))); + ("cap", A.to_value (M.of_value (| Value.Integer 0 |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |))) | _, _ => M.impossible end. @@ -238,7 +240,7 @@ Module raw_vec. Self::allocate_in(capacity, AllocInit::Uninitialized, alloc) } *) - Definition with_capacity_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ capacity; alloc ] => @@ -253,7 +255,7 @@ Module raw_vec. |), [ M.read (| capacity |); - Value.StructTuple "alloc::raw_vec::AllocInit::Uninitialized" []; + M.of_value (| Value.StructTuple "alloc::raw_vec::AllocInit::Uninitialized" [] |); M.read (| alloc |) ] |))) @@ -269,7 +271,7 @@ Module raw_vec. Self::allocate_in(capacity, AllocInit::Zeroed, alloc) } *) - Definition with_capacity_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ capacity; alloc ] => @@ -284,7 +286,7 @@ Module raw_vec. |), [ M.read (| capacity |); - Value.StructTuple "alloc::raw_vec::AllocInit::Zeroed" []; + M.of_value (| Value.StructTuple "alloc::raw_vec::AllocInit::Zeroed" [] |); M.read (| alloc |) ] |))) @@ -310,7 +312,7 @@ Module raw_vec. } } *) - Definition into_box (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_box (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len ] => @@ -320,32 +322,34 @@ Module raw_vec. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| len |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| len |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "capacity", [] |), [ self ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -365,27 +369,34 @@ Module raw_vec. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "`len` must be smaller than or equal to `self.capacity()`" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "`len` must be smaller than or equal to `self.capacity()`" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let me := @@ -409,8 +420,8 @@ Module raw_vec. [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "ptr", @@ -430,7 +441,8 @@ Module raw_vec. [ me ] |) ] - |)); + |) + |); M.read (| len |) ] |) @@ -519,7 +531,7 @@ Module raw_vec. } } *) - Definition allocate_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ capacity; init; alloc ] => @@ -529,7 +541,7 @@ Module raw_vec. let alloc := M.alloc (| alloc |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -541,9 +553,10 @@ Module raw_vec. M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| capacity |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.eq (| + M.read (| capacity |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -628,7 +641,7 @@ Module raw_vec. "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -718,41 +731,44 @@ Module raw_vec. |) |) in M.alloc (| - Value.StructRecord - "alloc::raw_vec::RawVec" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], - "new_unchecked", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "alloc::raw_vec::RawVec" + [ + ("ptr", + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ptr", + Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], + "new_unchecked", [] |), [ M.call_closure (| M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - "cast", - [ T ] + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_ptr", + [] |), - [ M.read (| ptr |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "cast", + [ T ] + |), + [ M.read (| ptr |) ] + |) + ] |) ] - |) - ] - |)); - ("cap", M.read (| capacity |)); - ("alloc", M.read (| alloc |)) - ] + |))); + ("cap", A.to_value (M.read (| capacity |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |) |))) ] |) @@ -769,7 +785,7 @@ Module raw_vec. Self { ptr: unsafe { Unique::new_unchecked(ptr) }, cap: capacity, alloc } } *) - Definition from_raw_parts_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_parts_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; capacity; alloc ] => @@ -777,21 +793,24 @@ Module raw_vec. (let ptr := M.alloc (| ptr |) in let capacity := M.alloc (| capacity |) in let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::raw_vec::RawVec" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], - "new_unchecked", - [] - |), - [ M.read (| ptr |) ] - |)); - ("cap", M.read (| capacity |)); - ("alloc", M.read (| alloc |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::raw_vec::RawVec" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], + "new_unchecked", + [] + |), + [ M.read (| ptr |) ] + |))); + ("cap", A.to_value (M.read (| capacity |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |))) | _, _ => M.impossible end. @@ -804,7 +823,7 @@ Module raw_vec. self.ptr.as_ptr() } *) - Definition ptr (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ptr (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -838,7 +857,7 @@ Module raw_vec. if T::IS_ZST { usize::MAX } else { self.cap } } *) - Definition capacity (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition capacity (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -846,7 +865,7 @@ Module raw_vec. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -876,7 +895,7 @@ Module raw_vec. &self.alloc } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -913,7 +932,7 @@ Module raw_vec. } } *) - Definition current_memory (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition current_memory (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -921,7 +940,7 @@ Module raw_vec. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -933,19 +952,22 @@ Module raw_vec. M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::raw_vec::RawVec", "cap" |) - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -995,47 +1017,55 @@ Module raw_vec. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.apply - (Ty.path "core::ptr::unique::Unique") - [ Ty.path "u8" ], + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.path "u8" ] - ], - "into", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::unique::Unique") [ T ], - "cast", - [ Ty.path "u8" ] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::raw_vec::RawVec", - "ptr" - |) - |) - ] - |) - ] - |); - M.read (| layout |) - ] - ] + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply + (Ty.path "core::ptr::unique::Unique") + [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.path "u8" ] + ], + "into", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::unique::Unique") + [ T ], + "cast", + [ Ty.path "u8" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::raw_vec::RawVec", + "ptr" + |) + |) + ] + |) + ] + |)); + A.to_value (M.read (| layout |)) + ] + |)) + ] + |) |))) ] |))) @@ -1069,7 +1099,7 @@ Module raw_vec. } } *) - Definition reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len; additional ] => @@ -1079,7 +1109,7 @@ Module raw_vec. let additional := M.alloc (| additional |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1103,8 +1133,8 @@ Module raw_vec. [ M.read (| self |); M.read (| len |); M.read (| additional |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -1120,7 +1150,7 @@ Module raw_vec. handle_reserve(self.grow_amortized(len, 1)); } *) - Definition reserve_for_push (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve_for_push (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len ] => @@ -1139,12 +1169,12 @@ Module raw_vec. "grow_amortized", [] |), - [ M.read (| self |); M.read (| len |); Value.Integer Integer.Usize 1 ] + [ M.read (| self |); M.read (| len |); M.of_value (| Value.Integer 1 |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1165,7 +1195,7 @@ Module raw_vec. Ok(()) } *) - Definition try_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len; additional ] => @@ -1178,7 +1208,7 @@ Module raw_vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1275,8 +1305,8 @@ Module raw_vec. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1285,20 +1315,27 @@ Module raw_vec. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "needs_to_grow", [] |), [ M.read (| self |); M.read (| len |); M.read (| additional |) ] - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1313,7 +1350,7 @@ Module raw_vec. handle_reserve(self.try_reserve_exact(len, additional)); } *) - Definition reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len; additional ] => @@ -1338,7 +1375,7 @@ Module raw_vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1363,7 +1400,7 @@ Module raw_vec. Ok(()) } *) - Definition try_reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len; additional ] => @@ -1376,7 +1413,7 @@ Module raw_vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1473,8 +1510,8 @@ Module raw_vec. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1483,20 +1520,27 @@ Module raw_vec. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "needs_to_grow", [] |), [ M.read (| self |); M.read (| len |); M.read (| additional |) ] - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1511,7 +1555,7 @@ Module raw_vec. handle_reserve(self.shrink(cap)); } *) - Definition shrink_to_fit (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink_to_fit (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; cap ] => @@ -1535,7 +1579,7 @@ Module raw_vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1548,7 +1592,7 @@ Module raw_vec. additional > self.capacity().wrapping_sub(len) } *) - Definition needs_to_grow (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition needs_to_grow (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len; additional ] => @@ -1556,9 +1600,9 @@ Module raw_vec. (let self := M.alloc (| self |) in let len := M.alloc (| len |) in let additional := M.alloc (| additional |) in - BinOp.Pure.gt - (M.read (| additional |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| additional |), + M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_sub", [] |), [ M.call_closure (| @@ -1571,7 +1615,8 @@ Module raw_vec. |); M.read (| len |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1588,7 +1633,7 @@ Module raw_vec. self.cap = cap; } *) - Definition set_ptr_and_cap (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition set_ptr_and_cap (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; ptr; cap ] => @@ -1642,7 +1687,7 @@ Module raw_vec. |), M.read (| cap |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1678,7 +1723,7 @@ Module raw_vec. Ok(()) } *) - Definition grow_amortized (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition grow_amortized (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len; additional ] => @@ -1691,26 +1736,28 @@ Module raw_vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| additional |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| additional |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1723,22 +1770,25 @@ Module raw_vec. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: additional > 0" + M.of_value (| + Value.String "assertion failed: additional > 0" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1750,29 +1800,34 @@ Module raw_vec. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "alloc::collections::TryReserveErrorKind", - [ Ty.path "alloc::collections::TryReserveError" ], - "into", - [] - |), - [ - Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "alloc::collections::TryReserveErrorKind", + [ Ty.path "alloc::collections::TryReserveError" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let required_cap := @@ -1806,9 +1861,11 @@ Module raw_vec. |), [ M.read (| len |); M.read (| additional |) ] |); - Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [] + M.of_value (| + Value.StructTuple + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + [] + |) ] |) ] @@ -1873,6 +1930,7 @@ Module raw_vec. M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), [ BinOp.Panic.mul (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1880,7 +1938,7 @@ Module raw_vec. "cap" |) |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |); M.read (| required_cap |) ] @@ -2013,7 +2071,13 @@ Module raw_vec. [ M.read (| self |); M.read (| ptr |); M.read (| cap |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2040,7 +2104,7 @@ Module raw_vec. Ok(()) } *) - Definition grow_exact (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition grow_exact (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len; additional ] => @@ -2053,7 +2117,7 @@ Module raw_vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2065,29 +2129,34 @@ Module raw_vec. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "alloc::collections::TryReserveErrorKind", - [ Ty.path "alloc::collections::TryReserveError" ], - "into", - [] - |), - [ - Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "alloc::collections::TryReserveErrorKind", + [ Ty.path "alloc::collections::TryReserveError" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let cap := @@ -2121,9 +2190,11 @@ Module raw_vec. |), [ M.read (| len |); M.read (| additional |) ] |); - Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [] + M.of_value (| + Value.StructTuple + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + [] + |) ] |) ] @@ -2299,7 +2370,13 @@ Module raw_vec. [ M.read (| self |); M.read (| ptr |); M.read (| cap |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2339,7 +2416,7 @@ Module raw_vec. Ok(()) } *) - Definition shrink (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; cap ] => @@ -2351,24 +2428,26 @@ Module raw_vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| cap |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| cap |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2385,27 +2464,34 @@ Module raw_vec. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "Tried to shrink to a larger capacity" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Tried to shrink to a larger capacity" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2434,7 +2520,11 @@ Module raw_vec. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) |) |) @@ -2455,16 +2545,17 @@ Module raw_vec. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| cap |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| cap |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2517,9 +2608,9 @@ Module raw_vec. "alloc::raw_vec::RawVec", "cap" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let ptr := @@ -2639,8 +2730,8 @@ Module raw_vec. M.read (| new_layout |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2649,20 +2740,27 @@ Module raw_vec. [ fun γ => ltac:(M.monadic - (Value.StructRecord - "alloc::collections::TryReserveErrorKind::AllocError" - [ - ("layout", - M.read (| - new_layout - |)); - ("non_exhaustive", - Value.Tuple []) - ])) + (M.of_value (| + Value.StructRecord + "alloc::collections::TryReserveErrorKind::AllocError" + [ + ("layout", + A.to_value + (M.read (| + new_layout + |))); + ("non_exhaustive", + A.to_value + (M.of_value (| + Value.Tuple [] + |))) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -2742,11 +2840,15 @@ Module raw_vec. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))) ] |))) @@ -2791,7 +2893,7 @@ Module raw_vec. memory.map_err(|_| AllocError { layout: new_layout, non_exhaustive: () }.into()) } *) - Definition finish_grow (τ : list Ty.t) (α : list Value.t) : M := + Definition finish_grow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A ], [ new_layout; current_memory; alloc ] => ltac:(M.monadic @@ -2837,8 +2939,8 @@ Module raw_vec. |), [ M.read (| new_layout |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2847,13 +2949,16 @@ Module raw_vec. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [])) + (M.of_value (| + Value.StructTuple + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + [] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -3001,7 +3106,7 @@ Module raw_vec. let memory := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3018,11 +3123,12 @@ Module raw_vec. let old_layout := M.copy (| γ1_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -3031,29 +3137,33 @@ Module raw_vec. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "align", - [] - |), - [ old_layout ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "align", - [] - |), - [ new_layout ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "align", + [] + |), + [ old_layout ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "align", + [] + |), + [ new_layout ] + |) + |)) + ] + |) |), [ fun γ => @@ -3064,19 +3174,19 @@ Module raw_vec. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| - M.read (| right_val |) - |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3088,9 +3198,11 @@ Module raw_vec. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -3103,9 +3215,11 @@ Module raw_vec. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -3113,13 +3227,17 @@ Module raw_vec. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -3127,23 +3245,24 @@ Module raw_vec. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "align", [] |), [ old_layout ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "align", [] |), [ new_layout ] - |)) + |) + |) ] |) |) in @@ -3196,8 +3315,8 @@ Module raw_vec. |), [ M.read (| memory |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3215,18 +3334,22 @@ Module raw_vec. [] |), [ - Value.StructRecord - "alloc::collections::TryReserveErrorKind::AllocError" - [ - ("layout", M.read (| new_layout |)); - ("non_exhaustive", Value.Tuple []) - ] + M.of_value (| + Value.StructRecord + "alloc::collections::TryReserveErrorKind::AllocError" + [ + ("layout", A.to_value (M.read (| new_layout |))); + ("non_exhaustive", + A.to_value (M.of_value (| Value.Tuple [] |))) + ] + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -3245,7 +3368,7 @@ Module raw_vec. } } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3253,7 +3376,7 @@ Module raw_vec. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3292,7 +3415,7 @@ Module raw_vec. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3317,7 +3440,7 @@ Module raw_vec. } } *) - Definition handle_reserve (τ : list Ty.t) (α : list Value.t) : M := + Definition handle_reserve (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -3340,8 +3463,8 @@ Module raw_vec. |), [ M.read (| result |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3362,7 +3485,8 @@ Module raw_vec. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -3402,7 +3526,7 @@ Module raw_vec. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3418,14 +3542,14 @@ Module raw_vec. } } *) - Definition alloc_guard (τ : list Ty.t) (α : list Value.t) : M := + Definition alloc_guard (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ alloc_size ] => ltac:(M.monadic (let alloc_size := M.alloc (| alloc_size |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3433,39 +3557,52 @@ Module raw_vec. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 64), + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 64 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| alloc_size |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))))) + (BinOp.Pure.gt (| + M.read (| alloc_size |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "alloc::collections::TryReserveErrorKind", - [ Ty.path "alloc::collections::TryReserveError" ], - "into", - [] - |), - [ - Value.StructTuple - "alloc::collections::TryReserveErrorKind::CapacityOverflow" - [] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "alloc::collections::TryReserveErrorKind", + [ Ty.path "alloc::collections::TryReserveError" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + [] + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |))) + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |))) ] |) |))) @@ -3477,7 +3614,7 @@ Module raw_vec. panic!("capacity overflow"); } *) - Definition capacity_overflow (τ : list Ty.t) (α : list Value.t) : M := + Definition capacity_overflow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -3488,8 +3625,17 @@ Module raw_vec. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "capacity overflow" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "capacity overflow" |) |)) + ] + |) + |) + |) ] |) ] diff --git a/CoqOfRust/alloc/rc.v b/CoqOfRust/alloc/rc.v index 03e69d251..a8a600d1b 100644 --- a/CoqOfRust/alloc/rc.v +++ b/CoqOfRust/alloc/rc.v @@ -23,7 +23,7 @@ Module rc. Layout::new::>().extend(layout).unwrap().0.pad_to_align() } *) - Definition rcbox_layout_for_value_layout (τ : list Ty.t) (α : list Value.t) : M := + Definition rcbox_layout_for_value_layout (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ layout ] => ltac:(M.monadic @@ -176,7 +176,7 @@ Module rc. unsafe { Self::from_inner_in(ptr, Global) } } *) - Definition from_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -188,7 +188,7 @@ Module rc. "from_inner_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -202,7 +202,7 @@ Module rc. unsafe { Self::from_inner(NonNull::new_unchecked(ptr)) } } *) - Definition from_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -247,7 +247,7 @@ Module rc. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => @@ -297,29 +297,33 @@ Module rc. [] |), [ - Value.StructRecord - "alloc::rc::RcBox" - [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("value", M.read (| value |)) - ] + M.of_value (| + Value.StructRecord + "alloc::rc::RcBox" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("value", A.to_value (M.read (| value |))) + ] + |) ] |) ] @@ -376,7 +380,7 @@ Module rc. strong } *) - Definition new_cyclic (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_cyclic (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ data_fn ] => @@ -437,39 +441,44 @@ Module rc. [] |), [ - Value.StructRecord - "alloc::rc::RcBox" - [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 0 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("value", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ], - "uninit", - [] - |), - [] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::rc::RcBox" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 0 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("value", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ], + "uninit", + [] + |), + [] + |))) + ] + |) ] |) ] @@ -496,12 +505,15 @@ Module rc. |) in let weak := M.alloc (| - Value.StructRecord - "alloc::rc::Weak" - [ - ("ptr", M.read (| init_ptr |)); - ("alloc", Value.StructTuple "alloc::alloc::Global" []) - ] + M.of_value (| + Value.StructRecord + "alloc::rc::Weak" + [ + ("ptr", A.to_value (M.read (| init_ptr |))); + ("alloc", + A.to_value (M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |))) + ] + |) |) in let data := M.alloc (| @@ -524,7 +536,7 @@ Module rc. "call_once", [] |), - [ M.read (| data_fn |); Value.Tuple [ weak ] ] + [ M.read (| data_fn |); M.of_value (| Value.Tuple [ A.to_value weak ] |) ] |) |) in let strong := @@ -575,18 +587,23 @@ Module rc. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ prev_value; M.alloc (| Value.Integer Integer.Usize 0 |) ] + M.of_value (| + Value.Tuple + [ + A.to_value prev_value; + A.to_value (M.alloc (| M.of_value (| Value.Integer 0 |) |)) + ] + |) |), [ fun γ => @@ -596,17 +613,19 @@ Module rc. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -618,9 +637,11 @@ Module rc. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -632,43 +653,54 @@ Module rc. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::Arguments", - "new_const", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "No prior strong references should exist" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "No prior strong references should exist" + |) + |)) + ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -685,7 +717,7 @@ Module rc. "alloc::rc::RcBox", "strong" |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -730,7 +762,7 @@ Module rc. } } *) - Definition new_uninit (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -787,8 +819,8 @@ Module rc. |), [] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -807,14 +839,17 @@ Module rc. [] |), [ - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |); M.read (| layout |) ] |))) ] |) | _ => M.impossible (||) - end)); + end) + |); M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "cast", @@ -846,7 +881,7 @@ Module rc. } } *) - Definition new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -903,8 +938,8 @@ Module rc. |), [] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -923,14 +958,17 @@ Module rc. [] |), [ - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |); M.read (| layout |) ] |))) ] |) | _ => M.impossible (||) - end)); + end) + |); M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "cast", @@ -965,7 +1003,7 @@ Module rc. } } *) - Definition try_new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => @@ -973,169 +1011,178 @@ Module rc. (let value := M.alloc (| value |) in M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::rc::Rc") [ T; Ty.path "alloc::alloc::Global" ], - "from_inner", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.apply (Ty.path "&mut") [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] - ], - "into", + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::rc::Rc") [ T; Ty.path "alloc::alloc::Global" ], + "from_inner", [] |), [ M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::convert::Into", Ty.apply - (Ty.path "alloc::boxed::Box") - [ - Ty.apply (Ty.path "alloc::rc::RcBox") [ T ]; - Ty.path "alloc::alloc::Global" - ], - "leak", + (Ty.path "&mut") + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] + ], + "into", [] |), [ - M.read (| - 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.apply - (Ty.path "alloc::boxed::Box") - [ - Ty.apply (Ty.path "alloc::rc::RcBox") [ T ]; - Ty.path "alloc::alloc::Global" - ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "alloc::rc::RcBox") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "leak", + [] + |), + [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "alloc::boxed::Box") + (Ty.path "core::result::Result") [ - Ty.apply (Ty.path "alloc::rc::RcBox") [ T ]; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "alloc::rc::RcBox") [ T ]; + Ty.path "alloc::alloc::Global" + ]; + Ty.path "core::alloc::AllocError" ], - "try_new", + [], + "branch", [] |), [ - Value.StructRecord - "alloc::rc::RcBox" + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "alloc::rc::RcBox") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "try_new", + [] + |), [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::cell::Cell") - [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::cell::Cell") - [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("value", M.read (| value |)) + M.of_value (| + Value.StructRecord + "alloc::rc::RcBox" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::Cell") + [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::Cell") + [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("value", A.to_value (M.read (| value |))) + ] + |) ] + |) ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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 "alloc::rc::Rc") - [ T; Ty.path "alloc::alloc::Global" ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "alloc::rc::Rc") + [ T; Ty.path "alloc::alloc::Global" ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) + |))); + 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)) + ] + |) + |) + ] |) ] |) ] - |) - ] - |) - ])) + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -1155,80 +1202,40 @@ Module rc. } } *) - Definition try_new_uninit (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_uninit (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic (M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "from_ptr", + [] + |), [ - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; - Ty.path "alloc::alloc::Global" - ], - "from_ptr", - [] - |), - [ - M.read (| - 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.apply - (Ty.path "*mut") - [ - Ty.apply - (Ty.path "alloc::rc::RcBox") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ] - ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "alloc::rc::Rc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ], - "try_allocate_for_layout", - [ - Ty.function - [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] - (Ty.apply - (Ty.path "core::result::Result") - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; - Ty.path "core::alloc::AllocError" - ]); - Ty.function - [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] - (Ty.apply (Ty.path "*mut") [ Ty.apply @@ -1238,132 +1245,179 @@ Module rc. (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - ]) - ] + ]; + Ty.path "core::alloc::AllocError" + ], + [], + "branch", + [] |), [ M.call_closure (| M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "new", - [ T ] - |), - [] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let layout := M.copy (| γ |) in - M.call_closure (| - M.get_trait_method (| - "core::alloc::Allocator", - Ty.path "alloc::alloc::Global", - [], - "allocate", - [] - |), - [ - M.alloc (| - Value.StructTuple - "alloc::alloc::Global" - [] - |); - M.read (| layout |) - ] - |))) - ] - |) - | _ => M.impossible (||) - end)); - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], - "cast", - [ Ty.apply - (Ty.path "alloc::rc::RcBox") + (Ty.path "alloc::rc::Rc") [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] + [ T ]; + Ty.path "alloc::alloc::Global" + ], + "try_allocate_for_layout", + [ + Ty.function + [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] + (Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; + Ty.path "core::alloc::AllocError" + ]); + Ty.function + [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] + (Ty.apply + (Ty.path "*mut") + [ + Ty.apply + (Ty.path "alloc::rc::RcBox") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "new", + [ T ] + |), + [] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let layout := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::alloc::Allocator", + Ty.path "alloc::alloc::Global", + [], + "allocate", + [] + |), + [ + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::alloc::Global" + [] + |) + |); + M.read (| layout |) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |); + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], + "cast", + [ + Ty.apply + (Ty.path "alloc::rc::RcBox") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] ] + |) ] |) ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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 "alloc::rc::Rc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::rc::Rc") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ]; + Ty.path "alloc::alloc::Global" + ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) - |) - ] - |) - ])) + |))); + 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)) + ] + |) + |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -1383,80 +1437,40 @@ Module rc. } } *) - Definition try_new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic (M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "from_ptr", + [] + |), [ - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; - Ty.path "alloc::alloc::Global" - ], - "from_ptr", - [] - |), - [ - M.read (| - 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.apply - (Ty.path "*mut") - [ - Ty.apply - (Ty.path "alloc::rc::RcBox") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ] - ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "alloc::rc::Rc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ], - "try_allocate_for_layout", - [ - Ty.function - [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] - (Ty.apply - (Ty.path "core::result::Result") - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; - Ty.path "core::alloc::AllocError" - ]); - Ty.function - [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] - (Ty.apply (Ty.path "*mut") [ Ty.apply @@ -1466,132 +1480,179 @@ Module rc. (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - ]) - ] + ]; + Ty.path "core::alloc::AllocError" + ], + [], + "branch", + [] |), [ M.call_closure (| M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "new", - [ T ] - |), - [] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let layout := M.copy (| γ |) in - M.call_closure (| - M.get_trait_method (| - "core::alloc::Allocator", - Ty.path "alloc::alloc::Global", - [], - "allocate_zeroed", - [] - |), - [ - M.alloc (| - Value.StructTuple - "alloc::alloc::Global" - [] - |); - M.read (| layout |) - ] - |))) - ] - |) - | _ => M.impossible (||) - end)); - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], - "cast", - [ Ty.apply - (Ty.path "alloc::rc::RcBox") + (Ty.path "alloc::rc::Rc") [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ] - ] - |) - ] - |) - ] - |) - |), - [ - 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 + [ T ]; + Ty.path "alloc::alloc::Global" + ], + "try_allocate_for_layout", + [ + Ty.function + [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] + (Ty.apply (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "alloc::rc::Rc") + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; + Ty.path "core::alloc::AllocError" + ]); + Ty.function + [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] + (Ty.apply + (Ty.path "*mut") + [ + Ty.apply + (Ty.path "alloc::rc::RcBox") [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") - [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] + [ T ] + ] + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "new", + [ T ] |), - [ M.read (| residual |) ] + [] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let layout := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::alloc::Allocator", + Ty.path "alloc::alloc::Global", + [], + "allocate_zeroed", + [] + |), + [ + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::alloc::Global" + [] + |) + |); + M.read (| layout |) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |); + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], + "cast", + [ + Ty.apply + (Ty.path "alloc::rc::RcBox") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] + ] |) - |) + ] |) - |) - |))); - 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)) - ] - |) - |) - ] - |) - ])) + ] + |) + |), + [ + 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") + [ + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ]; + Ty.path "alloc::alloc::Global" + ]; + Ty.path "core::alloc::AllocError" + ], + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) + ] + |) + |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -1605,7 +1666,7 @@ Module rc. unsafe { Pin::new_unchecked(Rc::new(value)) } } *) - Definition pin (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pin (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => @@ -1639,7 +1700,7 @@ Module rc. unsafe { Self::from_raw_in(ptr, Global) } } *) - Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -1651,7 +1712,7 @@ Module rc. "from_raw_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -1665,7 +1726,7 @@ Module rc. unsafe { Self::increment_strong_count_in(ptr, Global) } } *) - Definition increment_strong_count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition increment_strong_count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -1677,7 +1738,7 @@ Module rc. "increment_strong_count_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -1691,7 +1752,7 @@ Module rc. unsafe { Self::decrement_strong_count_in(ptr, Global) } } *) - Definition decrement_strong_count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition decrement_strong_count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -1703,7 +1764,7 @@ Module rc. "decrement_strong_count_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -1724,7 +1785,7 @@ Module rc. } } *) - Definition allocate_for_layout (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_for_layout (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ @@ -1772,8 +1833,8 @@ Module rc. |), [ M.read (| value_layout |); M.read (| allocate |); M.read (| mem_to_rcbox |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1791,7 +1852,8 @@ Module rc. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -1826,7 +1888,7 @@ Module rc. Ok(inner) } *) - Definition try_allocate_for_layout (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_allocate_for_layout (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ @@ -1876,7 +1938,10 @@ Module rc. "call_once", [] |), - [ M.read (| allocate |); Value.Tuple [ M.read (| layout |) ] ] + [ + M.read (| allocate |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| layout |)) ] |) + ] |) ] |) @@ -1948,58 +2013,66 @@ Module rc. |), [ M.read (| mem_to_rcbox |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], - "as_ptr", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - "as_non_null_ptr", + [ Ty.path "u8" ], + "as_ptr", [] |), - [ M.read (| ptr |) ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "as_non_null_ptr", + [] + |), + [ M.read (| ptr |) ] + |) + ] + |)) + ] + |) ] |) |) in let _ := let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "for_value", - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] - |), - [ M.read (| inner |) ] - |) - |); - layout - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "for_value", + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] + |), + [ M.read (| inner |) ] + |) + |)); + A.to_value layout + ] + |) |), [ fun γ => @@ -2009,15 +2082,15 @@ Module rc. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.path "core::alloc::layout::Layout", @@ -2029,7 +2102,8 @@ Module rc. M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2041,9 +2115,11 @@ Module rc. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -2058,22 +2134,26 @@ Module rc. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2095,7 +2175,7 @@ Module rc. "new", [] |), - [ Value.Integer Integer.Usize 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -2119,13 +2199,17 @@ Module rc. "new", [] |), - [ Value.Integer Integer.Usize 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| inner |) ] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| inner |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2146,7 +2230,7 @@ Module rc. unsafe { self.ptr.as_ref() } } *) - Definition inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2174,20 +2258,23 @@ Module rc. Self { ptr, phantom: PhantomData, alloc } } *) - Definition from_inner_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_inner_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => ltac:(M.monadic (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::rc::Rc" - [ - ("ptr", M.read (| ptr |)); - ("phantom", Value.StructTuple "core::marker::PhantomData" []); - ("alloc", M.read (| alloc |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::rc::Rc" + [ + ("ptr", A.to_value (M.read (| ptr |))); + ("phantom", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |))) | _, _ => M.impossible end. @@ -2200,7 +2287,7 @@ Module rc. unsafe { Self::from_inner_in(NonNull::new_unchecked(ptr), alloc) } } *) - Definition from_ptr_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -2238,7 +2325,7 @@ Module rc. &this.alloc } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -2262,7 +2349,7 @@ Module rc. } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ value; alloc ] => @@ -2333,7 +2420,7 @@ Module rc. } } *) - Definition new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -2388,8 +2475,8 @@ Module rc. |), [] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2412,7 +2499,8 @@ Module rc. ] |) | _ => M.impossible (||) - end)); + end) + |); M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "cast", @@ -2448,7 +2536,7 @@ Module rc. } } *) - Definition new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -2503,8 +2591,8 @@ Module rc. |), [] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2527,7 +2615,8 @@ Module rc. ] |) | _ => M.impossible (||) - end)); + end) + |); M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "cast", @@ -2562,7 +2651,7 @@ Module rc. Ok(unsafe { Self::from_inner_in(ptr.into(), alloc) }) } *) - Definition try_new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ value; alloc ] => @@ -2611,33 +2700,37 @@ Module rc. [] |), [ - Value.StructRecord - "alloc::rc::RcBox" - [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::cell::Cell") - [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::cell::Cell") - [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("value", M.read (| value |)) - ]; + M.of_value (| + Value.StructRecord + "alloc::rc::RcBox" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::Cell") + [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::Cell") + [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("value", A.to_value (M.read (| value |))) + ] + |); M.read (| alloc |) ] |) @@ -2708,36 +2801,39 @@ Module rc. let ptr := M.copy (| γ0_0 |) in let alloc := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], - "from_inner_in", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.apply - (Ty.path "core::ptr::unique::Unique") - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] - ], - "into", + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], + "from_inner_in", [] |), - [ M.read (| ptr |) ] - |); - M.read (| alloc |) - ] - |) - ] + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply + (Ty.path "core::ptr::unique::Unique") + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] + ], + "into", + [] + |), + [ M.read (| ptr |) ] + |); + M.read (| alloc |) + ] + |)) + ] + |) |))) ] |) @@ -2764,7 +2860,7 @@ Module rc. } } *) - Definition try_new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -2772,70 +2868,30 @@ Module rc. (let alloc := M.alloc (| alloc |) in M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], - "from_ptr_in", - [] - |), - [ - M.read (| - 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.apply - (Ty.path "*mut") - [ - Ty.apply - (Ty.path "alloc::rc::RcBox") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ] - ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], + "from_ptr_in", + [] + |), + [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "alloc::rc::Rc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ], - "try_allocate_for_layout", - [ - Ty.function - [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] - (Ty.apply - (Ty.path "core::result::Result") - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; - Ty.path "core::alloc::AllocError" - ]); - Ty.function - [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] - (Ty.apply (Ty.path "*mut") [ Ty.apply @@ -2845,126 +2901,171 @@ Module rc. (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - ]) - ] + ]; + Ty.path "core::alloc::AllocError" + ], + [], + "branch", + [] |), [ M.call_closure (| M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "new", - [ T ] - |), - [] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let layout := M.copy (| γ |) in - M.call_closure (| - M.get_trait_method (| - "core::alloc::Allocator", - A, - [], - "allocate", - [] - |), - [ alloc; M.read (| layout |) ] - |))) - ] - |) - | _ => M.impossible (||) - end)); - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], - "cast", - [ Ty.apply - (Ty.path "alloc::rc::RcBox") + (Ty.path "alloc::rc::Rc") [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] + [ T ]; + Ty.path "alloc::alloc::Global" + ], + "try_allocate_for_layout", + [ + Ty.function + [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] + (Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; + Ty.path "core::alloc::AllocError" + ]); + Ty.function + [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] + (Ty.apply + (Ty.path "*mut") + [ + Ty.apply + (Ty.path "alloc::rc::RcBox") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "new", + [ T ] + |), + [] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let layout := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::alloc::Allocator", + A, + [], + "allocate", + [] + |), + [ alloc; M.read (| layout |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |); + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], + "cast", + [ + Ty.apply + (Ty.path "alloc::rc::RcBox") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] ] + |) ] |) ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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 "alloc::rc::Rc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - A - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::rc::Rc") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ]; + A + ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) - |); - M.read (| alloc |) - ] - |) - ])) + |))); + 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)) + ] + |) + |); + M.read (| alloc |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -2987,7 +3088,7 @@ Module rc. } } *) - Definition try_new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -2995,71 +3096,123 @@ Module rc. (let alloc := M.alloc (| alloc |) in M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], - "from_ptr_in", - [] - |), - [ - M.read (| - M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::Try", - Ty.apply - (Ty.path "core::result::Result") - [ + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], + "from_ptr_in", + [] + |), + [ + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "*mut") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "alloc::rc::RcBox") + (Ty.path "*mut") [ Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ] - ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" + (Ty.path "alloc::rc::RcBox") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] + ]; + Ty.path "core::alloc::AllocError" ], - "try_allocate_for_layout", - [ - Ty.function - [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] - (Ty.apply - (Ty.path "core::result::Result") + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") [ Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; - Ty.path "core::alloc::AllocError" - ]); - Ty.function - [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] - (Ty.apply - (Ty.path "*mut") + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ]; + Ty.path "alloc::alloc::Global" + ], + "try_allocate_for_layout", + [ + Ty.function + [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] + (Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; + Ty.path "core::alloc::AllocError" + ]); + Ty.function + [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] + (Ty.apply + (Ty.path "*mut") + [ + Ty.apply + (Ty.path "alloc::rc::RcBox") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "new", + [ T ] + |), + [] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let layout := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::alloc::Allocator", + A, + [], + "allocate_zeroed", + [] + |), + [ alloc; M.read (| layout |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |); + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], + "cast", [ Ty.apply (Ty.path "alloc::rc::RcBox") @@ -3068,126 +3221,79 @@ Module rc. (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - ]) - ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "new", - [ T ] - |), - [] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let layout := M.copy (| γ |) in - M.call_closure (| - M.get_trait_method (| - "core::alloc::Allocator", - A, - [], - "allocate_zeroed", - [] - |), - [ alloc; M.read (| layout |) ] - |))) - ] - |) - | _ => M.impossible (||) - end)); - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], - "cast", - [ - Ty.apply - (Ty.path "alloc::rc::RcBox") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] ] + |) ] |) ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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 "alloc::rc::Rc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - A - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::rc::Rc") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ]; + A + ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) - |); - M.read (| alloc |) - ] - |) - ])) + |))); + 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)) + ] + |) + |); + M.read (| alloc |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -3201,7 +3307,7 @@ Module rc. unsafe { Pin::new_unchecked(Rc::new_in(value, alloc)) } } *) - Definition pin_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pin_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ value; alloc ] => @@ -3253,7 +3359,7 @@ Module rc. } } *) - Definition try_unwrap (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_unwrap (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3261,23 +3367,24 @@ Module rc. (let this := M.alloc (| this |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], "strong_count", [] |), [ this ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let val := @@ -3335,19 +3442,22 @@ Module rc. |) in let _weak := M.alloc (| - Value.StructRecord - "alloc::rc::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - this, - "alloc::rc::Rc", - "ptr" - |) - |)); - ("alloc", M.read (| alloc |)) - ] + M.of_value (| + Value.StructRecord + "alloc::rc::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + this, + "alloc::rc::Rc", + "ptr" + |) + |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |) |) in let _ := M.alloc (| @@ -3360,12 +3470,20 @@ Module rc. |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| this |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| this |)) ] + |) |))) ] |) @@ -3382,7 +3500,7 @@ Module rc. Rc::try_unwrap(this).ok() } *) - Definition into_inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3420,7 +3538,7 @@ Module rc. ptr } *) - Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3467,7 +3585,7 @@ Module rc. unsafe { ptr::addr_of_mut!(( *ptr).value) } } *) - Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3497,12 +3615,13 @@ Module rc. |) in M.alloc (| (* MutToConstPointer *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| ptr |), "alloc::rc::RcBox", "value" - |)) + |) + |) |) |))) | _, _ => M.impossible @@ -3522,7 +3641,7 @@ Module rc. unsafe { Self::from_ptr_in(rc_ptr, alloc) } } *) - Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -3539,15 +3658,16 @@ Module rc. |) in let rc_ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "byte_sub", [] |), [ M.read (| ptr |); M.read (| offset |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -3578,7 +3698,7 @@ Module rc. Weak { ptr: this.ptr, alloc: this.alloc.clone() } } *) - Definition downgrade (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downgrade (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3609,24 +3729,24 @@ Module rc. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "alloc::rc::is_dangling", [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] @@ -3651,7 +3771,9 @@ Module rc. ] |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3664,44 +3786,51 @@ Module rc. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: !is_dangling(this.ptr.as_ptr())" + M.of_value (| + Value.String + "assertion failed: !is_dangling(this.ptr.as_ptr())" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "alloc::rc::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| this |), - "alloc::rc::Rc", - "ptr" - |) - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| this |), - "alloc::rc::Rc", - "alloc" - |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::rc::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| this |), + "alloc::rc::Rc", + "ptr" + |) + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| this |), + "alloc::rc::Rc", + "alloc" + |) + ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3716,13 +3845,14 @@ Module rc. this.inner().weak() - 1 } *) - Definition weak_count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition weak_count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", @@ -3742,7 +3872,7 @@ Module rc. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |))) | _, _ => M.impossible end. @@ -3756,7 +3886,7 @@ Module rc. this.inner().strong() } *) - Definition strong_count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strong_count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3799,7 +3929,7 @@ Module rc. let _rc_clone: mem::ManuallyDrop<_> = rc.clone(); } *) - Definition increment_strong_count_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition increment_strong_count_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -3844,7 +3974,7 @@ Module rc. [ rc ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3858,7 +3988,7 @@ Module rc. unsafe { drop(Rc::from_raw_in(ptr, alloc)) }; } *) - Definition decrement_strong_count_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition decrement_strong_count_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -3885,7 +4015,7 @@ Module rc. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3899,34 +4029,36 @@ Module rc. Rc::weak_count(this) == 0 && Rc::strong_count(this) == 1 } *) - Definition is_unique (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_unique (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in LogicalOp.and (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], "weak_count", [] |), [ M.read (| this |) ] - |)) - (Value.Integer Integer.Usize 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.call_closure (| + (BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], "strong_count", [] |), [ M.read (| this |) ] - |)) - (Value.Integer Integer.Usize 1))) + |), + M.of_value (| Value.Integer 1 |) + |))) |))) | _, _ => M.impossible end. @@ -3940,7 +4072,7 @@ Module rc. if Rc::is_unique(this) { unsafe { Some(Rc::get_mut_unchecked(this)) } } else { None } } *) - Definition get_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3948,7 +4080,7 @@ Module rc. (let this := M.alloc (| this |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3966,21 +4098,27 @@ Module rc. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], - "get_mut_unchecked", - [] - |), - [ M.read (| this |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], + "get_mut_unchecked", + [] + |), + [ M.read (| this |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3998,7 +4136,7 @@ Module rc. unsafe { &mut ( *this.ptr.as_ptr()).value } } *) - Definition get_mut_unchecked (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_unchecked (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -4038,7 +4176,7 @@ Module rc. ptr::addr_eq(this.ptr.as_ptr(), other.ptr.as_ptr()) } *) - Definition ptr_eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ptr_eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this; other ] => @@ -4055,8 +4193,8 @@ Module rc. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -4073,10 +4211,11 @@ Module rc. |) |) ] - |)); + |) + |); (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -4093,7 +4232,8 @@ Module rc. |) |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -4135,7 +4275,7 @@ Module rc. unsafe { &mut this.ptr.as_mut().value } } *) - Definition make_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition make_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -4144,23 +4284,24 @@ Module rc. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], "strong_count", [] |), [ M.read (| this |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let rc := @@ -4246,27 +4387,28 @@ Module rc. [ M.read (| rc |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], "weak_count", [] |), [ M.read (| this |) ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4348,7 +4490,7 @@ Module rc. |), [ M.read (| this |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -4423,8 +4565,8 @@ Module rc. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -4464,7 +4606,7 @@ Module rc. Rc::try_unwrap(this).unwrap_or_else(|rc| ( *rc).clone()) } *) - Definition unwrap_or_clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or_clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -4487,8 +4629,8 @@ Module rc. |), [ M.read (| this |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4516,7 +4658,8 @@ Module rc. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4537,7 +4680,7 @@ Module rc. } } *) - Definition allocate_for_ptr_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_for_ptr_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -4573,8 +4716,8 @@ Module rc. |), [ M.read (| ptr |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4597,9 +4740,10 @@ Module rc. ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4615,12 +4759,13 @@ Module rc. "with_metadata_of", [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] |), - [ M.read (| mem |); M.rust_cast (M.read (| ptr |)) ] + [ M.read (| mem |); M.rust_cast (| M.read (| ptr |) |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4652,7 +4797,7 @@ Module rc. } } *) - Definition from_box_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_box_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ src ] => @@ -4692,9 +4837,9 @@ Module rc. M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ Ty.path "u8" ] |), [ - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| src |) |)) |)); - M.rust_cast - (M.read (| + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| src |) |)) |) |); + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -4703,7 +4848,8 @@ Module rc. "value" |) |)) - |)); + |) + |); M.read (| value_size |) ] |) @@ -4739,7 +4885,7 @@ Module rc. "from_raw", [] |), - [ M.rust_cast (M.read (| bptr |)) ] + [ M.rust_cast (| M.read (| bptr |) |) ] |) |) in let _ := @@ -4793,7 +4939,7 @@ Module rc. unsafe { Rc::from_ptr(Rc::allocate_for_slice(len)) } } *) - Definition new_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -4851,7 +4997,7 @@ Module rc. } } *) - Definition new_zeroed_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -4931,8 +5077,8 @@ Module rc. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4951,16 +5097,19 @@ Module rc. [] |), [ - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |); M.read (| layout |) ] |))) ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4970,8 +5119,8 @@ Module rc. fun γ => ltac:(M.monadic (let mem := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] @@ -4987,11 +5136,13 @@ Module rc. |); M.read (| len |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -5013,7 +5164,7 @@ Module rc. } } *) - Definition allocate_for_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_for_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -5066,8 +5217,8 @@ Module rc. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5086,16 +5237,19 @@ Module rc. [] |), [ - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |); M.read (| layout |) ] |))) ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5105,8 +5259,8 @@ Module rc. fun γ => ltac:(M.monadic (let mem := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), [ M.call_closure (| @@ -5119,11 +5273,13 @@ Module rc. |); M.read (| len |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5142,7 +5298,7 @@ Module rc. } } *) - Definition copy_from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => @@ -5180,8 +5336,8 @@ Module rc. |), [ M.read (| v |) ] |); - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -5190,7 +5346,8 @@ Module rc. "value" |) |)) - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] @@ -5264,7 +5421,7 @@ Module rc. } } *) - Definition from_iter_exact (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter_exact (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ impl_Iterator_Item___T_ ], [ iter; len ] => @@ -5285,7 +5442,7 @@ Module rc. [ M.read (| len |) ] |) |) in - let mem := M.alloc (| M.rust_cast (M.rust_cast (M.read (| ptr |))) |) in + let mem := M.alloc (| M.rust_cast (| M.rust_cast (| M.read (| ptr |) |) |) |) in let layout := M.alloc (| M.call_closure (| @@ -5299,8 +5456,8 @@ Module rc. |) in let elems := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -5309,26 +5466,30 @@ Module rc. "value" |) |)) - |)) + |) + |) |) in let guard := M.alloc (| - Value.StructRecord - "alloc::rc::from_iter_exact::Guard" - [ - ("mem", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], - "new_unchecked", - [] - |), - [ M.read (| mem |) ] - |)); - ("elems", M.read (| elems |)); - ("layout", M.read (| layout |)); - ("n_elems", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "alloc::rc::from_iter_exact::Guard" + [ + ("mem", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], + "new_unchecked", + [] + |), + [ M.read (| mem |) ] + |))); + ("elems", A.to_value (M.read (| elems |))); + ("layout", A.to_value (M.read (| layout |))); + ("n_elems", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let _ := M.use @@ -5425,14 +5586,15 @@ Module rc. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -5476,7 +5638,7 @@ Module rc. unsafe { Rc::from_ptr_in(Rc::allocate_for_slice_in(len, &alloc), alloc) } } *) - Definition new_uninit_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ len; alloc ] => @@ -5539,7 +5701,7 @@ Module rc. } } *) - Definition new_zeroed_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ len; alloc ] => @@ -5620,8 +5782,8 @@ Module rc. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5644,9 +5806,10 @@ Module rc. ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5656,8 +5819,8 @@ Module rc. fun γ => ltac:(M.monadic (let mem := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] @@ -5673,11 +5836,13 @@ Module rc. |); M.read (| len |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.read (| alloc |) @@ -5700,7 +5865,7 @@ Module rc. } } *) - Definition allocate_for_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_for_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ len; alloc ] => @@ -5754,8 +5919,8 @@ Module rc. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5778,9 +5943,10 @@ Module rc. ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5790,8 +5956,8 @@ Module rc. fun γ => ltac:(M.monadic (let mem := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), [ M.call_closure (| @@ -5804,11 +5970,13 @@ Module rc. |); M.read (| len |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5834,7 +6002,7 @@ Module rc. unsafe { Rc::from_inner_in(md_self.ptr.cast(), md_self.alloc.clone()) } } *) - Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5968,7 +6136,7 @@ Module rc. unsafe { Rc::from_ptr_in(md_self.ptr.as_ptr() as _, md_self.alloc.clone()) } } *) - Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6005,8 +6173,8 @@ Module rc. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -6056,7 +6224,8 @@ Module rc. |) |) ] - |)); + |) + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), [ @@ -6124,7 +6293,7 @@ Module rc. } } *) - Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -6132,7 +6301,7 @@ Module rc. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6215,25 +6384,30 @@ Module rc. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], - "from_inner_in", - [] - |), - [ M.read (| ptr |); M.read (| alloc |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], + "from_inner_in", + [] + |), + [ M.read (| ptr |); M.read (| alloc |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (* Unsize *) (M.pointer_coercion (| M.read (| self |) |)) ] + |) |))) ] |) @@ -6255,7 +6429,7 @@ Module rc. } } *) - Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -6341,7 +6515,7 @@ Module rc. unsafe { Self::from_iter_exact(v.iter().cloned(), v.len()) } } *) - Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => @@ -6404,7 +6578,7 @@ Module rc. unsafe { Rc::copy_from_slice(v) } } *) - Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => @@ -6443,7 +6617,7 @@ Module rc. &self.inner().value } *) - Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6509,7 +6683,7 @@ Module rc. } } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6539,15 +6713,15 @@ Module rc. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Ty.apply (Ty.path "alloc::rc::RcBox") [ T ], @@ -6565,8 +6739,9 @@ Module rc. [ M.read (| self |) ] |) ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -6608,15 +6783,15 @@ Module rc. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Ty.apply (Ty.path "alloc::rc::RcBox") [ T ], @@ -6634,8 +6809,9 @@ Module rc. [ M.read (| self |) ] |) ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6701,11 +6877,11 @@ Module rc. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -6732,7 +6908,7 @@ Module rc. } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6811,7 +6987,7 @@ Module rc. Rc::new(Default::default()) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -6852,7 +7028,7 @@ Module rc. **self == **other } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -6892,7 +7068,7 @@ Module rc. **self != **other } *) - Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -6960,7 +7136,7 @@ Module rc. Rc::ptr_eq(self, other) || **self == **other } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7011,7 +7187,7 @@ Module rc. !Rc::ptr_eq(self, other) && **self != **other } *) - Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7019,15 +7195,16 @@ Module rc. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], "ptr_eq", [] |), [ M.read (| self |); M.read (| other |) ] - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", T, [ T ], "ne", [] |), @@ -7076,7 +7253,7 @@ Module rc. RcEqIdent::eq(self, other) } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7101,7 +7278,7 @@ Module rc. RcEqIdent::ne(self, other) } *) - Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7151,7 +7328,7 @@ Module rc. ( **self).partial_cmp(&**other) } *) - Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7191,7 +7368,7 @@ Module rc. **self < **other } *) - Definition lt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7231,7 +7408,7 @@ Module rc. **self <= **other } *) - Definition le (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7271,7 +7448,7 @@ Module rc. **self > **other } *) - Definition gt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7311,7 +7488,7 @@ Module rc. **self >= **other } *) - Definition ge (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7370,7 +7547,7 @@ Module rc. ( **self).cmp(&**other) } *) - Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7422,7 +7599,7 @@ Module rc. ( **self).hash(state); } *) - Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ H ], [ self; state ] => @@ -7449,7 +7626,7 @@ Module rc. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7471,7 +7648,7 @@ Module rc. fmt::Display::fmt(&**self, f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -7514,7 +7691,7 @@ Module rc. fmt::Debug::fmt(&**self, f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -7557,7 +7734,7 @@ Module rc. fmt::Pointer::fmt(&(&**self as *const T), f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -7610,7 +7787,7 @@ Module rc. Rc::new(t) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -7647,15 +7824,15 @@ Module rc. Rc::<[T; N]>::from(v) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.apply @@ -7666,7 +7843,8 @@ Module rc. [] |), [ M.read (| v |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -7690,7 +7868,7 @@ Module rc. >::from_slice(v) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => @@ -7731,7 +7909,7 @@ Module rc. unsafe { Rc::from_raw(Rc::into_raw(rc) as *const str) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -7768,8 +7946,8 @@ Module rc. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") @@ -7781,7 +7959,8 @@ Module rc. [] |), [ M.read (| rc |) ] - |)) + |) + |) ] |) |) @@ -7806,7 +7985,7 @@ Module rc. Rc::from(&v[..]) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -7828,7 +8007,7 @@ Module rc. "index", [] |), - [ v; Value.StructTuple "core::ops::range::RangeFull" [] ] + [ v; M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] |))) @@ -7851,7 +8030,7 @@ Module rc. Rc::from_box_in(v) } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ v ] => @@ -7897,7 +8076,7 @@ Module rc. } } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ v ] => @@ -7944,9 +8123,9 @@ Module rc. M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| vec_ptr |)); - M.rust_cast - (M.read (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| vec_ptr |) |); + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -7955,7 +8134,8 @@ Module rc. "value" |) |)) - |)); + |) + |); M.read (| len |) ] |) @@ -7972,7 +8152,7 @@ Module rc. |), [ M.read (| vec_ptr |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| cap |); alloc ] @@ -8022,7 +8202,7 @@ Module rc. } } *) - Definition from (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ cow ] => @@ -8097,7 +8277,7 @@ Module rc. unsafe { Rc::from_raw(Rc::into_raw(rc) as *const [u8]) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ rc ] => ltac:(M.monadic @@ -8111,8 +8291,8 @@ Module rc. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::rc::Rc") @@ -8121,7 +8301,8 @@ Module rc. [] |), [ M.read (| rc |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -8160,7 +8341,7 @@ Module rc. } } *) - Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ boxed_slice ] => @@ -8168,15 +8349,15 @@ Module rc. (let boxed_slice := M.alloc (| boxed_slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -8199,48 +8380,60 @@ Module rc. [ boxed_slice ] |) ] - |)) - (M.read (| M.get_constant (| "alloc::rc::N" |) |)) + |), + M.read (| M.get_constant (| "alloc::rc::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") - [ Ty.apply (Ty.path "array") [ T ]; Ty.path "alloc::alloc::Global" - ], - "from_raw", - [] - |), - [ - (* MutToConstPointer *) - M.pointer_coercion - (M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") - [ - Ty.apply (Ty.path "slice") [ T ]; - Ty.path "alloc::alloc::Global" - ], - "into_raw", - [] - |), - [ M.read (| boxed_slice |) ] - |))) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.apply (Ty.path "array") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "from_raw", + [] + |), + [ + (* MutToConstPointer *) + M.pointer_coercion (| + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.apply (Ty.path "slice") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "into_raw", + [] + |), + [ M.read (| boxed_slice |) ] + |) + |) + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| boxed_slice |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| boxed_slice |)) ] + |) |))) ] |) @@ -8275,7 +8468,7 @@ Module rc. ToRcSlice::to_rc_slice(iter.into_iter()) } *) - Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ iter ] => @@ -8325,7 +8518,7 @@ Module rc. self.collect::>().into() } *) - Definition to_rc_slice (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_rc_slice (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self ] => @@ -8396,7 +8589,7 @@ Module rc. } } *) - Definition to_rc_slice (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_rc_slice (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self ] => @@ -8424,7 +8617,7 @@ Module rc. let low := M.copy (| γ0_0 |) in let high := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8438,11 +8631,12 @@ Module rc. let high := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -8450,7 +8644,11 @@ Module rc. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ low; high ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value low; A.to_value high ] + |) + |), [ fun γ => ltac:(M.monadic @@ -8461,21 +8659,23 @@ Module rc. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8487,9 +8687,11 @@ Module rc. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -8504,67 +8706,84 @@ Module rc. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::Arguments", - "new_v1", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "TrustedLen iterator's size hint is not exact: " + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "TrustedLen iterator's size hint is not exact: " + |) + |)) + ] |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_debug", + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array [ - Ty.tuple - [ - Ty.path - "usize"; - Ty.path - "usize" - ] + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_debug", + [ + Ty.tuple + [ + Ty.path + "usize"; + Ty.path + "usize" + ] + ] + |), + [ + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + low + |)); + A.to_value + (M.read (| + high + |)) + ] + |) + |) + ] + |)) ] - |), - [ - M.alloc (| - Value.Tuple - [ - M.read (| - low - |); - M.read (| - high - |) - ] - |) - ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) @@ -8573,13 +8792,16 @@ Module rc. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -8612,11 +8834,21 @@ Module rc. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "capacity overflow" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "capacity overflow" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -8716,35 +8948,38 @@ Module rc. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::rc::Weak" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], - "new_unchecked", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::invalid_mut", - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] + (M.of_value (| + Value.StructRecord + "alloc::rc::Weak" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], + "new_unchecked", + [] |), - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] - |) - ] - |)); - ("alloc", Value.StructTuple "alloc::alloc::Global" []) - ])) + [ + M.call_closure (| + M.get_function (| + "core::ptr::invalid_mut", + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] + |), + [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + |) + ] + |))); + ("alloc", A.to_value (M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -8754,7 +8989,7 @@ Module rc. unsafe { Self::from_raw_in(ptr, Global) } } *) - Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -8766,7 +9001,7 @@ Module rc. "from_raw_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -8787,36 +9022,39 @@ Module rc. } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => ltac:(M.monadic (let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::rc::Weak" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], - "new_unchecked", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::invalid_mut", - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] + M.of_value (| + Value.StructRecord + "alloc::rc::Weak" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], + "new_unchecked", + [] |), - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] - |) - ] - |)); - ("alloc", M.read (| alloc |)) - ])) + [ + M.call_closure (| + M.get_function (| + "core::ptr::invalid_mut", + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] + |), + [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + |) + ] + |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |))) | _, _ => M.impossible end. @@ -8839,7 +9077,7 @@ Module rc. } } *) - Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8868,7 +9106,7 @@ Module rc. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8884,17 +9122,18 @@ Module rc. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| M.rust_cast (M.read (| ptr |)) |))); + M.alloc (| M.rust_cast (| M.read (| ptr |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| (* MutToConstPointer *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| ptr |), "alloc::rc::RcBox", "value" - |)) + |) + |) |))) ] |) @@ -8913,7 +9152,7 @@ Module rc. result } *) - Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8961,7 +9200,7 @@ Module rc. (result, alloc) } *) - Definition into_raw_and_alloc (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw_and_alloc (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8996,7 +9235,11 @@ Module rc. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| result |); M.read (| alloc |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| result |)); A.to_value (M.read (| alloc |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -9025,7 +9268,7 @@ Module rc. Weak { ptr: unsafe { NonNull::new_unchecked(ptr) }, alloc } } *) - Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -9036,7 +9279,7 @@ Module rc. let ptr := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9045,12 +9288,12 @@ Module rc. (M.alloc (| M.call_closure (| M.get_function (| "alloc::rc::is_dangling", [ T ] |), - [ M.rust_cast (M.read (| ptr |)) ] + [ M.rust_cast (| M.read (| ptr |) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| M.rust_cast (M.read (| ptr |)) |))); + M.alloc (| M.rust_cast (| M.read (| ptr |) |) |))); fun γ => ltac:(M.monadic (let offset := @@ -9061,36 +9304,40 @@ Module rc. |) |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "byte_sub", [] |), [ M.read (| ptr |); M.read (| offset |) ] - |)) + |) + |) |))) ] |) |) in M.alloc (| - Value.StructRecord - "alloc::rc::Weak" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], - "new_unchecked", - [] - |), - [ M.read (| ptr |) ] - |)); - ("alloc", M.read (| alloc |)) - ] + M.of_value (| + Value.StructRecord + "alloc::rc::Weak" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], + "new_unchecked", + [] + |), + [ M.read (| ptr |) ] + |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |) |) |))) | _, _ => M.impossible @@ -9117,7 +9364,7 @@ Module rc. } } *) - Definition upgrade (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition upgrade (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9200,15 +9447,15 @@ Module rc. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Ty.path "alloc::rc::WeakInner", @@ -9217,12 +9464,15 @@ Module rc. [] |), [ inner ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -9237,44 +9487,47 @@ Module rc. |), [ inner ] |) - |) in - M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], - "from_inner_in", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::rc::Weak", - "ptr" - |) - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::rc::Rc") [ T; A ], + "from_inner_in", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::rc::Weak", - "alloc" + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::rc::Weak", + "ptr" + |) + |); + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::rc::Weak", + "alloc" + |) + ] |) ] - |) - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -9292,7 +9545,7 @@ Module rc. if let Some(inner) = self.inner() { inner.strong() } else { 0 } } *) - Definition strong_count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strong_count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9300,7 +9553,7 @@ Module rc. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9334,7 +9587,7 @@ Module rc. [ inner ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -9358,7 +9611,7 @@ Module rc. } } *) - Definition weak_count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition weak_count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9366,7 +9619,7 @@ Module rc. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9389,15 +9642,15 @@ Module rc. |) in let inner := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Ty.path "alloc::rc::WeakInner", @@ -9406,13 +9659,15 @@ Module rc. [] |), [ inner ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", @@ -9423,13 +9678,13 @@ Module rc. |), [ inner ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -9455,7 +9710,7 @@ Module rc. } } *) - Definition inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9463,7 +9718,7 @@ Module rc. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9498,55 +9753,64 @@ Module rc. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - let ptr := - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], - "as_ptr", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::rc::Weak", - "ptr" - |) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + let ptr := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], + "as_ptr", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::rc::Weak", + "ptr" + |) + |) + ] |) - ] + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::rc::WeakInner" + [ + ("strong", + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| ptr |), + "alloc::rc::RcBox", + "strong" + |))); + ("weak", + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| ptr |), + "alloc::rc::RcBox", + "weak" + |))) + ] + |) |) - |) in - M.alloc (| - Value.StructRecord - "alloc::rc::WeakInner" - [ - ("strong", - M.SubPointer.get_struct_record_field (| - M.read (| ptr |), - "alloc::rc::RcBox", - "strong" - |)); - ("weak", - M.SubPointer.get_struct_record_field (| - M.read (| ptr |), - "alloc::rc::RcBox", - "weak" - |)) - ] - |) - |) - ] + |)) + ] + |) |))) ] |) @@ -9563,7 +9827,7 @@ Module rc. ptr::addr_eq(self.ptr.as_ptr(), other.ptr.as_ptr()) } *) - Definition ptr_eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ptr_eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9580,8 +9844,8 @@ Module rc. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -9598,10 +9862,11 @@ Module rc. |) |) ] - |)); + |) + |); (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -9618,7 +9883,8 @@ Module rc. |) |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -9634,13 +9900,13 @@ Module rc. (ptr.cast::<()>()).addr() == usize::MAX } *) - Definition is_dangling (τ : list Ty.t) (α : list Value.t) : M := + Definition is_dangling (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ ptr ] => ltac:(M.monadic (let ptr := M.alloc (| ptr |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.tuple [] ], "addr", [] |), [ M.call_closure (| @@ -9652,8 +9918,9 @@ Module rc. [ M.read (| ptr |) ] |) ] - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)))) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |))) | _, _ => M.impossible end. @@ -9689,7 +9956,7 @@ Module rc. } } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9701,7 +9968,7 @@ Module rc. let inner := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9727,7 +9994,9 @@ Module rc. fun γ => ltac:(M.monadic (M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))) ] |) @@ -9746,15 +10015,15 @@ Module rc. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Ty.path "alloc::rc::WeakInner", @@ -9763,8 +10032,9 @@ Module rc. [] |), [ inner ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -9810,8 +10080,8 @@ Module rc. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -9828,14 +10098,15 @@ Module rc. |) |) ] - |)) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -9863,7 +10134,7 @@ Module rc. Weak { ptr: self.ptr, alloc: self.alloc.clone() } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9872,7 +10143,7 @@ Module rc. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9906,33 +10177,37 @@ Module rc. [ inner ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "alloc::rc::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::rc::Weak", - "ptr" - |) - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::rc::Weak", - "alloc" - |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::rc::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::rc::Weak", + "ptr" + |) + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::rc::Weak", + "alloc" + |) + ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -9955,7 +10230,7 @@ Module rc. write!(f, "(Weak)") } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -9970,8 +10245,14 @@ Module rc. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "(Weak)" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "(Weak)" |) |)) ] + |) + |) + |) ] |) ] @@ -9997,7 +10278,7 @@ Module rc. Weak::new() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -10024,7 +10305,7 @@ Module rc. (* Trait *) Module RcInnerPtr. - Definition strong (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strong (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10046,7 +10327,7 @@ Module rc. end. Axiom ProvidedMethod_strong : M.IsProvidedMethod "alloc::rc::RcInnerPtr" "strong" strong. - Definition inc_strong (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inc_strong (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10064,15 +10345,15 @@ Module rc. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), - [ BinOp.Pure.ne (M.read (| strong |)) (Value.Integer Integer.Usize 0) ] + [ BinOp.Pure.ne (| M.read (| strong |), M.of_value (| Value.Integer 0 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let strong := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), - [ M.read (| strong |); Value.Integer Integer.Usize 1 ] + [ M.read (| strong |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -10093,7 +10374,7 @@ Module rc. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10102,7 +10383,12 @@ Module rc. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| strong |)) (Value.Integer Integer.Usize 0) ] + [ + BinOp.Pure.eq (| + M.read (| strong |), + M.of_value (| Value.Integer 0 |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -10111,7 +10397,7 @@ Module rc. M.call_closure (| M.get_function (| "core::intrinsics::abort", [] |), [] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -10120,7 +10406,7 @@ Module rc. Axiom ProvidedMethod_inc_strong : M.IsProvidedMethod "alloc::rc::RcInnerPtr" "inc_strong" inc_strong. - Definition dec_strong (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dec_strong (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10140,23 +10426,24 @@ Module rc. [ M.read (| self |) ] |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Self, [], "strong", [] |), [ M.read (| self |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. Axiom ProvidedMethod_dec_strong : M.IsProvidedMethod "alloc::rc::RcInnerPtr" "dec_strong" dec_strong. - Definition weak (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition weak (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10178,7 +10465,7 @@ Module rc. end. Axiom ProvidedMethod_weak : M.IsProvidedMethod "alloc::rc::RcInnerPtr" "weak" weak. - Definition inc_weak (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inc_weak (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10196,15 +10483,15 @@ Module rc. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), - [ BinOp.Pure.ne (M.read (| weak |)) (Value.Integer Integer.Usize 0) ] + [ BinOp.Pure.ne (| M.read (| weak |), M.of_value (| Value.Integer 0 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let weak := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), - [ M.read (| weak |); Value.Integer Integer.Usize 1 ] + [ M.read (| weak |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -10225,7 +10512,7 @@ Module rc. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10234,7 +10521,12 @@ Module rc. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| weak |)) (Value.Integer Integer.Usize 0) ] + [ + BinOp.Pure.eq (| + M.read (| weak |), + M.of_value (| Value.Integer 0 |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -10243,7 +10535,7 @@ Module rc. M.call_closure (| M.get_function (| "core::intrinsics::abort", [] |), [] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -10251,7 +10543,7 @@ Module rc. end. Axiom ProvidedMethod_inc_weak : M.IsProvidedMethod "alloc::rc::RcInnerPtr" "inc_weak" inc_weak. - Definition dec_weak (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dec_weak (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10271,16 +10563,17 @@ Module rc. [ M.read (| self |) ] |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Self, [], "weak", [] |), [ M.read (| self |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10296,7 +10589,7 @@ Module rc. &self.weak } *) - Definition weak_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition weak_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10311,7 +10604,7 @@ Module rc. &self.strong } *) - Definition strong_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strong_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10346,7 +10639,7 @@ Module rc. self.weak } *) - Definition weak_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition weak_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10366,7 +10659,7 @@ Module rc. self.strong } *) - Definition strong_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition strong_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10401,7 +10694,7 @@ Module rc. &**self } *) - Definition borrow (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -10437,7 +10730,7 @@ Module rc. &**self } *) - Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -10488,7 +10781,7 @@ Module rc. unsafe { data_offset_align(align_of_val_raw(ptr)) } } *) - Definition data_offset (τ : list Ty.t) (α : list Value.t) : M := + Definition data_offset (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ ptr ] => ltac:(M.monadic @@ -10511,7 +10804,7 @@ Module rc. layout.size() + layout.padding_needed_for(align) } *) - Definition data_offset_align (τ : list Ty.t) (α : list Value.t) : M := + Definition data_offset_align (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ align ] => ltac:(M.monadic @@ -10530,6 +10823,7 @@ Module rc. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ layout ] @@ -10569,7 +10863,7 @@ Module rc. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "alloc::rc::UniqueRc") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -10584,25 +10878,27 @@ Module rc. |), [ M.read (| f |); - M.read (| Value.String "UniqueRc" |); - M.read (| Value.String "ptr" |); + M.read (| M.of_value (| Value.String "UniqueRc" |) |); + M.read (| M.of_value (| Value.String "ptr" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::rc::UniqueRc", "ptr" - |)); - M.read (| Value.String "phantom" |); + |) + |); + M.read (| M.of_value (| Value.String "phantom" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::rc::UniqueRc", "phantom" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -10635,38 +10931,28 @@ Module rc. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "alloc::rc::UniqueRc" - [ - ("ptr", - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.apply (Ty.path "&mut") [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] - ], - "into", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ - Ty.apply (Ty.path "alloc::rc::RcBox") [ T ]; - Ty.path "alloc::alloc::Global" - ], - "leak", + M.of_value (| + Value.StructRecord + "alloc::rc::UniqueRc" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply (Ty.path "&mut") [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ], + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::rc::RcBox") [ T ] ] + ], + "into", [] |), [ @@ -10678,41 +10964,63 @@ Module rc. Ty.apply (Ty.path "alloc::rc::RcBox") [ T ]; Ty.path "alloc::alloc::Global" ], - "new", + "leak", [] |), [ - Value.StructRecord - "alloc::rc::RcBox" + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "alloc::rc::RcBox") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 0 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "usize" ], - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("value", M.read (| value |)) + M.of_value (| + Value.StructRecord + "alloc::rc::RcBox" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::Cell") + [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 0 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::Cell") + [ Ty.path "usize" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("value", A.to_value (M.read (| value |))) + ] + |) ] + |) ] |) ] - |) - ] - |)); - ("phantom", Value.StructTuple "core::marker::PhantomData" []) - ])) + |))); + ("phantom", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -10728,7 +11036,7 @@ Module rc. Weak { ptr: this.ptr, alloc: Global } } *) - Definition downgrade (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downgrade (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this ] => @@ -10766,21 +11074,25 @@ Module rc. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| - Value.StructRecord - "alloc::rc::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| this |), - "alloc::rc::UniqueRc", - "ptr" - |) - |)); - ("alloc", Value.StructTuple "alloc::alloc::Global" []) - ] + M.of_value (| + Value.StructRecord + "alloc::rc::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| this |), + "alloc::rc::UniqueRc", + "ptr" + |) + |))); + ("alloc", + A.to_value (M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -10801,7 +11113,7 @@ Module rc. } } *) - Definition into_rc (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_rc (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this ] => @@ -10861,7 +11173,7 @@ Module rc. "alloc::rc::RcBox", "strong" |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -10915,7 +11227,7 @@ Module rc. unsafe { &self.ptr.as_ref().value } } *) - Definition deref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10965,7 +11277,7 @@ Module rc. unsafe { &mut ( *self.ptr.as_ptr()).value } } *) - Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11023,7 +11335,7 @@ Module rc. } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11079,15 +11391,15 @@ Module rc. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Ty.apply (Ty.path "alloc::rc::RcBox") [ T ], @@ -11113,8 +11425,9 @@ Module rc. ] |) ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -11128,7 +11441,9 @@ Module rc. [] |), [ - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -11175,8 +11490,8 @@ Module rc. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) diff --git a/CoqOfRust/alloc/slice.v b/CoqOfRust/alloc/slice.v index b8b1611fa..9e1ab4866 100644 --- a/CoqOfRust/alloc/slice.v +++ b/CoqOfRust/alloc/slice.v @@ -12,7 +12,7 @@ Module slice. } } *) - Definition into_vec (τ : list Ty.t) (α : list Value.t) : M := + Definition into_vec (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; A ], [ b ] => ltac:(M.monadic @@ -51,7 +51,7 @@ Module slice. [] |), [ - M.rust_cast (M.read (| b |)); + M.rust_cast (| M.read (| b |) |); M.read (| len |); M.read (| len |); M.read (| alloc |) @@ -69,7 +69,7 @@ Module slice. T::to_vec(s, alloc) } *) - Definition to_vec (τ : list Ty.t) (α : list Value.t) : M := + Definition to_vec (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; A ], [ s; alloc ] => ltac:(M.monadic @@ -122,7 +122,7 @@ Module slice. vec } *) - Definition to_vec (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_vec (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ A ], [ s; alloc ] => @@ -149,9 +149,14 @@ Module slice. |) in let guard := M.alloc (| - Value.StructRecord - "alloc::slice::hack::to_vec::DropGuard" - [ ("vec", vec); ("num_init", Value.Integer Integer.Usize 0) ] + M.of_value (| + Value.StructRecord + "alloc::slice::hack::to_vec::DropGuard" + [ + ("vec", A.to_value vec); + ("num_init", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let slots := M.alloc (| @@ -321,10 +326,10 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -360,7 +365,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in vec |))) | _, _ => M.impossible @@ -391,7 +396,7 @@ Module slice. v } *) - Definition to_vec (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_vec (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ A ], [ s; alloc ] => @@ -474,7 +479,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in v |))) | _, _ => M.impossible @@ -501,7 +506,7 @@ Module slice. stable_sort(self, T::lt); } *) - Definition sort (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sort (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -526,7 +531,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -543,7 +548,7 @@ Module slice. stable_sort(self, |a, b| compare(a, b) == Less); } *) - Definition sort_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sort_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; compare ] => @@ -565,8 +570,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -608,12 +613,20 @@ Module slice. |), [ compare; - Value.Tuple [ M.read (| a |); M.read (| b |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |) ] |) |); M.alloc (| - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) |) ] |))) @@ -622,11 +635,12 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -644,7 +658,7 @@ Module slice. stable_sort(self, |a, b| f(a).lt(&f(b))); } *) - Definition sort_by_key (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sort_by_key (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ K; F ], [ self; f ] => @@ -666,8 +680,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -701,7 +715,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| a |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| a |)) ] + |) + ] |) |); M.alloc (| @@ -713,7 +732,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| b |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| b |)) ] + |) + ] |) |) ] @@ -723,11 +747,12 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -783,7 +808,7 @@ Module slice. sort_by_key!(usize, self, f) } *) - Definition sort_by_cached_key (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sort_by_cached_key (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ K; F ], [ self; f ] => @@ -833,26 +858,31 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| len |)) (Value.Integer Integer.Usize 2) + BinOp.Pure.lt (| + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -860,12 +890,14 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| sz_u8 |)) (M.read (| sz_u16 |)), + BinOp.Pure.lt (| M.read (| sz_u8 |), M.read (| sz_u16 |) |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| len |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))))) + (BinOp.Pure.le (| + M.read (| len |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |))) |) |)) in let _ := @@ -978,8 +1010,8 @@ Module slice. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1000,15 +1032,21 @@ Module slice. |) in let i := M.copy (| γ0_0 |) in let k := M.copy (| γ0_1 |) in - Value.Tuple - [ - M.read (| k |); - M.rust_cast (M.read (| i |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value + (M.rust_cast (| + M.read (| i |) + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -1057,20 +1095,25 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |), @@ -1140,19 +1183,25 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.rust_cast - (M.read (| + BinOp.Pure.lt (| + M.rust_cast (| + M.read (| index - |))) - (M.read (| i |)) + |) + |), + M.read (| i |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1189,10 +1238,11 @@ Module slice. |), [ indices; - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| index - |)) + |) + |) ] |), 1 @@ -1200,7 +1250,9 @@ Module slice. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic @@ -1216,7 +1268,9 @@ Module slice. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |) |) |) @@ -1261,14 +1315,18 @@ Module slice. [ M.read (| self |); M.read (| i |); - M.rust_cast (M.read (| index |)) + M.rust_cast (| + M.read (| index |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -1277,12 +1335,12 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1290,12 +1348,14 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| sz_u16 |)) (M.read (| sz_u32 |)), + BinOp.Pure.lt (| M.read (| sz_u16 |), M.read (| sz_u32 |) |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| len |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))))) + (BinOp.Pure.le (| + M.read (| len |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |))) |) |)) in let _ := @@ -1408,8 +1468,8 @@ Module slice. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1430,15 +1490,21 @@ Module slice. |) in let i := M.copy (| γ0_0 |) in let k := M.copy (| γ0_1 |) in - Value.Tuple - [ - M.read (| k |); - M.rust_cast (M.read (| i |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value + (M.rust_cast (| + M.read (| i |) + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -1487,20 +1553,25 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |), @@ -1570,19 +1641,25 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.rust_cast - (M.read (| + BinOp.Pure.lt (| + M.rust_cast (| + M.read (| index - |))) - (M.read (| i |)) + |) + |), + M.read (| i |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1619,10 +1696,11 @@ Module slice. |), [ indices; - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| index - |)) + |) + |) ] |), 1 @@ -1630,7 +1708,9 @@ Module slice. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic @@ -1646,7 +1726,9 @@ Module slice. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |) |) |) @@ -1691,14 +1773,18 @@ Module slice. [ M.read (| self |); M.read (| i |); - M.rust_cast (M.read (| index |)) + M.rust_cast (| + M.read (| index |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -1707,12 +1793,12 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1720,12 +1806,14 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| sz_u32 |)) (M.read (| sz_usize |)), + BinOp.Pure.lt (| M.read (| sz_u32 |), M.read (| sz_usize |) |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| len |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))))) + (BinOp.Pure.le (| + M.read (| len |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |))) |) |)) in let _ := @@ -1838,8 +1926,8 @@ Module slice. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1860,15 +1948,21 @@ Module slice. |) in let i := M.copy (| γ0_0 |) in let k := M.copy (| γ0_1 |) in - Value.Tuple - [ - M.read (| k |); - M.rust_cast (M.read (| i |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value + (M.rust_cast (| + M.read (| i |) + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -1917,20 +2011,25 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |), @@ -2000,19 +2099,25 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.rust_cast - (M.read (| + BinOp.Pure.lt (| + M.rust_cast (| + M.read (| index - |))) - (M.read (| i |)) + |) + |), + M.read (| i |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2049,10 +2154,11 @@ Module slice. |), [ indices; - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| index - |)) + |) + |) ] |), 1 @@ -2060,7 +2166,9 @@ Module slice. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic @@ -2076,7 +2184,9 @@ Module slice. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |) |) |) @@ -2121,14 +2231,18 @@ Module slice. [ M.read (| self |); M.read (| i |); - M.rust_cast (M.read (| index |)) + M.rust_cast (| + M.read (| index |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -2137,7 +2251,7 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let indices := @@ -2221,8 +2335,8 @@ Module slice. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2235,11 +2349,18 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let i := M.copy (| γ0_0 |) in let k := M.copy (| γ0_1 |) in - Value.Tuple [ M.read (| k |); M.read (| M.use i |) ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value (M.read (| M.use i |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -2281,20 +2402,23 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |), @@ -2360,16 +2484,17 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.use index |)) - (M.read (| i |)) + BinOp.Pure.lt (| + M.read (| M.use index |), + M.read (| i |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2402,7 +2527,9 @@ Module slice. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2414,7 +2541,9 @@ Module slice. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |) |) |))) @@ -2458,10 +2587,10 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -2482,7 +2611,7 @@ Module slice. self.to_vec_in(Global) } *) - Definition to_vec (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_vec (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2494,7 +2623,7 @@ Module slice. "to_vec_in", [ Ty.path "alloc::alloc::Global" ] |), - [ M.read (| self |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| self |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -2512,7 +2641,7 @@ Module slice. hack::to_vec(self, alloc) } *) - Definition to_vec_in (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_vec_in (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ A ], [ self; alloc ] => @@ -2536,7 +2665,7 @@ Module slice. hack::into_vec(self) } *) - Definition into_vec (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_vec (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ A ], [ self ] => @@ -2612,7 +2741,7 @@ Module slice. buf } *) - Definition repeat (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition repeat (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -2624,14 +2753,14 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| n |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2653,7 +2782,7 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let capacity := @@ -2679,7 +2808,7 @@ Module slice. M.read (| n |) ] |); - M.read (| Value.String "capacity overflow" |) + M.read (| M.of_value (| Value.String "capacity overflow" |) |) ] |) |) in @@ -2710,19 +2839,22 @@ Module slice. let _ := let m := M.alloc (| - BinOp.Panic.shr (| M.read (| n |), Value.Integer Integer.I32 1 |) + BinOp.Panic.shr (| M.read (| n |), M.of_value (| Value.Integer 1 |) |) |) in M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| m |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| m |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2755,8 +2887,8 @@ Module slice. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -2765,7 +2897,8 @@ Module slice. [] |), [ buf ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -2817,20 +2950,24 @@ Module slice. [ buf; BinOp.Panic.mul (| + Integer.Usize, M.read (| buf_len |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := m in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer Integer.I32 1 |) + BinOp.Panic.shr (| + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2840,7 +2977,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2850,6 +2987,7 @@ Module slice. let rem_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| capacity |), M.call_closure (| M.get_associated_function (| @@ -2865,14 +3003,17 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| rem_len |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| rem_len |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2898,8 +3039,8 @@ Module slice. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -2908,7 +3049,8 @@ Module slice. [] |), [ buf ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -2938,8 +3080,8 @@ Module slice. [ buf; M.read (| capacity |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in buf @@ -2960,7 +3102,7 @@ Module slice. Concat::concat(self) } *) - Definition concat (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition concat (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ Item ], [ self ] => @@ -2991,7 +3133,7 @@ Module slice. Join::join(self, sep) } *) - Definition join (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition join (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ Separator ], [ self; sep ] => @@ -3023,7 +3165,7 @@ Module slice. Join::join(self, sep) } *) - Definition connect (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition connect (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ Separator ], [ self; sep ] => @@ -3058,7 +3200,7 @@ Module slice. me } *) - Definition to_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3114,7 +3256,7 @@ Module slice. me } *) - Definition to_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3187,7 +3329,7 @@ Module slice. result } *) - Definition concat (T V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition concat (T V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T V in match τ, α with | [], [ slice ] => @@ -3232,8 +3374,8 @@ Module slice. |), [ M.read (| slice |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3265,7 +3407,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -3358,7 +3501,7 @@ Module slice. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3403,7 +3546,7 @@ Module slice. result } *) - Definition join (T V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition join (T V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T V in match τ, α with | [], [ slice; sep ] => @@ -3472,7 +3615,9 @@ Module slice. let size := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", @@ -3511,8 +3656,8 @@ Module slice. |), [ M.read (| slice |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3544,7 +3689,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -3558,7 +3704,7 @@ Module slice. [ M.read (| slice |) ] |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let result := @@ -3696,7 +3842,7 @@ Module slice. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3742,7 +3888,7 @@ Module slice. result } *) - Definition join (T V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition join (T V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T V in match τ, α with | [], [ slice; sep ] => @@ -3811,6 +3957,7 @@ Module slice. let size := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", @@ -3849,8 +3996,8 @@ Module slice. |), [ M.read (| slice |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3882,12 +4029,14 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] |), BinOp.Panic.mul (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -3897,6 +4046,7 @@ Module slice. [ M.read (| sep |) ] |), BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ V ], @@ -3905,7 +4055,7 @@ Module slice. |), [ M.read (| slice |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) @@ -4033,7 +4183,7 @@ Module slice. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4062,7 +4212,7 @@ Module slice. &self[..] } *) - Definition borrow (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4076,7 +4226,8 @@ Module slice. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ M.read (| self |); M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |))) | _, _ => M.impossible end. @@ -4098,7 +4249,7 @@ Module slice. &mut self[..] } *) - Definition borrow_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4112,7 +4263,8 @@ Module slice. "index_mut", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ M.read (| self |); M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |))) | _, _ => M.impossible end. @@ -4146,7 +4298,7 @@ Module slice. target.extend_from_slice(tail); } *) - Definition clone_into (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_into (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; target ] => @@ -4229,7 +4381,7 @@ Module slice. [ M.read (| target |); M.read (| tail |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -4254,7 +4406,7 @@ Module slice. target.extend_from_slice(self); } *) - Definition clone_into (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_into (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; target ] => @@ -4284,7 +4436,7 @@ Module slice. [ M.read (| target |); M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4310,7 +4462,7 @@ Module slice. self.to_vec() } *) - Definition to_owned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_owned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4328,7 +4480,7 @@ Module slice. SpecCloneIntoVec::clone_into(self, target); } *) - Definition clone_into (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_into (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; target ] => @@ -4349,7 +4501,7 @@ Module slice. [ M.read (| self |); M.read (| target |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4417,7 +4569,7 @@ Module slice. sort::merge_sort(v, &mut is_less, elem_alloc_fn, elem_dealloc_fn, run_alloc_fn, run_dealloc_fn); } *) - Definition stable_sort (τ : list Ty.t) (α : list Value.t) : M := + Definition stable_sort (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less ] => ltac:(M.monadic @@ -4428,7 +4580,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4437,15 +4589,17 @@ Module slice. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let elem_alloc_fn := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4455,8 +4609,8 @@ Module slice. fun γ => ltac:(M.monadic (let len := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "alloc::alloc::alloc", [] |), [ M.call_closure (| @@ -4482,16 +4636,18 @@ Module slice. ] |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let elem_dealloc_fn := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4513,7 +4669,7 @@ Module slice. M.call_closure (| M.get_function (| "alloc::alloc::dealloc", [] |), [ - M.rust_cast (M.read (| buf_ptr |)); + M.rust_cast (| M.read (| buf_ptr |) |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -4540,19 +4696,20 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let run_alloc_fn := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4562,8 +4719,8 @@ Module slice. fun γ => ltac:(M.monadic (let len := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "alloc::alloc::alloc", [] |), [ M.call_closure (| @@ -4589,16 +4746,18 @@ Module slice. ] |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let run_dealloc_fn := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4620,7 +4779,7 @@ Module slice. M.call_closure (| M.get_function (| "alloc::alloc::dealloc", [] |), [ - M.rust_cast (M.read (| buf_ptr |)); + M.rust_cast (| M.read (| buf_ptr |) |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -4650,14 +4809,15 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.alloc (| @@ -4699,7 +4859,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible diff --git a/CoqOfRust/alloc/str.v b/CoqOfRust/alloc/str.v index e5209f894..7b56a1e72 100644 --- a/CoqOfRust/alloc/str.v +++ b/CoqOfRust/alloc/str.v @@ -13,7 +13,7 @@ Module str. Join::join(slice, "") } *) - Definition concat (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition concat (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ slice ] => @@ -27,7 +27,7 @@ Module str. "join", [] |), - [ M.read (| slice |); M.read (| Value.String "" |) ] + [ M.read (| slice |); M.read (| M.of_value (| Value.String "" |) |) ] |))) | _, _ => M.impossible end. @@ -53,7 +53,7 @@ Module str. unsafe { String::from_utf8_unchecked(join_generic_copy(slice, sep.as_bytes())) } } *) - Definition join (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition join (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ slice; sep ] => @@ -154,7 +154,7 @@ Module str. result } *) - Definition join_generic_copy (τ : list Ty.t) (α : list Value.t) : M := + Definition join_generic_copy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; T; _ as S ], [ slice; sep ] => ltac:(M.monadic @@ -263,8 +263,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -328,8 +328,8 @@ Module str. |), [ M.read (| slice |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -378,7 +378,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |); @@ -393,11 +394,14 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.read (| - Value.String "attempt to join into collection with len > usize::MAX" + M.of_value (| + Value.String "attempt to join into collection with len > usize::MAX" + |) |) ] |) @@ -415,25 +419,25 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -442,8 +446,10 @@ Module str. [] |), [ result ] - |)) - (M.read (| reserved_len |))) + |), + M.read (| reserved_len |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -456,18 +462,21 @@ Module str. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: result.capacity() >= reserved_len" + M.of_value (| + Value.String + "assertion failed: result.capacity() >= reserved_len" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -531,12 +540,19 @@ Module str. |), [ result ] |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| M.read (| reserved_len |), M.read (| pos |) |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| reserved_len |), + M.read (| pos |) + |))) + ] + |) ] |) |) in @@ -606,8 +622,8 @@ Module str. |), [ M.read (| iter |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -690,7 +706,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -721,7 +738,7 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 0 + Value.Integer 0 |) in M.use (M.match_operator (| @@ -1036,7 +1053,9 @@ Module str. M.read (| tail |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) @@ -1044,7 +1063,7 @@ Module str. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -1053,7 +1072,7 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 1 + Value.Integer 1 |) in M.use (M.match_operator (| @@ -1368,7 +1387,9 @@ Module str. M.read (| tail |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) @@ -1376,7 +1397,7 @@ Module str. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -1385,7 +1406,7 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 2 + Value.Integer 2 |) in M.use (M.match_operator (| @@ -1700,7 +1721,9 @@ Module str. M.read (| tail |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) @@ -1708,7 +1731,7 @@ Module str. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -1717,7 +1740,7 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 3 + Value.Integer 3 |) in M.use (M.match_operator (| @@ -2032,7 +2055,9 @@ Module str. M.read (| tail |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) @@ -2040,7 +2065,7 @@ Module str. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -2049,7 +2074,7 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 4 + Value.Integer 4 |) in M.use (M.match_operator (| @@ -2364,7 +2389,9 @@ Module str. M.read (| tail |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) @@ -2372,7 +2399,7 @@ Module str. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -2691,7 +2718,9 @@ Module str. M.read (| tail |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) @@ -2699,7 +2728,7 @@ Module str. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))) @@ -2711,6 +2740,7 @@ Module str. let result_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| reserved_len |), M.call_closure (| M.get_associated_function (| @@ -2735,7 +2765,7 @@ Module str. [ result; M.read (| result_len |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in result |))) |))) @@ -2750,7 +2780,7 @@ Module str. &self[..] } *) - Definition borrow (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2763,7 +2793,8 @@ Module str. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ M.read (| self |); M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |))) | _, _ => M.impossible end. @@ -2784,7 +2815,7 @@ Module str. &mut self[..] } *) - Definition borrow_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2797,7 +2828,8 @@ Module str. "index_mut", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ M.read (| self |); M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |))) | _, _ => M.impossible end. @@ -2821,7 +2853,7 @@ Module str. unsafe { String::from_utf8_unchecked(self.as_bytes().to_owned()) } } *) - Definition to_owned (τ : list Ty.t) (α : list Value.t) : M := + Definition to_owned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2860,7 +2892,7 @@ Module str. *target = unsafe { String::from_utf8_unchecked(b) } } *) - Definition clone_into (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_into (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; target ] => ltac:(M.monadic @@ -2934,7 +2966,7 @@ Module str. self.into() } *) - Definition into_boxed_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition into_boxed_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2974,7 +3006,7 @@ Module str. result } *) - Definition replace (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; from; to ] => ltac:(M.monadic @@ -2989,7 +3021,7 @@ Module str. [] |) |) in - let last_end := M.alloc (| Value.Integer Integer.Usize 0 |) in + let last_end := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -3070,12 +3102,15 @@ Module str. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| last_end |)); - ("end_", M.read (| start |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.read (| last_end |))); + ("end_", A.to_value (M.read (| start |))) + ] + |) ] |) ] @@ -3096,6 +3131,7 @@ Module str. M.write (| last_end, BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.call_closure (| M.get_associated_function (| @@ -3107,10 +3143,10 @@ Module str. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3128,16 +3164,19 @@ Module str. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| last_end |)); - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| last_end |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ M.read (| self |) ] + |))) + ] + |) ] |) ] @@ -3164,7 +3203,7 @@ Module str. result } *) - Definition replacen (τ : list Ty.t) (α : list Value.t) : M := + Definition replacen (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat; to; count ] => ltac:(M.monadic @@ -3181,10 +3220,10 @@ Module str. "with_capacity", [] |), - [ Value.Integer Integer.Usize 32 ] + [ M.of_value (| Value.Integer 32 |) ] |) |) in - let last_end := M.alloc (| Value.Integer Integer.Usize 0 |) in + let last_end := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -3282,12 +3321,15 @@ Module str. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| last_end |)); - ("end_", M.read (| start |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.read (| last_end |))); + ("end_", A.to_value (M.read (| start |))) + ] + |) ] |) ] @@ -3308,6 +3350,7 @@ Module str. M.write (| last_end, BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.call_closure (| M.get_associated_function (| @@ -3319,10 +3362,10 @@ Module str. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3340,16 +3383,19 @@ Module str. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| last_end |)); - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| last_end |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ M.read (| self |) ] + |))) + ] + |) ] |) ] @@ -3416,7 +3462,7 @@ Module str. } } *) - Definition to_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3435,8 +3481,9 @@ Module str. [ M.read (| self |) ] |); (* ReifyFnPointer *) - M.pointer_coercion - (M.get_associated_function (| Ty.path "u8", "to_ascii_lowercase", [] |)) + M.pointer_coercion (| + M.get_associated_function (| Ty.path "u8", "to_ascii_lowercase", [] |) + |) ] |) |) in @@ -3450,21 +3497,24 @@ Module str. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - "len", - [] - |), - [ out ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ out ] + |))) + ] + |) ] |) |) in @@ -3505,7 +3555,9 @@ Module str. |), [ M.read (| rest |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| + Value.StructTuple "core::ops::range::RangeFull" [] + |) ] |) ] @@ -3554,16 +3606,17 @@ Module str. let i := M.copy (| γ1_0 |) in let c := M.copy (| γ1_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| c |)) - (Value.UnicodeChar 931) + BinOp.Pure.eq (| + M.read (| c |), + M.of_value (| Value.UnicodeChar 931 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3672,7 +3725,9 @@ Module str. [ s; M.read (| b |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -3726,14 +3781,16 @@ Module str. [ s; M.read (| c |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3774,7 +3831,7 @@ Module str. s } *) - Definition to_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3790,8 +3847,9 @@ Module str. [ M.read (| self |) ] |); (* ReifyFnPointer *) - M.pointer_coercion - (M.get_associated_function (| Ty.path "u8", "to_ascii_uppercase", [] |)) + M.pointer_coercion (| + M.get_associated_function (| Ty.path "u8", "to_ascii_uppercase", [] |) + |) ] |) |) in @@ -3805,21 +3863,24 @@ Module str. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - "len", - [] - |), - [ out ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ out ] + |))) + ] + |) ] |) |) in @@ -3957,7 +4018,7 @@ Module str. [ s; M.read (| b |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -4000,12 +4061,12 @@ Module str. [ s; M.read (| c |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4022,7 +4083,7 @@ Module str. unsafe { String::from_utf8_unchecked(slice.into_vec()) } } *) - Definition into_string (τ : list Ty.t) (α : list Value.t) : M := + Definition into_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4078,7 +4139,7 @@ Module str. unsafe { String::from_utf8_unchecked(self.as_bytes().repeat(n)) } } *) - Definition repeat (τ : list Ty.t) (α : list Value.t) : M := + Definition repeat (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -4119,7 +4180,7 @@ Module str. s } *) - Definition to_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4171,7 +4232,7 @@ Module str. s } *) - Definition to_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4222,7 +4283,7 @@ Module str. unsafe { Box::from_raw(Box::into_raw(v) as *mut str) } } *) - Definition from_boxed_utf8_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_boxed_utf8_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -4236,8 +4297,8 @@ Module str. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -4246,7 +4307,8 @@ Module str. [] |), [ M.read (| v |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -4295,7 +4357,7 @@ Module str. out } *) - Definition convert_while_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition convert_while_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b; convert ] => ltac:(M.monadic @@ -4324,34 +4386,36 @@ Module str. ] |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (BinOp.Panic.add (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| i |), M.read (| M.get_constant (| "alloc::str::convert_while_ascii::N" |) |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| b |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4366,20 +4430,24 @@ Module str. |), [ M.read (| b |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| i |)); - ("end_", - BinOp.Panic.add (| - M.read (| i |), - M.read (| - M.get_constant (| - "alloc::str::convert_while_ascii::N" - |) - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| i |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.read (| + M.get_constant (| + "alloc::str::convert_while_ascii::N" + |) + |) + |))) + ] + |) ] |) |) in @@ -4409,24 +4477,28 @@ Module str. |), [ out ] |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| i |)); - ("end_", - BinOp.Panic.add (| - M.read (| i |), - M.read (| - M.get_constant (| - "alloc::str::convert_while_ascii::N" - |) - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| i |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.read (| + M.get_constant (| + "alloc::str::convert_while_ascii::N" + |) + |) + |))) + ] + |) ] |) |) in - let bits := M.alloc (| Value.Integer Integer.Usize 0 |) in + let bits := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -4442,17 +4514,21 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.get_constant (| - "alloc::str::convert_while_ascii::MAGIC_UNROLL" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.get_constant (| + "alloc::str::convert_while_ascii::MAGIC_UNROLL" + |) + |))) + ] + |) ] |) |), @@ -4497,9 +4573,9 @@ Module str. let β := bits in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| β |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") @@ -4542,33 +4618,36 @@ Module str. ] |) ] - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| bits |)) - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| bits |), + M.read (| M.get_constant (| "alloc::str::convert_while_ascii::NONASCII_MASK" |) - |))) - (Value.Integer Integer.Usize 0) + |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4576,7 +4655,8 @@ Module str. Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -4594,17 +4674,21 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.get_constant (| - "alloc::str::convert_while_ascii::N" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.get_constant (| + "alloc::str::convert_while_ascii::N" + |) + |))) + ] + |) ] |) |), @@ -4697,10 +4781,10 @@ Module str. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4709,13 +4793,14 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| M.get_constant (| "alloc::str::convert_while_ascii::N" |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4723,7 +4808,7 @@ Module str. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4743,40 +4828,41 @@ Module str. [ out; M.read (| i |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in out |))) | _, _ => M.impossible end. Module convert_while_ascii. - Definition value_USIZE_SIZE : Value.t := + Definition value_USIZE_SIZE : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] |) |))). - Definition value_MAGIC_UNROLL : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 2 |))). + Definition value_MAGIC_UNROLL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))). - Definition value_N : Value.t := + Definition value_N : A.t := 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" |) |) |) |))). - Definition value_NONASCII_MASK : Value.t := + Definition value_NONASCII_MASK : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "from_ne_bytes", [] |), - [ repeat (Value.Integer Integer.U8 128) 8 ] + [ repeat (| M.of_value (| Value.Integer 128 |), 8 |) ] |) |))). End convert_while_ascii. diff --git a/CoqOfRust/alloc/string.v b/CoqOfRust/alloc/string.v index 78b9588ca..a8be6594e 100644 --- a/CoqOfRust/alloc/string.v +++ b/CoqOfRust/alloc/string.v @@ -28,7 +28,7 @@ Module string. Definition Self : Ty.t := Ty.path "alloc::string::String". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74,7 +74,7 @@ Module string. Definition Self : Ty.t := Ty.path "alloc::string::String". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -131,15 +131,15 @@ Module string. Definition Self : Ty.t := Ty.path "alloc::string::String". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -158,7 +158,7 @@ Module string. Definition Self : Ty.t := Ty.path "alloc::string::String". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -212,7 +212,7 @@ Module string. Definition Self : Ty.t := Ty.path "alloc::string::FromUtf8Error". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -226,25 +226,27 @@ Module string. |), [ M.read (| f |); - M.read (| Value.String "FromUtf8Error" |); - M.read (| Value.String "bytes" |); + M.read (| M.of_value (| Value.String "FromUtf8Error" |) |); + M.read (| M.of_value (| Value.String "bytes" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::string::FromUtf8Error", "bytes" - |)); - M.read (| Value.String "error" |); + |) + |); + M.read (| M.of_value (| Value.String "error" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::string::FromUtf8Error", "error" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -273,7 +275,7 @@ Module string. Definition Self : Ty.t := Ty.path "alloc::string::FromUtf8Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -356,20 +358,20 @@ Module string. Definition Self : Ty.t := Ty.path "alloc::string::FromUtf8Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) @@ -390,51 +392,55 @@ Module string. Definition Self : Ty.t := Ty.path "alloc::string::FromUtf8Error". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::string::FromUtf8Error" - [ - ("bytes", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::string::FromUtf8Error", - "bytes" - |) - ] - |)); - ("error", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::str::error::Utf8Error", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::string::FromUtf8Error", - "error" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::string::FromUtf8Error" + [ + ("bytes", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::string::FromUtf8Error", + "bytes" + |) + ] + |))); + ("error", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::str::error::Utf8Error", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::string::FromUtf8Error", + "error" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -457,7 +463,7 @@ Module string. Definition Self : Ty.t := Ty.path "alloc::string::FromUtf16Error". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -471,16 +477,17 @@ Module string. |), [ M.read (| f |); - M.read (| Value.String "FromUtf16Error" |); + M.read (| M.of_value (| Value.String "FromUtf16Error" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "alloc::string::FromUtf16Error", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -502,25 +509,28 @@ Module string. String { vec: Vec::new() } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::string::String" - [ - ("vec", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "alloc::string::String" + [ + ("vec", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -531,26 +541,29 @@ Module string. String { vec: Vec::with_capacity(capacity) } } *) - Definition with_capacity (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ capacity ] => ltac:(M.monadic (let capacity := M.alloc (| capacity |) in - Value.StructRecord - "alloc::string::String" - [ - ("vec", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - "with_capacity", - [] - |), - [ M.read (| capacity |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::string::String" + [ + ("vec", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "with_capacity", + [] + |), + [ M.read (| capacity |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -565,7 +578,7 @@ Module string. } } *) - Definition from_utf8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ vec ] => ltac:(M.monadic @@ -595,9 +608,18 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.StructRecord "alloc::string::String" [ ("vec", M.read (| vec |)) ] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::string::String" + [ ("vec", A.to_value (M.read (| vec |))) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -605,13 +627,21 @@ Module string. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "alloc::string::FromUtf8Error" - [ ("bytes", M.read (| vec |)); ("error", M.read (| e |)) ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::string::FromUtf8Error" + [ + ("bytes", A.to_value (M.read (| vec |))); + ("error", A.to_value (M.read (| e |))) + ] + |)) + ] + |) |))) ] |) @@ -652,7 +682,7 @@ Module string. Cow::Owned(res) } *) - Definition from_utf8_lossy (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf8_lossy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -674,7 +704,7 @@ Module string. let first_valid := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -711,7 +741,7 @@ Module string. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -746,12 +776,15 @@ Module string. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| Value.Bool true |)) in + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -760,31 +793,35 @@ Module string. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "len", - [] - |), - [ M.read (| valid |) ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| v |) ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "len", + [] + |), + [ M.read (| valid |) ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| v |) ] + |) + |)) + ] + |) |), [ fun γ => @@ -803,25 +840,29 @@ Module string. let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -833,9 +874,11 @@ Module string. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -858,9 +901,11 @@ Module string. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -870,26 +915,36 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.return_ (| - Value.StructTuple - "alloc::borrow::Cow::Borrowed" - [ M.read (| valid |) ] + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Borrowed" + [ A.to_value (M.read (| valid |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in valid)); @@ -899,9 +954,12 @@ Module string. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "alloc::borrow::Cow::Borrowed" - [ M.read (| Value.String "" |) ] + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Borrowed" + [ A.to_value (M.read (| M.of_value (| Value.String "" |) |)) + ] + |) |) |) |) @@ -1028,15 +1086,15 @@ Module string. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1055,7 +1113,8 @@ Module string. [ chunk ] |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1080,18 +1139,23 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "alloc::borrow::Cow::Owned" [ M.read (| res |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "alloc::borrow::Cow::Owned" [ A.to_value (M.read (| res |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1115,7 +1179,7 @@ Module string. Ok(ret) } *) - Definition from_utf16 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -1244,7 +1308,7 @@ Module string. |) in let c := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1267,20 +1331,30 @@ Module string. [ ret; M.read (| c |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "alloc::string::FromUtf16Error" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::string::FromUtf16Error" + [ + A.to_value + (M.of_value (| + Value.Tuple [] + |)) + ] + |)) + ] + |) |) |) |) @@ -1289,11 +1363,15 @@ Module string. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| ret |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| ret |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1308,7 +1386,7 @@ Module string. .collect() } *) - Definition from_utf16_lossy (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf16_lossy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -1401,8 +1479,8 @@ Module string. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1435,7 +1513,8 @@ Module string. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -1459,7 +1538,7 @@ Module string. } } *) - Definition from_utf16le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf16le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -1469,15 +1548,16 @@ Module string. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Panic.rem (| + BinOp.Pure.ne (| + BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -1486,9 +1566,10 @@ Module string. |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 2 - |)) - (Value.Integer Integer.Usize 0) + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1496,34 +1577,42 @@ Module string. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "alloc::string::FromUtf16Error" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::string::FromUtf16Error" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - Value.Bool true; - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "align_to", - [ Ty.path "u16" ] - |), - [ M.read (| v |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Bool true |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "align_to", + [ Ty.path "u16" ] + |), + [ M.read (| v |) ] + |)) + ] + |) |), [ fun γ => @@ -1675,8 +1764,8 @@ Module string. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1685,13 +1774,16 @@ Module string. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "alloc::string::FromUtf16Error" - [ Value.Tuple [] ])) + (M.of_value (| + Value.StructTuple + "alloc::string::FromUtf16Error" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -1719,7 +1811,7 @@ Module string. } } *) - Definition from_utf16le_lossy (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf16le_lossy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -1727,18 +1819,21 @@ Module string. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - Value.Bool true; - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "align_to", - [ Ty.path "u16" ] - |), - [ M.read (| v |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Bool true |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "align_to", + [ Ty.path "u16" ] + |), + [ M.read (| v |) ] + |)) + ] + |) |), [ fun γ => @@ -1795,7 +1890,7 @@ Module string. |), [ M.read (| v |) ] |); - M.read (| Value.String (String.String "253" "") |) + M.read (| M.of_value (| Value.String (String.String "253" "") |) |) ] |) |))); @@ -1994,8 +2089,8 @@ Module string. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2029,14 +2124,15 @@ Module string. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2079,7 +2175,9 @@ Module string. |), [ M.read (| string |); - M.read (| Value.String (String.String "253" "") |) + M.read (| + M.of_value (| Value.String (String.String "253" "") |) + |) ] |) |))) @@ -2107,7 +2205,7 @@ Module string. } } *) - Definition from_utf16be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf16be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -2117,15 +2215,16 @@ Module string. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Panic.rem (| + BinOp.Pure.ne (| + BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -2134,9 +2233,10 @@ Module string. |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 2 - |)) - (Value.Integer Integer.Usize 0) + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2144,34 +2244,42 @@ Module string. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "alloc::string::FromUtf16Error" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "alloc::string::FromUtf16Error" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - Value.Bool false; - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "align_to", - [ Ty.path "u16" ] - |), - [ M.read (| v |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Bool false |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "align_to", + [ Ty.path "u16" ] + |), + [ M.read (| v |) ] + |)) + ] + |) |), [ fun γ => @@ -2323,8 +2431,8 @@ Module string. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2333,13 +2441,16 @@ Module string. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "alloc::string::FromUtf16Error" - [ Value.Tuple [] ])) + (M.of_value (| + Value.StructTuple + "alloc::string::FromUtf16Error" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -2367,7 +2478,7 @@ Module string. } } *) - Definition from_utf16be_lossy (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf16be_lossy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -2375,18 +2486,21 @@ Module string. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - Value.Bool false; - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "align_to", - [ Ty.path "u16" ] - |), - [ M.read (| v |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Bool false |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "align_to", + [ Ty.path "u16" ] + |), + [ M.read (| v |) ] + |)) + ] + |) |), [ fun γ => @@ -2443,7 +2557,7 @@ Module string. |), [ M.read (| v |) ] |); - M.read (| Value.String (String.String "253" "") |) + M.read (| M.of_value (| Value.String (String.String "253" "") |) |) ] |) |))); @@ -2642,8 +2756,8 @@ Module string. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2677,14 +2791,15 @@ Module string. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2727,7 +2842,9 @@ Module string. |), [ M.read (| string |); - M.read (| Value.String (String.String "253" "") |) + M.read (| + M.of_value (| Value.String (String.String "253" "") |) + |) ] |) |))) @@ -2747,7 +2864,7 @@ Module string. self.vec.into_raw_parts() } *) - Definition into_raw_parts (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw_parts (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2775,28 +2892,31 @@ Module string. unsafe { String { vec: Vec::from_raw_parts(buf, length, capacity) } } } *) - Definition from_raw_parts (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_parts (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ buf; length; capacity ] => ltac:(M.monadic (let buf := M.alloc (| buf |) in let length := M.alloc (| length |) in let capacity := M.alloc (| capacity |) in - Value.StructRecord - "alloc::string::String" - [ - ("vec", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - "from_raw_parts", - [] - |), - [ M.read (| buf |); M.read (| length |); M.read (| capacity |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::string::String" + [ + ("vec", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "from_raw_parts", + [] + |), + [ M.read (| buf |); M.read (| length |); M.read (| capacity |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -2808,12 +2928,14 @@ Module string. String { vec: bytes } } *) - Definition from_utf8_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf8_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic (let bytes := M.alloc (| bytes |) in - Value.StructRecord "alloc::string::String" [ ("vec", M.read (| bytes |)) ])) + M.of_value (| + Value.StructRecord "alloc::string::String" [ ("vec", A.to_value (M.read (| bytes |))) ] + |))) | _, _ => M.impossible end. @@ -2825,7 +2947,7 @@ Module string. self.vec } *) - Definition into_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition into_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2843,7 +2965,7 @@ Module string. self } *) - Definition as_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2868,7 +2990,7 @@ Module string. self } *) - Definition as_mut_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2893,7 +3015,7 @@ Module string. self.vec.extend_from_slice(string.as_bytes()) } *) - Definition push_str (τ : list Ty.t) (α : list Value.t) : M := + Definition push_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; string ] => ltac:(M.monadic @@ -2935,7 +3057,7 @@ Module string. self.vec.extend_from_within(src); } *) - Definition extend_from_within (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_from_within (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ R ], [ self; src ] => ltac:(M.monadic @@ -2948,19 +3070,22 @@ Module string. M.get_function (| "core::slice::index::range", [ R ] |), [ M.read (| src |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.path "alloc::string::String", - "len", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "alloc::string::String", + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |), @@ -2984,15 +3109,15 @@ Module string. let end_ := M.copy (| γ1_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -3011,7 +3136,8 @@ Module string. |); M.read (| start |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3024,27 +3150,29 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.is_char_boundary(start)" + M.of_value (| + Value.String + "assertion failed: self.is_char_boundary(start)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -3063,7 +3191,8 @@ Module string. |); M.read (| end_ |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3076,13 +3205,16 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.is_char_boundary(end)" + M.of_value (| + Value.String + "assertion failed: self.is_char_boundary(end)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -3105,7 +3237,7 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3120,7 +3252,7 @@ Module string. self.vec.capacity() } *) - Definition capacity (τ : list Ty.t) (α : list Value.t) : M := + Definition capacity (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3149,7 +3281,7 @@ Module string. self.vec.reserve(additional) } *) - Definition reserve (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; additional ] => ltac:(M.monadic @@ -3180,7 +3312,7 @@ Module string. self.vec.reserve_exact(additional) } *) - Definition reserve_exact (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve_exact (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; additional ] => ltac:(M.monadic @@ -3212,7 +3344,7 @@ Module string. self.vec.try_reserve(additional) } *) - Definition try_reserve (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; additional ] => ltac:(M.monadic @@ -3243,7 +3375,7 @@ Module string. self.vec.try_reserve_exact(additional) } *) - Definition try_reserve_exact (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve_exact (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; additional ] => ltac:(M.monadic @@ -3275,7 +3407,7 @@ Module string. self.vec.shrink_to_fit() } *) - Definition shrink_to_fit (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink_to_fit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3305,7 +3437,7 @@ Module string. self.vec.shrink_to(min_capacity) } *) - Definition shrink_to (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink_to (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; min_capacity ] => ltac:(M.monadic @@ -3339,7 +3471,7 @@ Module string. } } *) - Definition push (τ : list Ty.t) (α : list Value.t) : M := + Definition push (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ch ] => ltac:(M.monadic @@ -3356,11 +3488,7 @@ Module string. [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 1 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3376,7 +3504,7 @@ Module string. "alloc::string::String", "vec" |); - M.rust_cast (M.read (| ch |)) + M.rust_cast (| M.read (| ch |) |) ] |) |))); @@ -3405,8 +3533,9 @@ Module string. [ M.read (| ch |); (* Unsize *) - M.pointer_coercion - (M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |)) + M.pointer_coercion (| + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) + |) ] |) ] @@ -3427,7 +3556,7 @@ Module string. &self.vec } *) - Definition as_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3461,7 +3590,7 @@ Module string. } } *) - Definition truncate (τ : list Ty.t) (α : list Value.t) : M := + Definition truncate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_len ] => ltac:(M.monadic @@ -3469,36 +3598,37 @@ Module string. let new_len := M.alloc (| new_len |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| new_len |)) - (M.call_closure (| + BinOp.Pure.le (| + M.read (| new_len |), + M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "len", [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -3517,7 +3647,8 @@ Module string. |); M.read (| new_len |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3530,14 +3661,16 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.is_char_boundary(new_len)" + M.of_value (| + Value.String + "assertion failed: self.is_char_boundary(new_len)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3559,7 +3692,7 @@ Module string. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3578,7 +3711,7 @@ Module string. Some(ch) } *) - Definition pop (τ : list Ty.t) (α : list Value.t) : M := + Definition pop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3693,6 +3826,7 @@ Module string. let newlen := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "len", [] |), [ M.read (| self |) ] @@ -3724,8 +3858,12 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ch |) ] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| ch |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -3749,7 +3887,7 @@ Module string. ch } *) - Definition remove (τ : list Ty.t) (α : list Value.t) : M := + Definition remove (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; idx ] => ltac:(M.monadic @@ -3787,9 +3925,11 @@ Module string. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| idx |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| idx |))) ] + |) ] |) ] @@ -3824,16 +3964,22 @@ Module string. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "cannot remove a char from the end of a string" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "cannot remove a char from the end of a string" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -3846,6 +3992,7 @@ Module string. let next := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), M.call_closure (| M.get_associated_function (| Ty.path "char", "len_utf8", [] |), @@ -3918,7 +4065,7 @@ Module string. M.read (| idx |) ] |); - BinOp.Panic.sub (| M.read (| len |), M.read (| next |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| next |) |) ] |) |) in @@ -3939,13 +4086,14 @@ Module string. "vec" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), - BinOp.Panic.sub (| M.read (| next |), M.read (| idx |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| next |), M.read (| idx |) |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in ch |))) | _, _ => M.impossible @@ -4006,7 +4154,7 @@ Module string. } } *) - Definition remove_matches (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic @@ -4040,7 +4188,7 @@ Module string. ] |) |) in - let front := M.alloc (| Value.Integer Integer.Usize 0 |) in + let front := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let rejections := M.alloc (| M.call_closure (| @@ -4080,8 +4228,8 @@ Module string. ] |), [ - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4191,15 +4339,22 @@ Module string. let _ := M.write (| front, M.read (| end_ |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.read (| prev_front |); - M.read (| start |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| prev_front |)); + A.to_value + (M.read (| start |)) + ] + |)) + ] + |) |))) ] |) @@ -4207,7 +4362,8 @@ Module string. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -4253,25 +4409,28 @@ Module string. [ Ty.tuple [ Ty.path "usize"; Ty.path "usize" ] ] |), [ - Value.Tuple - [ - M.read (| front |); - M.call_closure (| - M.get_associated_function (| - Ty.path "alloc::string::String", - "len", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| front |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "alloc::string::String", + "len", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) ] |) ] |) |) |) in - let len := M.alloc (| Value.Integer Integer.Usize 0 |) in + let len := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let ptr := M.alloc (| M.call_closure (| @@ -4371,22 +4530,24 @@ Module string. let count := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| end_ |), M.read (| start |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| start |)) - (M.read (| len |)) + BinOp.Pure.ne (| + M.read (| start |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4402,8 +4563,8 @@ Module string. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -4412,7 +4573,8 @@ Module string. [] |), [ M.read (| ptr |); M.read (| start |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -4427,20 +4589,26 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := len in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| count |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.read (| count |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4464,7 +4632,7 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4526,7 +4694,7 @@ Module string. drop(guard); } *) - Definition retain (τ : list Ty.t) (α : list Value.t) : M := + Definition retain (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; f ] => ltac:(M.monadic @@ -4542,34 +4710,37 @@ Module string. |) in let guard := M.alloc (| - Value.StructRecord - "alloc::string::retain::SetLenOnDrop" - [ - ("s", M.read (| self |)); - ("idx", Value.Integer Integer.Usize 0); - ("del_bytes", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "alloc::string::retain::SetLenOnDrop" + [ + ("s", A.to_value (M.read (| self |))); + ("idx", A.to_value (M.of_value (| Value.Integer 0 |))); + ("del_bytes", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| guard, "alloc::string::retain::SetLenOnDrop", "idx" |) - |)) - (M.read (| len |)) + |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4628,19 +4799,22 @@ Module string. |) ] |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - guard, - "alloc::string::retain::SetLenOnDrop", - "idx" - |) - |)); - ("end_", M.read (| len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + guard, + "alloc::string::retain::SetLenOnDrop", + "idx" + |) + |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) ] |) ] @@ -4660,15 +4834,15 @@ Module string. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -4676,8 +4850,14 @@ Module string. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| ch |) ] ] - |)) + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| ch |)) ] + |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4693,28 +4873,33 @@ Module string. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| ch_len |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.read (| ch_len |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| guard, "alloc::string::retain::SetLenOnDrop", "del_bytes" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4774,6 +4959,7 @@ Module string. ] |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| guard, @@ -4804,8 +4990,10 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -4819,9 +5007,13 @@ Module string. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| ch_len |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.read (| ch_len |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4829,7 +5021,7 @@ Module string. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4846,7 +5038,7 @@ Module string. [ M.read (| guard |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4864,7 +5056,7 @@ Module string. } } *) - Definition insert (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; idx; ch ] => ltac:(M.monadic @@ -4874,15 +5066,15 @@ Module string. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -4901,7 +5093,8 @@ Module string. |); M.read (| idx |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -4910,16 +5103,18 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.is_char_boundary(idx)" + M.of_value (| + Value.String "assertion failed: self.is_char_boundary(idx)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let bits := M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |) in + let bits := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) in let bits := M.alloc (| M.call_closure (| @@ -4927,7 +5122,7 @@ Module string. [ M.call_closure (| M.get_associated_function (| Ty.path "char", "encode_utf8", [] |), - [ M.read (| ch |); (* Unsize *) M.pointer_coercion bits ] + [ M.read (| ch |); (* Unsize *) M.pointer_coercion (| bits |) ] |) ] |) @@ -4943,7 +5138,7 @@ Module string. [ M.read (| self |); M.read (| idx |); M.read (| bits |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4963,7 +5158,7 @@ Module string. } } *) - Definition insert_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; idx; bytes ] => ltac:(M.monadic @@ -5063,10 +5258,10 @@ Module string. |) ] |); - BinOp.Panic.add (| M.read (| idx |), M.read (| amt |) |) + BinOp.Panic.add (| Integer.Usize, M.read (| idx |), M.read (| amt |) |) ] |); - BinOp.Panic.sub (| M.read (| len |), M.read (| idx |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| idx |) |) ] |) |) in @@ -5129,11 +5324,11 @@ Module string. "alloc::string::String", "vec" |); - BinOp.Panic.add (| M.read (| len |), M.read (| amt |) |) + BinOp.Panic.add (| Integer.Usize, M.read (| len |), M.read (| amt |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5149,7 +5344,7 @@ Module string. } } *) - Definition insert_str (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; idx; string ] => ltac:(M.monadic @@ -5159,15 +5354,15 @@ Module string. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -5186,7 +5381,8 @@ Module string. |); M.read (| idx |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -5195,13 +5391,15 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.is_char_boundary(idx)" + M.of_value (| + Value.String "assertion failed: self.is_char_boundary(idx)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -5222,7 +5420,7 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5234,7 +5432,7 @@ Module string. &mut self.vec } *) - Definition as_mut_vec (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_vec (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5254,7 +5452,7 @@ Module string. self.vec.len() } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5283,17 +5481,18 @@ Module string. self.len() == 0 } *) - Definition is_empty (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -5306,7 +5505,7 @@ Module string. unsafe { String::from_utf8_unchecked(other) } } *) - Definition split_off (τ : list Ty.t) (α : list Value.t) : M := + Definition split_off (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; at_ ] => ltac:(M.monadic @@ -5315,15 +5514,15 @@ Module string. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -5342,7 +5541,8 @@ Module string. |); M.read (| at_ |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -5351,13 +5551,15 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.is_char_boundary(at)" + M.of_value (| + Value.String "assertion failed: self.is_char_boundary(at)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let other := @@ -5401,7 +5603,7 @@ Module string. self.vec.clear() } *) - Definition clear (τ : list Ty.t) (α : list Value.t) : M := + Definition clear (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5449,7 +5651,7 @@ Module string. Drain { start, end, iter: chars_iter, string: self_ptr } } *) - Definition drain (τ : list Ty.t) (α : list Value.t) : M := + Definition drain (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ R ], [ self; range ] => ltac:(M.monadic @@ -5462,19 +5664,22 @@ Module string. M.get_function (| "core::slice::index::range", [ R ] |), [ M.read (| range |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.path "alloc::string::String", - "len", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "alloc::string::String", + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |), @@ -5497,15 +5702,15 @@ Module string. let end_ := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -5524,7 +5729,8 @@ Module string. |); M.read (| start |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5537,27 +5743,29 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.is_char_boundary(start)" + M.of_value (| + Value.String + "assertion failed: self.is_char_boundary(start)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -5576,7 +5784,8 @@ Module string. |); M.read (| end_ |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5589,13 +5798,16 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.is_char_boundary(end)" + M.of_value (| + Value.String + "assertion failed: self.is_char_boundary(end)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let self_ptr := M.copy (| M.use (M.alloc (| M.read (| self |) |)) |) in @@ -5621,23 +5833,30 @@ Module string. |), [ M.read (| self |) ] |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) ] |) |) in M.alloc (| - Value.StructRecord - "alloc::string::Drain" - [ - ("start", M.read (| start |)); - ("end_", M.read (| end_ |)); - ("iter", M.read (| chars_iter |)); - ("string", M.read (| self_ptr |)) - ] + M.of_value (| + Value.StructRecord + "alloc::string::Drain" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))); + ("iter", A.to_value (M.read (| chars_iter |))); + ("string", A.to_value (M.read (| self_ptr |))) + ] + |) |))) ] |) @@ -5678,7 +5897,7 @@ Module string. unsafe { self.as_mut_vec() }.splice((start, end), replace_with.bytes()); } *) - Definition replace_range (τ : list Ty.t) (α : list Value.t) : M := + Definition replace_range (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ R ], [ self; range; replace_with ] => ltac:(M.monadic @@ -5714,15 +5933,15 @@ Module string. let γ0_0 := M.read (| γ0_0 |) in let n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -5741,7 +5960,8 @@ Module string. |); M.read (| n |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5754,13 +5974,15 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.is_char_boundary(n)" + M.of_value (| + Value.String "assertion failed: self.is_char_boundary(n)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -5774,15 +5996,15 @@ Module string. let γ0_0 := M.read (| γ0_0 |) in let n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -5800,11 +6022,13 @@ Module string. [ M.read (| self |) ] |); BinOp.Panic.add (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5817,17 +6041,19 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.is_char_boundary(n + 1)" + M.of_value (| + Value.String + "assertion failed: self.is_char_boundary(n + 1)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let end_ := @@ -5858,15 +6084,15 @@ Module string. let γ0_0 := M.read (| γ0_0 |) in let n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -5884,11 +6110,13 @@ Module string. [ M.read (| self |) ] |); BinOp.Panic.add (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5901,14 +6129,16 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.is_char_boundary(n + 1)" + M.of_value (| + Value.String + "assertion failed: self.is_char_boundary(n + 1)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -5922,15 +6152,15 @@ Module string. let γ0_0 := M.read (| γ0_0 |) in let n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -5949,7 +6179,8 @@ Module string. |); M.read (| n |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5962,16 +6193,18 @@ Module string. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.is_char_boundary(n)" + M.of_value (| + Value.String "assertion failed: self.is_char_boundary(n)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6004,7 +6237,10 @@ Module string. |), [ M.read (| self |) ] |); - Value.Tuple [ M.read (| start |); M.read (| end_ |) ]; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| start |)); A.to_value (M.read (| end_ |)) ] + |); M.call_closure (| M.get_associated_function (| Ty.path "str", "bytes", [] |), [ M.read (| replace_with |) ] @@ -6012,7 +6248,7 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6026,7 +6262,7 @@ Module string. unsafe { from_boxed_utf8_unchecked(slice) } } *) - Definition into_boxed_str (τ : list Ty.t) (α : list Value.t) : M := + Definition into_boxed_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6072,7 +6308,7 @@ Module string. unsafe { from_utf8_unchecked_mut(slice) } } *) - Definition leak (τ : list Ty.t) (α : list Value.t) : M := + Definition leak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6120,7 +6356,7 @@ Module string. &self.bytes[..] } *) - Definition as_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6139,7 +6375,7 @@ Module string. "alloc::string::FromUtf8Error", "bytes" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |))) | _, _ => M.impossible @@ -6152,7 +6388,7 @@ Module string. self.bytes } *) - Definition into_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition into_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6170,7 +6406,7 @@ Module string. self.error } *) - Definition utf8_error (τ : list Ty.t) (α : list Value.t) : M := + Definition utf8_error (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6196,7 +6432,7 @@ Module string. fmt::Display::fmt(&self.error, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6238,7 +6474,7 @@ Module string. fmt::Display::fmt("invalid utf-16: lone surrogate found", f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6246,7 +6482,10 @@ Module string. let f := M.alloc (| f |) in M.call_closure (| M.get_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |), - [ M.read (| Value.String "invalid utf-16: lone surrogate found" |); M.read (| f |) ] + [ + M.read (| M.of_value (| Value.String "invalid utf-16: lone surrogate found" |) |); + M.read (| f |) + ] |))) | _, _ => M.impossible end. @@ -6267,12 +6506,12 @@ Module string. "invalid utf-8" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "invalid utf-8" |))) + M.read (| M.of_value (| Value.String "invalid utf-8" |) |))) | _, _ => M.impossible end. @@ -6292,12 +6531,12 @@ Module string. "invalid utf-16" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "invalid utf-16" |))) + M.read (| M.of_value (| Value.String "invalid utf-16" |) |))) | _, _ => M.impossible end. @@ -6317,34 +6556,37 @@ Module string. String { vec: self.vec.clone() } } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "alloc::string::String" - [ - ("vec", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::string::String", - "vec" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::string::String" + [ + ("vec", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::string::String", + "vec" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -6353,7 +6595,7 @@ Module string. self.vec.clone_from(&source.vec); } *) - Definition clone_from (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; source ] => ltac:(M.monadic @@ -6386,7 +6628,7 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6410,7 +6652,7 @@ Module string. buf } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6459,7 +6701,7 @@ Module string. buf } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6508,7 +6750,7 @@ Module string. buf } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6566,7 +6808,7 @@ Module string. } } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6654,7 +6896,7 @@ Module string. buf } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6721,7 +6963,7 @@ Module string. } } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6822,7 +7064,7 @@ Module string. iterator.for_each(move |c| self.push(c)); } *) - Definition extend (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; iter ] => ltac:(M.monadic @@ -6884,8 +7126,8 @@ Module string. |), [ M.read (| iterator |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6906,11 +7148,12 @@ Module string. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -6922,7 +7165,7 @@ Module string. self.push(c); } *) - Definition extend_one (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; c ] => ltac:(M.monadic @@ -6936,7 +7179,7 @@ Module string. [ M.read (| self |); M.read (| c |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6946,7 +7189,7 @@ Module string. self.reserve(additional); } *) - Definition extend_reserve (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_reserve (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; additional ] => ltac:(M.monadic @@ -6960,7 +7203,7 @@ Module string. [ M.read (| self |); M.read (| additional |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6986,7 +7229,7 @@ Module string. self.extend(iter.into_iter().cloned()); } *) - Definition extend (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; iter ] => ltac:(M.monadic @@ -7029,7 +7272,7 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7039,7 +7282,7 @@ Module string. self.push(c); } *) - Definition extend_one (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -7064,7 +7307,7 @@ Module string. [ M.read (| self |); M.read (| c |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) @@ -7076,7 +7319,7 @@ Module string. self.reserve(additional); } *) - Definition extend_reserve (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_reserve (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; additional ] => ltac:(M.monadic @@ -7090,7 +7333,7 @@ Module string. [ M.read (| self |); M.read (| additional |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7116,7 +7359,7 @@ Module string. iter.into_iter().for_each(move |s| self.push_str(s)); } *) - Definition extend (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; iter ] => ltac:(M.monadic @@ -7148,8 +7391,8 @@ Module string. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7170,11 +7413,12 @@ Module string. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7184,7 +7428,7 @@ Module string. self.push_str(s); } *) - Definition extend_one (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -7198,7 +7442,7 @@ Module string. [ M.read (| self |); M.read (| s |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7221,7 +7465,7 @@ Module string. iter.into_iter().for_each(move |s| self.push_str(&s)); } *) - Definition extend (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; iter ] => ltac:(M.monadic @@ -7260,8 +7504,8 @@ Module string. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7282,11 +7526,12 @@ Module string. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7311,7 +7556,7 @@ Module string. iter.into_iter().for_each(move |s| self.push_str(&s)); } *) - Definition extend (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; iter ] => ltac:(M.monadic @@ -7339,8 +7584,8 @@ Module string. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7373,11 +7618,12 @@ Module string. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7387,7 +7633,7 @@ Module string. self.push_str(&s); } *) - Definition extend_one (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -7413,7 +7659,7 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7436,7 +7682,7 @@ Module string. iter.into_iter().for_each(move |s| self.push_str(&s)); } *) - Definition extend (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; iter ] => ltac:(M.monadic @@ -7468,8 +7714,8 @@ Module string. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7504,11 +7750,12 @@ Module string. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7518,7 +7765,7 @@ Module string. self.push_str(&s); } *) - Definition extend_one (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -7544,7 +7791,7 @@ Module string. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7571,7 +7818,7 @@ Module string. self[..].into_searcher(haystack) } *) - Definition into_searcher (τ : list Ty.t) (α : list Value.t) : M := + Definition into_searcher (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7594,7 +7841,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| haystack |) ] @@ -7607,7 +7857,7 @@ Module string. self[..].is_contained_in(haystack) } *) - Definition is_contained_in (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contained_in (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7630,7 +7880,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| haystack |) ] @@ -7643,7 +7896,7 @@ Module string. self[..].is_prefix_of(haystack) } *) - Definition is_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7666,7 +7919,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| haystack |) ] @@ -7679,7 +7935,7 @@ Module string. self[..].strip_prefix_of(haystack) } *) - Definition strip_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7702,7 +7958,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| haystack |) ] @@ -7715,7 +7974,7 @@ Module string. self[..].is_suffix_of(haystack) } *) - Definition is_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7738,7 +7997,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| haystack |) ] @@ -7751,7 +8013,7 @@ Module string. self[..].strip_suffix_of(haystack) } *) - Definition strip_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7774,7 +8036,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| haystack |) ] @@ -7807,7 +8072,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7830,7 +8095,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -7840,7 +8108,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -7852,7 +8123,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7875,7 +8146,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -7885,7 +8159,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -7908,7 +8185,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7931,7 +8208,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -7941,7 +8221,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -7953,7 +8236,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7976,7 +8259,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -7986,7 +8272,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -8009,7 +8298,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8032,7 +8321,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -8044,7 +8336,7 @@ Module string. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8057,7 +8349,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8080,7 +8372,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -8092,7 +8387,7 @@ Module string. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8116,7 +8411,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8139,7 +8434,9 @@ Module string. "index", [] |), - [ M.read (| M.read (| self |) |); Value.StructTuple "core::ops::range::RangeFull" [] + [ + M.read (| M.read (| self |) |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8150,7 +8447,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -8162,7 +8462,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8185,7 +8485,9 @@ Module string. "index", [] |), - [ M.read (| M.read (| self |) |); Value.StructTuple "core::ops::range::RangeFull" [] + [ + M.read (| M.read (| self |) |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8196,7 +8498,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -8219,7 +8524,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8253,7 +8558,7 @@ Module string. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8264,7 +8569,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -8276,7 +8584,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8310,7 +8618,7 @@ Module string. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8321,7 +8629,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -8344,7 +8655,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8367,7 +8678,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -8388,7 +8702,7 @@ Module string. |), [ M.read (| other |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8401,7 +8715,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8424,7 +8738,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -8445,7 +8762,7 @@ Module string. |), [ M.read (| other |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8470,7 +8787,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8504,7 +8821,7 @@ Module string. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8517,7 +8834,7 @@ Module string. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8530,7 +8847,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8564,7 +8881,7 @@ Module string. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8577,7 +8894,7 @@ Module string. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8601,7 +8918,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8624,7 +8941,9 @@ Module string. "index", [] |), - [ M.read (| M.read (| self |) |); Value.StructTuple "core::ops::range::RangeFull" [] + [ + M.read (| M.read (| self |) |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8646,7 +8965,7 @@ Module string. |), [ M.read (| other |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8659,7 +8978,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8682,7 +9001,9 @@ Module string. "index", [] |), - [ M.read (| M.read (| self |) |); Value.StructTuple "core::ops::range::RangeFull" [] + [ + M.read (| M.read (| self |) |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8704,7 +9025,7 @@ Module string. |), [ M.read (| other |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8729,7 +9050,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8763,7 +9084,7 @@ Module string. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8774,7 +9095,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -8786,7 +9110,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8820,7 +9144,7 @@ Module string. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8831,7 +9155,10 @@ Module string. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -8854,7 +9181,7 @@ Module string. PartialEq::eq(&self[..], &other[..]) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8877,7 +9204,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -8898,7 +9228,7 @@ Module string. |), [ M.read (| other |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8911,7 +9241,7 @@ Module string. PartialEq::ne(&self[..], &other[..]) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8934,7 +9264,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -8955,7 +9288,7 @@ Module string. |), [ M.read (| other |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8980,7 +9313,7 @@ Module string. String::new() } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -9007,7 +9340,7 @@ Module string. fmt::Display::fmt(&**self, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9048,7 +9381,7 @@ Module string. fmt::Debug::fmt(&**self, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9089,7 +9422,7 @@ Module string. ( **self).hash(hasher) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; hasher ] => ltac:(M.monadic @@ -9134,7 +9467,7 @@ Module string. self } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9169,7 +9502,7 @@ Module string. self.push_str(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9183,7 +9516,7 @@ Module string. [ M.read (| self |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9207,7 +9540,7 @@ Module string. &self[..][index] } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9230,7 +9563,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| index |) ] @@ -9259,7 +9595,7 @@ Module string. &self[..][index] } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9282,7 +9618,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| index |) ] @@ -9311,7 +9650,7 @@ Module string. &self[..][index] } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9334,7 +9673,10 @@ Module string. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| index |) ] @@ -9363,7 +9705,7 @@ Module string. unsafe { str::from_utf8_unchecked(&self.vec) } } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _index ] => ltac:(M.monadic @@ -9415,7 +9757,7 @@ Module string. Index::index(&**self, index) } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9467,7 +9809,7 @@ Module string. Index::index(&**self, index) } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9516,7 +9858,7 @@ Module string. &mut self[..][index] } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9539,7 +9881,10 @@ Module string. "index_mut", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| index |) ] @@ -9564,7 +9909,7 @@ Module string. &mut self[..][index] } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9587,7 +9932,10 @@ Module string. "index_mut", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| index |) ] @@ -9612,7 +9960,7 @@ Module string. &mut self[..][index] } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9635,7 +9983,10 @@ Module string. "index_mut", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| index |) ] @@ -9660,7 +10011,7 @@ Module string. unsafe { str::from_utf8_unchecked_mut(&mut *self.vec) } } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _index ] => ltac:(M.monadic @@ -9708,7 +10059,7 @@ Module string. IndexMut::index_mut(&mut **self, index) } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9756,7 +10107,7 @@ Module string. IndexMut::index_mut(&mut **self, index) } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -9807,7 +10158,7 @@ Module string. unsafe { str::from_utf8_unchecked(&self.vec) } } *) - Definition deref (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9855,7 +10206,7 @@ Module string. unsafe { str::from_utf8_unchecked_mut(&mut *self.vec) } } *) - Definition deref_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9907,25 +10258,28 @@ Module string. Ok(String::from(s)) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "alloc::string::String", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ], - "from", - [] - |), - [ M.read (| s |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloc::string::String", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ], + "from", + [] + |), + [ M.read (| s |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9954,7 +10308,7 @@ Module string. buf } *) - Definition to_string (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9972,7 +10326,7 @@ Module string. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "new", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in let _ := @@ -9991,7 +10345,9 @@ Module string. [ M.read (| self |); formatter ] |); M.read (| - Value.String "a Display implementation returned an error unexpectedly" + M.of_value (| + Value.String "a Display implementation returned an error unexpectedly" + |) |) ] |) @@ -10018,7 +10374,7 @@ Module string. self.as_str().to_owned() } *) - Definition to_string (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10055,7 +10411,7 @@ Module string. String::from(self.encode_utf8(&mut [0; 4])) } *) - Definition to_string (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10074,7 +10430,9 @@ Module string. [ M.read (| M.read (| self |) |); (* Unsize *) - M.pointer_coercion (M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |)) + M.pointer_coercion (| + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) + |) ] |) ] @@ -10098,7 +10456,7 @@ Module string. String::from(if *self { "true" } else { "false" }) } *) - Definition to_string (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10114,15 +10472,17 @@ Module string. [ M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.read (| self |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "true")); - fun γ => ltac:(M.monadic (M.alloc (| M.read (| Value.String "false" |) |))) + M.of_value (| Value.String "true" |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.read (| M.of_value (| Value.String "false" |) |) |))) ] |) |) @@ -10158,7 +10518,7 @@ Module string. buf } *) - Definition to_string (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10172,32 +10532,35 @@ Module string. "with_capacity", [] |), - [ Value.Integer Integer.Usize 3 ] + [ M.of_value (| Value.Integer 3 |) ] |) |) in let n := M.copy (| M.read (| self |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| n |)) (Value.Integer Integer.U8 10) + BinOp.Pure.ge (| M.read (| n |), M.of_value (| Value.Integer 10 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| n |)) (Value.Integer Integer.U8 100) + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 100 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10214,14 +10577,17 @@ Module string. |), [ buf; - M.rust_cast - (BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), + M.rust_cast (| + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), BinOp.Panic.div (| + Integer.U8, M.read (| n |), - Value.Integer Integer.U8 100 + M.of_value (| Value.Integer 100 |) |) - |)) + |) + |) ] |) |) in @@ -10230,12 +10596,14 @@ Module string. M.write (| β, BinOp.Panic.rem (| + Integer.U8, M.read (| β |), - Value.Integer Integer.U8 100 + M.of_value (| Value.Integer 100 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -10248,11 +10616,17 @@ Module string. |), [ buf; - M.rust_cast - (BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - BinOp.Panic.div (| M.read (| n |), Value.Integer Integer.U8 10 |) - |)) + M.rust_cast (| + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + BinOp.Panic.div (| + Integer.U8, + M.read (| n |), + M.of_value (| Value.Integer 10 |) + |) + |) + |) ] |) |) in @@ -10260,10 +10634,14 @@ Module string. let β := n in M.write (| β, - BinOp.Panic.rem (| M.read (| β |), Value.Integer Integer.U8 10 |) + BinOp.Panic.rem (| + Integer.U8, + M.read (| β |), + M.of_value (| Value.Integer 10 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -10272,8 +10650,13 @@ Module string. M.get_associated_function (| Ty.path "alloc::string::String", "push", [] |), [ buf; - M.rust_cast - (BinOp.Panic.add (| M.read (| UnsupportedLiteral |), M.read (| n |) |)) + M.rust_cast (| + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| n |) + |) + |) ] |) |) in @@ -10312,7 +10695,7 @@ Module string. buf } *) - Definition to_string (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10326,12 +10709,12 @@ Module string. "with_capacity", [] |), - [ Value.Integer Integer.Usize 4 ] + [ M.of_value (| Value.Integer 4 |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10352,11 +10735,11 @@ Module string. "push", [] |), - [ buf; Value.UnicodeChar 45 ] + [ buf; M.of_value (| Value.UnicodeChar 45 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let n := @@ -10368,26 +10751,29 @@ Module string. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| n |)) (Value.Integer Integer.U8 10) + BinOp.Pure.ge (| M.read (| n |), M.of_value (| Value.Integer 10 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| n |)) (Value.Integer Integer.U8 100) + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 100 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10402,7 +10788,7 @@ Module string. "push", [] |), - [ buf; Value.UnicodeChar 49 ] + [ buf; M.of_value (| Value.UnicodeChar 49 |) ] |) |) in let _ := @@ -10410,12 +10796,14 @@ Module string. M.write (| β, BinOp.Panic.sub (| + Integer.U8, M.read (| β |), - Value.Integer Integer.U8 100 + M.of_value (| Value.Integer 100 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -10428,11 +10816,17 @@ Module string. |), [ buf; - M.rust_cast - (BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - BinOp.Panic.div (| M.read (| n |), Value.Integer Integer.U8 10 |) - |)) + M.rust_cast (| + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + BinOp.Panic.div (| + Integer.U8, + M.read (| n |), + M.of_value (| Value.Integer 10 |) + |) + |) + |) ] |) |) in @@ -10440,10 +10834,14 @@ Module string. let β := n in M.write (| β, - BinOp.Panic.rem (| M.read (| β |), Value.Integer Integer.U8 10 |) + BinOp.Panic.rem (| + Integer.U8, + M.read (| β |), + M.of_value (| Value.Integer 10 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -10452,8 +10850,13 @@ Module string. M.get_associated_function (| Ty.path "alloc::string::String", "push", [] |), [ buf; - M.rust_cast - (BinOp.Panic.add (| M.read (| UnsupportedLiteral |), M.read (| n |) |)) + M.rust_cast (| + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| n |) + |) + |) ] |) |) in @@ -10478,7 +10881,7 @@ Module string. String::from(self) } *) - Definition to_string (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10512,7 +10915,7 @@ Module string. self[..].to_owned() } *) - Definition to_string (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10539,7 +10942,7 @@ Module string. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -10563,7 +10966,7 @@ Module string. self.to_owned() } *) - Definition to_string (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10597,7 +11000,7 @@ Module string. crate::fmt::format( *self) } *) - Definition to_string (τ : list Ty.t) (α : list Value.t) : M := + Definition to_string (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10625,7 +11028,7 @@ Module string. self } *) - Definition as_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10659,7 +11062,7 @@ Module string. self } *) - Definition as_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10693,7 +11096,7 @@ Module string. self.as_bytes() } *) - Definition as_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10721,7 +11124,7 @@ Module string. s.to_owned() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -10749,7 +11152,7 @@ Module string. s.to_owned() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -10777,7 +11180,7 @@ Module string. s.clone() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -10812,7 +11215,7 @@ Module string. s.into_string() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -10845,7 +11248,7 @@ Module string. s.into_boxed_str() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -10873,7 +11276,7 @@ Module string. s.into_owned() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -10906,12 +11309,14 @@ Module string. Cow::Borrowed(s) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in - Value.StructTuple "alloc::borrow::Cow::Borrowed" [ M.read (| s |) ])) + M.of_value (| + Value.StructTuple "alloc::borrow::Cow::Borrowed" [ A.to_value (M.read (| s |)) ] + |))) | _, _ => M.impossible end. @@ -10931,12 +11336,14 @@ Module string. Cow::Owned(s) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in - Value.StructTuple "alloc::borrow::Cow::Owned" [ M.read (| s |) ])) + M.of_value (| + Value.StructTuple "alloc::borrow::Cow::Owned" [ A.to_value (M.read (| s |)) ] + |))) | _, _ => M.impossible end. @@ -10956,19 +11363,22 @@ Module string. Cow::Borrowed(s.as_str()) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in - Value.StructTuple - "alloc::borrow::Cow::Borrowed" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "alloc::string::String", "as_str", [] |), - [ M.read (| s |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Borrowed" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "alloc::string::String", "as_str", [] |), + [ M.read (| s |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10989,25 +11399,28 @@ Module string. Cow::Owned(FromIterator::from_iter(it)) } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ it ] => ltac:(M.monadic (let it := M.alloc (| it |) in - Value.StructTuple - "alloc::borrow::Cow::Owned" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::FromIterator", - Ty.path "alloc::string::String", - [ Ty.path "char" ], - "from_iter", - [ I ] - |), - [ M.read (| it |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Owned" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::FromIterator", + Ty.path "alloc::string::String", + [ Ty.path "char" ], + "from_iter", + [ I ] + |), + [ M.read (| it |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11027,25 +11440,28 @@ Module string. Cow::Owned(FromIterator::from_iter(it)) } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ it ] => ltac:(M.monadic (let it := M.alloc (| it |) in - Value.StructTuple - "alloc::borrow::Cow::Owned" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::FromIterator", - Ty.path "alloc::string::String", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ], - "from_iter", - [ I ] - |), - [ M.read (| it |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Owned" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::FromIterator", + Ty.path "alloc::string::String", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ], + "from_iter", + [ I ] + |), + [ M.read (| it |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11065,25 +11481,28 @@ Module string. Cow::Owned(FromIterator::from_iter(it)) } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ it ] => ltac:(M.monadic (let it := M.alloc (| it |) in - Value.StructTuple - "alloc::borrow::Cow::Owned" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::FromIterator", - Ty.path "alloc::string::String", - [ Ty.path "alloc::string::String" ], - "from_iter", - [ I ] - |), - [ M.read (| it |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Owned" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::FromIterator", + Ty.path "alloc::string::String", + [ Ty.path "alloc::string::String" ], + "from_iter", + [ I ] + |), + [ M.read (| it |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11104,7 +11523,7 @@ Module string. string.into_bytes() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ string ] => ltac:(M.monadic @@ -11133,7 +11552,7 @@ Module string. Ok(()) } *) - Definition write_str (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -11147,7 +11566,13 @@ Module string. [ M.read (| self |); M.read (| s |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -11158,7 +11583,7 @@ Module string. Ok(()) } *) - Definition write_char (τ : list Ty.t) (α : list Value.t) : M := + Definition write_char (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; c ] => ltac:(M.monadic @@ -11172,7 +11597,13 @@ Module string. [ M.read (| self |); M.read (| c |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -11210,7 +11641,7 @@ Module string. f.debug_tuple("Drain").field(&self.as_str()).finish() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -11233,12 +11664,12 @@ Module string. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Drain" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Drain" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::Drain", @@ -11247,7 +11678,8 @@ Module string. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -11300,7 +11732,7 @@ Module string. } } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11322,7 +11754,7 @@ Module string. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11330,31 +11762,32 @@ Module string. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::string::Drain", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::string::Drain", "end" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::string::Drain", "end" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -11363,7 +11796,8 @@ Module string. [] |), [ M.read (| self_vec |) ] - |)))) + |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -11379,31 +11813,35 @@ Module string. |), [ M.read (| self_vec |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::string::Drain", - "start" - |) - |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::string::Drain", - "end" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::string::Drain", + "start" + |) + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::string::Drain", + "end" + |) + |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -11426,7 +11864,7 @@ Module string. self.iter.as_str() } *) - Definition as_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11455,7 +11893,7 @@ Module string. self.as_str() } *) - Definition as_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11483,7 +11921,7 @@ Module string. self.as_str().as_bytes() } *) - Definition as_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11519,7 +11957,7 @@ Module string. self.iter.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11548,7 +11986,7 @@ Module string. self.iter.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11577,7 +12015,7 @@ Module string. self.next_back() } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11617,7 +12055,7 @@ Module string. self.iter.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11668,7 +12106,7 @@ Module string. c.to_string() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic diff --git a/CoqOfRust/alloc/sync.v b/CoqOfRust/alloc/sync.v index d69f5178c..81c2d97a1 100644 --- a/CoqOfRust/alloc/sync.v +++ b/CoqOfRust/alloc/sync.v @@ -2,13 +2,13 @@ Require Import CoqOfRust.CoqOfRust. Module sync. - Definition value_MAX_REFCOUNT : Value.t := + Definition value_MAX_REFCOUNT : A.t := M.run ltac:(M.monadic - (M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |))). + (M.alloc (| M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) |))). - Definition value_INTERNAL_OVERFLOW_ERROR : Value.t := - M.run ltac:(M.monadic (Value.String "Arc counter overflow")). + Definition value_INTERNAL_OVERFLOW_ERROR : A.t := + M.run ltac:(M.monadic (M.of_value (| Value.String "Arc counter overflow" |))). (* StructRecord { @@ -99,7 +99,7 @@ Module sync. unsafe { Self::from_inner_in(ptr, Global) } } *) - Definition from_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -111,7 +111,7 @@ Module sync. "from_inner_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -125,7 +125,7 @@ Module sync. unsafe { Self::from_ptr_in(ptr, Global) } } *) - Definition from_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -137,7 +137,7 @@ Module sync. "from_ptr_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -157,7 +157,7 @@ Module sync. unsafe { Self::from_inner(Box::leak(x).into()) } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ data ] => @@ -178,29 +178,33 @@ Module sync. [] |), [ - Value.StructRecord - "alloc::sync::ArcInner" - [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("data", M.read (| data |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::ArcInner" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("data", A.to_value (M.read (| data |))) + ] + |) ] |) |) in @@ -306,7 +310,7 @@ Module sync. strong } *) - Definition new_cyclic (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_cyclic (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ data_fn ] => @@ -367,39 +371,44 @@ Module sync. [] |), [ - Value.StructRecord - "alloc::sync::ArcInner" - [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 0 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("data", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ], - "uninit", - [] - |), - [] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::ArcInner" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 0 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("data", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ], + "uninit", + [] + |), + [] + |))) + ] + |) ] |) ] @@ -426,12 +435,15 @@ Module sync. |) in let weak := M.alloc (| - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", M.read (| init_ptr |)); - ("alloc", Value.StructTuple "alloc::alloc::Global" []) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", A.to_value (M.read (| init_ptr |))); + ("alloc", + A.to_value (M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |))) + ] + |) |) in let data := M.alloc (| @@ -454,7 +466,7 @@ Module sync. "call_once", [] |), - [ M.read (| data_fn |); Value.Tuple [ weak ] ] + [ M.read (| data_fn |); M.of_value (| Value.Tuple [ A.to_value weak ] |) ] |) |) in let strong := @@ -500,25 +512,32 @@ Module sync. "alloc::sync::ArcInner", "strong" |); - Value.Integer Integer.Usize 1; - Value.StructTuple "core::sync::atomic::Ordering::Release" [] + M.of_value (| Value.Integer 1 |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Release" [] + |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ prev_value; M.alloc (| Value.Integer Integer.Usize 0 |) ] + M.of_value (| + Value.Tuple + [ + A.to_value prev_value; + A.to_value (M.alloc (| M.of_value (| Value.Integer 0 |) |)) + ] + |) |), [ fun γ => @@ -528,17 +547,19 @@ Module sync. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -550,9 +571,11 @@ Module sync. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -564,43 +587,54 @@ Module sync. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::Arguments", - "new_const", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "No prior strong references should exist" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "No prior strong references should exist" + |) + |)) + ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -644,7 +678,7 @@ Module sync. } } *) - Definition new_uninit (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -701,8 +735,8 @@ Module sync. |), [] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -721,14 +755,17 @@ Module sync. [] |), [ - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |); M.read (| layout |) ] |))) ] |) | _ => M.impossible (||) - end)); + end) + |); M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "cast", @@ -760,7 +797,7 @@ Module sync. } } *) - Definition new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -817,8 +854,8 @@ Module sync. |), [] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -837,14 +874,17 @@ Module sync. [] |), [ - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |); M.read (| layout |) ] |))) ] |) | _ => M.impossible (||) - end)); + end) + |); M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "cast", @@ -870,7 +910,7 @@ Module sync. unsafe { Pin::new_unchecked(Arc::new(data)) } } *) - Definition pin (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pin (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ data ] => @@ -905,7 +945,7 @@ Module sync. unsafe { Ok(Pin::new_unchecked(Arc::try_new(data)?)) } } *) - Definition try_pin (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_pin (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ data ] => @@ -913,116 +953,119 @@ Module sync. (let data := M.alloc (| data |) in M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::pin::Pin") - [ + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "alloc::sync::Arc") - [ T; Ty.path "alloc::alloc::Global" ] - ], - "new_unchecked", - [] - |), - [ - M.read (| - 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.apply - (Ty.path "alloc::sync::Arc") - [ T; Ty.path "alloc::alloc::Global" ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + (Ty.path "core::pin::Pin") + [ + Ty.apply + (Ty.path "alloc::sync::Arc") + [ T; Ty.path "alloc::alloc::Global" ] + ], + "new_unchecked", + [] + |), + [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "alloc::sync::Arc") - [ T; Ty.path "alloc::alloc::Global" ], - "try_new", + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "alloc::sync::Arc") + [ T; Ty.path "alloc::alloc::Global" ]; + Ty.path "core::alloc::AllocError" + ], + [], + "branch", [] |), - [ M.read (| data |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::sync::Arc") + [ T; Ty.path "alloc::alloc::Global" ], + "try_new", + [] + |), + [ M.read (| data |) ] + |) + ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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::pin::Pin") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "alloc::sync::Arc") - [ T; Ty.path "alloc::alloc::Global" ] - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "core::pin::Pin") + [ + Ty.apply + (Ty.path "alloc::sync::Arc") + [ T; Ty.path "alloc::alloc::Global" ] + ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) - |) - ] - |) - ])) + |))); + 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)) + ] + |) + |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -1043,7 +1086,7 @@ Module sync. unsafe { Ok(Self::from_inner(Box::leak(x).into())) } } *) - Definition try_new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ data ] => @@ -1087,29 +1130,33 @@ Module sync. [] |), [ - Value.StructRecord - "alloc::sync::ArcInner" - [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("data", M.read (| data |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::ArcInner" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("data", A.to_value (M.read (| data |))) + ] + |) ] |) ] @@ -1171,51 +1218,54 @@ Module sync. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::sync::Arc") - [ T; Ty.path "alloc::alloc::Global" ], - "from_inner", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "&mut") - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] - ], - "into", + (Ty.path "alloc::sync::Arc") + [ T; Ty.path "alloc::alloc::Global" ], + "from_inner", [] |), [ M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::convert::Into", Ty.apply - (Ty.path "alloc::boxed::Box") - [ - Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ]; - Ty.path "alloc::alloc::Global" - ], - "leak", + (Ty.path "&mut") + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] + ], + "into", [] |), - [ M.read (| x |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "leak", + [] + |), + [ M.read (| x |) ] + |) + ] |) ] - |) - ] - |) - ] + |)) + ] + |) |) |))) |))) @@ -1237,80 +1287,40 @@ Module sync. } } *) - Definition try_new_uninit (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_uninit (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic (M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::sync::Arc") + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::sync::Arc") + [ + Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "from_ptr", + [] + |), [ - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; - Ty.path "alloc::alloc::Global" - ], - "from_ptr", - [] - |), - [ - M.read (| - 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.apply - (Ty.path "*mut") - [ - Ty.apply - (Ty.path "alloc::sync::ArcInner") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ] - ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "alloc::sync::Arc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ], - "try_allocate_for_layout", - [ - Ty.function - [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] - (Ty.apply - (Ty.path "core::result::Result") - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; - Ty.path "core::alloc::AllocError" - ]); - Ty.function - [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] - (Ty.apply (Ty.path "*mut") [ Ty.apply @@ -1320,132 +1330,179 @@ Module sync. (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - ]) - ] + ]; + Ty.path "core::alloc::AllocError" + ], + [], + "branch", + [] |), [ M.call_closure (| M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "new", - [ T ] - |), - [] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let layout := M.copy (| γ |) in - M.call_closure (| - M.get_trait_method (| - "core::alloc::Allocator", - Ty.path "alloc::alloc::Global", - [], - "allocate", - [] - |), - [ - M.alloc (| - Value.StructTuple - "alloc::alloc::Global" - [] - |); - M.read (| layout |) - ] - |))) - ] - |) - | _ => M.impossible (||) - end)); - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], - "cast", - [ Ty.apply - (Ty.path "alloc::sync::ArcInner") + (Ty.path "alloc::sync::Arc") [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] + [ T ]; + Ty.path "alloc::alloc::Global" + ], + "try_allocate_for_layout", + [ + Ty.function + [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] + (Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; + Ty.path "core::alloc::AllocError" + ]); + Ty.function + [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] + (Ty.apply + (Ty.path "*mut") + [ + Ty.apply + (Ty.path "alloc::sync::ArcInner") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "new", + [ T ] + |), + [] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let layout := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::alloc::Allocator", + Ty.path "alloc::alloc::Global", + [], + "allocate", + [] + |), + [ + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::alloc::Global" + [] + |) + |); + M.read (| layout |) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |); + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], + "cast", + [ + Ty.apply + (Ty.path "alloc::sync::ArcInner") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] ] + |) ] |) ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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 "alloc::sync::Arc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::sync::Arc") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ]; + Ty.path "alloc::alloc::Global" + ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) - |) - ] - |) - ])) + |))); + 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)) + ] + |) + |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -1465,80 +1522,40 @@ Module sync. } } *) - Definition try_new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_zeroed (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic (M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::sync::Arc") + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::sync::Arc") + [ + Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; + Ty.path "alloc::alloc::Global" + ], + "from_ptr", + [] + |), [ - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; - Ty.path "alloc::alloc::Global" - ], - "from_ptr", - [] - |), - [ - M.read (| - 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.apply - (Ty.path "*mut") - [ - Ty.apply - (Ty.path "alloc::sync::ArcInner") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ] - ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "alloc::sync::Arc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ], - "try_allocate_for_layout", - [ - Ty.function - [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] - (Ty.apply - (Ty.path "core::result::Result") - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; - Ty.path "core::alloc::AllocError" - ]); - Ty.function - [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] - (Ty.apply (Ty.path "*mut") [ Ty.apply @@ -1548,132 +1565,179 @@ Module sync. (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - ]) - ] + ]; + Ty.path "core::alloc::AllocError" + ], + [], + "branch", + [] |), [ M.call_closure (| M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "new", - [ T ] - |), - [] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let layout := M.copy (| γ |) in - M.call_closure (| - M.get_trait_method (| - "core::alloc::Allocator", - Ty.path "alloc::alloc::Global", - [], - "allocate_zeroed", - [] - |), - [ - M.alloc (| - Value.StructTuple - "alloc::alloc::Global" - [] - |); - M.read (| layout |) - ] - |))) - ] - |) - | _ => M.impossible (||) - end)); - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], - "cast", - [ Ty.apply - (Ty.path "alloc::sync::ArcInner") + (Ty.path "alloc::sync::Arc") [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] + [ T ]; + Ty.path "alloc::alloc::Global" + ], + "try_allocate_for_layout", + [ + Ty.function + [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] + (Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; + Ty.path "core::alloc::AllocError" + ]); + Ty.function + [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] + (Ty.apply + (Ty.path "*mut") + [ + Ty.apply + (Ty.path "alloc::sync::ArcInner") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "new", + [ T ] + |), + [] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let layout := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::alloc::Allocator", + Ty.path "alloc::alloc::Global", + [], + "allocate_zeroed", + [] + |), + [ + M.alloc (| + M.of_value (| + Value.StructTuple + "alloc::alloc::Global" + [] + |) + |); + M.read (| layout |) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |); + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], + "cast", + [ + Ty.apply + (Ty.path "alloc::sync::ArcInner") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] ] + |) ] |) ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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 "alloc::sync::Arc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::sync::Arc") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ]; + Ty.path "alloc::alloc::Global" + ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) - |) - ] - |) - ])) + |))); + 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)) + ] + |) + |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -1686,7 +1750,7 @@ Module sync. unsafe { Arc::from_raw_in(ptr, Global) } } *) - Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -1698,7 +1762,7 @@ Module sync. "from_raw_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -1712,7 +1776,7 @@ Module sync. unsafe { Arc::increment_strong_count_in(ptr, Global) } } *) - Definition increment_strong_count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition increment_strong_count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -1724,7 +1788,7 @@ Module sync. "increment_strong_count_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -1738,7 +1802,7 @@ Module sync. unsafe { Arc::decrement_strong_count_in(ptr, Global) } } *) - Definition decrement_strong_count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition decrement_strong_count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -1750,7 +1814,7 @@ Module sync. "decrement_strong_count_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -1771,7 +1835,7 @@ Module sync. unsafe { Self::initialize_arcinner(ptr, layout, mem_to_arcinner) } } *) - Definition allocate_for_layout (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_for_layout (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ @@ -1821,10 +1885,13 @@ Module sync. "call_once", [] |), - [ M.read (| allocate |); Value.Tuple [ M.read (| layout |) ] ] + [ + M.read (| allocate |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| layout |)) ] |) + ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1842,7 +1909,8 @@ Module sync. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -1879,7 +1947,7 @@ Module sync. Ok(inner) } *) - Definition try_allocate_for_layout (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_allocate_for_layout (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ @@ -1929,7 +1997,10 @@ Module sync. "call_once", [] |), - [ M.read (| allocate |); Value.Tuple [ M.read (| layout |) ] ] + [ + M.read (| allocate |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| layout |)) ] |) + ] |) ] |) @@ -2000,7 +2071,11 @@ Module sync. [ M.read (| ptr |); M.read (| layout |); M.read (| mem_to_arcinner |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| inner |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| inner |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2027,7 +2102,7 @@ Module sync. inner } *) - Definition initialize_arcinner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition initialize_arcinner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ impl_FnOnce__mut_u8__arrow__mut_ArcInner_T_ ], [ ptr; layout; mem_to_arcinner ] => @@ -2048,56 +2123,62 @@ Module sync. |), [ M.read (| mem_to_arcinner |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], - "as_ptr", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - "as_non_null_ptr", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], + "as_ptr", [] |), - [ M.read (| ptr |) ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "as_non_null_ptr", + [] + |), + [ M.read (| ptr |) ] + |) + ] + |)) + ] + |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "for_value", - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] - |), - [ M.read (| inner |) ] - |) - |); - layout - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "for_value", + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] + |), + [ M.read (| inner |) ] + |) + |)); + A.to_value layout + ] + |) |), [ fun γ => @@ -2107,15 +2188,15 @@ Module sync. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.path "core::alloc::layout::Layout", @@ -2124,7 +2205,8 @@ Module sync. [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2136,9 +2218,11 @@ Module sync. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -2153,22 +2237,26 @@ Module sync. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2191,7 +2279,7 @@ Module sync. "new", [] |), - [ Value.Integer Integer.Usize 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -2215,12 +2303,12 @@ Module sync. "new", [] |), - [ Value.Integer Integer.Usize 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in inner |))) | _, _ => M.impossible @@ -2239,20 +2327,23 @@ Module sync. Self { ptr, phantom: PhantomData, alloc } } *) - Definition from_inner_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_inner_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => ltac:(M.monadic (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::sync::Arc" - [ - ("ptr", M.read (| ptr |)); - ("phantom", Value.StructTuple "core::marker::PhantomData" []); - ("alloc", M.read (| alloc |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::sync::Arc" + [ + ("ptr", A.to_value (M.read (| ptr |))); + ("phantom", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |))) | _, _ => M.impossible end. @@ -2265,7 +2356,7 @@ Module sync. unsafe { Self::from_inner_in(NonNull::new_unchecked(ptr), alloc) } } *) - Definition from_ptr_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -2303,7 +2394,7 @@ Module sync. &this.alloc } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -2337,7 +2428,7 @@ Module sync. unsafe { Self::from_inner_in(ptr.into(), alloc) } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ data; alloc ] => @@ -2356,29 +2447,33 @@ Module sync. [] |), [ - Value.StructRecord - "alloc::sync::ArcInner" - [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("data", M.read (| data |)) - ]; + M.of_value (| + Value.StructRecord + "alloc::sync::ArcInner" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("data", A.to_value (M.read (| data |))) + ] + |); M.read (| alloc |) ] |) @@ -2455,7 +2550,7 @@ Module sync. } } *) - Definition new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -2510,8 +2605,8 @@ Module sync. |), [] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2534,7 +2629,8 @@ Module sync. ] |) | _ => M.impossible (||) - end)); + end) + |); M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "cast", @@ -2570,7 +2666,7 @@ Module sync. } } *) - Definition new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -2625,8 +2721,8 @@ Module sync. |), [] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2649,7 +2745,8 @@ Module sync. ] |) | _ => M.impossible (||) - end)); + end) + |); M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "cast", @@ -2676,7 +2773,7 @@ Module sync. unsafe { Pin::new_unchecked(Arc::new_in(data, alloc)) } } *) - Definition pin_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pin_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ data; alloc ] => @@ -2714,7 +2811,7 @@ Module sync. unsafe { Ok(Pin::new_unchecked(Arc::try_new_in(data, alloc)?)) } } *) - Definition try_pin_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_pin_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ data; alloc ] => @@ -2723,105 +2820,111 @@ Module sync. let alloc := M.alloc (| alloc |) in M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::pin::Pin") - [ Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ] ], - "new_unchecked", - [] - |), - [ - M.read (| - 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.apply (Ty.path "alloc::sync::Arc") [ T; A ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::pin::Pin") + [ Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ] ], + "new_unchecked", + [] + |), + [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], - "try_new_in", + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ]; + Ty.path "core::alloc::AllocError" + ], + [], + "branch", [] |), - [ M.read (| data |); M.read (| alloc |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], + "try_new_in", + [] + |), + [ M.read (| data |); M.read (| alloc |) ] + |) + ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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::pin::Pin") - [ Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ] - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::pin::Pin") + [ + Ty.apply + (Ty.path "alloc::sync::Arc") + [ T; A ] + ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) - |) - ] - |) - ])) + |))); + 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)) + ] + |) + |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -2846,7 +2949,7 @@ Module sync. Ok(unsafe { Self::from_inner_in(ptr.into(), alloc) }) } *) - Definition try_new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ data; alloc ] => @@ -2885,29 +2988,33 @@ Module sync. [] |), [ - Value.StructRecord - "alloc::sync::ArcInner" - [ - ("strong", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("weak", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::sync::atomic::AtomicUsize", - "new", - [] - |), - [ Value.Integer Integer.Usize 1 ] - |)); - ("data", M.read (| data |)) - ]; + M.of_value (| + Value.StructRecord + "alloc::sync::ArcInner" + [ + ("strong", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("weak", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::sync::atomic::AtomicUsize", + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |))); + ("data", A.to_value (M.read (| data |))) + ] + |); M.read (| alloc |) ] |) @@ -2988,36 +3095,39 @@ Module sync. let ptr := M.copy (| γ0_0 |) in let alloc := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], - "from_inner_in", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.apply - (Ty.path "core::ptr::unique::Unique") - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] - ], - "into", + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], + "from_inner_in", [] |), - [ M.read (| ptr |) ] - |); - M.read (| alloc |) - ] - |) - ] + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply + (Ty.path "core::ptr::unique::Unique") + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] + ], + "into", + [] + |), + [ M.read (| ptr |) ] + |); + M.read (| alloc |) + ] + |)) + ] + |) |))) ] |) @@ -3044,7 +3154,7 @@ Module sync. } } *) - Definition try_new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_uninit_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -3052,70 +3162,30 @@ Module sync. (let alloc := M.alloc (| alloc |) in M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::sync::Arc") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], - "from_ptr_in", - [] - |), - [ - M.read (| - 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.apply - (Ty.path "*mut") - [ - Ty.apply - (Ty.path "alloc::sync::ArcInner") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ] - ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::sync::Arc") + [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], + "from_ptr_in", + [] + |), + [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "alloc::sync::Arc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ], - "try_allocate_for_layout", - [ - Ty.function - [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] - (Ty.apply - (Ty.path "core::result::Result") - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; - Ty.path "core::alloc::AllocError" - ]); - Ty.function - [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] - (Ty.apply (Ty.path "*mut") [ Ty.apply @@ -3125,126 +3195,171 @@ Module sync. (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - ]) - ] + ]; + Ty.path "core::alloc::AllocError" + ], + [], + "branch", + [] |), [ M.call_closure (| M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "new", - [ T ] - |), - [] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let layout := M.copy (| γ |) in - M.call_closure (| - M.get_trait_method (| - "core::alloc::Allocator", - A, - [], - "allocate", - [] - |), - [ alloc; M.read (| layout |) ] - |))) - ] - |) - | _ => M.impossible (||) - end)); - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], - "cast", - [ Ty.apply - (Ty.path "alloc::sync::ArcInner") + (Ty.path "alloc::sync::Arc") [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] + [ T ]; + Ty.path "alloc::alloc::Global" + ], + "try_allocate_for_layout", + [ + Ty.function + [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] + (Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; + Ty.path "core::alloc::AllocError" + ]); + Ty.function + [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] + (Ty.apply + (Ty.path "*mut") + [ + Ty.apply + (Ty.path "alloc::sync::ArcInner") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "new", + [ T ] + |), + [] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let layout := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::alloc::Allocator", + A, + [], + "allocate", + [] + |), + [ alloc; M.read (| layout |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |); + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], + "cast", + [ + Ty.apply + (Ty.path "alloc::sync::ArcInner") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] ] + |) ] |) ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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 "alloc::sync::Arc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - A - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::sync::Arc") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ]; + A + ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) - |); - M.read (| alloc |) - ] - |) - ])) + |))); + 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)) + ] + |) + |); + M.read (| alloc |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -3267,7 +3382,7 @@ Module sync. } } *) - Definition try_new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new_zeroed_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => @@ -3275,70 +3390,30 @@ Module sync. (let alloc := M.alloc (| alloc |) in M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::sync::Arc") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], - "from_ptr_in", - [] - |), - [ - M.read (| - 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.apply - (Ty.path "*mut") - [ - Ty.apply - (Ty.path "alloc::sync::ArcInner") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ] - ]; - Ty.path "core::alloc::AllocError" - ], - [], - "branch", - [] - |), - [ + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::sync::Arc") + [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ]; A ], + "from_ptr_in", + [] + |), + [ + M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::try_trait::Try", Ty.apply - (Ty.path "alloc::sync::Arc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - Ty.path "alloc::alloc::Global" - ], - "try_allocate_for_layout", - [ - Ty.function - [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] - (Ty.apply - (Ty.path "core::result::Result") - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; - Ty.path "core::alloc::AllocError" - ]); - Ty.function - [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] - (Ty.apply (Ty.path "*mut") [ Ty.apply @@ -3348,126 +3423,171 @@ Module sync. (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - ]) - ] + ]; + Ty.path "core::alloc::AllocError" + ], + [], + "branch", + [] |), [ M.call_closure (| M.get_associated_function (| - Ty.path "core::alloc::layout::Layout", - "new", - [ T ] - |), - [] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let layout := M.copy (| γ |) in - M.call_closure (| - M.get_trait_method (| - "core::alloc::Allocator", - A, - [], - "allocate_zeroed", - [] - |), - [ alloc; M.read (| layout |) ] - |))) - ] - |) - | _ => M.impossible (||) - end)); - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], - "cast", - [ Ty.apply - (Ty.path "alloc::sync::ArcInner") + (Ty.path "alloc::sync::Arc") [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] + [ T ]; + Ty.path "alloc::alloc::Global" + ], + "try_allocate_for_layout", + [ + Ty.function + [ Ty.tuple [ Ty.path "core::alloc::layout::Layout" ] ] + (Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]; + Ty.path "core::alloc::AllocError" + ]); + Ty.function + [ Ty.apply (Ty.path "*mut") [ Ty.path "u8" ] ] + (Ty.apply + (Ty.path "*mut") + [ + Ty.apply + (Ty.path "alloc::sync::ArcInner") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::alloc::layout::Layout", + "new", + [ T ] + |), + [] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let layout := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::alloc::Allocator", + A, + [], + "allocate_zeroed", + [] + |), + [ alloc; M.read (| layout |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |); + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], + "cast", + [ + Ty.apply + (Ty.path "alloc::sync::ArcInner") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] ] + |) ] |) ] |) - ] - |) - |), - [ - 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") - [ + |), + [ + 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 "alloc::sync::Arc") + (Ty.path "core::result::Result") [ Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ]; - A - ]; - Ty.path "core::alloc::AllocError" - ], - [ - Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::sync::Arc") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ]; + A + ]; + Ty.path "core::alloc::AllocError" + ], [ - Ty.path "core::convert::Infallible"; - Ty.path "core::alloc::AllocError" - ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::alloc::AllocError" + ] + ], + "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)) - ] - |) - |); - M.read (| alloc |) - ] - |) - ])) + |))); + 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)) + ] + |) + |); + M.read (| alloc |) + ] + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -3496,7 +3616,7 @@ Module sync. } } *) - Definition try_unwrap (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_unwrap (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3507,7 +3627,7 @@ Module sync. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3543,14 +3663,18 @@ Module sync. "alloc::sync::ArcInner", "strong" |); - Value.Integer Integer.Usize 1; - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::sync::atomic::Ordering::Relaxed" - []; - Value.StructTuple - "core::sync::atomic::Ordering::Relaxed" - [] + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| + Value.StructTuple + "core::sync::atomic::Ordering::Relaxed" + [] + |); + M.of_value (| + Value.StructTuple + "core::sync::atomic::Ordering::Relaxed" + [] + |) ] |) |) @@ -3563,21 +3687,27 @@ Module sync. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ M.read (| this |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| this |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::fence", [] |), - [ Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] ] + [ + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |) + ] |) |) in let elem := @@ -3618,19 +3748,22 @@ Module sync. |) in let _weak := M.alloc (| - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - this, - "alloc::sync::Arc", - "ptr" - |) - |)); - ("alloc", M.read (| alloc |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + this, + "alloc::sync::Arc", + "ptr" + |) + |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |) |) in let _ := M.alloc (| @@ -3642,7 +3775,11 @@ Module sync. [ M.read (| this |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| elem |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| elem |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -3680,7 +3817,7 @@ Module sync. Some(inner) } *) - Definition into_inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3704,15 +3841,15 @@ Module sync. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.path "core::sync::atomic::AtomicUsize", "fetch_sub", @@ -3745,29 +3882,38 @@ Module sync. "alloc::sync::ArcInner", "strong" |); - Value.Integer Integer.Usize 1; - Value.StructTuple "core::sync::atomic::Ordering::Release" [] + M.of_value (| Value.Integer 1 |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Release" [] + |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::fence", [] |), - [ Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] ] + [ + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |) + ] |) |) in let inner := @@ -3831,34 +3977,43 @@ Module sync. [ Ty.apply (Ty.path "alloc::sync::Weak") [ T; A ] ] |), [ - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ] ], - [], - "deref", - [] - |), - [ this ] - |), - "alloc::sync::Arc", - "ptr" - |) - |)); - ("alloc", M.read (| alloc |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ] ], + [], + "deref", + [] + |), + [ this ] + |), + "alloc::sync::Arc", + "ptr" + |) + |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| inner |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| inner |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -3874,7 +4029,7 @@ Module sync. ptr } *) - Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3921,7 +4076,7 @@ Module sync. unsafe { ptr::addr_of_mut!(( *ptr).data) } } *) - Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -3951,12 +4106,13 @@ Module sync. |) in M.alloc (| (* MutToConstPointer *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| ptr |), "alloc::sync::ArcInner", "data" - |)) + |) + |) |) |))) | _, _ => M.impossible @@ -3978,7 +4134,7 @@ Module sync. } } *) - Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -3995,15 +4151,16 @@ Module sync. |) in let arc_ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "byte_sub", [] |), [ M.read (| ptr |); M.read (| offset |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -4061,7 +4218,7 @@ Module sync. } } *) - Definition downgrade (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downgrade (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -4091,7 +4248,9 @@ Module sync. "alloc::sync::ArcInner", "weak" |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + |) ] |) |) in @@ -4102,16 +4261,17 @@ Module sync. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| cur |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + BinOp.Pure.eq (| + M.read (| cur |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4152,9 +4312,11 @@ Module sync. "alloc::sync::ArcInner", "weak" |); - Value.StructTuple - "core::sync::atomic::Ordering::Relaxed" - [] + M.of_value (| + Value.StructTuple + "core::sync::atomic::Ordering::Relaxed" + [] + |) ] |) |) in @@ -4162,24 +4324,27 @@ Module sync. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| cur |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| cur |), + M.read (| M.get_constant (| "alloc::sync::MAX_REFCOUNT" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4202,7 +4367,8 @@ Module sync. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -4228,11 +4394,16 @@ Module sync. |); M.read (| cur |); BinOp.Panic.add (| + Integer.Usize, M.read (| cur |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); - Value.StructTuple "core::sync::atomic::Ordering::Acquire" []; - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + |) ] |) |), @@ -4250,11 +4421,15 @@ Module sync. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -4262,16 +4437,16 @@ Module sync. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "alloc::rc::is_dangling", [ @@ -4307,7 +4482,9 @@ Module sync. ] |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4323,8 +4500,10 @@ Module sync. |), [ M.read (| - Value.String - "assertion failed: !is_dangling(this.ptr.as_ptr())" + M.of_value (| + Value.String + "assertion failed: !is_dangling(this.ptr.as_ptr())" + |) |) ] |) @@ -4332,44 +4511,51 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.return_ (| - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| this |), - "alloc::sync::Arc", - "ptr" - |) - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| this |), - "alloc::sync::Arc", - "alloc" - |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| this |), + "alloc::sync::Arc", + "ptr" + |) + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| this |), + "alloc::sync::Arc", + "alloc" + |) + ] + |))) + ] + |) |) |) |) @@ -4407,7 +4593,7 @@ Module sync. if cnt == usize::MAX { 0 } else { cnt - 1 } } *) - Definition weak_count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition weak_count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -4435,28 +4621,33 @@ Module sync. "alloc::sync::ArcInner", "weak" |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| cnt |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + BinOp.Pure.eq (| + M.read (| cnt |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| M.read (| cnt |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| cnt |), + M.of_value (| Value.Integer 1 |) + |) |))) ] |) @@ -4473,7 +4664,7 @@ Module sync. this.inner().strong.load(Relaxed) } *) - Definition strong_count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strong_count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -4494,7 +4685,7 @@ Module sync. "alloc::sync::ArcInner", "strong" |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |))) | _, _ => M.impossible @@ -4515,7 +4706,7 @@ Module sync. let _arc_clone: mem::ManuallyDrop<_> = arc.clone(); } *) - Definition increment_strong_count_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition increment_strong_count_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -4560,7 +4751,7 @@ Module sync. [ arc ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4574,7 +4765,7 @@ Module sync. unsafe { drop(Arc::from_raw_in(ptr, alloc)) }; } *) - Definition decrement_strong_count_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition decrement_strong_count_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -4601,7 +4792,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4620,7 +4811,7 @@ Module sync. unsafe { self.ptr.as_ref() } } *) - Definition inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4662,7 +4853,7 @@ Module sync. drop(Weak { ptr: self.ptr, alloc: &self.alloc }); } *) - Definition drop_slow (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop_slow (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4693,28 +4884,32 @@ Module sync. [ Ty.apply (Ty.path "alloc::sync::Weak") [ T; Ty.apply (Ty.path "&") [ A ] ] ] |), [ - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::sync::Arc", - "ptr" - |) - |)); - ("alloc", - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::sync::Arc", - "alloc" - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::sync::Arc", + "ptr" + |) + |))); + ("alloc", + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::sync::Arc", + "alloc" + |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4728,7 +4923,7 @@ Module sync. ptr::addr_eq(this.ptr.as_ptr(), other.ptr.as_ptr()) } *) - Definition ptr_eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ptr_eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this; other ] => @@ -4745,8 +4940,8 @@ Module sync. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -4763,10 +4958,11 @@ Module sync. |) |) ] - |)); + |) + |); (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -4783,7 +4979,8 @@ Module sync. |) |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -4804,7 +5001,7 @@ Module sync. } } *) - Definition allocate_for_ptr_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_for_ptr_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -4840,8 +5037,8 @@ Module sync. |), [ M.read (| ptr |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4864,9 +5061,10 @@ Module sync. ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4882,12 +5080,13 @@ Module sync. "with_metadata_of", [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] |), - [ M.read (| mem |); M.rust_cast (M.read (| ptr |)) ] + [ M.read (| mem |); M.rust_cast (| M.read (| ptr |) |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4919,7 +5118,7 @@ Module sync. } } *) - Definition from_box_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_box_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ src ] => @@ -4959,9 +5158,9 @@ Module sync. M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ Ty.path "u8" ] |), [ - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| src |) |)) |)); - M.rust_cast - (M.read (| + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| src |) |)) |) |); + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -4970,7 +5169,8 @@ Module sync. "data" |) |)) - |)); + |) + |); M.read (| value_size |) ] |) @@ -5006,7 +5206,7 @@ Module sync. "from_raw", [] |), - [ M.rust_cast (M.read (| bptr |)) ] + [ M.rust_cast (| M.read (| bptr |) |) ] |) |) in let _ := @@ -5099,7 +5299,7 @@ Module sync. unsafe { Self::get_mut_unchecked(this) } } *) - Definition make_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition make_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -5108,7 +5308,7 @@ Module sync. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5144,10 +5344,14 @@ Module sync. "alloc::sync::ArcInner", "strong" |); - Value.Integer Integer.Usize 1; - Value.Integer Integer.Usize 0; - Value.StructTuple "core::sync::atomic::Ordering::Acquire" []; - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + |) ] |) |) @@ -5238,19 +5442,19 @@ Module sync. [ M.read (| arc |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.path "core::sync::atomic::AtomicUsize", "load", @@ -5269,12 +5473,15 @@ Module sync. "alloc::sync::ArcInner", "weak" |); - Value.StructTuple - "core::sync::atomic::Ordering::Relaxed" - [] + M.of_value (| + Value.StructTuple + "core::sync::atomic::Ordering::Relaxed" + [] + |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5283,35 +5490,39 @@ Module sync. |) in let _weak := M.alloc (| - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| this |), - "alloc::sync::Arc", - "ptr" - |) - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| this |), - "alloc::sync::Arc", - "alloc" - |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| this |), + "alloc::sync::Arc", + "ptr" + |) + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| this |), + "alloc::sync::Arc", + "alloc" + |) + ] + |))) + ] + |) |) in let arc := M.alloc (| @@ -5388,7 +5599,7 @@ Module sync. |), [ M.read (| this |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -5419,7 +5630,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -5443,12 +5654,14 @@ Module sync. "alloc::sync::ArcInner", "strong" |); - Value.Integer Integer.Usize 1; - Value.StructTuple "core::sync::atomic::Ordering::Release" [] + M.of_value (| Value.Integer 1 |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Release" [] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -5476,7 +5689,7 @@ Module sync. Arc::try_unwrap(this).unwrap_or_else(|arc| ( *arc).clone()) } *) - Definition unwrap_or_clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or_clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -5499,8 +5712,8 @@ Module sync. |), [ M.read (| this |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5528,7 +5741,8 @@ Module sync. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5551,7 +5765,7 @@ Module sync. } } *) - Definition get_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -5559,7 +5773,7 @@ Module sync. (let this := M.alloc (| this |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5577,21 +5791,27 @@ Module sync. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], - "get_mut_unchecked", - [] - |), - [ M.read (| this |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], + "get_mut_unchecked", + [] + |), + [ M.read (| this |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5609,7 +5829,7 @@ Module sync. unsafe { &mut ( *this.ptr.as_ptr()).data } } *) - Definition get_mut_unchecked (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_unchecked (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ this ] => @@ -5669,7 +5889,7 @@ Module sync. } } *) - Definition is_unique (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_unique (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5677,7 +5897,7 @@ Module sync. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5713,10 +5933,14 @@ Module sync. "alloc::sync::ArcInner", "weak" |); - Value.Integer Integer.Usize 1; + M.of_value (| Value.Integer 1 |); M.read (| M.get_constant (| "core::num::MAX" |) |); - Value.StructTuple "core::sync::atomic::Ordering::Acquire" []; - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + |) ] |) |) @@ -5726,8 +5950,8 @@ Module sync. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let unique := M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "core::sync::atomic::AtomicUsize", "load", @@ -5746,10 +5970,13 @@ Module sync. "alloc::sync::ArcInner", "strong" |); - Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.alloc (| @@ -5772,13 +5999,15 @@ Module sync. "alloc::sync::ArcInner", "weak" |); - Value.Integer Integer.Usize 1; - Value.StructTuple "core::sync::atomic::Ordering::Release" [] + M.of_value (| Value.Integer 1 |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Release" [] + |) ] |) |) in unique)); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -5863,7 +6092,7 @@ Module sync. write!(f, "(Weak)") } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -5878,8 +6107,14 @@ Module sync. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "(Weak)" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "(Weak)" |) |)) ] + |) + |) + |) ] |) ] @@ -5917,7 +6152,7 @@ Module sync. Layout::new::>().extend(layout).unwrap().0.pad_to_align() } *) - Definition arcinner_layout_for_value_layout (τ : list Ty.t) (α : list Value.t) : M := + Definition arcinner_layout_for_value_layout (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ layout ] => ltac:(M.monadic @@ -6006,7 +6241,7 @@ Module sync. unsafe { Arc::from_ptr(Arc::allocate_for_slice(len)) } } *) - Definition new_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -6064,7 +6299,7 @@ Module sync. } } *) - Definition new_zeroed_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -6144,8 +6379,8 @@ Module sync. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6164,16 +6399,19 @@ Module sync. [] |), [ - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |); M.read (| layout |) ] |))) ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6183,18 +6421,20 @@ Module sync. fun γ => ltac:(M.monadic (let mem := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), - [ M.rust_cast (M.read (| mem |)); M.read (| len |) ] - |)))) + [ M.rust_cast (| M.read (| mem |) |); M.read (| len |) ] + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -6216,7 +6456,7 @@ Module sync. } } *) - Definition allocate_for_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_for_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ len ] => @@ -6273,8 +6513,8 @@ Module sync. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6293,16 +6533,19 @@ Module sync. [] |), [ - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |); + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |); M.read (| layout |) ] |))) ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6312,8 +6555,8 @@ Module sync. fun γ => ltac:(M.monadic (let mem := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), [ M.call_closure (| @@ -6326,11 +6569,13 @@ Module sync. |); M.read (| len |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6351,7 +6596,7 @@ Module sync. } } *) - Definition copy_from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => @@ -6389,8 +6634,8 @@ Module sync. |), [ M.read (| v |) ] |); - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -6399,7 +6644,8 @@ Module sync. "data" |) |)) - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] @@ -6473,7 +6719,7 @@ Module sync. } } *) - Definition from_iter_exact (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter_exact (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ impl_Iterator_Item___T_ ], [ iter; len ] => @@ -6494,7 +6740,7 @@ Module sync. [ M.read (| len |) ] |) |) in - let mem := M.alloc (| M.rust_cast (M.rust_cast (M.read (| ptr |))) |) in + let mem := M.alloc (| M.rust_cast (| M.rust_cast (| M.read (| ptr |) |) |) |) in let layout := M.alloc (| M.call_closure (| @@ -6512,8 +6758,8 @@ Module sync. |) in let elems := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -6522,26 +6768,30 @@ Module sync. "data" |) |)) - |)) + |) + |) |) in let guard := M.alloc (| - Value.StructRecord - "alloc::sync::from_iter_exact::Guard" - [ - ("mem", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], - "new_unchecked", - [] - |), - [ M.read (| mem |) ] - |)); - ("elems", M.read (| elems |)); - ("layout", M.read (| layout |)); - ("n_elems", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::from_iter_exact::Guard" + [ + ("mem", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], + "new_unchecked", + [] + |), + [ M.read (| mem |) ] + |))); + ("elems", A.to_value (M.read (| elems |))); + ("layout", A.to_value (M.read (| layout |))); + ("n_elems", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let _ := M.use @@ -6638,14 +6888,15 @@ Module sync. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -6689,7 +6940,7 @@ Module sync. unsafe { Arc::from_ptr_in(Arc::allocate_for_slice_in(len, &alloc), alloc) } } *) - Definition new_uninit_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_uninit_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ len; alloc ] => @@ -6752,7 +7003,7 @@ Module sync. } } *) - Definition new_zeroed_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_zeroed_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ len; alloc ] => @@ -6833,8 +7084,8 @@ Module sync. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6857,9 +7108,10 @@ Module sync. ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6869,8 +7121,8 @@ Module sync. fun γ => ltac:(M.monadic (let mem := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] @@ -6886,11 +7138,13 @@ Module sync. |); M.read (| len |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.read (| alloc |) @@ -6913,7 +7167,7 @@ Module sync. } } *) - Definition allocate_for_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_for_slice_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ len; alloc ] => @@ -6971,8 +7225,8 @@ Module sync. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6995,9 +7249,10 @@ Module sync. ] |) | _ => M.impossible (||) - end)); - M.closure - (fun γ => + end) + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7007,8 +7262,8 @@ Module sync. fun γ => ltac:(M.monadic (let mem := M.copy (| γ |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), [ M.call_closure (| @@ -7021,11 +7276,13 @@ Module sync. |); M.read (| len |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7051,7 +7308,7 @@ Module sync. unsafe { Arc::from_inner_in(md_self.ptr.cast(), md_self.alloc.clone()) } } *) - Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7185,7 +7442,7 @@ Module sync. unsafe { Arc::from_ptr_in(md_self.ptr.as_ptr() as _, md_self.alloc.clone()) } } *) - Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7222,8 +7479,8 @@ Module sync. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -7273,7 +7530,8 @@ Module sync. |) |) ] - |)); + |) + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), [ @@ -7340,7 +7598,7 @@ Module sync. unsafe { Self::from_iter_exact(v.iter().cloned(), v.len()) } } *) - Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => @@ -7403,7 +7661,7 @@ Module sync. unsafe { Arc::copy_from_slice(v) } } *) - Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => @@ -7471,7 +7729,7 @@ Module sync. unsafe { Self::from_inner_in(self.ptr, self.alloc.clone()) } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7499,23 +7757,24 @@ Module sync. "alloc::sync::ArcInner", "strong" |); - Value.Integer Integer.Usize 1; - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| old_size |)) - (M.read (| M.get_constant (| "alloc::sync::MAX_REFCOUNT" |) |)) + BinOp.Pure.gt (| + M.read (| old_size |), + M.read (| M.get_constant (| "alloc::sync::MAX_REFCOUNT" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -7526,7 +7785,7 @@ Module sync. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -7581,7 +7840,7 @@ Module sync. &self.inner().data } *) - Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7674,7 +7933,7 @@ Module sync. } } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7685,15 +7944,15 @@ Module sync. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.path "core::sync::atomic::AtomicUsize", "fetch_sub", @@ -7712,25 +7971,34 @@ Module sync. "alloc::sync::ArcInner", "strong" |); - Value.Integer Integer.Usize 1; - Value.StructTuple "core::sync::atomic::Ordering::Release" [] + M.of_value (| Value.Integer 1 |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Release" [] + |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::fence", [] |), - [ Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] ] + [ + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |) + ] |) |) in let _ := @@ -7744,7 +8012,7 @@ Module sync. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -7780,7 +8048,7 @@ Module sync. } } *) - Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -7788,7 +8056,7 @@ Module sync. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7871,25 +8139,30 @@ Module sync. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], - "from_inner_in", - [] - |), - [ M.read (| ptr |); M.read (| alloc |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], + "from_inner_in", + [] + |), + [ M.read (| ptr |); M.read (| alloc |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (* Unsize *) (M.pointer_coercion (| M.read (| self |) |)) ] + |) |))) ] |) @@ -7914,7 +8187,7 @@ Module sync. } } *) - Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_unchecked (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ T ], [ self ] => @@ -7994,35 +8267,38 @@ Module sync. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], - "new_unchecked", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::invalid_mut", - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] + (M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], + "new_unchecked", + [] |), - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] - |) - ] - |)); - ("alloc", Value.StructTuple "alloc::alloc::Global" []) - ])) + [ + M.call_closure (| + M.get_function (| + "core::ptr::invalid_mut", + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] + |), + [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + |) + ] + |))); + ("alloc", A.to_value (M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -8032,7 +8308,7 @@ Module sync. unsafe { Weak::from_raw_in(ptr, Global) } } *) - Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -8044,7 +8320,7 @@ Module sync. "from_raw_in", [] |), - [ M.read (| ptr |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| ptr |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -8065,36 +8341,39 @@ Module sync. } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => ltac:(M.monadic (let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], - "new_unchecked", - [] - |), - [ - M.call_closure (| - M.get_function (| - "core::ptr::invalid_mut", - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], + "new_unchecked", + [] |), - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] - |) - ] - |)); - ("alloc", M.read (| alloc |)) - ])) + [ + M.call_closure (| + M.get_function (| + "core::ptr::invalid_mut", + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ] + |), + [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + |) + ] + |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |))) | _, _ => M.impossible end. @@ -8117,7 +8396,7 @@ Module sync. } } *) - Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8146,7 +8425,7 @@ Module sync. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8162,17 +8441,18 @@ Module sync. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| M.rust_cast (M.read (| ptr |)) |))); + M.alloc (| M.rust_cast (| M.read (| ptr |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| (* MutToConstPointer *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| ptr |), "alloc::sync::ArcInner", "data" - |)) + |) + |) |))) ] |) @@ -8191,7 +8471,7 @@ Module sync. result } *) - Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8248,7 +8528,7 @@ Module sync. Weak { ptr: unsafe { NonNull::new_unchecked(ptr) }, alloc } } *) - Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; alloc ] => @@ -8259,7 +8539,7 @@ Module sync. let ptr := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8268,12 +8548,12 @@ Module sync. (M.alloc (| M.call_closure (| M.get_function (| "alloc::rc::is_dangling", [ T ] |), - [ M.rust_cast (M.read (| ptr |)) ] + [ M.rust_cast (| M.read (| ptr |) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| M.rust_cast (M.read (| ptr |)) |))); + M.alloc (| M.rust_cast (| M.read (| ptr |) |) |))); fun γ => ltac:(M.monadic (let offset := @@ -8284,36 +8564,40 @@ Module sync. |) |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "byte_sub", [] |), [ M.read (| ptr |); M.read (| offset |) ] - |)) + |) + |) |))) ] |) |) in M.alloc (| - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], - "new_unchecked", - [] - |), - [ M.read (| ptr |) ] - |)); - ("alloc", M.read (| alloc |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::sync::ArcInner") [ T ] ], + "new_unchecked", + [] + |), + [ M.read (| ptr |) ] + |))); + ("alloc", A.to_value (M.read (| alloc |))) + ] + |) |) |))) | _, _ => M.impossible @@ -8354,7 +8638,7 @@ Module sync. } } *) - Definition upgrade (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition upgrade (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8364,7 +8648,7 @@ Module sync. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8479,12 +8763,16 @@ Module sync. "strong" |) |); - Value.StructTuple - "core::sync::atomic::Ordering::Acquire" - []; - Value.StructTuple - "core::sync::atomic::Ordering::Relaxed" - []; + M.of_value (| + Value.StructTuple + "core::sync::atomic::Ordering::Acquire" + [] + |); + M.of_value (| + Value.StructTuple + "core::sync::atomic::Ordering::Relaxed" + [] + |); M.get_associated_function (| Self, "checked_increment.upgrade", @@ -8499,46 +8787,51 @@ Module sync. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], - "from_inner_in", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::sync::Weak", - "ptr" - |) - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], + "from_inner_in", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::sync::Weak", - "alloc" + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::sync::Weak", + "ptr" + |) + |); + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::sync::Weak", + "alloc" + |) + ] |) ] - |) - ] - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -8555,7 +8848,7 @@ Module sync. if let Some(inner) = self.inner() { inner.strong.load(Relaxed) } else { 0 } } *) - Definition strong_count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strong_count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8563,7 +8856,7 @@ Module sync. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8600,11 +8893,13 @@ Module sync. "strong" |) |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -8635,7 +8930,7 @@ Module sync. } } *) - Definition weak_count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition weak_count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8643,7 +8938,7 @@ Module sync. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8681,7 +8976,9 @@ Module sync. "weak" |) |); - Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |) ] |) |) in @@ -8701,33 +8998,40 @@ Module sync. "strong" |) |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| strong |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| strong |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| M.read (| weak |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| weak |), + M.of_value (| Value.Integer 1 |) + |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -8751,7 +9055,7 @@ Module sync. } } *) - Definition inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8780,7 +9084,7 @@ Module sync. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8796,30 +9100,39 @@ Module sync. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "alloc::sync::WeakInner" - [ - ("strong", - M.SubPointer.get_struct_record_field (| - M.read (| ptr |), - "alloc::sync::ArcInner", - "strong" - |)); - ("weak", - M.SubPointer.get_struct_record_field (| - M.read (| ptr |), - "alloc::sync::ArcInner", - "weak" - |)) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "alloc::sync::WeakInner" + [ + ("strong", + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| ptr |), + "alloc::sync::ArcInner", + "strong" + |))); + ("weak", + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| ptr |), + "alloc::sync::ArcInner", + "weak" + |))) + ] + |)) + ] + |) |))) ] |) @@ -8836,7 +9149,7 @@ Module sync. ptr::addr_eq(self.ptr.as_ptr(), other.ptr.as_ptr()) } *) - Definition ptr_eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ptr_eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -8853,8 +9166,8 @@ Module sync. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -8871,10 +9184,11 @@ Module sync. |) |) ] - |)); + |) + |); (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -8891,7 +9205,8 @@ Module sync. |) |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -8940,7 +9255,7 @@ Module sync. Weak { ptr: self.ptr, alloc: self.alloc.clone() } } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -8952,7 +9267,7 @@ Module sync. let inner := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8981,35 +9296,39 @@ Module sync. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::sync::Weak", - "ptr" - |) - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::sync::Weak", - "alloc" - |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::sync::Weak", + "ptr" + |) + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::sync::Weak", + "alloc" + |) + ] + |))) + ] + |) |) |) |) @@ -9033,23 +9352,26 @@ Module sync. "weak" |) |); - Value.Integer Integer.Usize 1; - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.Integer 1 |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| old_size |)) - (M.read (| M.get_constant (| "alloc::sync::MAX_REFCOUNT" |) |)) + BinOp.Pure.gt (| + M.read (| old_size |), + M.read (| M.get_constant (| "alloc::sync::MAX_REFCOUNT" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -9061,33 +9383,37 @@ Module sync. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "alloc::sync::Weak" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::sync::Weak", - "ptr" - |) - |)); - ("alloc", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::sync::Weak", - "alloc" - |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "alloc::sync::Weak" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::sync::Weak", + "ptr" + |) + |))); + ("alloc", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::sync::Weak", + "alloc" + |) + ] + |))) + ] + |) |) |))) |))) @@ -9112,7 +9438,7 @@ Module sync. Weak::new() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -9160,7 +9486,7 @@ Module sync. } } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -9172,7 +9498,7 @@ Module sync. let inner := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9198,21 +9524,23 @@ Module sync. fun γ => ltac:(M.monadic (M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "core::sync::atomic::AtomicUsize", "fetch_sub", @@ -9226,11 +9554,14 @@ Module sync. "weak" |) |); - Value.Integer Integer.Usize 1; - Value.StructTuple "core::sync::atomic::Ordering::Release" [] + M.of_value (| Value.Integer 1 |); + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Release" [] + |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -9238,7 +9569,11 @@ Module sync. M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::fence", [] |), - [ Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] ] + [ + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |) + ] |) |) in M.alloc (| @@ -9282,8 +9617,8 @@ Module sync. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -9300,13 +9635,14 @@ Module sync. |) |) ] - |)) + |) + |) ] |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -9334,7 +9670,7 @@ Module sync. **self == **other } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9374,7 +9710,7 @@ Module sync. **self != **other } *) - Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9427,7 +9763,7 @@ Module sync. Arc::ptr_eq(self, other) || **self == **other } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9478,7 +9814,7 @@ Module sync. !Arc::ptr_eq(self, other) && **self != **other } *) - Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9486,15 +9822,16 @@ Module sync. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::sync::Arc") [ T; A ], "ptr_eq", [] |), [ M.read (| self |); M.read (| other |) ] - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", T, [ T ], "ne", [] |), @@ -9543,7 +9880,7 @@ Module sync. ArcEqIdent::eq(self, other) } *) - Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9568,7 +9905,7 @@ Module sync. ArcEqIdent::ne(self, other) } *) - Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9606,7 +9943,7 @@ Module sync. ( **self).partial_cmp(&**other) } *) - Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9646,7 +9983,7 @@ Module sync. *( *self) < *( *other) } *) - Definition lt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9686,7 +10023,7 @@ Module sync. *( *self) <= *( *other) } *) - Definition le (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9726,7 +10063,7 @@ Module sync. *( *self) > *( *other) } *) - Definition gt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9766,7 +10103,7 @@ Module sync. *( *self) >= *( *other) } *) - Definition ge (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9825,7 +10162,7 @@ Module sync. ( **self).cmp(&**other) } *) - Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -9889,7 +10226,7 @@ Module sync. fmt::Display::fmt(&**self, f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -9932,7 +10269,7 @@ Module sync. fmt::Debug::fmt(&**self, f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -9975,7 +10312,7 @@ Module sync. fmt::Pointer::fmt(&(&**self as *const T), f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -10028,7 +10365,7 @@ Module sync. Arc::new(Default::default()) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -10066,7 +10403,7 @@ Module sync. ( **self).hash(state) } *) - Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ H ], [ self; state ] => @@ -10110,7 +10447,7 @@ Module sync. Arc::new(t) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -10147,15 +10484,15 @@ Module sync. Arc::<[T; N]>::from(v) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.apply @@ -10166,7 +10503,8 @@ Module sync. [] |), [ M.read (| v |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -10190,7 +10528,7 @@ Module sync. >::from_slice(v) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => @@ -10231,7 +10569,7 @@ Module sync. unsafe { Arc::from_raw(Arc::into_raw(arc) as *const str) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -10268,8 +10606,8 @@ Module sync. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::sync::Arc") @@ -10281,7 +10619,8 @@ Module sync. [] |), [ M.read (| arc |) ] - |)) + |) + |) ] |) |) @@ -10306,7 +10645,7 @@ Module sync. Arc::from(&v[..]) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -10330,7 +10669,7 @@ Module sync. "index", [] |), - [ v; Value.StructTuple "core::ops::range::RangeFull" [] ] + [ v; M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] |))) @@ -10353,7 +10692,7 @@ Module sync. Arc::from_box_in(v) } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ v ] => @@ -10399,7 +10738,7 @@ Module sync. } } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ v ] => @@ -10446,9 +10785,9 @@ Module sync. M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| vec_ptr |)); - M.rust_cast - (M.read (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| vec_ptr |) |); + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -10457,7 +10796,8 @@ Module sync. "data" |) |)) - |)); + |) + |); M.read (| len |) ] |) @@ -10474,7 +10814,7 @@ Module sync. |), [ M.read (| vec_ptr |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| cap |); alloc ] @@ -10524,7 +10864,7 @@ Module sync. } } *) - Definition from (B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B in match τ, α with | [], [ cow ] => @@ -10603,7 +10943,7 @@ Module sync. unsafe { Arc::from_raw(Arc::into_raw(rc) as *const [u8]) } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ rc ] => ltac:(M.monadic @@ -10617,8 +10957,8 @@ Module sync. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::sync::Arc") @@ -10627,7 +10967,8 @@ Module sync. [] |), [ M.read (| rc |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -10663,7 +11004,7 @@ Module sync. } } *) - Definition try_from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ boxed_slice ] => @@ -10671,15 +11012,15 @@ Module sync. (let boxed_slice := M.alloc (| boxed_slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -10699,8 +11040,9 @@ Module sync. [ boxed_slice ] |) ] - |)) - (M.read (| M.get_constant (| "alloc::sync::N" |) |)) + |), + M.read (| M.get_constant (| "alloc::sync::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let alloc := @@ -10717,40 +11059,49 @@ Module sync. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::sync::Arc") - [ Ty.apply (Ty.path "array") [ T ]; A ], - "from_raw_in", - [] - |), - [ - (* MutToConstPointer *) - M.pointer_coercion - (M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::sync::Arc") - [ Ty.apply (Ty.path "slice") [ T ]; A ], - "into_raw", - [] - |), - [ M.read (| boxed_slice |) ] - |))); - M.read (| alloc |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::sync::Arc") + [ Ty.apply (Ty.path "array") [ T ]; A ], + "from_raw_in", + [] + |), + [ + (* MutToConstPointer *) + M.pointer_coercion (| + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::sync::Arc") + [ Ty.apply (Ty.path "slice") [ T ]; A ], + "into_raw", + [] + |), + [ M.read (| boxed_slice |) ] + |) + |) + |); + M.read (| alloc |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| boxed_slice |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| boxed_slice |)) ] + |) |))) ] |) @@ -10783,7 +11134,7 @@ Module sync. ToArcSlice::to_arc_slice(iter.into_iter()) } *) - Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ iter ] => @@ -10833,7 +11184,7 @@ Module sync. self.collect::>().into() } *) - Definition to_arc_slice (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_arc_slice (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self ] => @@ -10904,7 +11255,7 @@ Module sync. } } *) - Definition to_arc_slice (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_arc_slice (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self ] => @@ -10932,7 +11283,7 @@ Module sync. let low := M.copy (| γ0_0 |) in let high := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10946,11 +11297,12 @@ Module sync. let high := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -10958,7 +11310,11 @@ Module sync. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ low; high ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value low; A.to_value high ] + |) + |), [ fun γ => ltac:(M.monadic @@ -10969,21 +11325,23 @@ Module sync. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10995,9 +11353,11 @@ Module sync. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -11012,67 +11372,84 @@ Module sync. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::Arguments", - "new_v1", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "TrustedLen iterator's size hint is not exact: " + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "TrustedLen iterator's size hint is not exact: " + |) + |)) + ] |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_debug", + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array [ - Ty.tuple - [ - Ty.path - "usize"; - Ty.path - "usize" - ] + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_debug", + [ + Ty.tuple + [ + Ty.path + "usize"; + Ty.path + "usize" + ] + ] + |), + [ + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + low + |)); + A.to_value + (M.read (| + high + |)) + ] + |) + |) + ] + |)) ] - |), - [ - M.alloc (| - Value.Tuple - [ - M.read (| - low - |); - M.read (| - high - |) - ] - |) - ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) @@ -11081,13 +11458,16 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -11120,11 +11500,21 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "capacity overflow" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "capacity overflow" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -11156,7 +11546,7 @@ Module sync. &**self } *) - Definition borrow (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -11192,7 +11582,7 @@ Module sync. &**self } *) - Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -11243,7 +11633,7 @@ Module sync. unsafe { data_offset_align(align_of_val_raw(ptr)) } } *) - Definition data_offset (τ : list Ty.t) (α : list Value.t) : M := + Definition data_offset (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ ptr ] => ltac:(M.monadic @@ -11266,7 +11656,7 @@ Module sync. layout.size() + layout.padding_needed_for(align) } *) - Definition data_offset_align (τ : list Ty.t) (α : list Value.t) : M := + Definition data_offset_align (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ align ] => ltac:(M.monadic @@ -11285,6 +11675,7 @@ Module sync. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ layout ] @@ -11312,7 +11703,7 @@ Module sync. core::error::Error::description(&**self) } *) - Definition description (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition description (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11341,7 +11732,7 @@ Module sync. core::error::Error::cause(&**self) } *) - Definition cause (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cause (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11370,7 +11761,7 @@ Module sync. core::error::Error::source(&**self) } *) - Definition source (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition source (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11399,7 +11790,7 @@ Module sync. core::error::Error::provide(&**self, req); } *) - Definition provide (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition provide (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; req ] => @@ -11426,7 +11817,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/task.v b/CoqOfRust/alloc/task.v index 736f19a55..d6bf93807 100644 --- a/CoqOfRust/alloc/task.v +++ b/CoqOfRust/alloc/task.v @@ -4,7 +4,7 @@ Require Import CoqOfRust.CoqOfRust. Module task. (* Trait *) Module Wake. - Definition wake_by_ref (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wake_by_ref (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30,7 +30,7 @@ Module task. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -49,7 +49,7 @@ Module task. unsafe { Waker::from_raw(raw_waker(waker)) } } *) - Definition from (W : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (W : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W in match τ, α with | [], [ waker ] => @@ -85,7 +85,7 @@ Module task. raw_waker(waker) } *) - Definition from (W : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (W : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W in match τ, α with | [], [ waker ] => @@ -142,7 +142,7 @@ Module task. ) } *) - Definition raw_waker (τ : list Ty.t) (α : list Value.t) : M := + Definition raw_waker (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ W ], [ waker ] => ltac:(M.monadic @@ -150,15 +150,16 @@ Module task. M.call_closure (| M.get_associated_function (| Ty.path "core::task::wake::RawWaker", "new", [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::sync::Arc") [ W; Ty.path "alloc::alloc::Global" ], "into_raw", [] |), [ M.read (| waker |) ] - |)); + |) + |); M.alloc (| M.call_closure (| M.get_associated_function (| @@ -168,15 +169,19 @@ Module task. |), [ (* ReifyFnPointer *) - M.pointer_coercion - (M.get_function (| "alloc::task::raw_waker.clone_waker", [] |)); + M.pointer_coercion (| + M.get_function (| "alloc::task::raw_waker.clone_waker", [] |) + |); (* ReifyFnPointer *) - M.pointer_coercion (M.get_function (| "alloc::task::raw_waker.wake", [] |)); + M.pointer_coercion (| M.get_function (| "alloc::task::raw_waker.wake", [] |) |); (* ReifyFnPointer *) - M.pointer_coercion - (M.get_function (| "alloc::task::raw_waker.wake_by_ref", [] |)); + M.pointer_coercion (| + M.get_function (| "alloc::task::raw_waker.wake_by_ref", [] |) + |); (* ReifyFnPointer *) - M.pointer_coercion (M.get_function (| "alloc::task::raw_waker.drop_waker", [] |)) + M.pointer_coercion (| + M.get_function (| "alloc::task::raw_waker.drop_waker", [] |) + |) ] |) |) @@ -195,7 +200,7 @@ Module task. ) } *) - Definition clone_waker (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_waker (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ W ], [ waker ] => ltac:(M.monadic @@ -209,14 +214,14 @@ Module task. "increment_strong_count", [] |), - [ M.rust_cast (M.read (| waker |)) ] + [ M.rust_cast (| M.read (| waker |) |) ] |) |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::task::wake::RawWaker", "new", [] |), [ - M.rust_cast (M.read (| waker |)); + M.rust_cast (| M.read (| waker |) |); M.alloc (| M.call_closure (| M.get_associated_function (| @@ -226,16 +231,21 @@ Module task. |), [ (* ReifyFnPointer *) - M.pointer_coercion - (M.get_function (| "alloc::task::raw_waker.clone_waker", [] |)); + M.pointer_coercion (| + M.get_function (| "alloc::task::raw_waker.clone_waker", [] |) + |); (* ReifyFnPointer *) - M.pointer_coercion (M.get_function (| "alloc::task::raw_waker.wake", [] |)); + M.pointer_coercion (| + M.get_function (| "alloc::task::raw_waker.wake", [] |) + |); (* ReifyFnPointer *) - M.pointer_coercion - (M.get_function (| "alloc::task::raw_waker.wake_by_ref", [] |)); + M.pointer_coercion (| + M.get_function (| "alloc::task::raw_waker.wake_by_ref", [] |) + |); (* ReifyFnPointer *) - M.pointer_coercion - (M.get_function (| "alloc::task::raw_waker.drop_waker", [] |)) + M.pointer_coercion (| + M.get_function (| "alloc::task::raw_waker.drop_waker", [] |) + |) ] |) |) @@ -252,7 +262,7 @@ Module task. ::wake(waker); } *) - Definition wake (τ : list Ty.t) (α : list Value.t) : M := + Definition wake (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ W ], [ waker ] => ltac:(M.monadic @@ -266,7 +276,7 @@ Module task. "from_raw", [] |), - [ M.rust_cast (M.read (| waker |)) ] + [ M.rust_cast (| M.read (| waker |) |) ] |) |) in let _ := @@ -276,7 +286,7 @@ Module task. [ M.read (| waker |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -287,7 +297,7 @@ Module task. ::wake_by_ref(&waker); } *) - Definition wake_by_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition wake_by_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ W ], [ waker ] => ltac:(M.monadic @@ -311,7 +321,7 @@ Module task. "from_raw", [] |), - [ M.rust_cast (M.read (| waker |)) ] + [ M.rust_cast (| M.read (| waker |) |) ] |) ] |) @@ -340,7 +350,7 @@ Module task. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -350,7 +360,7 @@ Module task. unsafe { Arc::decrement_strong_count(waker as *const W) }; } *) - Definition drop_waker (τ : list Ty.t) (α : list Value.t) : M := + Definition drop_waker (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ W ], [ waker ] => ltac:(M.monadic @@ -364,10 +374,10 @@ Module task. "decrement_strong_count", [] |), - [ M.rust_cast (M.read (| waker |)) ] + [ M.rust_cast (| M.read (| waker |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/vec/cow.v b/CoqOfRust/alloc/vec/cow.v index 57472d435..8deb17128 100644 --- a/CoqOfRust/alloc/vec/cow.v +++ b/CoqOfRust/alloc/vec/cow.v @@ -12,13 +12,15 @@ Module vec. Cow::Borrowed(s) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in - Value.StructTuple "alloc::borrow::Cow::Borrowed" [ M.read (| s |) ])) + M.of_value (| + Value.StructTuple "alloc::borrow::Cow::Borrowed" [ A.to_value (M.read (| s |)) ] + |))) | _, _ => M.impossible end. @@ -41,13 +43,15 @@ Module vec. Cow::Owned(v) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructTuple "alloc::borrow::Cow::Owned" [ M.read (| v |) ])) + M.of_value (| + Value.StructTuple "alloc::borrow::Cow::Owned" [ A.to_value (M.read (| v |)) ] + |))) | _, _ => M.impossible end. @@ -70,24 +74,27 @@ Module vec. Cow::Borrowed(v.as_slice()) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructTuple - "alloc::borrow::Cow::Borrowed" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; Ty.path "alloc::alloc::Global" ], - "as_slice", - [] - |), - [ M.read (| v |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Borrowed" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; Ty.path "alloc::alloc::Global" ], + "as_slice", + [] + |), + [ M.read (| v |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -115,26 +122,29 @@ Module vec. Cow::Owned(FromIterator::from_iter(it)) } *) - Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ it ] => ltac:(M.monadic (let it := M.alloc (| it |) in - Value.StructTuple - "alloc::borrow::Cow::Owned" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::FromIterator", - Ty.apply (Ty.path "alloc::vec::Vec") [ T; Ty.path "alloc::alloc::Global" ], - [ T ], - "from_iter", - [ I ] - |), - [ M.read (| it |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "alloc::borrow::Cow::Owned" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::FromIterator", + Ty.apply (Ty.path "alloc::vec::Vec") [ T; Ty.path "alloc::alloc::Global" ], + [ T ], + "from_iter", + [ I ] + |), + [ M.read (| it |) ] + |)) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/vec/drain.v b/CoqOfRust/alloc/vec/drain.v index 8d9463af3..2a1d7f4cb 100644 --- a/CoqOfRust/alloc/vec/drain.v +++ b/CoqOfRust/alloc/vec/drain.v @@ -27,7 +27,7 @@ Module vec. f.debug_tuple("Drain").field(&self.iter.as_slice()).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -55,12 +55,12 @@ Module vec. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Drain" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Drain" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], @@ -75,7 +75,8 @@ Module vec. |) ] |) - |)) + |) + |) ] |) ] @@ -100,7 +101,7 @@ Module vec. self.iter.as_slice() } *) - Definition as_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -132,7 +133,7 @@ Module vec. unsafe { self.vec.as_ref().allocator() } } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -220,7 +221,7 @@ Module vec. } } *) - Definition keep_rest (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition keep_rest (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -365,17 +366,18 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -402,17 +404,18 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| unyielded_ptr |)) + BinOp.Pure.ne (| + M.read (| unyielded_ptr |), (* MutToConstPointer *) - (M.pointer_coercion (M.read (| start_ptr |))) + M.pointer_coercion (| M.read (| start_ptr |) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -432,24 +435,27 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| tail |)) - (BinOp.Panic.add (| + BinOp.Pure.ne (| + M.read (| tail |), + BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| unyielded_len |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -520,11 +526,12 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -538,7 +545,12 @@ Module vec. [ M.read (| source_vec |); BinOp.Panic.add (| - BinOp.Panic.add (| M.read (| start |), M.read (| unyielded_len |) |), + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| start |), + M.read (| unyielded_len |) + |), M.read (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -561,7 +573,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -579,7 +591,7 @@ Module vec. self.as_slice() } *) - Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -640,7 +652,7 @@ Module vec. self.iter.next().map(|elt| unsafe { ptr::read(elt as *const _) }) } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -669,8 +681,8 @@ Module vec. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -687,7 +699,8 @@ Module vec. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -698,7 +711,7 @@ Module vec. self.iter.size_hint() } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -745,7 +758,7 @@ Module vec. self.iter.next_back().map(|elt| unsafe { ptr::read(elt as *const _) }) } *) - Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -774,8 +787,8 @@ Module vec. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -792,7 +805,8 @@ Module vec. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -877,7 +891,7 @@ Module vec. } } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -925,7 +939,7 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -973,7 +987,9 @@ Module vec. [ M.read (| vec |); BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| + Integer.Usize, M.read (| old_len |), M.read (| drop_len |) |), @@ -999,6 +1015,7 @@ Module vec. [ M.read (| vec |); BinOp.Panic.add (| + Integer.Usize, M.read (| old_len |), M.read (| M.SubPointer.get_struct_record_field (| @@ -1011,37 +1028,44 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.return_ (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _guard := M.alloc (| - Value.StructTuple "alloc::vec::drain::drop::DropGuard" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "alloc::vec::drain::drop::DropGuard" + [ A.to_value (M.read (| self |)) ] + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| drop_len |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| drop_len |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let drop_ptr := @@ -1096,7 +1120,7 @@ Module vec. |), [ M.read (| drop_ptr |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| vec_ptr |)) + (* MutToConstPointer *) M.pointer_coercion (| M.read (| vec_ptr |) |) ] |) |) in @@ -1127,7 +1151,7 @@ Module vec. [ M.read (| to_drop |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -1150,7 +1174,7 @@ Module vec. self.iter.is_empty() } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/alloc/vec/extract_if.v b/CoqOfRust/alloc/vec/extract_if.v index 7cde3906e..c362e6342 100644 --- a/CoqOfRust/alloc/vec/extract_if.v +++ b/CoqOfRust/alloc/vec/extract_if.v @@ -22,7 +22,7 @@ Module vec. Ty.apply (Ty.path "alloc::vec::extract_if::ExtractIf") [ T; F; A ]. (* Debug *) - Definition fmt (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self; f ] => @@ -37,49 +37,54 @@ Module vec. |), [ M.read (| f |); - M.read (| Value.String "ExtractIf" |); - M.read (| Value.String "vec" |); + M.read (| M.of_value (| Value.String "ExtractIf" |) |); + M.read (| M.of_value (| Value.String "vec" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "vec" - |)); - M.read (| Value.String "idx" |); + |) + |); + M.read (| M.of_value (| Value.String "idx" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "idx" - |)); - M.read (| Value.String "del" |); + |) + |); + M.read (| M.of_value (| Value.String "del" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "del" - |)); - M.read (| Value.String "old_len" |); + |) + |); + M.read (| M.of_value (| Value.String "old_len" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "old_len" - |)); - M.read (| Value.String "pred" |); + |) + |); + M.read (| M.of_value (| Value.String "pred" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "pred" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -103,7 +108,7 @@ Module vec. self.vec.allocator() } *) - Definition allocator (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self ] => @@ -165,7 +170,7 @@ Module vec. } } *) - Definition next (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self ] => @@ -178,28 +183,29 @@ Module vec. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "idx" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "old_len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -264,8 +270,16 @@ Module vec. "alloc::vec::extract_if::ExtractIf", "pred" |); - Value.Tuple - [ M.SubPointer.get_array_field (| M.read (| v |), i |) ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + i + |)) + ] + |) ] |) |) in @@ -279,12 +293,13 @@ Module vec. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -307,24 +322,31 @@ Module vec. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::ptr::read", [ T ] |), - [ - M.SubPointer.get_array_field (| - M.read (| v |), - i - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::ptr::read", + [ T ] + |), + [ + M.SubPointer.get_array_field (| + M.read (| v |), + i + |) + ] + |)) + ] + |) |) |) |) @@ -332,22 +354,23 @@ Module vec. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "del" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -375,6 +398,7 @@ Module vec. M.read (| v |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| i |), M.read (| del |) |) @@ -391,12 +415,14 @@ Module vec. [ M.read (| src |); M.read (| dst |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -410,14 +436,14 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -428,36 +454,43 @@ Module vec. (0, Some(self.old_len - self.idx)) } *) - Definition size_hint (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.sub (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::vec::extract_if::ExtractIf", - "old_len" - |) - |), - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::vec::extract_if::ExtractIf", - "idx" - |) - |) - |) - ] - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::vec::extract_if::ExtractIf", + "old_len" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::vec::extract_if::ExtractIf", + "idx" + |) + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -499,7 +532,7 @@ Module vec. } } *) - Definition drop (T F A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T F A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F A in match τ, α with | [], [ self ] => @@ -508,7 +541,7 @@ Module vec. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -516,31 +549,33 @@ Module vec. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "idx" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "old_len" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| + (BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "del" |) - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -607,6 +642,7 @@ Module vec. let tail_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -634,8 +670,8 @@ Module vec. [ M.read (| src |); M.read (| dst |); M.read (| tail_len |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -655,6 +691,7 @@ Module vec. |) |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -673,7 +710,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/vec/in_place_collect.v b/CoqOfRust/alloc/vec/in_place_collect.v index cd98249f6..437438cd0 100644 --- a/CoqOfRust/alloc/vec/in_place_collect.v +++ b/CoqOfRust/alloc/vec/in_place_collect.v @@ -26,7 +26,7 @@ Module vec. } } *) - Definition in_place_collectible (τ : list Ty.t) (α : list Value.t) : M := + Definition in_place_collectible (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ DEST; SRC ], [ step_merge; step_expand ] => ltac:(M.monadic @@ -37,7 +37,7 @@ Module vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49,13 +49,23 @@ Module vec. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| step_merge |); M.read (| step_expand |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| step_merge |)); + A.to_value (M.read (| step_expand |)) + ] + |) + |), [ fun γ => ltac:(M.monadic @@ -76,8 +86,9 @@ Module vec. |) in let step_expand := M.copy (| γ1_0 |) in M.alloc (| - BinOp.Pure.ge - (BinOp.Panic.mul (| + BinOp.Pure.ge (| + BinOp.Panic.mul (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ SRC ] |), [] @@ -90,8 +101,9 @@ Module vec. |), [ M.read (| step_merge |) ] |) - |)) - (BinOp.Panic.mul (| + |), + BinOp.Panic.mul (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ DEST ] |), [] @@ -104,9 +116,10 @@ Module vec. |), [ M.read (| step_expand |) ] |) - |)) + |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -136,7 +149,7 @@ Module vec. return src_cap > 0 && src_cap * mem::size_of::() != dst_cap * mem::size_of::(); } *) - Definition needs_realloc (τ : list Ty.t) (α : list Value.t) : M := + Definition needs_realloc (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ SRC; DEST ], [ src_cap; dst_cap ] => ltac:(M.monadic @@ -148,7 +161,7 @@ Module vec. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -163,19 +176,20 @@ Module vec. M.never_to_any (| M.read (| M.return_ (| - BinOp.Pure.gt - (M.read (| src_cap |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| src_cap |), + M.of_value (| Value.Integer 0 |) + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -187,30 +201,35 @@ Module vec. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.return_ (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| src_cap |)) (Value.Integer Integer.Usize 0), + BinOp.Pure.gt (| M.read (| src_cap |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.ne - (BinOp.Panic.mul (| + (BinOp.Pure.ne (| + BinOp.Panic.mul (| + Integer.Usize, M.read (| src_cap |), M.call_closure (| M.get_function (| "core::mem::size_of", [ SRC ] |), [] |) - |)) - (BinOp.Panic.mul (| + |), + BinOp.Panic.mul (| + Integer.Usize, M.read (| dst_cap |), M.call_closure (| M.get_function (| "core::mem::size_of", [ DEST ] |), [] |) - |)))) + |) + |))) |) |) |) @@ -332,7 +351,7 @@ Module vec. vec } *) - Definition from_iter (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ iterator ] => @@ -343,7 +362,7 @@ Module vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -374,7 +393,7 @@ Module vec. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -403,83 +422,99 @@ Module vec. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.associated ], - "as_ptr", - [] - |), - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.associated ], + "as_ptr", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| inner |), + "alloc::vec::into_iter::IntoIter", + "buf" + |) + |) + ] + |)); + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| inner |), "alloc::vec::into_iter::IntoIter", - "buf" + "ptr" |) - |) - ] - |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| inner |), - "alloc::vec::into_iter::IntoIter", - "ptr" - |) - |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| inner |), - "alloc::vec::into_iter::IntoIter", - "cap" - |) - |); - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.associated ], - "as_ptr", - [] - |), - [ + |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| inner |), + "alloc::vec::into_iter::IntoIter", + "cap" + |) + |)); + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.associated ], + "as_ptr", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| inner |), + "alloc::vec::into_iter::IntoIter", + "buf" + |) + |) + ] + |) + |)); + A.to_value + (M.rust_cast (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| inner |), "alloc::vec::into_iter::IntoIter", - "buf" + "end" |) |) - ] - |)); - M.rust_cast - (M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| inner |), - "alloc::vec::into_iter::IntoIter", - "end" - |) - |)); - BinOp.Panic.div (| - BinOp.Panic.mul (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| inner |), - "alloc::vec::into_iter::IntoIter", - "cap" + |)); + A.to_value + (BinOp.Panic.div (| + Integer.Usize, + BinOp.Panic.mul (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| inner |), + "alloc::vec::into_iter::IntoIter", + "cap" + |) + |), + M.call_closure (| + M.get_function (| "core::mem::size_of", [ Ty.associated ] |), + [] + |) + |), + M.call_closure (| + M.get_function (| "core::mem::size_of", [ T ] |), + [] |) - |), - M.call_closure (| - M.get_function (| "core::mem::size_of", [ Ty.associated ] |), - [] - |) - |), - M.call_closure (| - M.get_function (| "core::mem::size_of", [ T ] |), - [] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -535,11 +570,12 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -548,30 +584,33 @@ Module vec. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - src_buf; - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.associated ], - "as_ptr", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| src |), - "alloc::vec::into_iter::IntoIter", - "buf" - |) + M.of_value (| + Value.Tuple + [ + A.to_value src_buf; + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.associated ], + "as_ptr", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| src |), + "alloc::vec::into_iter::IntoIter", + "buf" + |) + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -582,19 +621,19 @@ Module vec. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| - M.read (| right_val |) - |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -606,9 +645,11 @@ Module vec. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -627,9 +668,11 @@ Module vec. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -637,33 +680,38 @@ Module vec. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| src |), "alloc::vec::into_iter::IntoIter", "ptr" |) - |)) - (M.read (| src_ptr |)) + |), + M.read (| src_ptr |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -672,11 +720,15 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -684,17 +736,17 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.rust_cast - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -706,14 +758,17 @@ Module vec. M.read (| dst_buf |); M.read (| len |) ] - |))) - (M.read (| + |) + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| src |), "alloc::vec::into_iter::IntoIter", "ptr" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -736,16 +791,22 @@ Module vec. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "InPlaceIterable contract violation, write pointer advanced beyond read pointer" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "InPlaceIterable contract violation, write pointer advanced beyond read pointer" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -754,26 +815,33 @@ Module vec. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let dst_guard := M.alloc (| - Value.StructRecord - "alloc::vec::in_place_drop::InPlaceDstBufDrop" - [ - ("ptr", M.read (| dst_buf |)); - ("len", M.read (| len |)); - ("cap", M.read (| dst_cap |)) - ] + M.of_value (| + Value.StructRecord + "alloc::vec::in_place_drop::InPlaceDstBufDrop" + [ + ("ptr", A.to_value (M.read (| dst_buf |))); + ("len", A.to_value (M.read (| len |))); + ("cap", A.to_value (M.read (| dst_cap |))) + ] + |) |) in let _ := M.alloc (| @@ -790,7 +858,7 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -811,14 +879,20 @@ Module vec. Value.Bool true |) in let alloc := - M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |) in + M.alloc (| + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -827,11 +901,16 @@ Module vec. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - src_cap; - M.alloc (| Value.Integer Integer.Usize 0 |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value src_cap; + A.to_value + (M.alloc (| + M.of_value (| Value.Integer 0 |) + |)) + ] + |) |), [ fun γ => @@ -843,20 +922,23 @@ Module vec. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -868,9 +950,11 @@ Module vec. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Ne" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Ne" + [] + |) |) in M.alloc (| M.call_closure (| @@ -885,9 +969,11 @@ Module vec. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -896,22 +982,30 @@ Module vec. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -920,11 +1014,16 @@ Module vec. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - dst_cap; - M.alloc (| Value.Integer Integer.Usize 0 |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value dst_cap; + A.to_value + (M.alloc (| + M.of_value (| Value.Integer 0 |) + |)) + ] + |) |), [ fun γ => @@ -936,20 +1035,23 @@ Module vec. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -961,9 +1063,11 @@ Module vec. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Ne" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Ne" + [] + |) |) in M.alloc (| M.call_closure (| @@ -978,9 +1082,11 @@ Module vec. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -989,13 +1095,17 @@ Module vec. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let src_align := @@ -1094,7 +1204,7 @@ Module vec. "new_unchecked", [] |), - [ M.rust_cast (M.read (| dst_buf |)) ] + [ M.rust_cast (| M.read (| dst_buf |) |) ] |); M.read (| old_layout |); M.read (| new_layout |) @@ -1116,8 +1226,8 @@ Module vec. let _ := M.write (| dst_buf, - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -1130,20 +1240,25 @@ Module vec. [] |), [ M.read (| reallocated |) ] - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1152,33 +1267,39 @@ Module vec. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - BinOp.Panic.mul (| - M.read (| src_cap |), - M.call_closure (| - M.get_function (| - "core::mem::size_of", - [ Ty.associated ] - |), - [] - |) - |) - |); - M.alloc (| - BinOp.Panic.mul (| - M.read (| dst_cap |), - M.call_closure (| - M.get_function (| - "core::mem::size_of", - [ T ] - |), - [] - |) - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + BinOp.Panic.mul (| + Integer.Usize, + M.read (| src_cap |), + M.call_closure (| + M.get_function (| + "core::mem::size_of", + [ Ty.associated ] + |), + [] + |) + |) + |)); + A.to_value + (M.alloc (| + BinOp.Panic.mul (| + Integer.Usize, + M.read (| dst_cap |), + M.call_closure (| + M.get_function (| + "core::mem::size_of", + [ T ] + |), + [] + |) + |) + |)) + ] + |) |), [ fun γ => @@ -1190,21 +1311,25 @@ Module vec. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1216,9 +1341,11 @@ Module vec. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -1233,9 +1360,11 @@ Module vec. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -1244,16 +1373,20 @@ Module vec. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1319,13 +1452,13 @@ Module vec. } } *) - Definition write_in_place_with_drop (τ : list Ty.t) (α : list Value.t) : M := + Definition write_in_place_with_drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src_end ] => ltac:(M.monadic (let src_end := M.alloc (| src_end |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1345,11 +1478,15 @@ Module vec. let _ := let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1357,26 +1494,30 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.rust_cast + UnOp.Pure.not (| + BinOp.Pure.le (| + M.rust_cast (| (* MutToConstPointer *) - (M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| sink, "alloc::vec::in_place_drop::InPlaceDrop", "dst" |) - |)))) - (M.read (| src_end |))) + |) + |) + |), + M.read (| src_end |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1400,16 +1541,22 @@ Module vec. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "InPlaceIterable contract violation" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "InPlaceIterable contract violation" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -1418,11 +1565,15 @@ Module vec. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1462,15 +1613,17 @@ Module vec. "dst" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.read (| sink |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| sink |)) ] + |) |) |))) ] @@ -1478,7 +1631,8 @@ Module vec. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -1505,7 +1659,7 @@ Module vec. unsafe { ManuallyDrop::new(sink).dst.sub_ptr(dst_buf) } } *) - Definition collect_in_place (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition collect_in_place (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self; dst_buf; end_ ] => @@ -1516,9 +1670,14 @@ Module vec. M.read (| let sink := M.alloc (| - Value.StructRecord - "alloc::vec::in_place_drop::InPlaceDrop" - [ ("inner", M.read (| dst_buf |)); ("dst", M.read (| dst_buf |)) ] + M.of_value (| + Value.StructRecord + "alloc::vec::in_place_drop::InPlaceDrop" + [ + ("inner", A.to_value (M.read (| dst_buf |))); + ("dst", A.to_value (M.read (| dst_buf |))) + ] + |) |) in let sink := M.alloc (| @@ -1605,7 +1764,7 @@ Module vec. "dst" |) |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| dst_buf |)) + (* MutToConstPointer *) M.pointer_coercion (| M.read (| dst_buf |) |) ] |) |) @@ -1646,7 +1805,7 @@ Module vec. len } *) - Definition collect_in_place (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition collect_in_place (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self; dst_buf; end_ ] => @@ -1670,9 +1829,14 @@ Module vec. |) in let drop_guard := M.alloc (| - Value.StructRecord - "alloc::vec::in_place_drop::InPlaceDrop" - [ ("inner", M.read (| dst_buf |)); ("dst", M.read (| dst_buf |)) ] + M.of_value (| + Value.StructRecord + "alloc::vec::in_place_drop::InPlaceDrop" + [ + ("inner", A.to_value (M.read (| dst_buf |))); + ("dst", A.to_value (M.read (| dst_buf |))) + ] + |) |) in let _ := M.use @@ -1687,9 +1851,14 @@ Module vec. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.Usize 0); ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) ] |) |), @@ -1743,11 +1912,15 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1755,20 +1928,24 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.rust_cast + UnOp.Pure.not (| + BinOp.Pure.le (| + M.rust_cast (| (* MutToConstPointer *) - (M.pointer_coercion - (M.read (| dst |)))) - (M.read (| end_ |))) + M.pointer_coercion (| + M.read (| dst |) + |) + |), + M.read (| end_ |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1792,16 +1969,22 @@ Module vec. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "InPlaceIterable contract violation" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "InPlaceIterable contract violation" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -1810,12 +1993,15 @@ Module vec. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1850,13 +2036,13 @@ Module vec. "add", [] |), - [ M.read (| dst |); Value.Integer Integer.Usize 1 ] + [ M.read (| dst |); M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in diff --git a/CoqOfRust/alloc/vec/in_place_drop.v b/CoqOfRust/alloc/vec/in_place_drop.v index 12b4e0906..af073e3a2 100644 --- a/CoqOfRust/alloc/vec/in_place_drop.v +++ b/CoqOfRust/alloc/vec/in_place_drop.v @@ -20,7 +20,7 @@ Module vec. unsafe { self.dst.sub_ptr(self.inner) } } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -37,14 +37,15 @@ Module vec. |) |); (* MutToConstPointer *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::in_place_drop::InPlaceDrop", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -66,7 +67,7 @@ Module vec. } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -104,7 +105,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -139,7 +140,7 @@ Module vec. unsafe { super::Vec::from_raw_parts(self.ptr, self.len, self.cap) }; } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -179,7 +180,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/vec/into_iter.v b/CoqOfRust/alloc/vec/into_iter.v index 7666b10c7..4a5cb2912 100644 --- a/CoqOfRust/alloc/vec/into_iter.v +++ b/CoqOfRust/alloc/vec/into_iter.v @@ -27,7 +27,7 @@ Module vec. f.debug_tuple("IntoIter").field(&self.as_slice()).finish() } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -55,12 +55,12 @@ Module vec. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "IntoIter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "IntoIter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::into_iter::IntoIter") [ T; A ], @@ -69,7 +69,8 @@ Module vec. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -95,7 +96,7 @@ Module vec. unsafe { slice::from_raw_parts(self.ptr, self.len()) } } *) - Definition as_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -135,7 +136,7 @@ Module vec. unsafe { &mut *self.as_raw_mut_slice() } } *) - Definition as_mut_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -161,7 +162,7 @@ Module vec. &self.alloc } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -195,7 +196,7 @@ Module vec. ptr::slice_from_raw_parts_mut(self.ptr as *mut T, self.len()) } *) - Definition as_raw_mut_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_raw_mut_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -204,14 +205,15 @@ Module vec. M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::into_iter::IntoIter", "ptr" |) - |)); + |) + |); M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", @@ -252,11 +254,7 @@ Module vec. } } *) - Definition forget_allocation_drop_remaining - (T A : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition forget_allocation_drop_remaining (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -281,7 +279,7 @@ Module vec. "alloc::vec::into_iter::IntoIter", "cap" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| @@ -318,8 +316,8 @@ Module vec. "ptr" |), (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], "as_ptr", @@ -334,7 +332,8 @@ Module vec. |) |) ] - |)) + |) + |) |) in let _ := M.write (| @@ -344,8 +343,8 @@ Module vec. "end" |), (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], "as_ptr", @@ -360,7 +359,8 @@ Module vec. |) |) ] - |)) + |) + |) |) in let _ := M.alloc (| @@ -372,7 +372,7 @@ Module vec. [ M.read (| remaining |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -391,7 +391,7 @@ Module vec. self.end = self.ptr; } *) - Definition forget_remaining_elements (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition forget_remaining_elements (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -413,7 +413,7 @@ Module vec. |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -451,7 +451,7 @@ Module vec. } } *) - Definition into_vecdeque (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_vecdeque (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -504,7 +504,7 @@ Module vec. let initialized := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -513,56 +513,24 @@ Module vec. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - Ty.apply (Ty.path "alloc::vec::into_iter::IntoIter") [ T; A ], - [], - "len", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.call_closure (| M.get_trait_method (| - "core::ops::deref::Deref", + "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ - Ty.apply - (Ty.path "alloc::vec::into_iter::IntoIter") - [ T; A ] - ], + (Ty.path "alloc::vec::into_iter::IntoIter") + [ T; A ], [], - "deref", + "len", [] |), - [ this ] - |) - ] - |)) - ] - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "sub_ptr", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| + [ M.call_closure (| M.get_trait_method (| "core::ops::deref::Deref", @@ -578,48 +546,93 @@ Module vec. [] |), [ this ] - |), - "alloc::vec::into_iter::IntoIter", - "ptr" - |) - |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| buf |)) - ] - |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "sub_ptr", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ + |) + ] + |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "sub_ptr", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", Ty.apply - (Ty.path "alloc::vec::into_iter::IntoIter") - [ T; A ] - ], - [], - "deref", - [] - |), - [ this ] - |), - "alloc::vec::into_iter::IntoIter", - "end" - |) - |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| buf |)) - ] - |)) - ] + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ + Ty.apply + (Ty.path "alloc::vec::into_iter::IntoIter") + [ T; A ] + ], + [], + "deref", + [] + |), + [ this ] + |), + "alloc::vec::into_iter::IntoIter", + "ptr" + |) + |); + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| buf |) |) + ] + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "sub_ptr", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ + Ty.apply + (Ty.path "alloc::vec::into_iter::IntoIter") + [ T; A ] + ], + [], + "deref", + [] + |), + [ this ] + |), + "alloc::vec::into_iter::IntoIter", + "end" + |) + |); + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| buf |) |) + ] + |))) + ] + |) |))) ] |) @@ -700,7 +713,7 @@ Module vec. self.as_slice() } *) - Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -778,7 +791,7 @@ Module vec. } } *) - Definition next (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -786,35 +799,38 @@ Module vec. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::into_iter::IntoIter", "ptr" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::into_iter::IntoIter", "end" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -847,19 +863,22 @@ Module vec. "end" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::mem::zeroed", [ T ] |), - [] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::zeroed", [ T ] |), + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -892,19 +911,22 @@ Module vec. "ptr" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::ptr::read", [ T ] |), - [ M.read (| old |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::ptr::read", [ T ] |), + [ M.read (| old |) ] + |)) + ] + |) |))) ] |))) @@ -924,7 +946,7 @@ Module vec. (exact, Some(exact)) } *) - Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -934,7 +956,7 @@ Module vec. let exact := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1012,11 +1034,18 @@ Module vec. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| exact |); - Value.StructTuple "core::option::Option::Some" [ M.read (| exact |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| exact |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| exact |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -1040,7 +1069,7 @@ Module vec. NonZeroUsize::new(n - step_size).map_or(Ok(()), Err) } *) - Definition advance_by (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; n ] => @@ -1074,21 +1103,22 @@ Module vec. M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::into_iter::IntoIter", "ptr" |) - |)); + |) + |); M.read (| step_size |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1121,7 +1151,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1149,7 +1179,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1163,7 +1193,7 @@ Module vec. [ M.read (| to_drop |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1189,10 +1219,15 @@ Module vec. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| step_size |) |) ] + [ BinOp.Panic.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" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -1205,7 +1240,7 @@ Module vec. self.len() } *) - Definition count (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1261,7 +1296,7 @@ Module vec. }; } *) - Definition next_chunk (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_chunk (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1299,7 +1334,7 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1316,20 +1351,21 @@ Module vec. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| len |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| len |), + M.read (| M.get_constant (| "alloc::vec::into_iter::next_chunk::N" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1354,35 +1390,47 @@ Module vec. |) |) in M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::array::iter::IntoIter") - [ T ], - "new_unchecked", - [] - |), - [ - M.read (| raw_ary |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::array::iter::IntoIter") + [ T ], + "new_unchecked", + [] + |), [ - ("start", - Value.Integer Integer.Usize 0); - ("end_", M.read (| len |)) + M.read (| raw_ary |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value + (M.read (| len |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1415,57 +1463,61 @@ Module vec. |) |) in M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.apply (Ty.path "array") [ T ] ], - "assume_init", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "array") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ], - "transpose", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.apply (Ty.path "array") [ T ] ], + "assume_init", [] |), - [ M.read (| raw_ary |) ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "array") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ], + "transpose", + [] + |), + [ M.read (| raw_ary |) ] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| len |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| len |), + M.read (| M.get_constant (| "alloc::vec::into_iter::next_chunk::N" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1490,8 +1542,8 @@ Module vec. "ptr" |) |); - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1504,8 +1556,9 @@ Module vec. "as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion raw_ary ] - |)); + [ (* Unsize *) M.pointer_coercion (| raw_ary |) ] + |) + |); M.read (| len |) ] |) @@ -1524,33 +1577,40 @@ Module vec. |) |) in M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::array::iter::IntoIter") - [ T ], - "new_unchecked", - [] - |), - [ - M.read (| raw_ary |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::array::iter::IntoIter") + [ T ], + "new_unchecked", + [] + |), [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| len |)) + M.read (| raw_ary |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.return_ (| @@ -1567,8 +1627,8 @@ Module vec. "ptr" |) |); - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1580,8 +1640,9 @@ Module vec. "as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion raw_ary ] - |)); + [ (* Unsize *) M.pointer_coercion (| raw_ary |) ] + |) + |); M.read (| M.get_constant (| "alloc::vec::into_iter::next_chunk::N" |) |) @@ -1616,35 +1677,38 @@ Module vec. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.apply (Ty.path "array") [ T ] ], - "assume_init", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "array") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ], - "transpose", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.apply (Ty.path "array") [ T ] ], + "assume_init", [] |), - [ M.read (| raw_ary |) ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "array") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ], + "transpose", + [] + |), + [ M.read (| raw_ary |) ] + |) + ] + |)) + ] + |) |) |) |) @@ -1670,7 +1734,7 @@ Module vec. unsafe { if T::IS_ZST { mem::zeroed() } else { ptr::read(self.ptr.add(i)) } } } *) - Definition __iterator_get_unchecked (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; i ] => @@ -1679,7 +1743,7 @@ Module vec. let i := M.alloc (| i |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1760,7 +1824,7 @@ Module vec. } } *) - Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1768,35 +1832,38 @@ Module vec. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::into_iter::IntoIter", "end" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::into_iter::IntoIter", "ptr" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1829,19 +1896,22 @@ Module vec. "end" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::mem::zeroed", [ T ] |), - [] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::zeroed", [ T ] |), + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1866,27 +1936,30 @@ Module vec. "end" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::ptr::read", [ T ] |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::vec::into_iter::IntoIter", - "end" - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::ptr::read", [ T ] |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::vec::into_iter::IntoIter", + "end" + |) + |) + ] + |)) + ] + |) |))) ] |))) @@ -1914,7 +1987,7 @@ Module vec. NonZeroUsize::new(n - step_size).map_or(Ok(()), Err) } *) - Definition advance_back_by (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; n ] => @@ -1945,7 +2018,7 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1978,7 +2051,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -2006,7 +2079,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let to_drop := @@ -2014,14 +2087,15 @@ Module vec. M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::into_iter::IntoIter", "end" |) - |)); + |) + |); M.read (| step_size |) ] |) @@ -2037,7 +2111,7 @@ Module vec. [ M.read (| to_drop |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2063,10 +2137,15 @@ Module vec. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| step_size |) |) ] + [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| step_size |) |) + ] + |); + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -2096,27 +2175,28 @@ Module vec. self.ptr == self.end } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::into_iter::IntoIter", "ptr" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::into_iter::IntoIter", "end" |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -2177,7 +2257,7 @@ Module vec. super::Vec::new_in(Default::default()).into_iter() } *) - Definition default (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [] => @@ -2239,9 +2319,9 @@ Module vec. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T A : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T A : Ty.t) : A.t := let Self : Ty.t := Self T A in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T A : Ty.t), @@ -2263,7 +2343,7 @@ Module vec. self.as_slice().to_vec_in(self.alloc.deref().clone()).into_iter() } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2357,7 +2437,7 @@ Module vec. // now `guard` will be dropped and do the rest } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2366,7 +2446,11 @@ Module vec. M.read (| let guard := M.alloc (| - Value.StructTuple "alloc::vec::into_iter::drop::DropGuard" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "alloc::vec::into_iter::drop::DropGuard" + [ A.to_value (M.read (| self |)) ] + |) |) in let _ := M.alloc (| @@ -2395,7 +2479,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2415,7 +2499,7 @@ Module vec. (* const EXPAND_BY: Option = NonZeroUsize::new(1); *) (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (T A : Ty.t) : Value.t := + Definition value_EXPAND_BY (T A : Ty.t) : A.t := let Self : Ty.t := Self T A in M.run ltac:(M.monadic @@ -2426,13 +2510,13 @@ Module vec. "new", [] |), - [ Value.Integer Integer.Usize 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). (* const MERGE_BY: Option = NonZeroUsize::new(1); *) (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (T A : Ty.t) : Value.t := + Definition value_MERGE_BY (T A : Ty.t) : A.t := let Self : Ty.t := Self T A in M.run ltac:(M.monadic @@ -2443,7 +2527,7 @@ Module vec. "new", [] |), - [ Value.Integer Integer.Usize 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). @@ -2473,7 +2557,7 @@ Module vec. self } *) - Definition as_inner (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -2508,7 +2592,7 @@ Module vec. self } *) - Definition as_into_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_into_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/alloc/vec/is_zero.v b/CoqOfRust/alloc/vec/is_zero.v index 8c7cd56a3..1bc8839c6 100644 --- a/CoqOfRust/alloc/vec/is_zero.v +++ b/CoqOfRust/alloc/vec/is_zero.v @@ -14,7 +14,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -29,8 +29,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -40,13 +40,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.I8 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -68,7 +72,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -83,8 +87,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -94,13 +98,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.I16 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -122,7 +130,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -137,8 +145,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -148,13 +156,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.I32 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -176,7 +188,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -191,8 +203,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -202,13 +214,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.I64 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -230,7 +246,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -245,8 +261,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -256,13 +272,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.I128 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -284,7 +304,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -299,8 +319,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -310,13 +330,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.Isize 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -338,7 +362,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -353,8 +377,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -364,13 +388,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.U8 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -392,7 +420,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -407,8 +435,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -418,13 +446,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.U16 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -446,7 +478,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -461,8 +493,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -472,13 +504,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.U32 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -500,7 +536,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -515,8 +551,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -526,13 +562,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.U64 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -554,7 +594,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -569,8 +609,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -580,13 +620,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.U128 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -608,7 +652,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -623,8 +667,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -634,13 +678,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Integer Integer.Usize 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -662,7 +710,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -677,8 +725,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -688,13 +736,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.Bool false))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Bool false |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -716,7 +768,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -731,8 +783,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -742,13 +794,17 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| x |)) (Value.UnicodeChar 0))) + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.UnicodeChar 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -770,7 +826,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -785,8 +841,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -796,18 +852,20 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "f32", "to_bits", [] |), [ M.read (| x |) ] - |)) - (Value.Integer Integer.U32 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -829,7 +887,7 @@ Module vec. $is_zero( *self) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -844,8 +902,8 @@ Module vec. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -855,18 +913,20 @@ Module vec. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "f64", "to_bits", [] |), [ M.read (| x |) ] - |)) - (Value.Integer Integer.U64 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| M.read (| self |) |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| M.read (| self |) |)) ] |) ] |))) | _, _ => M.impossible @@ -888,7 +948,7 @@ Module vec. ( *self).is_null() } *) - Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -918,7 +978,7 @@ Module vec. ( *self).is_null() } *) - Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -955,16 +1015,17 @@ Module vec. N <= 16 && self.iter().all(IsZero::is_zero) } *) - Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in LogicalOp.and (| - BinOp.Pure.le - (M.read (| M.get_constant (| "alloc::vec::is_zero::N" |) |)) - (Value.Integer Integer.Usize 16), + BinOp.Pure.le (| + M.read (| M.get_constant (| "alloc::vec::is_zero::N" |) |), + M.of_value (| Value.Integer 16 |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -982,7 +1043,7 @@ Module vec. "iter", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |) |); M.get_trait_method (| "alloc::vec::is_zero::IsZero", T, [], "is_zero", [] |) @@ -1015,7 +1076,7 @@ Module vec. $( && $rest.is_zero() )* } *) - Definition is_zero (A B C D E F G H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (A B C D E F G H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B C D E F G H in match τ, α with | [], [ self ] => @@ -1176,7 +1237,7 @@ Module vec. $( && $rest.is_zero() )* } *) - Definition is_zero (B C D E F G H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (B C D E F G H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C D E F G H in match τ, α with | [], [ self ] => @@ -1322,7 +1383,7 @@ Module vec. $( && $rest.is_zero() )* } *) - Definition is_zero (C D E F G H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (C D E F G H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C D E F G H in match τ, α with | [], [ self ] => @@ -1453,7 +1514,7 @@ Module vec. $( && $rest.is_zero() )* } *) - Definition is_zero (D E F G H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (D E F G H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D E F G H in match τ, α with | [], [ self ] => @@ -1569,7 +1630,7 @@ Module vec. $( && $rest.is_zero() )* } *) - Definition is_zero (E F G H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (E F G H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E F G H in match τ, α with | [], [ self ] => @@ -1670,7 +1731,7 @@ Module vec. $( && $rest.is_zero() )* } *) - Definition is_zero (F G H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (F G H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F G H in match τ, α with | [], [ self ] => @@ -1756,7 +1817,7 @@ Module vec. $( && $rest.is_zero() )* } *) - Definition is_zero (G H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (G H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self G H in match τ, α with | [], [ self ] => @@ -1827,7 +1888,7 @@ Module vec. $( && $rest.is_zero() )* } *) - Definition is_zero (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self ] => @@ -1878,7 +1939,7 @@ Module vec. self.is_none() } *) - Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1915,7 +1976,7 @@ Module vec. self.is_none() } *) - Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1952,7 +2013,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1987,7 +2048,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2022,7 +2083,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2057,7 +2118,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2092,7 +2153,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2127,7 +2188,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2162,7 +2223,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2197,7 +2258,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2232,7 +2293,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2267,7 +2328,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2302,7 +2363,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2337,7 +2398,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2375,7 +2436,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2416,7 +2477,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2457,7 +2518,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2498,7 +2559,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2539,7 +2600,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2580,7 +2641,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2621,7 +2682,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2662,7 +2723,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2703,7 +2764,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2744,7 +2805,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2785,7 +2846,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2826,7 +2887,7 @@ Module vec. self.is_none() } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2863,7 +2924,7 @@ Module vec. self.0.is_zero() } *) - Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2900,7 +2961,7 @@ Module vec. self.0.is_zero() } *) - Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2941,7 +3002,7 @@ Module vec. raw == 0 } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2957,7 +3018,7 @@ Module vec. [ M.read (| M.read (| self |) |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| raw |)) (Value.Integer Integer.U8 0) |) + M.alloc (| BinOp.Pure.eq (| M.read (| raw |), M.of_value (| Value.Integer 0 |) |) |) |))) | _, _ => M.impossible end. @@ -2986,7 +3047,7 @@ Module vec. raw == 0 } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3007,7 +3068,7 @@ Module vec. [ M.read (| M.read (| self |) |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| raw |)) (Value.Integer Integer.U8 0) |) + M.alloc (| BinOp.Pure.eq (| M.read (| raw |), M.of_value (| Value.Integer 0 |) |) |) |))) | _, _ => M.impossible end. @@ -3040,7 +3101,7 @@ Module vec. raw == 0 } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3065,7 +3126,7 @@ Module vec. [ M.read (| M.read (| self |) |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| raw |)) (Value.Integer Integer.U8 0) |) + M.alloc (| BinOp.Pure.eq (| M.read (| raw |), M.of_value (| Value.Integer 0 |) |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/vec/mod.v b/CoqOfRust/alloc/vec/mod.v index cb39d7de2..629099290 100644 --- a/CoqOfRust/alloc/vec/mod.v +++ b/CoqOfRust/alloc/vec/mod.v @@ -19,17 +19,19 @@ Module vec. Vec { buf: RawVec::NEW, len: 0 } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "alloc::vec::Vec" - [ - ("buf", M.read (| M.get_constant (| "alloc::raw_vec::NEW" |) |)); - ("len", Value.Integer Integer.Usize 0) - ])) + (M.of_value (| + Value.StructRecord + "alloc::vec::Vec" + [ + ("buf", A.to_value (M.read (| M.get_constant (| "alloc::raw_vec::NEW" |) |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -40,7 +42,7 @@ Module vec. Self::with_capacity_in(capacity, Global) } *) - Definition with_capacity (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ capacity ] => @@ -52,7 +54,7 @@ Module vec. "with_capacity_in", [] |), - [ M.read (| capacity |); Value.StructTuple "alloc::alloc::Global" [] ] + [ M.read (| capacity |); M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible end. @@ -66,7 +68,7 @@ Module vec. unsafe { Self::from_raw_parts_in(ptr, length, capacity, Global) } } *) - Definition from_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr; length; capacity ] => @@ -84,7 +86,7 @@ Module vec. M.read (| ptr |); M.read (| length |); M.read (| capacity |); - Value.StructTuple "alloc::alloc::Global" [] + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) ] |))) | _, _ => M.impossible @@ -103,26 +105,29 @@ Module vec. Vec { buf: RawVec::new_in(alloc), len: 0 } } *) - Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ alloc ] => ltac:(M.monadic (let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::vec::Vec" - [ - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], - "new_in", - [] - |), - [ M.read (| alloc |) ] - |)); - ("len", Value.Integer Integer.Usize 0) - ])) + M.of_value (| + Value.StructRecord + "alloc::vec::Vec" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], + "new_in", + [] + |), + [ M.read (| alloc |) ] + |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -135,27 +140,30 @@ Module vec. Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } } *) - Definition with_capacity_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_capacity_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ capacity; alloc ] => ltac:(M.monadic (let capacity := M.alloc (| capacity |) in let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::vec::Vec" - [ - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], - "with_capacity_in", - [] - |), - [ M.read (| capacity |); M.read (| alloc |) ] - |)); - ("len", Value.Integer Integer.Usize 0) - ])) + M.of_value (| + Value.StructRecord + "alloc::vec::Vec" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], + "with_capacity_in", + [] + |), + [ M.read (| capacity |); M.read (| alloc |) ] + |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -168,7 +176,7 @@ Module vec. unsafe { Vec { buf: RawVec::from_raw_parts_in(ptr, capacity, alloc), len: length } } } *) - Definition from_raw_parts_in (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_parts_in (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ ptr; length; capacity; alloc ] => @@ -177,20 +185,23 @@ Module vec. let length := M.alloc (| length |) in let capacity := M.alloc (| capacity |) in let alloc := M.alloc (| alloc |) in - Value.StructRecord - "alloc::vec::Vec" - [ - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], - "from_raw_parts_in", - [] - |), - [ M.read (| ptr |); M.read (| capacity |); M.read (| alloc |) ] - |)); - ("len", M.read (| length |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::vec::Vec" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], + "from_raw_parts_in", + [] + |), + [ M.read (| ptr |); M.read (| capacity |); M.read (| alloc |) ] + |))); + ("len", A.to_value (M.read (| length |))) + ] + |))) | _, _ => M.impossible end. @@ -204,7 +215,7 @@ Module vec. (me.as_mut_ptr(), me.len(), me.capacity()) } *) - Definition into_raw_parts (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw_parts (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -225,72 +236,77 @@ Module vec. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "as_mut_ptr", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ], - [], - "deref_mut", + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "as_mut_ptr", [] |), - [ me ] - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "len", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ], - [], - "deref", + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ], + [], + "deref_mut", + [] + |), + [ me ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "len", [] |), - [ me ] - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "capacity", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ], - [], - "deref", + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ], + [], + "deref", + [] + |), + [ me ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "capacity", [] |), - [ me ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ], + [], + "deref", + [] + |), + [ me ] + |) + ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -310,7 +326,7 @@ Module vec. (ptr, len, capacity, alloc) } *) - Definition into_raw_parts_with_alloc (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_raw_parts_with_alloc (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -432,8 +448,15 @@ Module vec. |) |) in M.alloc (| - Value.Tuple - [ M.read (| ptr |); M.read (| len |); M.read (| capacity |); M.read (| alloc |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| ptr |)); + A.to_value (M.read (| len |)); + A.to_value (M.read (| capacity |)); + A.to_value (M.read (| alloc |)) + ] + |) |) |))) | _, _ => M.impossible @@ -448,7 +471,7 @@ Module vec. self.buf.capacity() } *) - Definition capacity (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition capacity (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -475,7 +498,7 @@ Module vec. self.buf.reserve(self.len, additional); } *) - Definition reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -508,7 +531,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -522,7 +545,7 @@ Module vec. self.buf.reserve_exact(self.len, additional); } *) - Definition reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -555,7 +578,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -569,7 +592,7 @@ Module vec. self.buf.try_reserve(self.len, additional) } *) - Definition try_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -610,7 +633,7 @@ Module vec. self.buf.try_reserve_exact(self.len, additional) } *) - Definition try_reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reserve_exact (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -656,7 +679,7 @@ Module vec. } } *) - Definition shrink_to_fit (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink_to_fit (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -664,29 +687,30 @@ Module vec. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -713,8 +737,8 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -732,7 +756,7 @@ Module vec. } } *) - Definition shrink_to (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink_to (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; min_capacity ] => @@ -741,23 +765,24 @@ Module vec. let min_capacity := M.alloc (| min_capacity |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |)) - (M.read (| min_capacity |)) + |), + M.read (| min_capacity |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -790,8 +815,8 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -813,7 +838,7 @@ Module vec. } } *) - Definition into_boxed_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_boxed_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -952,7 +977,7 @@ Module vec. } } *) - Definition truncate (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition truncate (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; len ] => @@ -964,34 +989,38 @@ Module vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| len |)) - (M.read (| + BinOp.Pure.gt (| + M.read (| len |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let remaining_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1048,7 +1077,7 @@ Module vec. [ M.read (| s |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -1063,7 +1092,7 @@ Module vec. self } *) - Definition as_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1091,7 +1120,7 @@ Module vec. self } *) - Definition as_mut_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1121,15 +1150,15 @@ Module vec. self.buf.ptr() } *) - Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "ptr", @@ -1142,7 +1171,8 @@ Module vec. "buf" |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1157,7 +1187,7 @@ Module vec. self.buf.ptr() } *) - Definition as_mut_ptr (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_ptr (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1184,7 +1214,7 @@ Module vec. self.buf.allocator() } *) - Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocator (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -1213,7 +1243,7 @@ Module vec. self.len = new_len; } *) - Definition set_len (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition set_len (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; new_len ] => @@ -1223,32 +1253,34 @@ Module vec. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| new_len |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| new_len |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1261,18 +1293,21 @@ Module vec. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: new_len <= self.capacity()" + M.of_value (| + Value.String + "assertion failed: new_len <= self.capacity()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1284,7 +1319,7 @@ Module vec. |), M.read (| new_len |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1318,7 +1353,7 @@ Module vec. } } *) - Definition swap_remove (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_remove (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index ] => @@ -1339,13 +1374,15 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.ge (M.read (| index |)) (M.read (| len |)) |)) in + (M.alloc (| + BinOp.Pure.ge (| M.read (| index |), M.read (| len |) |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| @@ -1355,7 +1392,7 @@ Module vec. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let value := @@ -1397,19 +1434,24 @@ Module vec. M.get_function (| "core::intrinsics::copy", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ M.read (| base_ptr |); - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ M.read (| base_ptr |); M.read (| index |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -1423,7 +1465,11 @@ Module vec. |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) ] |) |) in @@ -1474,7 +1520,7 @@ Module vec. } } *) - Definition insert (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index; element ] => @@ -1496,16 +1542,16 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| len |)) - (M.call_closure (| + BinOp.Pure.eq (| + M.read (| len |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "capacity", @@ -1518,7 +1564,8 @@ Module vec. "buf" |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -1529,11 +1576,11 @@ Module vec. "reserve", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1556,13 +1603,15 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| index |)) (M.read (| len |)) |)) in + (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 _ := @@ -1570,38 +1619,42 @@ Module vec. M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| p |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| p |) |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), - [ M.read (| p |); Value.Integer Integer.Usize 1 ] + [ M.read (| p |); M.of_value (| Value.Integer 1 |) ] |); - BinOp.Panic.sub (| M.read (| len |), M.read (| index |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| index |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| index |)) (M.read (| len |)) + BinOp.Pure.eq (| M.read (| index |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1627,7 +1680,7 @@ Module vec. [ M.read (| p |); M.read (| element |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -1638,11 +1691,15 @@ Module vec. |), [ M.read (| self |); - BinOp.Panic.add (| M.read (| len |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1682,7 +1739,7 @@ Module vec. } } *) - Definition remove (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; index ] => @@ -1703,13 +1760,15 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.ge (M.read (| index |)) (M.read (| len |)) |)) in + (M.alloc (| + BinOp.Pure.ge (| M.read (| index |), M.read (| len |) |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| @@ -1719,10 +1778,10 @@ Module vec. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let ret := M.copy (| Value.DeclaredButUndefined |) in + let ret := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := let ptr := M.alloc (| @@ -1746,7 +1805,7 @@ Module vec. ret, M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| ptr |)) ] + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| ptr |) |) ] |) |) in let _ := @@ -1755,24 +1814,26 @@ Module vec. M.get_function (| "core::intrinsics::copy", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), - [ M.read (| ptr |); Value.Integer Integer.Usize 1 ] - |)); + [ M.read (| ptr |); M.of_value (| Value.Integer 1 |) ] + |) + |); M.read (| ptr |); BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), M.read (| index |) |), - Value.Integer Integer.Usize 1 + Integer.Usize, + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| index |) |), + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -1783,7 +1844,11 @@ Module vec. |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) ] |) |) in @@ -1804,7 +1869,7 @@ Module vec. self.retain_mut(|elem| f(elem)); } *) - Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition retain (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; f ] => @@ -1823,8 +1888,8 @@ Module vec. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1842,16 +1907,22 @@ Module vec. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| elem |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| elem |)) ] + |) + ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1954,7 +2025,7 @@ Module vec. drop(g); } *) - Definition retain_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition retain_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; f ] => @@ -1981,19 +2052,21 @@ Module vec. "set_len", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0 ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |) ] |) |) in let g := M.alloc (| - Value.StructRecord - "alloc::vec::retain_mut::BackshiftOnDrop" - [ - ("v", M.read (| self |)); - ("processed_len", Value.Integer Integer.Usize 0); - ("deleted_cnt", Value.Integer Integer.Usize 0); - ("original_len", M.read (| original_len |)) - ] + M.of_value (| + Value.StructRecord + "alloc::vec::retain_mut::BackshiftOnDrop" + [ + ("v", A.to_value (M.read (| self |))); + ("processed_len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("deleted_cnt", A.to_value (M.of_value (| Value.Integer 0 |))); + ("original_len", A.to_value (M.read (| original_len |))) + ] + |) |) in let _ := M.alloc (| @@ -2019,7 +2092,7 @@ Module vec. [ M.read (| g |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2037,7 +2110,7 @@ Module vec. self.dedup_by(|a, b| key(a) == key(b)) } *) - Definition dedup_by_key (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dedup_by_key (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F; K ], [ self; key ] => @@ -2056,8 +2129,8 @@ Module vec. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2091,7 +2164,12 @@ Module vec. "call_mut", [] |), - [ key; Value.Tuple [ M.read (| a |) ] ] + [ + key; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| a |)) ] + |) + ] |) |); M.alloc (| @@ -2103,7 +2181,12 @@ Module vec. "call_mut", [] |), - [ key; Value.Tuple [ M.read (| b |) ] ] + [ + key; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| b |)) ] + |) + ] |) |) ] @@ -2113,7 +2196,8 @@ Module vec. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2252,7 +2336,7 @@ Module vec. } } *) - Definition dedup_by (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dedup_by (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; same_bucket ] => @@ -2275,24 +2359,29 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| len |)) (Value.Integer Integer.Usize 1) + BinOp.Pure.le (| + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let first_duplicate_idx := M.alloc (| Value.Integer Integer.Usize 1 |) in + let first_duplicate_idx := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let start := M.alloc (| M.call_closure (| @@ -2308,16 +2397,17 @@ Module vec. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| first_duplicate_idx |)) - (M.read (| len |)) + BinOp.Pure.ne (| + M.read (| first_duplicate_idx |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2344,7 +2434,7 @@ Module vec. |), [ M.read (| first_duplicate_idx |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) ] @@ -2378,14 +2468,20 @@ Module vec. |), [ same_bucket; - Value.Tuple [ M.read (| current |); M.read (| prev |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| current |)); + A.to_value (M.read (| prev |)) + ] + |) ] |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2398,7 +2494,9 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2406,11 +2504,12 @@ Module vec. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2420,7 +2519,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2429,36 +2528,45 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| first_duplicate_idx |)) (M.read (| len |)) + BinOp.Pure.eq (| + M.read (| first_duplicate_idx |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let gap := M.alloc (| - Value.StructRecord - "alloc::vec::dedup_by::FillGapOnDrop" - [ - ("read", - BinOp.Panic.add (| - M.read (| first_duplicate_idx |), - Value.Integer Integer.Usize 1 - |)); - ("write", M.read (| first_duplicate_idx |)); - ("vec", M.read (| self |)) - ] + M.of_value (| + Value.StructRecord + "alloc::vec::dedup_by::FillGapOnDrop" + [ + ("read", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| first_duplicate_idx |), + M.of_value (| Value.Integer 1 |) + |))); + ("write", A.to_value (M.read (| first_duplicate_idx |))); + ("vec", A.to_value (M.read (| self |))) + ] + |) |) in let _ := let _ := @@ -2477,27 +2585,28 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| gap, "alloc::vec::dedup_by::FillGapOnDrop", "read" |) - |)) - (M.read (| len |)) + |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2548,7 +2657,7 @@ Module vec. "write" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) ] @@ -2572,12 +2681,18 @@ Module vec. |), [ same_bucket; - Value.Tuple [ M.read (| read_ptr |); M.read (| prev_ptr |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| read_ptr |)); + A.to_value (M.read (| prev_ptr |)) + ] + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2597,8 +2712,9 @@ Module vec. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -2608,7 +2724,7 @@ Module vec. [ M.read (| read_ptr |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let write_ptr := @@ -2640,9 +2756,9 @@ Module vec. |), [ (* MutToConstPointer *) - M.pointer_coercion (M.read (| read_ptr |)); + M.pointer_coercion (| M.read (| read_ptr |) |); M.read (| write_ptr |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -2656,8 +2772,9 @@ Module vec. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -2670,11 +2787,12 @@ Module vec. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -2686,7 +2804,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2729,7 +2847,7 @@ Module vec. [ M.read (| gap |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -2753,7 +2871,7 @@ Module vec. } } *) - Definition push (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; value ] => @@ -2763,22 +2881,22 @@ Module vec. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "capacity", @@ -2791,7 +2909,8 @@ Module vec. "buf" |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -2818,8 +2937,8 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let end_ := @@ -2861,9 +2980,13 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2885,7 +3008,7 @@ Module vec. Ok(()) } *) - Definition push_within_capacity (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_within_capacity (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; value ] => @@ -2897,22 +3020,22 @@ Module vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "capacity", @@ -2925,7 +3048,8 @@ Module vec. "buf" |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2933,14 +3057,16 @@ Module vec. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ M.read (| value |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| value |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2983,10 +3109,20 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -3009,7 +3145,7 @@ Module vec. } } *) - Definition pop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3017,25 +3153,28 @@ Module vec. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -3047,67 +3186,75 @@ Module vec. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |)) + |) + |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::ptr::read", [ T ] |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "add", - [] - |), + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::ptr::read", [ T ] |), [ M.call_closure (| M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "as_ptr", - [] - |), - [ M.read (| self |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "len", + Ty.apply (Ty.path "*const") [ T ], + "add", [] |), - [ M.read (| self |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "as_ptr", + [] + |), + [ M.read (| self |) ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "len", + [] + |), + [ M.read (| self |) ] + |) + ] |) ] - |) - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -3127,7 +3274,7 @@ Module vec. } } *) - Definition append (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition append (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -3169,10 +3316,10 @@ Module vec. "set_len", [] |), - [ M.read (| other |); Value.Integer Integer.Usize 0 ] + [ M.read (| other |); M.of_value (| Value.Integer 0 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3190,7 +3337,7 @@ Module vec. self.len += count; } *) - Definition append_elements (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition append_elements (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -3232,7 +3379,7 @@ Module vec. M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), [ - M.rust_cast (M.read (| other |)); + M.rust_cast (| M.read (| other |) |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ @@ -3258,8 +3405,11 @@ Module vec. "alloc::vec::Vec", "len" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| count |) |) |) in - M.alloc (| Value.Tuple [] |) + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| count |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3299,7 +3449,7 @@ Module vec. } } *) - Definition drain (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drain (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ R ], [ self; range ] => @@ -3324,7 +3474,11 @@ Module vec. M.get_function (| "core::slice::index::range", [ R ] |), [ M.read (| range |); - Value.StructRecord "core::ops::range::RangeTo" [ ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| len |))) ] + |) ] |) |), @@ -3375,47 +3529,61 @@ Module vec. [] |), [ M.read (| self |) ] - |); - M.read (| start |) - ] - |); - BinOp.Panic.sub (| M.read (| end_ |), M.read (| start |) |) + |); + M.read (| start |) + ] + |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| end_ |), + M.read (| start |) + |) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "alloc::vec::drain::Drain" + [ + ("tail_start", A.to_value (M.read (| end_ |))); + ("tail_len", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| end_ |) + |))); + ("iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "iter", + [] + |), + [ M.read (| range_slice |) ] + |))); + ("vec", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ], + [ + Ty.apply + (Ty.path "&mut") + [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ] + ], + "from", + [] + |), + [ M.read (| self |) ] + |))) ] - |) - |) in - M.alloc (| - Value.StructRecord - "alloc::vec::drain::Drain" - [ - ("tail_start", M.read (| end_ |)); - ("tail_len", BinOp.Panic.sub (| M.read (| len |), M.read (| end_ |) |)); - ("iter", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "iter", - [] - |), - [ M.read (| range_slice |) ] - |)); - ("vec", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ], - [ - Ty.apply - (Ty.path "&mut") - [ Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ] ] - ], - "from", - [] - |), - [ M.read (| self |) ] - |)) - ] + |) |))) ] |) @@ -3443,7 +3611,7 @@ Module vec. } } *) - Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clear (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3468,7 +3636,7 @@ Module vec. "alloc::vec::Vec", "len" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.alloc (| @@ -3480,7 +3648,7 @@ Module vec. [ M.read (| elems |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3494,7 +3662,7 @@ Module vec. self.len } *) - Definition len (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -3515,22 +3683,23 @@ Module vec. self.len() == 0 } *) - Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -3575,7 +3744,7 @@ Module vec. other } *) - Definition split_off (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_off (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; at_ ] => @@ -3587,23 +3756,24 @@ Module vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| at_ |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| at_ |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], "len", [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3625,19 +3795,22 @@ Module vec. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| at_ |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| at_ |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3694,12 +3867,13 @@ Module vec. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let other_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3801,7 +3975,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in other |))) |))) @@ -3825,7 +3999,7 @@ Module vec. } } *) - Definition resize_with (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition resize_with (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; new_len; f ] => @@ -3846,13 +4020,15 @@ Module vec. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| new_len |)) (M.read (| len |)) |)) in + (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 _ := M.alloc (| @@ -3890,13 +4066,17 @@ Module vec. |), [ M.read (| f |) ] |); - BinOp.Panic.sub (| M.read (| new_len |), M.read (| len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| new_len |), + M.read (| len |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -3910,7 +4090,7 @@ Module vec. [ M.read (| self |); M.read (| new_len |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3930,7 +4110,7 @@ Module vec. unsafe { slice::from_raw_parts_mut(me.as_mut_ptr(), me.len) } } *) - Definition leak (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition leak (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4017,7 +4197,7 @@ Module vec. } } *) - Definition spare_capacity_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spare_capacity_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4029,8 +4209,8 @@ Module vec. [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ M.call_closure (| @@ -4049,8 +4229,10 @@ Module vec. |) |) ] - |)); + |) + |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], @@ -4090,7 +4272,7 @@ Module vec. (init, spare) } *) - Definition split_at_spare_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at_spare_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4116,7 +4298,12 @@ Module vec. let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in let init := M.copy (| γ0_0 |) in let spare := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| init |); M.read (| spare |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| init |)); A.to_value (M.read (| spare |)) ] + |) + |))) ] |) |))) @@ -4151,7 +4338,7 @@ Module vec. } } *) - Definition split_at_spare_mut_with_len (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at_spare_mut_with_len (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4199,6 +4386,7 @@ Module vec. let spare_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], @@ -4249,16 +4437,19 @@ Module vec. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| initialized |); - M.read (| spare |); - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "alloc::vec::Vec", - "len" - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| initialized |)); + A.to_value (M.read (| spare |)); + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "alloc::vec::Vec", + "len" + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -4281,7 +4472,7 @@ Module vec. } } *) - Definition resize (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition resize (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; new_len; value ] => @@ -4302,13 +4493,15 @@ Module vec. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| new_len |)) (M.read (| len |)) |)) in + (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 M.alloc (| M.call_closure (| @@ -4319,7 +4512,11 @@ Module vec. |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| new_len |), M.read (| len |) |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| new_len |), + M.read (| len |) + |); M.read (| value |) ] |) @@ -4337,7 +4534,7 @@ Module vec. [ M.read (| self |); M.read (| new_len |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -4353,7 +4550,7 @@ Module vec. self.spec_extend(other.iter()) } *) - Definition extend_from_slice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_from_slice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -4398,7 +4595,7 @@ Module vec. } } *) - Definition extend_from_within (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_from_within (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ R ], [ self; src ] => @@ -4412,19 +4609,22 @@ Module vec. M.get_function (| "core::slice::index::range", [ R ] |), [ M.read (| src |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "len", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |) in @@ -4464,7 +4664,7 @@ Module vec. [ M.read (| self |); M.read (| range |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4501,7 +4701,7 @@ Module vec. } } *) - Definition extend_with (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_with (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; n; value ] => @@ -4575,9 +4775,14 @@ Module vec. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.Usize 1); ("end_", M.read (| n |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", A.to_value (M.read (| n |))) + ] + |) ] |) |), @@ -4645,7 +4850,7 @@ Module vec. "add", [] |), - [ M.read (| ptr |); Value.Integer Integer.Usize 1 ] + [ M.read (| ptr |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -4656,25 +4861,25 @@ Module vec. "increment_len", [] |), - [ local_len; Value.Integer Integer.Usize 1 ] + [ local_len; M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| n |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -4692,11 +4897,11 @@ Module vec. "increment_len", [] |), - [ local_len; Value.Integer Integer.Usize 1 ] + [ local_len; M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -4711,7 +4916,7 @@ Module vec. self.dedup_by(|a, b| a == b) } *) - Definition dedup (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dedup (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -4729,8 +4934,8 @@ Module vec. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4761,7 +4966,8 @@ Module vec. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4795,7 +5001,7 @@ Module vec. } } *) - Definition extend_desugared (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_desugared (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iterator ] => @@ -4806,7 +5012,7 @@ Module vec. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4843,23 +5049,24 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| len |)) - (M.call_closure (| + BinOp.Pure.eq (| + M.read (| len |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4903,16 +5110,17 @@ Module vec. |), [ M.read (| lower |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -4953,13 +5161,14 @@ Module vec. [ M.read (| self |); BinOp.Panic.add (| + Integer.Usize, M.read (| len |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4967,7 +5176,7 @@ Module vec. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -5014,7 +5223,7 @@ Module vec. } } *) - Definition extend_trusted (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_trusted (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ impl_iter_TrustedLen_Item___T_ ], [ self; iterator ] => @@ -5043,7 +5252,7 @@ Module vec. let low := M.copy (| γ0_0 |) in let high := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5057,11 +5266,12 @@ Module vec. let additional := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -5069,7 +5279,11 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ low; additional ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value low; A.to_value additional ] + |) + |), [ fun γ => ltac:(M.monadic @@ -5080,21 +5294,23 @@ Module vec. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5106,9 +5322,11 @@ Module vec. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -5123,72 +5341,89 @@ Module vec. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::Arguments", - "new_v1", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "TrustedLen iterator's size hint is not exact: " + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "TrustedLen iterator's size hint is not exact: " + |) + |)) + ] |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_debug", + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array [ - Ty.tuple - [ - Ty.path - "usize"; - Ty.apply - (Ty.path - "core::option::Option") + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_debug", [ - Ty.path - "usize" + Ty.tuple + [ + Ty.path + "usize"; + Ty.apply + (Ty.path + "core::option::Option") + [ + Ty.path + "usize" + ] + ] ] - ] + |), + [ + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + low + |)); + A.to_value + (M.read (| + high + |)) + ] + |) + |) + ] + |)) ] - |), - [ - M.alloc (| - Value.Tuple - [ - M.read (| - low - |); - M.read (| - high - |) - ] - |) - ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) @@ -5197,13 +5432,16 @@ Module vec. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -5257,8 +5495,8 @@ Module vec. |), [ M.read (| iterator |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5311,20 +5549,21 @@ Module vec. |), [ local_len; - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5340,11 +5579,21 @@ Module vec. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "capacity overflow" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "capacity overflow" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -5372,7 +5621,7 @@ Module vec. Splice { drain: self.drain(range), replace_with: replace_with.into_iter() } } *) - Definition splice (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition splice (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ R; _ as I ], [ self; range; replace_with ] => @@ -5380,30 +5629,34 @@ Module vec. (let self := M.alloc (| self |) in let range := M.alloc (| range |) in let replace_with := M.alloc (| replace_with |) in - Value.StructRecord - "alloc::vec::splice::Splice" - [ - ("drain", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], - "drain", - [ R ] - |), - [ M.read (| self |); M.read (| range |) ] - |)); - ("replace_with", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - I, - [], - "into_iter", - [] - |), - [ M.read (| replace_with |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "alloc::vec::splice::Splice" + [ + ("drain", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], + "drain", + [ R ] + |), + [ M.read (| self |); M.read (| range |) ] + |))); + ("replace_with", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + I, + [], + "into_iter", + [] + |), + [ M.read (| replace_with |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5426,7 +5679,7 @@ Module vec. ExtractIf { vec: self, idx: 0, del: 0, old_len, pred: filter } } *) - Definition extract_if (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extract_if (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ F ], [ self; filter ] => @@ -5454,20 +5707,22 @@ Module vec. "set_len", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0 ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| - Value.StructRecord - "alloc::vec::extract_if::ExtractIf" - [ - ("vec", M.read (| self |)); - ("idx", Value.Integer Integer.Usize 0); - ("del", Value.Integer Integer.Usize 0); - ("old_len", M.read (| old_len |)); - ("pred", M.read (| filter |)) - ] + M.of_value (| + Value.StructRecord + "alloc::vec::extract_if::ExtractIf" + [ + ("vec", A.to_value (M.read (| self |))); + ("idx", A.to_value (M.of_value (| Value.Integer 0 |))); + ("del", A.to_value (M.of_value (| Value.Integer 0 |))); + ("old_len", A.to_value (M.read (| old_len |))); + ("pred", A.to_value (M.read (| filter |))) + ] + |) |) |))) | _, _ => M.impossible @@ -5505,7 +5760,7 @@ Module vec. unsafe { Vec::::from_raw_parts_in(ptr.cast(), new_len, new_cap, alloc) } } *) - Definition into_flattened (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_flattened (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -5536,7 +5791,7 @@ Module vec. let alloc := M.copy (| γ0_3 |) in M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5549,62 +5804,72 @@ Module vec. Value.Bool true |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "usize" ], - "expect", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.path "usize", - "checked_mul", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ], + "expect", [] |), [ - M.read (| len |); - M.read (| M.get_constant (| "alloc::vec::N" |) |) + M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "checked_mul", + [] + |), + [ + M.read (| len |); + M.read (| M.get_constant (| "alloc::vec::N" |) |) + ] + |); + M.read (| + M.of_value (| Value.String "vec len overflow" |) + |) ] - |); - M.read (| Value.String "vec len overflow" |) - ] - |); - M.read (| M.get_constant (| "core::num::MAX" |) |) - ] + |)); + A.to_value + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "unchecked_mul", - [] - |), - [ - M.read (| len |); - M.read (| M.get_constant (| "alloc::vec::N" |) |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "unchecked_mul", - [] - |), - [ - M.read (| cap |); - M.read (| M.get_constant (| "alloc::vec::N" |) |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "unchecked_mul", + [] + |), + [ + M.read (| len |); + M.read (| M.get_constant (| "alloc::vec::N" |) |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "unchecked_mul", + [] + |), + [ + M.read (| cap |); + M.read (| M.get_constant (| "alloc::vec::N" |) |) + ] + |)) + ] + |) |))) ] |), @@ -5659,7 +5924,7 @@ Module vec. ::from_elem(elem, n, Global) } *) - Definition from_elem (τ : list Ty.t) (α : list Value.t) : M := + Definition from_elem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ elem; n ] => ltac:(M.monadic @@ -5673,7 +5938,11 @@ Module vec. "from_elem", [ Ty.path "alloc::alloc::Global" ] |), - [ M.read (| elem |); M.read (| n |); Value.StructTuple "alloc::alloc::Global" [] ] + [ + M.read (| elem |); + M.read (| n |); + M.of_value (| Value.StructTuple "alloc::alloc::Global" [] |) + ] |))) | _, _ => M.impossible end. @@ -5683,7 +5952,7 @@ Module vec. ::from_elem(elem, n, alloc) } *) - Definition from_elem_in (τ : list Ty.t) (α : list Value.t) : M := + Definition from_elem_in (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; A ], [ elem; n; alloc ] => ltac:(M.monadic @@ -5727,7 +5996,7 @@ Module vec. .for_each(|_| *len += 1); } *) - Definition spec_extend_from_within (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend_from_within (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; src ] => @@ -5874,8 +6143,8 @@ Module vec. |), [ M.read (| to_clone |); M.read (| spare |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5916,11 +6185,12 @@ Module vec. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5934,19 +6204,21 @@ Module vec. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -5993,7 +6265,7 @@ Module vec. self.len += count; } *) - Definition spec_extend_from_within (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend_from_within (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; src ] => @@ -6057,8 +6329,8 @@ Module vec. |), [ M.read (| source |) ] |); - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -6071,12 +6343,13 @@ Module vec. [] |), [ M.read (| spare |) ] - |)); + |) + |); M.read (| count |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6086,8 +6359,11 @@ Module vec. "alloc::vec::Vec", "len" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| count |) |) |) in - M.alloc (| Value.Tuple [] |) + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| count |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6113,7 +6389,7 @@ Module vec. unsafe { slice::from_raw_parts(self.as_ptr(), self.len) } } *) - Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6160,7 +6436,7 @@ Module vec. unsafe { slice::from_raw_parts_mut(self.as_mut_ptr(), self.len) } } *) - Definition deref_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6207,7 +6483,7 @@ Module vec. <[T]>::to_vec_in(&**self, alloc) } *) - Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6261,7 +6537,7 @@ Module vec. crate::slice::SpecCloneIntoVec::clone_into(other.as_slice(), self); } *) - Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -6292,7 +6568,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6318,7 +6594,7 @@ Module vec. Hash::hash(&**self, state) } *) - Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ H ], [ self; state ] => @@ -6370,7 +6646,7 @@ Module vec. Index::index(&**self, index) } *) - Definition index (T I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I A in match τ, α with | [], [ self; index ] => @@ -6423,7 +6699,7 @@ Module vec. IndexMut::index_mut(&mut **self, index) } *) - Definition index_mut (T I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I A in match τ, α with | [], [ self; index ] => @@ -6473,7 +6749,7 @@ Module vec. >::from_iter(iter.into_iter()) } *) - Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ iter ] => @@ -6545,7 +6821,7 @@ Module vec. } } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6630,7 +6906,7 @@ Module vec. let end_ := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6640,8 +6916,8 @@ Module vec. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "wrapping_byte_add", @@ -6671,15 +6947,16 @@ Module vec. ] |) ] - |)) + |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast + M.rust_cast (| (* MutToConstPointer *) - (M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", @@ -6709,7 +6986,9 @@ Module vec. ] |) ] - |))) + |) + |) + |) |))) ] |) @@ -6743,24 +7022,31 @@ Module vec. |) |) in M.alloc (| - Value.StructRecord - "alloc::vec::into_iter::IntoIter" - [ - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "new_unchecked", - [] - |), - [ M.read (| begin |) ] - |)); - ("phantom", Value.StructTuple "core::marker::PhantomData" []); - ("cap", M.read (| cap |)); - ("alloc", M.read (| alloc |)); - ("ptr", (* MutToConstPointer *) M.pointer_coercion (M.read (| begin |))); - ("end_", M.read (| end_ |)) - ] + M.of_value (| + Value.StructRecord + "alloc::vec::into_iter::IntoIter" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "new_unchecked", + [] + |), + [ M.read (| begin |) ] + |))); + ("phantom", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))); + ("cap", A.to_value (M.read (| cap |))); + ("alloc", A.to_value (M.read (| alloc |))); + ("ptr", + A.to_value + (* MutToConstPointer *) (M.pointer_coercion (| M.read (| begin |) |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) |) |))) | _, _ => M.impossible @@ -6795,7 +7081,7 @@ Module vec. self.iter() } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6849,7 +7135,7 @@ Module vec. self.iter_mut() } *) - Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -6895,7 +7181,7 @@ Module vec. >::spec_extend(self, iter.into_iter()) } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -6932,7 +7218,7 @@ Module vec. self.push(item); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; item ] => @@ -6951,7 +7237,7 @@ Module vec. [ M.read (| self |); M.read (| item |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6961,7 +7247,7 @@ Module vec. self.reserve(additional); } *) - Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -6980,7 +7266,7 @@ Module vec. [ M.read (| self |); M.read (| additional |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7008,7 +7294,7 @@ Module vec. self.spec_extend(iter.into_iter()) } *) - Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; iter ] => @@ -7045,7 +7331,7 @@ Module vec. self.push(item); } *) - Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; β1 ] => @@ -7071,7 +7357,7 @@ Module vec. [ M.read (| self |); M.read (| item |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |))) @@ -7083,7 +7369,7 @@ Module vec. self.reserve(additional); } *) - Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_reserve (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -7102,7 +7388,7 @@ Module vec. [ M.read (| self |); M.read (| additional |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7129,7 +7415,7 @@ Module vec. PartialOrd::partial_cmp(&**self, &**other) } *) - Definition partial_cmp (T A1 A2 : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T A1 A2 : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A1 A2 in match τ, α with | [], [ self; other ] => @@ -7199,7 +7485,7 @@ Module vec. Ord::cmp(&**self, &**other) } *) - Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; other ] => @@ -7263,7 +7549,7 @@ Module vec. // RawVec handles deallocation } *) - Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7315,7 +7601,7 @@ Module vec. Vec::new() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -7348,7 +7634,7 @@ Module vec. fmt::Debug::fmt(&**self, f) } *) - Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; f ] => @@ -7397,7 +7683,7 @@ Module vec. self } *) - Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7424,7 +7710,7 @@ Module vec. self } *) - Definition as_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7451,7 +7737,7 @@ Module vec. self } *) - Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7487,7 +7773,7 @@ Module vec. self } *) - Definition as_mut (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self ] => @@ -7524,7 +7810,7 @@ Module vec. s.to_vec() } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ s ] => @@ -7556,7 +7842,7 @@ Module vec. s.to_vec() } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ s ] => @@ -7588,7 +7874,7 @@ Module vec. Self::from(s.as_slice()) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ s ] => @@ -7631,7 +7917,7 @@ Module vec. Self::from(s.as_mut_slice()) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ s ] => @@ -7678,7 +7964,7 @@ Module vec. <[T]>::into_vec(Box::new(s)) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ s ] => @@ -7692,8 +7978,8 @@ Module vec. |), [ (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -7702,7 +7988,8 @@ Module vec. [] |), [ M.read (| s |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -7726,7 +8013,7 @@ Module vec. s.into_owned() } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ s ] => @@ -7761,7 +8048,7 @@ Module vec. s.into_vec() } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ s ] => @@ -7793,7 +8080,7 @@ Module vec. v.into_boxed_slice() } *) - Definition from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ v ] => @@ -7828,7 +8115,7 @@ Module vec. From::from(s.as_bytes()) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -7883,7 +8170,7 @@ Module vec. Ok(array) } *) - Definition try_from (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ vec ] => @@ -7894,23 +8181,24 @@ Module vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], "len", [] |), [ vec ] - |)) - (M.read (| M.get_constant (| "alloc::vec::N" |) |)) + |), + M.read (| M.get_constant (| "alloc::vec::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -7918,12 +8206,16 @@ Module vec. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::result::Result::Err" [ M.read (| vec |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| vec |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -7934,7 +8226,7 @@ Module vec. "set_len", [] |), - [ vec; Value.Integer Integer.Usize 0 ] + [ vec; M.of_value (| Value.Integer 0 |) ] |) |) in let array := @@ -7942,19 +8234,24 @@ Module vec. M.call_closure (| M.get_function (| "core::ptr::read", [ Ty.apply (Ty.path "array") [ T ] ] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ], "as_ptr", [] |), [ vec ] - |)) + |) + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| array |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| array |)) ] + |) + |) |))) |))) | _, _ => M.impossible diff --git a/CoqOfRust/alloc/vec/partial_eq.v b/CoqOfRust/alloc/vec/partial_eq.v index 47d8a0a4e..dd88639bf 100644 --- a/CoqOfRust/alloc/vec/partial_eq.v +++ b/CoqOfRust/alloc/vec/partial_eq.v @@ -7,7 +7,7 @@ Module vec. Definition Self (T U A1 A2 : Ty.t) : Ty.t := Ty.apply (Ty.path "alloc::vec::Vec") [ T; A1 ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A1 A2 : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A1 A2 : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A1 A2 in match τ, α with | [], [ self; other ] => @@ -31,7 +31,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -41,7 +44,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -49,7 +55,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A1 A2 : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A1 A2 : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A1 A2 in match τ, α with | [], [ self; other ] => @@ -73,7 +79,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -83,7 +92,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -105,7 +117,7 @@ Module vec. Definition Self (T U A : Ty.t) : Ty.t := Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -129,7 +141,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -141,7 +156,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -150,7 +165,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -174,7 +189,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -186,7 +204,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -209,7 +227,7 @@ Module vec. Definition Self (T U A : Ty.t) : Ty.t := Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -233,7 +251,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -245,7 +266,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -254,7 +275,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -278,7 +299,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -290,7 +314,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -314,7 +338,7 @@ Module vec. Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ T ] ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -340,7 +364,7 @@ Module vec. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -351,7 +375,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -359,7 +386,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -385,7 +412,7 @@ Module vec. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -396,7 +423,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -418,7 +448,7 @@ Module vec. Ty.apply (Ty.path "&mut") [ Ty.apply (Ty.path "slice") [ T ] ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -444,7 +474,7 @@ Module vec. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -455,7 +485,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -463,7 +496,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -489,7 +522,7 @@ Module vec. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -500,7 +533,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -521,7 +557,7 @@ Module vec. Definition Self (T U A : Ty.t) : Ty.t := Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -545,7 +581,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -555,7 +594,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -563,7 +605,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -587,7 +629,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -597,7 +642,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -618,7 +666,7 @@ Module vec. Definition Self (T U A : Ty.t) : Ty.t := Ty.apply (Ty.path "slice") [ T ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -642,7 +690,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -652,7 +703,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -660,7 +714,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -684,7 +738,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -694,7 +751,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -716,7 +776,7 @@ Module vec. Ty.apply (Ty.path "alloc::borrow::Cow") [ Ty.apply (Ty.path "slice") [ T ] ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -753,7 +813,7 @@ Module vec. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -764,7 +824,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -772,7 +835,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -809,7 +872,7 @@ Module vec. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -820,7 +883,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -842,7 +908,7 @@ Module vec. Ty.apply (Ty.path "alloc::borrow::Cow") [ Ty.apply (Ty.path "slice") [ T ] ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self; other ] => @@ -879,7 +945,7 @@ Module vec. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -892,7 +958,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -901,7 +967,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self; other ] => @@ -938,7 +1004,7 @@ Module vec. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -951,7 +1017,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -975,7 +1041,7 @@ Module vec. Ty.apply (Ty.path "alloc::borrow::Cow") [ Ty.apply (Ty.path "slice") [ T ] ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self; other ] => @@ -1012,7 +1078,7 @@ Module vec. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -1025,7 +1091,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -1034,7 +1100,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self; other ] => @@ -1071,7 +1137,7 @@ Module vec. |), [ M.read (| self |) ] |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -1084,7 +1150,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -1107,7 +1173,7 @@ Module vec. Definition Self (T U A : Ty.t) : Ty.t := Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -1131,7 +1197,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -1141,7 +1210,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -1149,7 +1221,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -1173,7 +1245,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -1183,7 +1258,10 @@ Module vec. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -1204,7 +1282,7 @@ Module vec. Definition Self (T U A : Ty.t) : Ty.t := Ty.apply (Ty.path "alloc::vec::Vec") [ T; A ]. (* fn eq(&self, other: &$rhs) -> bool { self[..] == other[..] } *) - Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -1228,7 +1306,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -1240,7 +1321,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -1249,7 +1330,7 @@ Module vec. end. (* fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } *) - Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T U A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U A in match τ, α with | [], [ self; other ] => @@ -1273,7 +1354,10 @@ Module vec. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -1285,7 +1369,7 @@ Module vec. |), [ M.read (| M.read (| other |) |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] diff --git a/CoqOfRust/alloc/vec/set_len_on_drop.v b/CoqOfRust/alloc/vec/set_len_on_drop.v index a141f1e26..115d630b5 100644 --- a/CoqOfRust/alloc/vec/set_len_on_drop.v +++ b/CoqOfRust/alloc/vec/set_len_on_drop.v @@ -20,14 +20,19 @@ Module vec. SetLenOnDrop { local_len: *len, len } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ len ] => ltac:(M.monadic (let len := M.alloc (| len |) in - Value.StructRecord - "alloc::vec::set_len_on_drop::SetLenOnDrop" - [ ("local_len", M.read (| M.read (| len |) |)); ("len", M.read (| len |)) ])) + M.of_value (| + Value.StructRecord + "alloc::vec::set_len_on_drop::SetLenOnDrop" + [ + ("local_len", A.to_value (M.read (| M.read (| len |) |))); + ("len", A.to_value (M.read (| len |))) + ] + |))) | _, _ => M.impossible end. @@ -38,7 +43,7 @@ Module vec. self.local_len += increment; } *) - Definition increment_len (τ : list Ty.t) (α : list Value.t) : M := + Definition increment_len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; increment ] => ltac:(M.monadic @@ -52,8 +57,11 @@ Module vec. "alloc::vec::set_len_on_drop::SetLenOnDrop", "local_len" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| increment |) |) |) in - M.alloc (| Value.Tuple [] |) + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| increment |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -66,7 +74,7 @@ Module vec. self.local_len } *) - Definition current_len (τ : list Ty.t) (α : list Value.t) : M := + Definition current_len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -92,7 +100,7 @@ Module vec. *self.len = self.local_len; } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -115,7 +123,7 @@ Module vec. |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/vec/spec_extend.v b/CoqOfRust/alloc/vec/spec_extend.v index b8d98221d..f9dd6900a 100644 --- a/CoqOfRust/alloc/vec/spec_extend.v +++ b/CoqOfRust/alloc/vec/spec_extend.v @@ -14,7 +14,7 @@ Module vec. self.extend_desugared(iter) } *) - Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I A in match τ, α with | [], [ self; iter ] => @@ -49,7 +49,7 @@ Module vec. self.extend_trusted(iterator) } *) - Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I A in match τ, α with | [], [ self; iterator ] => @@ -87,7 +87,7 @@ Module vec. iterator.forget_remaining_elements(); } *) - Definition spec_extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; iterator ] => @@ -124,7 +124,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -138,7 +138,7 @@ Module vec. [ iterator ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -167,7 +167,7 @@ Module vec. self.spec_extend(iterator.cloned()) } *) - Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I A in match τ, α with | [], [ self; iterator ] => @@ -217,7 +217,7 @@ Module vec. unsafe { self.append_elements(slice) }; } *) - Definition spec_extend (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_extend (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; iterator ] => @@ -247,7 +247,7 @@ Module vec. [ M.read (| self |); M.read (| slice |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/vec/spec_from_elem.v b/CoqOfRust/alloc/vec/spec_from_elem.v index f724cf848..4c6331214 100644 --- a/CoqOfRust/alloc/vec/spec_from_elem.v +++ b/CoqOfRust/alloc/vec/spec_from_elem.v @@ -16,7 +16,7 @@ Module vec. v } *) - Definition from_elem (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_elem (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ A ], [ elem; n; alloc ] => @@ -74,7 +74,7 @@ Module vec. v } *) - Definition from_elem (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_elem (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ A ], [ elem; n; alloc ] => @@ -87,7 +87,7 @@ Module vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -111,25 +111,30 @@ Module vec. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::vec::Vec" - [ - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], - "with_capacity_zeroed_in", - [] - |), - [ M.read (| n |); M.read (| alloc |) ] - |)); - ("len", M.read (| n |)) - ] + M.of_value (| + Value.StructRecord + "alloc::vec::Vec" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::raw_vec::RawVec") + [ T; A ], + "with_capacity_zeroed_in", + [] + |), + [ M.read (| n |); M.read (| alloc |) ] + |))); + ("len", A.to_value (M.read (| n |))) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let v := @@ -185,7 +190,7 @@ Module vec. v } *) - Definition from_elem (τ : list Ty.t) (α : list Value.t) : M := + Definition from_elem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A ], [ elem; n; alloc ] => ltac:(M.monadic @@ -197,14 +202,17 @@ Module vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| elem |)) (Value.Integer Integer.I8 0) + BinOp.Pure.eq (| + M.read (| elem |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -212,27 +220,30 @@ Module vec. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::vec::Vec" - [ - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::raw_vec::RawVec") - [ Ty.path "i8"; A ], - "with_capacity_zeroed_in", - [] - |), - [ M.read (| n |); M.read (| alloc |) ] - |)); - ("len", M.read (| n |)) - ] + M.of_value (| + Value.StructRecord + "alloc::vec::Vec" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::raw_vec::RawVec") + [ Ty.path "i8"; A ], + "with_capacity_zeroed_in", + [] + |), + [ M.read (| n |); M.read (| alloc |) ] + |))); + ("len", A.to_value (M.read (| n |))) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let v := @@ -260,7 +271,7 @@ Module vec. |), [ v ] |); - M.rust_cast (M.read (| elem |)); + M.rust_cast (| M.read (| elem |) |); M.read (| n |) ] |) @@ -276,7 +287,7 @@ Module vec. [ v; M.read (| n |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in v |))) |))) @@ -307,7 +318,7 @@ Module vec. v } *) - Definition from_elem (τ : list Ty.t) (α : list Value.t) : M := + Definition from_elem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A ], [ elem; n; alloc ] => ltac:(M.monadic @@ -319,14 +330,17 @@ Module vec. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| elem |)) (Value.Integer Integer.U8 0) + BinOp.Pure.eq (| + M.read (| elem |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -334,27 +348,30 @@ Module vec. M.never_to_any (| M.read (| M.return_ (| - Value.StructRecord - "alloc::vec::Vec" - [ - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::raw_vec::RawVec") - [ Ty.path "u8"; A ], - "with_capacity_zeroed_in", - [] - |), - [ M.read (| n |); M.read (| alloc |) ] - |)); - ("len", M.read (| n |)) - ] + M.of_value (| + Value.StructRecord + "alloc::vec::Vec" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::raw_vec::RawVec") + [ Ty.path "u8"; A ], + "with_capacity_zeroed_in", + [] + |), + [ M.read (| n |); M.read (| alloc |) ] + |))); + ("len", A.to_value (M.read (| n |))) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let v := @@ -398,7 +415,7 @@ Module vec. [ v; M.read (| n |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in v |))) |))) @@ -427,7 +444,7 @@ Module vec. v } *) - Definition from_elem (τ : list Ty.t) (α : list Value.t) : M := + Definition from_elem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A ], [ _elem; n; alloc ] => ltac:(M.monadic @@ -458,7 +475,7 @@ Module vec. [ v; M.read (| n |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in v |))) | _, _ => M.impossible diff --git a/CoqOfRust/alloc/vec/spec_from_iter.v b/CoqOfRust/alloc/vec/spec_from_iter.v index c1f54a6c7..f6b7c836d 100644 --- a/CoqOfRust/alloc/vec/spec_from_iter.v +++ b/CoqOfRust/alloc/vec/spec_from_iter.v @@ -15,7 +15,7 @@ Module vec. SpecFromIterNested::from_iter(iterator) } *) - Definition from_iter (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ iterator ] => @@ -75,7 +75,7 @@ Module vec. vec } *) - Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ iterator ] => @@ -86,11 +86,11 @@ Module vec. (M.read (| let has_advanced := M.alloc (| - BinOp.Pure.ne - (M.rust_cast + BinOp.Pure.ne (| + M.rust_cast (| (* MutToConstPointer *) - (M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], "as_ptr", @@ -105,18 +105,21 @@ Module vec. |) |) ] - |)))) - (M.read (| + |) + |) + |), + M.read (| M.SubPointer.get_struct_record_field (| iterator, "alloc::vec::into_iter::IntoIter", "ptr" |) - |)) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -124,10 +127,10 @@ Module vec. M.use (M.alloc (| LogicalOp.or (| - UnOp.Pure.not (M.read (| has_advanced |)), + UnOp.Pure.not (| M.read (| has_advanced |) |), ltac:(M.monadic - (BinOp.Pure.ge - (M.call_closure (| + (BinOp.Pure.ge (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -138,8 +141,9 @@ Module vec. [] |), [ iterator ] - |)) - (BinOp.Panic.div (| + |), + BinOp.Panic.div (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| iterator, @@ -147,8 +151,9 @@ Module vec. "cap" |) |), - Value.Integer Integer.Usize 2 - |)))) + M.of_value (| Value.Integer 2 |) + |) + |))) |) |)) in let _ := @@ -175,7 +180,7 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -297,8 +302,10 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.return_ (| @@ -401,7 +408,7 @@ Module vec. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let vec := diff --git a/CoqOfRust/alloc/vec/spec_from_iter_nested.v b/CoqOfRust/alloc/vec/spec_from_iter_nested.v index 6b22f7bc7..c53e7f898 100644 --- a/CoqOfRust/alloc/vec/spec_from_iter_nested.v +++ b/CoqOfRust/alloc/vec/spec_from_iter_nested.v @@ -38,7 +38,7 @@ Module vec. vector } *) - Definition from_iter (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ iterator ] => @@ -130,7 +130,9 @@ Module vec. "saturating_add", [] |), - [ M.read (| lower |); Value.Integer Integer.Usize 1 + [ + M.read (| lower |); + M.of_value (| Value.Integer 1 |) ] |) ] @@ -179,10 +181,10 @@ Module vec. "set_len", [] |), - [ vector; Value.Integer Integer.Usize 1 ] + [ vector; M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in vector)) ] |))) @@ -238,7 +240,7 @@ Module vec. vector } *) - Definition from_iter (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ iterator ] => @@ -299,11 +301,21 @@ Module vec. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "capacity overflow" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "capacity overflow" + |) + |)) + ] + |) + |) + |) ] |) ] diff --git a/CoqOfRust/alloc/vec/splice.v b/CoqOfRust/alloc/vec/splice.v index 1f363416e..8230d31fe 100644 --- a/CoqOfRust/alloc/vec/splice.v +++ b/CoqOfRust/alloc/vec/splice.v @@ -19,7 +19,7 @@ Module vec. Ty.apply (Ty.path "alloc::vec::splice::Splice") [ I; A ]. (* Debug *) - Definition fmt (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self; f ] => @@ -34,25 +34,27 @@ Module vec. |), [ M.read (| f |); - M.read (| Value.String "Splice" |); - M.read (| Value.String "drain" |); + M.read (| M.of_value (| Value.String "Splice" |) |); + M.read (| M.of_value (| Value.String "drain" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::splice::Splice", "drain" - |)); - M.read (| Value.String "replace_with" |); + |) + |); + M.read (| M.of_value (| Value.String "replace_with" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::splice::Splice", "replace_with" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -79,7 +81,7 @@ Module vec. self.drain.next() } *) - Definition next (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -109,7 +111,7 @@ Module vec. self.drain.size_hint() } *) - Definition size_hint (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -157,7 +159,7 @@ Module vec. self.drain.next_back() } *) - Definition next_back (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -253,7 +255,7 @@ Module vec. // Let `Drain::drop` move the tail back if necessary and restore `vec.len`. } *) - Definition drop (I A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (I A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I A in match τ, α with | [], [ self ] => @@ -312,20 +314,23 @@ Module vec. "iter", [] |), - [ (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) ] + [ + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) + ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -335,8 +340,9 @@ Module vec. "alloc::vec::drain::Drain", "tail_len" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -397,24 +403,24 @@ Module vec. ] |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::drain::Drain") @@ -434,14 +440,17 @@ Module vec. "replace_with" |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -472,16 +481,17 @@ Module vec. let _upper_bound := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| lower_bound |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| lower_bound |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -509,15 +519,15 @@ Module vec. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::drain::Drain") @@ -537,7 +547,8 @@ Module vec. "replace_with" |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -546,13 +557,18 @@ Module vec. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Tuple [] |) |) + M.read (| + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let collected := @@ -603,15 +619,15 @@ Module vec. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -622,8 +638,9 @@ Module vec. [] |), [ collected ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -687,11 +704,13 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -699,14 +718,14 @@ Module vec. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (M.read (| filled |)) + UnOp.Pure.not (| M.read (| filled |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -722,28 +741,37 @@ Module vec. |), [ M.read (| - Value.String - "assertion failed: filled" + M.of_value (| + Value.String + "assertion failed: filled" + |) |) ] |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -752,28 +780,34 @@ Module vec. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::exact_size::ExactSizeIterator", - Ty.apply - (Ty.path - "alloc::vec::into_iter::IntoIter") - [ - Ty.associated; - Ty.path "alloc::alloc::Global" - ], - [], - "len", - [] - |), - [ collected ] - |) - |); - M.alloc (| Value.Integer Integer.Usize 0 |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + Ty.apply + (Ty.path + "alloc::vec::into_iter::IntoIter") + [ + Ty.associated; + Ty.path "alloc::alloc::Global" + ], + [], + "len", + [] + |), + [ collected ] + |) + |)); + A.to_value + (M.alloc (| + M.of_value (| Value.Integer 0 |) + |)) + ] + |) |), [ fun γ => @@ -785,21 +819,25 @@ Module vec. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -811,9 +849,11 @@ Module vec. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -828,9 +868,11 @@ Module vec. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -839,17 +881,22 @@ Module vec. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -891,7 +938,7 @@ Module vec. true } *) - Definition fill (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fill (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [ _ as I ], [ self; replace_with ] => @@ -959,7 +1006,11 @@ Module vec. M.read (| range_start |) ] |); - BinOp.Panic.sub (| M.read (| range_end |), M.read (| range_start |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| range_end |), + M.read (| range_start |) + |) ] |) |) in @@ -1014,7 +1065,7 @@ Module vec. |) in let place := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1061,17 +1112,20 @@ Module vec. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))) @@ -1079,11 +1133,11 @@ Module vec. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.Bool true |) + M.alloc (| M.of_value (| Value.Bool true |) |) |))) |))) | _, _ => M.impossible @@ -1108,7 +1162,7 @@ Module vec. self.tail_start = new_tail_start; } *) - Definition move_tail (T A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition move_tail (T A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T A in match τ, α with | [], [ self; additional ] => @@ -1138,6 +1192,7 @@ Module vec. let len := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1176,6 +1231,7 @@ Module vec. let new_tail_start := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1244,7 +1300,7 @@ Module vec. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -1254,7 +1310,7 @@ Module vec. |), M.read (| new_tail_start |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/blacklist.txt b/CoqOfRust/blacklist.txt index d3221bcd3..15e865b90 100644 --- a/CoqOfRust/blacklist.txt +++ b/CoqOfRust/blacklist.txt @@ -1,4 +1,6 @@ -examples/default/examples/ink_contracts/proofs/erc20.v +# This file works but is taking a very long time (ten minutes) +revm/opcode.v +# examples/default/examples/ink_contracts/proofs/erc20.v examples/default/examples/ink_contracts/proofs/erc721.v move/ alloc/boxed.v diff --git a/CoqOfRust/core/alloc/global.v b/CoqOfRust/core/alloc/global.v index c4dc8b7af..aa9621751 100644 --- a/CoqOfRust/core/alloc/global.v +++ b/CoqOfRust/core/alloc/global.v @@ -5,7 +5,7 @@ Module alloc. Module global. (* Trait *) Module GlobalAlloc. - Definition alloc_zeroed (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition alloc_zeroed (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; layout ] => ltac:(M.monadic @@ -38,22 +38,23 @@ Module alloc. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "is_null", [] |), [ M.read (| ptr |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -64,11 +65,15 @@ Module alloc. "core::intrinsics::write_bytes", [ Ty.path "u8" ] |), - [ M.read (| ptr |); Value.Integer Integer.U8 0; M.read (| size |) ] + [ + M.read (| ptr |); + M.of_value (| Value.Integer 0 |); + M.read (| size |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in ptr @@ -78,7 +83,7 @@ Module alloc. Axiom ProvidedMethod_alloc_zeroed : M.IsProvidedMethod "core::alloc::global::GlobalAlloc" "alloc_zeroed" alloc_zeroed. - Definition realloc (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition realloc (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ptr; layout; new_size ] => ltac:(M.monadic @@ -123,22 +128,23 @@ Module alloc. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "is_null", [] |), [ M.read (| new_ptr |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -150,7 +156,7 @@ Module alloc. [ Ty.path "u8" ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| ptr |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| ptr |) |); M.read (| new_ptr |); M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -182,8 +188,8 @@ Module alloc. [ M.read (| self |); M.read (| ptr |); M.read (| layout |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in new_ptr diff --git a/CoqOfRust/core/alloc/layout.v b/CoqOfRust/core/alloc/layout.v index 1a149dd00..b1b2f4f92 100644 --- a/CoqOfRust/core/alloc/layout.v +++ b/CoqOfRust/core/alloc/layout.v @@ -8,15 +8,19 @@ Module alloc. (mem::size_of::(), mem::align_of::()) } *) - Definition size_align (τ : list Ty.t) (α : list Value.t) : M := + Definition size_align (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic - (Value.Tuple - [ - M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |); - M.call_closure (| M.get_function (| "core::mem::align_of", [ T ] |), [] |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |)); + A.to_value + (M.call_closure (| M.get_function (| "core::mem::align_of", [ T ] |), [] |)) + ] + |))) | _, _ => M.impossible end. @@ -43,19 +47,19 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::layout::Layout". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -76,7 +80,7 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::layout::Layout". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -90,25 +94,27 @@ Module alloc. |), [ M.read (| f |); - M.read (| Value.String "Layout" |); - M.read (| Value.String "size" |); + M.read (| M.of_value (| Value.String "Layout" |) |); + M.read (| M.of_value (| Value.String "size" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::alloc::layout::Layout", "size" - |)); - M.read (| Value.String "align" |); + |) + |); + M.read (| M.of_value (| Value.String "align" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::alloc::layout::Layout", "align" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -137,28 +143,29 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::layout::Layout". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::alloc::layout::Layout", "size" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::alloc::layout::Layout", "size" |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -208,20 +215,21 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::layout::Layout". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -242,7 +250,7 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::layout::Layout". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -313,7 +321,7 @@ Module alloc. Layout::from_size_alignment(size, unsafe { Alignment::new_unchecked(align) }) } *) - Definition from_size_align (τ : list Ty.t) (α : list Value.t) : M := + Definition from_size_align (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ size; align ] => ltac:(M.monadic @@ -324,22 +332,23 @@ Module alloc. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "is_power_of_two", [] |), [ M.read (| align |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -347,14 +356,23 @@ Module alloc. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::alloc::layout::LayoutError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::alloc::layout::LayoutError" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -404,14 +422,16 @@ Module alloc. isize::MAX as usize - (align.as_usize() - 1) } *) - Definition max_size_for_align (τ : list Ty.t) (α : list Value.t) : M := + Definition max_size_for_align (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ align ] => ltac:(M.monadic (let align := M.alloc (| align |) in BinOp.Panic.sub (| - M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)), + Integer.Usize, + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |), BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::ptr::alignment::Alignment", @@ -420,7 +440,7 @@ Module alloc. |), [ M.read (| align |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))) | _, _ => M.impossible @@ -439,7 +459,7 @@ Module alloc. Ok(Layout { size, align }) } *) - Definition from_size_alignment (τ : list Ty.t) (α : list Value.t) : M := + Definition from_size_alignment (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ size; align ] => ltac:(M.monadic @@ -450,23 +470,24 @@ Module alloc. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| size |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| size |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "max_size_for_align", [] |), [ M.read (| align |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -474,24 +495,41 @@ Module alloc. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::alloc::layout::LayoutError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::alloc::layout::LayoutError" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructRecord - "core::alloc::layout::Layout" - [ ("size", M.read (| size |)); ("align", M.read (| align |)) ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::alloc::layout::Layout" + [ + ("size", A.to_value (M.read (| size |))); + ("align", A.to_value (M.read (| align |))) + ] + |)) + ] + |) |) |))) |))) @@ -507,26 +545,29 @@ Module alloc. unsafe { Layout { size, align: Alignment::new_unchecked(align) } } } *) - Definition from_size_align_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_size_align_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ size; align ] => ltac:(M.monadic (let size := M.alloc (| size |) in let align := M.alloc (| align |) in - Value.StructRecord - "core::alloc::layout::Layout" - [ - ("size", M.read (| size |)); - ("align", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ptr::alignment::Alignment", - "new_unchecked", - [] - |), - [ M.read (| align |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::alloc::layout::Layout" + [ + ("size", A.to_value (M.read (| size |))); + ("align", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ptr::alignment::Alignment", + "new_unchecked", + [] + |), + [ M.read (| align |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -538,7 +579,7 @@ Module alloc. self.size } *) - Definition size (τ : list Ty.t) (α : list Value.t) : M := + Definition size (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -560,7 +601,7 @@ Module alloc. self.align.as_usize() } *) - Definition align (τ : list Ty.t) (α : list Value.t) : M := + Definition align (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -595,7 +636,7 @@ Module alloc. unsafe { Layout::from_size_align_unchecked(size, align) } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -639,7 +680,7 @@ Module alloc. unsafe { Layout::from_size_align_unchecked(size, align) } } *) - Definition for_value (τ : list Ty.t) (α : list Value.t) : M := + Definition for_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -647,17 +688,21 @@ Module alloc. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::mem::size_of_val", [ T ] |), - [ M.read (| t |) ] - |); - M.call_closure (| - M.get_function (| "core::mem::align_of_val", [ T ] |), - [ M.read (| t |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::size_of_val", [ T ] |), + [ M.read (| t |) ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::align_of_val", [ T ] |), + [ M.read (| t |) ] + |)) + ] + |) |), [ fun γ => @@ -692,7 +737,7 @@ Module alloc. unsafe { Layout::from_size_align_unchecked(size, align) } } *) - Definition for_value_raw (τ : list Ty.t) (α : list Value.t) : M := + Definition for_value_raw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -700,17 +745,21 @@ Module alloc. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::mem::size_of_val_raw", [ T ] |), - [ M.read (| t |) ] - |); - M.call_closure (| - M.get_function (| "core::mem::align_of_val_raw", [ T ] |), - [ M.read (| t |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::size_of_val_raw", [ T ] |), + [ M.read (| t |) ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::align_of_val_raw", [ T ] |), + [ M.read (| t |) ] + |)) + ] + |) |), [ fun γ => @@ -744,7 +793,7 @@ Module alloc. unsafe { NonNull::new_unchecked(crate::ptr::invalid_mut::(self.align())) } } *) - Definition dangling (τ : list Ty.t) (α : list Value.t) : M := + Definition dangling (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -781,7 +830,7 @@ Module alloc. Layout::from_size_align(self.size(), cmp::max(self.align(), align)) } *) - Definition align_to (τ : list Ty.t) (α : list Value.t) : M := + Definition align_to (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; align ] => ltac:(M.monadic @@ -846,7 +895,7 @@ Module alloc. len_rounded_up.wrapping_sub(len) } *) - Definition padding_needed_for (τ : list Ty.t) (α : list Value.t) : M := + Definition padding_needed_for (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; align ] => ltac:(M.monadic @@ -866,22 +915,24 @@ Module alloc. |) in let len_rounded_up := M.alloc (| - BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_sub", [] |), [ M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), [ M.read (| len |); M.read (| align |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] - |)) - (UnOp.Pure.not - (M.call_closure (| + |), + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_sub", [] |), - [ M.read (| align |); Value.Integer Integer.Usize 1 ] - |))) + [ M.read (| align |); M.of_value (| Value.Integer 1 |) ] + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -909,7 +960,7 @@ Module alloc. unsafe { Layout::from_size_align_unchecked(new_size, self.align()) } } *) - Definition pad_to_align (τ : list Ty.t) (α : list Value.t) : M := + Definition pad_to_align (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -939,6 +990,7 @@ Module alloc. let new_size := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", @@ -991,7 +1043,7 @@ Module alloc. Ok((layout, padded_size)) } *) - Definition repeat (τ : list Ty.t) (α : list Value.t) : M := + Definition repeat (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -1003,6 +1055,7 @@ Module alloc. let padded_size := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", @@ -1061,7 +1114,9 @@ Module alloc. |), [ M.read (| padded_size |); M.read (| n |) ] |); - Value.StructTuple "core::alloc::layout::LayoutError" [] + M.of_value (| + Value.StructTuple "core::alloc::layout::LayoutError" [] + |) ] |) ] @@ -1220,9 +1275,20 @@ Module alloc. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.Tuple [ M.read (| layout |); M.read (| padded_size |) ] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| layout |)); + A.to_value (M.read (| padded_size |)) + ] + |)) + ] + |) |) |))) |))) @@ -1244,7 +1310,7 @@ Module alloc. Ok((layout, offset)) } *) - Definition extend (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; next ] => ltac:(M.monadic @@ -1339,7 +1405,9 @@ Module alloc. M.read (| pad |) ] |); - Value.StructTuple "core::alloc::layout::LayoutError" [] + M.of_value (| + Value.StructTuple "core::alloc::layout::LayoutError" [] + |) ] |) ] @@ -1442,7 +1510,9 @@ Module alloc. |) ] |); - Value.StructTuple "core::alloc::layout::LayoutError" [] + M.of_value (| + Value.StructTuple "core::alloc::layout::LayoutError" [] + |) ] |) ] @@ -1592,9 +1662,18 @@ Module alloc. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.Tuple [ M.read (| layout |); M.read (| offset |) ] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| layout |)); A.to_value (M.read (| offset |)) + ] + |)) + ] + |) |) |))) |))) @@ -1610,7 +1689,7 @@ Module alloc. Layout::from_size_alignment(size, self.align) } *) - Definition repeat_packed (τ : list Ty.t) (α : list Value.t) : M := + Definition repeat_packed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -1659,7 +1738,9 @@ Module alloc. M.read (| n |) ] |); - Value.StructTuple "core::alloc::layout::LayoutError" [] + M.of_value (| + Value.StructTuple "core::alloc::layout::LayoutError" [] + |) ] |) ] @@ -1752,7 +1833,7 @@ Module alloc. Layout::from_size_alignment(new_size, self.align) } *) - Definition extend_packed (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_packed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; next ] => ltac:(M.monadic @@ -1808,7 +1889,9 @@ Module alloc. |) ] |); - Value.StructTuple "core::alloc::layout::LayoutError" [] + M.of_value (| + Value.StructTuple "core::alloc::layout::LayoutError" [] + |) ] |) ] @@ -1928,7 +2011,7 @@ Module alloc. } } *) - Definition array (τ : list Ty.t) (α : list Value.t) : M := + Definition array (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ n ] => ltac:(M.monadic @@ -1977,12 +2060,12 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::layout::LayoutError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::alloc::layout::LayoutError" [])) + M.of_value (| Value.StructTuple "core::alloc::layout::LayoutError" [] |))) | _, _ => M.impossible end. @@ -2009,13 +2092,13 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::layout::LayoutError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -2042,12 +2125,12 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::layout::LayoutError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -2064,7 +2147,7 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::layout::LayoutError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2072,7 +2155,7 @@ Module alloc. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "LayoutError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "LayoutError" |) |) ] |))) | _, _ => M.impossible end. @@ -2104,7 +2187,7 @@ Module alloc. f.write_str("invalid parameters to Layout::from_size_align") } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2114,7 +2197,9 @@ Module alloc. M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), [ M.read (| f |); - M.read (| Value.String "invalid parameters to Layout::from_size_align" |) + M.read (| + M.of_value (| Value.String "invalid parameters to Layout::from_size_align" |) + |) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/alloc/mod.v b/CoqOfRust/core/alloc/mod.v index a4c412e0a..1bdd19c9f 100644 --- a/CoqOfRust/core/alloc/mod.v +++ b/CoqOfRust/core/alloc/mod.v @@ -24,7 +24,7 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::AllocError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -56,13 +56,13 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::AllocError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -89,12 +89,12 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::AllocError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -111,7 +111,7 @@ Module alloc. Definition Self : Ty.t := Ty.path "core::alloc::AllocError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -119,7 +119,7 @@ Module alloc. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "AllocError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "AllocError" |) |) ] |))) | _, _ => M.impossible end. @@ -151,7 +151,7 @@ Module alloc. f.write_str("memory allocation failed") } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -159,7 +159,8 @@ Module alloc. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "memory allocation failed" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "memory allocation failed" |) |) + ] |))) | _, _ => M.impossible end. @@ -174,7 +175,7 @@ Module alloc. (* Trait *) Module Allocator. - Definition allocate_zeroed (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_zeroed (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; layout ] => ltac:(M.monadic @@ -299,7 +300,7 @@ Module alloc. |) ] |); - Value.Integer Integer.U8 0; + M.of_value (| Value.Integer 0 |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -313,7 +314,11 @@ Module alloc. ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| ptr |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| ptr |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -321,7 +326,7 @@ Module alloc. Axiom ProvidedMethod_allocate_zeroed : M.IsProvidedMethod "core::alloc::Allocator" "allocate_zeroed" allocate_zeroed. - Definition grow (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition grow (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ptr; old_layout; new_layout ] => ltac:(M.monadic @@ -334,40 +339,42 @@ Module alloc. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ new_layout ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ old_layout ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -387,27 +394,34 @@ Module alloc. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "`new_layout.size()` must be greater than or equal to `old_layout.size()`" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "`new_layout.size()` must be greater than or equal to `old_layout.size()`" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_ptr := @@ -508,15 +522,16 @@ Module alloc. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], "as_ptr", [] |), [ M.read (| ptr |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -551,15 +566,21 @@ Module alloc. [ M.read (| self |); M.read (| ptr |); M.read (| old_layout |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| new_ptr |) ] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| new_ptr |)) ] + |) + |) |))) |))) | _, _ => M.impossible end. Axiom ProvidedMethod_grow : M.IsProvidedMethod "core::alloc::Allocator" "grow" grow. - Definition grow_zeroed (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition grow_zeroed (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ptr; old_layout; new_layout ] => ltac:(M.monadic @@ -572,40 +593,42 @@ Module alloc. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ new_layout ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ old_layout ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -625,27 +648,34 @@ Module alloc. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "`new_layout.size()` must be greater than or equal to `old_layout.size()`" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "`new_layout.size()` must be greater than or equal to `old_layout.size()`" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_ptr := @@ -746,15 +776,16 @@ Module alloc. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], "as_ptr", [] |), [ M.read (| ptr |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -789,8 +820,14 @@ Module alloc. [ M.read (| self |); M.read (| ptr |); M.read (| old_layout |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| new_ptr |) ] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| new_ptr |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -798,7 +835,7 @@ Module alloc. Axiom ProvidedMethod_grow_zeroed : M.IsProvidedMethod "core::alloc::Allocator" "grow_zeroed" grow_zeroed. - Definition shrink (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; ptr; old_layout; new_layout ] => ltac:(M.monadic @@ -811,40 +848,42 @@ Module alloc. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ new_layout ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ old_layout ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -864,27 +903,34 @@ Module alloc. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "`new_layout.size()` must be smaller than or equal to `old_layout.size()`" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "`new_layout.size()` must be smaller than or equal to `old_layout.size()`" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_ptr := @@ -985,15 +1031,16 @@ Module alloc. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], "as_ptr", [] |), [ M.read (| ptr |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -1028,15 +1075,21 @@ Module alloc. [ M.read (| self |); M.read (| ptr |); M.read (| old_layout |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| new_ptr |) ] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| new_ptr |)) ] + |) + |) |))) |))) | _, _ => M.impossible end. Axiom ProvidedMethod_shrink : M.IsProvidedMethod "core::alloc::Allocator" "shrink" shrink. - Definition by_ref (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition by_ref (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1056,7 +1109,7 @@ Module alloc. ( **self).allocate(layout) } *) - Definition allocate (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; layout ] => @@ -1075,7 +1128,7 @@ Module alloc. ( **self).allocate_zeroed(layout) } *) - Definition allocate_zeroed (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition allocate_zeroed (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; layout ] => @@ -1095,7 +1148,7 @@ Module alloc. unsafe { ( **self).deallocate(ptr, layout) } } *) - Definition deallocate (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deallocate (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; ptr; layout ] => @@ -1121,7 +1174,7 @@ Module alloc. unsafe { ( **self).grow(ptr, old_layout, new_layout) } } *) - Definition grow (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition grow (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; ptr; old_layout; new_layout ] => @@ -1153,7 +1206,7 @@ Module alloc. unsafe { ( **self).grow_zeroed(ptr, old_layout, new_layout) } } *) - Definition grow_zeroed (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition grow_zeroed (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; ptr; old_layout; new_layout ] => @@ -1185,7 +1238,7 @@ Module alloc. unsafe { ( **self).shrink(ptr, old_layout, new_layout) } } *) - Definition shrink (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition shrink (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; ptr; old_layout; new_layout ] => diff --git a/CoqOfRust/core/any.v b/CoqOfRust/core/any.v index 89b419fa3..ab666c5cb 100644 --- a/CoqOfRust/core/any.v +++ b/CoqOfRust/core/any.v @@ -13,7 +13,7 @@ Module any. TypeId::of::() } *) - Definition type_id (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition type_id (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -43,7 +43,7 @@ Module any. f.debug_struct("Any").finish_non_exhaustive() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -63,7 +63,7 @@ Module any. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Any" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Any" |) |) ] |) |) ] @@ -82,7 +82,7 @@ Module any. f.debug_struct("Any").finish_non_exhaustive() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -102,7 +102,7 @@ Module any. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Any" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Any" |) |) ] |) |) ] @@ -121,7 +121,7 @@ Module any. f.debug_struct("Any").finish_non_exhaustive() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -141,7 +141,7 @@ Module any. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Any" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Any" |) |) ] |) |) ] @@ -174,7 +174,7 @@ Module any. t == concrete } *) - Definition is (τ : list Ty.t) (α : list Value.t) : M := + Definition is (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -230,14 +230,14 @@ Module any. } } *) - Definition downcast_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -255,21 +255,27 @@ Module any. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.dyn [ ("core::any::Any::Trait", []) ], - "downcast_ref_unchecked", - [ T ] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.dyn [ ("core::any::Any::Trait", []) ], + "downcast_ref_unchecked", + [ T ] + |), + [ M.read (| self |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -290,14 +296,14 @@ Module any. } } *) - Definition downcast_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -315,21 +321,27 @@ Module any. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.dyn [ ("core::any::Any::Trait", []) ], - "downcast_mut_unchecked", - [ T ] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.dyn [ ("core::any::Any::Trait", []) ], + "downcast_mut_unchecked", + [ T ] + |), + [ M.read (| self |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -345,7 +357,7 @@ Module any. unsafe { &*(self as *const dyn Any as *const T) } } *) - Definition downcast_ref_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_ref_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -353,30 +365,31 @@ Module any. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.dyn [ ("core::any::Any::Trait", []) ], "is", [ T ] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -387,23 +400,30 @@ Module any. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: self.is::()" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: self.is::()" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - M.rust_cast - (M.read (| - M.use (M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |)) - |)) + M.rust_cast (| + M.read (| + M.use (M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| self |) |) |)) + |) + |) |) |))) | _, _ => M.impossible @@ -419,7 +439,7 @@ Module any. unsafe { &mut *(self as *mut dyn Any as *mut T) } } *) - Definition downcast_mut_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -427,30 +447,31 @@ Module any. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.dyn [ ("core::any::Any::Trait", []) ], "is", [ T ] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -461,23 +482,30 @@ Module any. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: self.is::()" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: self.is::()" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - M.rust_cast - (M.read (| - M.use (M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |)) - |)) + M.rust_cast (| + M.read (| + M.use (M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| self |) |) |)) + |) + |) |) |))) | _, _ => M.impossible @@ -490,14 +518,14 @@ Module any. ::is::(self) } *) - Definition is (τ : list Ty.t) (α : list Value.t) : M := + Definition is (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.dyn [ ("core::any::Any::Trait", []) ], "is", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -509,7 +537,7 @@ Module any. ::downcast_ref::(self) } *) - Definition downcast_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -520,7 +548,7 @@ Module any. "downcast_ref", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -532,7 +560,7 @@ Module any. ::downcast_mut::(self) } *) - Definition downcast_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -543,7 +571,7 @@ Module any. "downcast_mut", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -556,7 +584,7 @@ Module any. unsafe { ::downcast_ref_unchecked::(self) } } *) - Definition downcast_ref_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_ref_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -567,7 +595,7 @@ Module any. "downcast_ref_unchecked", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -581,7 +609,7 @@ Module any. unsafe { ::downcast_mut_unchecked::(self) } } *) - Definition downcast_mut_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -592,7 +620,7 @@ Module any. "downcast_mut_unchecked", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -604,14 +632,14 @@ Module any. ::is::(self) } *) - Definition is (τ : list Ty.t) (α : list Value.t) : M := + Definition is (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.dyn [ ("core::any::Any::Trait", []) ], "is", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -623,7 +651,7 @@ Module any. ::downcast_ref::(self) } *) - Definition downcast_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -634,7 +662,7 @@ Module any. "downcast_ref", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -646,7 +674,7 @@ Module any. ::downcast_mut::(self) } *) - Definition downcast_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -657,7 +685,7 @@ Module any. "downcast_mut", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -670,7 +698,7 @@ Module any. unsafe { ::downcast_ref_unchecked::(self) } } *) - Definition downcast_ref_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_ref_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -681,7 +709,7 @@ Module any. "downcast_ref_unchecked", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -695,7 +723,7 @@ Module any. unsafe { ::downcast_mut_unchecked::(self) } } *) - Definition downcast_mut_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -706,7 +734,7 @@ Module any. "downcast_mut_unchecked", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -728,14 +756,14 @@ Module any. Definition Self : Ty.t := Ty.path "core::any::TypeId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -765,7 +793,7 @@ Module any. Definition Self : Ty.t := Ty.path "core::any::TypeId". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -779,17 +807,18 @@ Module any. |), [ M.read (| f |); - M.read (| Value.String "TypeId" |); - M.read (| Value.String "t" |); + M.read (| M.of_value (| Value.String "TypeId" |) |); + M.read (| M.of_value (| Value.String "t" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::any::TypeId", "t" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -818,15 +847,15 @@ Module any. Definition Self : Ty.t := Ty.path "core::any::TypeId". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -845,7 +874,7 @@ Module any. Definition Self : Ty.t := Ty.path "core::any::TypeId". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -887,7 +916,7 @@ Module any. Definition Self : Ty.t := Ty.path "core::any::TypeId". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -927,23 +956,24 @@ Module any. self.t == other.t } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::any::TypeId", "t" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::any::TypeId", "t" |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -964,7 +994,7 @@ Module any. TypeId { t } } *) - Definition of (τ : list Ty.t) (α : list Value.t) : M := + Definition of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -973,7 +1003,11 @@ Module any. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::type_id", [ T ] |), [] |) |) in - M.alloc (| Value.StructRecord "core::any::TypeId" [ ("t", M.read (| t |)) ] |) + M.alloc (| + M.of_value (| + Value.StructRecord "core::any::TypeId" [ ("t", A.to_value (M.read (| t |))) ] + |) + |) |))) | _, _ => M.impossible end. @@ -1001,7 +1035,7 @@ Module any. (self.t as u64).hash(state); } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1014,20 +1048,21 @@ Module any. M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ H ] |), [ M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::any::TypeId", "t" |) - |)) + |) + |) |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1045,7 +1080,7 @@ Module any. intrinsics::type_name::() } *) - Definition type_name (τ : list Ty.t) (α : list Value.t) : M := + Definition type_name (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -1058,7 +1093,7 @@ Module any. type_name::() } *) - Definition type_name_of_val (τ : list Ty.t) (α : list Value.t) : M := + Definition type_name_of_val (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ _val ] => ltac:(M.monadic diff --git a/CoqOfRust/core/array/ascii.v b/CoqOfRust/core/array/ascii.v index 37f18c7dd..82695f616 100644 --- a/CoqOfRust/core/array/ascii.v +++ b/CoqOfRust/core/array/ascii.v @@ -16,14 +16,14 @@ Module array. } } *) - Definition as_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36,27 +36,32 @@ Module array. "is_ascii", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "array") [ Ty.path "u8" ], - "as_ascii_unchecked", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + "as_ascii_unchecked", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -73,14 +78,14 @@ Module array. unsafe { &*ascii_ptr } } *) - Definition as_ascii_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ascii_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => 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 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 979907cd8..5e7e9fc54 100644 --- a/CoqOfRust/core/array/drain.v +++ b/CoqOfRust/core/array/drain.v @@ -14,7 +14,7 @@ Module array. func(drain) } *) - Definition drain_array_with (τ : list Ty.t) (α : list Value.t) : M := + Definition drain_array_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; R; impl_for_'a__FnOnce_Drain_'a__T___arrow_R ], [ array; func ] => ltac:(M.monadic @@ -36,33 +36,37 @@ Module array. |) in let drain := M.alloc (| - Value.StructTuple - "core::array::drain::Drain" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "iter_mut", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ Ty.apply (Ty.path "array") [ T ] ], - [], - "deref_mut", - [] - |), - [ array ] - |)) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::array::drain::Drain" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "iter_mut", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ Ty.apply (Ty.path "array") [ T ] ], + [], + "deref_mut", + [] + |), + [ array ] + |) + |) + ] + |)) + ] + |) |) in M.alloc (| M.call_closure (| @@ -73,7 +77,10 @@ Module array. "call_once", [] |), - [ M.read (| func |); Value.Tuple [ M.read (| drain |) ] ] + [ + M.read (| func |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| drain |)) ] |) + ] |) |) |))) @@ -96,7 +103,7 @@ Module array. unsafe { drop_in_place(self.0.as_mut_slice()) } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -146,7 +153,7 @@ Module array. Some(unsafe { p.read() }) } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -235,18 +242,21 @@ Module array. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "read", - [] - |), - [ M.read (| p |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "read", + [] + |), + [ M.read (| p |) ] + |)) + ] + |) |) |))) |))) @@ -259,7 +269,7 @@ Module array. (n, Some(n)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -280,11 +290,18 @@ Module array. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -312,7 +329,7 @@ Module array. self.0.len() } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -370,7 +387,7 @@ Module array. unsafe { p.read() } } *) - Definition next_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/array/equality.v b/CoqOfRust/core/array/equality.v index 5457cc9ec..f4b774820 100644 --- a/CoqOfRust/core/array/equality.v +++ b/CoqOfRust/core/array/equality.v @@ -11,7 +11,7 @@ Module array. SpecArrayEq::spec_eq(self, other) } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -36,7 +36,7 @@ Module array. SpecArrayEq::spec_ne(self, other) } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -78,7 +78,7 @@ Module array. } } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -131,7 +131,7 @@ Module array. "core::result::Result::Err", 0 |) in - M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -147,7 +147,7 @@ Module array. } } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -200,7 +200,7 @@ Module array. "core::result::Result::Err", 0 |) in - M.alloc (| Value.Bool true |))) + M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -229,7 +229,7 @@ Module array. } } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -282,7 +282,7 @@ Module array. "core::result::Result::Err", 0 |) in - M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -298,7 +298,7 @@ Module array. } } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -351,7 +351,7 @@ Module array. "core::result::Result::Err", 0 |) in - M.alloc (| Value.Bool true |))) + M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -376,7 +376,7 @@ Module array. *self == **other } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -401,7 +401,7 @@ Module array. *self != **other } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -441,7 +441,7 @@ Module array. **self == *other } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -466,7 +466,7 @@ Module array. **self != *other } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -504,7 +504,7 @@ Module array. *self == **other } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -529,7 +529,7 @@ Module array. *self != **other } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -569,7 +569,7 @@ Module array. **self == *other } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -594,7 +594,7 @@ Module array. **self != *other } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -647,7 +647,7 @@ Module array. a[..] == b[..] } *) - Definition spec_eq (T Other : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_eq (T Other : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T Other in match τ, α with | [], [ a; b ] => @@ -671,7 +671,10 @@ Module array. "index", [] |), - [ M.read (| a |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| a |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -681,7 +684,10 @@ Module array. "index", [] |), - [ M.read (| b |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| b |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -693,7 +699,7 @@ Module array. a[..] != b[..] } *) - Definition spec_ne (T Other : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_ne (T Other : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T Other in match τ, α with | [], [ a; b ] => @@ -717,7 +723,10 @@ Module array. "index", [] |), - [ M.read (| a |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| a |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.call_closure (| M.get_trait_method (| @@ -727,7 +736,10 @@ Module array. "index", [] |), - [ M.read (| b |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| b |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -758,7 +770,7 @@ Module array. unsafe { crate::intrinsics::raw_eq(a, crate::mem::transmute(b)) } } *) - Definition spec_eq (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_eq (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ a; b ] => @@ -789,15 +801,15 @@ Module array. !Self::spec_eq(a, b) } *) - Definition spec_ne (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_ne (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::array::equality::SpecArrayEq", T, @@ -806,7 +818,8 @@ Module array. [] |), [ M.read (| a |); M.read (| b |) ] - |)))) + |) + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/array/iter.v b/CoqOfRust/core/array/iter.v index d300ef669..600ddaf71 100644 --- a/CoqOfRust/core/array/iter.v +++ b/CoqOfRust/core/array/iter.v @@ -46,7 +46,7 @@ Module array. IntoIter { data, alive: IndexRange::zero_to(N) } } *) - Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -69,20 +69,23 @@ Module array. |) |) in M.alloc (| - Value.StructRecord - "core::array::iter::IntoIter" - [ - ("data", M.read (| data |)); - ("alive", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ops::index_range::IndexRange", - "zero_to", - [] - |), - [ M.read (| M.get_constant (| "core::array::iter::N" |) |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::array::iter::IntoIter" + [ + ("data", A.to_value (M.read (| data |))); + ("alive", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ops::index_range::IndexRange", + "zero_to", + [] + |), + [ M.read (| M.get_constant (| "core::array::iter::N" |) |) ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -110,7 +113,7 @@ Module array. IntoIterator::into_iter(array) } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -143,7 +146,7 @@ Module array. Self { data: buffer, alive } } *) - Definition new_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ buffer; initialized ] => @@ -178,9 +181,14 @@ Module array. |) |) in M.alloc (| - Value.StructRecord - "core::array::iter::IntoIter" - [ ("data", M.read (| buffer |)); ("alive", M.read (| alive |)) ] + M.of_value (| + Value.StructRecord + "core::array::iter::IntoIter" + [ + ("data", A.to_value (M.read (| buffer |))); + ("alive", A.to_value (M.read (| alive |))) + ] + |) |) |))) | _, _ => M.impossible @@ -200,7 +208,7 @@ Module array. unsafe { Self::new_unchecked(buffer, initialized) } } *) - Definition empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -219,12 +227,14 @@ Module array. |) in let initialized := M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in M.alloc (| M.call_closure (| @@ -253,7 +263,7 @@ Module array. } } *) - Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -272,12 +282,13 @@ Module array. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::array::iter::IntoIter", "data" - |)); + |) + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", @@ -324,7 +335,7 @@ Module array. } } *) - Definition as_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -343,12 +354,13 @@ Module array. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::array::iter::IntoIter", "data" - |)); + |) + |); M.call_closure (| M.get_trait_method (| "core::clone::Clone", @@ -411,7 +423,7 @@ Module array. }) } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -440,8 +452,8 @@ Module array. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -472,12 +484,13 @@ Module array. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::array::iter::IntoIter", "data" - |)); + |) + |); M.read (| idx |) ] |) @@ -486,7 +499,8 @@ Module array. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -498,7 +512,7 @@ Module array. (len, Some(len)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -519,11 +533,18 @@ Module array. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| len |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -543,7 +564,7 @@ Module array. }) } *) - Definition fold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -572,18 +593,21 @@ Module array. [ Acc; Ty.function [ Ty.tuple [ Acc; Ty.path "usize" ] ] Acc ] |), [ - Value.StructTuple - "core::iter::adapters::by_ref_sized::ByRefSized" - [ - M.SubPointer.get_struct_record_field (| - self, - "core::array::iter::IntoIter", - "alive" - |) - ]; + M.of_value (| + Value.StructTuple + "core::iter::adapters::by_ref_sized::ByRefSized" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + self, + "core::array::iter::IntoIter", + "alive" + |)) + ] + |); M.read (| init |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -609,41 +633,46 @@ Module array. |), [ fold; - Value.Tuple - [ - M.read (| acc |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ], - "assume_init_read", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ], - "get_unchecked", - [ Ty.path "usize" ] + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ], + "assume_init_read", + [] |), [ - (* Unsize *) - M.pointer_coercion (M.read (| data |)); - M.read (| idx |) + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.read (| data |) + |); + M.read (| idx |) + ] + |) ] - |) - ] - |) - ] + |)) + ] + |) ] |))) ] @@ -651,7 +680,8 @@ Module array. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -664,7 +694,7 @@ Module array. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -688,7 +718,7 @@ Module array. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -723,7 +753,7 @@ Module array. NonZeroUsize::new(remaining).map_or(Ok(()), Err) } *) - Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -752,6 +782,7 @@ Module array. let remaining := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), M.call_closure (| M.get_associated_function (| @@ -776,12 +807,13 @@ Module array. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::array::iter::IntoIter", "data" - |)); + |) + |); M.read (| range_to_drop |) ] |) @@ -805,7 +837,7 @@ Module array. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -833,8 +865,12 @@ Module array. |), [ M.read (| remaining |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -848,7 +884,7 @@ Module array. unsafe { self.data.as_ptr().add(self.alive.start()).add(idx).cast::().read() } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -896,12 +932,13 @@ Module array. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::array::iter::IntoIter", "data" - |)) + |) + |) ] |); M.call_closure (| @@ -970,7 +1007,7 @@ Module array. }) } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -999,8 +1036,8 @@ Module array. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1031,12 +1068,13 @@ Module array. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::array::iter::IntoIter", "data" - |)); + |) + |); M.read (| idx |) ] |) @@ -1045,7 +1083,8 @@ Module array. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1065,7 +1104,7 @@ Module array. }) } *) - Definition rfold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ Acc; Fold ], [ self; init; rfold ] => @@ -1094,18 +1133,21 @@ Module array. [ Acc; Ty.function [ Ty.tuple [ Acc; Ty.path "usize" ] ] Acc ] |), [ - Value.StructTuple - "core::iter::adapters::by_ref_sized::ByRefSized" - [ - M.SubPointer.get_struct_record_field (| - self, - "core::array::iter::IntoIter", - "alive" - |) - ]; + M.of_value (| + Value.StructTuple + "core::iter::adapters::by_ref_sized::ByRefSized" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + self, + "core::array::iter::IntoIter", + "alive" + |)) + ] + |); M.read (| init |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1131,41 +1173,46 @@ Module array. |), [ rfold; - Value.Tuple - [ - M.read (| acc |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ], - "assume_init_read", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ] - ], - "get_unchecked", - [ Ty.path "usize" ] + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ], + "assume_init_read", + [] |), [ - (* Unsize *) - M.pointer_coercion (M.read (| data |)); - M.read (| idx |) + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.read (| data |) + |); + M.read (| idx |) + ] + |) ] - |) - ] - |) - ] + |)) + ] + |) ] |))) ] @@ -1173,7 +1220,8 @@ Module array. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -1197,7 +1245,7 @@ Module array. NonZeroUsize::new(remaining).map_or(Ok(()), Err) } *) - Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -1226,6 +1274,7 @@ Module array. let remaining := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), M.call_closure (| M.get_associated_function (| @@ -1250,12 +1299,13 @@ Module array. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::array::iter::IntoIter", "data" - |)); + |) + |); M.read (| range_to_drop |) ] |) @@ -1279,7 +1329,7 @@ Module array. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1307,8 +1357,12 @@ Module array. |), [ M.read (| remaining |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -1341,7 +1395,7 @@ Module array. unsafe { ptr::drop_in_place(self.as_mut_slice()) } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1380,7 +1434,7 @@ Module array. self.alive.len() } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1408,7 +1462,7 @@ Module array. self.alive.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1488,9 +1542,9 @@ Module array. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -1523,7 +1577,7 @@ Module array. new } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1532,28 +1586,32 @@ Module array. M.read (| let new := M.alloc (| - Value.StructRecord - "core::array::iter::IntoIter" - [ - ("data", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], - "uninit_array", - [] - |), - [] - |)); - ("alive", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ops::index_range::IndexRange", - "zero_to", - [] - |), - [ Value.Integer Integer.Usize 0 ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::array::iter::IntoIter" + [ + ("data", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], + "uninit_array", + [] + |), + [] + |))); + ("alive", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ops::index_range::IndexRange", + "zero_to", + [] + |), + [ M.of_value (| Value.Integer 0 |) ] + |))) + ] + |) |) in let _ := M.use @@ -1701,6 +1759,7 @@ Module array. |), [ BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", @@ -1715,15 +1774,15 @@ Module array. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -1751,7 +1810,7 @@ Module array. f.debug_tuple("IntoIter").field(&self.as_slice()).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -1779,12 +1838,12 @@ Module array. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "IntoIter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "IntoIter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::array::iter::IntoIter") [ T ], @@ -1793,7 +1852,8 @@ Module array. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] diff --git a/CoqOfRust/core/array/mod.v b/CoqOfRust/core/array/mod.v index de6ef47bc..33752d505 100644 --- a/CoqOfRust/core/array/mod.v +++ b/CoqOfRust/core/array/mod.v @@ -10,7 +10,7 @@ Module array. try_from_fn(NeverShortCircuit::wrap_mut_1(cb)).0 } *) - Definition from_fn (τ : list Ty.t) (α : list Value.t) : M := + Definition from_fn (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ cb ] => ltac:(M.monadic @@ -62,7 +62,7 @@ Module array. } } *) - Definition try_from_fn (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from_fn (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ R; F ], [ cb ] => ltac:(M.monadic @@ -83,7 +83,7 @@ Module array. M.alloc (| M.call_closure (| M.get_function (| "core::array::try_from_fn_erased", [ Ty.associated; R; F ] |), - [ (* Unsize *) M.pointer_coercion array; M.read (| cb |) ] + [ (* Unsize *) M.pointer_coercion (| array |); M.read (| cb |) ] |) |), [ @@ -151,7 +151,7 @@ Module array. unsafe { &*(s as *const T).cast::<[T; 1]>() } } *) - Definition from_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ s ] => ltac:(M.monadic @@ -173,7 +173,7 @@ Module array. unsafe { &mut *(s as *mut T).cast::<[T; 1]>() } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ s ] => ltac:(M.monadic @@ -200,7 +200,7 @@ Module array. Definition Self : Ty.t := Ty.path "core::array::TryFromSliceError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -214,16 +214,17 @@ Module array. |), [ M.read (| f |); - M.read (| Value.String "TryFromSliceError" |); + M.read (| M.of_value (| Value.String "TryFromSliceError" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::array::TryFromSliceError", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -252,14 +253,14 @@ Module array. Definition Self : Ty.t := Ty.path "core::array::TryFromSliceError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -283,7 +284,7 @@ Module array. self.description().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -324,12 +325,12 @@ Module array. "could not convert slice to array" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "could not convert slice to array" |))) + M.read (| M.of_value (| Value.String "could not convert slice to array" |) |))) | _, _ => M.impossible end. @@ -349,7 +350,7 @@ Module array. match x {} } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -374,7 +375,7 @@ Module array. &self[..] } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -388,7 +389,8 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ M.read (| self |); M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |))) | _, _ => M.impossible end. @@ -410,7 +412,7 @@ Module array. &mut self[..] } *) - Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -424,7 +426,8 @@ Module array. "index_mut", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ M.read (| self |); M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |))) | _, _ => M.impossible end. @@ -446,13 +449,13 @@ Module array. self } *) - Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - (* Unsize *) M.pointer_coercion (M.read (| self |)))) + (* Unsize *) M.pointer_coercion (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -473,13 +476,13 @@ Module array. self } *) - Definition borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - (* Unsize *) M.pointer_coercion (M.read (| self |)))) + (* Unsize *) M.pointer_coercion (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -503,7 +506,7 @@ Module array. <&Self>::try_from(slice).copied() } *) - Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -558,7 +561,7 @@ Module array. ::try_from(&*slice) } *) - Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -606,7 +609,7 @@ Module array. } } *) - Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -614,46 +617,61 @@ Module array. (let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) - (M.read (| M.get_constant (| "core::array::N" |) |)) + |), + M.read (| M.get_constant (| "core::array::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "as_ptr", [] |), [ M.read (| slice |) ] - |)) + |) + |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| ptr |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| ptr |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::array::TryFromSliceError" [ Value.Tuple [] ] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::array::TryFromSliceError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -690,7 +708,7 @@ Module array. } } *) - Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -698,46 +716,61 @@ Module array. (let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) - (M.read (| M.get_constant (| "core::array::N" |) |)) + |), + M.read (| M.get_constant (| "core::array::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "as_mut_ptr", [] |), [ M.read (| slice |) ] - |)) + |) + |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| ptr |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| ptr |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::array::TryFromSliceError" [ Value.Tuple [] ] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::array::TryFromSliceError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -764,7 +797,7 @@ Module array. Hash::hash(&self[..], state) } *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ H ], [ self; state ] => @@ -788,7 +821,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |); M.read (| state |) ] @@ -813,7 +849,7 @@ Module array. fmt::Debug::fmt(&&self[..], f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -838,7 +874,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |); M.read (| f |) @@ -871,7 +910,7 @@ Module array. self.iter() } *) - Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -879,7 +918,7 @@ Module array. (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "iter", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -913,7 +952,7 @@ Module array. self.iter_mut() } *) - Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -921,7 +960,7 @@ Module array. (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "iter_mut", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -951,7 +990,7 @@ Module array. Index::index(self as &[T], index) } *) - Definition index (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self; index ] => @@ -968,7 +1007,7 @@ Module array. |), [ M.read (| - M.use (M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |)) + M.use (M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| self |) |) |)) |); M.read (| index |) ] @@ -994,7 +1033,7 @@ Module array. IndexMut::index_mut(self as &mut [T], index) } *) - Definition index_mut (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self; index ] => @@ -1011,7 +1050,7 @@ Module array. |), [ M.read (| - M.use (M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |)) + M.use (M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| self |) |) |)) |); M.read (| index |) ] @@ -1036,7 +1075,7 @@ Module array. PartialOrd::partial_cmp(&&self[..], &&other[..]) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1061,7 +1100,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |); M.alloc (| @@ -1073,7 +1115,10 @@ Module array. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |) ] @@ -1086,7 +1131,7 @@ Module array. PartialOrd::lt(&&self[..], &&other[..]) } *) - Definition lt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1111,7 +1156,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |); M.alloc (| @@ -1123,7 +1171,10 @@ Module array. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |) ] @@ -1136,7 +1187,7 @@ Module array. PartialOrd::le(&&self[..], &&other[..]) } *) - Definition le (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1161,7 +1212,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |); M.alloc (| @@ -1173,7 +1227,10 @@ Module array. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |) ] @@ -1186,7 +1243,7 @@ Module array. PartialOrd::ge(&&self[..], &&other[..]) } *) - Definition ge (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1211,7 +1268,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |); M.alloc (| @@ -1223,7 +1283,10 @@ Module array. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |) ] @@ -1236,7 +1299,7 @@ Module array. PartialOrd::gt(&&self[..], &&other[..]) } *) - Definition gt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1261,7 +1324,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |); M.alloc (| @@ -1273,7 +1339,10 @@ Module array. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |) ] @@ -1305,7 +1374,7 @@ Module array. Ord::cmp(&&self[..], &&other[..]) } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1330,7 +1399,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |); M.alloc (| @@ -1342,7 +1414,10 @@ Module array. "index", [] |), - [ M.read (| other |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| other |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |) ] @@ -1379,7 +1454,7 @@ Module array. SpecArrayClone::clone(self) } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1397,7 +1472,7 @@ Module array. self.clone_from_slice(other); } *) - Definition clone_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1414,12 +1489,12 @@ Module array. [] |), [ - (* Unsize *) M.pointer_coercion (M.read (| self |)); - (* Unsize *) M.pointer_coercion (M.read (| other |)) + (* Unsize *) M.pointer_coercion (| M.read (| self |) |); + (* Unsize *) M.pointer_coercion (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1448,7 +1523,7 @@ Module array. from_trusted_iterator(array.iter().cloned()) } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -1476,7 +1551,7 @@ Module array. [ M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "iter", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| array |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| array |) |) ] |) ] |) @@ -1502,7 +1577,7 @@ Module array. *array } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -1529,142 +1604,176 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1680,813 +1789,171 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) - | _, _ => M.impossible - end. - - Axiom Implements : - forall (T : Ty.t), - M.IsTraitInstance - "core::default::Default" - (Self T) - (* Trait polymorphic types *) [] - (* Instance *) [ ("default", InstanceField.Method (default T)) ]. - (* - fn default() -> [T; $n] { - [$t::default(), $($ts::default()),*] - } - *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := - let Self : Ty.t := Self T in - match τ, α with - | [], [] => - ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) - | _, _ => M.impossible - end. - - Axiom Implements : - forall (T : Ty.t), - M.IsTraitInstance - "core::default::Default" - (Self T) - (* Trait polymorphic types *) [] - (* Instance *) [ ("default", InstanceField.Method (default T)) ]. - (* - fn default() -> [T; $n] { - [$t::default(), $($ts::default()),*] - } - *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := - let Self : Ty.t := Self T in - match τ, α with - | [], [] => - ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) - | _, _ => M.impossible - end. - - Axiom Implements : - forall (T : Ty.t), - M.IsTraitInstance - "core::default::Default" - (Self T) - (* Trait polymorphic types *) [] - (* Instance *) [ ("default", InstanceField.Method (default T)) ]. - (* - fn default() -> [T; $n] { - [$t::default(), $($ts::default()),*] - } - *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := - let Self : Ty.t := Self T in - match τ, α with - | [], [] => - ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) - | _, _ => M.impossible - end. - - Axiom Implements : - forall (T : Ty.t), - M.IsTraitInstance - "core::default::Default" - (Self T) - (* Trait polymorphic types *) [] - (* Instance *) [ ("default", InstanceField.Method (default T)) ]. - (* - fn default() -> [T; $n] { - [$t::default(), $($ts::default()),*] - } - *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := - let Self : Ty.t := Self T in - match τ, α with - | [], [] => - ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) - | _, _ => M.impossible - end. - - Axiom Implements : - forall (T : Ty.t), - M.IsTraitInstance - "core::default::Default" - (Self T) - (* Trait polymorphic types *) [] - (* Instance *) [ ("default", InstanceField.Method (default T)) ]. - (* - fn default() -> [T; $n] { - [$t::default(), $($ts::default()),*] - } - *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := - let Self : Ty.t := Self T in - match τ, α with - | [], [] => - ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2502,114 +1969,166 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2625,110 +2144,326 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + forall (T : Ty.t), + M.IsTraitInstance + "core::default::Default" + (Self T) + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method (default T)) ]. + (* + fn default() -> [T; $n] { + [$t::default(), $($ts::default()),*] + } + *) + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self T in + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2744,106 +2479,151 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2859,102 +2639,296 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + forall (T : Ty.t), + M.IsTraitInstance + "core::default::Default" + (Self T) + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method (default T)) ]. + (* + fn default() -> [T; $n] { + [$t::default(), $($ts::default()),*] + } + *) + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self T in + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2970,98 +2944,136 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3077,94 +3089,266 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + forall (T : Ty.t), + M.IsTraitInstance + "core::default::Default" + (Self T) + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method (default T)) ]. + (* + fn default() -> [T; $n] { + [$t::default(), $($ts::default()),*] + } + *) + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self T in + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3180,90 +3364,121 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3279,86 +3494,116 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3374,82 +3619,226 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + forall (T : Ty.t), + M.IsTraitInstance + "core::default::Default" + (Self T) + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method (default T)) ]. + (* + fn default() -> [T; $n] { + [$t::default(), $($ts::default()),*] + } + *) + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self T in + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3465,78 +3854,101 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3552,74 +3964,96 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3635,70 +4069,91 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3714,66 +4169,86 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3789,62 +4264,81 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3860,58 +4354,76 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3927,54 +4439,71 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3990,50 +4519,66 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4049,46 +4594,126 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + forall (T : Ty.t), + M.IsTraitInstance + "core::default::Default" + (Self T) + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method (default T)) ]. + (* + fn default() -> [T; $n] { + [$t::default(), $($ts::default()),*] + } + *) + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self T in + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4104,42 +4729,51 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4155,38 +4789,46 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4202,34 +4844,41 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4245,30 +4894,36 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4284,26 +4939,31 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4319,22 +4979,26 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |); - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4350,18 +5014,21 @@ Module array. [$t::default(), $($ts::default()),*] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Array - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4409,9 +5076,12 @@ Module array. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "array") [ T ]. (* fn default() -> [T; $n] { [] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in - match τ, α with | [], [] => ltac:(M.monadic (Value.Array [])) | _, _ => M.impossible end. + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Array [] |))) + | _, _ => M.impossible + end. Axiom Implements : forall (T : Ty.t), @@ -4433,7 +5103,7 @@ Module array. self.try_map(NeverShortCircuit::wrap_mut_1(f)).0 } *) - Definition map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F; U ], [ self; f ] => @@ -4484,7 +5154,7 @@ Module array. drain_array_with(self, |iter| try_from_trusted_iterator(iter.map(f))) } *) - Definition try_map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F; R ], [ self; f ] => @@ -4504,8 +5174,8 @@ Module array. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4542,7 +5212,8 @@ Module array. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4557,13 +5228,13 @@ Module array. self } *) - Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - (* Unsize *) M.pointer_coercion (M.read (| self |)))) + (* Unsize *) M.pointer_coercion (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -4576,13 +5247,13 @@ Module array. self } *) - Definition as_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - (* Unsize *) M.pointer_coercion (M.read (| self |)))) + (* Unsize *) M.pointer_coercion (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -4595,7 +5266,7 @@ Module array. from_trusted_iterator(self.iter()) } *) - Definition each_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition each_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4609,7 +5280,7 @@ Module array. [ M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "iter", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |) ] |))) @@ -4625,7 +5296,7 @@ Module array. from_trusted_iterator(self.iter_mut()) } *) - Definition each_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition each_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4642,7 +5313,7 @@ Module array. [ M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "iter_mut", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |) ] |))) @@ -4658,7 +5329,7 @@ Module array. (&self[..]).split_array_ref::() } *) - Definition split_array_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_array_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4675,7 +5346,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -4691,7 +5365,7 @@ Module array. (&mut self[..]).split_array_mut::() } *) - Definition split_array_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_array_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4708,7 +5382,10 @@ Module array. "index_mut", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -4724,7 +5401,7 @@ Module array. (&self[..]).rsplit_array_ref::() } *) - Definition rsplit_array_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit_array_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4745,7 +5422,10 @@ Module array. "index", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -4761,7 +5441,7 @@ Module array. (&mut self[..]).rsplit_array_mut::() } *) - Definition rsplit_array_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit_array_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4782,7 +5462,10 @@ Module array. "index_mut", [] |), - [ M.read (| self |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) ] |))) @@ -4799,7 +5482,7 @@ Module array. try_from_trusted_iterator(iter.map(NeverShortCircuit)).0 } *) - Definition from_trusted_iterator (τ : list Ty.t) (α : list Value.t) : M := + Definition from_trusted_iterator (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; impl_UncheckedIterator_Item___T_ ], [ iter ] => ltac:(M.monadic @@ -4839,7 +5522,7 @@ Module array. |), [ M.read (| iter |); - M.constructor_as_closure "core::ops::try_trait::NeverShortCircuit" + M.constructor_as_closure (| "core::ops::try_trait::NeverShortCircuit" |) ] |) ] @@ -4872,7 +5555,7 @@ Module array. try_from_fn(next(iter)) } *) - Definition try_from_trusted_iterator (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from_trusted_iterator (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; R; impl_UncheckedIterator_Item___R_ ], [ iter ] => ltac:(M.monadic @@ -4880,16 +5563,16 @@ Module array. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| M.SubPointer.get_tuple_field (| M.alloc (| M.call_closure (| @@ -4905,21 +5588,29 @@ Module array. |), 0 |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::array::try_from_trusted_iterator::N" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: iter.size_hint().0 >= N" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: iter.size_hint().0 >= N" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -4947,13 +5638,13 @@ Module array. } } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; impl_UncheckedIterator_Item___T_ ], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4975,7 +5666,8 @@ Module array. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -5005,7 +5697,7 @@ Module array. ControlFlow::Continue(()) } *) - Definition try_from_fn_erased (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from_fn_erased (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; R; impl_FnMut_usize__arrow_R ], [ buffer; generator ] => ltac:(M.monadic @@ -5016,33 +5708,35 @@ Module array. (M.read (| let guard := M.alloc (| - Value.StructRecord - "core::array::Guard" - [ - ("array_mut", M.read (| buffer |)); - ("initialized", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "core::array::Guard" + [ + ("array_mut", A.to_value (M.read (| buffer |))); + ("initialized", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| guard, "core::array::Guard", "initialized" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -5063,7 +5757,8 @@ Module array. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5101,16 +5796,19 @@ Module array. |), [ generator; - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - guard, - "core::array::Guard", - "initialized" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + guard, + "core::array::Guard", + "initialized" + |) + |)) + ] + |) ] |) ] @@ -5181,7 +5879,7 @@ Module array. [ guard; M.read (| item |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5189,7 +5887,7 @@ Module array. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -5207,9 +5905,11 @@ Module array. |) |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) |))) |))) @@ -5248,7 +5948,7 @@ Module array. } } *) - Definition push_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; item ] => @@ -5311,11 +6011,11 @@ Module array. "initialized" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5340,7 +6040,7 @@ Module array. } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -5349,31 +6049,31 @@ Module array. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::array::Guard", "initialized" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -5394,7 +6094,9 @@ Module array. |) |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5407,18 +6109,21 @@ Module array. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.initialized <= self.array_mut.len()" + M.of_value (| + Value.String + "assertion failed: self.initialized <= self.array_mut.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -5452,18 +6157,21 @@ Module array. "array_mut" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::array::Guard", - "initialized" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::array::Guard", + "initialized" + |) + |))) + ] + |) ] |) ] @@ -5471,7 +6179,7 @@ Module array. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5503,7 +6211,7 @@ Module array. } } *) - Definition iter_next_chunk (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_next_chunk (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; impl_Iterator_Item___T_ ], [ iter ] => ltac:(M.monadic @@ -5527,7 +6235,7 @@ Module array. "core::array::iter_next_chunk_erased", [ T; impl_Iterator_Item___T_ ] |), - [ (* Unsize *) M.pointer_coercion array; M.read (| iter |) ] + [ (* Unsize *) M.pointer_coercion (| array |); M.read (| iter |) ] |) |) in M.match_operator (| @@ -5538,18 +6246,21 @@ Module array. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], - "array_assume_init", - [] - |), - [ M.read (| array |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], + "array_assume_init", + [] + |), + [ M.read (| array |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -5557,26 +6268,31 @@ Module array. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let initialized := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::array::iter::IntoIter") [ T ], - "new_unchecked", - [] - |), - [ - M.read (| array |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::array::iter::IntoIter") [ T ], + "new_unchecked", + [] + |), [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| initialized |)) + M.read (| array |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| initialized |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -5607,7 +6323,7 @@ Module array. Ok(()) } *) - Definition iter_next_chunk_erased (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_next_chunk_erased (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; impl_Iterator_Item___T_ ], [ buffer; iter ] => ltac:(M.monadic @@ -5616,31 +6332,35 @@ Module array. M.read (| let guard := M.alloc (| - Value.StructRecord - "core::array::Guard" - [ ("array_mut", M.read (| buffer |)); ("initialized", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "core::array::Guard" + [ + ("array_mut", A.to_value (M.read (| buffer |))); + ("initialized", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| guard, "core::array::Guard", "initialized" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -5661,7 +6381,8 @@ Module array. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5699,7 +6420,7 @@ Module array. [ guard; M.read (| item |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -5709,7 +6430,7 @@ Module array. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -5726,7 +6447,13 @@ Module array. [ M.read (| guard |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/ascii.v b/CoqOfRust/core/ascii.v index 79fc99b95..66172ebfa 100644 --- a/CoqOfRust/core/ascii.v +++ b/CoqOfRust/core/ascii.v @@ -13,31 +13,34 @@ Module ascii. Definition Self : Ty.t := Ty.path "core::ascii::EscapeDefault". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ascii::EscapeDefault" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::escape::EscapeIterInner", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::ascii::EscapeDefault", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::ascii::EscapeDefault" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::escape::EscapeIterInner", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::ascii::EscapeDefault", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -56,7 +59,7 @@ Module ascii. EscapeDefault(escape::EscapeIterInner::new(data, range)) } *) - Definition escape_default (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -64,7 +67,10 @@ Module ascii. M.read (| let data := M.alloc (| - repeat (Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" []) 4 + repeat (| + M.of_value (| Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" [] |), + 4 + |) |) in let range := M.alloc (| @@ -74,18 +80,21 @@ Module ascii. |) |) in M.alloc (| - Value.StructTuple - "core::ascii::EscapeDefault" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::escape::EscapeIterInner", - "new", - [] - |), - [ M.read (| data |); M.read (| range |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ascii::EscapeDefault" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::escape::EscapeIterInner", + "new", + [] + |), + [ M.read (| data |); M.read (| range |) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -102,7 +111,7 @@ Module ascii. self.0.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -126,7 +135,7 @@ Module ascii. (n, Some(n)) } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -150,9 +159,18 @@ Module ascii. |) |) in M.alloc (| - Value.Tuple - [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -163,7 +181,7 @@ Module ascii. self.0.len() } *) - Definition count (τ : list Ty.t) (α : list Value.t) : M := + Definition count (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -180,7 +198,7 @@ Module ascii. self.0.next_back() } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -201,7 +219,7 @@ Module ascii. self.0.advance_by(n) } *) - Definition advance_by (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -249,7 +267,7 @@ Module ascii. self.0.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -276,7 +294,7 @@ Module ascii. self.0.advance_back_by(n) } *) - Definition advance_back_by (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -320,7 +338,7 @@ Module ascii. self.0.len() } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -365,7 +383,7 @@ Module ascii. f.write_str(self.0.as_str()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -410,7 +428,7 @@ Module ascii. f.debug_struct("EscapeDefault").finish_non_exhaustive() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -430,7 +448,7 @@ Module ascii. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "EscapeDefault" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "EscapeDefault" |) |) ] |) |) ] diff --git a/CoqOfRust/core/ascii/ascii_char.v b/CoqOfRust/core/ascii/ascii_char.v index c2c91269b..2214b52dd 100644 --- a/CoqOfRust/core/ascii/ascii_char.v +++ b/CoqOfRust/core/ascii/ascii_char.v @@ -668,7 +668,7 @@ Module ascii. Definition Self : Ty.t := Ty.path "core::ascii::ascii_char::AsciiChar". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -700,12 +700,12 @@ Module ascii. Definition Self : Ty.t := Ty.path "core::ascii::ascii_char::AsciiChar". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -733,7 +733,7 @@ Module ascii. Definition Self : Ty.t := Ty.path "core::ascii::ascii_char::AsciiChar". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -760,7 +760,7 @@ Module ascii. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -777,7 +777,7 @@ Module ascii. Definition Self : Ty.t := Ty.path "core::ascii::ascii_char::AsciiChar". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -826,7 +826,7 @@ Module ascii. Definition Self : Ty.t := Ty.path "core::ascii::ascii_char::AsciiChar". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -881,7 +881,7 @@ Module ascii. Definition Self : Ty.t := Ty.path "core::ascii::ascii_char::AsciiChar". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -929,40 +929,45 @@ Module ascii. } } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic (let b := M.alloc (| b |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| b |)) (Value.Integer Integer.U8 127) + BinOp.Pure.le (| M.read (| b |), M.of_value (| Value.Integer 127 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ascii::ascii_char::AsciiChar", - "from_u8_unchecked", - [] - |), - [ M.read (| b |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ascii::ascii_char::AsciiChar", + "from_u8_unchecked", + [] + |), + [ M.read (| b |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -977,7 +982,7 @@ Module ascii. unsafe { transmute(b) } } *) - Definition from_u8_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic @@ -1005,40 +1010,45 @@ Module ascii. } } *) - Definition digit (τ : list Ty.t) (α : list Value.t) : M := + Definition digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d ] => ltac:(M.monadic (let d := M.alloc (| d |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| d |)) (Value.Integer Integer.U8 10) + BinOp.Pure.lt (| M.read (| d |), M.of_value (| Value.Integer 10 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ascii::ascii_char::AsciiChar", - "digit_unchecked", - [] - |), - [ M.read (| d |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ascii::ascii_char::AsciiChar", + "digit_unchecked", + [] + |), + [ M.read (| d |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1060,7 +1070,7 @@ Module ascii. } } *) - Definition digit_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition digit_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d ] => ltac:(M.monadic @@ -1068,26 +1078,28 @@ Module ascii. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| d |)) - (Value.Integer Integer.U8 10)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| d |), + M.of_value (| Value.Integer 10 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1098,22 +1110,27 @@ Module ascii. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d < 10" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: d < 10" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let byte := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "unchecked_add", [] |), - [ M.read (| UnsupportedLiteral |); M.read (| d |) ] + [ M.read (| M.of_value (| UnsupportedLiteral |) |); M.read (| d |) ] |) |) in M.alloc (| @@ -1138,12 +1155,12 @@ Module ascii. self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| self |)))) + M.rust_cast (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -1154,12 +1171,12 @@ Module ascii. self as u8 as char } *) - Definition to_char (τ : list Ty.t) (α : list Value.t) : M := + Definition to_char (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.rust_cast (M.read (| self |))))) + M.rust_cast (| M.rust_cast (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -1170,7 +1187,7 @@ Module ascii. crate::slice::from_ref(self).as_str() } *) - Definition as_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1210,14 +1227,14 @@ Module ascii. unsafe { &*str_ptr } } *) - Definition as_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => 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 str_ptr := M.alloc (| M.rust_cast (| M.read (| ascii_ptr |) |) |) in M.alloc (| M.read (| str_ptr |) |) |))) | _, _ => M.impossible @@ -1230,7 +1247,7 @@ Module ascii. self.as_str().as_bytes() } *) - Definition as_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1262,7 +1279,7 @@ Module ascii. ::fmt(self.as_str(), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1331,7 +1348,7 @@ Module ascii. f.write_char('\'') } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1350,7 +1367,12 @@ Module ascii. M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::Digit0" [] + [ + M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::Digit0" + [] + |) ] |) |))); @@ -1360,7 +1382,12 @@ Module ascii. M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallT" [] + [ + M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::SmallT" + [] + |) ] |) |))); @@ -1370,7 +1397,12 @@ Module ascii. M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallR" [] + [ + M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::SmallR" + [] + |) ] |) |))); @@ -1380,7 +1412,12 @@ Module ascii. M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallN" [] + [ + M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::SmallN" + [] + |) ] |) |))); @@ -1391,9 +1428,11 @@ Module ascii. M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), [ - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::ReverseSolidus" - [] + M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::ReverseSolidus" + [] + |) ] |) |))); @@ -1404,9 +1443,11 @@ Module ascii. M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), [ - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::Apostrophe" - [] + M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::Apostrophe" + [] + |) ] |) |))); @@ -1424,22 +1465,23 @@ Module ascii. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "is_ascii_control", [] |), [ byte ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1447,23 +1489,37 @@ Module ascii. Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Array - [ - M.read (| M.read (| self |) |); - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::Null" - []; - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::Null" - []; - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::Null" - [] - ]; - Value.Integer Integer.U8 1 - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.read (| self |) |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::Null" + [] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::Null" + [] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::Null" + [] + |)) + ] + |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1485,7 +1541,7 @@ Module ascii. [ BinOp.Panic.shr (| M.read (| byte |), - Value.Integer Integer.I32 4 + M.of_value (| Value.Integer 4 |) |) ] |) @@ -1508,30 +1564,42 @@ Module ascii. [] |), [ - BinOp.Pure.bit_and - (M.read (| byte |)) - (Value.Integer Integer.U8 15) + BinOp.Pure.bit_and (| + M.read (| byte |), + M.of_value (| Value.Integer 15 |) + |) ] |) |) |) |) in M.alloc (| - Value.Tuple - [ - Value.Array - [ - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::ReverseSolidus" - []; - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::SmallX" - []; - M.read (| hi |); - M.read (| lo |) - ]; - Value.Integer Integer.U8 4 - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::ReverseSolidus" + [] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::SmallX" + [] + |)); + A.to_value (M.read (| hi |)); + A.to_value (M.read (| lo |)) + ] + |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |) |))) ] |))) @@ -1566,7 +1634,7 @@ Module ascii. "write_char", [] |), - [ M.read (| f |); Value.UnicodeChar 39 ] + [ M.read (| f |); M.of_value (| Value.UnicodeChar 39 |) ] |) ] |) @@ -1655,9 +1723,14 @@ Module ascii. |), [ buf; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.rust_cast (M.read (| len |))) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value (M.rust_cast (| M.read (| len |) |))) + ] + |) ] |) ] @@ -1797,10 +1870,10 @@ Module ascii. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -1813,7 +1886,7 @@ Module ascii. "write_char", [] |), - [ M.read (| f |); Value.UnicodeChar 39 ] + [ M.read (| f |); M.of_value (| Value.UnicodeChar 39 |) ] |) |))) ] diff --git a/CoqOfRust/core/asserting.v b/CoqOfRust/core/asserting.v index 7d14cbfd5..d928ce134 100644 --- a/CoqOfRust/core/asserting.v +++ b/CoqOfRust/core/asserting.v @@ -19,14 +19,17 @@ Module asserting. [ Ty.apply (Ty.path "core::asserting::Wrapper") [ Ty.apply (Ty.path "&") [ E ] ] ]. (* fn try_capture(&self, _: &mut Capture) {} *) - Definition try_capture (E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_capture (E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E in match τ, α with | [], [ self; β1 ] => ltac:(M.monadic (let self := M.alloc (| self |) in let β1 := M.alloc (| β1 |) in - M.match_operator (| β1, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| + β1, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. @@ -51,7 +54,7 @@ Module asserting. f.write_str("N/A") } *) - Definition fmt (E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E in match τ, α with | [], [ self; f ] => @@ -60,7 +63,7 @@ Module asserting. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "N/A" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "N/A" |) |) ] |))) | _, _ => M.impossible end. @@ -93,7 +96,7 @@ Module asserting. to.elem = Some( *self.0); } *) - Definition try_capture (E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_capture (E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E in match τ, α with | [], [ self; to ] => @@ -108,21 +111,24 @@ Module asserting. "core::asserting::Capture", "elem" |), - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::asserting::Wrapper", - 0 - |) - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::asserting::Wrapper", + 0 + |) + |) + |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -151,7 +157,7 @@ Module asserting. } } *) - Definition fmt (E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E in match τ, α with | [], [ self; f ] => @@ -175,7 +181,7 @@ Module asserting. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "N/A" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "N/A" |) |) ] |) |))); fun γ => @@ -227,17 +233,21 @@ Module asserting. Self { elem: None, phantom: PhantomData } } *) - Definition new (M_ T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (M_ T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self M_ T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::asserting::Capture" - [ - ("elem", Value.StructTuple "core::option::Option::None" []); - ("phantom", Value.StructTuple "core::marker::PhantomData" []) - ])) + (M.of_value (| + Value.StructRecord + "core::asserting::Capture" + [ + ("elem", + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("phantom", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/async_iter/async_iter.v b/CoqOfRust/core/async_iter/async_iter.v index 1964470f7..30b935333 100644 --- a/CoqOfRust/core/async_iter/async_iter.v +++ b/CoqOfRust/core/async_iter/async_iter.v @@ -5,13 +5,18 @@ Module async_iter. Module async_iter. (* Trait *) Module AsyncIterator. - Definition size_hint (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ Value.Integer Integer.Usize 0; Value.StructTuple "core::option::Option::None" [] ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |))) | _, _ => M.impossible end. @@ -30,7 +35,7 @@ Module async_iter. S::poll_next(Pin::new(&mut **self), cx) } *) - Definition poll_next (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll_next (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self; cx ] => @@ -80,7 +85,7 @@ Module async_iter. ( **self).size_hint() } *) - Definition size_hint (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self ] => @@ -124,7 +129,7 @@ Module async_iter. ::poll_next(self.as_deref_mut(), cx) } *) - Definition poll_next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll_next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; cx ] => @@ -161,7 +166,7 @@ Module async_iter. ( **self).size_hint() } *) - Definition size_hint (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -216,15 +221,22 @@ Module async_iter. Poll::Ready(Some(t)) } *) - Definition async_gen_ready (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition async_gen_ready (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => ltac:(M.monadic (let t := M.alloc (| t |) in - Value.StructTuple - "core::task::poll::Poll::Ready" - [ Value.StructTuple "core::option::Option::Some" [ M.read (| t |) ] ])) + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| t |)) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -236,10 +248,13 @@ Module async_iter. (* Ty.apply (Ty.path "core::task::poll::Poll") [ Ty.apply (Ty.path "core::option::Option") [ T ] ] *) - Definition value_PENDING (T : Ty.t) : Value.t := + Definition value_PENDING (T : Ty.t) : A.t := let Self : Ty.t := Self T in M.run - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))). + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::task::poll::Poll::Pending" [] |) + |))). Axiom AssociatedConstant_value_PENDING : forall (T : Ty.t), @@ -249,14 +264,17 @@ Module async_iter. (* Ty.apply (Ty.path "core::task::poll::Poll") [ Ty.apply (Ty.path "core::option::Option") [ T ] ] *) - Definition value_FINISHED (T : Ty.t) : Value.t := + Definition value_FINISHED (T : Ty.t) : A.t := let Self : Ty.t := Self T in M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |) |))). Axiom AssociatedConstant_value_FINISHED : diff --git a/CoqOfRust/core/async_iter/from_iter.v b/CoqOfRust/core/async_iter/from_iter.v index 5cdac41bd..b1e8129c5 100644 --- a/CoqOfRust/core/async_iter/from_iter.v +++ b/CoqOfRust/core/async_iter/from_iter.v @@ -15,27 +15,30 @@ Module async_iter. Ty.apply (Ty.path "core::async_iter::from_iter::FromIter") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::async_iter::from_iter::FromIter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::async_iter::from_iter::FromIter", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::async_iter::from_iter::FromIter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::async_iter::from_iter::FromIter", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -53,7 +56,7 @@ Module async_iter. Ty.apply (Ty.path "core::async_iter::from_iter::FromIter") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -68,17 +71,18 @@ Module async_iter. |), [ M.read (| f |); - M.read (| Value.String "FromIter" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "FromIter" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::async_iter::from_iter::FromIter", "iter" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -111,26 +115,29 @@ Module async_iter. FromIter { iter: iter.into_iter() } } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "core::async_iter::from_iter::FromIter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - I, - [], - "into_iter", - [] - |), - [ M.read (| iter |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::async_iter::from_iter::FromIter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + I, + [], + "into_iter", + [] + |), + [ M.read (| iter |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -146,48 +153,55 @@ Module async_iter. Poll::Ready(self.iter.next()) } *) - Definition poll_next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll_next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; _cx ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _cx := M.alloc (| _cx |) in - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - I, - [], - "next", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path "core::pin::Pin") - [ - Ty.apply - (Ty.path "&mut") - [ Ty.apply (Ty.path "core::async_iter::from_iter::FromIter") [ I ] ] - ], - [], - "deref_mut", - [] - |), - [ self ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + I, + [], + "next", + [] |), - "core::async_iter::from_iter::FromIter", - "iter" - |) - ] - |) - ])) + [ + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path "core::pin::Pin") + [ + Ty.apply + (Ty.path "&mut") + [ + Ty.apply + (Ty.path "core::async_iter::from_iter::FromIter") + [ I ] + ] + ], + [], + "deref_mut", + [] + |), + [ self ] + |), + "core::async_iter::from_iter::FromIter", + "iter" + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -196,7 +210,7 @@ Module async_iter. self.iter.size_hint() } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/bool.v b/CoqOfRust/core/bool.v index 9a4b595b3..06dbe4f36 100644 --- a/CoqOfRust/core/bool.v +++ b/CoqOfRust/core/bool.v @@ -10,7 +10,7 @@ Module bool. if self { Some(t) } else { None } } *) - Definition then_some (τ : list Ty.t) (α : list Value.t) : M := + Definition then_some (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self; t ] => ltac:(M.monadic @@ -18,17 +18,24 @@ Module bool. let t := M.alloc (| t |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use self in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| t |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| t |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -42,7 +49,7 @@ Module bool. if self { Some(f()) } else { None } } *) - Definition then_ (τ : list Ty.t) (α : list Value.t) : M := + Definition then_ (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ self; f ] => ltac:(M.monadic @@ -50,30 +57,36 @@ Module bool. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use self in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [] ], + "call_once", + [] + |), + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) diff --git a/CoqOfRust/core/borrow.v b/CoqOfRust/core/borrow.v index 36cacd0c0..77f2a62a2 100644 --- a/CoqOfRust/core/borrow.v +++ b/CoqOfRust/core/borrow.v @@ -16,7 +16,7 @@ Module borrow. self } *) - Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -43,7 +43,7 @@ Module borrow. self } *) - Definition borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -70,7 +70,7 @@ Module borrow. &**self } *) - Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -97,7 +97,7 @@ Module borrow. &**self } *) - Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -124,7 +124,7 @@ Module borrow. &mut **self } *) - Definition borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/cell.v b/CoqOfRust/core/cell.v index 4a9c01fb0..e3c7309fa 100644 --- a/CoqOfRust/core/cell.v +++ b/CoqOfRust/core/cell.v @@ -41,7 +41,7 @@ Module cell. Cell::new(self.get()) } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -80,7 +80,7 @@ Module cell. Cell::new(Default::default()) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -114,7 +114,7 @@ Module cell. self.get() == other.get() } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -174,7 +174,7 @@ Module cell. self.get().partial_cmp(&other.get()) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -214,7 +214,7 @@ Module cell. self.get() < other.get() } *) - Definition lt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -254,7 +254,7 @@ Module cell. self.get() <= other.get() } *) - Definition le (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -294,7 +294,7 @@ Module cell. self.get() > other.get() } *) - Definition gt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -334,7 +334,7 @@ Module cell. self.get() >= other.get() } *) - Definition ge (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -393,7 +393,7 @@ Module cell. self.get().cmp(&other.get()) } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -445,7 +445,7 @@ Module cell. Cell::new(t) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -475,25 +475,28 @@ Module cell. Cell { value: UnsafeCell::new(value) } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "core::cell::Cell" - [ - ("value", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ T ], - "new", - [] - |), - [ M.read (| value |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::cell::Cell" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ T ], + "new", + [] + |), + [ M.read (| value |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -504,7 +507,7 @@ Module cell. self.replace(val); } *) - Definition set (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition set (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val ] => @@ -523,7 +526,7 @@ Module cell. [ M.read (| self |); M.read (| val |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -550,7 +553,7 @@ Module cell. } } *) - Definition swap (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -562,7 +565,7 @@ Module cell. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -580,22 +583,24 @@ Module cell. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::intrinsics::is_nonoverlapping", [ Ty.apply (Ty.path "core::cell::Cell") [ T ] ] @@ -603,9 +608,10 @@ Module cell. [ M.read (| self |); M.read (| other |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -622,23 +628,29 @@ Module cell. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "`Cell::swap` on overlapping non-identical `Cell`s" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "`Cell::swap` on overlapping non-identical `Cell`s" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -677,7 +689,7 @@ Module cell. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -694,7 +706,7 @@ Module cell. mem::replace(unsafe { &mut *self.value.get() }, val) } *) - Definition replace (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val ] => @@ -733,7 +745,7 @@ Module cell. self.value.into_inner() } *) - Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -764,7 +776,7 @@ Module cell. unsafe { *self.value.get() } } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -802,7 +814,7 @@ Module cell. new } *) - Definition update (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition update (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -831,7 +843,7 @@ Module cell. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| old |) ] ] + [ M.read (| f |); M.of_value (| Value.Tuple [ A.to_value (M.read (| old |)) ] |) ] |) |) in let _ := @@ -858,7 +870,7 @@ Module cell. self.value.get() } *) - Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -890,7 +902,7 @@ Module cell. self.value.get_mut() } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -923,13 +935,13 @@ Module cell. unsafe { &*(t as *mut T as *const Cell) } } *) - Definition from_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => ltac:(M.monadic (let t := M.alloc (| t |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| t |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| t |) |)) |) |))) | _, _ => M.impossible end. @@ -941,7 +953,7 @@ Module cell. self.replace(Default::default()) } *) - Definition take (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1006,13 +1018,13 @@ Module cell. unsafe { &*(self as *const Cell<[T]> as *const [Cell]) } } *) - Definition as_slice_of_cells (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice_of_cells (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |))) | _, _ => M.impossible end. @@ -1031,13 +1043,13 @@ Module cell. unsafe { &*(self as *const Cell<[T; N]> as *const [Cell; N]) } } *) - Definition as_array_of_cells (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_array_of_cells (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |))) | _, _ => M.impossible end. @@ -1077,7 +1089,7 @@ Module cell. builder.finish() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1092,7 +1104,7 @@ Module cell. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "BorrowError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "BorrowError" |) |) ] |) |) in M.alloc (| @@ -1125,7 +1137,7 @@ Module cell. Display::fmt("already mutably borrowed", f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1133,7 +1145,8 @@ Module cell. let f := M.alloc (| f |) in M.call_closure (| M.get_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |), - [ M.read (| Value.String "already mutably borrowed" |); M.read (| f |) ] + [ M.read (| M.of_value (| Value.String "already mutably borrowed" |) |); M.read (| f |) + ] |))) | _, _ => M.impossible end. @@ -1166,7 +1179,7 @@ Module cell. builder.finish() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1181,7 +1194,7 @@ Module cell. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "BorrowMutError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "BorrowMutError" |) |) ] |) |) in M.alloc (| @@ -1214,7 +1227,7 @@ Module cell. Display::fmt("already borrowed", f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1222,7 +1235,7 @@ Module cell. let f := M.alloc (| f |) in M.call_closure (| M.get_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |), - [ M.read (| Value.String "already borrowed" |); M.read (| f |) ] + [ M.read (| M.of_value (| Value.String "already borrowed" |) |); M.read (| f |) ] |))) | _, _ => M.impossible end. @@ -1240,7 +1253,7 @@ Module cell. panic!("already borrowed: {:?}", err) } *) - Definition panic_already_borrowed (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_already_borrowed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ err ] => ltac:(M.monadic @@ -1252,23 +1265,36 @@ Module cell. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "already borrowed: " |) ] |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "already borrowed: " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "core::cell::BorrowMutError" ] - |), - [ err ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "core::cell::BorrowMutError" ] + |), + [ err ] + |)) + ] + |) + |) + |) ] |) ] @@ -1281,7 +1307,7 @@ Module cell. panic!("already mutably borrowed: {:?}", err) } *) - Definition panic_already_mutably_borrowed (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_already_mutably_borrowed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ err ] => ltac:(M.monadic @@ -1293,25 +1319,38 @@ Module cell. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "already mutably borrowed: " |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "already mutably borrowed: " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "core::cell::BorrowError" ] - |), - [ err ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "core::cell::BorrowError" ] + |), + [ err ] + |)) + ] + |) + |) + |) ] |) ] @@ -1321,20 +1360,20 @@ Module cell. Axiom BorrowFlag : (Ty.path "core::cell::BorrowFlag") = (Ty.path "isize"). - Definition value_UNUSED : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Isize 0 |))). + Definition value_UNUSED : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). (* fn is_writing(x: BorrowFlag) -> bool { x < UNUSED } *) - Definition is_writing (τ : list Ty.t) (α : list Value.t) : M := + Definition is_writing (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - BinOp.Pure.lt (M.read (| x |)) (M.read (| M.get_constant (| "core::cell::UNUSED" |) |)))) + BinOp.Pure.lt (| M.read (| x |), M.read (| M.get_constant (| "core::cell::UNUSED" |) |) |))) | _, _ => M.impossible end. @@ -1343,12 +1382,12 @@ Module cell. x > UNUSED } *) - Definition is_reading (τ : list Ty.t) (α : list Value.t) : M := + Definition is_reading (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - BinOp.Pure.gt (M.read (| x |)) (M.read (| M.get_constant (| "core::cell::UNUSED" |) |)))) + BinOp.Pure.gt (| M.read (| x |), M.read (| M.get_constant (| "core::cell::UNUSED" |) |) |))) | _, _ => M.impossible end. @@ -1365,34 +1404,38 @@ Module cell. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "core::cell::RefCell" - [ - ("value", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ T ], - "new", - [] - |), - [ M.read (| value |) ] - |)); - ("borrow", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "isize" ], - "new", - [] - |), - [ M.read (| M.get_constant (| "core::cell::UNUSED" |) |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::cell::RefCell" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ T ], + "new", + [] + |), + [ M.read (| value |) ] + |))); + ("borrow", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::Cell") [ Ty.path "isize" ], + "new", + [] + |), + [ M.read (| M.get_constant (| "core::cell::UNUSED" |) |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1405,7 +1448,7 @@ Module cell. self.value.into_inner() } *) - Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1435,7 +1478,7 @@ Module cell. mem::replace(&mut *self.borrow_mut(), t) } *) - Definition replace (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; t ] => @@ -1483,7 +1526,7 @@ Module cell. mem::replace(mut_borrow, replacement) } *) - Definition replace_with (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition replace_with (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -1525,7 +1568,10 @@ Module cell. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| mut_borrow |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| mut_borrow |)) ] |) + ] |) |) in M.alloc (| @@ -1547,7 +1593,7 @@ Module cell. mem::swap(&mut *self.borrow_mut(), &mut *other.borrow_mut()) } *) - Definition swap (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1615,7 +1661,7 @@ Module cell. } } *) - Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1689,7 +1735,7 @@ Module cell. } } *) - Definition try_borrow (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_borrow (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1746,20 +1792,33 @@ Module cell. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructRecord - "core::cell::Ref" - [ ("value", M.read (| value |)); ("borrow", M.read (| b |)) ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::Ref" + [ + ("value", A.to_value (M.read (| value |))); + ("borrow", A.to_value (M.read (| b |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::cell::BorrowError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cell::BorrowError" [] |)) + ] + |) |))) ] |) @@ -1779,7 +1838,7 @@ Module cell. } } *) - Definition borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1849,7 +1908,7 @@ Module cell. } } *) - Definition try_borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_borrow_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1906,24 +1965,38 @@ Module cell. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructRecord - "core::cell::RefMut" - [ - ("value", M.read (| value |)); - ("borrow", M.read (| b |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::RefMut" + [ + ("value", A.to_value (M.read (| value |))); + ("borrow", A.to_value (M.read (| b |))); + ("marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::cell::BorrowMutError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cell::BorrowMutError" [] |)) + ] + |) |))) ] |) @@ -1940,7 +2013,7 @@ Module cell. self.value.get() } *) - Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1972,7 +2045,7 @@ Module cell. self.value.get_mut() } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2005,7 +2078,7 @@ Module cell. self.get_mut() } *) - Definition undo_leak (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition undo_leak (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2067,7 +2140,7 @@ Module cell. } } *) - Definition try_borrow_unguarded (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_borrow_unguarded (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2075,15 +2148,15 @@ Module cell. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::cell::is_writing", [] |), [ M.call_closure (| @@ -2101,35 +2174,44 @@ Module cell. ] |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ T ], - "get", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::cell::RefCell", - "value" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ T ], + "get", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::cell::RefCell", + "value" + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::cell::BorrowError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cell::BorrowError" [] |)) + ] + |) |))) ] |) @@ -2145,7 +2227,7 @@ Module cell. self.replace(Default::default()) } *) - Definition take (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2207,7 +2289,7 @@ Module cell. RefCell::new(self.borrow().clone()) } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2256,7 +2338,7 @@ Module cell. self.get_mut().clone_from(&other.borrow()) } *) - Definition clone_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2321,7 +2403,7 @@ Module cell. RefCell::new(Default::default()) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -2359,7 +2441,7 @@ Module cell. *self.borrow() == *other.borrow() } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2441,7 +2523,7 @@ Module cell. self.borrow().partial_cmp(&*other.borrow()) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2503,7 +2585,7 @@ Module cell. *self.borrow() < *other.borrow() } *) - Definition lt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2565,7 +2647,7 @@ Module cell. *self.borrow() <= *other.borrow() } *) - Definition le (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2627,7 +2709,7 @@ Module cell. *self.borrow() > *other.borrow() } *) - Definition gt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2689,7 +2771,7 @@ Module cell. *self.borrow() >= *other.borrow() } *) - Definition ge (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2770,7 +2852,7 @@ Module cell. self.borrow().cmp(&*other.borrow()) } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2844,7 +2926,7 @@ Module cell. RefCell::new(t) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -2919,7 +3001,7 @@ Module cell. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ borrow ] => ltac:(M.monadic @@ -2938,26 +3020,29 @@ Module cell. |), [ M.read (| borrow |) ] |); - Value.Integer Integer.Isize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::cell::is_reading", [] |), [ M.read (| b |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -2972,13 +3057,18 @@ Module cell. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "core::cell::BorrowRef" - [ ("borrow", M.read (| borrow |)) ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::BorrowRef" + [ ("borrow", A.to_value (M.read (| borrow |))) ] + |)) + ] + |) |))) ] |) @@ -2999,7 +3089,7 @@ Module cell. self.borrow.set(borrow - 1); } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3026,26 +3116,27 @@ Module cell. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::cell::is_reading", [] |), [ M.read (| borrow |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3058,17 +3149,20 @@ Module cell. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: is_reading(borrow)" + M.of_value (| + Value.String "assertion failed: is_reading(borrow)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -3087,11 +3181,15 @@ Module cell. "borrow" |) |); - BinOp.Panic.sub (| M.read (| borrow |), Value.Integer Integer.Isize 1 |) + BinOp.Panic.sub (| + Integer.Isize, + M.read (| borrow |), + M.of_value (| Value.Integer 1 |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3120,7 +3218,7 @@ Module cell. BorrowRef { borrow: self.borrow } } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3147,26 +3245,27 @@ Module cell. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::cell::is_reading", [] |), [ M.read (| borrow |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3179,32 +3278,37 @@ Module cell. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: is_reading(borrow)" + M.of_value (| + Value.String "assertion failed: is_reading(borrow)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| borrow |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| borrow |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3213,13 +3317,15 @@ Module cell. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: borrow != BorrowFlag::MAX" + M.of_value (| + Value.String "assertion failed: borrow != BorrowFlag::MAX" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -3238,23 +3344,30 @@ Module cell. "borrow" |) |); - BinOp.Panic.add (| M.read (| borrow |), Value.Integer Integer.Isize 1 |) + BinOp.Panic.add (| + Integer.Isize, + M.read (| borrow |), + M.of_value (| Value.Integer 1 |) + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::cell::BorrowRef" - [ - ("borrow", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::cell::BorrowRef", - "borrow" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::cell::BorrowRef" + [ + ("borrow", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::cell::BorrowRef", + "borrow" + |) + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3291,7 +3404,7 @@ Module cell. unsafe { self.value.as_ref() } } *) - Definition deref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3332,41 +3445,45 @@ Module cell. Ref { value: orig.value, borrow: orig.borrow.clone() } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ orig ] => ltac:(M.monadic (let orig := M.alloc (| orig |) in - Value.StructRecord - "core::cell::Ref" - [ - ("value", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| orig |), - "core::cell::Ref", - "value" - |) - |)); - ("borrow", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::cell::BorrowRef", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| orig |), - "core::cell::Ref", - "borrow" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::cell::Ref" + [ + ("value", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| orig |), + "core::cell::Ref", + "value" + |) + |))); + ("borrow", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::cell::BorrowRef", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| orig |), + "core::cell::Ref", + "borrow" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3382,58 +3499,65 @@ Module cell. Ref { value: NonNull::from(f(&*orig)), borrow: orig.borrow } } *) - Definition map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ orig; f ] => ltac:(M.monadic (let orig := M.alloc (| orig |) in let f := M.alloc (| f |) in - Value.StructRecord - "core::cell::Ref" - [ - ("value", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], - [ Ty.apply (Ty.path "&") [ U ] ], - "from", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "core::cell::Ref" + [ + ("value", + A.to_value + (M.call_closure (| M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ Ty.apply (Ty.path "&") [ T ] ] ], - "call_once", + "core::convert::From", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], + [ Ty.apply (Ty.path "&") [ U ] ], + "from", [] |), [ - M.read (| f |); - Value.Tuple + M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ Ty.apply (Ty.path "&") [ T ] ] ], + "call_once", + [] + |), [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply (Ty.path "core::cell::Ref") [ T ], - [], - "deref", - [] - |), - [ orig ] + M.read (| f |); + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply (Ty.path "core::cell::Ref") [ T ], + [], + "deref", + [] + |), + [ orig ] + |)) + ] |) ] + |) ] - |) - ] - |)); - ("borrow", - M.read (| - M.SubPointer.get_struct_record_field (| orig, "core::cell::Ref", "borrow" |) - |)) - ])) + |))); + ("borrow", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| orig, "core::cell::Ref", "borrow" |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -3450,7 +3574,7 @@ Module cell. } } *) - Definition filter_map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition filter_map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ orig; f ] => @@ -3470,19 +3594,22 @@ Module cell. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply (Ty.path "core::cell::Ref") [ T ], - [], - "deref", - [] - |), - [ orig ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply (Ty.path "core::cell::Ref") [ T ], + [], + "deref", + [] + |), + [ orig ] + |)) + ] + |) ] |) |), @@ -3497,38 +3624,49 @@ Module cell. |) in let value := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructRecord - "core::cell::Ref" - [ - ("value", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], - [ Ty.apply (Ty.path "&") [ U ] ], - "from", - [] - |), - [ M.read (| value |) ] - |)); - ("borrow", - M.read (| - M.SubPointer.get_struct_record_field (| - orig, - "core::cell::Ref", - "borrow" - |) - |)) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::Ref" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], + [ Ty.apply (Ty.path "&") [ U ] ], + "from", + [] + |), + [ M.read (| value |) ] + |))); + ("borrow", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + orig, + "core::cell::Ref", + "borrow" + |) + |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| orig |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| orig |)) ] + |) |))) ] |) @@ -3553,7 +3691,7 @@ Module cell. ) } *) - Definition map_split (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_split (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; V; F ], [ orig; f ] => @@ -3573,19 +3711,22 @@ Module cell. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply (Ty.path "core::cell::Ref") [ T ], - [], - "deref", - [] - |), - [ orig ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply (Ty.path "core::cell::Ref") [ T ], + [], + "deref", + [] + |), + [ orig ] + |)) + ] + |) ] |) |), @@ -3616,48 +3757,59 @@ Module cell. |) |) in M.alloc (| - Value.Tuple - [ - Value.StructRecord - "core::cell::Ref" - [ - ("value", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], - [ Ty.apply (Ty.path "&") [ U ] ], - "from", - [] - |), - [ M.read (| a |) ] - |)); - ("borrow", M.read (| borrow |)) - ]; - Value.StructRecord - "core::cell::Ref" - [ - ("value", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ V ], - [ Ty.apply (Ty.path "&") [ V ] ], - "from", - [] - |), - [ M.read (| b |) ] - |)); - ("borrow", - M.read (| - M.SubPointer.get_struct_record_field (| - orig, - "core::cell::Ref", - "borrow" - |) - |)) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::Ref" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], + [ Ty.apply (Ty.path "&") [ U ] ], + "from", + [] + |), + [ M.read (| a |) ] + |))); + ("borrow", A.to_value (M.read (| borrow |))) + ] + |)); + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::Ref" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ V ], + [ Ty.apply (Ty.path "&") [ V ] ], + "from", + [] + |), + [ M.read (| b |) ] + |))); + ("borrow", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + orig, + "core::cell::Ref", + "borrow" + |) + |))) + ] + |)) + ] + |) |))) ] |) @@ -3680,7 +3832,7 @@ Module cell. unsafe { orig.value.as_ref() } } *) - Definition leak (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition leak (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ orig ] => @@ -3737,7 +3889,7 @@ Module cell. ( **self).fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -3784,7 +3936,7 @@ Module cell. RefMut { value, borrow: orig.borrow, marker: PhantomData } } *) - Definition map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ orig; f ] => @@ -3813,39 +3965,47 @@ Module cell. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply (Ty.path "core::cell::RefMut") [ T ], - [], - "deref_mut", - [] - |), - [ orig ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply (Ty.path "core::cell::RefMut") [ T ], + [], + "deref_mut", + [] + |), + [ orig ] + |)) + ] + |) ] |) ] |) |) in M.alloc (| - Value.StructRecord - "core::cell::RefMut" - [ - ("value", M.read (| value |)); - ("borrow", - M.read (| - M.SubPointer.get_struct_record_field (| - orig, - "core::cell::RefMut", - "borrow" - |) - |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "core::cell::RefMut" + [ + ("value", A.to_value (M.read (| value |))); + ("borrow", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + orig, + "core::cell::RefMut", + "borrow" + |) + |))); + ("marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3870,7 +4030,7 @@ Module cell. } } *) - Definition filter_map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition filter_map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ orig; f ] => @@ -3890,19 +4050,22 @@ Module cell. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply (Ty.path "core::cell::RefMut") [ T ], - [], - "deref_mut", - [] - |), - [ orig ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply (Ty.path "core::cell::RefMut") [ T ], + [], + "deref_mut", + [] + |), + [ orig ] + |)) + ] + |) ] |) |), @@ -3917,39 +4080,54 @@ Module cell. |) in let value := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructRecord - "core::cell::RefMut" - [ - ("value", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], - [ Ty.apply (Ty.path "&mut") [ U ] ], - "from", - [] - |), - [ M.read (| value |) ] - |)); - ("borrow", - M.read (| - M.SubPointer.get_struct_record_field (| - orig, - "core::cell::RefMut", - "borrow" - |) - |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::RefMut" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], + [ Ty.apply (Ty.path "&mut") [ U ] ], + "from", + [] + |), + [ M.read (| value |) ] + |))); + ("borrow", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + orig, + "core::cell::RefMut", + "borrow" + |) + |))); + ("marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| orig |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| orig |)) ] + |) |))) ] |) @@ -3977,7 +4155,7 @@ Module cell. ) } *) - Definition map_split (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_split (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; V; F ], [ orig; f ] => @@ -4005,19 +4183,22 @@ Module cell. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply (Ty.path "core::cell::RefMut") [ T ], - [], - "deref_mut", - [] - |), - [ orig ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply (Ty.path "core::cell::RefMut") [ T ], + [], + "deref_mut", + [] + |), + [ orig ] + |)) + ] + |) ] |) |), @@ -4029,50 +4210,69 @@ Module cell. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - Value.StructRecord - "core::cell::RefMut" - [ - ("value", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], - [ Ty.apply (Ty.path "&mut") [ U ] ], - "from", - [] - |), - [ M.read (| a |) ] - |)); - ("borrow", M.read (| borrow |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ]; - Value.StructRecord - "core::cell::RefMut" - [ - ("value", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ V ], - [ Ty.apply (Ty.path "&mut") [ V ] ], - "from", - [] - |), - [ M.read (| b |) ] - |)); - ("borrow", - M.read (| - M.SubPointer.get_struct_record_field (| - orig, - "core::cell::RefMut", - "borrow" - |) - |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::RefMut" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ U ], + [ Ty.apply (Ty.path "&mut") [ U ] ], + "from", + [] + |), + [ M.read (| a |) ] + |))); + ("borrow", A.to_value (M.read (| borrow |))); + ("marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)); + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::RefMut" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ V ], + [ Ty.apply (Ty.path "&mut") [ V ] ], + "from", + [] + |), + [ M.read (| b |) ] + |))); + ("borrow", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + orig, + "core::cell::RefMut", + "borrow" + |) + |))); + ("marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)) + ] + |) |))) ] |) @@ -4096,7 +4296,7 @@ Module cell. unsafe { orig.value.as_mut() } } *) - Definition leak (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition leak (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ orig ] => @@ -4158,7 +4358,7 @@ Module cell. self.borrow.set(borrow + 1); } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4185,26 +4385,27 @@ Module cell. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::cell::is_writing", [] |), [ M.read (| borrow |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4217,17 +4418,20 @@ Module cell. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: is_writing(borrow)" + M.of_value (| + Value.String "assertion failed: is_writing(borrow)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -4246,11 +4450,15 @@ Module cell. "borrow" |) |); - BinOp.Panic.add (| M.read (| borrow |), Value.Integer Integer.Isize 1 |) + BinOp.Panic.add (| + Integer.Isize, + M.read (| borrow |), + M.of_value (| Value.Integer 1 |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4281,7 +4489,7 @@ Module cell. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ borrow ] => ltac:(M.monadic @@ -4301,11 +4509,7 @@ Module cell. [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Isize 0 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in let _ := M.alloc (| M.call_closure (| @@ -4317,23 +4521,32 @@ Module cell. [ M.read (| borrow |); BinOp.Panic.sub (| + Integer.Isize, M.read (| M.get_constant (| "core::cell::UNUSED" |) |), - Value.Integer Integer.Isize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "core::cell::BorrowRefMut" - [ ("borrow", M.read (| borrow |)) ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::BorrowRefMut" + [ ("borrow", A.to_value (M.read (| borrow |))) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4352,7 +4565,7 @@ Module cell. BorrowRefMut { borrow: self.borrow } } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4379,26 +4592,27 @@ Module cell. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::cell::is_writing", [] |), [ M.read (| borrow |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4411,32 +4625,37 @@ Module cell. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: is_writing(borrow)" + M.of_value (| + Value.String "assertion failed: is_writing(borrow)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| borrow |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| borrow |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -4445,13 +4664,15 @@ Module cell. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: borrow != BorrowFlag::MIN" + M.of_value (| + Value.String "assertion failed: borrow != BorrowFlag::MIN" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -4470,23 +4691,30 @@ Module cell. "borrow" |) |); - BinOp.Panic.sub (| M.read (| borrow |), Value.Integer Integer.Isize 1 |) + BinOp.Panic.sub (| + Integer.Isize, + M.read (| borrow |), + M.of_value (| Value.Integer 1 |) + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::cell::BorrowRefMut" - [ - ("borrow", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::cell::BorrowRefMut", - "borrow" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::cell::BorrowRefMut" + [ + ("borrow", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::cell::BorrowRefMut", + "borrow" + |) + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -4520,7 +4748,7 @@ Module cell. unsafe { self.value.as_ref() } } *) - Definition deref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4562,7 +4790,7 @@ Module cell. unsafe { self.value.as_mut() } } *) - Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4614,7 +4842,7 @@ Module cell. ( **self).fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -4676,13 +4904,17 @@ Module cell. UnsafeCell { value } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord "core::cell::UnsafeCell" [ ("value", M.read (| value |)) ])) + M.of_value (| + Value.StructRecord + "core::cell::UnsafeCell" + [ ("value", A.to_value (M.read (| value |))) ] + |))) | _, _ => M.impossible end. @@ -4693,7 +4925,7 @@ Module cell. self.value } *) - Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4714,13 +4946,13 @@ Module cell. unsafe { &mut *(value as *mut T as *mut UnsafeCell) } } *) - Definition from_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| value |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| value |) |)) |) |))) | _, _ => M.impossible end. @@ -4736,13 +4968,13 @@ Module cell. self as *const UnsafeCell as *const T as *mut T } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |))))) + M.rust_cast (| M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |) |))) | _, _ => M.impossible end. @@ -4753,7 +4985,7 @@ Module cell. &mut self.value } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4779,13 +5011,13 @@ Module cell. this as *const T as *mut T } *) - Definition raw_get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition raw_get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.rust_cast (M.read (| this |))))) + M.rust_cast (| M.rust_cast (| M.read (| this |) |) |))) | _, _ => M.impossible end. @@ -4803,7 +5035,7 @@ Module cell. UnsafeCell::new(Default::default()) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -4841,7 +5073,7 @@ Module cell. UnsafeCell::new(t) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -4918,18 +5150,25 @@ Module cell. Self { value: UnsafeCell { value } } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "core::cell::SyncUnsafeCell" - [ - ("value", - Value.StructRecord "core::cell::UnsafeCell" [ ("value", M.read (| value |)) ]) - ])) + M.of_value (| + Value.StructRecord + "core::cell::SyncUnsafeCell" + [ + ("value", + A.to_value + (M.of_value (| + Value.StructRecord + "core::cell::UnsafeCell" + [ ("value", A.to_value (M.read (| value |))) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4940,7 +5179,7 @@ Module cell. self.value.into_inner() } *) - Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4973,7 +5212,7 @@ Module cell. self.value.get() } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -5003,7 +5242,7 @@ Module cell. self.value.get_mut() } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -5038,13 +5277,13 @@ Module cell. this as *const T as *mut T } *) - Definition raw_get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition raw_get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.rust_cast (M.read (| this |))))) + M.rust_cast (| M.rust_cast (| M.read (| this |) |) |))) | _, _ => M.impossible end. @@ -5062,7 +5301,7 @@ Module cell. SyncUnsafeCell::new(Default::default()) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -5100,7 +5339,7 @@ Module cell. SyncUnsafeCell::new(t) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -5165,7 +5404,7 @@ Module cell. let _: RefCell<&dyn Send> = d; } *) - Definition assert_coerce_unsized (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_coerce_unsized (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; c; d ] => ltac:(M.monadic @@ -5175,23 +5414,29 @@ Module cell. let d := M.alloc (| d |) in M.read (| M.match_operator (| - M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| a |)) |), + M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| a |) |) |), [ fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| b |)) |), + M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| b |) |) |), [ fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| c |)) |), + M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| c |) |) |), [ fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| d |)) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.alloc (| + (* Unsize *) M.pointer_coercion (| M.read (| d |) |) + |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |))) diff --git a/CoqOfRust/core/cell/lazy.v b/CoqOfRust/core/cell/lazy.v index 801e97661..8e1827716 100644 --- a/CoqOfRust/core/cell/lazy.v +++ b/CoqOfRust/core/cell/lazy.v @@ -50,27 +50,36 @@ Module cell. LazyCell { state: UnsafeCell::new(State::Uninit(f)) } } *) - Definition new (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ f ] => ltac:(M.monadic (let f := M.alloc (| f |) in - Value.StructRecord - "core::cell::lazy::LazyCell" - [ - ("state", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::cell::UnsafeCell") - [ Ty.apply (Ty.path "core::cell::lazy::State") [ T; F ] ], - "new", - [] - |), - [ Value.StructTuple "core::cell::lazy::State::Uninit" [ M.read (| f |) ] ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::cell::lazy::LazyCell" + [ + ("state", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::UnsafeCell") + [ Ty.apply (Ty.path "core::cell::lazy::State") [ T; F ] ], + "new", + [] + |), + [ + M.of_value (| + Value.StructTuple + "core::cell::lazy::State::Uninit" + [ A.to_value (M.read (| f |)) ] + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -87,7 +96,7 @@ Module cell. } } *) - Definition into_inner (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ this ] => @@ -126,7 +135,11 @@ Module cell. |) in let data := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| data |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| data |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -138,7 +151,11 @@ Module cell. |) in let f := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| f |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| f |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -155,16 +172,22 @@ Module cell. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "LazyCell instance has previously been poisoned" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "LazyCell instance has previously been poisoned" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -197,7 +220,7 @@ Module cell. } } *) - Definition force (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition force (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ this ] => @@ -272,15 +295,22 @@ Module cell. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "LazyCell has previously been poisoned" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "LazyCell has previously been poisoned" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -327,7 +357,7 @@ Module cell. data } *) - Definition really_init (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition really_init (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ this ] => @@ -360,7 +390,10 @@ Module cell. "core::mem::replace", [ Ty.apply (Ty.path "core::cell::lazy::State") [ T; F ] ] |), - [ M.read (| state |); Value.StructTuple "core::cell::lazy::State::Poisoned" [] ] + [ + M.read (| state |); + M.of_value (| Value.StructTuple "core::cell::lazy::State::Poisoned" [] |) + ] |) |), [ @@ -383,7 +416,7 @@ Module cell. "call_once", [] |), - [ M.read (| f |); Value.Tuple [] ] + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] |) |) in let _ := @@ -413,9 +446,11 @@ Module cell. |) ] |); - Value.StructTuple - "core::cell::lazy::State::Init" - [ M.read (| data |) ] + M.of_value (| + Value.StructTuple + "core::cell::lazy::State::Init" + [ A.to_value (M.read (| data |)) ] + |) ] |) |) in @@ -476,7 +511,7 @@ Module cell. } } *) - Definition get (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self ] => @@ -516,11 +551,17 @@ Module cell. |) in let data := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| data |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| data |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -545,7 +586,7 @@ Module cell. LazyCell::force(self) } *) - Definition deref (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self ] => @@ -582,7 +623,7 @@ Module cell. LazyCell::new(T::default) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -595,8 +636,9 @@ Module cell. |), [ (* ReifyFnPointer *) - M.pointer_coercion - (M.get_trait_method (| "core::default::Default", T, [], "default", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |) + |) ] |))) | _, _ => M.impossible @@ -625,7 +667,7 @@ Module cell. d.finish() } *) - Definition fmt (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self; f ] => @@ -641,7 +683,7 @@ Module cell. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "LazyCell" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "LazyCell" |) |) ] |) |) in let _ := @@ -673,7 +715,7 @@ Module cell. "field", [] |), - [ d; (* Unsize *) M.pointer_coercion (M.read (| data |)) ] + [ d; (* Unsize *) M.pointer_coercion (| M.read (| data |) |) ] |) |))); fun γ => @@ -688,8 +730,8 @@ Module cell. [ d; (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Arguments", @@ -698,13 +740,23 @@ Module cell. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)) + ] + |) + |) + |) ] |) - |)) + |) + |) ] |) |))) diff --git a/CoqOfRust/core/cell/once.v b/CoqOfRust/core/cell/once.v index f46b6168a..b80c14665 100644 --- a/CoqOfRust/core/cell/once.v +++ b/CoqOfRust/core/cell/once.v @@ -24,26 +24,29 @@ Module cell. OnceCell { inner: UnsafeCell::new(None) } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::cell::once::OnceCell" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::cell::UnsafeCell") - [ Ty.apply (Ty.path "core::option::Option") [ T ] ], - "new", - [] - |), - [ Value.StructTuple "core::option::Option::None" [] ] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::cell::once::OnceCell" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::UnsafeCell") + [ Ty.apply (Ty.path "core::option::Option") [ T ] ], + "new", + [] + |), + [ M.of_value (| Value.StructTuple "core::option::Option::None" [] |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -57,7 +60,7 @@ Module cell. unsafe { &*self.inner.get() }.as_ref() } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -100,7 +103,7 @@ Module cell. self.inner.get_mut().as_mut() } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -146,7 +149,7 @@ Module cell. } } *) - Definition set (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition set (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; value ] => @@ -175,7 +178,11 @@ Module cell. 0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -189,7 +196,11 @@ Module cell. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let value := M.copy (| γ1_1 |) in M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| value |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| value |)) ] + |) |))) ] |) @@ -215,7 +226,7 @@ Module cell. Ok(slot.insert(value)) } *) - Definition try_insert (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_insert (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; value ] => @@ -227,7 +238,7 @@ Module cell. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -253,14 +264,25 @@ Module cell. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.Tuple [ M.read (| old |); M.read (| value |) ] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| old |)); + A.to_value (M.read (| value |)) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let slot := @@ -283,18 +305,21 @@ Module cell. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ T ], - "insert", - [] - |), - [ M.read (| slot |); M.read (| value |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ T ], + "insert", + [] + |), + [ M.read (| slot |); M.read (| value |) ] + |)) + ] + |) |) |))) |))) @@ -315,7 +340,7 @@ Module cell. } } *) - Definition get_or_init (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_or_init (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -338,8 +363,8 @@ Module cell. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -348,24 +373,28 @@ Module cell. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [] ] - |) - ])) + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [] ], + "call_once", + [] + |), + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -415,7 +444,7 @@ Module cell. if let Ok(val) = self.try_insert(val) { Ok(val) } else { panic!("reentrant init") } } *) - Definition get_or_try_init (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_or_try_init (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F; E ], [ self; f ] => @@ -427,7 +456,7 @@ Module cell. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -453,14 +482,16 @@ Module cell. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| val |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let val := @@ -535,7 +566,7 @@ Module cell. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -558,7 +589,11 @@ Module cell. |) in let val := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -575,10 +610,19 @@ Module cell. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "reentrant init" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "reentrant init" |) + |)) + ] + |) + |) + |) ] |) ] @@ -603,7 +647,7 @@ Module cell. self.inner.into_inner() } *) - Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -639,7 +683,7 @@ Module cell. mem::take(self).into_inner() } *) - Definition take (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -677,7 +721,7 @@ Module cell. Self::new() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -715,7 +759,7 @@ Module cell. d.finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -731,7 +775,7 @@ Module cell. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "OnceCell" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "OnceCell" |) |) ] |) |) in let _ := @@ -763,7 +807,7 @@ Module cell. "field", [] |), - [ d; (* Unsize *) M.pointer_coercion (M.read (| v |)) ] + [ d; (* Unsize *) M.pointer_coercion (| M.read (| v |) |) ] |) |))); fun γ => @@ -778,8 +822,8 @@ Module cell. [ d; (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Arguments", @@ -788,13 +832,23 @@ Module cell. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)) + ] + |) + |) + |) ] |) - |)) + |) + |) ] |) |))) @@ -838,7 +892,7 @@ Module cell. res } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -858,7 +912,7 @@ Module cell. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -906,7 +960,7 @@ Module cell. "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -921,7 +975,9 @@ Module cell. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "internal error: entered unreachable code" + M.of_value (| + Value.String "internal error: entered unreachable code" + |) |) ] |) @@ -929,7 +985,7 @@ Module cell. |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in res @@ -954,7 +1010,7 @@ Module cell. self.get() == other.get() } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1024,27 +1080,36 @@ Module cell. OnceCell { inner: UnsafeCell::new(Some(value)) } } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "core::cell::once::OnceCell" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::cell::UnsafeCell") - [ Ty.apply (Ty.path "core::option::Option") [ T ] ], - "new", - [] - |), - [ Value.StructTuple "core::option::Option::Some" [ M.read (| value |) ] ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::cell::once::OnceCell" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::UnsafeCell") + [ Ty.apply (Ty.path "core::option::Option") [ T ] ], + "new", + [] + |), + [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| value |)) ] + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/char/convert.v b/CoqOfRust/core/char/convert.v index 5bb31a598..08d31e4dc 100644 --- a/CoqOfRust/core/char/convert.v +++ b/CoqOfRust/core/char/convert.v @@ -12,7 +12,7 @@ Module char. } } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ i ] => ltac:(M.monadic @@ -32,13 +32,19 @@ Module char. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let c := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| c |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| c |)) ] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -51,18 +57,18 @@ Module char. if cfg!(debug_assertions) { char::from_u32(i).unwrap() } else { unsafe { transmute(i) } } } *) - Definition from_u32_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ i ] => ltac:(M.monadic (let i := M.alloc (| i |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| @@ -104,12 +110,12 @@ Module char. c as u32 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic (let c := M.alloc (| c |) in - M.rust_cast (M.read (| c |)))) + M.rust_cast (| M.read (| c |) |))) | _, _ => M.impossible end. @@ -131,12 +137,12 @@ Module char. c as u64 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic (let c := M.alloc (| c |) in - M.rust_cast (M.read (| c |)))) + M.rust_cast (| M.read (| c |) |))) | _, _ => M.impossible end. @@ -158,12 +164,12 @@ Module char. c as u128 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic (let c := M.alloc (| c |) in - M.rust_cast (M.read (| c |)))) + M.rust_cast (| M.read (| c |) |))) | _, _ => M.impossible end. @@ -186,7 +192,7 @@ Module char. u8::try_from(u32::from(c)).map_err(|_| TryFromCharError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -226,8 +232,8 @@ Module char. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -236,13 +242,16 @@ Module char. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "core::char::TryFromCharError" - [ Value.Tuple [] ])) + (M.of_value (| + Value.StructTuple + "core::char::TryFromCharError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -268,7 +277,7 @@ Module char. u16::try_from(u32::from(c)).map_err(|_| TryFromCharError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -308,8 +317,8 @@ Module char. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -318,13 +327,16 @@ Module char. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "core::char::TryFromCharError" - [ Value.Tuple [] ])) + (M.of_value (| + Value.StructTuple + "core::char::TryFromCharError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -347,12 +359,12 @@ Module char. i as char } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ i ] => ltac:(M.monadic (let i := M.alloc (| i |) in - M.rust_cast (M.read (| i |)))) + M.rust_cast (| M.read (| i |) |))) | _, _ => M.impossible end. @@ -375,32 +387,35 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::ParseCharError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::char::convert::ParseCharError" - [ - ("kind", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::char::convert::CharErrorKind", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::char::convert::ParseCharError", - "kind" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::char::convert::ParseCharError" + [ + ("kind", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::char::convert::CharErrorKind", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::char::convert::ParseCharError", + "kind" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -416,7 +431,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::ParseCharError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -430,17 +445,18 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "ParseCharError" |); - M.read (| Value.String "kind" |); + M.read (| M.of_value (| Value.String "ParseCharError" |) |); + M.read (| M.of_value (| Value.String "kind" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::char::convert::ParseCharError", "kind" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -469,7 +485,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::ParseCharError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -522,15 +538,15 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::ParseCharError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -580,7 +596,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::CharErrorKind". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -601,7 +617,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::CharErrorKind". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -618,11 +634,11 @@ Module char. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "EmptyString" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "EmptyString" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "TooManyChars" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "TooManyChars" |) |) |))) ] |) |) @@ -654,7 +670,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::CharErrorKind". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -681,7 +697,7 @@ Module char. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -709,12 +725,12 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::CharErrorKind". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -738,7 +754,7 @@ Module char. } } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -754,11 +770,15 @@ Module char. fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "cannot parse char from empty string" |) + M.read (| + M.of_value (| Value.String "cannot parse char from empty string" |) + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "too many characters in string" |) |))) + (M.alloc (| + M.read (| M.of_value (| Value.String "too many characters in string" |) |) + |))) ] |) |))) @@ -782,7 +802,7 @@ Module char. self.description().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -831,7 +851,7 @@ Module char. } } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -846,29 +866,33 @@ Module char. |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.path "core::str::iter::Chars", - [], - "next", - [] - |), - [ chars ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.path "core::str::iter::Chars", - [], - "next", - [] - |), - [ chars ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.path "core::str::iter::Chars", + [], + "next", + [] + |), + [ chars ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.path "core::str::iter::Chars", + [], + "next", + [] + |), + [ chars ] + |)) + ] + |) |), [ fun γ => @@ -876,18 +900,26 @@ Module char. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::char::convert::ParseCharError" - [ - ("kind", - Value.StructTuple - "core::char::convert::CharErrorKind::EmptyString" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::char::convert::ParseCharError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::char::convert::CharErrorKind::EmptyString" + [] + |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -901,23 +933,35 @@ Module char. |) in let c := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| c |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| c |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::char::convert::ParseCharError" - [ - ("kind", - Value.StructTuple - "core::char::convert::CharErrorKind::TooManyChars" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::char::convert::ParseCharError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::char::convert::CharErrorKind::TooManyChars" + [] + |))) + ] + |)) + ] + |) |))) ] |) @@ -957,59 +1001,70 @@ Module char. } } *) - Definition char_try_from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition char_try_from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ i ] => ltac:(M.monadic (let i := M.alloc (| i |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.path "u32", "wrapping_sub", [] |), [ - BinOp.Pure.bit_xor - (M.read (| i |)) - (Value.Integer Integer.U32 55296); - Value.Integer Integer.U32 2048 + BinOp.Pure.bit_xor (| + M.read (| i |), + M.of_value (| Value.Integer 55296 |) + |); + M.of_value (| Value.Integer 2048 |) ] - |)) - (BinOp.Panic.sub (| - Value.Integer Integer.U32 1114112, - Value.Integer Integer.U32 2048 - |)) + |), + BinOp.Panic.sub (| + Integer.U32, + M.of_value (| Value.Integer 1114112 |), + M.of_value (| Value.Integer 2048 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::char::convert::CharTryFromError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::char::convert::CharTryFromError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::transmute", - [ Ty.path "u32"; Ty.path "char" ] - |), - [ M.read (| i |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::transmute", + [ Ty.path "u32"; Ty.path "char" ] + |), + [ M.read (| i |) ] + |)) + ] + |) |))) ] |) @@ -1028,7 +1083,7 @@ Module char. char_try_from_u32(i) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ i ] => ltac:(M.monadic @@ -1071,14 +1126,14 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::CharTryFromError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -1097,7 +1152,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::CharTryFromError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1111,16 +1166,17 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "CharTryFromError" |); + M.read (| M.of_value (| Value.String "CharTryFromError" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::char::convert::CharTryFromError", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1149,7 +1205,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::CharTryFromError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1202,15 +1258,15 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::convert::CharTryFromError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -1233,7 +1289,7 @@ Module char. "converted integer out of range for `char`".fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1242,7 +1298,9 @@ Module char. M.call_closure (| M.get_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |), [ - M.read (| Value.String "converted integer out of range for `char`" |); + M.read (| + M.of_value (| Value.String "converted integer out of range for `char`" |) + |); M.read (| f |) ] |))) @@ -1270,7 +1328,7 @@ Module char. } } *) - Definition from_digit (τ : list Ty.t) (α : list Value.t) : M := + Definition from_digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ num; radix ] => ltac:(M.monadic @@ -1279,14 +1337,17 @@ Module char. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| radix |)) (Value.Integer Integer.U32 36) + BinOp.Pure.gt (| + M.read (| radix |), + M.of_value (| Value.Integer 36 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1302,77 +1363,101 @@ Module char. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "from_digit: radix is too high (maximum 36)" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "from_digit: radix is too high (maximum 36)" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.lt (M.read (| num |)) (M.read (| radix |)) |)) in + 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 [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| num |)) (Value.Integer Integer.U8 10) + BinOp.Pure.lt (| + M.read (| num |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - M.read (| num |) - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| num |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (BinOp.Panic.sub (| - BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - M.read (| num |) - |), - Value.Integer Integer.U8 10 - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.sub (| + Integer.U8, + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| num |) + |), + M.of_value (| Value.Integer 10 |) + |) + |)) + ] + |) |))) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) diff --git a/CoqOfRust/core/char/decode.v b/CoqOfRust/core/char/decode.v index 27b575b08..7c94c0ec6 100644 --- a/CoqOfRust/core/char/decode.v +++ b/CoqOfRust/core/char/decode.v @@ -16,44 +16,48 @@ Module char. Ty.apply (Ty.path "core::char::decode::DecodeUtf16") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::char::decode::DecodeUtf16" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::char::decode::DecodeUtf16", - "iter" - |) - ] - |)); - ("buf", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ Ty.path "u16" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::char::decode::DecodeUtf16", - "buf" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::char::decode::DecodeUtf16" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::char::decode::DecodeUtf16", + "iter" + |) + ] + |))); + ("buf", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ Ty.path "u16" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::char::decode::DecodeUtf16", + "buf" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -71,7 +75,7 @@ Module char. Ty.apply (Ty.path "core::char::decode::DecodeUtf16") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -86,25 +90,27 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "DecodeUtf16" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "DecodeUtf16" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::char::decode::DecodeUtf16", "iter" - |)); - M.read (| Value.String "buf" |); + |) + |); + M.read (| M.of_value (| Value.String "buf" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::char::decode::DecodeUtf16", "buf" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -130,7 +136,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::decode::DecodeUtf16Error". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -144,17 +150,18 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "DecodeUtf16Error" |); - M.read (| Value.String "code" |); + M.read (| M.of_value (| Value.String "DecodeUtf16Error" |) |); + M.read (| M.of_value (| Value.String "code" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::char::decode::DecodeUtf16Error", "code" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -172,26 +179,35 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::decode::DecodeUtf16Error". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::char::decode::DecodeUtf16Error" - [ - ("code", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "u16", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::char::decode::DecodeUtf16Error", - "code" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::char::decode::DecodeUtf16Error" + [ + ("code", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "u16", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::char::decode::DecodeUtf16Error", + "code" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -218,15 +234,15 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::decode::DecodeUtf16Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -256,27 +272,28 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::decode::DecodeUtf16Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::char::decode::DecodeUtf16Error", "code" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::char::decode::DecodeUtf16Error", "code" |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -293,27 +310,31 @@ Module char. DecodeUtf16 { iter: iter.into_iter(), buf: None } } *) - Definition decode_utf16 (τ : list Ty.t) (α : list Value.t) : M := + Definition decode_utf16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "core::char::decode::DecodeUtf16" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - I, - [], - "into_iter", - [] - |), - [ M.read (| iter |) ] - |)); - ("buf", Value.StructTuple "core::option::Option::None" []) - ])) + M.of_value (| + Value.StructRecord + "core::char::decode::DecodeUtf16" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + I, + [], + "into_iter", + [] + |), + [ M.read (| iter |) ] + |))); + ("buf", + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -360,7 +381,7 @@ Module char. } } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -489,56 +510,64 @@ Module char. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "u16", "is_utf16_surrogate", [] |), [ M.read (| u |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "char", - "from_u32_unchecked", - [] - |), - [ M.rust_cast (M.read (| u |)) ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "char", + "from_u32_unchecked", + [] + |), + [ M.rust_cast (| M.read (| u |) |) ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| u |)) - (Value.Integer Integer.U16 56320) + BinOp.Pure.ge (| + M.read (| u |), + M.of_value (| Value.Integer 56320 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -546,17 +575,25 @@ Module char. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::char::decode::DecodeUtf16Error" - [ ("code", M.read (| u |)) ] - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::char::decode::DecodeUtf16Error" + [ ("code", A.to_value (M.read (| u |))) ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -598,17 +635,29 @@ Module char. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::char::decode::DecodeUtf16Error" - [ ("code", M.read (| u |)) ] - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::char::decode::DecodeUtf16Error" + [ + ("code", + A.to_value + (M.read (| u |))) + ] + |)) + ] + |)) + ] + |) |) |) |) @@ -618,7 +667,7 @@ Module char. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -626,13 +675,15 @@ Module char. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt - (M.read (| u2 |)) - (Value.Integer Integer.U16 56320), + BinOp.Pure.lt (| + M.read (| u2 |), + M.of_value (| Value.Integer 56320 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| u2 |)) - (Value.Integer Integer.U16 57343))) + (BinOp.Pure.gt (| + M.read (| u2 |), + M.of_value (| Value.Integer 57343 |) + |))) |) |)) in let _ := @@ -650,64 +701,92 @@ Module char. "core::char::decode::DecodeUtf16", "buf" |), - Value.StructTuple - "core::option::Option::Some" - [ M.read (| u2 |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| u2 |)) ] + |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::char::decode::DecodeUtf16Error" - [ ("code", M.read (| u |)) ] - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::char::decode::DecodeUtf16Error" + [ + ("code", + A.to_value + (M.read (| u |))) + ] + |)) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let c := M.alloc (| BinOp.Panic.add (| - BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| u |)) - (Value.Integer Integer.U16 1023)), - Value.Integer Integer.I32 10 - |)) - (M.rust_cast - (BinOp.Pure.bit_and - (M.read (| u2 |)) - (Value.Integer Integer.U16 1023))), - Value.Integer Integer.U32 65536 + Integer.U32, + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| u |), + M.of_value (| Value.Integer 1023 |) + |) + |), + M.of_value (| Value.Integer 10 |) + |), + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| u2 |), + M.of_value (| Value.Integer 1023 |) + |) + |) + |), + M.of_value (| Value.Integer 65536 |) |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "char", - "from_u32_unchecked", - [] - |), - [ M.read (| c |) ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "char", + "from_u32_unchecked", + [] + |), + [ M.read (| c |) ] + |)) + ] + |)) + ] + |) |))) ] |))) @@ -751,7 +830,7 @@ Module char. (low, high) } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -795,8 +874,13 @@ Module char. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ Value.Integer Integer.Usize 0; Value.Integer Integer.Usize 0 ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -809,15 +893,16 @@ Module char. let u := M.copy (| γ0_0 |) in let γ := M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "u16", "is_utf16_surrogate", [] |), [ M.read (| u |) ] - |)) + |) + |) |) in let _ := M.is_constant_or_break_match (| @@ -825,8 +910,13 @@ Module char. Value.Bool true |) in M.alloc (| - Value.Tuple - [ Value.Integer Integer.Usize 1; Value.Integer Integer.Usize 1 ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -856,9 +946,11 @@ Module char. [ high; M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |) |) ] |) @@ -869,8 +961,13 @@ Module char. Value.Bool true |) in M.alloc (| - Value.Tuple - [ Value.Integer Integer.Usize 1; Value.Integer Integer.Usize 1 ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -882,8 +979,13 @@ Module char. |) in let _u := M.copy (| γ0_0 |) in M.alloc (| - Value.Tuple - [ Value.Integer Integer.Usize 0; Value.Integer Integer.Usize 1 ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |) |))) ] |), @@ -897,13 +999,14 @@ Module char. let low := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "usize", "div_ceil", [] |), - [ M.read (| low |); Value.Integer Integer.Usize 2 ] + [ M.read (| low |); M.of_value (| Value.Integer 2 |) ] |), M.read (| low_buf |) |) @@ -925,8 +1028,8 @@ Module char. |), [ M.read (| high |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -947,11 +1050,18 @@ Module char. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| low |); M.read (| high |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| low |)); A.to_value (M.read (| high |)) + ] + |) + |))) ] |))) ] @@ -995,7 +1105,7 @@ Module char. self.code } *) - Definition unpaired_surrogate (τ : list Ty.t) (α : list Value.t) : M := + Definition unpaired_surrogate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1022,7 +1132,7 @@ Module char. write!(f, "unpaired surrogate found: {:x}", self.code) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1036,31 +1146,44 @@ Module char. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "unpaired surrogate found: " |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "unpaired surrogate found: " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "u16" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::char::decode::DecodeUtf16Error", - "code" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "u16" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::char::decode::DecodeUtf16Error", + "code" + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -1084,12 +1207,12 @@ Module char. "unpaired surrogate found" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "unpaired surrogate found" |))) + M.read (| M.of_value (| Value.String "unpaired surrogate found" |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/char/methods.v b/CoqOfRust/core/char/methods.v index ddc047b01..b8b483f53 100644 --- a/CoqOfRust/core/char/methods.v +++ b/CoqOfRust/core/char/methods.v @@ -8,28 +8,29 @@ Module char. (* pub const MIN: char = '\0'; *) (* Ty.path "char" *) - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.alloc (| Value.UnicodeChar 0 |))). + Definition value_MIN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.UnicodeChar 0 |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: char = '\u{10ffff}'; *) (* Ty.path "char" *) - Definition value_MAX : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.UnicodeChar 1114111 |))). + Definition value_MAX : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.UnicodeChar 1114111 |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const REPLACEMENT_CHARACTER: char = '\u{FFFD}'; *) (* Ty.path "char" *) - Definition value_REPLACEMENT_CHARACTER : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.UnicodeChar 65533 |))). + Definition value_REPLACEMENT_CHARACTER : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.UnicodeChar 65533 |) |))). Axiom AssociatedConstant_value_REPLACEMENT_CHARACTER : M.IsAssociatedConstant Self "value_REPLACEMENT_CHARACTER" value_REPLACEMENT_CHARACTER. (* pub const UNICODE_VERSION: (u8, u8, u8) = crate::unicode::UNICODE_VERSION; *) (* Ty.tuple [ Ty.path "u8"; Ty.path "u8"; Ty.path "u8" ] *) - Definition value_UNICODE_VERSION : Value.t := + Definition value_UNICODE_VERSION : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::unicode::UNICODE_VERSION" |))). Axiom AssociatedConstant_value_UNICODE_VERSION : @@ -40,7 +41,7 @@ Module char. super::decode::decode_utf16(iter) } *) - Definition decode_utf16 (τ : list Ty.t) (α : list Value.t) : M := + Definition decode_utf16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -60,7 +61,7 @@ Module char. super::convert::from_u32(i) } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ i ] => ltac:(M.monadic @@ -80,7 +81,7 @@ Module char. unsafe { super::convert::from_u32_unchecked(i) } } *) - Definition from_u32_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ i ] => ltac:(M.monadic @@ -100,7 +101,7 @@ Module char. super::convert::from_digit(num, radix) } *) - Definition from_digit (τ : list Ty.t) (α : list Value.t) : M := + Definition from_digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ num; radix ] => ltac:(M.monadic @@ -120,7 +121,7 @@ Module char. self.to_digit(radix).is_some() } *) - Definition is_digit (τ : list Ty.t) (α : list Value.t) : M := + Definition is_digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; radix ] => ltac:(M.monadic @@ -162,7 +163,7 @@ Module char. if digit < radix { Some(digit) } else { None } } *) - Definition to_digit (τ : list Ty.t) (α : list Value.t) : M := + Definition to_digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; radix ] => ltac:(M.monadic @@ -175,35 +176,43 @@ Module char. 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) ] + [ + M.rust_cast (| M.read (| self |) |); + M.rust_cast (| M.of_value (| Value.UnicodeChar 48 |) |) + ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| radix |)) (Value.Integer Integer.U32 10) + BinOp.Pure.gt (| + M.read (| radix |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| radix |)) - (Value.Integer Integer.U32 36)) + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| radix |), + M.of_value (| Value.Integer 36 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -223,37 +232,45 @@ Module char. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "to_digit: radix is too high (maximum 36)" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "to_digit: radix is too high (maximum 36)" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| digit |)) - (Value.Integer Integer.U32 10) + BinOp.Pure.lt (| + M.read (| digit |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -264,14 +281,17 @@ Module char. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| digit |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| digit |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -291,38 +311,45 @@ Module char. [] |), [ - BinOp.Pure.bit_or - (M.rust_cast (M.read (| self |))) - (Value.Integer Integer.U32 32); - M.rust_cast (Value.UnicodeChar 97) + BinOp.Pure.bit_or (| + M.rust_cast (| M.read (| self |) |), + M.of_value (| Value.Integer 32 |) + |); + M.rust_cast (| M.of_value (| Value.UnicodeChar 97 |) |) ] |); - Value.Integer Integer.U32 10 + M.of_value (| Value.Integer 10 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| digit |)) (M.read (| radix |)) + BinOp.Pure.lt (| M.read (| digit |), M.read (| radix |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| digit |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| digit |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -337,7 +364,7 @@ Module char. EscapeUnicode::new(self) } *) - Definition escape_unicode (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_unicode (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -371,7 +398,7 @@ Module char. } " *) - Definition escape_debug_ext (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_debug_ext (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; args ] => ltac:(M.monadic @@ -392,7 +419,11 @@ Module char. "backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::Digit0" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::Digit0" [] + |) + ] |) |))); fun γ => @@ -406,7 +437,11 @@ Module char. "backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallT" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallT" [] + |) + ] |) |))); fun γ => @@ -420,7 +455,11 @@ Module char. "backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallR" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallR" [] + |) + ] |) |))); fun γ => @@ -434,7 +473,11 @@ Module char. "backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallN" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallN" [] + |) + ] |) |))); fun γ => @@ -449,9 +492,11 @@ Module char. [] |), [ - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::ReverseSolidus" - [] + M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::ReverseSolidus" + [] + |) ] |) |))); @@ -473,7 +518,12 @@ Module char. "backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::QuotationMark" [] + [ + M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::QuotationMark" + [] + |) ] |) |))); @@ -495,7 +545,11 @@ Module char. "backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::Apostrophe" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::Apostrophe" [] + |) + ] |) |))); fun γ => @@ -585,7 +639,7 @@ Module char. self.escape_debug_ext(EscapeDebugExtArgs::ESCAPE_ALL) } *) - Definition escape_debug (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_debug (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -616,7 +670,7 @@ Module char. } " *) - Definition escape_default (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -636,7 +690,11 @@ Module char. "backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallT" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallT" [] + |) + ] |) |))); fun γ => @@ -650,7 +708,11 @@ Module char. "backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallR" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallR" [] + |) + ] |) |))); fun γ => @@ -664,7 +726,11 @@ Module char. "backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallN" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallN" [] + |) + ] |) |))); fun γ => @@ -679,7 +745,7 @@ Module char. M.read (| γ |), Value.UnicodeChar 92 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := @@ -687,7 +753,7 @@ Module char. M.read (| γ |), Value.UnicodeChar 39 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := @@ -695,10 +761,10 @@ Module char. M.read (| γ |), Value.UnicodeChar 34 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => @@ -733,7 +799,8 @@ Module char. |) |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic @@ -794,14 +861,14 @@ Module char. len_utf8(self as u32) } *) - Definition len_utf8 (τ : list Ty.t) (α : list Value.t) : M := + Definition len_utf8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::char::methods::len_utf8", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -814,30 +881,32 @@ Module char. if (ch & 0xFFFF) == ch { 1 } else { 2 } } *) - Definition len_utf16 (τ : list Ty.t) (α : list Value.t) : M := + Definition len_utf16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => 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 [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| ch |)) - (Value.Integer Integer.U32 65535)) - (M.read (| ch |)) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| ch |), + M.of_value (| Value.Integer 65535 |) + |), + M.read (| ch |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 2 |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))) ] |) |))) @@ -852,7 +921,7 @@ Module char. unsafe { from_utf8_unchecked_mut(encode_utf8_raw(self as u32, dst)) } } *) - Definition encode_utf8 (τ : list Ty.t) (α : list Value.t) : M := + Definition encode_utf8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; dst ] => ltac:(M.monadic @@ -863,7 +932,7 @@ Module char. [ M.call_closure (| M.get_function (| "core::char::methods::encode_utf8_raw", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| dst |) ] + [ M.rust_cast (| M.read (| self |) |); M.read (| dst |) ] |) ] |))) @@ -877,7 +946,7 @@ Module char. encode_utf16_raw(self as u32, dst) } *) - Definition encode_utf16 (τ : list Ty.t) (α : list Value.t) : M := + Definition encode_utf16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; dst ] => ltac:(M.monadic @@ -885,7 +954,7 @@ Module char. let dst := M.alloc (| dst |) in M.call_closure (| M.get_function (| "core::char::methods::encode_utf16_raw", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| dst |) ] + [ M.rust_cast (| M.read (| self |) |); M.read (| dst |) ] |))) | _, _ => M.impossible end. @@ -901,7 +970,7 @@ Module char. } } *) - Definition is_alphabetic (τ : list Ty.t) (α : list Value.t) : M := + Definition is_alphabetic (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -915,23 +984,27 @@ Module char. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic (let c := M.copy (| γ |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| c |)) (Value.UnicodeChar 127), + BinOp.Pure.gt (| + M.read (| c |), + M.of_value (| Value.UnicodeChar 127 |) + |), ltac:(M.monadic (M.call_closure (| M.get_function (| @@ -959,7 +1032,7 @@ Module char. } } *) - Definition is_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition is_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -968,13 +1041,16 @@ Module char. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); fun γ => ltac:(M.monadic (let c := M.copy (| γ |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| c |)) (Value.UnicodeChar 127), + BinOp.Pure.gt (| + M.read (| c |), + M.of_value (| Value.UnicodeChar 127 |) + |), ltac:(M.monadic (M.call_closure (| M.get_function (| @@ -1002,7 +1078,7 @@ Module char. } } *) - Definition is_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition is_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1011,13 +1087,16 @@ Module char. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); fun γ => ltac:(M.monadic (let c := M.copy (| γ |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| c |)) (Value.UnicodeChar 127), + BinOp.Pure.gt (| + M.read (| c |), + M.of_value (| Value.UnicodeChar 127 |) + |), ltac:(M.monadic (M.call_closure (| M.get_function (| @@ -1045,7 +1124,7 @@ Module char. } } *) - Definition is_whitespace (τ : list Ty.t) (α : list Value.t) : M := + Definition is_whitespace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1066,23 +1145,27 @@ Module char. M.read (| γ |), Value.UnicodeChar 32 |) in - Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic (let c := M.copy (| γ |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| c |)) (Value.UnicodeChar 127), + BinOp.Pure.gt (| + M.read (| c |), + M.of_value (| Value.UnicodeChar 127 |) + |), ltac:(M.monadic (M.call_closure (| M.get_function (| @@ -1107,7 +1190,7 @@ Module char. self.is_alphabetic() || self.is_numeric() } *) - Definition is_alphanumeric (τ : list Ty.t) (α : list Value.t) : M := + Definition is_alphanumeric (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1134,7 +1217,7 @@ Module char. unicode::Cc(self) } *) - Definition is_control (τ : list Ty.t) (α : list Value.t) : M := + Definition is_control (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1153,7 +1236,7 @@ Module char. unicode::Grapheme_Extend(self) } *) - Definition is_grapheme_extended (τ : list Ty.t) (α : list Value.t) : M := + Definition is_grapheme_extended (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1176,7 +1259,7 @@ Module char. } } *) - Definition is_numeric (τ : list Ty.t) (α : list Value.t) : M := + Definition is_numeric (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1185,13 +1268,16 @@ Module char. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); fun γ => ltac:(M.monadic (let c := M.copy (| γ |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| c |)) (Value.UnicodeChar 127), + BinOp.Pure.gt (| + M.read (| c |), + M.of_value (| Value.UnicodeChar 127 |) + |), ltac:(M.monadic (M.call_closure (| M.get_function (| "core::unicode::unicode_data::n::lookup", [] |), @@ -1212,24 +1298,34 @@ Module char. ToLowercase(CaseMappingIter::new(conversions::to_lower(self))) } *) - Definition to_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::char::ToLowercase" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "core::char::CaseMappingIter", "new", [] |), - [ - M.call_closure (| - M.get_function (| "core::unicode::unicode_data::conversions::to_lower", [] |), - [ M.read (| self |) ] - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::char::ToLowercase" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::char::CaseMappingIter", + "new", + [] + |), + [ + M.call_closure (| + M.get_function (| + "core::unicode::unicode_data::conversions::to_lower", + [] + |), + [ M.read (| self |) ] + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1241,24 +1337,34 @@ Module char. ToUppercase(CaseMappingIter::new(conversions::to_upper(self))) } *) - Definition to_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::char::ToUppercase" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "core::char::CaseMappingIter", "new", [] |), - [ - M.call_closure (| - M.get_function (| "core::unicode::unicode_data::conversions::to_upper", [] |), - [ M.read (| self |) ] - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::char::ToUppercase" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::char::CaseMappingIter", + "new", + [] + |), + [ + M.call_closure (| + M.get_function (| + "core::unicode::unicode_data::conversions::to_upper", + [] + |), + [ M.read (| self |) ] + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1270,14 +1376,15 @@ Module char. *self as u32 <= 0x7F } *) - Definition is_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.le - (M.rust_cast (M.read (| M.read (| self |) |))) - (Value.Integer Integer.U32 127))) + BinOp.Pure.le (| + M.rust_cast (| M.read (| M.read (| self |) |) |), + M.of_value (| Value.Integer 127 |) + |))) | _, _ => M.impossible end. @@ -1293,14 +1400,14 @@ Module char. } } *) - Definition as_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1314,22 +1421,27 @@ Module char. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ascii::ascii_char::AsciiChar", - "from_u8_unchecked", - [] - |), - [ M.rust_cast (M.read (| M.read (| self |) |)) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ascii::ascii_char::AsciiChar", + "from_u8_unchecked", + [] + |), + [ M.rust_cast (| M.read (| M.read (| self |) |) |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1347,14 +1459,14 @@ Module char. } } *) - Definition to_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1372,15 +1484,16 @@ Module char. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "ascii_change_case_unchecked", [] |), - [ M.alloc (| M.rust_cast (M.read (| M.read (| self |) |)) |) ] - |)) + [ M.alloc (| M.rust_cast (| M.read (| M.read (| self |) |) |) |) ] + |) + |) |))); fun γ => ltac:(M.monadic (M.read (| self |))) ] @@ -1401,14 +1514,14 @@ Module char. } } *) - Definition to_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1426,15 +1539,16 @@ Module char. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "ascii_change_case_unchecked", [] |), - [ M.alloc (| M.rust_cast (M.read (| M.read (| self |) |)) |) ] - |)) + [ M.alloc (| M.rust_cast (| M.read (| M.read (| self |) |) |) |) ] + |) + |) |))); fun γ => ltac:(M.monadic (M.read (| self |))) ] @@ -1451,21 +1565,22 @@ Module char. self.to_ascii_lowercase() == other.to_ascii_lowercase() } *) - Definition eq_ignore_ascii_case (τ : list Ty.t) (α : list Value.t) : M := + Definition eq_ignore_ascii_case (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "char", "to_ascii_lowercase", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "char", "to_ascii_lowercase", [] |), [ M.read (| other |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1477,7 +1592,7 @@ Module char. *self = self.to_ascii_uppercase(); } *) - Definition make_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition make_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1491,7 +1606,7 @@ Module char. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1504,7 +1619,7 @@ Module char. *self = self.to_ascii_lowercase(); } *) - Definition make_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition make_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1518,7 +1633,7 @@ Module char. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1531,7 +1646,7 @@ Module char. matches!( *self, 'A'..='Z' | 'a'..='z') } *) - Definition is_ascii_alphabetic (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_alphabetic (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1545,18 +1660,19 @@ Module char. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1571,7 +1687,7 @@ Module char. matches!( *self, 'A'..='Z') } *) - Definition is_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1580,8 +1696,8 @@ Module char. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1596,7 +1712,7 @@ Module char. matches!( *self, 'a'..='z') } *) - Definition is_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1605,8 +1721,8 @@ Module char. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1621,40 +1737,42 @@ Module char. matches!( *self, '0'..='9') | matches!( *self, 'A'..='Z') | matches!( *self, 'a'..='z') } *) - Definition is_ascii_alphanumeric (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_alphanumeric (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_or - (BinOp.Pure.bit_or - (M.read (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_or (| + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)) - (M.read (| + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |))) - (M.read (| + |) + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1666,7 +1784,7 @@ Module char. matches!( *self, '0'..='9') } *) - Definition is_ascii_digit (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1675,8 +1793,8 @@ Module char. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1691,7 +1809,7 @@ Module char. matches!( *self, '0'..='7') } *) - Definition is_ascii_octdigit (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_octdigit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1700,8 +1818,8 @@ Module char. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1716,40 +1834,42 @@ Module char. matches!( *self, '0'..='9') | matches!( *self, 'A'..='F') | matches!( *self, 'a'..='f') } *) - Definition is_ascii_hexdigit (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_hexdigit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_or - (BinOp.Pure.bit_or - (M.read (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_or (| + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)) - (M.read (| + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |))) - (M.read (| + |) + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1764,50 +1884,53 @@ Module char. | matches!( *self, '{'..='~') } *) - Definition is_ascii_punctuation (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_punctuation (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_or - (BinOp.Pure.bit_or - (BinOp.Pure.bit_or - (M.read (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_or (| + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)) - (M.read (| + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |))) - (M.read (| + |) + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |))) - (M.read (| + |) + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1819,7 +1942,7 @@ Module char. matches!( *self, '!'..='~') } *) - Definition is_ascii_graphic (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_graphic (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1828,8 +1951,8 @@ Module char. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1844,7 +1967,7 @@ Module char. matches!( *self, '\t' | '\n' | '\x0C' | '\r' | ' ') } *) - Definition is_ascii_whitespace (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_whitespace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1865,7 +1988,7 @@ Module char. M.read (| γ |), Value.UnicodeChar 9 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := @@ -1873,7 +1996,7 @@ Module char. M.read (| γ |), Value.UnicodeChar 10 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := @@ -1881,7 +2004,7 @@ Module char. M.read (| γ |), Value.UnicodeChar 12 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := @@ -1889,7 +2012,7 @@ Module char. M.read (| γ |), Value.UnicodeChar 13 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := @@ -1897,17 +2020,18 @@ Module char. M.read (| γ |), Value.UnicodeChar 32 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1922,7 +2046,7 @@ Module char. matches!( *self, '\0'..='\x1F' | '\x7F') } *) - Definition is_ascii_control (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_control (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1936,7 +2060,7 @@ Module char. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := @@ -1944,17 +2068,18 @@ Module char. M.read (| γ |), Value.UnicodeChar 127 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1988,17 +2113,19 @@ Module char. }; *) (* Ty.path "core::char::methods::EscapeDebugExtArgs" *) - Definition value_ESCAPE_ALL : Value.t := + Definition value_ESCAPE_ALL : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructRecord - "core::char::methods::EscapeDebugExtArgs" - [ - ("escape_grapheme_extended", Value.Bool true); - ("escape_single_quote", Value.Bool true); - ("escape_double_quote", Value.Bool true) - ] + M.of_value (| + Value.StructRecord + "core::char::methods::EscapeDebugExtArgs" + [ + ("escape_grapheme_extended", A.to_value (M.of_value (| Value.Bool true |))); + ("escape_single_quote", A.to_value (M.of_value (| Value.Bool true |))); + ("escape_double_quote", A.to_value (M.of_value (| Value.Bool true |))) + ] + |) |))). Axiom AssociatedConstant_value_ESCAPE_ALL : @@ -2018,67 +2145,70 @@ Module char. } } *) - Definition len_utf8 (τ : list Ty.t) (α : list Value.t) : M := + Definition len_utf8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ code ] => ltac:(M.monadic (let code := M.alloc (| code |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| code |)) - (M.read (| M.get_constant (| "core::char::MAX_ONE_B" |) |)) + BinOp.Pure.lt (| + M.read (| code |), + M.read (| M.get_constant (| "core::char::MAX_ONE_B" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); + M.alloc (| M.of_value (| Value.Integer 1 |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| code |)) - (M.read (| M.get_constant (| "core::char::MAX_TWO_B" |) |)) + BinOp.Pure.lt (| + M.read (| code |), + M.read (| M.get_constant (| "core::char::MAX_TWO_B" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 2 |))); + M.alloc (| M.of_value (| Value.Integer 2 |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| code |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| code |), + M.read (| M.get_constant (| "core::char::MAX_THREE_B" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 3 |))); + M.alloc (| M.of_value (| Value.Integer 3 |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 4 |))) + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4 |) |))) ] |))) ] @@ -2121,7 +2251,7 @@ Module char. &mut dst[..len] } *) - Definition encode_utf8_raw (τ : list Ty.t) (α : list Value.t) : M := + Definition encode_utf8_raw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ code; dst ] => ltac:(M.monadic @@ -2138,20 +2268,26 @@ Module char. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.read (| len |); - M.call_closure (| - M.get_trait_method (| - "core::ops::index::IndexMut", - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - [ Ty.path "core::ops::range::RangeFull" ], - "index_mut", - [] - |), - [ M.read (| dst |); Value.StructTuple "core::ops::range::RangeFull" [] ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ Ty.path "core::ops::range::RangeFull" ], + "index_mut", + [] + |), + [ + M.read (| dst |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] + |)) + ] + |) |), [ fun γ => @@ -2159,25 +2295,19 @@ Module char. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.Usize 1 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 1 |) in let γ0_1 := M.read (| γ0_1 |) in 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 - M.alloc (| Value.Tuple [] |))); + let _ := M.write (| M.read (| a |), M.rust_cast (| M.read (| code |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); 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_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.Usize 2 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 2 |) in let γ0_1 := M.read (| γ0_1 |) in let γ2_0 := M.SubPointer.get_slice_index (| γ0_1, 0 |) in let γ2_1 := M.SubPointer.get_slice_index (| γ0_1, 1 |) in @@ -2187,36 +2317,39 @@ Module char. let _ := M.write (| M.read (| a |), - BinOp.Pure.bit_or - (M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| + BinOp.Pure.bit_or (| + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| code |), - Value.Integer Integer.I32 6 - |)) - (Value.Integer Integer.U32 31))) - (M.read (| M.get_constant (| "core::char::TAG_TWO_B" |) |)) + M.of_value (| Value.Integer 6 |) + |), + M.of_value (| Value.Integer 31 |) + |) + |), + M.read (| M.get_constant (| "core::char::TAG_TWO_B" |) |) + |) |) in let _ := M.write (| M.read (| b |), - BinOp.Pure.bit_or - (M.rust_cast - (BinOp.Pure.bit_and - (M.read (| code |)) - (Value.Integer Integer.U32 63))) - (M.read (| M.get_constant (| "core::char::TAG_CONT" |) |)) + BinOp.Pure.bit_or (| + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| code |), + M.of_value (| Value.Integer 63 |) + |) + |), + M.read (| M.get_constant (| "core::char::TAG_CONT" |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); 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_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.Usize 3 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 3 |) in let γ0_1 := M.read (| γ0_1 |) in let γ2_0 := M.SubPointer.get_slice_index (| γ0_1, 0 |) in let γ2_1 := M.SubPointer.get_slice_index (| γ0_1, 1 |) in @@ -2228,49 +2361,55 @@ Module char. let _ := M.write (| M.read (| a |), - BinOp.Pure.bit_or - (M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| + BinOp.Pure.bit_or (| + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| code |), - Value.Integer Integer.I32 12 - |)) - (Value.Integer Integer.U32 15))) - (M.read (| M.get_constant (| "core::char::TAG_THREE_B" |) |)) + M.of_value (| Value.Integer 12 |) + |), + M.of_value (| Value.Integer 15 |) + |) + |), + M.read (| M.get_constant (| "core::char::TAG_THREE_B" |) |) + |) |) in let _ := M.write (| M.read (| b |), - BinOp.Pure.bit_or - (M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| + BinOp.Pure.bit_or (| + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| code |), - Value.Integer Integer.I32 6 - |)) - (Value.Integer Integer.U32 63))) - (M.read (| M.get_constant (| "core::char::TAG_CONT" |) |)) + M.of_value (| Value.Integer 6 |) + |), + M.of_value (| Value.Integer 63 |) + |) + |), + M.read (| M.get_constant (| "core::char::TAG_CONT" |) |) + |) |) in let _ := M.write (| M.read (| c |), - BinOp.Pure.bit_or - (M.rust_cast - (BinOp.Pure.bit_and - (M.read (| code |)) - (Value.Integer Integer.U32 63))) - (M.read (| M.get_constant (| "core::char::TAG_CONT" |) |)) + BinOp.Pure.bit_or (| + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| code |), + M.of_value (| Value.Integer 63 |) + |) + |), + M.read (| M.get_constant (| "core::char::TAG_CONT" |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); 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_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.Usize 4 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 4 |) in let γ0_1 := M.read (| γ0_1 |) in let γ2_0 := M.SubPointer.get_slice_index (| γ0_1, 0 |) in let γ2_1 := M.SubPointer.get_slice_index (| γ0_1, 1 |) in @@ -2284,53 +2423,65 @@ Module char. let _ := M.write (| M.read (| a |), - BinOp.Pure.bit_or - (M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| + BinOp.Pure.bit_or (| + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| code |), - Value.Integer Integer.I32 18 - |)) - (Value.Integer Integer.U32 7))) - (M.read (| M.get_constant (| "core::char::TAG_FOUR_B" |) |)) + M.of_value (| Value.Integer 18 |) + |), + M.of_value (| Value.Integer 7 |) + |) + |), + M.read (| M.get_constant (| "core::char::TAG_FOUR_B" |) |) + |) |) in let _ := M.write (| M.read (| b |), - BinOp.Pure.bit_or - (M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| + BinOp.Pure.bit_or (| + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| code |), - Value.Integer Integer.I32 12 - |)) - (Value.Integer Integer.U32 63))) - (M.read (| M.get_constant (| "core::char::TAG_CONT" |) |)) + M.of_value (| Value.Integer 12 |) + |), + M.of_value (| Value.Integer 63 |) + |) + |), + M.read (| M.get_constant (| "core::char::TAG_CONT" |) |) + |) |) in let _ := M.write (| M.read (| c |), - BinOp.Pure.bit_or - (M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| + BinOp.Pure.bit_or (| + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| code |), - Value.Integer Integer.I32 6 - |)) - (Value.Integer Integer.U32 63))) - (M.read (| M.get_constant (| "core::char::TAG_CONT" |) |)) + M.of_value (| Value.Integer 6 |) + |), + M.of_value (| Value.Integer 63 |) + |) + |), + M.read (| M.get_constant (| "core::char::TAG_CONT" |) |) + |) |) in let _ := M.write (| M.read (| d |), - BinOp.Pure.bit_or - (M.rust_cast - (BinOp.Pure.bit_and - (M.read (| code |)) - (Value.Integer Integer.U32 63))) - (M.read (| M.get_constant (| "core::char::TAG_CONT" |) |)) + BinOp.Pure.bit_or (| + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| code |), + M.of_value (| Value.Integer 63 |) + |) + |), + M.read (| M.get_constant (| "core::char::TAG_CONT" |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2346,57 +2497,77 @@ Module char. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "encode_utf8: need " |); - M.read (| Value.String " bytes to encode U+" |); - M.read (| Value.String ", but the buffer has " |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ len ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_upper_hex", - [ Ty.path "u32" ] - |), - [ code ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| dst |) ] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "encode_utf8: need " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes to encode U+" |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String ", but the buffer has " |) - |) - ] - |) - ] - |)) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ len ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_upper_hex", + [ Ty.path "u32" ] + |), + [ code ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| dst |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -2416,7 +2587,11 @@ Module char. |), [ M.read (| dst |); - Value.StructRecord "core::ops::range::RangeTo" [ ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| len |))) ] + |) ] |) |) @@ -2449,7 +2624,7 @@ Module char. } } *) - Definition encode_utf16_raw (τ : list Ty.t) (α : list Value.t) : M := + Definition encode_utf16_raw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ code; dst ] => ltac:(M.monadic @@ -2457,7 +2632,7 @@ Module char. let dst := M.alloc (| dst |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2465,21 +2640,24 @@ Module char. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| code |)) - (Value.Integer Integer.U32 65535)) - (M.read (| code |)), + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| code |), + M.of_value (| Value.Integer 65535 |) + |), + M.read (| code |) + |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u16" ], "is_empty", [] |), [ M.read (| dst |) ] - |)))) + |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2493,9 +2671,9 @@ Module char. "get_unchecked_mut", [ Ty.path "usize" ] |), - [ M.read (| dst |); Value.Integer Integer.Usize 0 ] + [ M.read (| dst |); M.of_value (| Value.Integer 0 |) ] |), - M.rust_cast (M.read (| code |)) + M.rust_cast (| M.read (| code |) |) |) in M.alloc (| M.call_closure (| @@ -2512,7 +2690,7 @@ Module char. |), [ M.read (| dst |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) @@ -2521,23 +2699,24 @@ Module char. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u16" ], "len", [] |), [ M.read (| dst |) ] - |)) - (Value.Integer Integer.Usize 2) + |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2548,8 +2727,9 @@ Module char. M.write (| β, BinOp.Panic.sub (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 65536 + M.of_value (| Value.Integer 65536 |) |) |) in let _ := @@ -2560,15 +2740,17 @@ Module char. "get_unchecked_mut", [ Ty.path "usize" ] |), - [ M.read (| dst |); Value.Integer Integer.Usize 0 ] + [ M.read (| dst |); M.of_value (| Value.Integer 0 |) ] |), - BinOp.Pure.bit_or - (Value.Integer Integer.U16 55296) - (M.rust_cast - (BinOp.Panic.shr (| + BinOp.Pure.bit_or (| + M.of_value (| Value.Integer 55296 |), + M.rust_cast (| + BinOp.Panic.shr (| M.read (| code |), - Value.Integer Integer.I32 10 - |))) + M.of_value (| Value.Integer 10 |) + |) + |) + |) |) in let _ := M.write (| @@ -2578,13 +2760,15 @@ Module char. "get_unchecked_mut", [ Ty.path "usize" ] |), - [ M.read (| dst |); Value.Integer Integer.Usize 1 ] + [ M.read (| dst |); M.of_value (| Value.Integer 1 |) ] |), - BinOp.Pure.bit_or - (Value.Integer Integer.U16 56320) - (BinOp.Pure.bit_and - (M.rust_cast (M.read (| code |))) - (Value.Integer Integer.U16 1023)) + BinOp.Pure.bit_or (| + M.of_value (| Value.Integer 56320 |), + BinOp.Pure.bit_and (| + M.rust_cast (| M.read (| code |) |), + M.of_value (| Value.Integer 1023 |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -2601,7 +2785,7 @@ Module char. |), [ M.read (| dst |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) @@ -2622,79 +2806,103 @@ Module char. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "encode_utf16: need " |); - M.read (| Value.String " units to encode U+" |); - M.read (| Value.String ", but the buffer has " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "encode_utf16: need " + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " units to encode U+" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String ", but the buffer has " + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "char", - "len_utf16", - [] - |), - [ + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "char", - "from_u32_unchecked", + "len_utf16", [] |), - [ M.read (| code |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "char", + "from_u32_unchecked", + [] + |), + [ M.read (| code |) ] + |) + ] |) - ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_upper_hex", - [ Ty.path "u32" ] - |), - [ code ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ Ty.path "u16" ], - "len", - [] - |), - [ M.read (| dst |) ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_upper_hex", + [ Ty.path "u32" ] + |), + [ code ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u16" ], + "len", + [] + |), + [ M.read (| dst |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] diff --git a/CoqOfRust/core/char/mod.v b/CoqOfRust/core/char/mod.v index c9ba85cd5..99f094cb7 100644 --- a/CoqOfRust/core/char/mod.v +++ b/CoqOfRust/core/char/mod.v @@ -2,34 +2,34 @@ Require Import CoqOfRust.CoqOfRust. Module char. - Definition value_TAG_CONT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 128 |))). + Definition value_TAG_CONT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 128 |) |))). - Definition value_TAG_TWO_B : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 192 |))). + Definition value_TAG_TWO_B : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 192 |) |))). - Definition value_TAG_THREE_B : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 224 |))). + Definition value_TAG_THREE_B : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 224 |) |))). - Definition value_TAG_FOUR_B : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 240 |))). + Definition value_TAG_FOUR_B : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 240 |) |))). - Definition value_MAX_ONE_B : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 128 |))). + Definition value_MAX_ONE_B : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 128 |) |))). - Definition value_MAX_TWO_B : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 2048 |))). + Definition value_MAX_TWO_B : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2048 |) |))). - Definition value_MAX_THREE_B : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 65536 |))). + Definition value_MAX_THREE_B : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 65536 |) |))). - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::char::methods::MAX" |))). - Definition value_REPLACEMENT_CHARACTER : Value.t := + Definition value_REPLACEMENT_CHARACTER : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::char::methods::REPLACEMENT_CHARACTER" |))). - Definition value_UNICODE_VERSION : Value.t := + Definition value_UNICODE_VERSION : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::char::methods::UNICODE_VERSION" |))). (* @@ -37,7 +37,7 @@ Module char. self::decode::decode_utf16(iter) } *) - Definition decode_utf16 (τ : list Ty.t) (α : list Value.t) : M := + Definition decode_utf16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -54,7 +54,7 @@ Module char. self::convert::from_u32(i) } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ i ] => ltac:(M.monadic @@ -72,7 +72,7 @@ Module char. unsafe { self::convert::from_u32_unchecked(i) } } *) - Definition from_u32_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ i ] => ltac:(M.monadic @@ -89,7 +89,7 @@ Module char. self::convert::from_digit(num, radix) } *) - Definition from_digit (τ : list Ty.t) (α : list Value.t) : M := + Definition from_digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ num; radix ] => ltac:(M.monadic @@ -113,31 +113,34 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::EscapeUnicode". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::char::EscapeUnicode" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::escape::EscapeIterInner", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::char::EscapeUnicode", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::char::EscapeUnicode" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::escape::EscapeIterInner", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::char::EscapeUnicode", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -153,7 +156,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::EscapeUnicode". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -167,16 +170,17 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "EscapeUnicode" |); + M.read (| M.of_value (| Value.String "EscapeUnicode" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::char::EscapeUnicode", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -200,7 +204,7 @@ Module char. Self(escape::EscapeIterInner::new(data, range)) } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ chr ] => ltac:(M.monadic @@ -208,7 +212,10 @@ Module char. M.read (| let data := M.alloc (| - repeat (Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" []) 10 + repeat (| + M.of_value (| Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" [] |), + 10 + |) |) in let range := M.alloc (| @@ -218,18 +225,21 @@ Module char. |) |) in M.alloc (| - Value.StructTuple - "core::char::EscapeUnicode" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::escape::EscapeIterInner", - "new", - [] - |), - [ M.read (| data |); M.read (| range |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::char::EscapeUnicode" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::escape::EscapeIterInner", + "new", + [] + |), + [ M.read (| data |); M.read (| range |) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -249,7 +259,7 @@ Module char. self.0.next().map(char::from) } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -289,7 +299,7 @@ Module char. (n, Some(n)) } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -313,9 +323,18 @@ Module char. |) |) in M.alloc (| - Value.Tuple - [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -326,7 +345,7 @@ Module char. self.0.len() } *) - Definition count (τ : list Ty.t) (α : list Value.t) : M := + Definition count (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -343,7 +362,7 @@ Module char. self.0.next_back().map(char::from) } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -380,7 +399,7 @@ Module char. self.0.advance_by(n) } *) - Definition advance_by (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -428,7 +447,7 @@ Module char. self.0.len() } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -473,7 +492,7 @@ Module char. f.write_str(self.0.as_str()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -521,31 +540,34 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::EscapeDefault". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::char::EscapeDefault" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::escape::EscapeIterInner", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::char::EscapeDefault", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::char::EscapeDefault" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::escape::EscapeIterInner", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::char::EscapeDefault", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -561,7 +583,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::EscapeDefault". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -575,16 +597,17 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "EscapeDefault" |); + M.read (| M.of_value (| Value.String "EscapeDefault" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::char::EscapeDefault", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -607,26 +630,30 @@ Module char. Self(escape::EscapeIterInner::from_array(data)) } *) - Definition printable (τ : list Ty.t) (α : list Value.t) : M := + Definition printable (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ chr ] => 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 (| M.of_value (| Value.Array [ A.to_value (M.read (| chr |)) ] |) |) in M.alloc (| - Value.StructTuple - "core::char::EscapeDefault" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::escape::EscapeIterInner", - "from_array", - [] - |), - [ M.read (| data |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::char::EscapeDefault" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::escape::EscapeIterInner", + "from_array", + [] + |), + [ M.read (| data |) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -640,7 +667,7 @@ Module char. Self(escape::EscapeIterInner::from_array(data)) } *) - Definition backslash (τ : list Ty.t) (α : list Value.t) : M := + Definition backslash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ chr ] => ltac:(M.monadic @@ -648,25 +675,33 @@ Module char. M.read (| let data := M.alloc (| - Value.Array - [ - Value.StructTuple "core::ascii::ascii_char::AsciiChar::ReverseSolidus" []; - M.read (| chr |) - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::ReverseSolidus" [] + |)); + A.to_value (M.read (| chr |)) + ] + |) |) in M.alloc (| - Value.StructTuple - "core::char::EscapeDefault" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::escape::EscapeIterInner", - "from_array", - [] - |), - [ M.read (| data |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::char::EscapeDefault" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::escape::EscapeIterInner", + "from_array", + [] + |), + [ M.read (| data |) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -679,18 +714,21 @@ Module char. Self(esc.0) } *) - Definition from_unicode (τ : list Ty.t) (α : list Value.t) : M := + Definition from_unicode (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ esc ] => ltac:(M.monadic (let esc := M.alloc (| esc |) in - Value.StructTuple - "core::char::EscapeDefault" - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| esc, "core::char::EscapeUnicode", 0 |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::char::EscapeDefault" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| esc, "core::char::EscapeUnicode", 0 |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -708,7 +746,7 @@ Module char. self.0.next().map(char::from) } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -748,7 +786,7 @@ Module char. (n, Some(n)) } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -772,9 +810,18 @@ Module char. |) |) in M.alloc (| - Value.Tuple - [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -785,7 +832,7 @@ Module char. self.0.len() } *) - Definition count (τ : list Ty.t) (α : list Value.t) : M := + Definition count (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -802,7 +849,7 @@ Module char. self.0.next_back().map(char::from) } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -839,7 +886,7 @@ Module char. self.0.advance_by(n) } *) - Definition advance_by (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -887,7 +934,7 @@ Module char. self.0.len() } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -932,7 +979,7 @@ Module char. f.write_str(self.0.as_str()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -980,31 +1027,34 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::EscapeDebug". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::char::EscapeDebug" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::char::EscapeDebugInner", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::char::EscapeDebug", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::char::EscapeDebug" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::char::EscapeDebugInner", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::char::EscapeDebug", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1020,7 +1070,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::EscapeDebug". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1034,16 +1084,17 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "EscapeDebug" |); + M.read (| M.of_value (| Value.String "EscapeDebug" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::char::EscapeDebug", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1081,7 +1132,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::EscapeDebugInner". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1101,20 +1152,23 @@ Module char. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::char::EscapeDebugInner::Bytes" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::escape::EscapeIterInner", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::char::EscapeDebugInner::Bytes" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::escape::EscapeIterInner", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1127,20 +1181,23 @@ Module char. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::char::EscapeDebugInner::Char" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "char", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::char::EscapeDebugInner::Char" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "char", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))) ] |) @@ -1160,7 +1217,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::EscapeDebugInner". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1189,8 +1246,8 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "Bytes" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Bytes" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -1213,8 +1270,8 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "Char" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Char" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -1240,14 +1297,23 @@ Module char. Self(EscapeDebugInner::Char(chr)) } *) - Definition printable (τ : list Ty.t) (α : list Value.t) : M := + Definition printable (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ chr ] => ltac:(M.monadic (let chr := M.alloc (| chr |) in - Value.StructTuple - "core::char::EscapeDebug" - [ Value.StructTuple "core::char::EscapeDebugInner::Char" [ M.read (| chr |) ] ])) + M.of_value (| + Value.StructTuple + "core::char::EscapeDebug" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::char::EscapeDebugInner::Char" + [ A.to_value (M.read (| chr |)) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1260,7 +1326,7 @@ Module char. Self(EscapeDebugInner::Bytes(iter)) } *) - Definition backslash (τ : list Ty.t) (α : list Value.t) : M := + Definition backslash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ chr ] => ltac:(M.monadic @@ -1268,11 +1334,16 @@ Module char. M.read (| let data := M.alloc (| - Value.Array - [ - Value.StructTuple "core::ascii::ascii_char::AsciiChar::ReverseSolidus" []; - M.read (| chr |) - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::ReverseSolidus" [] + |)); + A.to_value (M.read (| chr |)) + ] + |) |) in let iter := M.alloc (| @@ -1286,9 +1357,18 @@ Module char. |) |) in M.alloc (| - Value.StructTuple - "core::char::EscapeDebug" - [ Value.StructTuple "core::char::EscapeDebugInner::Bytes" [ M.read (| iter |) ] ] + M.of_value (| + Value.StructTuple + "core::char::EscapeDebug" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::char::EscapeDebugInner::Bytes" + [ A.to_value (M.read (| iter |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -1301,22 +1381,32 @@ Module char. Self(EscapeDebugInner::Bytes(esc.0)) } *) - Definition from_unicode (τ : list Ty.t) (α : list Value.t) : M := + Definition from_unicode (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ esc ] => ltac:(M.monadic (let esc := M.alloc (| esc |) in - Value.StructTuple - "core::char::EscapeDebug" - [ - Value.StructTuple - "core::char::EscapeDebugInner::Bytes" - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| esc, "core::char::EscapeUnicode", 0 |) - |) - ] - ])) + M.of_value (| + Value.StructTuple + "core::char::EscapeDebug" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::char::EscapeDebugInner::Bytes" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + esc, + "core::char::EscapeUnicode", + 0 + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1328,7 +1418,7 @@ Module char. self.0 = EscapeDebugInner::Bytes(bytes); } *) - Definition clear (τ : list Ty.t) (α : list Value.t) : M := + Definition clear (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1342,7 +1432,7 @@ Module char. "from_array", [] |), - [ Value.Array [] ] + [ M.of_value (| Value.Array [] |) ] |) |) in let _ := @@ -1352,9 +1442,13 @@ Module char. "core::char::EscapeDebug", 0 |), - Value.StructTuple "core::char::EscapeDebugInner::Bytes" [ M.read (| bytes |) ] + M.of_value (| + Value.StructTuple + "core::char::EscapeDebugInner::Bytes" + [ A.to_value (M.read (| bytes |)) ] + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1379,7 +1473,7 @@ Module char. } } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1448,7 +1542,11 @@ Module char. |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| chr |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| chr |)) ] + |) |))) ] |) @@ -1462,7 +1560,7 @@ Module char. (n, Some(n)) } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1482,9 +1580,18 @@ Module char. |) |) in M.alloc (| - Value.Tuple - [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -1495,7 +1602,7 @@ Module char. self.len() } *) - Definition count (τ : list Ty.t) (α : list Value.t) : M := + Definition count (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1538,7 +1645,7 @@ Module char. } } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1582,7 +1689,7 @@ Module char. "core::char::EscapeDebugInner::Char", 0 |) in - M.alloc (| Value.Integer Integer.Usize 1 |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |) |))) @@ -1619,7 +1726,7 @@ Module char. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1712,7 +1819,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::ToLowercase". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1726,16 +1833,17 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "ToLowercase" |); + M.read (| M.of_value (| Value.String "ToLowercase" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::char::ToLowercase", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1753,31 +1861,34 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::ToLowercase". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::char::ToLowercase" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::char::CaseMappingIter", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::char::ToLowercase", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::char::ToLowercase" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::char::CaseMappingIter", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::char::ToLowercase", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1800,7 +1911,7 @@ Module char. self.0.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1829,7 +1940,7 @@ Module char. self.0.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1874,7 +1985,7 @@ Module char. self.0.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1939,7 +2050,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::ToUppercase". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1953,16 +2064,17 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "ToUppercase" |); + M.read (| M.of_value (| Value.String "ToUppercase" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::char::ToUppercase", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1980,31 +2092,34 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::ToUppercase". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::char::ToUppercase" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::char::CaseMappingIter", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::char::ToUppercase", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::char::ToUppercase" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::char::CaseMappingIter", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::char::ToUppercase", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2027,7 +2142,7 @@ Module char. self.0.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2056,7 +2171,7 @@ Module char. self.0.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2101,7 +2216,7 @@ Module char. self.0.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2189,7 +2304,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2232,10 +2347,10 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "Three" |); - (* Unsize *) M.pointer_coercion (M.read (| __self_0 |)); - (* Unsize *) M.pointer_coercion (M.read (| __self_1 |)); - (* Unsize *) M.pointer_coercion __self_2 + M.read (| M.of_value (| Value.String "Three" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| __self_0 |) |); + (* Unsize *) M.pointer_coercion (| M.read (| __self_1 |) |); + (* Unsize *) M.pointer_coercion (| __self_2 |) ] |) |))); @@ -2265,9 +2380,9 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "Two" |); - (* Unsize *) M.pointer_coercion (M.read (| __self_0 |)); - (* Unsize *) M.pointer_coercion __self_1 + M.read (| M.of_value (| Value.String "Two" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| __self_0 |) |); + (* Unsize *) M.pointer_coercion (| __self_1 |) ] |) |))); @@ -2290,8 +2405,8 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "One" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "One" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -2305,7 +2420,7 @@ Module char. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Zero" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Zero" |) |) ] |) |))) ] @@ -2326,7 +2441,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2360,40 +2475,45 @@ Module char. let __self_1 := M.alloc (| γ1_1 |) in let __self_2 := M.alloc (| γ1_2 |) in M.alloc (| - Value.StructTuple - "core::char::CaseMappingIter::Three" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "char", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "char", - [], - "clone", - [] - |), - [ M.read (| __self_1 |) ] - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "char", - [], - "clone", - [] - |), - [ M.read (| __self_2 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::Three" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "char", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "char", + [], + "clone", + [] + |), + [ M.read (| __self_1 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "char", + [], + "clone", + [] + |), + [ M.read (| __self_2 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2413,30 +2533,34 @@ Module char. let __self_0 := M.alloc (| γ1_0 |) in let __self_1 := M.alloc (| γ1_1 |) in M.alloc (| - Value.StructTuple - "core::char::CaseMappingIter::Two" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "char", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "char", - [], - "clone", - [] - |), - [ M.read (| __self_1 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::Two" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "char", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "char", + [], + "clone", + [] + |), + [ M.read (| __self_1 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2449,25 +2573,30 @@ Module char. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::char::CaseMappingIter::One" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "char", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::One" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "char", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::char::CaseMappingIter::Zero" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::char::CaseMappingIter::Zero" [] |) + |))) ] |) |))) @@ -2498,108 +2627,122 @@ Module char. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ chars ] => ltac:(M.monadic (let chars := M.alloc (| chars |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| chars, - M.alloc (| Value.Integer Integer.Usize 2 |) + M.alloc (| M.of_value (| Value.Integer 2 |) |) |) - |)) - (Value.UnicodeChar 0) + |), + M.of_value (| Value.UnicodeChar 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| chars, - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |) - |)) - (Value.UnicodeChar 0) + |), + M.of_value (| Value.UnicodeChar 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::char::CaseMappingIter::One" - [ - M.read (| - M.SubPointer.get_array_field (| - chars, - M.alloc (| Value.Integer Integer.Usize 0 |) - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::One" + [ + A.to_value + (M.read (| + M.SubPointer.get_array_field (| + chars, + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::char::CaseMappingIter::Two" - [ - M.read (| - M.SubPointer.get_array_field (| - chars, - M.alloc (| Value.Integer Integer.Usize 0 |) - |) - |); - M.read (| - M.SubPointer.get_array_field (| - chars, - M.alloc (| Value.Integer Integer.Usize 1 |) - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::Two" + [ + A.to_value + (M.read (| + M.SubPointer.get_array_field (| + chars, + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |)); + A.to_value + (M.read (| + M.SubPointer.get_array_field (| + chars, + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::char::CaseMappingIter::Three" - [ - M.read (| - M.SubPointer.get_array_field (| - chars, - M.alloc (| Value.Integer Integer.Usize 0 |) - |) - |); - M.read (| - M.SubPointer.get_array_field (| - chars, - M.alloc (| Value.Integer Integer.Usize 1 |) - |) - |); - M.read (| - M.SubPointer.get_array_field (| - chars, - M.alloc (| Value.Integer Integer.Usize 2 |) - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::Three" + [ + A.to_value + (M.read (| + M.SubPointer.get_array_field (| + chars, + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |)); + A.to_value + (M.read (| + M.SubPointer.get_array_field (| + chars, + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |)); + A.to_value + (M.read (| + M.SubPointer.get_array_field (| + chars, + M.alloc (| M.of_value (| Value.Integer 2 |) |) + |) + |)) + ] + |) |))) ] |) @@ -2635,7 +2778,7 @@ Module char. } } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2670,12 +2813,18 @@ Module char. let _ := M.write (| M.read (| self |), - Value.StructTuple - "core::char::CaseMappingIter::Two" - [ M.read (| b |); M.read (| c |) ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::Two" + [ A.to_value (M.read (| b |)); A.to_value (M.read (| c |)) ] + |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -2696,10 +2845,18 @@ Module char. let _ := M.write (| M.read (| self |), - Value.StructTuple "core::char::CaseMappingIter::One" [ M.read (| c |) ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::One" + [ A.to_value (M.read (| c |)) ] + |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| b |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| b |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -2713,13 +2870,20 @@ Module char. let _ := M.write (| M.read (| self |), - Value.StructTuple "core::char::CaseMappingIter::Zero" [] + M.of_value (| Value.StructTuple "core::char::CaseMappingIter::Zero" [] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| c |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| c |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2737,7 +2901,7 @@ Module char. (size, Some(size)) } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2751,11 +2915,11 @@ Module char. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.Integer Integer.Usize 3 |))); + M.alloc (| M.of_value (| Value.Integer 3 |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.Integer Integer.Usize 2 |))); + M.alloc (| M.of_value (| Value.Integer 2 |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in @@ -2765,20 +2929,27 @@ Module char. "core::char::CaseMappingIter::One", 0 |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); + M.alloc (| M.of_value (| Value.Integer 1 |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.Integer Integer.Usize 0 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in M.alloc (| - Value.Tuple - [ - M.read (| size |); - Value.StructTuple "core::option::Option::Some" [ M.read (| size |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| size |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| size |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -2819,7 +2990,7 @@ Module char. } } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2854,12 +3025,18 @@ Module char. let _ := M.write (| M.read (| self |), - Value.StructTuple - "core::char::CaseMappingIter::Two" - [ M.read (| a |); M.read (| b |) ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::Two" + [ A.to_value (M.read (| a |)); A.to_value (M.read (| b |)) ] + |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| c |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| c |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -2880,10 +3057,18 @@ Module char. let _ := M.write (| M.read (| self |), - Value.StructTuple "core::char::CaseMappingIter::One" [ M.read (| b |) ] + M.of_value (| + Value.StructTuple + "core::char::CaseMappingIter::One" + [ A.to_value (M.read (| b |)) ] + |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| c |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| c |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -2897,13 +3082,20 @@ Module char. let _ := M.write (| M.read (| self |), - Value.StructTuple "core::char::CaseMappingIter::Zero" [] + M.of_value (| Value.StructTuple "core::char::CaseMappingIter::Zero" [] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| c |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| c |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2938,7 +3130,7 @@ Module char. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3265,7 +3457,11 @@ Module char. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))) ] |) @@ -3290,7 +3486,7 @@ Module char. fmt::Display::fmt(&self.0, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3332,7 +3528,7 @@ Module char. fmt::Display::fmt(&self.0, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3377,7 +3573,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::TryFromCharError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3391,16 +3587,17 @@ Module char. |), [ M.read (| f |); - M.read (| Value.String "TryFromCharError" |); + M.read (| M.of_value (| Value.String "TryFromCharError" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::char::TryFromCharError", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -3429,14 +3626,14 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::TryFromCharError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -3466,7 +3663,7 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::TryFromCharError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3513,15 +3710,15 @@ Module char. Definition Self : Ty.t := Ty.path "core::char::TryFromCharError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -3544,7 +3741,7 @@ Module char. "unicode code point out of range".fmt(fmt) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -3552,7 +3749,10 @@ Module char. let fmt := M.alloc (| fmt |) in M.call_closure (| M.get_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |), - [ M.read (| Value.String "unicode code point out of range" |); M.read (| fmt |) ] + [ + M.read (| M.of_value (| Value.String "unicode code point out of range" |) |); + M.read (| fmt |) + ] |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/clone.v b/CoqOfRust/core/clone.v index e5518de14..079769cf6 100644 --- a/CoqOfRust/core/clone.v +++ b/CoqOfRust/core/clone.v @@ -4,7 +4,7 @@ Require Import CoqOfRust.CoqOfRust. Module clone. (* Trait *) Module Clone. - Definition clone_from (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; source ] => ltac:(M.monadic @@ -49,7 +49,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -74,7 +74,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -99,7 +99,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -124,7 +124,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -149,7 +149,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -174,7 +174,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -199,7 +199,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -224,7 +224,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -249,7 +249,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -274,7 +274,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -299,7 +299,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -324,7 +324,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -349,7 +349,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -374,7 +374,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -399,7 +399,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -424,7 +424,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -449,7 +449,7 @@ Module clone. *self } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -474,7 +474,7 @@ Module clone. *self } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -501,7 +501,7 @@ Module clone. *self } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -528,7 +528,7 @@ Module clone. *self } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/cmp.v b/CoqOfRust/core/cmp.v index 051eea6c0..a4cdcef2d 100644 --- a/CoqOfRust/core/cmp.v +++ b/CoqOfRust/core/cmp.v @@ -4,17 +4,18 @@ Require Import CoqOfRust.CoqOfRust. Module cmp. (* Trait *) Module PartialEq. - Definition ne (Rhs Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (Rhs Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Self, [ Rhs ], "eq", [] |), [ M.read (| self |); M.read (| other |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -25,12 +26,12 @@ Module cmp. (* Trait *) Module Eq. - Definition assert_receiver_is_total_eq (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -74,7 +75,7 @@ Module cmp. Definition Self : Ty.t := Ty.path "core::cmp::Ordering". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -117,7 +118,7 @@ Module cmp. Definition Self : Ty.t := Ty.path "core::cmp::Ordering". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -144,7 +145,7 @@ Module cmp. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -172,12 +173,12 @@ Module cmp. Definition Self : Ty.t := Ty.path "core::cmp::Ordering". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -194,7 +195,7 @@ Module cmp. Definition Self : Ty.t := Ty.path "core::cmp::Ordering". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -249,7 +250,7 @@ Module cmp. Definition Self : Ty.t := Ty.path "core::cmp::Ordering". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -298,7 +299,7 @@ Module cmp. Definition Self : Ty.t := Ty.path "core::cmp::Ordering". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -315,15 +316,15 @@ Module cmp. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Less" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Less" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Equal" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Equal" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Greater" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Greater" |) |) |))) ] |) |) @@ -344,7 +345,7 @@ Module cmp. Definition Self : Ty.t := Ty.path "core::cmp::Ordering". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -387,7 +388,7 @@ Module cmp. matches!(self, Equal) } *) - Definition is_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition is_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -396,8 +397,8 @@ Module cmp. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -411,21 +412,22 @@ Module cmp. !matches!(self, Equal) } *) - Definition is_ne (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -436,7 +438,7 @@ Module cmp. matches!(self, Less) } *) - Definition is_lt (τ : list Ty.t) (α : list Value.t) : M := + Definition is_lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -445,8 +447,8 @@ Module cmp. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -460,7 +462,7 @@ Module cmp. matches!(self, Greater) } *) - Definition is_gt (τ : list Ty.t) (α : list Value.t) : M := + Definition is_gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -469,8 +471,8 @@ Module cmp. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -484,21 +486,22 @@ Module cmp. !matches!(self, Greater) } *) - Definition is_le (τ : list Ty.t) (α : list Value.t) : M := + Definition is_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -509,21 +512,22 @@ Module cmp. !matches!(self, Less) } *) - Definition is_ge (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -538,7 +542,7 @@ Module cmp. } } *) - Definition reverse (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -549,12 +553,19 @@ Module cmp. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))) ] |) |))) @@ -571,7 +582,7 @@ Module cmp. } } *) - Definition then_ (τ : list Ty.t) (α : list Value.t) : M := + Definition then_ (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -596,7 +607,7 @@ Module cmp. } } *) - Definition then_with (τ : list Ty.t) (α : list Value.t) : M := + Definition then_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; f ] => ltac:(M.monadic @@ -617,7 +628,7 @@ Module cmp. "call_once", [] |), - [ M.read (| f |); Value.Tuple [] ] + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] |) |))); fun γ => ltac:(M.monadic self) @@ -653,7 +664,7 @@ Module cmp. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cmp::Reverse") [ T ]. (* PartialEq *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -695,7 +706,7 @@ Module cmp. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cmp::Reverse") [ T ]. (* Eq *) - Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -703,8 +714,8 @@ Module cmp. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -724,7 +735,7 @@ Module cmp. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cmp::Reverse") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -739,16 +750,17 @@ Module cmp. |), [ M.read (| f |); - M.read (| Value.String "Reverse" |); + M.read (| M.of_value (| Value.String "Reverse" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::cmp::Reverse", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -779,19 +791,22 @@ Module cmp. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cmp::Reverse") [ T ]. (* Default *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::cmp::Reverse" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "core::cmp::Reverse" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -808,7 +823,7 @@ Module cmp. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::cmp::Reverse") [ T ]. (* Hash *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ __H ], [ self; state ] => @@ -842,7 +857,7 @@ Module cmp. other.0.partial_cmp(&self.0) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -864,7 +879,7 @@ Module cmp. other.0 < self.0 } *) - Definition lt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -886,7 +901,7 @@ Module cmp. other.0 <= self.0 } *) - Definition le (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -908,7 +923,7 @@ Module cmp. other.0 > self.0 } *) - Definition gt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -930,7 +945,7 @@ Module cmp. other.0 >= self.0 } *) - Definition ge (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -971,7 +986,7 @@ Module cmp. other.0.cmp(&self.0) } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1005,26 +1020,29 @@ Module cmp. Reverse(self.0.clone()) } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::cmp::Reverse" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::cmp::Reverse", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::cmp::Reverse" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::cmp::Reverse", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1033,7 +1051,7 @@ Module cmp. self.0.clone_from(&other.0) } *) - Definition clone_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1065,7 +1083,7 @@ Module cmp. (* Trait *) Module Ord. - Definition max (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1091,7 +1109,7 @@ Module cmp. end. Axiom ProvidedMethod_max : M.IsProvidedMethod "core::cmp::Ord" "max" max. - Definition min (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1117,7 +1135,7 @@ Module cmp. end. Axiom ProvidedMethod_min : M.IsProvidedMethod "core::cmp::Ord" "min" min. - Definition clamp (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clamp (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; min; max ] => ltac:(M.monadic @@ -1127,15 +1145,15 @@ Module cmp. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Self, @@ -1144,22 +1162,27 @@ Module cmp. [] |), [ min; max ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: min <= max" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: min <= max" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1182,7 +1205,7 @@ Module cmp. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1217,7 +1240,7 @@ Module cmp. (* Trait *) Module PartialOrd. - Definition lt (Rhs Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (Rhs Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1246,8 +1269,8 @@ Module cmp. "core::option::Option::Some", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1257,7 +1280,7 @@ Module cmp. Axiom ProvidedMethod_lt : forall (Rhs : Ty.t), M.IsProvidedMethod "core::cmp::PartialOrd" "lt" (lt Rhs). - Definition le (Rhs Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (Rhs Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1289,18 +1312,19 @@ Module cmp. M.find_or_pattern (| γ0_0, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1310,7 +1334,7 @@ Module cmp. Axiom ProvidedMethod_le : forall (Rhs : Ty.t), M.IsProvidedMethod "core::cmp::PartialOrd" "le" (le Rhs). - Definition gt (Rhs Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (Rhs Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1339,8 +1363,8 @@ Module cmp. "core::option::Option::Some", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1350,7 +1374,7 @@ Module cmp. Axiom ProvidedMethod_gt : forall (Rhs : Ty.t), M.IsProvidedMethod "core::cmp::PartialOrd" "gt" (gt Rhs). - Definition ge (Rhs Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (Rhs Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1382,18 +1406,19 @@ Module cmp. M.find_or_pattern (| γ0_0, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1410,7 +1435,7 @@ Module cmp. v1.min(v2) } *) - Definition min (τ : list Ty.t) (α : list Value.t) : M := + Definition min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ v1; v2 ] => ltac:(M.monadic @@ -1431,7 +1456,7 @@ Module cmp. } } *) - Definition min_by (τ : list Ty.t) (α : list Value.t) : M := + Definition min_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v1; v2; compare ] => ltac:(M.monadic @@ -1449,7 +1474,10 @@ Module cmp. "call_once", [] |), - [ M.read (| compare |); Value.Tuple [ v1; v2 ] ] + [ + M.read (| compare |); + M.of_value (| Value.Tuple [ A.to_value v1; A.to_value v2 ] |) + ] |) |), [ @@ -1458,12 +1486,12 @@ Module cmp. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => - ltac:(M.monadic match γ with | [] => v1 | _ => M.impossible (||) end)) + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => v1 | _ => M.impossible (||) end) + |) |))); fun γ => ltac:(M.monadic v2) ] @@ -1477,7 +1505,7 @@ Module cmp. min_by(v1, v2, |v1, v2| f(v1).cmp(&f(v2))) } *) - Definition min_by_key (τ : list Ty.t) (α : list Value.t) : M := + Definition min_by_key (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F; K ], [ v1; v2; f ] => ltac:(M.monadic @@ -1497,8 +1525,8 @@ Module cmp. [ M.read (| v1 |); M.read (| v2 |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1526,7 +1554,12 @@ Module cmp. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| v1 |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| v1 |)) ] + |) + ] |) |); M.alloc (| @@ -1538,7 +1571,12 @@ Module cmp. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| v2 |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| v2 |)) ] + |) + ] |) |) ] @@ -1548,7 +1586,8 @@ Module cmp. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1559,7 +1598,7 @@ Module cmp. v1.max(v2) } *) - Definition max (τ : list Ty.t) (α : list Value.t) : M := + Definition max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ v1; v2 ] => ltac:(M.monadic @@ -1580,7 +1619,7 @@ Module cmp. } } *) - Definition max_by (τ : list Ty.t) (α : list Value.t) : M := + Definition max_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v1; v2; compare ] => ltac:(M.monadic @@ -1598,7 +1637,10 @@ Module cmp. "call_once", [] |), - [ M.read (| compare |); Value.Tuple [ v1; v2 ] ] + [ + M.read (| compare |); + M.of_value (| Value.Tuple [ A.to_value v1; A.to_value v2 ] |) + ] |) |), [ @@ -1607,12 +1649,12 @@ Module cmp. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => - ltac:(M.monadic match γ with | [] => v2 | _ => M.impossible (||) end)) + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => v2 | _ => M.impossible (||) end) + |) |))); fun γ => ltac:(M.monadic v1) ] @@ -1626,7 +1668,7 @@ Module cmp. max_by(v1, v2, |v1, v2| f(v1).cmp(&f(v2))) } *) - Definition max_by_key (τ : list Ty.t) (α : list Value.t) : M := + Definition max_by_key (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F; K ], [ v1; v2; f ] => ltac:(M.monadic @@ -1646,8 +1688,8 @@ Module cmp. [ M.read (| v1 |); M.read (| v2 |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1675,7 +1717,12 @@ Module cmp. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| v1 |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| v1 |)) ] + |) + ] |) |); M.alloc (| @@ -1687,7 +1734,12 @@ Module cmp. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| v2 |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| v2 |)) ] + |) + ] |) |) ] @@ -1697,7 +1749,8 @@ Module cmp. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1711,7 +1764,7 @@ Module cmp. if v1 <= v2 { [v1, v2] } else { [v2, v1] } } *) - Definition minmax (τ : list Ty.t) (α : list Value.t) : M := + Definition minmax (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ v1; v2 ] => ltac:(M.monadic @@ -1719,7 +1772,7 @@ Module cmp. let v2 := M.alloc (| v2 |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1732,9 +1785,18 @@ Module cmp. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Array [ M.read (| v1 |); M.read (| v2 |) ] |))); + M.alloc (| + M.of_value (| + Value.Array [ A.to_value (M.read (| v1 |)); A.to_value (M.read (| v2 |)) ] + |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Array [ M.read (| v2 |); M.read (| v1 |) ] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Array [ A.to_value (M.read (| v2 |)); A.to_value (M.read (| v1 |)) ] + |) + |))) ] |) |))) @@ -1749,7 +1811,7 @@ Module cmp. if compare(&v1, &v2).is_le() { [v1, v2] } else { [v2, v1] } } *) - Definition minmax_by (τ : list Ty.t) (α : list Value.t) : M := + Definition minmax_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v1; v2; compare ] => ltac:(M.monadic @@ -1758,7 +1820,7 @@ Module cmp. let compare := M.alloc (| compare |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1783,15 +1845,27 @@ Module cmp. "call_once", [] |), - [ M.read (| compare |); Value.Tuple [ v1; v2 ] ] + [ + M.read (| compare |); + M.of_value (| Value.Tuple [ A.to_value v1; A.to_value v2 ] |) + ] |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Array [ M.read (| v1 |); M.read (| v2 |) ] |))); + M.alloc (| + M.of_value (| + Value.Array [ A.to_value (M.read (| v1 |)); A.to_value (M.read (| v2 |)) ] + |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Array [ M.read (| v2 |); M.read (| v1 |) ] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Array [ A.to_value (M.read (| v2 |)); A.to_value (M.read (| v1 |)) ] + |) + |))) ] |) |))) @@ -1807,7 +1881,7 @@ Module cmp. minmax_by(v1, v2, |v1, v2| f(v1).cmp(&f(v2))) } *) - Definition minmax_by_key (τ : list Ty.t) (α : list Value.t) : M := + Definition minmax_by_key (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F; K ], [ v1; v2; f ] => ltac:(M.monadic @@ -1827,8 +1901,8 @@ Module cmp. [ M.read (| v1 |); M.read (| v2 |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1856,7 +1930,12 @@ Module cmp. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| v1 |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| v1 |)) ] + |) + ] |) |); M.alloc (| @@ -1868,7 +1947,12 @@ Module cmp. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| v2 |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| v2 |)) ] + |) + ] |) |) ] @@ -1878,7 +1962,8 @@ Module cmp. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1893,13 +1978,13 @@ Module cmp. true } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _other := M.alloc (| _other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -1908,13 +1993,13 @@ Module cmp. false } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _other := M.alloc (| _other |) in - Value.Bool false)) + M.of_value (| Value.Bool false |))) | _, _ => M.impossible end. @@ -1930,24 +2015,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "bool". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -1963,24 +2048,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "char". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -1996,24 +2081,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "usize". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2029,24 +2114,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "u8". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2062,24 +2147,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "u16". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2095,24 +2180,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "u32". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2128,24 +2213,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "u64". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2161,24 +2246,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "u128". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2194,24 +2279,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "isize". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2227,24 +2312,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "i8". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2260,24 +2345,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "i16". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2293,24 +2378,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "i32". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2326,24 +2411,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "i64". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2359,24 +2444,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "i128". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2392,24 +2477,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "f32". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2425,24 +2510,24 @@ Module cmp. Definition Self : Ty.t := Ty.path "f64". (* fn eq(&self, other: &$t) -> bool { ( *self) == ( *other) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ne(&self, other: &$t) -> bool { ( *self) != ( *other) } *) - Definition ne (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ne (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ne (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2567,7 +2652,7 @@ Module cmp. Some(Equal) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -2578,9 +2663,14 @@ Module cmp. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Equal" [] ])) + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |)) + ] + |))) ] |))) | _, _ => M.impossible @@ -2602,20 +2692,23 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "bool", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "bool", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2640,7 +2733,7 @@ Module cmp. } } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2649,15 +2742,21 @@ Module cmp. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - BinOp.Pure.le - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)); - BinOp.Pure.ge - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Pure.le (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |)) + ] + |) |), [ fun γ => @@ -2668,7 +2767,9 @@ Module cmp. M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Bool false |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool false |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -2678,9 +2779,16 @@ Module cmp. let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Greater" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2691,9 +2799,14 @@ Module cmp. let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool false |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Less" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2704,9 +2817,14 @@ Module cmp. let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Equal" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |)) + ] + |) |))) ] |) @@ -2715,46 +2833,46 @@ Module cmp. end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2786,7 +2904,7 @@ Module cmp. } } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2795,15 +2913,21 @@ Module cmp. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - BinOp.Pure.le - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)); - BinOp.Pure.ge - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Pure.le (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |)) + ] + |) |), [ fun γ => @@ -2814,7 +2938,9 @@ Module cmp. M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Bool false |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool false |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -2824,9 +2950,16 @@ Module cmp. let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Greater" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2837,9 +2970,14 @@ Module cmp. let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool false |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Less" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2850,9 +2988,14 @@ Module cmp. let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Equal" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |)) + ] + |) |))) ] |) @@ -2861,46 +3004,46 @@ Module cmp. end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2927,13 +3070,13 @@ Module cmp. Equal } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _other := M.alloc (| _other |) in - Value.StructTuple "core::cmp::Ordering::Equal" [])) + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))) | _, _ => M.impossible end. @@ -2962,7 +3105,7 @@ Module cmp. } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2972,35 +3115,33 @@ Module cmp. M.match_operator (| M.alloc (| BinOp.Panic.sub (| - M.rust_cast (M.read (| M.read (| self |) |)), - M.rust_cast (M.read (| M.read (| other |) |)) + Integer.I8, + M.rust_cast (| M.read (| M.read (| self |) |) |), + M.rust_cast (| M.read (| M.read (| other |) |) |) |) |), [ fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I8 (-1) - |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer (-1) |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I8 0 - |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I8 1 - |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3022,13 +3163,13 @@ Module cmp. self & other } *) - Definition min (τ : list Ty.t) (α : list Value.t) : M := + Definition min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -3037,13 +3178,13 @@ Module cmp. self | other } *) - Definition max (τ : list Ty.t) (α : list Value.t) : M := + Definition max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -3053,7 +3194,7 @@ Module cmp. self.max(min).min(max) } *) - Definition clamp (τ : list Ty.t) (α : list Value.t) : M := + Definition clamp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; min; max ] => ltac:(M.monadic @@ -3063,14 +3204,16 @@ Module cmp. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (BinOp.Pure.le (M.read (| min |)) (M.read (| max |))) + UnOp.Pure.not (| + BinOp.Pure.le (| M.read (| min |), M.read (| max |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3078,11 +3221,15 @@ Module cmp. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: min <= max" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: min <= max" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3123,64 +3270,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "char", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "char", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -3211,7 +3361,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3219,42 +3369,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -3279,64 +3437,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -3367,7 +3528,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3375,42 +3536,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -3435,64 +3604,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "u8", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "u8", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -3523,7 +3695,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3531,42 +3703,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -3591,64 +3771,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "u16", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "u16", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -3679,7 +3862,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3687,42 +3870,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -3747,64 +3938,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "u32", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "u32", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -3835,7 +4029,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3843,42 +4037,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -3903,64 +4105,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "u64", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "u64", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -3991,7 +4196,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3999,42 +4204,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -4059,64 +4272,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "u128", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "u128", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -4147,7 +4363,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4155,42 +4371,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -4215,64 +4439,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "isize", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "isize", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -4303,7 +4530,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4311,42 +4538,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -4371,64 +4606,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "i8", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "i8", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -4459,7 +4697,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4467,42 +4705,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -4527,64 +4773,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "i16", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "i16", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -4615,7 +4864,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4623,42 +4872,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -4683,64 +4940,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "i32", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "i32", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -4771,7 +5031,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4779,42 +5039,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -4839,64 +5107,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "i64", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "i64", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -4927,7 +5198,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4935,42 +5206,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -4995,64 +5274,67 @@ Module cmp. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "i128", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "i128", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. (* fn lt(&self, other: &$t) -> bool { ( *self) < ( *other) } *) - Definition lt (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn le(&self, other: &$t) -> bool { ( *self) <= ( *other) } *) - Definition le (τ : list Ty.t) (α : list Value.t) : M := + Definition le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn ge(&self, other: &$t) -> bool { ( *self) >= ( *other) } *) - Definition ge (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. (* fn gt(&self, other: &$t) -> bool { ( *self) > ( *other) } *) - Definition gt (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -5083,7 +5365,7 @@ Module cmp. else { Greater } } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5091,42 +5373,50 @@ Module cmp. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.lt (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -5151,7 +5441,7 @@ Module cmp. *self } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -5187,7 +5477,7 @@ Module cmp. *self } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -5216,7 +5506,7 @@ Module cmp. *self } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -5245,7 +5535,7 @@ Module cmp. PartialEq::eq( *self, *other) } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5264,7 +5554,7 @@ Module cmp. PartialEq::ne( *self, *other) } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5296,7 +5586,7 @@ Module cmp. PartialOrd::partial_cmp( *self, *other) } *) - Definition partial_cmp (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5315,7 +5605,7 @@ Module cmp. PartialOrd::lt( *self, *other) } *) - Definition lt (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5334,7 +5624,7 @@ Module cmp. PartialOrd::le( *self, *other) } *) - Definition le (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5353,7 +5643,7 @@ Module cmp. PartialOrd::gt( *self, *other) } *) - Definition gt (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5372,7 +5662,7 @@ Module cmp. PartialOrd::ge( *self, *other) } *) - Definition ge (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5410,7 +5700,7 @@ Module cmp. Ord::cmp( *self, *other) } *) - Definition cmp (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; other ] => @@ -5453,7 +5743,7 @@ Module cmp. PartialEq::eq( *self, *other) } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5472,7 +5762,7 @@ Module cmp. PartialEq::ne( *self, *other) } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5504,7 +5794,7 @@ Module cmp. PartialOrd::partial_cmp( *self, *other) } *) - Definition partial_cmp (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5523,7 +5813,7 @@ Module cmp. PartialOrd::lt( *self, *other) } *) - Definition lt (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5542,7 +5832,7 @@ Module cmp. PartialOrd::le( *self, *other) } *) - Definition le (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5561,7 +5851,7 @@ Module cmp. PartialOrd::gt( *self, *other) } *) - Definition gt (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5580,7 +5870,7 @@ Module cmp. PartialOrd::ge( *self, *other) } *) - Definition ge (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5618,7 +5908,7 @@ Module cmp. Ord::cmp( *self, *other) } *) - Definition cmp (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; other ] => @@ -5661,7 +5951,7 @@ Module cmp. PartialEq::eq( *self, *other) } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5680,7 +5970,7 @@ Module cmp. PartialEq::ne( *self, *other) } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5712,7 +6002,7 @@ Module cmp. PartialEq::eq( *self, *other) } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -5731,7 +6021,7 @@ Module cmp. PartialEq::ne( *self, *other) } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => diff --git a/CoqOfRust/core/convert/mod.v b/CoqOfRust/core/convert/mod.v index 2f381eb7a..2d9c4edd3 100644 --- a/CoqOfRust/core/convert/mod.v +++ b/CoqOfRust/core/convert/mod.v @@ -7,7 +7,7 @@ Module convert. x } *) - Definition identity (τ : list Ty.t) (α : list Value.t) : M := + Definition identity (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -42,7 +42,7 @@ Module convert. >::as_ref( *self) } *) - Definition as_ref (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self ] => @@ -72,7 +72,7 @@ Module convert. >::as_ref( *self) } *) - Definition as_ref (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self ] => @@ -102,7 +102,7 @@ Module convert. ( *self).as_mut() } *) - Definition as_mut (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self ] => @@ -132,7 +132,7 @@ Module convert. U::from(self) } *) - Definition into (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self ] => @@ -162,7 +162,7 @@ Module convert. t } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -189,7 +189,7 @@ Module convert. t } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -219,7 +219,7 @@ Module convert. U::try_from(self) } *) - Definition try_into (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_into (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self ] => @@ -256,20 +256,23 @@ Module convert. Ok(U::into(value)) } *) - Definition try_from (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| "core::convert::Into", U, [ T ], "into", [] |), - [ M.read (| value |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::convert::Into", U, [ T ], "into", [] |), + [ M.read (| value |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -294,7 +297,7 @@ Module convert. self } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -321,7 +324,7 @@ Module convert. self } *) - Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -348,7 +351,7 @@ Module convert. self } *) - Definition as_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -373,7 +376,7 @@ Module convert. self } *) - Definition as_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -417,7 +420,7 @@ Module convert. match *self {} } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -442,7 +445,7 @@ Module convert. match *self {} } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -475,7 +478,7 @@ Module convert. match *self {} } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -508,7 +511,7 @@ Module convert. match *self {} } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -533,7 +536,7 @@ Module convert. match *self {} } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -573,7 +576,7 @@ Module convert. match *self {} } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _other ] => ltac:(M.monadic @@ -599,7 +602,7 @@ Module convert. match *self {} } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _other ] => ltac:(M.monadic @@ -625,7 +628,7 @@ Module convert. x } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -650,7 +653,7 @@ Module convert. match *self {} } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; β1 ] => ltac:(M.monadic diff --git a/CoqOfRust/core/convert/num.v b/CoqOfRust/core/convert/num.v index 94174f60f..b97ef895e 100644 --- a/CoqOfRust/core/convert/num.v +++ b/CoqOfRust/core/convert/num.v @@ -31,7 +31,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -63,7 +63,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -95,7 +95,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -127,7 +127,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -159,7 +159,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -191,7 +191,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -223,7 +223,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -255,7 +255,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -287,7 +287,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -319,7 +319,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -351,7 +351,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -383,7 +383,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -426,7 +426,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -458,7 +458,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -490,7 +490,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -522,7 +522,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -554,7 +554,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -586,7 +586,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -618,7 +618,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -650,7 +650,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -682,7 +682,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -714,7 +714,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -746,7 +746,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -778,7 +778,7 @@ Module convert. unsafe { crate::intrinsics::float_to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -809,12 +809,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -834,12 +834,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -859,12 +859,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -884,12 +884,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -909,12 +909,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -934,12 +934,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -959,12 +959,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -984,12 +984,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1009,12 +1009,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1034,12 +1034,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1059,12 +1059,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1084,12 +1084,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1109,12 +1109,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1134,12 +1134,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1159,12 +1159,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1184,12 +1184,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1209,12 +1209,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1234,12 +1234,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1259,12 +1259,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1284,12 +1284,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1309,12 +1309,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1334,12 +1334,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1359,12 +1359,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1384,12 +1384,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1409,12 +1409,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1434,12 +1434,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1459,12 +1459,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1484,12 +1484,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1509,12 +1509,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1534,12 +1534,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1559,12 +1559,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1584,12 +1584,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1609,12 +1609,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1634,12 +1634,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1659,12 +1659,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1684,12 +1684,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1709,12 +1709,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1734,12 +1734,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1759,12 +1759,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1784,12 +1784,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1809,12 +1809,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1834,12 +1834,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1859,12 +1859,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1884,12 +1884,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1909,12 +1909,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1934,12 +1934,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1959,12 +1959,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -1984,12 +1984,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2009,12 +2009,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2034,12 +2034,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2059,12 +2059,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2084,12 +2084,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2109,12 +2109,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2134,12 +2134,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2159,12 +2159,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2184,12 +2184,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2209,12 +2209,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2234,12 +2234,12 @@ Module convert. small as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.read (| small |)))) + M.rust_cast (| M.read (| small |) |))) | _, _ => M.impossible end. @@ -2259,12 +2259,12 @@ Module convert. small as u8 as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.rust_cast (M.read (| small |))))) + M.rust_cast (| M.rust_cast (| M.read (| small |) |) |))) | _, _ => M.impossible end. @@ -2284,12 +2284,12 @@ Module convert. small as u8 as Self } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic (let small := M.alloc (| small |) in - M.rust_cast (M.rust_cast (M.read (| small |))))) + M.rust_cast (| M.rust_cast (| M.read (| small |) |) |))) | _, _ => M.impossible end. @@ -2316,37 +2316,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2378,37 +2389,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2440,37 +2462,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2502,37 +2535,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2564,37 +2608,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2626,37 +2681,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2688,37 +2754,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2750,37 +2827,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2812,37 +2900,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2874,37 +2973,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -2938,18 +3048,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2957,23 +3071,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3007,18 +3132,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3026,23 +3155,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3076,18 +3216,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3095,23 +3239,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3145,18 +3300,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3164,23 +3323,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3214,18 +3384,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3233,23 +3407,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3283,18 +3468,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3302,23 +3491,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3352,18 +3552,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3371,23 +3575,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3421,18 +3636,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3440,23 +3659,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3490,18 +3720,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3509,23 +3743,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3559,18 +3804,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3578,23 +3827,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3626,37 +3886,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3688,37 +3959,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3750,37 +4032,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3812,37 +4105,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3874,37 +4178,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3936,37 +4251,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -3998,37 +4324,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -4060,37 +4397,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -4122,37 +4470,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -4184,37 +4543,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -4246,37 +4616,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -4308,37 +4689,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -4370,37 +4762,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -4432,37 +4835,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -4494,37 +4908,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -4556,35 +4981,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -4616,35 +5051,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -4676,35 +5121,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -4736,35 +5191,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -4796,35 +5261,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -4856,35 +5331,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -4916,35 +5401,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -4976,35 +5471,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -5036,35 +5541,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -5096,35 +5611,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I32 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -5156,35 +5681,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I32 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -5216,35 +5751,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I32 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -5276,35 +5821,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I64 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -5336,35 +5891,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I64 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -5396,35 +5961,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I128 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -5458,18 +6033,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5477,23 +6056,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -5527,18 +6117,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5546,23 +6140,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -5596,18 +6201,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5615,23 +6224,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -5665,18 +6285,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5684,23 +6308,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -5734,18 +6369,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5753,23 +6392,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -5803,18 +6453,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5822,23 +6476,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -5872,18 +6537,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5891,23 +6560,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -5941,18 +6621,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5960,23 +6644,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6010,18 +6705,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6029,23 +6728,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6079,18 +6789,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6098,23 +6812,34 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6146,37 +6871,48 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6208,35 +6944,45 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -6269,41 +7015,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6335,41 +7089,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6401,41 +7163,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6463,12 +7233,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -6492,12 +7266,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -6525,41 +7303,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6591,41 +7377,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6657,41 +7451,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6723,41 +7525,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6785,12 +7595,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -6820,18 +7634,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6839,27 +7657,35 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6893,18 +7719,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6912,27 +7742,35 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -6966,18 +7804,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6985,27 +7827,35 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -7037,39 +7887,46 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -7101,39 +7958,46 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -7167,18 +8031,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7186,27 +8054,35 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -7240,18 +8116,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7259,27 +8139,35 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -7313,18 +8201,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7332,27 +8224,35 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -7380,12 +8280,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -7409,12 +8313,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -7438,12 +8346,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -7467,12 +8379,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -7500,41 +8416,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -7566,39 +8490,46 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => - ltac:(M.monadic - (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -7630,39 +8561,46 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -7694,39 +8632,46 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I32 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -7758,39 +8703,46 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| u |)) (Value.Integer Integer.I64 0) + BinOp.Pure.ge (| M.read (| u |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -7824,18 +8776,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7843,27 +8799,35 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -7891,12 +8855,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -7920,12 +8888,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -7953,41 +8925,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -8019,41 +8999,49 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| u |)) - (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.gt (| + M.read (| u |), + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -8081,12 +9069,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -8110,12 +9102,16 @@ Module convert. Ok(value as Self) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructTuple "core::result::Result::Ok" [ M.rust_cast (M.read (| value |)) ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| value |) |)) ] + |))) | _, _ => M.impossible end. @@ -8145,18 +9141,22 @@ Module convert. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| let min := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MIN" |) |) |) + |) in let max := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8164,27 +9164,35 @@ Module convert. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt (M.read (| u |)) (M.read (| min |)), - ltac:(M.monadic (BinOp.Pure.gt (M.read (| u |)) (M.read (| max |)))) + BinOp.Pure.lt (| M.read (| u |), M.read (| min |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| u |), M.read (| max |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::num::error::TryFromIntError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ M.rust_cast (M.read (| u |)) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.rust_cast (| M.read (| u |) |)) ] + |) |))) ] |) @@ -8213,7 +9221,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8268,7 +9276,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8323,7 +9331,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8378,7 +9386,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8433,7 +9441,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8488,7 +9496,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8543,7 +9551,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8598,7 +9606,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8653,7 +9661,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8708,7 +9716,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8763,7 +9771,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8818,7 +9826,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8873,7 +9881,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8928,7 +9936,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -8983,7 +9991,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9038,7 +10046,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9093,7 +10101,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9148,7 +10156,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9203,7 +10211,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9258,7 +10266,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9313,7 +10321,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9368,7 +10376,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9423,7 +10431,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9478,7 +10486,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9533,7 +10541,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9588,7 +10596,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9643,7 +10651,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9698,7 +10706,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9753,7 +10761,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9808,7 +10816,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9863,7 +10871,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9918,7 +10926,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -9973,7 +10981,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -10028,7 +11036,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -10083,7 +11091,7 @@ Module convert. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ small ] => ltac:(M.monadic @@ -10138,7 +11146,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10160,7 +11168,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10186,7 +11198,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10208,7 +11220,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10234,7 +11250,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10256,7 +11272,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10282,7 +11302,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10304,7 +11324,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10330,7 +11354,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10352,7 +11376,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10378,7 +11406,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10400,7 +11428,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10426,7 +11458,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10448,7 +11480,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10474,7 +11510,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10496,7 +11532,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10522,7 +11562,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10544,7 +11584,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10570,7 +11614,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10592,7 +11636,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10618,7 +11666,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10640,7 +11688,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10666,7 +11718,7 @@ Module convert. Self::new(value).ok_or(TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10688,7 +11740,11 @@ Module convert. |), [ M.read (| value |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -10717,7 +11773,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10755,8 +11811,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10777,7 +11833,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10806,7 +11863,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10844,8 +11901,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10866,7 +11923,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10895,7 +11953,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -10933,8 +11991,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10955,7 +12013,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10984,7 +12043,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11022,8 +12081,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11044,7 +12103,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11073,7 +12133,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11111,8 +12171,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11133,7 +12193,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11162,7 +12223,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11200,8 +12261,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11222,7 +12283,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11251,7 +12313,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11289,8 +12351,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11311,7 +12373,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11340,7 +12403,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11378,8 +12441,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11400,7 +12463,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11429,7 +12493,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11467,8 +12531,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11489,7 +12553,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11518,7 +12583,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11556,8 +12621,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11578,7 +12643,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11607,7 +12673,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11645,8 +12711,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11667,7 +12733,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11696,7 +12763,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11734,8 +12801,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11756,7 +12823,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11785,7 +12853,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11823,8 +12891,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11845,7 +12913,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11874,7 +12943,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -11912,8 +12981,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -11934,7 +13003,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -11963,7 +13033,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12001,8 +13071,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12023,7 +13093,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12052,7 +13123,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12090,8 +13161,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12112,7 +13183,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12141,7 +13213,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12179,8 +13251,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12201,7 +13273,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12230,7 +13303,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12268,8 +13341,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12290,7 +13363,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12319,7 +13393,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12357,8 +13431,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12379,7 +13453,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12408,7 +13483,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12446,8 +13521,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12468,7 +13543,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12497,7 +13573,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12535,8 +13611,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12557,7 +13633,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12586,7 +13663,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12624,8 +13701,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12646,7 +13723,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12675,7 +13753,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12713,8 +13791,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12735,7 +13813,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12764,7 +13843,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12802,8 +13881,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12824,7 +13903,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12853,7 +13933,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12891,8 +13971,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12913,7 +13993,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -12942,7 +14023,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -12980,8 +14061,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13002,7 +14083,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13031,7 +14113,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13069,8 +14151,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13091,7 +14173,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13120,7 +14203,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13158,8 +14241,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13180,7 +14263,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13209,7 +14293,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13247,8 +14331,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13269,7 +14353,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13298,7 +14383,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13336,8 +14421,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13358,7 +14443,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13387,7 +14473,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13425,8 +14511,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13447,7 +14533,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13476,7 +14563,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13514,8 +14601,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13536,7 +14623,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13565,7 +14653,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13603,8 +14691,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13625,7 +14713,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13654,7 +14743,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13692,8 +14781,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13714,7 +14803,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13743,7 +14833,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13781,8 +14871,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13803,7 +14893,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13832,7 +14923,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13870,8 +14961,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13892,7 +14983,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -13921,7 +15013,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -13959,8 +15051,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13981,7 +15073,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14010,7 +15103,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14048,8 +15141,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14070,7 +15163,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14099,7 +15193,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14137,8 +15231,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14159,7 +15253,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14188,7 +15283,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14226,8 +15321,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14248,7 +15343,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14277,7 +15373,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14315,8 +15411,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14337,7 +15433,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14366,7 +15463,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14404,8 +15501,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14426,7 +15523,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14455,7 +15553,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14493,8 +15591,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14515,7 +15613,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14544,7 +15643,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14582,8 +15681,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14604,7 +15703,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14633,7 +15733,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14671,8 +15771,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14693,7 +15793,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14722,7 +15823,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14760,8 +15861,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14782,7 +15883,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14811,7 +15913,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14849,8 +15951,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14871,7 +15973,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14900,7 +16003,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -14938,8 +16041,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14960,7 +16063,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -14989,7 +16093,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15027,8 +16131,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15049,7 +16153,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15078,7 +16183,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15116,8 +16221,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15138,7 +16243,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15167,7 +16273,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15205,8 +16311,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15227,7 +16333,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15256,7 +16363,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15294,8 +16401,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15316,7 +16423,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15345,7 +16453,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15383,8 +16491,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15405,7 +16513,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15434,7 +16543,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15472,8 +16581,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15494,7 +16603,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15523,7 +16633,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15561,8 +16671,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15583,7 +16693,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15612,7 +16723,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15650,8 +16761,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15672,7 +16783,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15701,7 +16813,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15739,8 +16851,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15761,7 +16873,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15790,7 +16903,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15828,8 +16941,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15850,7 +16963,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15879,7 +16993,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -15917,8 +17031,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -15939,7 +17053,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -15968,7 +17083,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16006,8 +17121,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16028,7 +17143,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16057,7 +17173,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16095,8 +17211,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16117,7 +17233,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16146,7 +17263,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16184,8 +17301,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16206,7 +17323,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16235,7 +17353,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16273,8 +17391,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16295,7 +17413,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16324,7 +17443,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16362,8 +17481,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16384,7 +17503,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16413,7 +17533,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16451,8 +17571,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16473,7 +17593,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16502,7 +17623,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16540,8 +17661,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16562,7 +17683,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16591,7 +17713,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16629,8 +17751,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16651,7 +17773,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16680,7 +17803,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16718,8 +17841,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16740,7 +17863,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16769,7 +17893,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16807,8 +17931,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16829,7 +17953,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16858,7 +17983,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16896,8 +18021,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -16918,7 +18043,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -16947,7 +18073,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -16985,8 +18111,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17007,7 +18133,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17036,7 +18163,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17074,8 +18201,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17096,7 +18223,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17125,7 +18253,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17163,8 +18291,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17185,7 +18313,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17214,7 +18343,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17252,8 +18381,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17274,7 +18403,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17303,7 +18433,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17341,8 +18471,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17363,7 +18493,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17392,7 +18523,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17430,8 +18561,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17452,7 +18583,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17481,7 +18613,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17519,8 +18651,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17541,7 +18673,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17570,7 +18703,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17608,8 +18741,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17630,7 +18763,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17659,7 +18793,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17697,8 +18831,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17719,7 +18853,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17748,7 +18883,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17786,8 +18921,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17808,7 +18943,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17837,7 +18973,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17875,8 +19011,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17897,7 +19033,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -17926,7 +19063,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -17964,8 +19101,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -17986,7 +19123,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18015,7 +19153,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18053,8 +19191,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18075,7 +19213,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18104,7 +19243,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18142,8 +19281,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18164,7 +19303,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18193,7 +19333,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18231,8 +19371,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18253,7 +19393,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18282,7 +19423,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18320,8 +19461,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18342,7 +19483,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18371,7 +19513,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18409,8 +19551,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18431,7 +19573,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18460,7 +19603,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18498,8 +19641,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18520,7 +19663,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18549,7 +19693,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18587,8 +19731,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18609,7 +19753,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18638,7 +19783,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18676,8 +19821,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18698,7 +19843,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18727,7 +19873,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18765,8 +19911,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18787,7 +19933,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18816,7 +19963,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18854,8 +20001,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18876,7 +20023,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18905,7 +20053,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -18943,8 +20091,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -18965,7 +20113,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -18994,7 +20143,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -19032,8 +20181,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -19054,7 +20203,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -19083,7 +20233,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -19121,8 +20271,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -19143,7 +20293,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -19172,7 +20323,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -19210,8 +20361,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -19232,7 +20383,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -19261,7 +20413,7 @@ Module convert. }) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic @@ -19299,8 +20451,8 @@ Module convert. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -19321,7 +20473,8 @@ Module convert. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/default.v b/CoqOfRust/core/default.v index edf61d878..a30b33544 100644 --- a/CoqOfRust/core/default.v +++ b/CoqOfRust/core/default.v @@ -13,8 +13,11 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -32,8 +35,11 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Bool false)) | _, _ => M.impossible end. + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Bool false |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -51,8 +57,11 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.UnicodeChar 0)) | _, _ => M.impossible end. + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.UnicodeChar 0 |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -70,9 +79,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.Usize 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -92,9 +101,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U8 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -114,9 +123,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U16 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -136,9 +145,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U32 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -158,9 +167,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U64 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -180,9 +189,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U128 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -202,9 +211,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.Isize 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -224,9 +233,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I8 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -246,9 +255,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I16 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -268,9 +277,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I32 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -290,9 +299,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I64 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -312,9 +321,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I128 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -334,9 +343,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (M.read (| UnsupportedLiteral |))) + | [], [] => ltac:(M.monadic (M.read (| M.of_value (| UnsupportedLiteral |) |))) | _, _ => M.impossible end. @@ -356,9 +365,9 @@ Module default. $v } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (M.read (| UnsupportedLiteral |))) + | [], [] => ltac:(M.monadic (M.read (| M.of_value (| UnsupportedLiteral |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/error.v b/CoqOfRust/core/error.v index d1cc46573..c16706040 100644 --- a/CoqOfRust/core/error.v +++ b/CoqOfRust/core/error.v @@ -4,17 +4,17 @@ Require Import CoqOfRust.CoqOfRust. Module error. (* Trait *) Module Error. - Definition source (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition source (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::option::Option::None" [])) + M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_source : M.IsProvidedMethod "core::error::Error" "source" source. - Definition type_id (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition type_id (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -35,18 +35,18 @@ Module error. end. Axiom ProvidedMethod_type_id : M.IsProvidedMethod "core::error::Error" "type_id" type_id. - Definition description (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition description (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "description() is deprecated; use Display" |))) + M.read (| M.of_value (| Value.String "description() is deprecated; use Display" |) |))) | _, _ => M.impossible end. Axiom ProvidedMethod_description : M.IsProvidedMethod "core::error::Error" "description" description. - Definition cause (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cause (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -59,13 +59,13 @@ Module error. end. Axiom ProvidedMethod_cause : M.IsProvidedMethod "core::error::Error" "cause" cause. - Definition provide (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition provide (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; request ] => ltac:(M.monadic (let self := M.alloc (| self |) in let request := M.alloc (| request |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -84,7 +84,7 @@ Module error. Definition Self : Ty.t := Ty.path "core::error::private::Internal". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -92,7 +92,7 @@ Module error. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Internal" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Internal" |) |) ] |))) | _, _ => M.impossible end. @@ -132,7 +132,7 @@ Module error. t == concrete } *) - Definition is (τ : list Ty.t) (α : list Value.t) : M := + Definition is (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -155,7 +155,10 @@ Module error. "type_id", [] |), - [ M.read (| self |); Value.StructTuple "core::error::private::Internal" [] ] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::error::private::Internal" [] |) + ] |) |) in M.alloc (| @@ -186,14 +189,14 @@ Module error. } } *) - Definition downcast_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -211,18 +214,27 @@ Module error. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.read (| - M.use - (M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |)) - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.read (| + M.use + (M.alloc (| + (* Unsize *) M.pointer_coercion (| M.read (| self |) |) + |)) + |) + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -241,14 +253,14 @@ Module error. } } *) - Definition downcast_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -266,18 +278,27 @@ Module error. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.read (| - M.use - (M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |)) - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.read (| + M.use + (M.alloc (| + (* Unsize *) M.pointer_coercion (| M.read (| self |) |) + |)) + |) + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -290,7 +311,7 @@ Module error. ::is::(self) } *) - Definition is (τ : list Ty.t) (α : list Value.t) : M := + Definition is (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -301,7 +322,7 @@ Module error. "is", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -313,7 +334,7 @@ Module error. ::downcast_ref::(self) } *) - Definition downcast_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -324,7 +345,7 @@ Module error. "downcast_ref", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -336,7 +357,7 @@ Module error. ::downcast_mut::(self) } *) - Definition downcast_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -347,7 +368,7 @@ Module error. "downcast_mut", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -358,7 +379,7 @@ Module error. ::is::(self) } *) - Definition is (τ : list Ty.t) (α : list Value.t) : M := + Definition is (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -369,7 +390,7 @@ Module error. "is", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -381,7 +402,7 @@ Module error. ::downcast_ref::(self) } *) - Definition downcast_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -392,7 +413,7 @@ Module error. "downcast_ref", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -404,7 +425,7 @@ Module error. ::downcast_mut::(self) } *) - Definition downcast_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -415,7 +436,7 @@ Module error. "downcast_mut", [ T ] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -437,19 +458,24 @@ Module error. Source { current: Some(self) } } *) - Definition sources (τ : list Ty.t) (α : list Value.t) : M := + Definition sources (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::error::Source" - [ - ("current", - Value.StructTuple - "core::option::Option::Some" - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ]) - ])) + M.of_value (| + Value.StructRecord + "core::error::Source" + [ + ("current", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (* Unsize *) (M.pointer_coercion (| M.read (| self |) |)) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -467,7 +493,7 @@ Module error. request_by_type_tag::<'a, tags::Value>(err) } *) - Definition request_value (τ : list Ty.t) (α : list Value.t) : M := + Definition request_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; impl_Error__plus___Sized ], [ err ] => ltac:(M.monadic @@ -490,7 +516,7 @@ Module error. request_by_type_tag::<'a, tags::Ref>>(err) } *) - Definition request_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition request_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; impl_Error__plus___Sized ], [ err ] => ltac:(M.monadic @@ -520,7 +546,7 @@ Module error. tagged.0 } *) - Definition request_by_type_tag (τ : list Ty.t) (α : list Value.t) : M := + Definition request_by_type_tag (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I; impl_Error__plus___Sized ], [ err ] => ltac:(M.monadic @@ -528,9 +554,12 @@ Module error. M.read (| let tagged := M.alloc (| - Value.StructTuple - "core::error::TaggedOption" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::error::TaggedOption" + [ A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |) |) in let _ := M.alloc (| @@ -577,15 +606,16 @@ Module error. unsafe { &mut *(erased as *mut dyn Erased<'a> as *mut Request<'a>) } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ erased ] => ltac:(M.monadic (let erased := M.alloc (| erased |) in - M.rust_cast - (M.read (| - M.use (M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| erased |)) |)) - |)))) + M.rust_cast (| + M.read (| + M.use (M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| erased |) |) |)) + |) + |))) | _, _ => M.impossible end. @@ -599,7 +629,7 @@ Module error. self.provide::>(value) } *) - Definition provide_value (τ : list Ty.t) (α : list Value.t) : M := + Definition provide_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self; value ] => ltac:(M.monadic @@ -627,7 +657,7 @@ Module error. self.provide_with::>(fulfil) } *) - Definition provide_value_with (τ : list Ty.t) (α : list Value.t) : M := + Definition provide_value_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; impl_FnOnce___arrow_T ], [ self; fulfil ] => ltac:(M.monadic @@ -652,7 +682,7 @@ Module error. self.provide::>>(value) } *) - Definition provide_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition provide_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self; value ] => ltac:(M.monadic @@ -683,7 +713,7 @@ Module error. self.provide_with::>>(fulfil) } *) - Definition provide_ref_with (τ : list Ty.t) (α : list Value.t) : M := + Definition provide_ref_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; impl_FnOnce___arrow__'a_T ], [ self; fulfil ] => ltac:(M.monadic @@ -719,7 +749,7 @@ Module error. self } *) - Definition provide (τ : list Ty.t) (α : list Value.t) : M := + Definition provide (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; value ] => ltac:(M.monadic @@ -728,7 +758,7 @@ Module error. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -770,10 +800,14 @@ Module error. "core::error::TaggedOption", 0 |), - Value.StructTuple "core::option::Option::Some" [ M.read (| value |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| value |)) ] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.read (| self |) |) @@ -794,7 +828,7 @@ Module error. self } *) - Definition provide_with (τ : list Ty.t) (α : list Value.t) : M := + Definition provide_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I; impl_FnOnce___arrow_I_Reified ], [ self; fulfil ] => ltac:(M.monadic @@ -803,7 +837,7 @@ Module error. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -845,23 +879,26 @@ Module error. "core::error::TaggedOption", 0 |), - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - impl_FnOnce___arrow_I_Reified, - [ Ty.tuple [] ], - "call_once", - [] - |), - [ M.read (| fulfil |); Value.Tuple [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + impl_FnOnce___arrow_I_Reified, + [ Ty.tuple [] ], + "call_once", + [] + |), + [ M.read (| fulfil |); M.of_value (| Value.Tuple [] |) ] + |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.read (| self |) |) @@ -879,7 +916,7 @@ Module error. self.would_be_satisfied_by::>() } *) - Definition would_be_satisfied_by_value_of (τ : list Ty.t) (α : list Value.t) : M := + Definition would_be_satisfied_by_value_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -906,7 +943,7 @@ Module error. self.would_be_satisfied_by::>>() } *) - Definition would_be_satisfied_by_ref_of (τ : list Ty.t) (α : list Value.t) : M := + Definition would_be_satisfied_by_ref_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -937,7 +974,7 @@ Module error. matches!(self.0.downcast::(), Some(TaggedOption(None))) } *) - Definition would_be_satisfied_by (τ : list Ty.t) (α : list Value.t) : M := + Definition would_be_satisfied_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self ] => ltac:(M.monadic @@ -976,8 +1013,8 @@ Module error. "core::error::TaggedOption", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -996,7 +1033,7 @@ Module error. f.debug_struct("Request").finish_non_exhaustive() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1016,7 +1053,7 @@ Module error. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Request" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Request" |) |) ] |) |) ] @@ -1065,7 +1102,7 @@ Module error. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::error::tags::Value") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -1080,16 +1117,17 @@ Module error. |), [ M.read (| f |); - M.read (| Value.String "Value" |); + M.read (| M.of_value (| Value.String "Value" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::error::tags::Value", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1131,7 +1169,7 @@ Module error. Ty.apply (Ty.path "core::error::tags::MaybeSizedValue") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -1146,16 +1184,17 @@ Module error. |), [ M.read (| f |); - M.read (| Value.String "MaybeSizedValue" |); + M.read (| M.of_value (| Value.String "MaybeSizedValue" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::error::tags::MaybeSizedValue", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1197,7 +1236,7 @@ Module error. Definition Self (I : Ty.t) : Ty.t := Ty.apply (Ty.path "core::error::tags::Ref") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -1212,16 +1251,17 @@ Module error. |), [ M.read (| f |); - M.read (| Value.String "Ref" |); + M.read (| M.of_value (| Value.String "Ref" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::error::tags::Ref", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1267,7 +1307,7 @@ Module error. Request::new(self as &mut (dyn Erased<'a> + 'a)) } *) - Definition as_request (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_request (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1277,10 +1317,11 @@ Module error. M.get_associated_function (| Ty.path "core::error::Request", "new", [] |), [ (* Unsize *) - M.pointer_coercion - (M.read (| - M.use (M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |)) - |)) + M.pointer_coercion (| + M.read (| + M.use (M.alloc (| (* Unsize *) M.pointer_coercion (| M.read (| self |) |) |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1302,7 +1343,7 @@ Module error. TypeId::of::() } *) - Definition tag_id (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition tag_id (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1340,14 +1381,14 @@ Module error. } } *) - Definition downcast (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1390,30 +1431,36 @@ Module error. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "*const") - [ Ty.dyn [ ("core::error::Erased::Trait", []) ] ], - "cast", - [ Ty.apply (Ty.path "core::error::TaggedOption") [ I ] ] - |), - [ - M.read (| - M.use - (M.alloc (| - (* Unsize *) M.pointer_coercion (M.read (| self |)) - |)) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*const") + [ Ty.dyn [ ("core::error::Erased::Trait", []) ] ], + "cast", + [ Ty.apply (Ty.path "core::error::TaggedOption") [ I ] ] + |), + [ + M.read (| + M.use + (M.alloc (| + (* Unsize *) M.pointer_coercion (| M.read (| self |) |) + |)) + |) + ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1435,14 +1482,14 @@ Module error. } } *) - Definition downcast_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition downcast_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1485,30 +1532,36 @@ Module error. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "*mut") - [ Ty.dyn [ ("core::error::Erased::Trait", []) ] ], - "cast", - [ Ty.apply (Ty.path "core::error::TaggedOption") [ I ] ] - |), - [ - M.read (| - M.use - (M.alloc (| - (* Unsize *) M.pointer_coercion (M.read (| self |)) - |)) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*mut") + [ Ty.dyn [ ("core::error::Erased::Trait", []) ] ], + "cast", + [ Ty.apply (Ty.path "core::error::TaggedOption") [ I ] ] + |), + [ + M.read (| + M.use + (M.alloc (| + (* Unsize *) M.pointer_coercion (| M.read (| self |) |) + |)) + |) + ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1535,34 +1588,38 @@ Module error. Definition Self : Ty.t := Ty.path "core::error::Source". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::error::Source" - [ - ("current", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "&") [ Ty.dyn [ ("core::error::Error::Trait", []) ] ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::error::Source", - "current" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::error::Source" + [ + ("current", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&") [ Ty.dyn [ ("core::error::Error::Trait", []) ] ] + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::error::Source", + "current" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1578,7 +1635,7 @@ Module error. Definition Self : Ty.t := Ty.path "core::error::Source". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1592,17 +1649,18 @@ Module error. |), [ M.read (| f |); - M.read (| Value.String "Source" |); - M.read (| Value.String "current" |); + M.read (| M.of_value (| Value.String "Source" |) |); + M.read (| M.of_value (| Value.String "current" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::error::Source", "current" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1630,7 +1688,7 @@ Module error. current } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1706,7 +1764,7 @@ Module error. Error::description(&**self) } *) - Definition description (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition description (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1724,7 +1782,7 @@ Module error. Error::cause(&**self) } *) - Definition cause (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cause (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1742,7 +1800,7 @@ Module error. Error::source(&**self) } *) - Definition source (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition source (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1760,7 +1818,7 @@ Module error. Error::provide(&**self, request); } *) - Definition provide (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition provide (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; request ] => @@ -1775,7 +1833,7 @@ Module error. [ M.read (| M.read (| self |) |); M.read (| request |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1803,12 +1861,14 @@ Module error. "an error occurred when formatting an argument" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "an error occurred when formatting an argument" |))) + M.read (| + M.of_value (| Value.String "an error occurred when formatting an argument" |) + |))) | _, _ => M.impossible end. @@ -1828,12 +1888,12 @@ Module error. "already mutably borrowed" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "already mutably borrowed" |))) + M.read (| M.of_value (| Value.String "already mutably borrowed" |) |))) | _, _ => M.impossible end. @@ -1853,12 +1913,12 @@ Module error. "already borrowed" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "already borrowed" |))) + M.read (| M.of_value (| Value.String "already borrowed" |) |))) | _, _ => M.impossible end. @@ -1878,12 +1938,12 @@ Module error. "converted integer out of range for `char`" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "converted integer out of range for `char`" |))) + M.read (| M.of_value (| Value.String "converted integer out of range for `char`" |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/escape.v b/CoqOfRust/core/escape.v index 98e49dafe..29785ab8f 100644 --- a/CoqOfRust/core/escape.v +++ b/CoqOfRust/core/escape.v @@ -2,7 +2,7 @@ Require Import CoqOfRust.CoqOfRust. Module escape. - Definition value_HEX_DIGITS : Value.t := + Definition value_HEX_DIGITS : A.t := M.run ltac:(M.monadic (M.call_closure (| @@ -24,7 +24,7 @@ Module escape. "as_ascii", [] |), - [ M.read (| UnsupportedLiteral |) ] + [ M.read (| M.of_value (| UnsupportedLiteral |) |) ] |) ] |))). @@ -60,7 +60,7 @@ Module escape. } " *) - Definition escape_ascii_into (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_ascii_into (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ output; byte ] => ltac:(M.monadic @@ -73,87 +73,88 @@ Module escape. [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 9 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 9 |) in M.alloc (| M.call_closure (| M.get_function (| "core::escape::escape_ascii_into.backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallT" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallT" [] + |) + ] |) |))); fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 13 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 13 |) in M.alloc (| M.call_closure (| M.get_function (| "core::escape::escape_ascii_into.backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallR" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallR" [] + |) + ] |) |))); fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 10 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 10 |) in M.alloc (| M.call_closure (| M.get_function (| "core::escape::escape_ascii_into.backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallN" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::SmallN" [] + |) + ] |) |))); fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 92 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 92 |) in M.alloc (| M.call_closure (| M.get_function (| "core::escape::escape_ascii_into.backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::ReverseSolidus" [] + [ + M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::ReverseSolidus" + [] + |) ] |) |))); fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 39 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 39 |) in M.alloc (| M.call_closure (| M.get_function (| "core::escape::escape_ascii_into.backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::Apostrophe" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::Apostrophe" [] + |) + ] |) |))); fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 34 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 34 |) in M.alloc (| M.call_closure (| M.get_function (| "core::escape::escape_ascii_into.backslash", [] |), - [ Value.StructTuple "core::ascii::ascii_char::AsciiChar::QuotationMark" [] ] + [ + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::QuotationMark" [] + |) + ] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -174,36 +175,51 @@ Module escape. let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "is_ascii_control", [] |), [ byte ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Array - [ - M.read (| a |); - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::Null" - []; - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::Null" - []; - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::Null" - [] - ]; - Value.Integer Integer.U8 1 - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.read (| a |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::Null" + [] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::Null" + [] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::Null" + [] + |)) + ] + |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -223,7 +239,7 @@ Module escape. [ BinOp.Panic.shr (| M.read (| byte |), - Value.Integer Integer.I32 4 + M.of_value (| Value.Integer 4 |) |) ] |) @@ -244,30 +260,42 @@ Module escape. [] |), [ - BinOp.Pure.bit_and - (M.read (| byte |)) - (Value.Integer Integer.U8 15) + BinOp.Pure.bit_and (| + M.read (| byte |), + M.of_value (| Value.Integer 15 |) + |) ] |) |) |) |) in M.alloc (| - Value.Tuple - [ - Value.Array - [ - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::ReverseSolidus" - []; - Value.StructTuple - "core::ascii::ascii_char::AsciiChar::SmallX" - []; - M.read (| hi |); - M.read (| lo |) - ]; - Value.Integer Integer.U8 4 - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::ReverseSolidus" + [] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::SmallX" + [] + |)); + A.to_value (M.read (| hi |)); + A.to_value (M.read (| lo |)) + ] + |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |) |))) ] |))) @@ -282,9 +310,14 @@ Module escape. let len := M.copy (| γ0_1 |) in let _ := M.write (| M.read (| output |), M.read (| data |) |) in M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.U8 0); ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) |))) ] |) @@ -298,22 +331,38 @@ Module escape. ([ascii::Char::ReverseSolidus, a, ascii::Char::Null, ascii::Char::Null], 2) } *) - Definition backslash (τ : list Ty.t) (α : list Value.t) : M := + Definition backslash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a ] => ltac:(M.monadic (let a := M.alloc (| a |) in - Value.Tuple - [ - Value.Array - [ - Value.StructTuple "core::ascii::ascii_char::AsciiChar::ReverseSolidus" []; - M.read (| a |); - Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" []; - Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" [] - ]; - Value.Integer Integer.U8 2 - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::ascii::ascii_char::AsciiChar::ReverseSolidus" + [] + |)); + A.to_value (M.read (| a |)); + A.to_value + (M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" [] + |)); + A.to_value + (M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" [] + |)) + ] + |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |))) | _, _ => M.impossible end. End escape_ascii_into. @@ -339,7 +388,7 @@ Module escape. (start as u8)..10 } *) - Definition escape_unicode_into (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_unicode_into (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ output; ch ] => ltac:(M.monadic @@ -350,25 +399,29 @@ Module escape. M.write (| M.SubPointer.get_array_field (| M.read (| output |), - M.alloc (| Value.Integer Integer.Usize 9 |) + M.alloc (| M.of_value (| Value.Integer 9 |) |) |), - Value.StructTuple "core::ascii::ascii_char::AsciiChar::RightCurlyBracket" [] + M.of_value (| + Value.StructTuple "core::ascii::ascii_char::AsciiChar::RightCurlyBracket" [] + |) |) in - let ch := M.alloc (| M.rust_cast (M.read (| ch |)) |) in + 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 Integer.Usize 3 |) + M.alloc (| M.of_value (| Value.Integer 3 |) |) |), M.read (| M.SubPointer.get_array_field (| M.get_constant (| "core::escape::HEX_DIGITS" |), M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer Integer.I32 20 |)) - (Value.Integer Integer.U32 15)) + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| ch |), M.of_value (| Value.Integer 20 |) |), + M.of_value (| Value.Integer 15 |) + |) + |) |) |) |) @@ -377,16 +430,18 @@ Module escape. M.write (| M.SubPointer.get_array_field (| M.read (| output |), - M.alloc (| Value.Integer Integer.Usize 4 |) + M.alloc (| M.of_value (| Value.Integer 4 |) |) |), M.read (| M.SubPointer.get_array_field (| M.get_constant (| "core::escape::HEX_DIGITS" |), M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer Integer.I32 16 |)) - (Value.Integer Integer.U32 15)) + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| ch |), M.of_value (| Value.Integer 16 |) |), + M.of_value (| Value.Integer 15 |) + |) + |) |) |) |) @@ -395,16 +450,18 @@ Module escape. M.write (| M.SubPointer.get_array_field (| M.read (| output |), - M.alloc (| Value.Integer Integer.Usize 5 |) + M.alloc (| M.of_value (| Value.Integer 5 |) |) |), M.read (| M.SubPointer.get_array_field (| M.get_constant (| "core::escape::HEX_DIGITS" |), M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer Integer.I32 12 |)) - (Value.Integer Integer.U32 15)) + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| ch |), M.of_value (| Value.Integer 12 |) |), + M.of_value (| Value.Integer 15 |) + |) + |) |) |) |) @@ -413,16 +470,18 @@ Module escape. M.write (| M.SubPointer.get_array_field (| M.read (| output |), - M.alloc (| Value.Integer Integer.Usize 6 |) + M.alloc (| M.of_value (| Value.Integer 6 |) |) |), M.read (| M.SubPointer.get_array_field (| M.get_constant (| "core::escape::HEX_DIGITS" |), M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer Integer.I32 8 |)) - (Value.Integer Integer.U32 15)) + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| ch |), M.of_value (| Value.Integer 8 |) |), + M.of_value (| Value.Integer 15 |) + |) + |) |) |) |) @@ -431,16 +490,18 @@ Module escape. M.write (| M.SubPointer.get_array_field (| M.read (| output |), - M.alloc (| Value.Integer Integer.Usize 7 |) + M.alloc (| M.of_value (| Value.Integer 7 |) |) |), M.read (| M.SubPointer.get_array_field (| M.get_constant (| "core::escape::HEX_DIGITS" |), M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer Integer.I32 4 |)) - (Value.Integer Integer.U32 15)) + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| ch |), M.of_value (| Value.Integer 4 |) |), + M.of_value (| Value.Integer 15 |) + |) + |) |) |) |) @@ -449,16 +510,18 @@ Module escape. M.write (| M.SubPointer.get_array_field (| M.read (| output |), - M.alloc (| Value.Integer Integer.Usize 8 |) + M.alloc (| M.of_value (| Value.Integer 8 |) |) |), M.read (| M.SubPointer.get_array_field (| M.get_constant (| "core::escape::HEX_DIGITS" |), M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer Integer.I32 0 |)) - (Value.Integer Integer.U32 15)) + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| ch |), M.of_value (| Value.Integer 0 |) |), + M.of_value (| Value.Integer 15 |) + |) + |) |) |) |) @@ -466,15 +529,18 @@ Module escape. let start := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.div (| - M.rust_cast - (M.call_closure (| + 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 Integer.U32 1) ] - |)), - Value.Integer Integer.Usize 4 + [ BinOp.Pure.bit_or (| M.read (| ch |), M.of_value (| Value.Integer 1 |) |) ] + |) + |), + M.of_value (| Value.Integer 4 |) |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in let _ := @@ -507,37 +573,47 @@ Module escape. |), [ M.read (| output |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| start |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| start |))) ] + |) ] |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 3) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.of_value (| Value.Integer 3 |))) ] + |) ] |); (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.get_constant (| "core::escape::escape_unicode_into::UNICODE_ESCAPE_PREFIX" |) - |)) + |) + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.rust_cast (M.read (| start |))); ("end_", Value.Integer Integer.U8 10) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.rust_cast (| M.read (| start |) |))); + ("end_", A.to_value (M.of_value (| Value.Integer 10 |))) + ] + |) |) |))) | _, _ => M.impossible end. Module escape_unicode_into. - Definition value_UNICODE_ESCAPE_PREFIX : Value.t := + Definition value_UNICODE_ESCAPE_PREFIX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -561,7 +637,7 @@ Module escape. "as_ascii", [] |), - [ M.read (| UnsupportedLiteral |) ] + [ M.read (| M.of_value (| UnsupportedLiteral |) |) ] |) ] |) @@ -583,49 +659,53 @@ Module escape. Definition Self : Ty.t := Ty.path "core::escape::EscapeIterInner". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::escape::EscapeIterInner" - [ - ("data", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "array") [ Ty.path "core::ascii::ascii_char::AsciiChar" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::escape::EscapeIterInner", - "data" - |) - ] - |)); - ("alive", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "u8" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::escape::EscapeIterInner", - "alive" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::escape::EscapeIterInner" + [ + ("data", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "array") [ Ty.path "core::ascii::ascii_char::AsciiChar" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::escape::EscapeIterInner", + "data" + |) + ] + |))); + ("alive", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "u8" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::escape::EscapeIterInner", + "alive" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -641,7 +721,7 @@ Module escape. Definition Self : Ty.t := Ty.path "core::escape::EscapeIterInner". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -655,25 +735,27 @@ Module escape. |), [ M.read (| f |); - M.read (| Value.String "EscapeIterInner" |); - M.read (| Value.String "data" |); + M.read (| M.of_value (| Value.String "EscapeIterInner" |) |); + M.read (| M.of_value (| Value.String "data" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::escape::EscapeIterInner", "data" - |)); - M.read (| Value.String "alive" |); + |) + |); + M.read (| M.of_value (| Value.String "alive" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::escape::EscapeIterInner", "alive" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -697,7 +779,7 @@ Module escape. Self { data, alive } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ data; alive ] => ltac:(M.monadic @@ -707,41 +789,42 @@ Module escape. let _ := M.get_constant (| "core::escape::new_discriminant" |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.le - (M.read (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| alive, "core::ops::range::Range", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| alive, "core::ops::range::Range", "end" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.call_closure (| + (BinOp.Pure.le (| + M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "usize", @@ -758,11 +841,11 @@ Module escape. |) |) ] - |)) - (M.read (| - M.get_constant (| "core::escape::N" |) - |)))) - |)) + |), + M.read (| M.get_constant (| "core::escape::N" |) |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -782,46 +865,65 @@ Module escape. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "u8" ] - ] - |), - [ alive ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "u8" ] + ] + |), + [ alive ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::escape::EscapeIterInner" - [ ("data", M.read (| data |)); ("alive", M.read (| alive |)) ] + M.of_value (| + Value.StructRecord + "core::escape::EscapeIterInner" + [ + ("data", A.to_value (M.read (| data |))); + ("alive", A.to_value (M.read (| alive |))) + ] + |) |) |))) | _, _ => M.impossible @@ -838,7 +940,7 @@ Module escape. Self::new(data, 0..M as u8) } *) - Definition from_array (τ : list Ty.t) (α : list Value.t) : M := + Definition from_array (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ array ] => ltac:(M.monadic @@ -847,7 +949,10 @@ Module escape. let _ := M.get_constant (| "core::escape::from_array_discriminant" |) in let data := M.alloc (| - repeat (Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" []) N + repeat (| + M.of_value (| Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" [] |), + N + |) |) in let _ := M.alloc (| @@ -868,15 +973,18 @@ Module escape. |), [ data; - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| M.get_constant (| "core::escape::from_array::M" |) |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| M.get_constant (| "core::escape::from_array::M" |) |))) + ] + |) ] |); - (* Unsize *) M.pointer_coercion array + (* Unsize *) M.pointer_coercion (| array |) ] |) |) in @@ -885,14 +993,18 @@ Module escape. M.get_associated_function (| Ty.path "core::escape::EscapeIterInner", "new", [] |), [ M.read (| data |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.U8 0); - ("end_", - M.rust_cast - (M.read (| M.get_constant (| "core::escape::from_array::M" |) |))) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.rust_cast (| + M.read (| M.get_constant (| "core::escape::from_array::M" |) |) + |))) + ] + |) ] |) |) @@ -907,7 +1019,7 @@ Module escape. &self.data[usize::from(self.alive.start)..usize::from(self.alive.end)] } *) - Definition as_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -926,56 +1038,60 @@ Module escape. "core::escape::EscapeIterInner", "data" |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "usize", - [ Ty.path "u8" ], - "from", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::escape::EscapeIterInner", - "alive" - |), - "core::ops::range::Range", - "start" - |) - |) - ] - |)); - ("end_", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "usize", - [ Ty.path "u8" ], - "from", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::escape::EscapeIterInner", - "alive" - |), - "core::ops::range::Range", - "end" - |) - |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "usize", + [ Ty.path "u8" ], + "from", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::escape::EscapeIterInner", + "alive" + |), + "core::ops::range::Range", + "start" + |) + |) + ] + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "usize", + [ Ty.path "u8" ], + "from", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::escape::EscapeIterInner", + "alive" + |), + "core::ops::range::Range", + "end" + |) + |) + ] + |))) + ] + |) ] |))) | _, _ => M.impossible @@ -988,7 +1104,7 @@ Module escape. self.as_ascii().as_str() } *) - Definition as_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1020,7 +1136,7 @@ Module escape. usize::from(self.alive.end - self.alive.start) } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1035,6 +1151,7 @@ Module escape. |), [ BinOp.Panic.sub (| + Integer.U8, M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1070,7 +1187,7 @@ Module escape. self.alive.next().map(|i| self.data[usize::from(i)].to_u8()) } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1098,8 +1215,8 @@ Module escape. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1142,7 +1259,8 @@ Module escape. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1155,7 +1273,7 @@ Module escape. self.alive.next_back().map(|i| self.data[usize::from(i)].to_u8()) } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1183,8 +1301,8 @@ Module escape. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1227,7 +1345,8 @@ Module escape. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1240,7 +1359,7 @@ Module escape. self.alive.advance_by(n) } *) - Definition advance_by (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -1273,7 +1392,7 @@ Module escape. self.alive.advance_back_by(n) } *) - Definition advance_back_by (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic diff --git a/CoqOfRust/core/ffi/c_str.v b/CoqOfRust/core/ffi/c_str.v index 27f6f3041..32322e994 100644 --- a/CoqOfRust/core/ffi/c_str.v +++ b/CoqOfRust/core/ffi/c_str.v @@ -14,7 +14,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::CStr". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -59,32 +59,35 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesWithNulError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::ffi::c_str::FromBytesWithNulError" - [ - ("kind", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::ffi::c_str::FromBytesWithNulErrorKind", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ffi::c_str::FromBytesWithNulError", - "kind" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ffi::c_str::FromBytesWithNulError" + [ + ("kind", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::ffi::c_str::FromBytesWithNulErrorKind", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ffi::c_str::FromBytesWithNulError", + "kind" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -111,7 +114,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesWithNulError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -164,15 +167,15 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesWithNulError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -191,7 +194,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesWithNulError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -205,17 +208,18 @@ Module ffi. |), [ M.read (| f |); - M.read (| Value.String "FromBytesWithNulError" |); - M.read (| Value.String "kind" |); + M.read (| M.of_value (| Value.String "FromBytesWithNulError" |) |); + M.read (| M.of_value (| Value.String "kind" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ffi::c_str::FromBytesWithNulError", "kind" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -253,7 +257,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesWithNulErrorKind". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -273,28 +277,33 @@ Module ffi. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::ffi::c_str::FromBytesWithNulErrorKind::InteriorNul" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ffi::c_str::FromBytesWithNulErrorKind::InteriorNul" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple - "core::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" - [] + M.of_value (| + Value.StructTuple + "core::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + [] + |) |))) ] |) @@ -325,7 +334,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesWithNulErrorKind". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -354,11 +363,16 @@ Module ffi. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -381,11 +395,12 @@ Module ffi. |) in let __arg1_0 := M.alloc (| γ2_0 |) in M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| __self_0 |) |)) - (M.read (| M.read (| __arg1_0 |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| __self_0 |) |), + M.read (| M.read (| __arg1_0 |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -418,15 +433,15 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesWithNulErrorKind". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -445,7 +460,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesWithNulErrorKind". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -474,8 +489,8 @@ Module ffi. |), [ M.read (| f |); - M.read (| Value.String "InteriorNul" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "InteriorNul" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -489,7 +504,10 @@ Module ffi. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "NotNulTerminated" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "NotNulTerminated" |) |) + ] |) |))) ] @@ -514,19 +532,24 @@ Module ffi. FromBytesWithNulError { kind: FromBytesWithNulErrorKind::InteriorNul(pos) } } *) - Definition interior_nul (τ : list Ty.t) (α : list Value.t) : M := + Definition interior_nul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ pos ] => ltac:(M.monadic (let pos := M.alloc (| pos |) in - Value.StructRecord - "core::ffi::c_str::FromBytesWithNulError" - [ - ("kind", - Value.StructTuple - "core::ffi::c_str::FromBytesWithNulErrorKind::InteriorNul" - [ M.read (| pos |) ]) - ])) + M.of_value (| + Value.StructRecord + "core::ffi::c_str::FromBytesWithNulError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::ffi::c_str::FromBytesWithNulErrorKind::InteriorNul" + [ A.to_value (M.read (| pos |)) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -538,18 +561,23 @@ Module ffi. FromBytesWithNulError { kind: FromBytesWithNulErrorKind::NotNulTerminated } } *) - Definition not_nul_terminated (τ : list Ty.t) (α : list Value.t) : M := + Definition not_nul_terminated (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::ffi::c_str::FromBytesWithNulError" - [ - ("kind", - Value.StructTuple - "core::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" - []) - ])) + (M.of_value (| + Value.StructRecord + "core::ffi::c_str::FromBytesWithNulError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -570,7 +598,7 @@ Module ffi. } } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -586,12 +614,18 @@ Module ffi. fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "data provided contains an interior nul byte" |) + M.read (| + M.of_value (| + Value.String "data provided contains an interior nul byte" + |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "data provided is not nul terminated" |) + M.read (| + M.of_value (| Value.String "data provided is not nul terminated" |) + |) |))) ] |) @@ -618,25 +652,28 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesUntilNulError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ffi::c_str::FromBytesUntilNulError" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.tuple [], [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::ffi::c_str::FromBytesUntilNulError", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::ffi::c_str::FromBytesUntilNulError" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Ty.tuple [], [], "clone", [] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::ffi::c_str::FromBytesUntilNulError", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -663,7 +700,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesUntilNulError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -716,15 +753,15 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesUntilNulError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -743,7 +780,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::c_str::FromBytesUntilNulError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -757,16 +794,17 @@ Module ffi. |), [ M.read (| f |); - M.read (| Value.String "FromBytesUntilNulError" |); + M.read (| M.of_value (| Value.String "FromBytesUntilNulError" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::ffi::c_str::FromBytesUntilNulError", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -788,7 +826,7 @@ Module ffi. write!(f, "data provided does not contain a nul") } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -802,11 +840,21 @@ Module ffi. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "data provided does not contain a nul" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "data provided does not contain a nul" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -830,7 +878,7 @@ Module ffi. write!(f, "\"{}\"", self.to_bytes().escape_ascii()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -844,46 +892,56 @@ Module ffi. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String """" |); M.read (| Value.String """" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String """" |) |)); + A.to_value (M.read (| M.of_value (| Value.String """" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "core::slice::ascii::EscapeAscii" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "escape_ascii", - [] - |), - [ + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "core::slice::ascii::EscapeAscii" ] + |), + [ + M.alloc (| M.call_closure (| M.get_associated_function (| - Ty.path "core::ffi::c_str::CStr", - "to_bytes", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "escape_ascii", [] |), - [ M.read (| self |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::ffi::c_str::CStr", + "to_bytes", + [] + |), + [ M.read (| self |) ] + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -909,7 +967,7 @@ Module ffi. unsafe { CStr::from_ptr(SLICE.as_ptr()) } } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -949,7 +1007,7 @@ Module ffi. Ok(()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1046,7 +1104,7 @@ Module ffi. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1093,26 +1151,40 @@ Module ffi. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String " at byte pos " |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String " at byte pos " + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ pos ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ pos ] + |)) + ] + |) + |) + |) ] |) ] @@ -1169,11 +1241,17 @@ Module ffi. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1205,7 +1283,7 @@ Module ffi. unsafe { Self::from_bytes_with_nul_unchecked(slice::from_raw_parts(ptr.cast(), len + 1)) } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -1237,7 +1315,11 @@ Module ffi. |), [ M.read (| ptr |) ] |); - BinOp.Panic.add (| M.read (| len |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) ] |) ] @@ -1265,7 +1347,7 @@ Module ffi. } } *) - Definition from_bytes_until_nul (τ : list Ty.t) (α : list Value.t) : M := + Definition from_bytes_until_nul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1275,7 +1357,7 @@ Module ffi. M.alloc (| M.call_closure (| M.get_function (| "core::slice::memchr::memchr", [] |), - [ Value.Integer Integer.U8 0; M.read (| bytes |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| bytes |) ] |) |) in M.match_operator (| @@ -1307,36 +1389,45 @@ Module ffi. [ M.read (| bytes |) ] |); BinOp.Panic.add (| + Integer.Usize, M.read (| nul_pos |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ffi::c_str::CStr", - "from_bytes_with_nul_unchecked", - [] - |), - [ M.read (| subslice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ffi::c_str::CStr", + "from_bytes_with_nul_unchecked", + [] + |), + [ M.read (| subslice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::ffi::c_str::FromBytesUntilNulError" - [ Value.Tuple [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::ffi::c_str::FromBytesUntilNulError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |)) + ] + |) |))) ] |) @@ -1361,7 +1452,7 @@ Module ffi. } } *) - Definition from_bytes_with_nul (τ : list Ty.t) (α : list Value.t) : M := + Definition from_bytes_with_nul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1371,7 +1462,7 @@ Module ffi. M.alloc (| M.call_closure (| M.get_function (| "core::slice::memchr::memchr", [] |), - [ Value.Integer Integer.U8 0; M.read (| bytes |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| bytes |) ] |) |) in M.match_operator (| @@ -1388,34 +1479,39 @@ Module ffi. let nul_pos := M.copy (| γ0_0 |) in let γ := M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.add (| + BinOp.Pure.eq (| + BinOp.Panic.add (| + Integer.Usize, M.read (| nul_pos |), - Value.Integer Integer.Usize 1 - |)) - (M.call_closure (| + M.of_value (| Value.Integer 1 |) + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| bytes |) ] - |)) + |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ffi::c_str::CStr", - "from_bytes_with_nul_unchecked", - [] - |), - [ M.read (| bytes |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ffi::c_str::CStr", + "from_bytes_with_nul_unchecked", + [] + |), + [ M.read (| bytes |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1427,34 +1523,40 @@ Module ffi. |) in let nul_pos := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ffi::c_str::FromBytesWithNulError", - "interior_nul", - [] - |), - [ M.read (| nul_pos |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ffi::c_str::FromBytesWithNulError", + "interior_nul", + [] + |), + [ M.read (| nul_pos |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ffi::c_str::FromBytesWithNulError", - "not_nul_terminated", - [] - |), - [] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ffi::c_str::FromBytesWithNulError", + "not_nul_terminated", + [] + |), + [] + |)) + ] + |) |))) ] |) @@ -1503,7 +1605,7 @@ Module ffi. unsafe { intrinsics::const_eval_select((bytes,), const_impl, rt_impl) } } *) - Definition from_bytes_with_nul_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_bytes_with_nul_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1524,7 +1626,7 @@ Module ffi. ] |), [ - Value.Tuple [ M.read (| bytes |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| bytes |)) ] |); M.get_associated_function (| Self, "const_impl.from_bytes_with_nul_unchecked", @@ -1544,7 +1646,7 @@ Module ffi. self.inner.as_ptr() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1573,12 +1675,13 @@ Module ffi. self.inner.len() - 1 } *) - Definition count_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition count_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i8" ], @@ -1593,7 +1696,7 @@ Module ffi. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |))) | _, _ => M.impossible end. @@ -1608,13 +1711,13 @@ Module ffi. unsafe { *self.inner.as_ptr() == 0 } } *) - Definition is_empty (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i8" ], @@ -1629,8 +1732,9 @@ Module ffi. |) ] |) - |)) - (Value.Integer Integer.I8 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -1644,7 +1748,7 @@ Module ffi. unsafe { slice::from_raw_parts(bytes.as_ptr(), bytes.len() - 1) } } *) - Definition to_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1674,6 +1778,7 @@ Module ffi. [ M.read (| bytes |) ] |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -1682,7 +1787,7 @@ Module ffi. |), [ M.read (| bytes |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -1700,13 +1805,13 @@ Module ffi. unsafe { &*(&self.inner as *const [c_char] as *const [u8]) } } *) - Definition to_bytes_with_nul (τ : list Ty.t) (α : list Value.t) : M := + Definition to_bytes_with_nul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.use (M.alloc (| M.SubPointer.get_struct_record_field (| @@ -1715,7 +1820,8 @@ Module ffi. "inner" |) |)) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1731,7 +1837,7 @@ Module ffi. str::from_utf8(self.to_bytes()) } *) - Definition to_str (τ : list Ty.t) (α : list Value.t) : M := + Definition to_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1759,7 +1865,7 @@ Module ffi. self.to_bytes().eq(other.to_bytes()) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1810,7 +1916,7 @@ Module ffi. self.to_bytes().partial_cmp(&other.to_bytes()) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1854,7 +1960,7 @@ Module ffi. self.to_bytes().cmp(&other.to_bytes()) } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1914,7 +2020,7 @@ Module ffi. } } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -1933,29 +2039,30 @@ Module ffi. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| index, "core::ops::range::RangeFrom", "start" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| bytes |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1980,18 +2087,21 @@ Module ffi. |), [ M.read (| bytes |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - index, - "core::ops::range::RangeFrom", - "start" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + index, + "core::ops::range::RangeFrom", + "start" + |) + |))) + ] + |) ] |) ] @@ -2012,56 +2122,70 @@ Module ffi. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "index out of bounds: the len is " - |); - M.read (| Value.String " but the index is " |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| bytes |) ] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "index out of bounds: the len is " |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.SubPointer.get_struct_record_field (| - index, - "core::ops::range::RangeFrom", - "start" - |) - ] - |) - ] - |)) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " but the index is " |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| bytes |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.SubPointer.get_struct_record_field (| + index, + "core::ops::range::RangeFrom", + "start" + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -2092,7 +2216,7 @@ Module ffi. self } *) - Definition as_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2137,7 +2261,7 @@ Module ffi. unsafe { intrinsics::const_eval_select((ptr,), strlen_ct, strlen_rt) } } *) - Definition const_strlen (τ : list Ty.t) (α : list Value.t) : M := + Definition const_strlen (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -2153,7 +2277,7 @@ Module ffi. ] |), [ - Value.Tuple [ M.read (| ptr |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| ptr |)) ] |); M.get_function (| "core::ffi::c_str::const_strlen.strlen_ct", [] |); M.get_function (| "core::ffi::c_str::const_strlen.strlen_rt", [] |) ] @@ -2174,26 +2298,26 @@ Module ffi. len } *) - Definition strlen_ct (τ : list Ty.t) (α : list Value.t) : M := + Definition strlen_ct (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let len := M.alloc (| Value.Integer Integer.Usize 0 |) in + let len := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.path "i8" ], @@ -2202,8 +2326,9 @@ Module ffi. |), [ M.read (| s |); M.read (| len |) ] |) - |)) - (Value.Integer Integer.I8 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2211,9 +2336,13 @@ Module ffi. let β := len in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2221,7 +2350,7 @@ Module ffi. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2244,7 +2373,7 @@ Module ffi. unsafe { strlen(s) } } *) - Definition strlen_rt (τ : list Ty.t) (α : list Value.t) : M := + Definition strlen_rt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic diff --git a/CoqOfRust/core/ffi/mod.v b/CoqOfRust/core/ffi/mod.v index 4fbd6990b..c54f190b9 100644 --- a/CoqOfRust/core/ffi/mod.v +++ b/CoqOfRust/core/ffi/mod.v @@ -131,7 +131,7 @@ Module ffi. f.debug_struct("c_void").finish() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -151,7 +151,7 @@ Module ffi. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "c_void" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "c_void" |) |) ] |) |) ] @@ -189,7 +189,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::VaListImpl". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -203,49 +203,54 @@ Module ffi. |), [ M.read (| f |); - M.read (| Value.String "VaListImpl" |); - M.read (| Value.String "gp_offset" |); + M.read (| M.of_value (| Value.String "VaListImpl" |) |); + M.read (| M.of_value (| Value.String "gp_offset" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ffi::VaListImpl", "gp_offset" - |)); - M.read (| Value.String "fp_offset" |); + |) + |); + M.read (| M.of_value (| Value.String "fp_offset" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ffi::VaListImpl", "fp_offset" - |)); - M.read (| Value.String "overflow_arg_area" |); + |) + |); + M.read (| M.of_value (| Value.String "overflow_arg_area" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ffi::VaListImpl", "overflow_arg_area" - |)); - M.read (| Value.String "reg_save_area" |); + |) + |); + M.read (| M.of_value (| Value.String "reg_save_area" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ffi::VaListImpl", "reg_save_area" - |)); - M.read (| Value.String "_marker" |); + |) + |); + M.read (| M.of_value (| Value.String "_marker" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ffi::VaListImpl", "_marker" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -277,7 +282,7 @@ Module ffi. Definition Self : Ty.t := Ty.path "core::ffi::VaList". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -291,25 +296,27 @@ Module ffi. |), [ M.read (| f |); - M.read (| Value.String "VaList" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "VaList" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ffi::VaList", "inner" - |)); - M.read (| Value.String "_marker" |); + |) + |); + M.read (| M.of_value (| Value.String "_marker" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ffi::VaList", "_marker" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -331,17 +338,20 @@ Module ffi. VaList { inner: self, _marker: PhantomData } } *) - Definition as_va_list (τ : list Ty.t) (α : list Value.t) : M := + Definition as_va_list (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::ffi::VaList" - [ - ("inner", M.read (| self |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "core::ffi::VaList" + [ + ("inner", A.to_value (M.read (| self |))); + ("_marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -352,7 +362,7 @@ Module ffi. unsafe { va_arg(self) } } *) - Definition arg (τ : list Ty.t) (α : list Value.t) : M := + Definition arg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -380,7 +390,7 @@ Module ffi. ret } *) - Definition with_copy (τ : list Ty.t) (α : list Value.t) : M := + Definition with_copy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F; R ], [ self; f ] => ltac:(M.monadic @@ -412,17 +422,20 @@ Module ffi. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ffi::VaListImpl", - "as_va_list", - [] - |), - [ ap ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ffi::VaListImpl", + "as_va_list", + [] + |), + [ ap ] + |)) + ] + |) ] |) |) in @@ -431,7 +444,7 @@ Module ffi. M.alloc (| M.call_closure (| M.get_function (| "core::ffi::va_end", [] |), [ ap ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in ret |))) | _, _ => M.impossible @@ -451,7 +464,7 @@ Module ffi. &self.inner } *) - Definition deref (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -483,7 +496,7 @@ Module ffi. &mut self.inner } *) - Definition deref_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -670,7 +683,7 @@ Module ffi. } } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -749,12 +762,12 @@ Module ffi. // This works for now, since `va_end` is a no-op on all current LLVM targets. } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/fmt/builders.v b/CoqOfRust/core/fmt/builders.v index 764fd9825..2df1b2d9a 100644 --- a/CoqOfRust/core/fmt/builders.v +++ b/CoqOfRust/core/fmt/builders.v @@ -29,13 +29,15 @@ Module fmt. PadAdapterState { on_newline: true } } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::fmt::builders::PadAdapterState" - [ ("on_newline", Value.Bool true) ])) + (M.of_value (| + Value.StructRecord + "core::fmt::builders::PadAdapterState" + [ ("on_newline", A.to_value (M.of_value (| Value.Bool true |))) ] + |))) | _, _ => M.impossible end. @@ -59,7 +61,7 @@ Module fmt. fmt.wrap_buf(move |buf| slot.insert(PadAdapter { buf, state })) } *) - Definition wrap (τ : list Ty.t) (α : list Value.t) : M := + Definition wrap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt; slot; state ] => ltac:(M.monadic @@ -81,8 +83,8 @@ Module fmt. |), [ M.read (| fmt |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -93,8 +95,8 @@ Module fmt. ltac:(M.monadic (let buf := M.copy (| γ |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -104,19 +106,25 @@ Module fmt. |), [ M.read (| slot |); - Value.StructRecord - "core::fmt::builders::PadAdapter" - [ - ("buf", - (* Unsize *) M.pointer_coercion (M.read (| buf |))); - ("state", M.read (| state |)) - ] + M.of_value (| + Value.StructRecord + "core::fmt::builders::PadAdapter" + [ + ("buf", + A.to_value + (* Unsize *) + (M.pointer_coercion (| M.read (| buf |) |))); + ("state", A.to_value (M.read (| state |))) + ] + |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -142,7 +150,7 @@ Module fmt. Ok(()) } *) - Definition write_str (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -172,7 +180,7 @@ Module fmt. "split_inclusive", [ Ty.path "char" ] |), - [ M.read (| s |); Value.UnicodeChar 10 ] + [ M.read (| s |); M.of_value (| Value.UnicodeChar 10 |) ] |) ] |) @@ -216,7 +224,7 @@ Module fmt. let s := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -275,7 +283,11 @@ Module fmt. "buf" |) |); - M.read (| Value.String " " |) + M.read (| + M.of_value (| + Value.String " " + |) + |) ] |) ] @@ -338,9 +350,14 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -362,7 +379,10 @@ Module fmt. "ends_with", [ Ty.path "char" ] |), - [ M.read (| s |); Value.UnicodeChar 10 ] + [ + M.read (| s |); + M.of_value (| Value.UnicodeChar 10 |) + ] |) |) in let _ := @@ -456,14 +476,20 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -478,7 +504,7 @@ Module fmt. self.buf.write_char(c) } *) - Definition write_char (τ : list Ty.t) (α : list Value.t) : M := + Definition write_char (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; c ] => ltac:(M.monadic @@ -489,7 +515,7 @@ Module fmt. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -538,7 +564,7 @@ Module fmt. "buf" |) |); - M.read (| Value.String " " |) + M.read (| M.of_value (| Value.String " " |) |) ] |) ] @@ -593,8 +619,8 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -610,7 +636,7 @@ Module fmt. "core::fmt::builders::PadAdapterState", "on_newline" |), - BinOp.Pure.eq (M.read (| c |)) (Value.UnicodeChar 10) + BinOp.Pure.eq (| M.read (| c |), M.of_value (| Value.UnicodeChar 10 |) |) |) in M.alloc (| M.call_closure (| @@ -674,7 +700,7 @@ Module fmt. DebugStruct { fmt, result, has_fields: false } } *) - Definition debug_struct_new (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_struct_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt; name ] => ltac:(M.monadic @@ -689,13 +715,15 @@ Module fmt. |) |) in M.alloc (| - Value.StructRecord - "core::fmt::builders::DebugStruct" - [ - ("fmt", M.read (| fmt |)); - ("result", M.read (| result |)); - ("has_fields", Value.Bool false) - ] + M.of_value (| + Value.StructRecord + "core::fmt::builders::DebugStruct" + [ + ("fmt", A.to_value (M.read (| fmt |))); + ("result", A.to_value (M.read (| result |))); + ("has_fields", A.to_value (M.of_value (| Value.Bool false |))) + ] + |) |) |))) | _, _ => M.impossible @@ -709,7 +737,7 @@ Module fmt. self.field_with(name, |f| value.fmt(f)) } *) - Definition field (τ : list Ty.t) (α : list Value.t) : M := + Definition field (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; value ] => ltac:(M.monadic @@ -731,8 +759,8 @@ Module fmt. [ M.read (| self |); M.read (| name |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -755,7 +783,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -793,7 +822,7 @@ Module fmt. self } *) - Definition field_with (τ : list Ty.t) (α : list Value.t) : M := + Definition field_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; name; value_fmt ] => ltac:(M.monadic @@ -831,8 +860,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -843,7 +872,7 @@ Module fmt. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -867,21 +896,22 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugStruct", "has_fields" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -922,8 +952,10 @@ Module fmt. |) |); M.read (| - Value.String " { + M.of_value (| + Value.String " { " + |) |) ] |) @@ -992,17 +1024,23 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let slot := M.alloc (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) in let state := M.alloc (| @@ -1146,7 +1184,11 @@ Module fmt. "write_str", [] |), - [ writer; M.read (| Value.String ": " |) + [ + writer; + M.read (| + M.of_value (| Value.String ": " |) + |) ] |) ] @@ -1245,7 +1287,9 @@ Module fmt. |), [ M.read (| value_fmt |); - Value.Tuple [ writer ] + M.of_value (| + Value.Tuple [ A.to_value writer ] + |) ] |) ] @@ -1314,8 +1358,13 @@ Module fmt. "write_str", [] |), - [ writer; M.read (| Value.String ", -" |) ] + [ + writer; + M.read (| + M.of_value (| Value.String ", +" |) + |) + ] |) |))); fun γ => @@ -1323,7 +1372,7 @@ Module fmt. (let prefix := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1339,11 +1388,13 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - Value.String ", ")); + M.of_value (| Value.String ", " |))); fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String " { " |) + M.read (| + M.of_value (| Value.String " { " |) + |) |))) ] |) @@ -1565,7 +1616,9 @@ Module fmt. "fmt" |) |); - M.read (| Value.String ": " |) + M.read (| + M.of_value (| Value.String ": " |) + |) ] |) ] @@ -1645,16 +1698,19 @@ Module fmt. |), [ M.read (| value_fmt |); - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::builders::DebugStruct", - "fmt" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::builders::DebugStruct", + "fmt" + |) + |)) + ] + |) ] |) |))) @@ -1664,7 +1720,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -1675,7 +1732,7 @@ Module fmt. "core::fmt::builders::DebugStruct", "has_fields" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| M.read (| self |) |) |))) @@ -1704,7 +1761,7 @@ Module fmt. self.result } *) - Definition finish_non_exhaustive (τ : list Ty.t) (α : list Value.t) : M := + Definition finish_non_exhaustive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1740,8 +1797,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1752,7 +1809,7 @@ Module fmt. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1769,7 +1826,7 @@ Module fmt. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1793,9 +1850,11 @@ Module fmt. |) in let slot := M.alloc (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) in let state := M.alloc (| @@ -1860,8 +1919,10 @@ Module fmt. [ writer; M.read (| - Value.String ".. + M.of_value (| + Value.String ".. " + |) |) ] |) @@ -1942,7 +2003,9 @@ Module fmt. "fmt" |) |); - M.read (| Value.String "}" |) + M.read (| + M.of_value (| Value.String "}" |) + |) ] |) |))); @@ -1963,7 +2026,11 @@ Module fmt. "fmt" |) |); - M.read (| Value.String ", .. }" |) + M.read (| + M.of_value (| + Value.String ", .. }" + |) + |) ] |) |))) @@ -1986,7 +2053,9 @@ Module fmt. "fmt" |) |); - M.read (| Value.String " { .. }" |) + M.read (| + M.of_value (| Value.String " { .. }" |) + |) ] |) |))) @@ -1996,7 +2065,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -2022,7 +2092,7 @@ Module fmt. self.result } *) - Definition finish (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2030,7 +2100,7 @@ Module fmt. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2073,8 +2143,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2085,7 +2155,7 @@ Module fmt. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2122,7 +2192,9 @@ Module fmt. "fmt" |) |); - M.read (| Value.String "}" |) + M.read (| + M.of_value (| Value.String "}" |) + |) ] |) |))); @@ -2143,7 +2215,9 @@ Module fmt. "fmt" |) |); - M.read (| Value.String " }" |) + M.read (| + M.of_value (| Value.String " }" |) + |) ] |) |))) @@ -2153,12 +2227,13 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.SubPointer.get_struct_record_field (| @@ -2177,7 +2252,7 @@ Module fmt. self.fmt.alternate() } *) - Definition is_pretty (τ : list Ty.t) (α : list Value.t) : M := + Definition is_pretty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2225,7 +2300,7 @@ Module fmt. DebugTuple { fmt, result, fields: 0, empty_name: name.is_empty() } } *) - Definition debug_tuple_new (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_tuple_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt; name ] => ltac:(M.monadic @@ -2240,18 +2315,21 @@ Module fmt. |) |) in M.alloc (| - Value.StructRecord - "core::fmt::builders::DebugTuple" - [ - ("fmt", M.read (| fmt |)); - ("result", M.read (| result |)); - ("fields", Value.Integer Integer.Usize 0); - ("empty_name", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "is_empty", [] |), - [ M.read (| name |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::fmt::builders::DebugTuple" + [ + ("fmt", A.to_value (M.read (| fmt |))); + ("result", A.to_value (M.read (| result |))); + ("fields", A.to_value (M.of_value (| Value.Integer 0 |))); + ("empty_name", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "is_empty", [] |), + [ M.read (| name |) ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -2265,7 +2343,7 @@ Module fmt. self.field_with(|f| value.fmt(f)) } *) - Definition field (τ : list Ty.t) (α : list Value.t) : M := + Definition field (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; value ] => ltac:(M.monadic @@ -2285,8 +2363,8 @@ Module fmt. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2309,7 +2387,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2343,7 +2422,7 @@ Module fmt. self } *) - Definition field_with (τ : list Ty.t) (α : list Value.t) : M := + Definition field_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; value_fmt ] => ltac:(M.monadic @@ -2380,8 +2459,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2392,7 +2471,7 @@ Module fmt. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2415,22 +2494,23 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugTuple", "fields" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2471,8 +2551,10 @@ Module fmt. |) |); M.read (| - Value.String "( + M.of_value (| + Value.String "( " + |) |) ] |) @@ -2541,17 +2623,23 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let slot := M.alloc (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) in let state := M.alloc (| @@ -2625,7 +2713,9 @@ Module fmt. |), [ M.read (| value_fmt |); - Value.Tuple [ writer ] + M.of_value (| + Value.Tuple [ A.to_value writer ] + |) ] |) ] @@ -2694,8 +2784,13 @@ Module fmt. "write_str", [] |), - [ writer; M.read (| Value.String ", -" |) ] + [ + writer; + M.read (| + M.of_value (| Value.String ", +" |) + |) + ] |) |))); fun γ => @@ -2703,33 +2798,36 @@ Module fmt. (let prefix := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugTuple", "fields" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "(")); + M.of_value (| Value.String "(" |))); fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String ", " |) + M.read (| + M.of_value (| Value.String ", " |) + |) |))) ] |) @@ -2845,16 +2943,19 @@ Module fmt. |), [ M.read (| value_fmt |); - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::builders::DebugTuple", - "fmt" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::builders::DebugTuple", + "fmt" + |) + |)) + ] + |) ] |) |))) @@ -2864,7 +2965,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -2877,7 +2979,11 @@ Module fmt. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| M.read (| self |) |) |))) @@ -2899,7 +3005,7 @@ Module fmt. self.result } *) - Definition finish (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2907,22 +3013,23 @@ Module fmt. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugTuple", "fields" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2956,8 +3063,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2969,7 +3076,7 @@ Module fmt. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2978,17 +3085,18 @@ Module fmt. (M.alloc (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugTuple", "fields" |) - |)) - (Value.Integer - Integer.Usize - 1), + |), + M.of_value (| + Value.Integer 1 + |) + |), ltac:(M.monadic (M.read (| M.SubPointer.get_struct_record_field (| @@ -2999,8 +3107,8 @@ Module fmt. |))) |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::builders::DebugTuple", @@ -3008,7 +3116,8 @@ Module fmt. [] |), [ M.read (| self |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -3050,7 +3159,9 @@ Module fmt. |) |); M.read (| - Value.String "," + M.of_value (| + Value.String "," + |) |) ] |) @@ -3120,10 +3231,14 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.alloc (| @@ -3141,7 +3256,9 @@ Module fmt. "fmt" |) |); - M.read (| Value.String ")" |) + M.read (| + M.of_value (| Value.String ")" |) + |) ] |) |) @@ -3149,12 +3266,13 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.SubPointer.get_struct_record_field (| @@ -3173,7 +3291,7 @@ Module fmt. self.fmt.alternate() } *) - Definition is_pretty (τ : list Ty.t) (α : list Value.t) : M := + Definition is_pretty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3240,7 +3358,7 @@ Module fmt. self.has_fields = true; } *) - Definition entry_with (τ : list Ty.t) (α : list Value.t) : M := + Definition entry_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; entry_fmt ] => ltac:(M.monadic @@ -3277,8 +3395,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3289,7 +3407,7 @@ Module fmt. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3312,21 +3430,22 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugInner", "has_fields" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3367,8 +3486,10 @@ Module fmt. |) |); M.read (| - Value.String " + M.of_value (| + Value.String " " + |) |) ] |) @@ -3437,17 +3558,23 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let slot := M.alloc (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) in let state := M.alloc (| @@ -3521,7 +3648,9 @@ Module fmt. |), [ M.read (| entry_fmt |); - Value.Tuple [ writer ] + M.of_value (| + Value.Tuple [ A.to_value writer ] + |) ] |) ] @@ -3590,15 +3719,20 @@ Module fmt. "write_str", [] |), - [ writer; M.read (| Value.String ", -" |) ] + [ + writer; + M.read (| + M.of_value (| Value.String ", +" |) + |) + ] |) |))); fun γ => ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3645,7 +3779,11 @@ Module fmt. "fmt" |) |); - M.read (| Value.String ", " |) + M.read (| + M.of_value (| + Value.String ", " + |) + |) ] |) ] @@ -3712,7 +3850,9 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.alloc (| @@ -3733,16 +3873,19 @@ Module fmt. |), [ M.read (| entry_fmt |); - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::builders::DebugInner", - "fmt" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::builders::DebugInner", + "fmt" + |) + |)) + ] + |) ] |) |))) @@ -3752,7 +3895,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -3763,9 +3907,9 @@ Module fmt. "core::fmt::builders::DebugInner", "has_fields" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3777,7 +3921,7 @@ Module fmt. self.fmt.alternate() } *) - Definition is_pretty (τ : list Ty.t) (α : list Value.t) : M := + Definition is_pretty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3813,7 +3957,7 @@ Module fmt. DebugSet { inner: DebugInner { fmt, result, has_fields: false } } } *) - Definition debug_set_new (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_set_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt ] => ltac:(M.monadic @@ -3823,22 +3967,27 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| fmt |); M.read (| Value.String "{" |) ] + [ M.read (| fmt |); M.read (| M.of_value (| Value.String "{" |) |) ] |) |) in M.alloc (| - Value.StructRecord - "core::fmt::builders::DebugSet" - [ - ("inner", - Value.StructRecord - "core::fmt::builders::DebugInner" - [ - ("fmt", M.read (| fmt |)); - ("result", M.read (| result |)); - ("has_fields", Value.Bool false) - ]) - ] + M.of_value (| + Value.StructRecord + "core::fmt::builders::DebugSet" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructRecord + "core::fmt::builders::DebugInner" + [ + ("fmt", A.to_value (M.read (| fmt |))); + ("result", A.to_value (M.read (| result |))); + ("has_fields", A.to_value (M.of_value (| Value.Bool false |))) + ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3853,7 +4002,7 @@ Module fmt. self } *) - Definition entry (τ : list Ty.t) (α : list Value.t) : M := + Definition entry (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; entry ] => ltac:(M.monadic @@ -3883,8 +4032,8 @@ Module fmt. "core::fmt::builders::DebugSet", "inner" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3907,7 +4056,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -3927,7 +4077,7 @@ Module fmt. self } *) - Definition entry_with (τ : list Ty.t) (α : list Value.t) : M := + Definition entry_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; entry_fmt ] => ltac:(M.monadic @@ -3971,7 +4121,7 @@ Module fmt. self } *) - Definition entries (τ : list Ty.t) (α : list Value.t) : M := + Definition entries (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ D; _ as I ], [ self; entries ] => ltac:(M.monadic @@ -4038,14 +4188,14 @@ Module fmt. |), [ M.read (| self |); - (* Unsize *) M.pointer_coercion entry + (* Unsize *) M.pointer_coercion (| entry |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4061,7 +4211,7 @@ Module fmt. self.inner.result.and_then(|_| self.inner.fmt.write_str("}")) } *) - Definition finish (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4093,8 +4243,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4121,13 +4271,14 @@ Module fmt. "fmt" |) |); - M.read (| Value.String "}" |) + M.read (| M.of_value (| Value.String "}" |) |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4149,7 +4300,7 @@ Module fmt. DebugList { inner: DebugInner { fmt, result, has_fields: false } } } *) - Definition debug_list_new (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_list_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt ] => ltac:(M.monadic @@ -4159,22 +4310,27 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| fmt |); M.read (| Value.String "[" |) ] + [ M.read (| fmt |); M.read (| M.of_value (| Value.String "[" |) |) ] |) |) in M.alloc (| - Value.StructRecord - "core::fmt::builders::DebugList" - [ - ("inner", - Value.StructRecord - "core::fmt::builders::DebugInner" - [ - ("fmt", M.read (| fmt |)); - ("result", M.read (| result |)); - ("has_fields", Value.Bool false) - ]) - ] + M.of_value (| + Value.StructRecord + "core::fmt::builders::DebugList" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructRecord + "core::fmt::builders::DebugInner" + [ + ("fmt", A.to_value (M.read (| fmt |))); + ("result", A.to_value (M.read (| result |))); + ("has_fields", A.to_value (M.of_value (| Value.Bool false |))) + ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -4189,7 +4345,7 @@ Module fmt. self } *) - Definition entry (τ : list Ty.t) (α : list Value.t) : M := + Definition entry (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; entry ] => ltac:(M.monadic @@ -4219,8 +4375,8 @@ Module fmt. "core::fmt::builders::DebugList", "inner" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4243,7 +4399,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -4263,7 +4420,7 @@ Module fmt. self } *) - Definition entry_with (τ : list Ty.t) (α : list Value.t) : M := + Definition entry_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; entry_fmt ] => ltac:(M.monadic @@ -4307,7 +4464,7 @@ Module fmt. self } *) - Definition entries (τ : list Ty.t) (α : list Value.t) : M := + Definition entries (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ D; _ as I ], [ self; entries ] => ltac:(M.monadic @@ -4374,14 +4531,14 @@ Module fmt. |), [ M.read (| self |); - (* Unsize *) M.pointer_coercion entry + (* Unsize *) M.pointer_coercion (| entry |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4397,7 +4554,7 @@ Module fmt. self.inner.result.and_then(|_| self.inner.fmt.write_str("]")) } *) - Definition finish (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4429,8 +4586,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4457,13 +4614,14 @@ Module fmt. "fmt" |) |); - M.read (| Value.String "]" |) + M.read (| M.of_value (| Value.String "]" |) |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4495,7 +4653,7 @@ Module fmt. DebugMap { fmt, result, has_fields: false, has_key: false, state: Default::default() } } *) - Definition debug_map_new (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_map_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt ] => ltac:(M.monadic @@ -4505,29 +4663,32 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| fmt |); M.read (| Value.String "{" |) ] + [ M.read (| fmt |); M.read (| M.of_value (| Value.String "{" |) |) ] |) |) in M.alloc (| - Value.StructRecord - "core::fmt::builders::DebugMap" - [ - ("fmt", M.read (| fmt |)); - ("result", M.read (| result |)); - ("has_fields", Value.Bool false); - ("has_key", Value.Bool false); - ("state", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "core::fmt::builders::PadAdapterState", - [], - "default", - [] - |), - [] - |)) - ] + M.of_value (| + Value.StructRecord + "core::fmt::builders::DebugMap" + [ + ("fmt", A.to_value (M.read (| fmt |))); + ("result", A.to_value (M.read (| result |))); + ("has_fields", A.to_value (M.of_value (| Value.Bool false |))); + ("has_key", A.to_value (M.of_value (| Value.Bool false |))); + ("state", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "core::fmt::builders::PadAdapterState", + [], + "default", + [] + |), + [] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -4541,7 +4702,7 @@ Module fmt. self.key(key).value(value) } *) - Definition entry (τ : list Ty.t) (α : list Value.t) : M := + Definition entry (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; key; value ] => ltac:(M.monadic @@ -4557,9 +4718,9 @@ Module fmt. "key", [] |), - [ M.read (| self |); (* Unsize *) M.pointer_coercion (M.read (| key |)) ] + [ M.read (| self |); (* Unsize *) M.pointer_coercion (| M.read (| key |) |) ] |); - (* Unsize *) M.pointer_coercion (M.read (| value |)) + (* Unsize *) M.pointer_coercion (| M.read (| value |) |) ] |))) | _, _ => M.impossible @@ -4572,7 +4733,7 @@ Module fmt. self.key_with(|f| key.fmt(f)) } *) - Definition key (τ : list Ty.t) (α : list Value.t) : M := + Definition key (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; key ] => ltac:(M.monadic @@ -4592,8 +4753,8 @@ Module fmt. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4616,7 +4777,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4660,7 +4822,7 @@ Module fmt. self } *) - Definition key_with (τ : list Ty.t) (α : list Value.t) : M := + Definition key_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; key_fmt ] => ltac:(M.monadic @@ -4697,8 +4859,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4710,22 +4872,24 @@ Module fmt. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugMap", "has_key" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4748,16 +4912,22 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "attempted to begin a new map entry without completing the previous one" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "attempted to begin a new map entry without completing the previous one" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -4765,12 +4935,13 @@ Module fmt. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4793,21 +4964,22 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugMap", "has_fields" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4848,8 +5020,10 @@ Module fmt. |) |); M.read (| - Value.String " + M.of_value (| + Value.String " " + |) |) ] |) @@ -4919,17 +5093,23 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let slot := M.alloc (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) in let _ := M.write (| @@ -5012,7 +5192,9 @@ Module fmt. |), [ M.read (| key_fmt |); - Value.Tuple [ writer ] + M.of_value (| + Value.Tuple [ A.to_value writer ] + |) ] |) ] @@ -5100,7 +5282,9 @@ Module fmt. |), [ writer; - M.read (| Value.String ": " |) + M.read (| + M.of_value (| Value.String ": " |) + |) ] |) ] @@ -5163,12 +5347,12 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5217,7 +5401,9 @@ Module fmt. |) |); M.read (| - Value.String ", " + M.of_value (| + Value.String ", " + |) |) ] |) @@ -5288,7 +5474,9 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -5328,16 +5516,19 @@ Module fmt. |), [ M.read (| key_fmt |); - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::builders::DebugMap", - "fmt" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::builders::DebugMap", + "fmt" + |) + |)) + ] + |) ] |) ] @@ -5431,7 +5622,9 @@ Module fmt. "fmt" |) |); - M.read (| Value.String ": " |) + M.read (| + M.of_value (| Value.String ": " |) + |) ] |) ] @@ -5494,7 +5687,7 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -5504,18 +5697,21 @@ Module fmt. "core::fmt::builders::DebugMap", "has_key" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -5531,7 +5727,7 @@ Module fmt. self.value_with(|f| value.fmt(f)) } *) - Definition value (τ : list Ty.t) (α : list Value.t) : M := + Definition value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; value ] => ltac:(M.monadic @@ -5551,8 +5747,8 @@ Module fmt. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5575,7 +5771,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5608,7 +5805,7 @@ Module fmt. self } *) - Definition value_with (τ : list Ty.t) (α : list Value.t) : M := + Definition value_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; value_fmt ] => ltac:(M.monadic @@ -5645,8 +5842,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5658,21 +5855,22 @@ Module fmt. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugMap", "has_key" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5695,16 +5893,22 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "attempted to format a map value before its key" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "attempted to format a map value before its key" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -5712,12 +5916,13 @@ Module fmt. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5740,9 +5945,11 @@ Module fmt. |) in let slot := M.alloc (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) in let writer := M.alloc (| @@ -5806,7 +6013,9 @@ Module fmt. |), [ M.read (| value_fmt |); - Value.Tuple [ writer ] + M.of_value (| + Value.Tuple [ A.to_value writer ] + |) ] |) ] @@ -5894,8 +6103,10 @@ Module fmt. |), [ writer; - M.read (| Value.String ", + M.read (| + M.of_value (| Value.String ", " |) + |) ] |) ] @@ -5958,7 +6169,7 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -5998,16 +6209,19 @@ Module fmt. |), [ M.read (| value_fmt |); - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::builders::DebugMap", - "fmt" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::builders::DebugMap", + "fmt" + |) + |)) + ] + |) ] |) ] @@ -6070,7 +6284,7 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6080,18 +6294,21 @@ Module fmt. "core::fmt::builders::DebugMap", "has_key" |), - Value.Bool false + M.of_value (| Value.Bool false |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -6102,7 +6319,7 @@ Module fmt. "core::fmt::builders::DebugMap", "has_fields" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| M.read (| self |) |) |))) @@ -6124,7 +6341,7 @@ Module fmt. self } *) - Definition entries (τ : list Ty.t) (α : list Value.t) : M := + Definition entries (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ K; V; _ as I ], [ self; entries ] => ltac:(M.monadic @@ -6194,15 +6411,15 @@ Module fmt. |), [ M.read (| self |); - (* Unsize *) M.pointer_coercion k; - (* Unsize *) M.pointer_coercion v + (* Unsize *) M.pointer_coercion (| k |); + (* Unsize *) M.pointer_coercion (| v |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -6222,7 +6439,7 @@ Module fmt. }) } *) - Definition finish (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6250,8 +6467,8 @@ Module fmt. "result" |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6263,22 +6480,24 @@ Module fmt. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugMap", "has_key" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6301,23 +6520,31 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "attempted to finish a map with a partial entry" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "attempted to finish a map with a partial entry" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -6335,7 +6562,7 @@ Module fmt. "fmt" |) |); - M.read (| Value.String "}" |) + M.read (| M.of_value (| Value.String "}" |) |) ] |) |) @@ -6343,7 +6570,8 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6356,7 +6584,7 @@ Module fmt. self.fmt.alternate() } *) - Definition is_pretty (τ : list Ty.t) (α : list Value.t) : M := + Definition is_pretty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6395,7 +6623,7 @@ Module fmt. (self.0)(f) } *) - Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; f ] => @@ -6416,7 +6644,7 @@ Module fmt. "core::fmt::builders::FormatterFn", 0 |); - Value.Tuple [ M.read (| f |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| f |)) ] |) ] |))) | _, _ => M.impossible @@ -6440,7 +6668,7 @@ Module fmt. (self.0)(f) } *) - Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; f ] => @@ -6461,7 +6689,7 @@ Module fmt. "core::fmt::builders::FormatterFn", 0 |); - Value.Tuple [ M.read (| f |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| f |)) ] |) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/fmt/float.v b/CoqOfRust/core/fmt/float.v index c6860132f..203a51ee6 100644 --- a/CoqOfRust/core/fmt/float.v +++ b/CoqOfRust/core/fmt/float.v @@ -15,10 +15,7 @@ Module fmt. (abs != 0.0 && abs < 1e-4) || abs >= 1e+16 } *) - Definition already_rounded_value_should_use_exponential - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition already_rounded_value_should_use_exponential (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34,12 +31,21 @@ Module fmt. M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.ne (M.read (| abs |)) (M.read (| UnsupportedLiteral |)), + BinOp.Pure.ne (| + M.read (| abs |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| abs |)) (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.lt (| + M.read (| abs |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) |), ltac:(M.monadic - (BinOp.Pure.ge (M.read (| abs |)) (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.ge (| + M.read (| abs |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) |) |) |))) @@ -67,10 +73,7 @@ Module fmt. (abs != 0.0 && abs < 1e-4) || abs >= 1e+16 } *) - Definition already_rounded_value_should_use_exponential - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition already_rounded_value_should_use_exponential (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -86,12 +89,21 @@ Module fmt. M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.ne (M.read (| abs |)) (M.read (| UnsupportedLiteral |)), + BinOp.Pure.ne (| + M.read (| abs |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| abs |)) (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.lt (| + M.read (| abs |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) |), ltac:(M.monadic - (BinOp.Pure.ge (M.read (| abs |)) (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.ge (| + M.read (| abs |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) |) |) |))) @@ -134,7 +146,7 @@ Module fmt. unsafe { fmt.pad_formatted_parts(&formatted) } } *) - Definition float_to_decimal_common_exact (τ : list Ty.t) (α : list Value.t) : M := + Definition float_to_decimal_common_exact (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ fmt; num; sign; precision ] => ltac:(M.monadic @@ -202,8 +214,8 @@ Module fmt. M.read (| M.read (| num |) |); M.read (| sign |); M.read (| precision |); - (* Unsize *) M.pointer_coercion buf; - (* Unsize *) M.pointer_coercion parts + (* Unsize *) M.pointer_coercion (| buf |); + (* Unsize *) M.pointer_coercion (| parts |) ] |) |) in @@ -246,7 +258,7 @@ Module fmt. unsafe { fmt.pad_formatted_parts(&formatted) } } *) - Definition float_to_decimal_common_shortest (τ : list Ty.t) (α : list Value.t) : M := + Definition float_to_decimal_common_shortest (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ fmt; num; sign; precision ] => ltac:(M.monadic @@ -313,8 +325,8 @@ Module fmt. M.read (| M.read (| num |) |); M.read (| sign |); M.read (| precision |); - (* Unsize *) M.pointer_coercion buf; - (* Unsize *) M.pointer_coercion parts + (* Unsize *) M.pointer_coercion (| buf |); + (* Unsize *) M.pointer_coercion (| parts |) ] |) |) in @@ -351,7 +363,7 @@ Module fmt. } } *) - Definition float_to_decimal_display (τ : list Ty.t) (α : list Value.t) : M := + Definition float_to_decimal_display (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ fmt; num ] => ltac:(M.monadic @@ -374,17 +386,23 @@ Module fmt. ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool false |) in - M.alloc (| Value.StructTuple "core::num::flt2dec::Sign::Minus" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::flt2dec::Sign::Minus" [] |) + |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::num::flt2dec::Sign::MinusPlus" [] |))) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::flt2dec::Sign::MinusPlus" [] + |) + |))) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -417,7 +435,7 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (let min_precision := M.alloc (| Value.Integer Integer.Usize 0 |) in + (let min_precision := M.alloc (| M.of_value (| Value.Integer 0 |) |) in M.alloc (| M.call_closure (| M.get_function (| @@ -464,7 +482,7 @@ Module fmt. unsafe { fmt.pad_formatted_parts(&formatted) } } *) - Definition float_to_exponential_common_exact (τ : list Ty.t) (α : list Value.t) : M := + Definition float_to_exponential_common_exact (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ fmt; num; sign; precision; upper ] => ltac:(M.monadic @@ -534,8 +552,8 @@ Module fmt. M.read (| sign |); M.read (| precision |); M.read (| upper |); - (* Unsize *) M.pointer_coercion buf; - (* Unsize *) M.pointer_coercion parts + (* Unsize *) M.pointer_coercion (| buf |); + (* Unsize *) M.pointer_coercion (| parts |) ] |) |) in @@ -579,7 +597,7 @@ Module fmt. unsafe { fmt.pad_formatted_parts(&formatted) } } *) - Definition float_to_exponential_common_shortest (τ : list Ty.t) (α : list Value.t) : M := + Definition float_to_exponential_common_shortest (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ fmt; num; sign; upper ] => ltac:(M.monadic @@ -645,10 +663,16 @@ Module fmt. M.get_function (| "core::num::flt2dec::strategy::grisu::format_shortest", [] |); M.read (| M.read (| num |) |); M.read (| sign |); - Value.Tuple [ Value.Integer Integer.I16 0; Value.Integer Integer.I16 0 ]; + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |); M.read (| upper |); - (* Unsize *) M.pointer_coercion buf; - (* Unsize *) M.pointer_coercion parts + (* Unsize *) M.pointer_coercion (| buf |); + (* Unsize *) M.pointer_coercion (| parts |) ] |) |) in @@ -685,7 +709,7 @@ Module fmt. } } *) - Definition float_to_exponential_common (τ : list Ty.t) (α : list Value.t) : M := + Definition float_to_exponential_common (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ fmt; num; upper ] => ltac:(M.monadic @@ -709,17 +733,23 @@ Module fmt. ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool false |) in - M.alloc (| Value.StructTuple "core::num::flt2dec::Sign::Minus" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::flt2dec::Sign::Minus" [] |) + |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::num::flt2dec::Sign::MinusPlus" [] |))) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::flt2dec::Sign::MinusPlus" [] + |) + |))) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -747,8 +777,9 @@ Module fmt. M.read (| num |); M.read (| sign |); BinOp.Panic.add (| + Integer.Usize, M.read (| precision |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); M.read (| upper |) ] @@ -798,7 +829,7 @@ Module fmt. } } *) - Definition float_to_general_debug (τ : list Ty.t) (α : list Value.t) : M := + Definition float_to_general_debug (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ fmt; num ] => ltac:(M.monadic @@ -821,17 +852,23 @@ Module fmt. ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool false |) in - M.alloc (| Value.StructTuple "core::num::flt2dec::Sign::Minus" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::flt2dec::Sign::Minus" [] |) + |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::num::flt2dec::Sign::MinusPlus" [] |))) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::flt2dec::Sign::MinusPlus" [] + |) + |))) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -865,7 +902,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -885,7 +922,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 (| M.of_value (| Value.Bool false |) |) in M.alloc (| M.call_closure (| M.get_function (| @@ -902,7 +939,7 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (let min_precision := M.alloc (| Value.Integer Integer.Usize 1 |) in + (let min_precision := M.alloc (| M.of_value (| Value.Integer 1 |) |) in M.alloc (| M.call_closure (| M.get_function (| @@ -933,7 +970,7 @@ Module fmt. float_to_general_debug(fmt, self) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -962,7 +999,7 @@ Module fmt. float_to_decimal_display(fmt, self) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -991,7 +1028,7 @@ Module fmt. float_to_exponential_common(fmt, self, false) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -1002,7 +1039,7 @@ Module fmt. "core::fmt::float::float_to_exponential_common", [ Ty.path "f32" ] |), - [ M.read (| fmt |); M.read (| self |); Value.Bool false ] + [ M.read (| fmt |); M.read (| self |); M.of_value (| Value.Bool false |) ] |))) | _, _ => M.impossible end. @@ -1023,7 +1060,7 @@ Module fmt. float_to_exponential_common(fmt, self, true) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -1034,7 +1071,7 @@ Module fmt. "core::fmt::float::float_to_exponential_common", [ Ty.path "f32" ] |), - [ M.read (| fmt |); M.read (| self |); Value.Bool true ] + [ M.read (| fmt |); M.read (| self |); M.of_value (| Value.Bool true |) ] |))) | _, _ => M.impossible end. @@ -1055,7 +1092,7 @@ Module fmt. float_to_general_debug(fmt, self) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -1084,7 +1121,7 @@ Module fmt. float_to_decimal_display(fmt, self) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -1113,7 +1150,7 @@ Module fmt. float_to_exponential_common(fmt, self, false) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -1124,7 +1161,7 @@ Module fmt. "core::fmt::float::float_to_exponential_common", [ Ty.path "f64" ] |), - [ M.read (| fmt |); M.read (| self |); Value.Bool false ] + [ M.read (| fmt |); M.read (| self |); M.of_value (| Value.Bool false |) ] |))) | _, _ => M.impossible end. @@ -1145,7 +1182,7 @@ Module fmt. float_to_exponential_common(fmt, self, true) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -1156,7 +1193,7 @@ Module fmt. "core::fmt::float::float_to_exponential_common", [ Ty.path "f64" ] |), - [ M.read (| fmt |); M.read (| self |); Value.Bool true ] + [ M.read (| fmt |); M.read (| self |); M.of_value (| Value.Bool true |) ] |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/fmt/mod.v b/CoqOfRust/core/fmt/mod.v index 59c27caef..1e55f0281 100644 --- a/CoqOfRust/core/fmt/mod.v +++ b/CoqOfRust/core/fmt/mod.v @@ -42,7 +42,7 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Alignment". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -63,7 +63,7 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Alignment". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -80,15 +80,15 @@ Module fmt. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Left" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Left" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Right" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Right" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Center" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Center" |) |) |))) ] |) |) @@ -120,7 +120,7 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Alignment". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -147,7 +147,7 @@ Module fmt. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -175,12 +175,12 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Alignment". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -219,7 +219,7 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Error". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -240,7 +240,7 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Error". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -248,7 +248,7 @@ Module fmt. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Error" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Error" |) |) ] |))) | _, _ => M.impossible end. @@ -265,9 +265,9 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Error". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "core::fmt::Error" [])) + | [], [] => ltac:(M.monadic (M.of_value (| Value.StructTuple "core::fmt::Error" [] |))) | _, _ => M.impossible end. @@ -294,12 +294,12 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -316,13 +316,13 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Error". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic (let self := M.alloc (| self |) in let state := M.alloc (| state |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -338,13 +338,13 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Error". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple "core::cmp::Ordering::Equal" [])) + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))) | _, _ => M.impossible end. @@ -371,13 +371,13 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -393,15 +393,17 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Error". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Equal" [] ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |)) ] + |))) | _, _ => M.impossible end. @@ -415,7 +417,7 @@ Module fmt. (* Trait *) Module Write. - Definition write_char (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_char (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; c ] => ltac:(M.monadic @@ -430,7 +432,9 @@ Module fmt. [ M.read (| c |); (* Unsize *) - M.pointer_coercion (M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |)) + M.pointer_coercion (| + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) + |) ] |) ] @@ -439,7 +443,7 @@ Module fmt. end. Axiom ProvidedMethod_write_char : M.IsProvidedMethod "core::fmt::Write" "write_char" write_char. - Definition write_fmt (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_fmt (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; args ] => ltac:(M.monadic @@ -469,7 +473,7 @@ Module fmt. ( **self).write_str(s) } *) - Definition write_str (W : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (W : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W in match τ, α with | [], [ self; s ] => @@ -488,7 +492,7 @@ Module fmt. ( **self).write_char(c) } *) - Definition write_char (W : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_char (W : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W in match τ, α with | [], [ self; c ] => @@ -507,7 +511,7 @@ Module fmt. ( **self).write_fmt(args) } *) - Definition write_fmt (W : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_fmt (W : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W in match τ, α with | [], [ self; args ] => @@ -565,21 +569,27 @@ Module fmt. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ buf ] => ltac:(M.monadic (let buf := M.alloc (| buf |) in - Value.StructRecord - "core::fmt::Formatter" - [ - ("flags", Value.Integer Integer.U32 0); - ("fill", Value.UnicodeChar 32); - ("align", Value.StructTuple "core::fmt::rt::Alignment::Unknown" []); - ("width", Value.StructTuple "core::option::Option::None" []); - ("precision", Value.StructTuple "core::option::Option::None" []); - ("buf", (* Unsize *) M.pointer_coercion (M.read (| buf |))) - ])) + M.of_value (| + Value.StructRecord + "core::fmt::Formatter" + [ + ("flags", A.to_value (M.of_value (| Value.Integer 0 |))); + ("fill", A.to_value (M.of_value (| Value.UnicodeChar 32 |))); + ("align", + A.to_value + (M.of_value (| Value.StructTuple "core::fmt::rt::Alignment::Unknown" [] |))); + ("width", + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("precision", + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("buf", A.to_value (* Unsize *) (M.pointer_coercion (| M.read (| buf |) |))) + ] + |))) | _, _ => M.impossible end. @@ -603,87 +613,103 @@ Module fmt. } } *) - Definition wrap_buf (τ : list Ty.t) (α : list Value.t) : M := + Definition wrap_buf (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; wrap ] => ltac:(M.monadic (let self := M.alloc (| self |) in let wrap := M.alloc (| wrap |) in - Value.StructRecord - "core::fmt::Formatter" - [ - ("buf", - (* Unsize *) - M.pointer_coercion - (M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ - Ty.tuple - [ Ty.apply (Ty.path "&mut") [ Ty.dyn [ ("core::fmt::Write::Trait", []) ] ] - ] - ], - "call_once", - [] - |), - [ - M.read (| wrap |); - Value.Tuple + M.of_value (| + Value.StructRecord + "core::fmt::Formatter" + [ + ("buf", + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ + Ty.tuple + [ + Ty.apply + (Ty.path "&mut") + [ Ty.dyn [ ("core::fmt::Write::Trait", []) ] ] + ] + ], + "call_once", + [] + |), [ - (* Unsize *) - M.pointer_coercion - (M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::Formatter", - "buf" - |) - |)) + M.read (| wrap |); + M.of_value (| + Value.Tuple + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::Formatter", + "buf" + |) + |) + |)) + ] + |) ] - ] - |))); - ("flags", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::Formatter", - "flags" - |) - |)); - ("fill", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::Formatter", - "fill" - |) - |)); - ("align", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::Formatter", - "align" - |) - |)); - ("width", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::Formatter", - "width" - |) - |)); - ("precision", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::Formatter", - "precision" - |) - |)) - ])) + |) + |))); + ("flags", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::Formatter", + "flags" + |) + |))); + ("fill", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::Formatter", + "fill" + |) + |))); + ("align", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::Formatter", + "align" + |) + |))); + ("width", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::Formatter", + "width" + |) + |))); + ("precision", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::Formatter", + "precision" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -755,7 +781,7 @@ Module fmt. } } *) - Definition pad_integral (τ : list Ty.t) (α : list Value.t) : M := + Definition pad_integral (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; is_nonnegative; prefix; buf ] => ltac:(M.monadic @@ -773,35 +799,44 @@ Module fmt. [ M.read (| buf |) ] |) |) in - let sign := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let sign := + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| UnOp.Pure.not (M.read (| is_nonnegative |)) |)) in + 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 _ := M.write (| sign, - Value.StructTuple - "core::option::Option::Some" - [ Value.UnicodeChar 45 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.UnicodeChar 45 |)) ] + |) |) in let _ := let β := width in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -825,21 +860,25 @@ Module fmt. let _ := M.write (| sign, - Value.StructTuple - "core::option::Option::Some" - [ Value.UnicodeChar 43 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.UnicodeChar 43 |)) ] + |) |) in let _ := let β := width in M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -847,7 +886,7 @@ Module fmt. let prefix := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -870,6 +909,7 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_trait_method (| @@ -889,11 +929,17 @@ Module fmt. |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| prefix |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| prefix |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |) in @@ -1011,7 +1057,7 @@ Module fmt. |) in let min := M.copy (| γ0_0 |) in let γ := - M.alloc (| BinOp.Pure.ge (M.read (| width |)) (M.read (| min |)) |) in + 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 _ := @@ -1141,7 +1187,7 @@ Module fmt. "core::fmt::Formatter", "fill" |); - Value.UnicodeChar 48 + M.of_value (| Value.UnicodeChar 48 |) ] |) |) in @@ -1158,7 +1204,9 @@ Module fmt. "core::fmt::Formatter", "align" |); - Value.StructTuple "core::fmt::rt::Alignment::Right" [] + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Right" [] + |) ] |) |) in @@ -1260,8 +1308,14 @@ Module fmt. |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| min |), M.read (| width |) |); - Value.StructTuple "core::fmt::Alignment::Right" [] + BinOp.Panic.sub (| + Integer.Usize, + M.read (| min |), + M.read (| width |) + |); + M.of_value (| + Value.StructTuple "core::fmt::Alignment::Right" [] + |) ] |) ] @@ -1495,7 +1549,11 @@ Module fmt. M.read (| old_align |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -1530,8 +1588,14 @@ Module fmt. |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| min |), M.read (| width |) |); - Value.StructTuple "core::fmt::Alignment::Right" [] + BinOp.Panic.sub (| + Integer.Usize, + M.read (| min |), + M.read (| width |) + |); + M.of_value (| + Value.StructTuple "core::fmt::Alignment::Right" [] + |) ] |) ] @@ -1813,7 +1877,7 @@ Module fmt. } } *) - Definition pad (τ : list Ty.t) (α : list Value.t) : M := + Definition pad (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -1824,7 +1888,7 @@ Module fmt. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1894,13 +1958,13 @@ Module fmt. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let s := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1918,7 +1982,7 @@ Module fmt. |) in let max := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1978,9 +2042,11 @@ Module fmt. |), [ M.read (| s |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| i |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| i |))) ] + |) ] |); M.read (| s |) @@ -2052,14 +2118,17 @@ Module fmt. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| chars_count |)) (M.read (| width |)) + BinOp.Pure.ge (| + M.read (| chars_count |), + M.read (| width |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2090,7 +2159,11 @@ Module fmt. fun γ => ltac:(M.monadic (let align := - M.alloc (| Value.StructTuple "core::fmt::Alignment::Left" [] |) in + M.alloc (| + M.of_value (| + Value.StructTuple "core::fmt::Alignment::Left" [] + |) + |) in let post_padding := M.copy (| M.match_operator (| @@ -2118,6 +2191,7 @@ Module fmt. [ M.read (| self |); BinOp.Panic.sub (| + Integer.Usize, M.read (| width |), M.read (| chars_count |) |); @@ -2310,7 +2384,7 @@ Module fmt. Ok(PostPadding::new(self.fill, post_pad)) } *) - Definition padding (τ : list Ty.t) (α : list Value.t) : M := + Definition padding (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; padding; default ] => ltac:(M.monadic @@ -2332,13 +2406,19 @@ Module fmt. fun γ => ltac:(M.monadic default); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::fmt::Alignment::Left" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::fmt::Alignment::Left" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::fmt::Alignment::Right" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::fmt::Alignment::Right" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::fmt::Alignment::Center" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::fmt::Alignment::Center" [] |) + |))) ] |) |) in @@ -2349,30 +2429,49 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [ Value.Integer Integer.Usize 0; M.read (| padding |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| padding |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [ M.read (| padding |); Value.Integer Integer.Usize 0 ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| padding |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| - M.read (| padding |), - Value.Integer Integer.Usize 2 - |); - BinOp.Panic.div (| - BinOp.Panic.add (| - M.read (| padding |), - Value.Integer Integer.Usize 1 - |), - Value.Integer Integer.Usize 2 - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.Usize, + M.read (| padding |), + M.of_value (| Value.Integer 2 |) + |)); + A.to_value + (BinOp.Panic.div (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| padding |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 2 |) + |)) + ] + |) |))) ] |), @@ -2398,12 +2497,14 @@ Module fmt. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| pre_pad |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| pre_pad |))) + ] + |) ] |) |), @@ -2548,35 +2649,38 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::PostPadding", - "new", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::Formatter", - "fill" - |) - |); - M.read (| post_pad |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::PostPadding", + "new", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::Formatter", + "fill" + |) + |); + M.read (| post_pad |) + ] + |)) + ] + |) |))) ] |) @@ -2631,7 +2735,7 @@ Module fmt. } } *) - Definition pad_formatted_parts (τ : list Ty.t) (α : list Value.t) : M := + Definition pad_formatted_parts (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; formatted ] => ltac:(M.monadic @@ -2641,7 +2745,7 @@ Module fmt. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2689,7 +2793,7 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2811,7 +2915,7 @@ Module fmt. "core::num::fmt::Formatted", "sign" |), - M.read (| Value.String "" |) + M.read (| M.of_value (| Value.String "" |) |) |) in let _ := M.write (| @@ -2842,7 +2946,7 @@ Module fmt. "core::fmt::Formatter", "fill" |), - Value.UnicodeChar 48 + M.of_value (| Value.UnicodeChar 48 |) |) in let _ := M.write (| @@ -2851,10 +2955,13 @@ Module fmt. "core::fmt::Formatter", "align" |), - Value.StructTuple "core::fmt::rt::Alignment::Right" [] + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Right" [] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := @@ -2871,14 +2978,14 @@ Module fmt. let ret := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| width |)) (M.read (| len |)) + BinOp.Pure.le (| M.read (| width |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -2924,12 +3031,15 @@ Module fmt. [ M.read (| self |); BinOp.Panic.sub (| + Integer.Usize, M.read (| width |), M.read (| len |) |); - Value.StructTuple - "core::fmt::Alignment::Right" - [] + M.of_value (| + Value.StructTuple + "core::fmt::Alignment::Right" + [] + |) ] |) ] @@ -3068,7 +3178,7 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3170,7 +3280,7 @@ Module fmt. Ok(()) } *) - Definition write_formatted_parts (τ : list Ty.t) (α : list Value.t) : M := + Definition write_formatted_parts (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; formatted ] => ltac:(M.monadic @@ -3181,15 +3291,15 @@ Module fmt. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_empty", [] |), [ M.read (| @@ -3200,7 +3310,8 @@ Module fmt. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3295,8 +3406,8 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -3377,16 +3488,18 @@ Module fmt. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| nzeroes |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| nzeroes |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", @@ -3399,7 +3512,8 @@ Module fmt. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3524,6 +3638,7 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -3541,7 +3656,9 @@ Module fmt. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3555,7 +3672,11 @@ Module fmt. |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |) |) |) |))) @@ -3563,16 +3684,17 @@ Module fmt. |))) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| nzeroes |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| nzeroes |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3636,14 +3758,17 @@ Module fmt. "core::fmt::write_formatted_parts::ZEROES" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| - nzeroes - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + nzeroes + |))) + ] + |) ] |) ] @@ -3713,10 +3838,14 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => @@ -3730,7 +3859,10 @@ Module fmt. let v := M.copy (| γ0_0 |) in let s := M.alloc (| - repeat (Value.Integer Integer.U8 0) 5 + repeat (| + M.of_value (| Value.Integer 0 |), + 5 + |) |) in let len := M.alloc (| @@ -3802,12 +3934,17 @@ Module fmt. |), [ s; - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + len + |))) + ] + |) ] |) ] @@ -3869,18 +4006,24 @@ Module fmt. M.write (| M.read (| c |), BinOp.Panic.add (| + Integer.U8, M.read (| - UnsupportedLiteral + M.of_value (| + UnsupportedLiteral + |) |), - M.rust_cast - (BinOp.Panic.rem (| + M.rust_cast (| + BinOp.Panic.rem (| + Integer.U16, M.read (| v |), - Value.Integer - Integer.U16 - 10 - |)) + M.of_value (| + Value.Integer + 10 + |) + |) + |) |) |) in let _ := @@ -3888,18 +4031,23 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U16, M.read (| β |), - Value.Integer - Integer.U16 - 10 + M.of_value (| + Value.Integer 10 + |) |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)) in @@ -3928,14 +4076,15 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "buf" |) - |)); + |) + |); M.call_closure (| M.get_trait_method (| "core::ops::index::Index", @@ -3953,9 +4102,15 @@ Module fmt. |), [ s; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| len |))) + ] + |) ] |) ] @@ -4020,7 +4175,7 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -4055,14 +4210,15 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "buf" |) - |)); + |) + |); M.read (| buf |) ] |) @@ -4126,16 +4282,22 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -4149,7 +4311,7 @@ Module fmt. self.buf.write_str(data) } *) - Definition write_str (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; data ] => ltac:(M.monadic @@ -4184,7 +4346,7 @@ Module fmt. write(self.buf, fmt) } *) - Definition write_fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition write_fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -4194,14 +4356,15 @@ Module fmt. M.get_function (| "core::fmt::write", [] |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "buf" |) - |)); + |) + |); M.read (| fmt |) ] |))) @@ -4215,7 +4378,7 @@ Module fmt. self.flags } *) - Definition flags (τ : list Ty.t) (α : list Value.t) : M := + Definition flags (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4237,7 +4400,7 @@ Module fmt. self.fill } *) - Definition fill (τ : list Ty.t) (α : list Value.t) : M := + Definition fill (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4264,7 +4427,7 @@ Module fmt. } } *) - Definition align (τ : list Ty.t) (α : list Value.t) : M := + Definition align (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4280,26 +4443,44 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::fmt::Alignment::Left" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::fmt::Alignment::Left" [] |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::fmt::Alignment::Right" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::fmt::Alignment::Right" [] |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::fmt::Alignment::Center" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::fmt::Alignment::Center" [] |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4313,7 +4494,7 @@ Module fmt. self.width } *) - Definition width (τ : list Ty.t) (α : list Value.t) : M := + Definition width (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4335,7 +4516,7 @@ Module fmt. self.precision } *) - Definition precision (τ : list Ty.t) (α : list Value.t) : M := + Definition precision (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4357,25 +4538,27 @@ Module fmt. self.flags & (1 << rt::Flag::SignPlus as u32) != 0 } *) - Definition sign_plus (τ : list Ty.t) (α : list Value.t) : M := + Definition sign_plus (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "flags" |) - |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - M.rust_cast (Value.Integer Integer.Isize 0) - |))) - (Value.Integer Integer.U32 0))) + |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.rust_cast (| M.of_value (| Value.Integer 0 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -4386,25 +4569,27 @@ Module fmt. self.flags & (1 << rt::Flag::SignMinus as u32) != 0 } *) - Definition sign_minus (τ : list Ty.t) (α : list Value.t) : M := + Definition sign_minus (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "flags" |) - |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - M.rust_cast (Value.Integer Integer.Isize 1) - |))) - (Value.Integer Integer.U32 0))) + |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.rust_cast (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -4415,25 +4600,27 @@ Module fmt. self.flags & (1 << rt::Flag::Alternate as u32) != 0 } *) - Definition alternate (τ : list Ty.t) (α : list Value.t) : M := + Definition alternate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "flags" |) - |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - M.rust_cast (Value.Integer Integer.Isize 2) - |))) - (Value.Integer Integer.U32 0))) + |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.rust_cast (| M.of_value (| Value.Integer 2 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -4444,25 +4631,27 @@ Module fmt. self.flags & (1 << rt::Flag::SignAwareZeroPad as u32) != 0 } *) - Definition sign_aware_zero_pad (τ : list Ty.t) (α : list Value.t) : M := + Definition sign_aware_zero_pad (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "flags" |) - |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - M.rust_cast (Value.Integer Integer.Isize 3) - |))) - (Value.Integer Integer.U32 0))) + |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.rust_cast (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -4474,25 +4663,27 @@ Module fmt. self.flags & (1 << rt::Flag::DebugLowerHex as u32) != 0 } *) - Definition debug_lower_hex (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_lower_hex (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "flags" |) - |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - M.rust_cast (Value.Integer Integer.Isize 4) - |))) - (Value.Integer Integer.U32 0))) + |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.rust_cast (| M.of_value (| Value.Integer 4 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -4504,25 +4695,27 @@ Module fmt. self.flags & (1 << rt::Flag::DebugUpperHex as u32) != 0 } *) - Definition debug_upper_hex (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_upper_hex (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "flags" |) - |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - M.rust_cast (Value.Integer Integer.Isize 5) - |))) - (Value.Integer Integer.U32 0))) + |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.rust_cast (| M.of_value (| Value.Integer 5 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -4534,7 +4727,7 @@ Module fmt. builders::debug_struct_new(self, name) } *) - Definition debug_struct (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_struct (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name ] => ltac:(M.monadic @@ -4561,7 +4754,7 @@ Module fmt. builder.finish() } *) - Definition debug_struct_field1_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_struct_field1_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; name1; value1 ] => ltac:(M.monadic @@ -4588,7 +4781,7 @@ Module fmt. [ builder; M.read (| name1 |); - (* Unsize *) M.pointer_coercion (M.read (| value1 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in @@ -4624,7 +4817,7 @@ Module fmt. builder.finish() } *) - Definition debug_struct_field2_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_struct_field2_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; name1; value1; name2; value2 ] => ltac:(M.monadic @@ -4653,7 +4846,7 @@ Module fmt. [ builder; M.read (| name1 |); - (* Unsize *) M.pointer_coercion (M.read (| value1 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in @@ -4668,7 +4861,7 @@ Module fmt. [ builder; M.read (| name2 |); - (* Unsize *) M.pointer_coercion (M.read (| value2 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value2 |) |) ] |) |) in @@ -4707,7 +4900,7 @@ Module fmt. builder.finish() } *) - Definition debug_struct_field3_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_struct_field3_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; name1; value1; name2; value2; name3; value3 ] => ltac:(M.monadic @@ -4738,7 +4931,7 @@ Module fmt. [ builder; M.read (| name1 |); - (* Unsize *) M.pointer_coercion (M.read (| value1 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in @@ -4753,7 +4946,7 @@ Module fmt. [ builder; M.read (| name2 |); - (* Unsize *) M.pointer_coercion (M.read (| value2 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value2 |) |) ] |) |) in @@ -4768,7 +4961,7 @@ Module fmt. [ builder; M.read (| name3 |); - (* Unsize *) M.pointer_coercion (M.read (| value3 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value3 |) |) ] |) |) in @@ -4810,7 +5003,7 @@ Module fmt. builder.finish() } *) - Definition debug_struct_field4_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_struct_field4_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; name1; value1; name2; value2; name3; value3; name4; value4 ] => ltac:(M.monadic @@ -4843,7 +5036,7 @@ Module fmt. [ builder; M.read (| name1 |); - (* Unsize *) M.pointer_coercion (M.read (| value1 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in @@ -4858,7 +5051,7 @@ Module fmt. [ builder; M.read (| name2 |); - (* Unsize *) M.pointer_coercion (M.read (| value2 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value2 |) |) ] |) |) in @@ -4873,7 +5066,7 @@ Module fmt. [ builder; M.read (| name3 |); - (* Unsize *) M.pointer_coercion (M.read (| value3 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value3 |) |) ] |) |) in @@ -4888,7 +5081,7 @@ Module fmt. [ builder; M.read (| name4 |); - (* Unsize *) M.pointer_coercion (M.read (| value4 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value4 |) |) ] |) |) in @@ -4933,7 +5126,7 @@ Module fmt. builder.finish() } *) - Definition debug_struct_field5_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_struct_field5_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; name1; value1; name2; value2; name3; value3; name4; value4; name5; value5 @@ -4970,7 +5163,7 @@ Module fmt. [ builder; M.read (| name1 |); - (* Unsize *) M.pointer_coercion (M.read (| value1 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in @@ -4985,7 +5178,7 @@ Module fmt. [ builder; M.read (| name2 |); - (* Unsize *) M.pointer_coercion (M.read (| value2 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value2 |) |) ] |) |) in @@ -5000,7 +5193,7 @@ Module fmt. [ builder; M.read (| name3 |); - (* Unsize *) M.pointer_coercion (M.read (| value3 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value3 |) |) ] |) |) in @@ -5015,7 +5208,7 @@ Module fmt. [ builder; M.read (| name4 |); - (* Unsize *) M.pointer_coercion (M.read (| value4 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value4 |) |) ] |) |) in @@ -5030,7 +5223,7 @@ Module fmt. [ builder; M.read (| name5 |); - (* Unsize *) M.pointer_coercion (M.read (| value5 |)) + (* Unsize *) M.pointer_coercion (| M.read (| value5 |) |) ] |) |) in @@ -5066,7 +5259,7 @@ Module fmt. builder.finish() } *) - Definition debug_struct_fields_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_struct_fields_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; names; values ] => ltac:(M.monadic @@ -5078,35 +5271,41 @@ Module fmt. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ], - "len", - [] - |), - [ M.read (| names |) ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "&") - [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] - ], - "len", - [] - |), - [ M.read (| values |) ] - |) - |) - ] + (Ty.path "slice") + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ], + "len", + [] + |), + [ M.read (| names |) ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path "&") + [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] + ], + "len", + [] + |), + [ M.read (| values |) ] + |) + |)) + ] + |) |), [ fun γ => @@ -5116,17 +5315,19 @@ Module fmt. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5138,7 +5339,9 @@ Module fmt. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -5150,14 +5353,16 @@ Module fmt. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -5286,14 +5491,15 @@ Module fmt. [ builder; M.read (| M.read (| name |) |); - (* Unsize *) M.pointer_coercion (M.read (| value |)) + (* Unsize *) + M.pointer_coercion (| M.read (| value |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -5319,7 +5525,7 @@ Module fmt. builders::debug_tuple_new(self, name) } *) - Definition debug_tuple (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_tuple (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name ] => ltac:(M.monadic @@ -5341,7 +5547,7 @@ Module fmt. builder.finish() } *) - Definition debug_tuple_field1_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_tuple_field1_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; value1 ] => ltac:(M.monadic @@ -5364,7 +5570,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value1 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in M.alloc (| @@ -5397,7 +5603,7 @@ Module fmt. builder.finish() } *) - Definition debug_tuple_field2_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_tuple_field2_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; value1; value2 ] => ltac:(M.monadic @@ -5421,7 +5627,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value1 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in let _ := @@ -5432,7 +5638,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value2 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value2 |) |) ] |) |) in M.alloc (| @@ -5467,7 +5673,7 @@ Module fmt. builder.finish() } *) - Definition debug_tuple_field3_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_tuple_field3_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; value1; value2; value3 ] => ltac:(M.monadic @@ -5492,7 +5698,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value1 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in let _ := @@ -5503,7 +5709,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value2 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value2 |) |) ] |) |) in let _ := @@ -5514,7 +5720,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value3 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value3 |) |) ] |) |) in M.alloc (| @@ -5551,7 +5757,7 @@ Module fmt. builder.finish() } *) - Definition debug_tuple_field4_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_tuple_field4_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; value1; value2; value3; value4 ] => ltac:(M.monadic @@ -5577,7 +5783,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value1 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in let _ := @@ -5588,7 +5794,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value2 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value2 |) |) ] |) |) in let _ := @@ -5599,7 +5805,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value3 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value3 |) |) ] |) |) in let _ := @@ -5610,7 +5816,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value4 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value4 |) |) ] |) |) in M.alloc (| @@ -5649,7 +5855,7 @@ Module fmt. builder.finish() } *) - Definition debug_tuple_field5_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_tuple_field5_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; value1; value2; value3; value4; value5 ] => ltac:(M.monadic @@ -5676,7 +5882,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value1 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value1 |) |) ] |) |) in let _ := @@ -5687,7 +5893,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value2 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value2 |) |) ] |) |) in let _ := @@ -5698,7 +5904,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value3 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value3 |) |) ] |) |) in let _ := @@ -5709,7 +5915,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value4 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value4 |) |) ] |) |) in let _ := @@ -5720,7 +5926,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion (M.read (| value5 |)) ] + [ builder; (* Unsize *) M.pointer_coercion (| M.read (| value5 |) |) ] |) |) in M.alloc (| @@ -5753,7 +5959,7 @@ Module fmt. builder.finish() } *) - Definition debug_tuple_fields_finish (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_tuple_fields_finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; values ] => ltac:(M.monadic @@ -5844,14 +6050,15 @@ Module fmt. |), [ builder; - (* Unsize *) M.pointer_coercion (M.read (| value |)) + (* Unsize *) + M.pointer_coercion (| M.read (| value |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -5877,7 +6084,7 @@ Module fmt. builders::debug_list_new(self) } *) - Definition debug_list (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_list (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5896,7 +6103,7 @@ Module fmt. builders::debug_set_new(self) } *) - Definition debug_set (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_set (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5915,7 +6122,7 @@ Module fmt. builders::debug_map_new(self) } *) - Definition debug_map (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_map (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5970,24 +6177,24 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::Arguments". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -6017,7 +6224,7 @@ Module fmt. Arguments { pieces, fmt: None, args: &[] } } *) - Definition new_const (τ : list Ty.t) (α : list Value.t) : M := + Definition new_const (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ pieces ] => ltac:(M.monadic @@ -6025,15 +6232,15 @@ Module fmt. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -6042,8 +6249,9 @@ Module fmt. [] |), [ M.read (| pieces |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -6059,27 +6267,43 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "invalid args" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "invalid args" |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::fmt::Arguments" - [ - ("pieces", M.read (| pieces |)); - ("fmt", Value.StructTuple "core::option::Option::None" []); - ("args", (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |))) - ] + M.of_value (| + Value.StructRecord + "core::fmt::Arguments" + [ + ("pieces", A.to_value (M.read (| pieces |))); + ("fmt", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("args", + A.to_value + (* Unsize *) + (M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |))) + ] + |) |) |))) | _, _ => M.impossible @@ -6095,7 +6319,7 @@ Module fmt. Arguments { pieces, fmt: None, args } } *) - Definition new_v1 (τ : list Ty.t) (α : list Value.t) : M := + Definition new_v1 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ pieces; args ] => ltac:(M.monadic @@ -6104,7 +6328,7 @@ Module fmt. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6112,8 +6336,8 @@ Module fmt. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -6122,8 +6346,8 @@ Module fmt. [] |), [ M.read (| pieces |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -6132,10 +6356,11 @@ Module fmt. [] |), [ M.read (| args |) ] - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.call_closure (| + (BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -6144,8 +6369,9 @@ Module fmt. [] |), [ M.read (| pieces |) ] - |)) - (BinOp.Panic.add (| + |), + BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -6156,8 +6382,9 @@ Module fmt. |), [ M.read (| args |) ] |), - Value.Integer Integer.Usize 1 - |)))) + M.of_value (| Value.Integer 1 |) + |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6174,27 +6401,40 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "invalid args" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "invalid args" |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::fmt::Arguments" - [ - ("pieces", M.read (| pieces |)); - ("fmt", Value.StructTuple "core::option::Option::None" []); - ("args", M.read (| args |)) - ] + M.of_value (| + Value.StructRecord + "core::fmt::Arguments" + [ + ("pieces", A.to_value (M.read (| pieces |))); + ("fmt", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("args", A.to_value (M.read (| args |))) + ] + |) |) |))) | _, _ => M.impossible @@ -6212,7 +6452,7 @@ Module fmt. Arguments { pieces, fmt: Some(fmt), args } } *) - Definition new_v1_formatted (τ : list Ty.t) (α : list Value.t) : M := + Definition new_v1_formatted (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ pieces; args; fmt; _unsafe_arg ] => ltac:(M.monadic @@ -6220,13 +6460,21 @@ Module fmt. let args := M.alloc (| args |) in let fmt := M.alloc (| fmt |) in let _unsafe_arg := M.alloc (| _unsafe_arg |) in - Value.StructRecord - "core::fmt::Arguments" - [ - ("pieces", M.read (| pieces |)); - ("fmt", Value.StructTuple "core::option::Option::Some" [ M.read (| fmt |) ]); - ("args", M.read (| args |)) - ])) + M.of_value (| + Value.StructRecord + "core::fmt::Arguments" + [ + ("pieces", A.to_value (M.read (| pieces |))); + ("fmt", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| fmt |)) ] + |))); + ("args", A.to_value (M.read (| args |))) + ] + |))) | _, _ => M.impossible end. @@ -6252,7 +6500,7 @@ Module fmt. } } *) - Definition estimated_capacity (τ : list Ty.t) (α : list Value.t) : M := + Definition estimated_capacity (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6321,8 +6569,8 @@ Module fmt. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6339,14 +6587,15 @@ Module fmt. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6375,7 +6624,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6384,8 +6633,8 @@ Module fmt. (M.alloc (| LogicalOp.and (| LogicalOp.and (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -6402,7 +6651,8 @@ Module fmt. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_associated_function (| @@ -6420,21 +6670,22 @@ Module fmt. "pieces" |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |) ] |))) |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| pieces_length |)) - (Value.Integer Integer.Usize 16))) + (BinOp.Pure.lt (| + M.read (| pieces_length |), + M.of_value (| Value.Integer 16 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -6451,9 +6702,9 @@ Module fmt. "checked_mul", [] |), - [ M.read (| pieces_length |); Value.Integer Integer.Usize 2 ] + [ M.read (| pieces_length |); M.of_value (| Value.Integer 2 |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |))) @@ -6476,7 +6727,7 @@ Module fmt. } } *) - Definition as_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6484,23 +6735,27 @@ Module fmt. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::Arguments", - "pieces" - |) - |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::Arguments", - "args" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::Arguments", + "pieces" + |) + |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::Arguments", + "args" + |) + |)) + ] + |) |), [ fun γ => @@ -6510,9 +6765,11 @@ Module fmt. let γ0_0 := M.read (| γ0_0 |) in let γ0_1 := M.read (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| Value.String "" |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.of_value (| Value.String "" |) |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -6523,10 +6780,17 @@ Module fmt. let s := M.alloc (| γ2_0 |) in let γ0_1 := M.read (| γ0_1 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| M.read (| s |) |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.read (| s |) |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -6545,7 +6809,7 @@ Module fmt. Display::fmt(self, fmt) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -6580,7 +6844,7 @@ Module fmt. write(fmt.buf, *self) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -6590,14 +6854,15 @@ Module fmt. M.get_function (| "core::fmt::write", [] |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| fmt |), "core::fmt::Formatter", "buf" |) - |)); + |) + |); M.read (| M.read (| self |) |) ] |))) @@ -6684,7 +6949,7 @@ Module fmt. Ok(()) } *) - Definition write (τ : list Ty.t) (α : list Value.t) : M := + Definition write (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ output; args ] => ltac:(M.monadic @@ -6697,10 +6962,10 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "new", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| output |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| output |) |) ] |) |) in - let idx := M.alloc (| Value.Integer Integer.Usize 0 |) in + let idx := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| M.SubPointer.get_struct_record_field (| args, "core::fmt::Arguments", "fmt" |), @@ -6831,15 +7096,15 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_empty", @@ -6850,7 +7115,8 @@ Module fmt. M.read (| piece |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6965,10 +7231,14 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -7060,14 +7330,15 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -7196,15 +7467,15 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_empty", @@ -7215,7 +7486,8 @@ Module fmt. M.read (| piece |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7330,10 +7602,14 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -7434,14 +7710,15 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))) @@ -7449,7 +7726,7 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7567,11 +7844,17 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -7599,7 +7882,7 @@ Module fmt. value.fmt(fmt) } *) - Definition run (τ : list Ty.t) (α : list Value.t) : M := + Definition run (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt; arg; args ] => ltac:(M.monadic @@ -7691,34 +7974,34 @@ Module fmt. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| arg |), "core::fmt::rt::Placeholder", "position" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -7727,7 +8010,9 @@ Module fmt. [] |), [ M.read (| args |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7740,17 +8025,19 @@ Module fmt. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: arg.position < args.len()" + M.of_value (| + Value.String "assertion failed: arg.position < args.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let value := @@ -7797,7 +8084,7 @@ Module fmt. } } *) - Definition getcount (τ : list Ty.t) (α : list Value.t) : M := + Definition getcount (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ args; cnt ] => ltac:(M.monadic @@ -7812,9 +8099,16 @@ Module fmt. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::fmt::rt::Count::Is", 0 |) in let n := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| n |)) ] + |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -7822,26 +8116,26 @@ Module fmt. let i := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| i |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| i |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -7850,7 +8144,9 @@ Module fmt. [] |), [ M.read (| args |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7863,17 +8159,20 @@ Module fmt. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: i < args.len()" + M.of_value (| + Value.String "assertion failed: i < args.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -7916,15 +8215,20 @@ Module fmt. PostPadding { fill, padding } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fill; padding ] => ltac:(M.monadic (let fill := M.alloc (| fill |) in let padding := M.alloc (| padding |) in - Value.StructRecord - "core::fmt::PostPadding" - [ ("fill", M.read (| fill |)); ("padding", M.read (| padding |)) ])) + M.of_value (| + Value.StructRecord + "core::fmt::PostPadding" + [ + ("fill", A.to_value (M.read (| fill |))); + ("padding", A.to_value (M.read (| padding |))) + ] + |))) | _, _ => M.impossible end. @@ -7938,7 +8242,7 @@ Module fmt. Ok(()) } *) - Definition write (τ : list Ty.t) (α : list Value.t) : M := + Definition write (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -7960,19 +8264,22 @@ Module fmt. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::fmt::PostPadding", - "padding" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::fmt::PostPadding", + "padding" + |) + |))) + ] + |) ] |) |), @@ -8107,14 +8414,20 @@ Module fmt. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -8132,7 +8445,7 @@ Module fmt. self.buf.write_str(s) } *) - Definition write_str (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -8165,7 +8478,7 @@ Module fmt. self.buf.write_char(c) } *) - Definition write_char (τ : list Ty.t) (α : list Value.t) : M := + Definition write_char (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; c ] => ltac:(M.monadic @@ -8198,7 +8511,7 @@ Module fmt. write(self.buf, args) } *) - Definition write_fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition write_fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; args ] => ltac:(M.monadic @@ -8208,14 +8521,15 @@ Module fmt. M.get_function (| "core::fmt::write", [] |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::Formatter", "buf" |) - |)); + |) + |); M.read (| args |) ] |))) @@ -8243,7 +8557,7 @@ Module fmt. Display::fmt("an error occurred when formatting an argument", f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8252,7 +8566,9 @@ Module fmt. M.call_closure (| M.get_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |), [ - M.read (| Value.String "an error occurred when formatting an argument" |); + M.read (| + M.of_value (| Value.String "an error occurred when formatting an argument" |) + |); M.read (| f |) ] |))) @@ -8271,7 +8587,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8298,7 +8614,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8325,7 +8641,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8352,7 +8668,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8379,7 +8695,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8406,7 +8722,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8433,7 +8749,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8460,7 +8776,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8487,7 +8803,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8514,7 +8830,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8541,7 +8857,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8568,7 +8884,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8595,7 +8911,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8622,7 +8938,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8649,7 +8965,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8676,7 +8992,7 @@ Module fmt. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "&mut") [ T ]. (* fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8707,7 +9023,7 @@ Module fmt. *self } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -8736,7 +9052,7 @@ Module fmt. *self } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -8765,7 +9081,7 @@ Module fmt. Display::fmt(self, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8794,7 +9110,7 @@ Module fmt. Display::fmt(if *self { "true" } else { "false" }, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8805,15 +9121,17 @@ Module fmt. [ M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.read (| self |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| M.read (| Value.String "true" |) |))); - fun γ => ltac:(M.monadic (M.alloc (| M.read (| Value.String "false" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "true" |) |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.read (| M.of_value (| Value.String "false" |) |) |))) ] |) |); @@ -8857,7 +9175,7 @@ Module fmt. f.write_char('"') } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8888,7 +9206,7 @@ Module fmt. "write_char", [] |), - [ M.read (| f |); Value.UnicodeChar 34 ] + [ M.read (| f |); M.of_value (| Value.UnicodeChar 34 |) ] |) ] |) @@ -8942,7 +9260,7 @@ Module fmt. val)) ] |) in - let from := M.alloc (| Value.Integer Integer.Usize 0 |) in + let from := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -9011,26 +9329,34 @@ Module fmt. |), [ M.read (| c |); - Value.StructRecord - "core::char::methods::EscapeDebugExtArgs" - [ - ("escape_grapheme_extended", Value.Bool true); - ("escape_single_quote", Value.Bool false); - ("escape_double_quote", Value.Bool true) - ] + M.of_value (| + Value.StructRecord + "core::char::methods::EscapeDebugExtArgs" + [ + ("escape_grapheme_extended", + A.to_value + (M.of_value (| Value.Bool true |))); + ("escape_single_quote", + A.to_value + (M.of_value (| Value.Bool false |))); + ("escape_double_quote", + A.to_value + (M.of_value (| Value.Bool true |))) + ] + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.path "core::char::EscapeDebug", @@ -9039,8 +9365,9 @@ Module fmt. [] |), [ esc ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9087,13 +9414,18 @@ Module fmt. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| from |)); - ("end_", M.read (| i |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| from |))); + ("end_", + A.to_value + (M.read (| i |))) + ] + |) ] |) ] @@ -9325,11 +9657,15 @@ Module fmt. ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)) in @@ -9337,6 +9673,7 @@ Module fmt. M.write (| from, BinOp.Panic.add (| + Integer.Usize, M.read (| i |), M.call_closure (| M.get_associated_function (| @@ -9348,14 +9685,15 @@ Module fmt. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -9395,9 +9733,11 @@ Module fmt. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| from |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| from |))) ] + |) ] |) ] @@ -9463,7 +9803,7 @@ Module fmt. "write_char", [] |), - [ M.read (| f |); Value.UnicodeChar 34 ] + [ M.read (| f |); M.of_value (| Value.UnicodeChar 34 |) ] |) |) |))) @@ -9487,7 +9827,7 @@ Module fmt. f.pad(self) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9524,7 +9864,7 @@ Module fmt. f.write_char('\'') } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9555,7 +9895,7 @@ Module fmt. "write_char", [] |), - [ M.read (| f |); Value.UnicodeChar 39 ] + [ M.read (| f |); M.of_value (| Value.UnicodeChar 39 |) ] |) ] |) @@ -9630,13 +9970,18 @@ Module fmt. |), [ M.read (| M.read (| self |) |); - Value.StructRecord - "core::char::methods::EscapeDebugExtArgs" - [ - ("escape_grapheme_extended", Value.Bool true); - ("escape_single_quote", Value.Bool true); - ("escape_double_quote", Value.Bool false) - ] + M.of_value (| + Value.StructRecord + "core::char::methods::EscapeDebugExtArgs" + [ + ("escape_grapheme_extended", + A.to_value (M.of_value (| Value.Bool true |))); + ("escape_single_quote", + A.to_value (M.of_value (| Value.Bool true |))); + ("escape_double_quote", + A.to_value (M.of_value (| Value.Bool false |))) + ] + |) ] |) ] @@ -9758,7 +10103,7 @@ Module fmt. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -9771,7 +10116,7 @@ Module fmt. "write_char", [] |), - [ M.read (| f |); Value.UnicodeChar 39 ] + [ M.read (| f |); M.of_value (| Value.UnicodeChar 39 |) ] |) |) |))) @@ -9799,7 +10144,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9807,7 +10152,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9871,8 +10216,9 @@ Module fmt. [ M.read (| M.read (| self |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |)) + M.pointer_coercion (| + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) + |) ] |) ] @@ -9901,7 +10247,7 @@ Module fmt. pointer_fmt_inner(( *self as *const ()).expose_addr(), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -9917,7 +10263,7 @@ Module fmt. "expose_addr", [] |), - [ M.rust_cast (M.read (| M.read (| self |) |)) ] + [ M.rust_cast (| M.read (| M.read (| self |) |) |) ] |); M.read (| f |) ] @@ -9960,7 +10306,7 @@ Module fmt. ret } *) - Definition pointer_fmt_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition pointer_fmt_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr_addr; f ] => ltac:(M.monadic @@ -9985,7 +10331,7 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10011,15 +10357,16 @@ Module fmt. |) in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - M.rust_cast (Value.Integer Integer.Isize 3) - |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.rust_cast (| M.of_value (| Value.Integer 3 |) |) + |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10050,24 +10397,30 @@ Module fmt. "core::fmt::Formatter", "width" |), - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.rust_cast - (BinOp.Panic.div (| - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 4 - |)), - Value.Integer Integer.Usize 2 - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.rust_cast (| + BinOp.Panic.div (| + Integer.U32, + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 4 |) + |) + |), + M.of_value (| Value.Integer 2 |) + |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -10079,12 +10432,13 @@ Module fmt. |) in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - M.rust_cast (Value.Integer Integer.Isize 2) - |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.rust_cast (| M.of_value (| Value.Integer 2 |) |) + |) + |) |) in let ret := M.alloc (| @@ -10124,7 +10478,7 @@ Module fmt. Pointer::fmt(&( *self as *const T), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -10141,8 +10495,9 @@ Module fmt. |), [ M.alloc (| - M.rust_cast - (* MutToConstPointer *) (M.pointer_coercion (M.read (| M.read (| self |) |))) + M.rust_cast (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| M.read (| self |) |) |) + |) |); M.read (| f |) ] @@ -10167,7 +10522,7 @@ Module fmt. Pointer::fmt(&( *self as *const T), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -10204,7 +10559,7 @@ Module fmt. Pointer::fmt(&(&**self as *const T), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -10241,7 +10596,7 @@ Module fmt. Pointer::fmt(self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -10278,7 +10633,7 @@ Module fmt. Pointer::fmt(self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -10322,7 +10677,7 @@ Module fmt. builder.finish() } *) - Definition fmt (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [ self; f ] => @@ -10334,7 +10689,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -10374,7 +10729,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_E ] + [ builder; (* Unsize *) M.pointer_coercion (| value_E |) ] |) |) in let _ := @@ -10385,7 +10740,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_D ] + [ builder; (* Unsize *) M.pointer_coercion (| value_D |) ] |) |) in let _ := @@ -10396,7 +10751,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_C ] + [ builder; (* Unsize *) M.pointer_coercion (| value_C |) ] |) |) in let _ := @@ -10407,7 +10762,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_B ] + [ builder; (* Unsize *) M.pointer_coercion (| value_B |) ] |) |) in let _ := @@ -10418,7 +10773,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_A ] + [ builder; (* Unsize *) M.pointer_coercion (| value_A |) ] |) |) in let _ := @@ -10429,7 +10784,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Z ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Z |) ] |) |) in let _ := @@ -10440,7 +10795,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Y ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Y |) ] |) |) in let _ := @@ -10451,7 +10806,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_X ] + [ builder; (* Unsize *) M.pointer_coercion (| value_X |) ] |) |) in let _ := @@ -10462,7 +10817,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_W ] + [ builder; (* Unsize *) M.pointer_coercion (| value_W |) ] |) |) in let _ := @@ -10473,7 +10828,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -10484,7 +10839,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -10495,7 +10850,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -10538,7 +10893,7 @@ Module fmt. builder.finish() } *) - Definition fmt (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [ self; f ] => @@ -10550,7 +10905,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -10588,7 +10943,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_D ] + [ builder; (* Unsize *) M.pointer_coercion (| value_D |) ] |) |) in let _ := @@ -10599,7 +10954,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_C ] + [ builder; (* Unsize *) M.pointer_coercion (| value_C |) ] |) |) in let _ := @@ -10610,7 +10965,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_B ] + [ builder; (* Unsize *) M.pointer_coercion (| value_B |) ] |) |) in let _ := @@ -10621,7 +10976,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_A ] + [ builder; (* Unsize *) M.pointer_coercion (| value_A |) ] |) |) in let _ := @@ -10632,7 +10987,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Z ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Z |) ] |) |) in let _ := @@ -10643,7 +10998,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Y ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Y |) ] |) |) in let _ := @@ -10654,7 +11009,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_X ] + [ builder; (* Unsize *) M.pointer_coercion (| value_X |) ] |) |) in let _ := @@ -10665,7 +11020,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_W ] + [ builder; (* Unsize *) M.pointer_coercion (| value_W |) ] |) |) in let _ := @@ -10676,7 +11031,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -10687,7 +11042,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -10698,7 +11053,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -10741,7 +11096,7 @@ Module fmt. builder.finish() } *) - Definition fmt (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [ self; f ] => @@ -10753,7 +11108,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -10789,7 +11144,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_C ] + [ builder; (* Unsize *) M.pointer_coercion (| value_C |) ] |) |) in let _ := @@ -10800,7 +11155,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_B ] + [ builder; (* Unsize *) M.pointer_coercion (| value_B |) ] |) |) in let _ := @@ -10811,7 +11166,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_A ] + [ builder; (* Unsize *) M.pointer_coercion (| value_A |) ] |) |) in let _ := @@ -10822,7 +11177,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Z ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Z |) ] |) |) in let _ := @@ -10833,7 +11188,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Y ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Y |) ] |) |) in let _ := @@ -10844,7 +11199,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_X ] + [ builder; (* Unsize *) M.pointer_coercion (| value_X |) ] |) |) in let _ := @@ -10855,7 +11210,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_W ] + [ builder; (* Unsize *) M.pointer_coercion (| value_W |) ] |) |) in let _ := @@ -10866,7 +11221,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -10877,7 +11232,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -10888,7 +11243,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -10930,7 +11285,7 @@ Module fmt. builder.finish() } *) - Definition fmt (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [ self; f ] => @@ -10942,7 +11297,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -10976,7 +11331,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_B ] + [ builder; (* Unsize *) M.pointer_coercion (| value_B |) ] |) |) in let _ := @@ -10987,7 +11342,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_A ] + [ builder; (* Unsize *) M.pointer_coercion (| value_A |) ] |) |) in let _ := @@ -10998,7 +11353,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Z ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Z |) ] |) |) in let _ := @@ -11009,7 +11364,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Y ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Y |) ] |) |) in let _ := @@ -11020,7 +11375,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_X ] + [ builder; (* Unsize *) M.pointer_coercion (| value_X |) ] |) |) in let _ := @@ -11031,7 +11386,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_W ] + [ builder; (* Unsize *) M.pointer_coercion (| value_W |) ] |) |) in let _ := @@ -11042,7 +11397,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -11053,7 +11408,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -11064,7 +11419,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -11106,7 +11461,7 @@ Module fmt. builder.finish() } *) - Definition fmt (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [ self; f ] => @@ -11118,7 +11473,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -11150,7 +11505,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_A ] + [ builder; (* Unsize *) M.pointer_coercion (| value_A |) ] |) |) in let _ := @@ -11161,7 +11516,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Z ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Z |) ] |) |) in let _ := @@ -11172,7 +11527,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Y ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Y |) ] |) |) in let _ := @@ -11183,7 +11538,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_X ] + [ builder; (* Unsize *) M.pointer_coercion (| value_X |) ] |) |) in let _ := @@ -11194,7 +11549,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_W ] + [ builder; (* Unsize *) M.pointer_coercion (| value_W |) ] |) |) in let _ := @@ -11205,7 +11560,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -11216,7 +11571,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -11227,7 +11582,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -11269,7 +11624,7 @@ Module fmt. builder.finish() } *) - Definition fmt (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [ self; f ] => @@ -11281,7 +11636,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -11311,7 +11666,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Z ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Z |) ] |) |) in let _ := @@ -11322,7 +11677,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Y ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Y |) ] |) |) in let _ := @@ -11333,7 +11688,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_X ] + [ builder; (* Unsize *) M.pointer_coercion (| value_X |) ] |) |) in let _ := @@ -11344,7 +11699,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_W ] + [ builder; (* Unsize *) M.pointer_coercion (| value_W |) ] |) |) in let _ := @@ -11355,7 +11710,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -11366,7 +11721,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -11377,7 +11732,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -11419,7 +11774,7 @@ Module fmt. builder.finish() } *) - Definition fmt (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [ self; f ] => @@ -11431,7 +11786,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -11459,7 +11814,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_Y ] + [ builder; (* Unsize *) M.pointer_coercion (| value_Y |) ] |) |) in let _ := @@ -11470,7 +11825,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_X ] + [ builder; (* Unsize *) M.pointer_coercion (| value_X |) ] |) |) in let _ := @@ -11481,7 +11836,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_W ] + [ builder; (* Unsize *) M.pointer_coercion (| value_W |) ] |) |) in let _ := @@ -11492,7 +11847,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -11503,7 +11858,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -11514,7 +11869,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -11556,7 +11911,7 @@ Module fmt. builder.finish() } *) - Definition fmt (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [ self; f ] => @@ -11568,7 +11923,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -11594,7 +11949,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_X ] + [ builder; (* Unsize *) M.pointer_coercion (| value_X |) ] |) |) in let _ := @@ -11605,7 +11960,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_W ] + [ builder; (* Unsize *) M.pointer_coercion (| value_W |) ] |) |) in let _ := @@ -11616,7 +11971,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -11627,7 +11982,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -11638,7 +11993,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -11680,7 +12035,7 @@ Module fmt. builder.finish() } *) - Definition fmt (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [ self; f ] => @@ -11692,7 +12047,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -11716,7 +12071,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_W ] + [ builder; (* Unsize *) M.pointer_coercion (| value_W |) ] |) |) in let _ := @@ -11727,7 +12082,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -11738,7 +12093,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -11749,7 +12104,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -11791,7 +12146,7 @@ Module fmt. builder.finish() } *) - Definition fmt (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [ self; f ] => @@ -11803,7 +12158,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -11825,7 +12180,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_V ] + [ builder; (* Unsize *) M.pointer_coercion (| value_V |) ] |) |) in let _ := @@ -11836,7 +12191,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -11847,7 +12202,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -11889,7 +12244,7 @@ Module fmt. builder.finish() } *) - Definition fmt (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [ self; f ] => @@ -11901,7 +12256,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -11921,7 +12276,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_U ] + [ builder; (* Unsize *) M.pointer_coercion (| value_U |) ] |) |) in let _ := @@ -11932,7 +12287,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -11974,7 +12329,7 @@ Module fmt. builder.finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -11986,7 +12341,7 @@ Module fmt. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "" |) |) ] |) |) in M.match_operator (| @@ -12004,7 +12359,7 @@ Module fmt. "field", [] |), - [ builder; (* Unsize *) M.pointer_coercion value_T ] + [ builder; (* Unsize *) M.pointer_coercion (| value_T |) ] |) |) in M.alloc (| @@ -12040,7 +12395,7 @@ Module fmt. f.debug_list().entries(self.iter()).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -12096,7 +12451,7 @@ Module fmt. f.pad("()") } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12104,7 +12459,7 @@ Module fmt. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "pad", [] |), - [ M.read (| f |); M.read (| Value.String "()" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "()" |) |) ] |))) | _, _ => M.impossible end. @@ -12125,7 +12480,7 @@ Module fmt. write!(f, "PhantomData<{}>", crate::any::type_name::()) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -12140,33 +12495,43 @@ Module fmt. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "PhantomData<" |); M.read (| Value.String ">" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "PhantomData<" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ">" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "core::any::type_name", [ T ] |), - [] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| "core::any::type_name", [ T ] |), + [] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -12191,7 +12556,7 @@ Module fmt. f.debug_struct("Cell").field("value", &self.get()).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -12219,13 +12584,13 @@ Module fmt. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Cell" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Cell" |) |) ] |) |); - M.read (| Value.String "value" |); + M.read (| M.of_value (| Value.String "value" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::Cell") [ T ], @@ -12234,7 +12599,8 @@ Module fmt. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -12264,7 +12630,7 @@ Module fmt. d.finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -12280,7 +12646,7 @@ Module fmt. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "RefCell" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RefCell" |) |) ] |) |) in let _ := @@ -12314,8 +12680,8 @@ Module fmt. |), [ d; - M.read (| Value.String "value" |); - (* Unsize *) M.pointer_coercion borrow + M.read (| M.of_value (| Value.String "value" |) |); + (* Unsize *) M.pointer_coercion (| borrow |) ] |) |))); @@ -12336,10 +12702,10 @@ Module fmt. |), [ d; - M.read (| Value.String "value" |); + M.read (| M.of_value (| Value.String "value" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Arguments", @@ -12348,13 +12714,23 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)) + ] + |) + |) + |) ] |) - |)) + |) + |) ] |) |))) @@ -12391,7 +12767,7 @@ Module fmt. Debug::fmt(&**self, f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -12434,7 +12810,7 @@ Module fmt. Debug::fmt(&*(self.deref()), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -12477,7 +12853,7 @@ Module fmt. f.debug_struct("UnsafeCell").finish_non_exhaustive() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -12498,7 +12874,7 @@ Module fmt. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "UnsafeCell" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "UnsafeCell" |) |) ] |) |) ] @@ -12523,7 +12899,7 @@ Module fmt. f.debug_struct("SyncUnsafeCell").finish_non_exhaustive() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -12544,7 +12920,7 @@ Module fmt. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SyncUnsafeCell" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "SyncUnsafeCell" |) |) ] |) |) ] diff --git a/CoqOfRust/core/fmt/num.v b/CoqOfRust/core/fmt/num.v index db220a55e..35dc895b1 100644 --- a/CoqOfRust/core/fmt/num.v +++ b/CoqOfRust/core/fmt/num.v @@ -10,49 +10,49 @@ Module fmt. Definition Self : Ty.t := Ty.path "i8". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I8 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -75,49 +75,49 @@ Module fmt. Definition Self : Ty.t := Ty.path "i16". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I16 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -140,49 +140,49 @@ Module fmt. Definition Self : Ty.t := Ty.path "i32". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I32 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -205,49 +205,49 @@ Module fmt. Definition Self : Ty.t := Ty.path "i64". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I64 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -270,49 +270,49 @@ Module fmt. Definition Self : Ty.t := Ty.path "i128". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.I128 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -335,49 +335,49 @@ Module fmt. Definition Self : Ty.t := Ty.path "isize". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.Isize 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -400,14 +400,14 @@ Module fmt. Definition Self : Ty.t := Ty.path "u8". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U8 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic @@ -417,7 +417,7 @@ Module fmt. end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -427,22 +427,22 @@ Module fmt. end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -465,49 +465,49 @@ Module fmt. Definition Self : Ty.t := Ty.path "u16". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U16 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -530,49 +530,49 @@ Module fmt. Definition Self : Ty.t := Ty.path "u32". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U32 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -595,34 +595,34 @@ Module fmt. Definition Self : Ty.t := Ty.path "u64". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U64 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -632,12 +632,12 @@ Module fmt. end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -660,44 +660,44 @@ Module fmt. Definition Self : Ty.t := Ty.path "u128". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U128 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -725,49 +725,49 @@ Module fmt. Definition Self : Ty.t := Ty.path "usize". (* fn zero() -> Self { 0 } *) - Definition zero (τ : list Ty.t) (α : list Value.t) : M := + Definition zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.Usize 0)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. (* fn from_u8(u: u8) -> Self { u as Self } *) - Definition from_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. (* fn to_u8(&self) -> u8 { *self as u8 } *) - Definition to_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u64(&self) -> u64 { *self as u64 } *) - Definition to_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. (* fn to_u128(&self) -> u128 { *self as u128 } *) - Definition to_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -788,7 +788,7 @@ Module fmt. (* Trait *) Module GenericRadix. - Definition fmt_int (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt_int (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self; x; f ] => ltac:(M.monadic @@ -812,16 +812,17 @@ Module fmt. |) in let buf := M.alloc (| - repeat - (M.call_closure (| + repeat (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ], "uninit", [] |), [] - |)) + |), 128 + |) |) in let curr := M.alloc (| @@ -834,7 +835,7 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in let base := @@ -846,7 +847,7 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -902,7 +903,7 @@ Module fmt. "iter_mut", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) ] |) @@ -1024,13 +1025,14 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1060,13 +1062,15 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -1121,7 +1125,7 @@ Module fmt. "iter_mut", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) ] |) @@ -1255,13 +1259,14 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1291,13 +1296,15 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))) @@ -1318,9 +1325,11 @@ Module fmt. |), [ buf; - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| curr |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| curr |))) ] + |) ] |) |) in @@ -1395,12 +1404,12 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::num::Binary". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::fmt::num::Binary" [])) + M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |))) | _, _ => M.impossible end. @@ -1427,13 +1436,13 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::num::Binary". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -1456,12 +1465,12 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::num::Octal". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::fmt::num::Octal" [])) + M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |))) | _, _ => M.impossible end. @@ -1488,13 +1497,13 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::num::Octal". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -1517,12 +1526,12 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::num::LowerHex". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::fmt::num::LowerHex" [])) + M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |))) | _, _ => M.impossible end. @@ -1549,13 +1558,13 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::num::LowerHex". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -1578,12 +1587,12 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::num::UpperHex". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::fmt::num::UpperHex" [])) + M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |))) | _, _ => M.impossible end. @@ -1610,13 +1619,13 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::num::UpperHex". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -1633,12 +1642,12 @@ Module fmt. (* const BASE: u8 = $base; *) (* Ty.path "u8" *) - Definition value_BASE : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 2 |))). + Definition value_BASE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))). (* const PREFIX: &'static str = $prefix; *) (* Ty.apply (Ty.path "&") [ Ty.path "str" ] *) - Definition value_PREFIX : Value.t := M.run ltac:(M.monadic (Value.String "0b")). + Definition value_PREFIX : A.t := M.run ltac:(M.monadic (M.of_value (| Value.String "0b" |))). (* fn digit(x: u8) -> u8 { @@ -1648,7 +1657,7 @@ Module fmt. } } *) - Definition digit (τ : list Ty.t) (α : list Value.t) : M := + Definition digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -1661,7 +1670,11 @@ Module fmt. ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| M.read (| UnsupportedLiteral |), M.read (| x |) |) + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| x |) + |) |))); fun γ => ltac:(M.monadic @@ -1679,48 +1692,63 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "number not in the range 0..=" |); - M.read (| Value.String ": " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "number not in the range 0..=" + |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ": " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.alloc (| - BinOp.Panic.sub (| - M.read (| - M.get_constant (| - "core::fmt::num::GenericRadix::BASE" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + BinOp.Panic.sub (| + Integer.U8, + M.read (| + M.get_constant (| + "core::fmt::num::GenericRadix::BASE" + |) + |), + M.of_value (| Value.Integer 1 |) |) - |), - Value.Integer Integer.U8 1 - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ x ] - |) - ] - |)) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] @@ -1751,12 +1779,12 @@ Module fmt. (* const BASE: u8 = $base; *) (* Ty.path "u8" *) - Definition value_BASE : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 8 |))). + Definition value_BASE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 8 |) |))). (* const PREFIX: &'static str = $prefix; *) (* Ty.apply (Ty.path "&") [ Ty.path "str" ] *) - Definition value_PREFIX : Value.t := M.run ltac:(M.monadic (Value.String "0o")). + Definition value_PREFIX : A.t := M.run ltac:(M.monadic (M.of_value (| Value.String "0o" |))). (* fn digit(x: u8) -> u8 { @@ -1766,7 +1794,7 @@ Module fmt. } } *) - Definition digit (τ : list Ty.t) (α : list Value.t) : M := + Definition digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -1779,7 +1807,11 @@ Module fmt. ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| M.read (| UnsupportedLiteral |), M.read (| x |) |) + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| x |) + |) |))); fun γ => ltac:(M.monadic @@ -1797,48 +1829,63 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "number not in the range 0..=" |); - M.read (| Value.String ": " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "number not in the range 0..=" + |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ": " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.alloc (| - BinOp.Panic.sub (| - M.read (| - M.get_constant (| - "core::fmt::num::GenericRadix::BASE" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + BinOp.Panic.sub (| + Integer.U8, + M.read (| + M.get_constant (| + "core::fmt::num::GenericRadix::BASE" + |) + |), + M.of_value (| Value.Integer 1 |) |) - |), - Value.Integer Integer.U8 1 - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ x ] - |) - ] - |)) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] @@ -1869,12 +1916,12 @@ Module fmt. (* const BASE: u8 = $base; *) (* Ty.path "u8" *) - Definition value_BASE : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 16 |))). + Definition value_BASE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 16 |) |))). (* const PREFIX: &'static str = $prefix; *) (* Ty.apply (Ty.path "&") [ Ty.path "str" ] *) - Definition value_PREFIX : Value.t := M.run ltac:(M.monadic (Value.String "0x")). + Definition value_PREFIX : A.t := M.run ltac:(M.monadic (M.of_value (| Value.String "0x" |))). (* fn digit(x: u8) -> u8 { @@ -1884,7 +1931,7 @@ Module fmt. } } *) - Definition digit (τ : list Ty.t) (α : list Value.t) : M := + Definition digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -1897,15 +1944,24 @@ Module fmt. ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| M.read (| UnsupportedLiteral |), M.read (| x |) |) + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| x |) + |) |))); fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - BinOp.Panic.sub (| M.read (| x |), Value.Integer Integer.U8 10 |) + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + BinOp.Panic.sub (| + Integer.U8, + M.read (| x |), + M.of_value (| Value.Integer 10 |) + |) |) |))); fun γ => @@ -1924,48 +1980,63 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "number not in the range 0..=" |); - M.read (| Value.String ": " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "number not in the range 0..=" + |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ": " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.alloc (| - BinOp.Panic.sub (| - M.read (| - M.get_constant (| - "core::fmt::num::GenericRadix::BASE" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + BinOp.Panic.sub (| + Integer.U8, + M.read (| + M.get_constant (| + "core::fmt::num::GenericRadix::BASE" + |) + |), + M.of_value (| Value.Integer 1 |) |) - |), - Value.Integer Integer.U8 1 - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ x ] - |) - ] - |)) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] @@ -1996,12 +2067,12 @@ Module fmt. (* const BASE: u8 = $base; *) (* Ty.path "u8" *) - Definition value_BASE : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 16 |))). + Definition value_BASE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 16 |) |))). (* const PREFIX: &'static str = $prefix; *) (* Ty.apply (Ty.path "&") [ Ty.path "str" ] *) - Definition value_PREFIX : Value.t := M.run ltac:(M.monadic (Value.String "0x")). + Definition value_PREFIX : A.t := M.run ltac:(M.monadic (M.of_value (| Value.String "0x" |))). (* fn digit(x: u8) -> u8 { @@ -2011,7 +2082,7 @@ Module fmt. } } *) - Definition digit (τ : list Ty.t) (α : list Value.t) : M := + Definition digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -2024,15 +2095,24 @@ Module fmt. ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| M.read (| UnsupportedLiteral |), M.read (| x |) |) + BinOp.Panic.add (| + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| x |) + |) |))); fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - BinOp.Panic.sub (| M.read (| x |), Value.Integer Integer.U8 10 |) + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), + BinOp.Panic.sub (| + Integer.U8, + M.read (| x |), + M.of_value (| Value.Integer 10 |) + |) |) |))); fun γ => @@ -2051,48 +2131,63 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "number not in the range 0..=" |); - M.read (| Value.String ": " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "number not in the range 0..=" + |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ": " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.alloc (| - BinOp.Panic.sub (| - M.read (| - M.get_constant (| - "core::fmt::num::GenericRadix::BASE" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + BinOp.Panic.sub (| + Integer.U8, + M.read (| + M.get_constant (| + "core::fmt::num::GenericRadix::BASE" + |) + |), + M.of_value (| Value.Integer 1 |) |) - |), - Value.Integer Integer.U8 1 - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ x ] - |) - ] - |)) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] @@ -2126,7 +2221,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2141,8 +2236,8 @@ Module fmt. [ Ty.path "usize" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2165,7 +2260,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2180,8 +2275,8 @@ Module fmt. [ Ty.path "usize" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2204,7 +2299,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2219,8 +2314,8 @@ Module fmt. [ Ty.path "usize" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2243,7 +2338,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2258,8 +2353,8 @@ Module fmt. [ Ty.path "usize" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2282,7 +2377,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2297,7 +2392,7 @@ Module fmt. [ Ty.path "usize" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2321,7 +2416,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2336,7 +2431,7 @@ Module fmt. [ Ty.path "usize" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2360,7 +2455,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2375,7 +2470,7 @@ Module fmt. [ Ty.path "usize" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2399,7 +2494,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2414,7 +2509,7 @@ Module fmt. [ Ty.path "usize" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2438,7 +2533,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2453,8 +2548,8 @@ Module fmt. [ Ty.path "u8" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2477,7 +2572,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2492,8 +2587,8 @@ Module fmt. [ Ty.path "u8" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2516,7 +2611,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2531,8 +2626,8 @@ Module fmt. [ Ty.path "u8" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2555,7 +2650,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2570,8 +2665,8 @@ Module fmt. [ Ty.path "u8" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2594,7 +2689,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2609,7 +2704,7 @@ Module fmt. [ Ty.path "u8" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2633,7 +2728,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2648,7 +2743,7 @@ Module fmt. [ Ty.path "u8" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2672,7 +2767,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2687,7 +2782,7 @@ Module fmt. [ Ty.path "u8" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2711,7 +2806,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2726,7 +2821,7 @@ Module fmt. [ Ty.path "u8" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2750,7 +2845,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2765,8 +2860,8 @@ Module fmt. [ Ty.path "u16" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2789,7 +2884,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2804,8 +2899,8 @@ Module fmt. [ Ty.path "u16" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2828,7 +2923,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2843,8 +2938,8 @@ Module fmt. [ Ty.path "u16" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2867,7 +2962,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2882,8 +2977,8 @@ Module fmt. [ Ty.path "u16" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -2906,7 +3001,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2921,7 +3016,7 @@ Module fmt. [ Ty.path "u16" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2945,7 +3040,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2960,7 +3055,7 @@ Module fmt. [ Ty.path "u16" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -2984,7 +3079,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2999,7 +3094,7 @@ Module fmt. [ Ty.path "u16" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3023,7 +3118,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3038,7 +3133,7 @@ Module fmt. [ Ty.path "u16" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3062,7 +3157,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3077,8 +3172,8 @@ Module fmt. [ Ty.path "u32" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3101,7 +3196,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3116,8 +3211,8 @@ Module fmt. [ Ty.path "u32" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3140,7 +3235,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3155,8 +3250,8 @@ Module fmt. [ Ty.path "u32" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3179,7 +3274,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3194,8 +3289,8 @@ Module fmt. [ Ty.path "u32" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3218,7 +3313,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3233,7 +3328,7 @@ Module fmt. [ Ty.path "u32" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3257,7 +3352,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3272,7 +3367,7 @@ Module fmt. [ Ty.path "u32" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3296,7 +3391,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3311,7 +3406,7 @@ Module fmt. [ Ty.path "u32" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3335,7 +3430,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3350,7 +3445,7 @@ Module fmt. [ Ty.path "u32" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3374,7 +3469,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3389,8 +3484,8 @@ Module fmt. [ Ty.path "u64" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3413,7 +3508,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3428,8 +3523,8 @@ Module fmt. [ Ty.path "u64" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3452,7 +3547,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3467,8 +3562,8 @@ Module fmt. [ Ty.path "u64" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3491,7 +3586,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3506,8 +3601,8 @@ Module fmt. [ Ty.path "u64" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3530,7 +3625,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3545,7 +3640,7 @@ Module fmt. [ Ty.path "u64" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3569,7 +3664,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3584,7 +3679,7 @@ Module fmt. [ Ty.path "u64" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3608,7 +3703,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3623,7 +3718,7 @@ Module fmt. [ Ty.path "u64" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3647,7 +3742,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3662,7 +3757,7 @@ Module fmt. [ Ty.path "u64" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3686,7 +3781,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3701,8 +3796,8 @@ Module fmt. [ Ty.path "u128" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3725,7 +3820,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3740,8 +3835,8 @@ Module fmt. [ Ty.path "u128" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3764,7 +3859,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3779,8 +3874,8 @@ Module fmt. [ Ty.path "u128" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3803,7 +3898,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3818,8 +3913,8 @@ Module fmt. [ Ty.path "u128" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); - M.rust_cast (M.read (| M.read (| self |) |)); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); + M.rust_cast (| M.read (| M.read (| self |) |) |); M.read (| f |) ] |))) @@ -3842,7 +3937,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3857,7 +3952,7 @@ Module fmt. [ Ty.path "u128" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Binary" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Binary" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3881,7 +3976,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3896,7 +3991,7 @@ Module fmt. [ Ty.path "u128" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::Octal" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::Octal" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3920,7 +4015,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3935,7 +4030,7 @@ Module fmt. [ Ty.path "u128" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::LowerHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::LowerHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -3959,7 +4054,7 @@ Module fmt. $Radix.fmt_int( *self as $U, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3974,7 +4069,7 @@ Module fmt. [ Ty.path "u128" ] |), [ - M.alloc (| Value.StructTuple "core::fmt::num::UpperHex" [] |); + M.alloc (| M.of_value (| Value.StructTuple "core::fmt::num::UpperHex" [] |) |); M.read (| M.use (M.read (| self |)) |); M.read (| f |) ] @@ -4004,7 +4099,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4012,7 +4107,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4044,7 +4139,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4121,7 +4216,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4129,7 +4224,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4161,7 +4256,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4238,7 +4333,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4246,7 +4341,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4278,7 +4373,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4355,7 +4450,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4363,7 +4458,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4395,7 +4490,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4472,7 +4567,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4480,7 +4575,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4512,7 +4607,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4589,7 +4684,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4597,7 +4692,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4629,7 +4724,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4706,7 +4801,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4714,7 +4809,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4746,7 +4841,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4823,7 +4918,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4831,7 +4926,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4863,7 +4958,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4940,7 +5035,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4948,7 +5043,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4980,7 +5075,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5057,7 +5152,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5065,7 +5160,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5097,7 +5192,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5174,7 +5269,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5182,7 +5277,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5214,7 +5309,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5291,7 +5386,7 @@ Module fmt. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5299,7 +5394,7 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5331,7 +5426,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5394,8 +5489,8 @@ Module fmt. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_usize. - Definition value_DEC_DIGITS_LUT : Value.t := - M.run ltac:(M.monadic (M.alloc (| UnsupportedLiteral |))). + Definition value_DEC_DIGITS_LUT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| UnsupportedLiteral |) |))). Module imp. (* @@ -5464,7 +5559,7 @@ Module fmt. f.pad_integral(is_nonnegative, "", buf_slice) } *) - Definition fmt_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n; is_nonnegative; f ] => ltac:(M.monadic @@ -5474,16 +5569,17 @@ Module fmt. M.read (| let buf := M.alloc (| - repeat - (M.call_closure (| + repeat (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ], "uninit", [] |), [] - |)) + |), 39 + |) |) in let curr := M.alloc (| @@ -5496,7 +5592,7 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in let buf_ptr := @@ -5507,7 +5603,7 @@ Module fmt. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in let lut_ptr := @@ -5520,30 +5616,33 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.read (| M.get_constant (| "core::fmt::num::DEC_DIGITS_LUT" |) |) - |)) + |) + |) ] |) |) in let _ := let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u64" ] |), [] - |)) - (Value.Integer Integer.Usize 2)) + |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5553,28 +5652,33 @@ Module fmt. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: crate::mem::size_of::() >= 2" + M.of_value (| + Value.String + "assertion failed: crate::mem::size_of::() >= 2" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| n |)) (Value.Integer Integer.U64 10000) + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 10000 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5583,39 +5687,44 @@ Module fmt. |) in let rem := M.alloc (| - M.rust_cast - (BinOp.Panic.rem (| + M.rust_cast (| + BinOp.Panic.rem (| + Integer.U64, M.read (| n |), - Value.Integer Integer.U64 10000 - |)) + M.of_value (| Value.Integer 10000 |) + |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10000 + M.of_value (| Value.Integer 10000 |) |) |) in let d1 := M.alloc (| BinOp.Panic.shl (| BinOp.Panic.div (| + Integer.Usize, M.read (| rem |), - Value.Integer Integer.Usize 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let d2 := M.alloc (| BinOp.Panic.shl (| BinOp.Panic.rem (| + Integer.Usize, M.read (| rem |), - Value.Integer Integer.Usize 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -5623,8 +5732,9 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 4 + M.of_value (| Value.Integer 4 |) |) |) in let _ := @@ -5651,7 +5761,7 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -5680,16 +5790,17 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| curr |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5699,24 +5810,27 @@ Module fmt. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let n := M.alloc (| M.rust_cast (| M.read (| n |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| n |)) (Value.Integer Integer.Usize 100) + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 100 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5724,23 +5838,32 @@ Module fmt. M.alloc (| BinOp.Panic.shl (| BinOp.Panic.rem (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := let β := n in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.Usize 100 |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 100 |) + |) |) in let _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 2 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.alloc (| @@ -5766,23 +5889,23 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| n |)) (Value.Integer Integer.Usize 10) + BinOp.Pure.lt (| M.read (| n |), M.of_value (| Value.Integer 10 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5790,7 +5913,11 @@ Module fmt. let β := curr in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.write (| @@ -5803,22 +5930,27 @@ Module fmt. [ M.read (| buf_ptr |); M.read (| curr |) ] |), BinOp.Panic.add (| - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) + Integer.U8, + M.rust_cast (| M.read (| n |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let d1 := M.alloc (| - BinOp.Panic.shl (| M.read (| n |), Value.Integer Integer.I32 1 |) + BinOp.Panic.shl (| M.read (| n |), M.of_value (| Value.Integer 1 |) |) |) in let _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 2 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.alloc (| @@ -5844,11 +5976,11 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let buf_slice := @@ -5860,16 +5992,18 @@ Module fmt. M.get_function (| "core::slice::raw::from_raw_parts", [ Ty.path "u8" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "add", [] |), [ M.read (| buf_ptr |); M.read (| curr |) ] - |)); + |) + |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -5882,7 +6016,7 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |), M.read (| curr |) |) @@ -5901,7 +6035,7 @@ Module fmt. [ M.read (| f |); M.read (| is_nonnegative |); - M.read (| Value.String "" |); + M.read (| M.of_value (| Value.String "" |) |); M.read (| buf_slice |) ] |) @@ -5925,7 +6059,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5934,12 +6068,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5964,8 +6101,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i8", @@ -5974,8 +6111,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6015,7 +6153,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6024,12 +6162,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U8 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6054,8 +6195,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u8", @@ -6064,8 +6205,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6105,7 +6247,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6114,12 +6256,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6144,8 +6289,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i16", @@ -6154,8 +6299,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6195,7 +6341,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6204,12 +6350,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U16 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6234,8 +6383,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u16", @@ -6244,8 +6393,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6285,7 +6435,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6294,12 +6444,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I32 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6324,8 +6477,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i32", @@ -6334,8 +6487,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6375,7 +6529,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6384,12 +6538,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U32 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6414,8 +6571,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u32", @@ -6424,8 +6581,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6465,7 +6623,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6474,12 +6632,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I64 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6504,8 +6665,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i64", @@ -6514,8 +6675,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6555,7 +6717,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6564,12 +6726,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U64 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6594,8 +6759,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u64", @@ -6604,8 +6769,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6645,7 +6811,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6654,12 +6820,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6684,8 +6853,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "usize", @@ -6694,8 +6863,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6735,7 +6905,7 @@ Module fmt. $name(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6744,12 +6914,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6774,8 +6947,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "isize", @@ -6784,8 +6957,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -6945,7 +7119,7 @@ Module fmt. unsafe { f.pad_formatted_parts(&formatted) } } *) - Definition exp_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition exp_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n; is_nonnegative; upper; f ] => ltac:(M.monadic @@ -6955,12 +7129,12 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - let exponent := M.alloc (| Value.Integer Integer.Usize 0 |) in + let exponent := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6968,16 +7142,19 @@ Module fmt. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.U64, M.read (| n |), - Value.Integer Integer.U64 10 - |)) - (Value.Integer Integer.U64 0), + M.of_value (| Value.Integer 10 |) + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (M.read (| n |)) - (Value.Integer Integer.U64 10))) + (BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 10 |) + |))) |) |)) in let _ := @@ -6989,18 +7166,23 @@ Module fmt. let β := n in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U64 10 |) + BinOp.Panic.div (| + Integer.U64, + M.read (| β |), + M.of_value (| Value.Integer 10 |) + |) |) in let _ := let β := exponent in M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7010,7 +7192,7 @@ Module fmt. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7040,21 +7222,22 @@ Module fmt. |) in let fmt_prec := M.copy (| γ0_0 |) in let tmp := M.copy (| n |) in - let prec := M.alloc (| Value.Integer Integer.Usize 0 |) in + let prec := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| tmp |)) - (Value.Integer Integer.U64 10) + BinOp.Pure.ge (| + M.read (| tmp |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7066,8 +7249,9 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -7075,11 +7259,12 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7089,7 +7274,7 @@ Module fmt. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7097,31 +7282,40 @@ Module fmt. |))) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_sub", - [] - |), - [ M.read (| fmt_prec |); M.read (| prec |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_sub", - [] - |), - [ M.read (| prec |); M.read (| fmt_prec |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ M.read (| fmt_prec |); M.read (| prec |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ M.read (| prec |); M.read (| fmt_prec |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ Value.Integer Integer.Usize 0; Value.Integer Integer.Usize 0 ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))) ] |), @@ -7147,12 +7341,14 @@ Module fmt. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 1); - ("end_", M.read (| subtracted_precision |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", A.to_value (M.read (| subtracted_precision |))) + ] + |) ] |) |), @@ -7197,8 +7393,9 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -7206,29 +7403,31 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| subtracted_precision |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + M.read (| subtracted_precision |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7238,8 +7437,9 @@ Module fmt. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.U64, M.read (| n |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -7247,8 +7447,9 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -7256,12 +7457,13 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7269,26 +7471,31 @@ Module fmt. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.gt - (M.read (| rem |)) - (Value.Integer Integer.U64 5), + BinOp.Pure.gt (| + M.read (| rem |), + M.of_value (| Value.Integer 5 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| rem |)) - (Value.Integer Integer.U64 5), + BinOp.Pure.eq (| + M.read (| rem |), + M.of_value (| Value.Integer 5 |) + |), ltac:(M.monadic (LogicalOp.or (| - BinOp.Pure.ne - (BinOp.Panic.rem (| + BinOp.Pure.ne (| + BinOp.Panic.rem (| + Integer.U64, M.read (| n |), - Value.Integer Integer.U64 2 - |)) - (Value.Integer Integer.U64 0), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| subtracted_precision |)) - (Value.Integer Integer.Usize 1))) + (BinOp.Pure.gt (| + M.read (| subtracted_precision |), + M.of_value (| Value.Integer 1 |) + |))) |))) |))) |) @@ -7303,28 +7510,29 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.path "u64", "ilog10", [] |), [ M.read (| n |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "u64", "ilog10", @@ -7332,11 +7540,13 @@ Module fmt. |), [ BinOp.Panic.sub (| + Integer.U64, M.read (| n |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7348,8 +7558,9 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -7357,29 +7568,36 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - M.read (| exponent |); - M.read (| exponent |); - M.read (| added_precision |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value (M.read (| exponent |)); + A.to_value (M.read (| exponent |)); + A.to_value (M.read (| added_precision |)) + ] + |) |))) ] |), @@ -7396,8 +7614,8 @@ Module fmt. let added_precision := M.copy (| γ0_3 |) in let buf := M.alloc (| - repeat - (M.call_closure (| + repeat (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") @@ -7406,8 +7624,9 @@ Module fmt. [] |), [] - |)) + |), 40 + |) |) in let curr := M.alloc (| @@ -7423,7 +7642,7 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in let buf_ptr := @@ -7436,7 +7655,7 @@ Module fmt. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in let lut_ptr := @@ -7449,10 +7668,11 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.read (| M.get_constant (| "core::fmt::num::DEC_DIGITS_LUT" |) |) - |)) + |) + |) ] |) |) in @@ -7460,16 +7680,17 @@ Module fmt. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (Value.Integer Integer.U64 100) + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 100 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7479,12 +7700,14 @@ Module fmt. let d1 := M.alloc (| BinOp.Panic.shl (| - M.rust_cast - (BinOp.Panic.rem (| + M.rust_cast (| + BinOp.Panic.rem (| + Integer.U64, M.read (| n |), - Value.Integer Integer.U64 100 - |)), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 100 |) + |) + |), + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -7492,8 +7715,9 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in let _ := @@ -7521,18 +7745,19 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |) |) in let _ := @@ -7540,11 +7765,12 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7554,26 +7780,27 @@ Module fmt. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let n := M.alloc (| M.rust_cast (| M.read (| n |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (Value.Integer Integer.Isize 10) + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7585,8 +7812,9 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -7601,21 +7829,24 @@ Module fmt. [ M.read (| buf_ptr |); M.read (| curr |) ] |), BinOp.Panic.add (| + Integer.U8, BinOp.Panic.rem (| - M.rust_cast (M.read (| n |)), - Value.Integer Integer.U8 10 + Integer.U8, + M.rust_cast (| M.read (| n |) |), + M.of_value (| Value.Integer 10 |) |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.div (| + Integer.Isize, M.read (| β |), - Value.Integer Integer.Isize 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -7623,17 +7854,19 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7641,13 +7874,15 @@ Module fmt. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ne - (M.read (| exponent |)) - (M.read (| trailing_zeros |)), + BinOp.Pure.ne (| + M.read (| exponent |), + M.read (| trailing_zeros |) + |), ltac:(M.monadic - (BinOp.Pure.ne - (M.read (| added_precision |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.ne (| + M.read (| added_precision |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -7660,8 +7895,9 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -7674,10 +7910,11 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let buf_slice := @@ -7686,7 +7923,11 @@ Module fmt. let β := curr in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.write (| @@ -7699,13 +7940,15 @@ Module fmt. [ M.read (| buf_ptr |); M.read (| curr |) ] |), BinOp.Panic.add (| - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) + Integer.U8, + M.rust_cast (| M.read (| n |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) in let len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -7718,7 +7961,7 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |), M.read (| M.use curr |) |) @@ -7731,15 +7974,16 @@ Module fmt. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "add", [] |), [ M.read (| buf_ptr |); M.read (| curr |) ] - |)); + |) + |); M.read (| len |) ] |) @@ -7747,8 +7991,8 @@ Module fmt. |) in let exp_buf := M.alloc (| - repeat - (M.call_closure (| + repeat (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") @@ -7757,8 +8001,9 @@ Module fmt. [] |), [] - |)) + |), 3 + |) |) in let exp_ptr := M.alloc (| @@ -7770,7 +8015,7 @@ Module fmt. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion exp_buf ] + [ (* Unsize *) M.pointer_coercion (| exp_buf |) ] |) |) in let exp_slice := @@ -7783,11 +8028,11 @@ Module fmt. "add", [] |), - [ M.read (| exp_ptr |); Value.Integer Integer.Usize 0 ] + [ M.read (| exp_ptr |); M.of_value (| Value.Integer 0 |) ] |), M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7797,8 +8042,8 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - UnsupportedLiteral)); - fun γ => ltac:(M.monadic UnsupportedLiteral) + M.of_value (| UnsupportedLiteral |))); + fun γ => ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))) ] |) |) @@ -7806,16 +8051,17 @@ Module fmt. let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exponent |)) - (Value.Integer Integer.Usize 10) + BinOp.Pure.lt (| + M.read (| exponent |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7830,21 +8076,23 @@ Module fmt. "add", [] |), - [ M.read (| exp_ptr |); Value.Integer Integer.Usize 1 ] + [ M.read (| exp_ptr |); M.of_value (| Value.Integer 1 |) + ] |), BinOp.Panic.add (| - M.rust_cast (M.read (| exponent |)), - M.read (| UnsupportedLiteral |) + Integer.U8, + M.rust_cast (| M.read (| exponent |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) in - M.alloc (| Value.Integer Integer.Usize 2 |))); + M.alloc (| M.of_value (| Value.Integer 2 |) |))); fun γ => ltac:(M.monadic (let off := M.alloc (| BinOp.Panic.shl (| M.read (| exponent |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -7871,14 +8119,14 @@ Module fmt. |), [ M.read (| exp_ptr |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Integer Integer.Usize 3 |))) + M.alloc (| M.of_value (| Value.Integer 3 |) |))) ] |) |) in @@ -7889,7 +8137,8 @@ Module fmt. [ Ty.path "u8" ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| exp_ptr |)); + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| exp_ptr |) |); M.read (| len |) ] |) @@ -7898,42 +8147,55 @@ Module fmt. let parts := M.alloc (| M.alloc (| - Value.Array - [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ M.read (| buf_slice |) ]; - Value.StructTuple - "core::num::fmt::Part::Zero" - [ M.read (| added_precision |) ]; - Value.StructTuple - "core::num::fmt::Part::Copy" - [ M.read (| exp_slice |) ] - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ A.to_value (M.read (| buf_slice |)) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ A.to_value (M.read (| added_precision |)) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ A.to_value (M.read (| exp_slice |)) ] + |)) + ] + |) |) |) in let sign := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| UnOp.Pure.not (M.read (| is_nonnegative |)) |)) in + (M.alloc (| + UnOp.Pure.not (| M.read (| is_nonnegative |) |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "-")); + M.of_value (| Value.String "-" |))); fun γ => ltac:(M.monadic (M.alloc (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7954,10 +8216,12 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - Value.String "+")); + M.of_value (| Value.String "+" |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "" |) |))) + (M.alloc (| + M.read (| M.of_value (| Value.String "" |) |) + |))) ] |) |) @@ -7967,12 +8231,16 @@ Module fmt. |) in let formatted := M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", (* Unsize *) M.pointer_coercion (M.read (| parts |))) - ] + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (* Unsize *) (M.pointer_coercion (| M.read (| parts |) |))) + ] + |) |) in M.alloc (| M.call_closure (| @@ -8005,7 +8273,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8014,12 +8282,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8044,8 +8315,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i8", @@ -8054,8 +8325,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8065,7 +8337,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8096,7 +8372,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8105,12 +8381,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U8 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8135,8 +8414,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u8", @@ -8145,8 +8424,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8156,7 +8436,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8187,7 +8471,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8196,12 +8480,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8226,8 +8513,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i16", @@ -8236,8 +8523,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8247,7 +8535,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8278,7 +8570,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8287,12 +8579,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U16 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8317,8 +8612,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u16", @@ -8327,8 +8622,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8338,7 +8634,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8369,7 +8669,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8378,12 +8678,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I32 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8408,8 +8711,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i32", @@ -8418,8 +8721,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8429,7 +8733,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8460,7 +8768,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8469,12 +8777,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U32 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8499,8 +8810,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u32", @@ -8509,8 +8820,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8520,7 +8832,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8551,7 +8867,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8560,12 +8876,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I64 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8590,8 +8909,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i64", @@ -8600,8 +8919,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8611,7 +8931,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8642,7 +8966,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8651,12 +8975,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U64 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8681,8 +9008,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u64", @@ -8691,8 +9018,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8702,7 +9030,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8733,7 +9065,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8742,12 +9074,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8772,8 +9107,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "usize", @@ -8782,8 +9117,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8793,7 +9129,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8824,7 +9164,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8833,12 +9173,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8863,8 +9206,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "isize", @@ -8873,8 +9216,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8884,7 +9228,11 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) ] |) |) @@ -8915,7 +9263,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8924,12 +9272,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8954,8 +9305,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i8", @@ -8964,8 +9315,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -8975,7 +9327,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9005,7 +9362,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9014,12 +9371,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U8 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9044,8 +9404,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u8", @@ -9054,8 +9414,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -9065,7 +9426,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9095,7 +9461,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9104,12 +9470,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9134,8 +9503,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i16", @@ -9144,8 +9513,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -9155,7 +9525,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9185,7 +9560,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9194,12 +9569,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U16 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9224,8 +9602,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u16", @@ -9234,8 +9612,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -9245,7 +9624,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9275,7 +9659,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9284,12 +9668,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I32 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9314,8 +9701,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i32", @@ -9324,8 +9711,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -9335,7 +9723,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9365,7 +9758,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9374,12 +9767,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U32 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9404,8 +9800,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u32", @@ -9414,8 +9810,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -9425,7 +9822,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9455,7 +9857,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9464,12 +9866,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I64 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9494,8 +9899,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i64", @@ -9504,8 +9909,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -9515,7 +9921,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9545,7 +9956,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9554,12 +9965,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U64 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9584,8 +9998,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u64", @@ -9594,8 +10008,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -9605,7 +10020,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9635,7 +10055,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9644,12 +10064,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9674,8 +10097,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "usize", @@ -9684,8 +10107,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -9695,7 +10119,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9725,7 +10154,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9734,12 +10163,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9764,8 +10196,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "isize", @@ -9774,8 +10206,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U64 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -9785,7 +10218,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::imp::exp_u64", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -9936,7 +10374,7 @@ Module fmt. unsafe { f.pad_formatted_parts(&formatted) } } *) - Definition exp_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition exp_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n; is_nonnegative; upper; f ] => ltac:(M.monadic @@ -9946,12 +10384,12 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - let exponent := M.alloc (| Value.Integer Integer.Usize 0 |) in + let exponent := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9959,16 +10397,19 @@ Module fmt. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.U128, M.read (| n |), - Value.Integer Integer.U128 10 - |)) - (Value.Integer Integer.U128 0), + M.of_value (| Value.Integer 10 |) + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (M.read (| n |)) - (Value.Integer Integer.U128 10))) + (BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 10 |) + |))) |) |)) in let _ := @@ -9977,15 +10418,23 @@ Module fmt. let β := n in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U128 10 |) + BinOp.Panic.div (| + Integer.U128, + M.read (| β |), + M.of_value (| Value.Integer 10 |) + |) |) in let _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -9993,7 +10442,7 @@ Module fmt. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -10023,21 +10472,22 @@ Module fmt. |) in let fmt_prec := M.copy (| γ0_0 |) in let tmp := M.copy (| n |) in - let prec := M.alloc (| Value.Integer Integer.Usize 0 |) in + let prec := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| tmp |)) - (Value.Integer Integer.U128 10) + BinOp.Pure.ge (| + M.read (| tmp |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10049,8 +10499,9 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U128, M.read (| β |), - Value.Integer Integer.U128 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -10058,11 +10509,12 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -10072,7 +10524,7 @@ Module fmt. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -10080,31 +10532,40 @@ Module fmt. |))) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_sub", - [] - |), - [ M.read (| fmt_prec |); M.read (| prec |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_sub", - [] - |), - [ M.read (| prec |); M.read (| fmt_prec |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ M.read (| fmt_prec |); M.read (| prec |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ M.read (| prec |); M.read (| fmt_prec |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ Value.Integer Integer.Usize 0; Value.Integer Integer.Usize 0 ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))) ] |), @@ -10128,12 +10589,14 @@ Module fmt. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 1); - ("end_", M.read (| subtracted_precision |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", A.to_value (M.read (| subtracted_precision |))) + ] + |) ] |) |), @@ -10178,8 +10641,9 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U128, M.read (| β |), - Value.Integer Integer.U128 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -10187,29 +10651,31 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| subtracted_precision |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + M.read (| subtracted_precision |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10219,8 +10685,9 @@ Module fmt. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.U128, M.read (| n |), - Value.Integer Integer.U128 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -10228,8 +10695,9 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U128, M.read (| β |), - Value.Integer Integer.U128 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -10237,12 +10705,13 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10250,26 +10719,31 @@ Module fmt. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.gt - (M.read (| rem |)) - (Value.Integer Integer.U128 5), + BinOp.Pure.gt (| + M.read (| rem |), + M.of_value (| Value.Integer 5 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| rem |)) - (Value.Integer Integer.U128 5), + BinOp.Pure.eq (| + M.read (| rem |), + M.of_value (| Value.Integer 5 |) + |), ltac:(M.monadic (LogicalOp.or (| - BinOp.Pure.ne - (BinOp.Panic.rem (| + BinOp.Pure.ne (| + BinOp.Panic.rem (| + Integer.U128, M.read (| n |), - Value.Integer Integer.U128 2 - |)) - (Value.Integer Integer.U128 0), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| subtracted_precision |)) - (Value.Integer Integer.Usize 1))) + (BinOp.Pure.gt (| + M.read (| subtracted_precision |), + M.of_value (| Value.Integer 1 |) + |))) |))) |))) |) @@ -10284,28 +10758,29 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.U128, M.read (| β |), - Value.Integer Integer.U128 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "ilog10", [] |), [ M.read (| n |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "u128", "ilog10", @@ -10313,11 +10788,13 @@ Module fmt. |), [ BinOp.Panic.sub (| + Integer.U128, M.read (| n |), - Value.Integer Integer.U128 1 + M.of_value (| Value.Integer 1 |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10329,8 +10806,9 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U128, M.read (| β |), - Value.Integer Integer.U128 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -10338,28 +10816,36 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - M.read (| exponent |); - M.read (| exponent |); - M.read (| added_precision |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value (M.read (| exponent |)); + A.to_value (M.read (| exponent |)); + A.to_value (M.read (| added_precision |)) + ] + |) |))) ] |), @@ -10376,8 +10862,8 @@ Module fmt. let added_precision := M.copy (| γ0_3 |) in let buf := M.alloc (| - repeat - (M.call_closure (| + repeat (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") @@ -10386,8 +10872,9 @@ Module fmt. [] |), [] - |)) + |), 40 + |) |) in let curr := M.alloc (| @@ -10403,7 +10890,7 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in let buf_ptr := @@ -10416,7 +10903,7 @@ Module fmt. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in let lut_ptr := @@ -10429,10 +10916,11 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.read (| M.get_constant (| "core::fmt::num::DEC_DIGITS_LUT" |) |) - |)) + |) + |) ] |) |) in @@ -10440,16 +10928,17 @@ Module fmt. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (Value.Integer Integer.U128 100) + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 100 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10459,12 +10948,14 @@ Module fmt. let d1 := M.alloc (| BinOp.Panic.shl (| - M.rust_cast - (BinOp.Panic.rem (| + M.rust_cast (| + BinOp.Panic.rem (| + Integer.U128, M.read (| n |), - Value.Integer Integer.U128 100 - |)), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 100 |) + |) + |), + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -10472,8 +10963,9 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in let _ := @@ -10501,18 +10993,19 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.div (| + Integer.U128, M.read (| β |), - Value.Integer Integer.U128 100 + M.of_value (| Value.Integer 100 |) |) |) in let _ := @@ -10520,11 +11013,12 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -10534,24 +11028,27 @@ Module fmt. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let n := M.alloc (| M.rust_cast (| M.read (| n |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| n |)) (Value.Integer Integer.Isize 10) + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10563,8 +11060,9 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -10579,21 +11077,24 @@ Module fmt. [ M.read (| buf_ptr |); M.read (| curr |) ] |), BinOp.Panic.add (| + Integer.U8, BinOp.Panic.rem (| - M.rust_cast (M.read (| n |)), - Value.Integer Integer.U8 10 + Integer.U8, + M.rust_cast (| M.read (| n |) |), + M.of_value (| Value.Integer 10 |) |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.div (| + Integer.Isize, M.read (| β |), - Value.Integer Integer.Isize 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -10601,17 +11102,18 @@ Module fmt. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10619,13 +11121,15 @@ Module fmt. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ne - (M.read (| exponent |)) - (M.read (| trailing_zeros |)), + BinOp.Pure.ne (| + M.read (| exponent |), + M.read (| trailing_zeros |) + |), ltac:(M.monadic - (BinOp.Pure.ne - (M.read (| added_precision |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.ne (| + M.read (| added_precision |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -10638,8 +11142,9 @@ Module fmt. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -10652,10 +11157,10 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let buf_slice := @@ -10664,7 +11169,11 @@ Module fmt. let β := curr in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.write (| @@ -10677,13 +11186,15 @@ Module fmt. [ M.read (| buf_ptr |); M.read (| curr |) ] |), BinOp.Panic.add (| - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) + Integer.U8, + M.rust_cast (| M.read (| n |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) in let len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -10696,7 +11207,7 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |), M.read (| M.use curr |) |) @@ -10709,15 +11220,16 @@ Module fmt. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "add", [] |), [ M.read (| buf_ptr |); M.read (| curr |) ] - |)); + |) + |); M.read (| len |) ] |) @@ -10725,8 +11237,8 @@ Module fmt. |) in let exp_buf := M.alloc (| - repeat - (M.call_closure (| + repeat (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") @@ -10735,8 +11247,9 @@ Module fmt. [] |), [] - |)) + |), 3 + |) |) in let exp_ptr := M.alloc (| @@ -10748,7 +11261,7 @@ Module fmt. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion exp_buf ] + [ (* Unsize *) M.pointer_coercion (| exp_buf |) ] |) |) in let exp_slice := @@ -10761,11 +11274,11 @@ Module fmt. "add", [] |), - [ M.read (| exp_ptr |); Value.Integer Integer.Usize 0 ] + [ M.read (| exp_ptr |); M.of_value (| Value.Integer 0 |) ] |), M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10775,8 +11288,8 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - UnsupportedLiteral)); - fun γ => ltac:(M.monadic UnsupportedLiteral) + M.of_value (| UnsupportedLiteral |))); + fun γ => ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))) ] |) |) @@ -10784,16 +11297,17 @@ Module fmt. let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exponent |)) - (Value.Integer Integer.Usize 10) + BinOp.Pure.lt (| + M.read (| exponent |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10808,21 +11322,22 @@ Module fmt. "add", [] |), - [ M.read (| exp_ptr |); Value.Integer Integer.Usize 1 ] + [ M.read (| exp_ptr |); M.of_value (| Value.Integer 1 |) ] |), BinOp.Panic.add (| - M.rust_cast (M.read (| exponent |)), - M.read (| UnsupportedLiteral |) + Integer.U8, + M.rust_cast (| M.read (| exponent |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) in - M.alloc (| Value.Integer Integer.Usize 2 |))); + M.alloc (| M.of_value (| Value.Integer 2 |) |))); fun γ => ltac:(M.monadic (let off := M.alloc (| BinOp.Panic.shl (| M.read (| exponent |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -10847,14 +11362,16 @@ Module fmt. "add", [] |), - [ M.read (| exp_ptr |); Value.Integer Integer.Usize 1 + [ + M.read (| exp_ptr |); + M.of_value (| Value.Integer 1 |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Integer Integer.Usize 3 |))) + M.alloc (| M.of_value (| Value.Integer 3 |) |))) ] |) |) in @@ -10865,7 +11382,7 @@ Module fmt. [ Ty.path "u8" ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| exp_ptr |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| exp_ptr |) |); M.read (| len |) ] |) @@ -10874,42 +11391,55 @@ Module fmt. let parts := M.alloc (| M.alloc (| - Value.Array - [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ M.read (| buf_slice |) ]; - Value.StructTuple - "core::num::fmt::Part::Zero" - [ M.read (| added_precision |) ]; - Value.StructTuple - "core::num::fmt::Part::Copy" - [ M.read (| exp_slice |) ] - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ A.to_value (M.read (| buf_slice |)) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ A.to_value (M.read (| added_precision |)) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ A.to_value (M.read (| exp_slice |)) ] + |)) + ] + |) |) |) in let sign := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| UnOp.Pure.not (M.read (| is_nonnegative |)) |)) in + (M.alloc (| + UnOp.Pure.not (| M.read (| is_nonnegative |) |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "-")); + M.of_value (| Value.String "-" |))); fun γ => ltac:(M.monadic (M.alloc (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10930,10 +11460,12 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - Value.String "+")); + M.of_value (| Value.String "+" |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "" |) |))) + (M.alloc (| + M.read (| M.of_value (| Value.String "" |) |) + |))) ] |) |) @@ -10943,12 +11475,16 @@ Module fmt. |) in let formatted := M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", (* Unsize *) M.pointer_coercion (M.read (| parts |))) - ] + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (* Unsize *) (M.pointer_coercion (| M.read (| parts |) |))) + ] + |) |) in M.alloc (| M.call_closure (| @@ -10981,7 +11517,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10990,12 +11526,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I128 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11020,8 +11559,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i128", @@ -11030,8 +11569,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U128 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -11041,7 +11581,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::exp_u128", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) + ] |) |) |))) @@ -11071,7 +11616,7 @@ Module fmt. $name(n, is_nonnegative, false, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -11080,12 +11625,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U128 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11110,8 +11658,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u128", @@ -11120,8 +11668,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U128 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -11131,7 +11680,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::exp_u128", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool false; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool false |); + M.read (| f |) + ] |) |) |))) @@ -11161,7 +11715,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -11170,12 +11724,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I128 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11200,8 +11757,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i128", @@ -11210,8 +11767,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U128 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -11221,7 +11779,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::exp_u128", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -11251,7 +11814,7 @@ Module fmt. $name(n, is_nonnegative, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -11260,12 +11823,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.U128 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11290,8 +11856,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "u128", @@ -11300,8 +11866,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U128 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -11311,7 +11878,12 @@ Module fmt. M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::exp_u128", [] |), - [ M.read (| n |); M.read (| is_nonnegative |); Value.Bool true; M.read (| f |) ] + [ + M.read (| n |); + M.read (| is_nonnegative |); + M.of_value (| Value.Bool true |); + M.read (| f |) + ] |) |) |))) @@ -11413,7 +11985,7 @@ Module fmt. } } *) - Definition parse_u64_into (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_u64_into (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n; buf; curr ] => ltac:(M.monadic @@ -11429,7 +12001,7 @@ Module fmt. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| buf |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| buf |) |) ] |) |) in let lut_ptr := @@ -11442,58 +12014,67 @@ Module fmt. |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.read (| M.get_constant (| "core::fmt::num::DEC_DIGITS_LUT" |) |) - |)) + |) + |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| M.read (| curr |) |)) - (Value.Integer Integer.Usize 19)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.read (| curr |) |), + M.of_value (| Value.Integer 19 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: *curr > 19" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: *curr > 19" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (M.rust_cast (M.read (| UnsupportedLiteral |))) + BinOp.Pure.ge (| + M.read (| n |), + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let to_parse := M.alloc (| BinOp.Panic.rem (| + Integer.U64, M.read (| n |), - M.rust_cast (M.read (| UnsupportedLiteral |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |) in let _ := @@ -11501,119 +12082,140 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), - M.rust_cast (M.read (| UnsupportedLiteral |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 16 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 16 |) + |) |) in let _ := M.alloc (| @@ -11629,7 +12231,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d1 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d1 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -11640,12 +12242,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -11663,7 +12266,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d2 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d2 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -11674,12 +12277,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -11697,7 +12301,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d3 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d3 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -11708,12 +12312,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 4 + M.of_value (| Value.Integer 4 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -11731,7 +12336,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d4 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d4 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -11742,12 +12347,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 6 + M.of_value (| Value.Integer 6 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -11765,7 +12371,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d5 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d5 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -11776,12 +12382,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 8 + M.of_value (| Value.Integer 8 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -11799,7 +12406,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d6 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d6 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -11810,12 +12417,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 10 + M.of_value (| Value.Integer 10 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -11833,7 +12441,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d7 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d7 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -11844,12 +12452,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 12 + M.of_value (| Value.Integer 12 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -11867,7 +12476,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d8 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d8 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -11878,38 +12487,41 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 14 + M.of_value (| Value.Integer 14 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (M.rust_cast (M.read (| UnsupportedLiteral |))) + BinOp.Pure.ge (| + M.read (| n |), + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let to_parse := M.alloc (| BinOp.Panic.rem (| + Integer.U64, M.read (| n |), - M.rust_cast (M.read (| UnsupportedLiteral |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |) in let _ := @@ -11917,67 +12529,80 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), - M.rust_cast (M.read (| UnsupportedLiteral |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in 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 |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |), - Value.Integer Integer.U64 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 8 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 8 |) + |) |) in let _ := M.alloc (| @@ -11993,7 +12618,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d1 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d1 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -12004,12 +12629,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -12027,7 +12653,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d2 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d2 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -12038,12 +12664,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -12061,7 +12688,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d3 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d3 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -12072,12 +12699,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 4 + M.of_value (| Value.Integer 4 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -12095,7 +12723,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d4 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d4 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -12106,39 +12734,42 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 6 + M.of_value (| Value.Integer 6 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let n := M.alloc (| M.rust_cast (| M.read (| n |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (M.rust_cast (M.read (| UnsupportedLiteral |))) + BinOp.Pure.ge (| + M.read (| n |), + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let to_parse := M.alloc (| BinOp.Panic.rem (| + Integer.U32, M.read (| n |), - M.rust_cast (M.read (| UnsupportedLiteral |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |) in let _ := @@ -12146,35 +12777,42 @@ Module fmt. M.write (| β, BinOp.Panic.div (| + Integer.U32, M.read (| β |), - M.rust_cast (M.read (| UnsupportedLiteral |)) + M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |) in let d1 := M.alloc (| BinOp.Panic.shl (| BinOp.Panic.div (| + Integer.U32, M.read (| to_parse |), - Value.Integer Integer.U32 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let d2 := M.alloc (| BinOp.Panic.shl (| BinOp.Panic.rem (| + Integer.U32, M.read (| to_parse |), - Value.Integer Integer.U32 100 + M.of_value (| Value.Integer 100 |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 4 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 4 |) + |) |) in let _ := M.alloc (| @@ -12190,7 +12828,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d1 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d1 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -12201,12 +12839,13 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -12224,7 +12863,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d2 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d2 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -12235,50 +12874,63 @@ Module fmt. [ M.read (| buf_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.read (| curr |) |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let n := M.alloc (| M.rust_cast (| M.read (| n |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| n |)) (Value.Integer Integer.U16 100) + BinOp.Pure.ge (| M.read (| n |), M.of_value (| Value.Integer 100 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let d1 := M.alloc (| BinOp.Panic.shl (| - BinOp.Panic.rem (| M.read (| n |), Value.Integer Integer.U16 100 |), - Value.Integer Integer.I32 1 + BinOp.Panic.rem (| + Integer.U16, + M.read (| n |), + M.of_value (| Value.Integer 100 |) + |), + M.of_value (| Value.Integer 1 |) |) |) in let _ := let β := n in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U16 100 |) + BinOp.Panic.div (| + Integer.U16, + M.read (| β |), + M.of_value (| Value.Integer 100 |) + |) |) in let _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 2 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.alloc (| @@ -12294,7 +12946,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d1 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d1 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -12304,30 +12956,34 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| M.read (| curr |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| n |)) (Value.Integer Integer.U16 10) + BinOp.Pure.lt (| M.read (| n |), M.of_value (| Value.Integer 10 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.write (| @@ -12340,22 +12996,27 @@ Module fmt. [ M.read (| buf_ptr |); M.read (| M.read (| curr |) |) ] |), BinOp.Panic.add (| - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) + Integer.U8, + M.rust_cast (| M.read (| n |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let d1 := M.alloc (| - BinOp.Panic.shl (| M.read (| n |), Value.Integer Integer.I32 1 |) + BinOp.Panic.shl (| M.read (| n |), M.of_value (| Value.Integer 1 |) |) |) in let _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 2 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.alloc (| @@ -12371,7 +13032,7 @@ Module fmt. "add", [] |), - [ M.read (| lut_ptr |); M.rust_cast (M.read (| d1 |)) ] + [ M.read (| lut_ptr |); M.rust_cast (| M.read (| d1 |) |) ] |); M.call_closure (| M.get_associated_function (| @@ -12381,11 +13042,11 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| M.read (| curr |) |) ] |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -12400,7 +13061,7 @@ Module fmt. fmt_u128( *self, true, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12408,7 +13069,7 @@ Module fmt. let f := M.alloc (| f |) in M.call_closure (| M.get_function (| "core::fmt::num::fmt_u128", [] |), - [ M.read (| M.read (| self |) |); Value.Bool true; M.read (| f |) ] + [ M.read (| M.read (| self |) |); M.of_value (| Value.Bool true |); M.read (| f |) ] |))) | _, _ => M.impossible end. @@ -12436,7 +13097,7 @@ Module fmt. fmt_u128(n, is_nonnegative, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12445,12 +13106,15 @@ Module fmt. M.read (| let is_nonnegative := M.alloc (| - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer Integer.I128 0) + BinOp.Pure.ge (| + M.read (| M.read (| self |) |), + M.of_value (| Value.Integer 0 |) + |) |) in let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12475,8 +13139,8 @@ Module fmt. M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), [ - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", Ty.path "i128", @@ -12485,8 +13149,9 @@ Module fmt. [] |), [ M.read (| self |) ] - |)); - Value.Integer Integer.U128 1 + |) + |); + M.of_value (| Value.Integer 1 |) ] |) |))) @@ -12563,7 +13228,7 @@ Module fmt. f.pad_integral(is_nonnegative, "", buf_slice) } *) - Definition fmt_u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt_u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n; is_nonnegative; f ] => ltac:(M.monadic @@ -12573,16 +13238,17 @@ Module fmt. M.read (| let buf := M.alloc (| - repeat - (M.call_closure (| + repeat (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ], "uninit", [] |), [] - |)) + |), 39 + |) |) in let curr := M.alloc (| @@ -12595,7 +13261,7 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in M.match_operator (| @@ -12621,14 +13287,17 @@ Module fmt. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.U128 0) + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12638,6 +13307,7 @@ Module fmt. let target := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -12650,9 +13320,9 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |), - Value.Integer Integer.Usize 19 + M.of_value (| Value.Integer 19 |) |) |) in let _ := @@ -12679,17 +13349,21 @@ Module fmt. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |); M.read (| target |) ] |); - M.read (| UnsupportedLiteral |); - BinOp.Panic.sub (| M.read (| curr |), M.read (| target |) |) + M.read (| M.of_value (| UnsupportedLiteral |) |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| curr |), + M.read (| target |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| curr, M.read (| target |) |) in M.match_operator (| M.alloc (| @@ -12716,16 +13390,17 @@ Module fmt. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.U128 0) + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12735,6 +13410,7 @@ Module fmt. let target := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -12748,9 +13424,9 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |), - Value.Integer Integer.Usize 38 + M.of_value (| Value.Integer 38 |) |) |) in let buf_ptr := @@ -12764,7 +13440,7 @@ Module fmt. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |) |) in let _ := @@ -12786,8 +13462,11 @@ Module fmt. [ M.read (| buf_ptr |); M.read (| target |) ] |); - M.read (| UnsupportedLiteral |); + M.read (| + M.of_value (| UnsupportedLiteral |) + |); BinOp.Panic.sub (| + Integer.Usize, M.read (| curr |), M.read (| target |) |) @@ -12798,8 +13477,9 @@ Module fmt. M.write (| curr, BinOp.Panic.sub (| + Integer.Usize, M.read (| target |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -12813,17 +13493,20 @@ Module fmt. [ M.read (| buf_ptr |); M.read (| curr |) ] |), BinOp.Panic.add (| - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) + Integer.U8, + M.rust_cast (| M.read (| n |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let buf_slice := @@ -12838,8 +13521,8 @@ Module fmt. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], "add", @@ -12854,12 +13537,14 @@ Module fmt. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |); M.read (| curr |) ] - |)); + |) + |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -12872,7 +13557,7 @@ Module fmt. "len", [] |), - [ (* Unsize *) M.pointer_coercion buf ] + [ (* Unsize *) M.pointer_coercion (| buf |) ] |), M.read (| curr |) |) @@ -12891,7 +13576,7 @@ Module fmt. [ M.read (| f |); M.read (| is_nonnegative |); - M.read (| Value.String "" |); + M.read (| M.of_value (| Value.String "" |) |); M.read (| buf_slice |) ] |) @@ -12917,7 +13602,7 @@ Module fmt. (quot, rem) } *) - Definition udiv_1e19 (τ : list Ty.t) (α : list Value.t) : M := + Definition udiv_1e19 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -12926,35 +13611,39 @@ Module fmt. let quot := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| n |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U128 1, - Value.Integer Integer.I32 83 - |)) + BinOp.Pure.lt (| + M.read (| n |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| 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 (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.div (| + Integer.U64, + M.rust_cast (| + BinOp.Panic.shr (| M.read (| n |), - Value.Integer Integer.I32 19 - |)), + M.of_value (| Value.Integer 19 |) + |) + |), BinOp.Panic.shr (| M.read (| M.get_constant (| "core::fmt::num::udiv_1e19::DIV" |) |), - Value.Integer Integer.I32 19 + M.of_value (| Value.Integer 19 |) |) - |)) + |) + |) |))); fun γ => ltac:(M.monadic @@ -12969,7 +13658,7 @@ Module fmt. |) ] |), - Value.Integer Integer.I32 62 + M.of_value (| Value.Integer 62 |) |) |))) ] @@ -12977,29 +13666,39 @@ Module fmt. |) in let rem := M.alloc (| - M.rust_cast - (BinOp.Panic.sub (| + 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" |) |)) + 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 |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| quot |)); A.to_value (M.read (| rem |)) ] + |) + |) |))) | _, _ => M.impossible end. Module udiv_1e19. - Definition value_DIV : Value.t := - M.run ltac:(M.monadic (M.alloc (| M.rust_cast (M.read (| UnsupportedLiteral |)) |))). + Definition value_DIV : A.t := + M.run + ltac:(M.monadic + (M.alloc (| M.rust_cast (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) |))). - Definition value_FACTOR : Value.t := + Definition value_FACTOR : A.t := M.run ltac:(M.monadic - (M.alloc (| Value.Integer Integer.U128 156927543384667019095894735580191660403 |))). + (M.alloc (| M.of_value (| Value.Integer 156927543384667019095894735580191660403 |) |))). End udiv_1e19. (* @@ -13020,65 +13719,79 @@ Module fmt. x_hi as u128 * y_hi as u128 + high1 + high2 } *) - Definition u128_mulhi (τ : list Ty.t) (α : list Value.t) : M := + Definition u128_mulhi (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; y ] => ltac:(M.monadic (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_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 Integer.I32 64 |)) + M.rust_cast (| + BinOp.Panic.shr (| M.read (| x |), M.of_value (| Value.Integer 64 |) |) + |) |) in - let y_lo := M.alloc (| M.rust_cast (M.read (| y |)) |) 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 Integer.I32 64 |)) + M.rust_cast (| + BinOp.Panic.shr (| M.read (| y |), M.of_value (| Value.Integer 64 |) |) + |) |) in let carry := M.alloc (| BinOp.Panic.shr (| BinOp.Panic.mul (| - M.rust_cast (M.read (| x_lo |)), - M.rust_cast (M.read (| y_lo |)) + Integer.U128, + M.rust_cast (| M.read (| x_lo |) |), + M.rust_cast (| M.read (| y_lo |) |) |), - Value.Integer Integer.I32 64 + M.of_value (| Value.Integer 64 |) |) |) in let m := M.alloc (| BinOp.Panic.add (| + Integer.U128, BinOp.Panic.mul (| - M.rust_cast (M.read (| x_lo |)), - M.rust_cast (M.read (| y_hi |)) + 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 Integer.I32 64 |) |) in - let m_lo := M.alloc (| M.rust_cast (M.read (| m |)) |) in + M.alloc (| + BinOp.Panic.shr (| M.read (| m |), M.of_value (| 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 (| - M.rust_cast (M.read (| x_hi |)), - M.rust_cast (M.read (| y_lo |)) + Integer.U128, + M.rust_cast (| M.read (| x_hi |) |), + M.rust_cast (| M.read (| y_lo |) |) |), - M.rust_cast (M.read (| m_lo |)) + M.rust_cast (| M.read (| m_lo |) |) |), - Value.Integer Integer.I32 64 + M.of_value (| Value.Integer 64 |) |) |) in M.alloc (| BinOp.Panic.add (| + Integer.U128, BinOp.Panic.add (| + Integer.U128, BinOp.Panic.mul (| - M.rust_cast (M.read (| x_hi |)), - M.rust_cast (M.read (| y_hi |)) + Integer.U128, + M.rust_cast (| M.read (| x_hi |) |), + M.rust_cast (| M.read (| y_hi |) |) |), M.read (| high1 |) |), diff --git a/CoqOfRust/core/fmt/rt.v b/CoqOfRust/core/fmt/rt.v index 633f2086d..8caa9e9d0 100644 --- a/CoqOfRust/core/fmt/rt.v +++ b/CoqOfRust/core/fmt/rt.v @@ -33,34 +33,34 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::rt::Placeholder". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -98,7 +98,7 @@ Module fmt. Self { position, fill, align, flags, precision, width } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ position; fill; align; flags; precision; width ] => ltac:(M.monadic @@ -108,16 +108,18 @@ Module fmt. let flags := M.alloc (| flags |) in let precision := M.alloc (| precision |) in let width := M.alloc (| width |) in - Value.StructRecord - "core::fmt::rt::Placeholder" - [ - ("position", M.read (| position |)); - ("fill", M.read (| fill |)); - ("align", M.read (| align |)); - ("flags", M.read (| flags |)); - ("precision", M.read (| precision |)); - ("width", M.read (| width |)) - ])) + M.of_value (| + Value.StructRecord + "core::fmt::rt::Placeholder" + [ + ("position", A.to_value (M.read (| position |))); + ("fill", A.to_value (M.read (| fill |))); + ("align", A.to_value (M.read (| align |))); + ("flags", A.to_value (M.read (| flags |))); + ("precision", A.to_value (M.read (| precision |))); + ("width", A.to_value (M.read (| width |))) + ] + |))) | _, _ => M.impossible end. @@ -169,7 +171,7 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::rt::Alignment". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -201,7 +203,7 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::rt::Alignment". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -228,7 +230,7 @@ Module fmt. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -256,12 +258,12 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::rt::Alignment". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -314,14 +316,14 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::rt::Count". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -391,7 +393,7 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::rt::Flag". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -442,19 +444,19 @@ Module fmt. Definition Self : Ty.t := Ty.path "core::fmt::rt::Argument". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -487,52 +489,56 @@ Module fmt. unsafe { Argument { formatter: mem::transmute(f), value: mem::transmute(x) } } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x; f ] => ltac:(M.monadic (let x := M.alloc (| x |) in let f := M.alloc (| f |) in - Value.StructRecord - "core::fmt::rt::Argument" - [ - ("formatter", - M.call_closure (| - M.get_function (| - "core::intrinsics::transmute", - [ - Ty.function + M.of_value (| + Value.StructRecord + "core::fmt::rt::Argument" + [ + ("formatter", + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::transmute", [ - Ty.apply (Ty.path "&") [ T ]; - Ty.apply (Ty.path "&mut") [ Ty.path "core::fmt::Formatter" ] + Ty.function + [ + Ty.apply (Ty.path "&") [ T ]; + Ty.apply (Ty.path "&mut") [ Ty.path "core::fmt::Formatter" ] + ] + (Ty.apply + (Ty.path "core::result::Result") + [ Ty.tuple []; Ty.path "core::fmt::Error" ]); + Ty.function + [ + Ty.apply (Ty.path "&") [ Ty.path "core::fmt::rt::Opaque" ]; + Ty.apply (Ty.path "&mut") [ Ty.path "core::fmt::Formatter" ] + ] + (Ty.apply + (Ty.path "core::result::Result") + [ Ty.tuple []; Ty.path "core::fmt::Error" ]) ] - (Ty.apply - (Ty.path "core::result::Result") - [ Ty.tuple []; Ty.path "core::fmt::Error" ]); - Ty.function + |), + [ M.read (| f |) ] + |))); + ("value", + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::transmute", [ - Ty.apply (Ty.path "&") [ Ty.path "core::fmt::rt::Opaque" ]; - Ty.apply (Ty.path "&mut") [ Ty.path "core::fmt::Formatter" ] + Ty.apply (Ty.path "&") [ T ]; + Ty.apply (Ty.path "&") [ Ty.path "core::fmt::rt::Opaque" ] ] - (Ty.apply - (Ty.path "core::result::Result") - [ Ty.tuple []; Ty.path "core::fmt::Error" ]) - ] - |), - [ M.read (| f |) ] - |)); - ("value", - M.call_closure (| - M.get_function (| - "core::intrinsics::transmute", - [ - Ty.apply (Ty.path "&") [ T ]; - Ty.apply (Ty.path "&") [ Ty.path "core::fmt::rt::Opaque" ] - ] - |), - [ M.read (| x |) ] - |)) - ])) + |), + [ M.read (| x |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -543,7 +549,7 @@ Module fmt. Self::new(x, Display::fmt) } *) - Definition new_display (τ : list Ty.t) (α : list Value.t) : M := + Definition new_display (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -553,7 +559,9 @@ Module fmt. [ M.read (| x |); (* ReifyFnPointer *) - M.pointer_coercion (M.get_trait_method (| "core::fmt::Display", T, [], "fmt", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::fmt::Display", T, [], "fmt", [] |) + |) ] |))) | _, _ => M.impossible @@ -566,7 +574,7 @@ Module fmt. Self::new(x, Debug::fmt) } *) - Definition new_debug (τ : list Ty.t) (α : list Value.t) : M := + Definition new_debug (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -576,7 +584,9 @@ Module fmt. [ M.read (| x |); (* ReifyFnPointer *) - M.pointer_coercion (M.get_trait_method (| "core::fmt::Debug", T, [], "fmt", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::fmt::Debug", T, [], "fmt", [] |) + |) ] |))) | _, _ => M.impossible @@ -589,7 +599,7 @@ Module fmt. Self::new(x, Octal::fmt) } *) - Definition new_octal (τ : list Ty.t) (α : list Value.t) : M := + Definition new_octal (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -599,7 +609,9 @@ Module fmt. [ M.read (| x |); (* ReifyFnPointer *) - M.pointer_coercion (M.get_trait_method (| "core::fmt::Octal", T, [], "fmt", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::fmt::Octal", T, [], "fmt", [] |) + |) ] |))) | _, _ => M.impossible @@ -612,7 +624,7 @@ Module fmt. Self::new(x, LowerHex::fmt) } *) - Definition new_lower_hex (τ : list Ty.t) (α : list Value.t) : M := + Definition new_lower_hex (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -622,8 +634,9 @@ Module fmt. [ M.read (| x |); (* ReifyFnPointer *) - M.pointer_coercion - (M.get_trait_method (| "core::fmt::LowerHex", T, [], "fmt", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::fmt::LowerHex", T, [], "fmt", [] |) + |) ] |))) | _, _ => M.impossible @@ -637,7 +650,7 @@ Module fmt. Self::new(x, UpperHex::fmt) } *) - Definition new_upper_hex (τ : list Ty.t) (α : list Value.t) : M := + Definition new_upper_hex (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -647,8 +660,9 @@ Module fmt. [ M.read (| x |); (* ReifyFnPointer *) - M.pointer_coercion - (M.get_trait_method (| "core::fmt::UpperHex", T, [], "fmt", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::fmt::UpperHex", T, [], "fmt", [] |) + |) ] |))) | _, _ => M.impossible @@ -662,7 +676,7 @@ Module fmt. Self::new(x, Pointer::fmt) } *) - Definition new_pointer (τ : list Ty.t) (α : list Value.t) : M := + Definition new_pointer (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -672,7 +686,9 @@ Module fmt. [ M.read (| x |); (* ReifyFnPointer *) - M.pointer_coercion (M.get_trait_method (| "core::fmt::Pointer", T, [], "fmt", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::fmt::Pointer", T, [], "fmt", [] |) + |) ] |))) | _, _ => M.impossible @@ -685,7 +701,7 @@ Module fmt. Self::new(x, Binary::fmt) } *) - Definition new_binary (τ : list Ty.t) (α : list Value.t) : M := + Definition new_binary (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -695,7 +711,9 @@ Module fmt. [ M.read (| x |); (* ReifyFnPointer *) - M.pointer_coercion (M.get_trait_method (| "core::fmt::Binary", T, [], "fmt", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::fmt::Binary", T, [], "fmt", [] |) + |) ] |))) | _, _ => M.impossible @@ -708,7 +726,7 @@ Module fmt. Self::new(x, LowerExp::fmt) } *) - Definition new_lower_exp (τ : list Ty.t) (α : list Value.t) : M := + Definition new_lower_exp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -718,8 +736,9 @@ Module fmt. [ M.read (| x |); (* ReifyFnPointer *) - M.pointer_coercion - (M.get_trait_method (| "core::fmt::LowerExp", T, [], "fmt", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::fmt::LowerExp", T, [], "fmt", [] |) + |) ] |))) | _, _ => M.impossible @@ -733,7 +752,7 @@ Module fmt. Self::new(x, UpperExp::fmt) } *) - Definition new_upper_exp (τ : list Ty.t) (α : list Value.t) : M := + Definition new_upper_exp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -743,8 +762,9 @@ Module fmt. [ M.read (| x |); (* ReifyFnPointer *) - M.pointer_coercion - (M.get_trait_method (| "core::fmt::UpperExp", T, [], "fmt", [] |)) + M.pointer_coercion (| + M.get_trait_method (| "core::fmt::UpperExp", T, [], "fmt", [] |) + |) ] |))) | _, _ => M.impossible @@ -758,7 +778,7 @@ Module fmt. Self::new(x, USIZE_MARKER) } *) - Definition from_usize (τ : list Ty.t) (α : list Value.t) : M := + Definition from_usize (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -784,7 +804,7 @@ Module fmt. (self.formatter)(self.value, f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -829,59 +849,68 @@ Module fmt. } } *) - Definition as_usize (τ : list Ty.t) (α : list Value.t) : M := + Definition as_usize (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.rust_cast - (M.read (| + BinOp.Pure.eq (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::rt::Argument", "formatter" |) - |))) - (M.rust_cast - (M.read (| + |) + |), + M.rust_cast (| + M.read (| M.read (| M.get_constant (| "core::fmt::rt::USIZE_MARKER" |) |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.rust_cast + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value (M.read (| - M.use - (M.alloc (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::fmt::rt::Argument", - "value" - |) - |) - |)) + M.rust_cast (| + M.read (| + M.use + (M.alloc (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::fmt::rt::Argument", + "value" + |) + |) + |)) + |) + |) |)) - |) - ] + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -895,8 +924,11 @@ Module fmt. [] } *) - Definition none (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Array [])) | _, _ => M.impossible end. + Definition none (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Array [] |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_none : M.IsAssociatedFunction Self "none" none. End Impl_core_fmt_rt_Argument. @@ -916,11 +948,15 @@ Module fmt. Self { _private: () } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord "core::fmt::rt::UnsafeArg" [ ("_private", Value.Tuple []) ])) + (M.of_value (| + Value.StructRecord + "core::fmt::rt::UnsafeArg" + [ ("_private", A.to_value (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. @@ -929,15 +965,15 @@ Module fmt. (* Unhandled foreign module here *) - Definition value_USIZE_MARKER : Value.t := + Definition value_USIZE_MARKER : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| (* ClosureFnPointer(Normal) *) - M.pointer_coercion - (M.closure - (fun γ => + M.pointer_coercion (| + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -967,7 +1003,8 @@ Module fmt. M.never_to_any (| M.read (| M.loop (| - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) |) |) @@ -978,7 +1015,9 @@ Module fmt. ] |) | _ => M.impossible (||) - end))) + end) + |) + |) |) |))). End rt. diff --git a/CoqOfRust/core/future/future.v b/CoqOfRust/core/future/future.v index c77c16565..26727b079 100644 --- a/CoqOfRust/core/future/future.v +++ b/CoqOfRust/core/future/future.v @@ -17,7 +17,7 @@ Module future. F::poll(Pin::new(&mut **self), cx) } *) - Definition poll (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; cx ] => @@ -77,7 +77,7 @@ Module future. ::poll(self.as_deref_mut(), cx) } *) - Definition poll (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; cx ] => diff --git a/CoqOfRust/core/future/into_future.v b/CoqOfRust/core/future/into_future.v index 85dfc2c5f..5a36b6b9b 100644 --- a/CoqOfRust/core/future/into_future.v +++ b/CoqOfRust/core/future/into_future.v @@ -20,7 +20,7 @@ Module future. self } *) - Definition into_future (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_future (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/future/join.v b/CoqOfRust/core/future/join.v index 2012eaf83..b7a15cb9c 100644 --- a/CoqOfRust/core/future/join.v +++ b/CoqOfRust/core/future/join.v @@ -42,7 +42,7 @@ Module future. } } *) - Definition take_output (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_output (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => @@ -69,7 +69,9 @@ Module future. |), [ M.read (| self |); - Value.StructTuple "core::future::join::MaybeDone::Taken" [] + M.of_value (| + Value.StructTuple "core::future::join::MaybeDone::Taken" [] + |) ] |) |), @@ -84,7 +86,11 @@ Module future. |) in let val := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -94,7 +100,9 @@ Module future. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "internal error: entered unreachable code" + M.of_value (| + Value.String "internal error: entered unreachable code" + |) |) ] |) @@ -104,7 +112,9 @@ Module future. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -140,7 +150,7 @@ Module future. Poll::Ready(()) } *) - Definition poll (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; cx ] => @@ -235,9 +245,11 @@ Module future. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::task::poll::Poll::Pending" - [] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Pending" + [] + |) |) |) |) @@ -262,13 +274,15 @@ Module future. |), [ self; - Value.StructTuple - "core::future::join::MaybeDone::Done" - [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::future::join::MaybeDone::Done" + [ A.to_value (M.read (| val |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -277,7 +291,7 @@ Module future. "core::future::join::MaybeDone::Done", 0 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -286,7 +300,9 @@ Module future. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "internal error: entered unreachable code" + M.of_value (| + Value.String "internal error: entered unreachable code" + |) |) ] |) @@ -294,7 +310,13 @@ Module future. |))) ] |) in - M.alloc (| Value.StructTuple "core::task::poll::Poll::Ready" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/future/mod.v b/CoqOfRust/core/future/mod.v index 2655e8687..584fb7d22 100644 --- a/CoqOfRust/core/future/mod.v +++ b/CoqOfRust/core/future/mod.v @@ -15,7 +15,7 @@ Module future. Definition Self : Ty.t := Ty.path "core::future::ResumeTy". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -29,16 +29,17 @@ Module future. |), [ M.read (| f |); - M.read (| Value.String "ResumeTy" |); + M.read (| M.of_value (| Value.String "ResumeTy" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::future::ResumeTy", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -67,14 +68,14 @@ Module future. Definition Self : Ty.t := Ty.path "core::future::ResumeTy". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -118,7 +119,7 @@ Module future. unsafe { &mut *cx.0.as_ptr().cast() } } *) - Definition get_context (τ : list Ty.t) (α : list Value.t) : M := + Definition get_context (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ cx ] => ltac:(M.monadic diff --git a/CoqOfRust/core/future/pending.v b/CoqOfRust/core/future/pending.v index fb1413820..ca547ecf9 100644 --- a/CoqOfRust/core/future/pending.v +++ b/CoqOfRust/core/future/pending.v @@ -16,13 +16,18 @@ Module future. Pending { _data: marker::PhantomData } } *) - Definition pending (τ : list Ty.t) (α : list Value.t) : M := + Definition pending (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic - (Value.StructRecord - "core::future::pending::Pending" - [ ("_data", Value.StructTuple "core::marker::PhantomData" []) ])) + (M.of_value (| + Value.StructRecord + "core::future::pending::Pending" + [ + ("_data", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -38,7 +43,7 @@ Module future. Poll::Pending } *) - Definition poll (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; β1 ] => @@ -47,7 +52,11 @@ Module future. let β1 := M.alloc (| β1 |) in M.match_operator (| β1, - [ fun γ => ltac:(M.monadic (Value.StructTuple "core::task::poll::Poll::Pending" [])) ] + [ + fun γ => + ltac:(M.monadic + (M.of_value (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + ] |))) | _, _ => M.impossible end. @@ -71,7 +80,7 @@ Module future. f.debug_struct("Pending").finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -92,7 +101,7 @@ Module future. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Pending" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Pending" |) |) ] |) |) ] @@ -118,7 +127,7 @@ Module future. pending() } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/future/poll_fn.v b/CoqOfRust/core/future/poll_fn.v index 6cca7faa0..a840bdd68 100644 --- a/CoqOfRust/core/future/poll_fn.v +++ b/CoqOfRust/core/future/poll_fn.v @@ -11,12 +11,16 @@ Module future. PollFn { f } } *) - Definition poll_fn (τ : list Ty.t) (α : list Value.t) : M := + Definition poll_fn (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ f ] => ltac:(M.monadic (let f := M.alloc (| f |) in - Value.StructRecord "core::future::poll_fn::PollFn" [ ("f", M.read (| f |)) ])) + M.of_value (| + Value.StructRecord + "core::future::poll_fn::PollFn" + [ ("f", A.to_value (M.read (| f |))) ] + |))) | _, _ => M.impossible end. @@ -47,7 +51,7 @@ Module future. f.debug_struct("PollFn").finish() } *) - Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; f ] => @@ -68,7 +72,7 @@ Module future. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "PollFn" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "PollFn" |) |) ] |) |) ] @@ -98,7 +102,7 @@ Module future. (unsafe { &mut self.get_unchecked_mut().f })(cx) } *) - Definition poll (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self; cx ] => @@ -132,7 +136,7 @@ Module future. "core::future::poll_fn::PollFn", "f" |); - Value.Tuple [ M.read (| cx |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| cx |)) ] |) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/future/ready.v b/CoqOfRust/core/future/ready.v index 230a625fe..ed7e36d23 100644 --- a/CoqOfRust/core/future/ready.v +++ b/CoqOfRust/core/future/ready.v @@ -14,7 +14,7 @@ Module future. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::future::ready::Ready") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -29,16 +29,17 @@ Module future. |), [ M.read (| f |); - M.read (| Value.String "Ready" |); + M.read (| M.of_value (| Value.String "Ready" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::future::ready::Ready", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -57,32 +58,35 @@ Module future. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::future::ready::Ready") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::future::ready::Ready" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ T ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::future::ready::Ready", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::future::ready::Ready" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ T ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::future::ready::Ready", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -118,56 +122,59 @@ Module future. Poll::Ready(self.0.take().expect("`Ready` polled after completion")) } *) - Definition poll (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; _cx ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _cx := M.alloc (| _cx |) in - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ T ], - "expect", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ T ], - "take", + "expect", [] |), [ - M.SubPointer.get_struct_tuple_field (| - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - Ty.apply - (Ty.path "core::pin::Pin") - [ - Ty.apply - (Ty.path "&mut") - [ Ty.apply (Ty.path "core::future::ready::Ready") [ T ] ] - ], - [], - "deref_mut", - [] - |), - [ self ] + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ T ], + "take", + [] |), - "core::future::ready::Ready", - 0 - |) + [ + M.SubPointer.get_struct_tuple_field (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path "core::pin::Pin") + [ + Ty.apply + (Ty.path "&mut") + [ Ty.apply (Ty.path "core::future::ready::Ready") [ T ] ] + ], + [], + "deref_mut", + [] + |), + [ self ] + |), + "core::future::ready::Ready", + 0 + |) + ] + |); + M.read (| M.of_value (| Value.String "`Ready` polled after completion" |) |) ] - |); - M.read (| Value.String "`Ready` polled after completion" |) - ] - |) - ])) + |)) + ] + |))) | _, _ => M.impossible end. @@ -189,7 +196,7 @@ Module future. self.0.expect("Called `into_inner()` on `Ready` after completion") } *) - Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -205,7 +212,9 @@ Module future. M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::future::ready::Ready", 0 |) |); - M.read (| Value.String "Called `into_inner()` on `Ready` after completion" |) + M.read (| + M.of_value (| Value.String "Called `into_inner()` on `Ready` after completion" |) + |) ] |))) | _, _ => M.impossible @@ -221,14 +230,21 @@ Module future. Ready(Some(t)) } *) - Definition ready (τ : list Ty.t) (α : list Value.t) : M := + Definition ready (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic (let t := M.alloc (| t |) in - Value.StructTuple - "core::future::ready::Ready" - [ Value.StructTuple "core::option::Option::Some" [ M.read (| t |) ] ])) + M.of_value (| + Value.StructTuple + "core::future::ready::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| t |)) ] + |)) + ] + |))) | _, _ => M.impossible end. End ready. diff --git a/CoqOfRust/core/hash/mod.v b/CoqOfRust/core/hash/mod.v index 6a224c3d7..dd7c0846e 100644 --- a/CoqOfRust/core/hash/mod.v +++ b/CoqOfRust/core/hash/mod.v @@ -4,7 +4,7 @@ Require Import CoqOfRust.CoqOfRust. Module hash. (* Trait *) Module Hash. - Definition hash_slice (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -72,7 +72,7 @@ Module hash. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -85,7 +85,7 @@ Module hash. (* Trait *) Module Hasher. - Definition write_u8 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u8 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -95,14 +95,17 @@ Module hash. M.get_trait_method (| "core::hash::Hasher", Self, [], "write", [] |), [ M.read (| self |); - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [ M.read (| i |) ] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [ A.to_value (M.read (| i |)) ] |) |) + |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_u8 : M.IsProvidedMethod "core::hash::Hasher" "write_u8" write_u8. - Definition write_u16 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u16 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -113,20 +116,21 @@ Module hash. [ M.read (| self |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "to_ne_bytes", [] |), [ M.read (| i |) ] |) - |)) + |) + |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_u16 : M.IsProvidedMethod "core::hash::Hasher" "write_u16" write_u16. - Definition write_u32 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u32 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -137,20 +141,21 @@ Module hash. [ M.read (| self |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "to_ne_bytes", [] |), [ M.read (| i |) ] |) - |)) + |) + |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_u32 : M.IsProvidedMethod "core::hash::Hasher" "write_u32" write_u32. - Definition write_u64 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u64 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -161,20 +166,21 @@ Module hash. [ M.read (| self |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "to_ne_bytes", [] |), [ M.read (| i |) ] |) - |)) + |) + |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_u64 : M.IsProvidedMethod "core::hash::Hasher" "write_u64" write_u64. - Definition write_u128 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u128 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -185,13 +191,14 @@ Module hash. [ M.read (| self |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "to_ne_bytes", [] |), [ M.read (| i |) ] |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -199,7 +206,7 @@ Module hash. Axiom ProvidedMethod_write_u128 : M.IsProvidedMethod "core::hash::Hasher" "write_u128" write_u128. - Definition write_usize (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_usize (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -210,13 +217,14 @@ Module hash. [ M.read (| self |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "to_ne_bytes", [] |), [ M.read (| i |) ] |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -224,7 +232,7 @@ Module hash. Axiom ProvidedMethod_write_usize : M.IsProvidedMethod "core::hash::Hasher" "write_usize" write_usize. - Definition write_i8 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i8 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -232,13 +240,13 @@ Module hash. let i := M.alloc (| i |) in M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write_u8", [] |), - [ M.read (| self |); M.rust_cast (M.read (| i |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| i |) |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_i8 : M.IsProvidedMethod "core::hash::Hasher" "write_i8" write_i8. - Definition write_i16 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i16 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -246,13 +254,13 @@ Module hash. let i := M.alloc (| i |) in M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write_u16", [] |), - [ M.read (| self |); M.rust_cast (M.read (| i |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| i |) |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_i16 : M.IsProvidedMethod "core::hash::Hasher" "write_i16" write_i16. - Definition write_i32 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i32 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -260,13 +268,13 @@ Module hash. let i := M.alloc (| i |) in M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write_u32", [] |), - [ M.read (| self |); M.rust_cast (M.read (| i |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| i |) |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_i32 : M.IsProvidedMethod "core::hash::Hasher" "write_i32" write_i32. - Definition write_i64 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i64 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -274,13 +282,13 @@ Module hash. let i := M.alloc (| i |) in M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write_u64", [] |), - [ M.read (| self |); M.rust_cast (M.read (| i |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| i |) |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_i64 : M.IsProvidedMethod "core::hash::Hasher" "write_i64" write_i64. - Definition write_i128 (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i128 (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -288,14 +296,14 @@ Module hash. let i := M.alloc (| i |) in M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write_u128", [] |), - [ M.read (| self |); M.rust_cast (M.read (| i |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| i |) |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_i128 : M.IsProvidedMethod "core::hash::Hasher" "write_i128" write_i128. - Definition write_isize (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_isize (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -303,14 +311,14 @@ Module hash. let i := M.alloc (| i |) in M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write_usize", [] |), - [ M.read (| self |); M.rust_cast (M.read (| i |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| i |) |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_isize : M.IsProvidedMethod "core::hash::Hasher" "write_isize" write_isize. - Definition write_length_prefix (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_length_prefix (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; len ] => ltac:(M.monadic @@ -324,14 +332,14 @@ Module hash. [ M.read (| self |); M.read (| len |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. Axiom ProvidedMethod_write_length_prefix : M.IsProvidedMethod "core::hash::Hasher" "write_length_prefix" write_length_prefix. - Definition write_str (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -355,10 +363,10 @@ Module hash. M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write_u8", [] |), - [ M.read (| self |); Value.Integer Integer.U8 255 ] + [ M.read (| self |); M.of_value (| Value.Integer 255 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -374,7 +382,7 @@ Module hash. ( **self).finish() } *) - Definition finish (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self ] => @@ -392,7 +400,7 @@ Module hash. ( **self).write(bytes) } *) - Definition write (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; bytes ] => @@ -411,7 +419,7 @@ Module hash. ( **self).write_u8(i) } *) - Definition write_u8 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u8 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -430,7 +438,7 @@ Module hash. ( **self).write_u16(i) } *) - Definition write_u16 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u16 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -449,7 +457,7 @@ Module hash. ( **self).write_u32(i) } *) - Definition write_u32 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u32 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -468,7 +476,7 @@ Module hash. ( **self).write_u64(i) } *) - Definition write_u64 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u64 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -487,7 +495,7 @@ Module hash. ( **self).write_u128(i) } *) - Definition write_u128 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u128 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -506,7 +514,7 @@ Module hash. ( **self).write_usize(i) } *) - Definition write_usize (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_usize (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -525,7 +533,7 @@ Module hash. ( **self).write_i8(i) } *) - Definition write_i8 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i8 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -544,7 +552,7 @@ Module hash. ( **self).write_i16(i) } *) - Definition write_i16 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i16 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -563,7 +571,7 @@ Module hash. ( **self).write_i32(i) } *) - Definition write_i32 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i32 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -582,7 +590,7 @@ Module hash. ( **self).write_i64(i) } *) - Definition write_i64 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i64 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -601,7 +609,7 @@ Module hash. ( **self).write_i128(i) } *) - Definition write_i128 (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_i128 (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -620,7 +628,7 @@ Module hash. ( **self).write_isize(i) } *) - Definition write_isize (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_isize (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; i ] => @@ -639,7 +647,7 @@ Module hash. ( **self).write_length_prefix(len) } *) - Definition write_length_prefix (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_length_prefix (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; len ] => @@ -658,7 +666,7 @@ Module hash. ( **self).write_str(s) } *) - Definition write_str (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; s ] => @@ -701,7 +709,7 @@ Module hash. (* Trait *) Module BuildHasher. - Definition hash_one (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_one (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self; x ] => ltac:(M.monadic @@ -751,7 +759,7 @@ Module hash. f.debug_struct("BuildHasherDefault").finish() } *) - Definition fmt (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; f ] => @@ -772,7 +780,8 @@ Module hash. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "BuildHasherDefault" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "BuildHasherDefault" |) |) + ] |) |) ] @@ -800,7 +809,7 @@ Module hash. H::default() } *) - Definition build_hasher (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition build_hasher (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self ] => @@ -834,15 +843,17 @@ Module hash. BuildHasherDefault(marker::PhantomData) } *) - Definition clone (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::hash::BuildHasherDefault" - [ Value.StructTuple "core::marker::PhantomData" [] ])) + M.of_value (| + Value.StructTuple + "core::hash::BuildHasherDefault" + [ A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) ] + |))) | _, _ => M.impossible end. @@ -863,14 +874,16 @@ Module hash. BuildHasherDefault(marker::PhantomData) } *) - Definition default (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::hash::BuildHasherDefault" - [ Value.StructTuple "core::marker::PhantomData" [] ])) + (M.of_value (| + Value.StructTuple + "core::hash::BuildHasherDefault" + [ A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) ] + |))) | _, _ => M.impossible end. @@ -891,14 +904,14 @@ Module hash. true } *) - Definition eq (H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self H in match τ, α with | [], [ self; _other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _other := M.alloc (| _other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -928,7 +941,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -952,7 +965,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -971,15 +984,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1014,7 +1028,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1038,7 +1052,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1057,15 +1071,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u16" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1100,7 +1115,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1124,7 +1139,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1143,15 +1158,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u32" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1186,7 +1202,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1210,7 +1226,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1229,15 +1245,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u64" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1272,7 +1289,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1296,7 +1313,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1315,15 +1332,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "usize" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1358,7 +1376,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1382,7 +1400,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1401,15 +1419,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i8" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1444,7 +1463,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1468,7 +1487,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1487,15 +1506,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i16" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1530,7 +1550,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1554,7 +1574,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1573,15 +1593,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i32" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1616,7 +1637,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1640,7 +1661,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1659,15 +1680,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i64" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1702,7 +1724,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1726,7 +1748,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1745,15 +1767,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "isize" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1788,7 +1811,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1812,7 +1835,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1831,15 +1854,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u128" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1874,7 +1898,7 @@ Module hash. state.$meth( *self) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1898,7 +1922,7 @@ Module hash. state.write(unsafe { slice::from_raw_parts(ptr, newlen) }) } *) - Definition hash_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition hash_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ data; state ] => ltac:(M.monadic @@ -1917,15 +1941,16 @@ Module hash. |) in let ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i128" ], "as_ptr", [] |), [ M.read (| data |) ] - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1960,7 +1985,7 @@ Module hash. state.write_u8( *self as u8) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1968,7 +1993,7 @@ Module hash. let state := M.alloc (| state |) in M.call_closure (| M.get_trait_method (| "core::hash::Hasher", H, [], "write_u8", [] |), - [ M.read (| state |); M.rust_cast (M.read (| M.read (| self |) |)) ] + [ M.read (| state |); M.rust_cast (| M.read (| M.read (| self |) |) |) ] |))) | _, _ => M.impossible end. @@ -1989,7 +2014,7 @@ Module hash. state.write_u32( *self as u32) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -1997,7 +2022,7 @@ Module hash. let state := M.alloc (| state |) in M.call_closure (| M.get_trait_method (| "core::hash::Hasher", H, [], "write_u32", [] |), - [ M.read (| state |); M.rust_cast (M.read (| M.read (| self |) |)) ] + [ M.read (| state |); M.rust_cast (| M.read (| M.read (| self |) |) |) ] |))) | _, _ => M.impossible end. @@ -2018,7 +2043,7 @@ Module hash. state.write_str(self); } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -2032,7 +2057,7 @@ Module hash. [ M.read (| state |); M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2053,7 +2078,7 @@ Module hash. *self } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; β1 ] => ltac:(M.monadic @@ -2078,13 +2103,13 @@ Module hash. Definition Self : Ty.t := Ty.tuple []. (* fn hash(&self, _state: &mut H) {} *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; _state ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _state := M.alloc (| _state |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -2105,7 +2130,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as S ], [ self; state ] => @@ -2127,7 +2152,7 @@ Module hash. [ M.read (| value_T |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2152,7 +2177,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B in match τ, α with | [ _ as S ], [ self; state ] => @@ -2183,7 +2208,7 @@ Module hash. [ M.read (| value_B |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2208,7 +2233,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C in match τ, α with | [ _ as S ], [ self; state ] => @@ -2248,7 +2273,7 @@ Module hash. [ M.read (| value_C |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2273,7 +2298,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C D : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C D : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C D in match τ, α with | [ _ as S ], [ self; state ] => @@ -2322,7 +2347,7 @@ Module hash. [ M.read (| value_D |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2347,7 +2372,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C D E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C D E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C D E in match τ, α with | [ _ as S ], [ self; state ] => @@ -2405,7 +2430,7 @@ Module hash. [ M.read (| value_E |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2430,7 +2455,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C D E F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C D E F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C D E F in match τ, α with | [ _ as S ], [ self; state ] => @@ -2497,7 +2522,7 @@ Module hash. [ M.read (| value_F |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2522,7 +2547,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C D E F G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C D E F G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C D E F G in match τ, α with | [ _ as S ], [ self; state ] => @@ -2598,7 +2623,7 @@ Module hash. [ M.read (| value_G |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2623,7 +2648,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C D E F G H : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C D E F G H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C D E F G H in match τ, α with | [ _ as S ], [ self; state ] => @@ -2708,7 +2733,7 @@ Module hash. [ M.read (| value_H |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2733,7 +2758,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C D E F G H I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C D E F G H I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C D E F G H I in match τ, α with | [ _ as S ], [ self; state ] => @@ -2827,7 +2852,7 @@ Module hash. [ M.read (| value_I |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2853,7 +2878,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C D E F G H I J : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C D E F G H I J : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C D E F G H I J in match τ, α with | [ _ as S ], [ self; state ] => @@ -2956,7 +2981,7 @@ Module hash. [ M.read (| value_J |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2982,7 +3007,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C D E F G H I J K : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C D E F G H I J K : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C D E F G H I J K in match τ, α with | [ _ as S ], [ self; state ] => @@ -3094,7 +3119,7 @@ Module hash. [ M.read (| value_K |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3120,7 +3145,7 @@ Module hash. $($name.hash(state);)+ } *) - Definition hash (T B C D E F G H I J K L : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T B C D E F G H I J K L : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T B C D E F G H I J K L in match τ, α with | [ _ as S ], [ self; state ] => @@ -3241,7 +3266,7 @@ Module hash. [ M.read (| value_L |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3266,7 +3291,7 @@ Module hash. Hash::hash_slice(self, state) } *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ H ], [ self; state ] => @@ -3314,7 +3339,7 @@ Module hash. ( **self).hash(state); } *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ H ], [ self; state ] => @@ -3329,7 +3354,7 @@ Module hash. [ M.read (| M.read (| self |) |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3351,7 +3376,7 @@ Module hash. ( **self).hash(state); } *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ H ], [ self; state ] => @@ -3366,7 +3391,7 @@ Module hash. [ M.read (| M.read (| self |) |); M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3390,7 +3415,7 @@ Module hash. metadata.hash(state); } *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ H ], [ self; state ] => @@ -3446,7 +3471,7 @@ Module hash. [ metadata; M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3472,7 +3497,7 @@ Module hash. metadata.hash(state); } *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ H ], [ self; state ] => @@ -3528,7 +3553,7 @@ Module hash. [ metadata; M.read (| state |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) diff --git a/CoqOfRust/core/hash/sip.v b/CoqOfRust/core/hash/sip.v index 0c3c22f07..83b59f044 100644 --- a/CoqOfRust/core/hash/sip.v +++ b/CoqOfRust/core/hash/sip.v @@ -20,7 +20,7 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::SipHasher13". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -34,17 +34,18 @@ Module hash. |), [ M.read (| f |); - M.read (| Value.String "SipHasher13" |); - M.read (| Value.String "hasher" |); + M.read (| M.of_value (| Value.String "SipHasher13" |) |); + M.read (| M.of_value (| Value.String "hasher" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::SipHasher13", "hasher" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -62,34 +63,37 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::SipHasher13". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::hash::sip::SipHasher13" - [ - ("hasher", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::hash::sip::Hasher") - [ Ty.path "core::hash::sip::Sip13Rounds" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::SipHasher13", - "hasher" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::hash::sip::SipHasher13" + [ + ("hasher", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::hash::sip::Hasher") + [ Ty.path "core::hash::sip::Sip13Rounds" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::SipHasher13", + "hasher" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -105,27 +109,30 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::SipHasher13". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::hash::sip::SipHasher13" - [ - ("hasher", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "core::hash::sip::Hasher") - [ Ty.path "core::hash::sip::Sip13Rounds" ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::hash::sip::SipHasher13" + [ + ("hasher", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "core::hash::sip::Hasher") + [ Ty.path "core::hash::sip::Sip13Rounds" ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -154,7 +161,7 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::SipHasher24". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -168,17 +175,18 @@ Module hash. |), [ M.read (| f |); - M.read (| Value.String "SipHasher24" |); - M.read (| Value.String "hasher" |); + M.read (| M.of_value (| Value.String "SipHasher24" |) |); + M.read (| M.of_value (| Value.String "hasher" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::SipHasher24", "hasher" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -196,34 +204,37 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::SipHasher24". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::hash::sip::SipHasher24" - [ - ("hasher", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::hash::sip::Hasher") - [ Ty.path "core::hash::sip::Sip24Rounds" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::SipHasher24", - "hasher" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::hash::sip::SipHasher24" + [ + ("hasher", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::hash::sip::Hasher") + [ Ty.path "core::hash::sip::Sip24Rounds" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::SipHasher24", + "hasher" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -239,27 +250,30 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::SipHasher24". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::hash::sip::SipHasher24" - [ - ("hasher", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "core::hash::sip::Hasher") - [ Ty.path "core::hash::sip::Sip24Rounds" ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::hash::sip::SipHasher24" + [ + ("hasher", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "core::hash::sip::Hasher") + [ Ty.path "core::hash::sip::Sip24Rounds" ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -282,7 +296,7 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::SipHasher". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -296,16 +310,17 @@ Module hash. |), [ M.read (| f |); - M.read (| Value.String "SipHasher" |); + M.read (| M.of_value (| Value.String "SipHasher" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::hash::sip::SipHasher", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -323,31 +338,34 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::SipHasher". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::hash::sip::SipHasher" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::hash::sip::SipHasher24", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::hash::sip::SipHasher", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::hash::sip::SipHasher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::hash::sip::SipHasher24", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::hash::sip::SipHasher", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -363,24 +381,27 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::SipHasher". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::hash::sip::SipHasher" - [ - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "core::hash::sip::SipHasher24", - [], - "default", - [] - |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "core::hash::sip::SipHasher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "core::hash::sip::SipHasher24", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -412,7 +433,7 @@ Module hash. Definition Self (S : Ty.t) : Ty.t := Ty.apply (Ty.path "core::hash::sip::Hasher") [ S ]. (* Debug *) - Definition fmt (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self; f ] => @@ -423,78 +444,97 @@ Module hash. let names := M.alloc (| M.alloc (| - Value.Array - [ - M.read (| Value.String "k0" |); - M.read (| Value.String "k1" |); - M.read (| Value.String "length" |); - M.read (| Value.String "state" |); - M.read (| Value.String "tail" |); - M.read (| Value.String "ntail" |); - M.read (| Value.String "_marker" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "k0" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "k1" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "length" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "state" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "tail" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "ntail" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "_marker" |) |)) + ] + |) |) |) in let values := M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "k0" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "k1" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "length" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "state" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "tail" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "ntail" - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "_marker" - |) - |)) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "k0" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "k1" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "length" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "state" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "tail" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "ntail" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "_marker" + |) + |) + |)) + ] + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -505,8 +545,8 @@ Module hash. |), [ M.read (| f |); - M.read (| Value.String "Hasher" |); - (* Unsize *) M.pointer_coercion (M.read (| names |)); + M.read (| M.of_value (| Value.String "Hasher" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| names |) |); M.read (| values |) ] |) @@ -541,7 +581,7 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::State". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -555,41 +595,45 @@ Module hash. |), [ M.read (| f |); - M.read (| Value.String "State" |); - M.read (| Value.String "v0" |); + M.read (| M.of_value (| Value.String "State" |) |); + M.read (| M.of_value (| Value.String "v0" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::State", "v0" - |)); - M.read (| Value.String "v2" |); + |) + |); + M.read (| M.of_value (| Value.String "v2" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::State", "v2" - |)); - M.read (| Value.String "v1" |); + |) + |); + M.read (| M.of_value (| Value.String "v1" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::State", "v1" - |)); - M.read (| Value.String "v3" |); + |) + |); + M.read (| M.of_value (| Value.String "v3" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::State", "v3" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -607,14 +651,14 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::State". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -666,7 +710,7 @@ Module hash. out } *) - Definition u8to64_le (τ : list Ty.t) (α : list Value.t) : M := + Definition u8to64_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ buf; start; len ] => ltac:(M.monadic @@ -676,25 +720,27 @@ Module hash. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| len |)) - (Value.Integer Integer.Usize 8)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| len |), + M.of_value (| Value.Integer 8 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -705,45 +751,56 @@ Module hash. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: len < 8" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: len < 8" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in - let out := M.alloc (| Value.Integer Integer.U64 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let out := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.add (| M.read (| i |), Value.Integer Integer.Usize 3 |)) - (M.read (| len |)) + BinOp.Pure.lt (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 3 |) + |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.write (| out, - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -751,17 +808,19 @@ Module hash. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| i |) |), @@ -772,8 +831,8 @@ Module hash. |), [] |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -782,7 +841,9 @@ Module hash. [] |), [ M.read (| buf |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -798,23 +859,30 @@ Module hash. |), [ M.read (| - Value.String - "assertion failed: start + i + mem::size_of::() <= buf.len()" + M.of_value (| + Value.String + "assertion failed: start + i + mem::size_of::() <= buf.len()" + |) |) ] |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let data := - M.copy (| M.use (M.alloc (| Value.Integer Integer.U32 0 |)) |) in + M.copy (| + M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) + |) in let _ := M.alloc (| M.call_closure (| @@ -838,10 +906,14 @@ Module hash. |), [ M.read (| buf |) ] |); - BinOp.Panic.add (| M.read (| start |), M.read (| i |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| start |), + M.read (| i |) + |) ] |); - M.rust_cast (M.read (| M.use (M.alloc (| data |)) |)); + M.rust_cast (| M.read (| M.use (M.alloc (| data |)) |) |); M.call_closure (| M.get_function (| "core::mem::size_of", @@ -858,48 +930,60 @@ Module hash. [ M.read (| data |) ] |) |) - |)) + |) + |) |) in let _ := let β := i in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 4 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 4 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.add (| M.read (| i |), Value.Integer Integer.Usize 1 |)) - (M.read (| len |)) + BinOp.Pure.lt (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := let β := out in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shl (| - M.rust_cast - (M.read (| + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shl (| + M.rust_cast (| + M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -907,17 +991,19 @@ Module hash. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| i |) |), @@ -928,8 +1014,8 @@ Module hash. |), [] |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -938,7 +1024,9 @@ Module hash. [] |), [ M.read (| buf |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -954,24 +1042,31 @@ Module hash. |), [ M.read (| - Value.String - "assertion failed: start + i + mem::size_of::() <= buf.len()" + M.of_value (| + Value.String + "assertion failed: start + i + mem::size_of::() <= buf.len()" + |) |) ] |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let data := M.copy (| - M.use (M.alloc (| Value.Integer Integer.U16 0 |)) + M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |) in let _ := M.alloc (| @@ -997,12 +1092,13 @@ Module hash. [ M.read (| buf |) ] |); BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| i |) |) ] |); - M.rust_cast (M.read (| M.use (M.alloc (| data |)) |)); + M.rust_cast (| M.read (| M.use (M.alloc (| data |)) |) |); M.call_closure (| M.get_function (| "core::mem::size_of", @@ -1019,36 +1115,47 @@ Module hash. [ M.read (| data |) ] |) |) - |)), - BinOp.Panic.mul (| M.read (| i |), Value.Integer Integer.Usize 8 |) - |)) + |) + |), + BinOp.Panic.mul (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 8 |) + |) + |) + |) |) in let β := i in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 2 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.lt (M.read (| i |)) (M.read (| len |)) |)) in + 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 β := out in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shl (| - M.rust_cast - (M.read (| + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shl (| + M.rust_cast (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -1057,42 +1164,57 @@ Module hash. |), [ M.read (| buf |); - BinOp.Panic.add (| M.read (| start |), M.read (| i |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| start |), + M.read (| i |) + |) ] |) - |)), - BinOp.Panic.mul (| M.read (| i |), Value.Integer Integer.Usize 8 |) - |)) + |) + |), + BinOp.Panic.mul (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 8 |) + |) + |) + |) |) in let _ := let β := i in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq (M.read (| i |)) (M.read (| len |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| M.read (| i |), M.read (| len |) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1103,15 +1225,20 @@ Module hash. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: i == len" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: i == len" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in out @@ -1127,7 +1254,7 @@ Module hash. SipHasher::new_with_keys(0, 0) } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -1137,7 +1264,7 @@ Module hash. "new_with_keys", [] |), - [ Value.Integer Integer.U64 0; Value.Integer Integer.U64 0 ] + [ M.of_value (| Value.Integer 0 |); M.of_value (| Value.Integer 0 |) ] |))) | _, _ => M.impossible end. @@ -1149,31 +1276,37 @@ Module hash. SipHasher(SipHasher24 { hasher: Hasher::new_with_keys(key0, key1) }) } *) - Definition new_with_keys (τ : list Ty.t) (α : list Value.t) : M := + Definition new_with_keys (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ key0; key1 ] => ltac:(M.monadic (let key0 := M.alloc (| key0 |) in let key1 := M.alloc (| key1 |) in - Value.StructTuple - "core::hash::sip::SipHasher" - [ - Value.StructRecord - "core::hash::sip::SipHasher24" - [ - ("hasher", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::hash::sip::Hasher") - [ Ty.path "core::hash::sip::Sip24Rounds" ], - "new_with_keys", - [] - |), - [ M.read (| key0 |); M.read (| key1 |) ] - |)) - ] - ])) + M.of_value (| + Value.StructTuple + "core::hash::sip::SipHasher" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::hash::sip::SipHasher24" + [ + ("hasher", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::hash::sip::Hasher") + [ Ty.path "core::hash::sip::Sip24Rounds" ], + "new_with_keys", + [] + |), + [ M.read (| key0 |); M.read (| key1 |) ] + |))) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1189,7 +1322,7 @@ Module hash. SipHasher13::new_with_keys(0, 0) } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -1199,7 +1332,7 @@ Module hash. "new_with_keys", [] |), - [ Value.Integer Integer.U64 0; Value.Integer Integer.U64 0 ] + [ M.of_value (| Value.Integer 0 |); M.of_value (| Value.Integer 0 |) ] |))) | _, _ => M.impossible end. @@ -1211,27 +1344,30 @@ Module hash. SipHasher13 { hasher: Hasher::new_with_keys(key0, key1) } } *) - Definition new_with_keys (τ : list Ty.t) (α : list Value.t) : M := + Definition new_with_keys (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ key0; key1 ] => ltac:(M.monadic (let key0 := M.alloc (| key0 |) in let key1 := M.alloc (| key1 |) in - Value.StructRecord - "core::hash::sip::SipHasher13" - [ - ("hasher", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::hash::sip::Hasher") - [ Ty.path "core::hash::sip::Sip13Rounds" ], - "new_with_keys", - [] - |), - [ M.read (| key0 |); M.read (| key1 |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::hash::sip::SipHasher13" + [ + ("hasher", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::hash::sip::Hasher") + [ Ty.path "core::hash::sip::Sip13Rounds" ], + "new_with_keys", + [] + |), + [ M.read (| key0 |); M.read (| key1 |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1257,7 +1393,7 @@ Module hash. state } *) - Definition new_with_keys (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_with_keys (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ key0; key1 ] => @@ -1267,25 +1403,32 @@ Module hash. M.read (| let state := M.alloc (| - Value.StructRecord - "core::hash::sip::Hasher" - [ - ("k0", M.read (| key0 |)); - ("k1", M.read (| key1 |)); - ("length", Value.Integer Integer.Usize 0); - ("state", - Value.StructRecord - "core::hash::sip::State" - [ - ("v0", Value.Integer Integer.U64 0); - ("v1", Value.Integer Integer.U64 0); - ("v2", Value.Integer Integer.U64 0); - ("v3", Value.Integer Integer.U64 0) - ]); - ("tail", Value.Integer Integer.U64 0); - ("ntail", Value.Integer Integer.Usize 0); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "core::hash::sip::Hasher" + [ + ("k0", A.to_value (M.read (| key0 |))); + ("k1", A.to_value (M.read (| key1 |))); + ("length", A.to_value (M.of_value (| Value.Integer 0 |))); + ("state", + A.to_value + (M.of_value (| + Value.StructRecord + "core::hash::sip::State" + [ + ("v0", A.to_value (M.of_value (| Value.Integer 0 |))); + ("v1", A.to_value (M.of_value (| Value.Integer 0 |))); + ("v2", A.to_value (M.of_value (| Value.Integer 0 |))); + ("v3", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))); + ("tail", A.to_value (M.of_value (| Value.Integer 0 |))); + ("ntail", A.to_value (M.of_value (| Value.Integer 0 |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) in let _ := M.alloc (| @@ -1317,7 +1460,7 @@ Module hash. self.ntail = 0; } *) - Definition reset (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reset (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self ] => @@ -1331,7 +1474,7 @@ Module hash. "core::hash::sip::Hasher", "length" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| @@ -1344,15 +1487,16 @@ Module hash. "core::hash::sip::State", "v0" |), - BinOp.Pure.bit_xor - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "k0" |) - |)) - (Value.Integer Integer.U64 8317987319222330741) + |), + M.of_value (| Value.Integer 8317987319222330741 |) + |) |) in let _ := M.write (| @@ -1365,15 +1509,16 @@ Module hash. "core::hash::sip::State", "v1" |), - BinOp.Pure.bit_xor - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "k1" |) - |)) - (Value.Integer Integer.U64 7237128888997146477) + |), + M.of_value (| Value.Integer 7237128888997146477 |) + |) |) in let _ := M.write (| @@ -1386,15 +1531,16 @@ Module hash. "core::hash::sip::State", "v2" |), - BinOp.Pure.bit_xor - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "k0" |) - |)) - (Value.Integer Integer.U64 7816392313619706465) + |), + M.of_value (| Value.Integer 7816392313619706465 |) + |) |) in let _ := M.write (| @@ -1407,15 +1553,16 @@ Module hash. "core::hash::sip::State", "v3" |), - BinOp.Pure.bit_xor - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "k1" |) - |)) - (Value.Integer Integer.U64 8387220255154660723) + |), + M.of_value (| Value.Integer 8387220255154660723 |) + |) |) in let _ := M.write (| @@ -1424,9 +1571,9 @@ Module hash. "core::hash::sip::Hasher", "ntail" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1444,7 +1591,7 @@ Module hash. self.0.hasher.write(msg) } *) - Definition write (τ : list Ty.t) (α : list Value.t) : M := + Definition write (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; msg ] => ltac:(M.monadic @@ -1481,7 +1628,7 @@ Module hash. self.0.hasher.write_str(s); } *) - Definition write_str (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -1514,7 +1661,7 @@ Module hash. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1524,7 +1671,7 @@ Module hash. self.0.hasher.finish() } *) - Definition finish (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1575,7 +1722,7 @@ Module hash. self.hasher.write(msg) } *) - Definition write (τ : list Ty.t) (α : list Value.t) : M := + Definition write (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; msg ] => ltac:(M.monadic @@ -1608,7 +1755,7 @@ Module hash. self.hasher.write_str(s); } *) - Definition write_str (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -1637,7 +1784,7 @@ Module hash. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1647,7 +1794,7 @@ Module hash. self.hasher.finish() } *) - Definition finish (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1736,7 +1883,7 @@ Module hash. self.ntail = left; } *) - Definition write (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self; msg ] => @@ -1764,26 +1911,30 @@ Module hash. "core::hash::sip::Hasher", "length" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| length |) |) |) in - let needed := M.alloc (| Value.Integer Integer.Usize 0 |) in + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| length |) |) + |) in + let needed := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "ntail" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1791,7 +1942,8 @@ Module hash. M.write (| needed, BinOp.Panic.sub (| - Value.Integer Integer.Usize 8, + Integer.Usize, + M.of_value (| Value.Integer 8 |), M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1810,14 +1962,14 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shl (| + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shl (| M.call_closure (| M.get_function (| "core::hash::sip::u8to64_le", [] |), [ M.read (| msg |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.call_closure (| M.get_function (| "core::cmp::min", @@ -1828,7 +1980,8 @@ Module hash. ] |), BinOp.Panic.mul (| - Value.Integer Integer.Usize 8, + Integer.Usize, + M.of_value (| Value.Integer 8 |), M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1837,17 +1990,21 @@ Module hash. |) |) |) - |)) + |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| length |)) (M.read (| needed |)) + BinOp.Pure.lt (| + M.read (| length |), + M.read (| needed |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1867,11 +2024,12 @@ Module hash. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| length |) |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); @@ -1890,15 +2048,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "tail" |) - |)) + |) + |) |) in let _ := M.alloc (| @@ -1932,15 +2091,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "tail" |) - |)) + |) + |) |) in let _ := M.write (| @@ -1949,35 +2109,42 @@ Module hash. "core::hash::sip::Hasher", "ntail" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := - M.alloc (| BinOp.Panic.sub (| M.read (| length |), M.read (| needed |) |) |) in + M.alloc (| + BinOp.Panic.sub (| Integer.Usize, M.read (| length |), M.read (| needed |) |) + |) in let left := M.alloc (| - BinOp.Pure.bit_and (M.read (| len |)) (Value.Integer Integer.Usize 7) + BinOp.Pure.bit_and (| M.read (| len |), M.of_value (| Value.Integer 7 |) |) |) in let i := M.copy (| needed |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| i |)) - (BinOp.Panic.sub (| M.read (| len |), M.read (| left |) |)) + BinOp.Pure.lt (| + M.read (| i |), + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| left |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1988,11 +2155,15 @@ Module hash. M.copy (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2000,16 +2171,17 @@ Module hash. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| i |), M.call_closure (| M.get_function (| @@ -2018,8 +2190,8 @@ Module hash. |), [] |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -2028,7 +2200,9 @@ Module hash. [] |), [ M.read (| msg |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2044,8 +2218,10 @@ Module hash. |), [ M.read (| - Value.String - "assertion failed: i + mem::size_of::() <= msg.len()" + M.of_value (| + Value.String + "assertion failed: i + mem::size_of::() <= msg.len()" + |) |) ] |) @@ -2053,16 +2229,20 @@ Module hash. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let data := M.copy (| - M.use (M.alloc (| Value.Integer Integer.U64 0 |)) + M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |) in let _ := M.alloc (| @@ -2090,7 +2270,9 @@ Module hash. M.read (| i |) ] |); - M.rust_cast (M.read (| M.use (M.alloc (| data |)) |)); + M.rust_cast (| + M.read (| M.use (M.alloc (| data |)) |) + |); M.call_closure (| M.get_function (| "core::mem::size_of", @@ -2121,7 +2303,7 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| mi |)) + BinOp.Pure.bit_xor (| M.read (| β |), M.read (| mi |) |) |) in let _ := M.alloc (| @@ -2155,18 +2337,19 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| mi |)) + BinOp.Pure.bit_xor (| M.read (| β |), M.read (| mi |) |) |) in let _ := let β := i in M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 8 + M.of_value (| Value.Integer 8 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2176,7 +2359,7 @@ Module hash. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2204,7 +2387,7 @@ Module hash. |), M.read (| left |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -2218,7 +2401,7 @@ Module hash. self.write_u8(0xFF); } *) - Definition write_str (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self; s ] => @@ -2255,10 +2438,10 @@ Module hash. "write_u8", [] |), - [ M.read (| self |); Value.Integer Integer.U8 255 ] + [ M.read (| self |); M.of_value (| Value.Integer 255 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2279,7 +2462,7 @@ Module hash. state.v0 ^ state.v1 ^ state.v2 ^ state.v3 } *) - Definition finish (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self ] => @@ -2296,27 +2479,30 @@ Module hash. |) in let b := M.alloc (| - BinOp.Pure.bit_or - (BinOp.Panic.shl (| - BinOp.Pure.bit_and - (M.rust_cast - (M.read (| + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| + BinOp.Pure.bit_and (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "length" |) - |))) - (Value.Integer Integer.U64 255), - Value.Integer Integer.I32 56 - |)) - (M.read (| + |) + |), + M.of_value (| Value.Integer 255 |) + |), + M.of_value (| Value.Integer 56 |) + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "tail" |) - |)) + |) + |) |) in let _ := let β := @@ -2325,7 +2511,7 @@ Module hash. "core::hash::sip::State", "v3" |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| b |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| b |) |) |) in let _ := M.alloc (| M.call_closure (| @@ -2340,7 +2526,7 @@ Module hash. "core::hash::sip::State", "v0" |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| b |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| b |) |) |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -2350,7 +2536,7 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor (M.read (| β |)) (Value.Integer Integer.U64 255) + BinOp.Pure.bit_xor (| M.read (| β |), M.of_value (| Value.Integer 255 |) |) |) in let _ := M.alloc (| @@ -2360,33 +2546,36 @@ Module hash. |) |) in M.alloc (| - BinOp.Pure.bit_xor - (BinOp.Pure.bit_xor - (BinOp.Pure.bit_xor - (M.read (| + BinOp.Pure.bit_xor (| + BinOp.Pure.bit_xor (| + BinOp.Pure.bit_xor (| + M.read (| M.SubPointer.get_struct_record_field (| state, "core::hash::sip::State", "v0" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| state, "core::hash::sip::State", "v1" |) - |))) - (M.read (| + |) + |), + M.read (| M.SubPointer.get_struct_record_field (| state, "core::hash::sip::State", "v2" |) - |))) - (M.read (| + |) + |), + M.read (| M.SubPointer.get_struct_record_field (| state, "core::hash::sip::State", "v3" |) - |)) + |) + |) |) |))) | _, _ => M.impossible @@ -2422,72 +2611,81 @@ Module hash. } } *) - Definition clone (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::hash::sip::Hasher" - [ - ("k0", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "k0" - |) - |)); - ("k1", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "k1" - |) - |)); - ("length", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "length" - |) - |)); - ("state", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "state" - |) - |)); - ("tail", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "tail" - |) - |)); - ("ntail", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "ntail" - |) - |)); - ("_marker", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::hash::sip::Hasher", - "_marker" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::hash::sip::Hasher" + [ + ("k0", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "k0" + |) + |))); + ("k1", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "k1" + |) + |))); + ("length", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "length" + |) + |))); + ("state", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "state" + |) + |))); + ("tail", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "tail" + |) + |))); + ("ntail", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "ntail" + |) + |))); + ("_marker", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::hash::sip::Hasher", + "_marker" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -2508,7 +2706,7 @@ Module hash. Hasher::new_with_keys(0, 0) } *) - Definition default (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [] => @@ -2519,7 +2717,7 @@ Module hash. "new_with_keys", [] |), - [ Value.Integer Integer.U64 0; Value.Integer Integer.U64 0 ] + [ M.of_value (| Value.Integer 0 |); M.of_value (| Value.Integer 0 |) ] |))) | _, _ => M.impossible end. @@ -2547,7 +2745,7 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::Sip13Rounds". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2555,7 +2753,7 @@ Module hash. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Sip13Rounds" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Sip13Rounds" |) |) ] |))) | _, _ => M.impossible end. @@ -2572,12 +2770,12 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::Sip13Rounds". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::hash::sip::Sip13Rounds" [])) + M.of_value (| Value.StructTuple "core::hash::sip::Sip13Rounds" [] |))) | _, _ => M.impossible end. @@ -2593,9 +2791,10 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::Sip13Rounds". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "core::hash::sip::Sip13Rounds" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "core::hash::sip::Sip13Rounds" [] |))) | _, _ => M.impossible end. @@ -2615,7 +2814,7 @@ Module hash. compress!(state); } *) - Definition c_rounds (τ : list Ty.t) (α : list Value.t) : M := + Definition c_rounds (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ state ] => ltac:(M.monadic @@ -2666,7 +2865,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -2679,15 +2878,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -2706,7 +2906,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -2754,7 +2954,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -2767,15 +2967,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -2821,7 +3022,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -2834,15 +3035,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -2888,7 +3090,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -2901,15 +3103,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -2928,12 +3131,12 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2945,7 +3148,7 @@ Module hash. compress!(state); } *) - Definition d_rounds (τ : list Ty.t) (α : list Value.t) : M := + Definition d_rounds (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ state ] => ltac:(M.monadic @@ -2996,7 +3199,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -3009,15 +3212,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3036,7 +3240,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -3084,7 +3288,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -3097,15 +3301,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3151,7 +3356,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -3164,15 +3369,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3218,7 +3424,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -3231,15 +3437,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3258,11 +3465,11 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.write (| @@ -3308,7 +3515,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -3321,15 +3528,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3348,7 +3556,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -3396,7 +3604,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -3409,15 +3617,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3463,7 +3672,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -3476,15 +3685,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3530,7 +3740,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -3543,15 +3753,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3570,11 +3781,11 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.write (| @@ -3620,7 +3831,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -3633,15 +3844,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3660,7 +3872,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -3708,7 +3920,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -3721,15 +3933,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3775,7 +3988,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -3788,15 +4001,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3842,7 +4056,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -3855,15 +4069,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -3882,12 +4097,12 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3913,7 +4128,7 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::Sip24Rounds". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3921,7 +4136,7 @@ Module hash. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Sip24Rounds" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Sip24Rounds" |) |) ] |))) | _, _ => M.impossible end. @@ -3938,12 +4153,12 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::Sip24Rounds". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::hash::sip::Sip24Rounds" [])) + M.of_value (| Value.StructTuple "core::hash::sip::Sip24Rounds" [] |))) | _, _ => M.impossible end. @@ -3959,9 +4174,10 @@ Module hash. Definition Self : Ty.t := Ty.path "core::hash::sip::Sip24Rounds". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "core::hash::sip::Sip24Rounds" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "core::hash::sip::Sip24Rounds" [] |))) | _, _ => M.impossible end. @@ -3982,7 +4198,7 @@ Module hash. compress!(state); } *) - Definition c_rounds (τ : list Ty.t) (α : list Value.t) : M := + Definition c_rounds (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ state ] => ltac:(M.monadic @@ -4033,7 +4249,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -4046,15 +4262,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4073,7 +4290,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -4121,7 +4338,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -4134,15 +4351,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4188,7 +4406,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -4201,15 +4419,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4255,7 +4474,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -4268,15 +4487,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4295,11 +4515,11 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.write (| @@ -4345,7 +4565,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -4358,15 +4578,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4385,7 +4606,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -4433,7 +4654,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -4446,15 +4667,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4500,7 +4722,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -4513,15 +4735,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4567,7 +4790,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -4580,15 +4803,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4607,12 +4831,12 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4625,7 +4849,7 @@ Module hash. compress!(state); } *) - Definition d_rounds (τ : list Ty.t) (α : list Value.t) : M := + Definition d_rounds (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ state ] => ltac:(M.monadic @@ -4676,7 +4900,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -4689,15 +4913,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4716,7 +4941,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -4764,7 +4989,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -4777,15 +5002,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4831,7 +5057,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -4844,15 +5070,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4898,7 +5125,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -4911,15 +5138,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -4938,11 +5166,11 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.write (| @@ -4988,7 +5216,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -5001,15 +5229,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5028,7 +5257,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -5076,7 +5305,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -5089,15 +5318,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5143,7 +5373,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -5156,15 +5386,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5210,7 +5441,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -5223,15 +5454,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5250,11 +5482,11 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.write (| @@ -5300,7 +5532,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -5313,15 +5545,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5340,7 +5573,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -5388,7 +5621,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -5401,15 +5634,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5455,7 +5689,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -5468,15 +5702,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5522,7 +5757,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -5535,15 +5770,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5562,11 +5798,11 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.write (| @@ -5612,7 +5848,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 13 + M.of_value (| Value.Integer 13 |) ] |) |) in @@ -5625,15 +5861,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5652,7 +5889,7 @@ Module hash. "v0" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in @@ -5700,7 +5937,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 16 + M.of_value (| Value.Integer 16 |) ] |) |) in @@ -5713,15 +5950,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5767,7 +6005,7 @@ Module hash. "v3" |) |); - Value.Integer Integer.U32 21 + M.of_value (| Value.Integer 21 |) ] |) |) in @@ -5780,15 +6018,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v0" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5834,7 +6073,7 @@ Module hash. "v1" |) |); - Value.Integer Integer.U32 17 + M.of_value (| Value.Integer 17 |) ] |) |) in @@ -5847,15 +6086,16 @@ Module hash. |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_xor (| + M.read (| β |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| state |), "core::hash::sip::State", "v2" |) - |)) + |) + |) |) in let _ := M.write (| @@ -5874,12 +6114,12 @@ Module hash. "v2" |) |); - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/hint.v b/CoqOfRust/core/hint.v index f857ae0c1..bd25abd66 100644 --- a/CoqOfRust/core/hint.v +++ b/CoqOfRust/core/hint.v @@ -12,18 +12,18 @@ Module hint. } } *) - Definition unreachable_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition unreachable_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -38,14 +38,14 @@ Module hint. ] |), [ - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.get_function (| "core::hint::unreachable_unchecked.comptime", [] |); M.get_function (| "core::hint::unreachable_unchecked.runtime", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -93,7 +93,7 @@ Module hint. } } *) - Definition spin_loop (τ : list Ty.t) (α : list Value.t) : M := + Definition spin_loop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -105,7 +105,7 @@ Module hint. [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -115,7 +115,7 @@ Module hint. crate::intrinsics::black_box(dummy) } *) - Definition black_box (τ : list Ty.t) (α : list Value.t) : M := + Definition black_box (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dummy ] => ltac:(M.monadic @@ -132,7 +132,7 @@ Module hint. value } *) - Definition must_use (τ : list Ty.t) (α : list Value.t) : M := + Definition must_use (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ value ] => ltac:(M.monadic diff --git a/CoqOfRust/core/internal_macros.v b/CoqOfRust/core/internal_macros.v index 8b67c40a1..30c879844 100644 --- a/CoqOfRust/core/internal_macros.v +++ b/CoqOfRust/core/internal_macros.v @@ -14,7 +14,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -52,7 +52,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -90,7 +90,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -128,7 +128,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -167,7 +167,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -206,7 +206,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -249,7 +249,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -290,7 +290,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -338,7 +338,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -381,7 +381,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -402,7 +402,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -430,7 +430,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -450,7 +450,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -477,7 +477,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -518,7 +518,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -566,7 +566,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -609,7 +609,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -630,7 +630,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -658,7 +658,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -678,7 +678,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -705,7 +705,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -746,7 +746,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -794,7 +794,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -837,7 +837,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -858,7 +858,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -886,7 +886,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -906,7 +906,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -933,7 +933,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -974,7 +974,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1022,7 +1022,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1065,7 +1065,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1086,7 +1086,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1114,7 +1114,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1134,7 +1134,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1161,7 +1161,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1202,7 +1202,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1250,7 +1250,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1293,7 +1293,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1314,7 +1314,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1342,7 +1342,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1362,7 +1362,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1389,7 +1389,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1430,7 +1430,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1471,7 +1471,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1519,7 +1519,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1562,7 +1562,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1583,7 +1583,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1611,7 +1611,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1631,7 +1631,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1658,7 +1658,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1699,7 +1699,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1747,7 +1747,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1790,7 +1790,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1811,7 +1811,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1839,7 +1839,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1859,7 +1859,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1886,7 +1886,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1927,7 +1927,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1975,7 +1975,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2018,7 +2018,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2039,7 +2039,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2067,7 +2067,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2087,7 +2087,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2114,7 +2114,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2155,7 +2155,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2203,7 +2203,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2246,7 +2246,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2266,7 +2266,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2294,7 +2294,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2314,7 +2314,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2341,7 +2341,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2382,7 +2382,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2430,7 +2430,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2473,7 +2473,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2493,7 +2493,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2521,7 +2521,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2541,7 +2541,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2568,7 +2568,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2609,7 +2609,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2657,7 +2657,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2700,7 +2700,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2720,7 +2720,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2748,7 +2748,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2768,7 +2768,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2795,7 +2795,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2836,7 +2836,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2884,7 +2884,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2927,7 +2927,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2947,7 +2947,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2975,7 +2975,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2995,7 +2995,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3022,7 +3022,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3063,7 +3063,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3111,7 +3111,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3154,7 +3154,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3174,7 +3174,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3202,7 +3202,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3222,7 +3222,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3249,7 +3249,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3290,7 +3290,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3331,7 +3331,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3379,7 +3379,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3422,7 +3422,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3442,7 +3442,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3470,7 +3470,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3490,7 +3490,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3517,7 +3517,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3558,7 +3558,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3606,7 +3606,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3649,7 +3649,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3669,7 +3669,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3697,7 +3697,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3717,7 +3717,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3744,7 +3744,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3785,7 +3785,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3833,7 +3833,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3876,7 +3876,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3896,7 +3896,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3924,7 +3924,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3944,7 +3944,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3971,7 +3971,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4012,7 +4012,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4060,7 +4060,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4103,7 +4103,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4123,7 +4123,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4151,7 +4151,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4171,7 +4171,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4198,7 +4198,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4239,7 +4239,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4287,7 +4287,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4330,7 +4330,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4350,7 +4350,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4378,7 +4378,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4398,7 +4398,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4425,7 +4425,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4466,7 +4466,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4514,7 +4514,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4557,7 +4557,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4577,7 +4577,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4605,7 +4605,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4625,7 +4625,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4652,7 +4652,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4693,7 +4693,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4741,7 +4741,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4784,7 +4784,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4804,7 +4804,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4832,7 +4832,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4852,7 +4852,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4879,7 +4879,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4920,7 +4920,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4968,7 +4968,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5011,7 +5011,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5031,7 +5031,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5059,7 +5059,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5079,7 +5079,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5106,7 +5106,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5147,7 +5147,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5188,7 +5188,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5236,7 +5236,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5279,7 +5279,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5299,7 +5299,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5327,7 +5327,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5347,7 +5347,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5374,7 +5374,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5415,7 +5415,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5463,7 +5463,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5506,7 +5506,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5526,7 +5526,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5554,7 +5554,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5574,7 +5574,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5601,7 +5601,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5642,7 +5642,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5690,7 +5690,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5733,7 +5733,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5753,7 +5753,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5781,7 +5781,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5801,7 +5801,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5828,7 +5828,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5869,7 +5869,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5917,7 +5917,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5960,7 +5960,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5980,7 +5980,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6008,7 +6008,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6028,7 +6028,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6055,7 +6055,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6096,7 +6096,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6144,7 +6144,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6187,7 +6187,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6207,7 +6207,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6235,7 +6235,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6255,7 +6255,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6282,7 +6282,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6323,7 +6323,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6371,7 +6371,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6414,7 +6414,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6434,7 +6434,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6462,7 +6462,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6482,7 +6482,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6509,7 +6509,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6550,7 +6550,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6598,7 +6598,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6641,7 +6641,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6661,7 +6661,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6689,7 +6689,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6709,7 +6709,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6736,7 +6736,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6777,7 +6777,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6825,7 +6825,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6868,7 +6868,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6888,7 +6888,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6916,7 +6916,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6936,7 +6936,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6963,7 +6963,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7004,7 +7004,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7045,7 +7045,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7093,7 +7093,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7136,7 +7136,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7156,7 +7156,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7184,7 +7184,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7204,7 +7204,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7231,7 +7231,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7272,7 +7272,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7320,7 +7320,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7363,7 +7363,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7383,7 +7383,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7411,7 +7411,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7431,7 +7431,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7458,7 +7458,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7499,7 +7499,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7547,7 +7547,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7590,7 +7590,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7610,7 +7610,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7638,7 +7638,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7658,7 +7658,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7685,7 +7685,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7726,7 +7726,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7774,7 +7774,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7817,7 +7817,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7837,7 +7837,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7865,7 +7865,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7885,7 +7885,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7912,7 +7912,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7953,7 +7953,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8001,7 +8001,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8044,7 +8044,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8064,7 +8064,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8092,7 +8092,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8112,7 +8112,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8139,7 +8139,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8180,7 +8180,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8228,7 +8228,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8271,7 +8271,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8291,7 +8291,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8319,7 +8319,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8339,7 +8339,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8366,7 +8366,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8407,7 +8407,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8455,7 +8455,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8498,7 +8498,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8518,7 +8518,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8546,7 +8546,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8566,7 +8566,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8593,7 +8593,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8634,7 +8634,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8682,7 +8682,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8725,7 +8725,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8745,7 +8745,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8773,7 +8773,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8793,7 +8793,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8820,7 +8820,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8861,7 +8861,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8902,7 +8902,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8950,7 +8950,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8993,7 +8993,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9013,7 +9013,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9041,7 +9041,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9061,7 +9061,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9088,7 +9088,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9129,7 +9129,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9177,7 +9177,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9220,7 +9220,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9240,7 +9240,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9268,7 +9268,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9288,7 +9288,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9315,7 +9315,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9356,7 +9356,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9404,7 +9404,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9447,7 +9447,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9467,7 +9467,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9495,7 +9495,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9515,7 +9515,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9542,7 +9542,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9583,7 +9583,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9631,7 +9631,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9674,7 +9674,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9694,7 +9694,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9722,7 +9722,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9742,7 +9742,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9769,7 +9769,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9810,7 +9810,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9858,7 +9858,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9901,7 +9901,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9921,7 +9921,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9949,7 +9949,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9969,7 +9969,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9996,7 +9996,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10037,7 +10037,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10085,7 +10085,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10128,7 +10128,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10148,7 +10148,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10176,7 +10176,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10196,7 +10196,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10223,7 +10223,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10264,7 +10264,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10312,7 +10312,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10355,7 +10355,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10375,7 +10375,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10403,7 +10403,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10423,7 +10423,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10450,7 +10450,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10491,7 +10491,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10539,7 +10539,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10582,7 +10582,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10602,7 +10602,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10630,7 +10630,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10650,7 +10650,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10677,7 +10677,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10718,7 +10718,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10759,7 +10759,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10807,7 +10807,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10850,7 +10850,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10870,7 +10870,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10898,7 +10898,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10918,7 +10918,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10945,7 +10945,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10986,7 +10986,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11034,7 +11034,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11077,7 +11077,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11097,7 +11097,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11125,7 +11125,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11145,7 +11145,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11172,7 +11172,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11213,7 +11213,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11261,7 +11261,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11304,7 +11304,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11324,7 +11324,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11352,7 +11352,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11372,7 +11372,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11399,7 +11399,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11440,7 +11440,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11488,7 +11488,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11531,7 +11531,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11552,7 +11552,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11580,7 +11580,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11600,7 +11600,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11627,7 +11627,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11668,7 +11668,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11716,7 +11716,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11759,7 +11759,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11780,7 +11780,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11808,7 +11808,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11828,7 +11828,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11855,7 +11855,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11896,7 +11896,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11944,7 +11944,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11987,7 +11987,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12008,7 +12008,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12036,7 +12036,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12056,7 +12056,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12083,7 +12083,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12124,7 +12124,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12172,7 +12172,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12215,7 +12215,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12236,7 +12236,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12264,7 +12264,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12284,7 +12284,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12311,7 +12311,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12352,7 +12352,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12400,7 +12400,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12443,7 +12443,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12464,7 +12464,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12492,7 +12492,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12512,7 +12512,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12539,7 +12539,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -12580,7 +12580,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12621,7 +12621,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12669,7 +12669,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12712,7 +12712,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12733,7 +12733,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12761,7 +12761,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12781,7 +12781,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12808,7 +12808,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12849,7 +12849,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12897,7 +12897,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12940,7 +12940,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12961,7 +12961,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12989,7 +12989,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13009,7 +13009,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13036,7 +13036,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13077,7 +13077,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13125,7 +13125,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13168,7 +13168,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13189,7 +13189,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13217,7 +13217,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13237,7 +13237,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13264,7 +13264,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13305,7 +13305,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13353,7 +13353,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13396,7 +13396,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13416,7 +13416,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13444,7 +13444,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13464,7 +13464,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13491,7 +13491,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13532,7 +13532,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13580,7 +13580,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13623,7 +13623,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13643,7 +13643,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13671,7 +13671,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13691,7 +13691,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13718,7 +13718,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13759,7 +13759,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13807,7 +13807,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13850,7 +13850,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13870,7 +13870,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13898,7 +13898,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13918,7 +13918,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13945,7 +13945,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13986,7 +13986,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14034,7 +14034,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14077,7 +14077,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14097,7 +14097,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14125,7 +14125,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14145,7 +14145,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14172,7 +14172,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14213,7 +14213,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14261,7 +14261,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14304,7 +14304,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14324,7 +14324,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14352,7 +14352,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14372,7 +14372,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14399,7 +14399,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14440,7 +14440,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14481,7 +14481,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14529,7 +14529,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14572,7 +14572,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14592,7 +14592,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14620,7 +14620,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14640,7 +14640,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14667,7 +14667,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14708,7 +14708,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14756,7 +14756,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14799,7 +14799,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14819,7 +14819,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14847,7 +14847,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14867,7 +14867,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14894,7 +14894,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14935,7 +14935,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14983,7 +14983,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15026,7 +15026,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15046,7 +15046,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15074,7 +15074,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15094,7 +15094,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15121,7 +15121,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15162,7 +15162,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15210,7 +15210,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15253,7 +15253,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15273,7 +15273,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15301,7 +15301,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15321,7 +15321,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15348,7 +15348,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15389,7 +15389,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15437,7 +15437,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15480,7 +15480,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15500,7 +15500,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15528,7 +15528,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15548,7 +15548,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15575,7 +15575,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15616,7 +15616,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15664,7 +15664,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15707,7 +15707,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15727,7 +15727,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15755,7 +15755,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15775,7 +15775,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15802,7 +15802,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15843,7 +15843,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15891,7 +15891,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15934,7 +15934,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15954,7 +15954,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15982,7 +15982,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16002,7 +16002,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16029,7 +16029,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16070,7 +16070,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16118,7 +16118,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16161,7 +16161,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16181,7 +16181,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16209,7 +16209,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16229,7 +16229,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16256,7 +16256,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16297,7 +16297,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16338,7 +16338,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16386,7 +16386,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16429,7 +16429,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16449,7 +16449,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16477,7 +16477,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16497,7 +16497,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16524,7 +16524,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16565,7 +16565,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16613,7 +16613,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16656,7 +16656,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16676,7 +16676,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16704,7 +16704,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16724,7 +16724,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16751,7 +16751,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16792,7 +16792,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16840,7 +16840,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16883,7 +16883,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16903,7 +16903,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16931,7 +16931,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16951,7 +16951,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16978,7 +16978,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17019,7 +17019,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17067,7 +17067,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17110,7 +17110,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17130,7 +17130,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17158,7 +17158,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17178,7 +17178,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17205,7 +17205,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17246,7 +17246,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17294,7 +17294,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17337,7 +17337,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17357,7 +17357,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17385,7 +17385,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17405,7 +17405,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17432,7 +17432,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17473,7 +17473,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17521,7 +17521,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17564,7 +17564,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17584,7 +17584,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17612,7 +17612,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17632,7 +17632,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17659,7 +17659,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17700,7 +17700,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17748,7 +17748,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17791,7 +17791,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17811,7 +17811,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17839,7 +17839,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17859,7 +17859,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17886,7 +17886,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17927,7 +17927,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17975,7 +17975,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18018,7 +18018,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18038,7 +18038,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -18066,7 +18066,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18086,7 +18086,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -18113,7 +18113,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18154,7 +18154,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18195,7 +18195,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18243,7 +18243,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18286,7 +18286,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18306,7 +18306,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -18334,7 +18334,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18354,7 +18354,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -18381,7 +18381,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18422,7 +18422,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18470,7 +18470,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18513,7 +18513,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18533,7 +18533,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -18561,7 +18561,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18581,7 +18581,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -18608,7 +18608,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18649,7 +18649,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18697,7 +18697,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18740,7 +18740,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18760,7 +18760,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -18788,7 +18788,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18808,7 +18808,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -18835,7 +18835,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18876,7 +18876,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18924,7 +18924,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18967,7 +18967,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18987,7 +18987,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19015,7 +19015,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19035,7 +19035,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19062,7 +19062,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19103,7 +19103,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19151,7 +19151,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19194,7 +19194,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19214,7 +19214,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19242,7 +19242,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19262,7 +19262,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19289,7 +19289,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19330,7 +19330,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19378,7 +19378,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19421,7 +19421,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19441,7 +19441,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19469,7 +19469,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19489,7 +19489,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19516,7 +19516,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19557,7 +19557,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19605,7 +19605,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19648,7 +19648,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19668,7 +19668,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19696,7 +19696,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19716,7 +19716,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19743,7 +19743,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19784,7 +19784,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19832,7 +19832,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19875,7 +19875,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19895,7 +19895,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19923,7 +19923,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19943,7 +19943,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19970,7 +19970,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20011,7 +20011,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20052,7 +20052,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20100,7 +20100,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20143,7 +20143,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20163,7 +20163,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -20191,7 +20191,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20211,7 +20211,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -20238,7 +20238,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20279,7 +20279,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20327,7 +20327,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20370,7 +20370,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20390,7 +20390,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -20418,7 +20418,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20438,7 +20438,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -20465,7 +20465,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20506,7 +20506,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20554,7 +20554,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20597,7 +20597,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20617,7 +20617,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -20645,7 +20645,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20665,7 +20665,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -20692,7 +20692,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20733,7 +20733,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20781,7 +20781,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20824,7 +20824,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20844,7 +20844,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -20872,7 +20872,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20892,7 +20892,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -20919,7 +20919,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20960,7 +20960,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21008,7 +21008,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21051,7 +21051,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21071,7 +21071,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21099,7 +21099,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21119,7 +21119,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21146,7 +21146,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21187,7 +21187,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21235,7 +21235,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21278,7 +21278,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21298,7 +21298,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21326,7 +21326,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21346,7 +21346,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21373,7 +21373,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21414,7 +21414,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21462,7 +21462,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21505,7 +21505,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21525,7 +21525,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21553,7 +21553,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21573,7 +21573,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21600,7 +21600,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21641,7 +21641,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21689,7 +21689,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21732,7 +21732,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21752,7 +21752,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21780,7 +21780,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21800,7 +21800,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21827,7 +21827,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21868,7 +21868,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21909,7 +21909,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21957,7 +21957,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22000,7 +22000,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22020,7 +22020,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -22048,7 +22048,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22068,7 +22068,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -22095,7 +22095,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22136,7 +22136,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22184,7 +22184,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22227,7 +22227,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22247,7 +22247,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -22275,7 +22275,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22295,7 +22295,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -22322,7 +22322,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22363,7 +22363,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22411,7 +22411,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22454,7 +22454,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22474,7 +22474,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -22502,7 +22502,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22522,7 +22522,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -22549,7 +22549,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22590,7 +22590,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22631,7 +22631,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22672,7 +22672,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22713,7 +22713,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22754,7 +22754,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22797,7 +22797,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22836,7 +22836,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22878,7 +22878,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22914,7 +22914,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -22934,7 +22934,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -22961,7 +22961,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23000,7 +23000,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23042,7 +23042,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23078,7 +23078,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23098,7 +23098,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -23125,7 +23125,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23165,7 +23165,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23207,7 +23207,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23244,7 +23244,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23264,7 +23264,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -23291,7 +23291,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23331,7 +23331,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23373,7 +23373,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23410,7 +23410,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23430,7 +23430,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -23457,7 +23457,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23497,7 +23497,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23539,7 +23539,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23576,7 +23576,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23596,7 +23596,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -23623,7 +23623,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23663,7 +23663,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23705,7 +23705,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23742,7 +23742,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23762,7 +23762,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -23789,7 +23789,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23829,7 +23829,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23871,7 +23871,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23908,7 +23908,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23928,7 +23928,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -23955,7 +23955,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23995,7 +23995,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24037,7 +24037,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24074,7 +24074,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24094,7 +24094,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -24121,7 +24121,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24161,7 +24161,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24203,7 +24203,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24240,7 +24240,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24260,7 +24260,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -24287,7 +24287,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24327,7 +24327,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24369,7 +24369,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24406,7 +24406,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24426,7 +24426,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -24453,7 +24453,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24493,7 +24493,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24535,7 +24535,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24572,7 +24572,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24592,7 +24592,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -24619,7 +24619,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24659,7 +24659,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24701,7 +24701,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24738,7 +24738,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24758,7 +24758,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -24785,7 +24785,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24824,7 +24824,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24866,7 +24866,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24902,7 +24902,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24922,7 +24922,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -24949,7 +24949,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24988,7 +24988,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25030,7 +25030,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25066,7 +25066,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25086,7 +25086,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -25113,7 +25113,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25153,7 +25153,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25195,7 +25195,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25232,7 +25232,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25252,7 +25252,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -25279,7 +25279,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25319,7 +25319,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25361,7 +25361,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25398,7 +25398,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25418,7 +25418,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -25445,7 +25445,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25485,7 +25485,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25527,7 +25527,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25564,7 +25564,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25584,7 +25584,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -25611,7 +25611,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25651,7 +25651,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25693,7 +25693,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25730,7 +25730,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25750,7 +25750,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -25777,7 +25777,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25817,7 +25817,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25859,7 +25859,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25896,7 +25896,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25916,7 +25916,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -25943,7 +25943,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -25983,7 +25983,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26025,7 +26025,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26062,7 +26062,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26082,7 +26082,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -26109,7 +26109,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26149,7 +26149,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26191,7 +26191,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26228,7 +26228,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26248,7 +26248,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -26275,7 +26275,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26315,7 +26315,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26357,7 +26357,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26394,7 +26394,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26414,7 +26414,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -26441,7 +26441,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26481,7 +26481,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26523,7 +26523,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26560,7 +26560,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26580,7 +26580,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -26607,7 +26607,7 @@ Module num. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26647,7 +26647,7 @@ Module num. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26689,7 +26689,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26726,7 +26726,7 @@ Module num. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26746,7 +26746,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -26773,7 +26773,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26814,7 +26814,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26862,7 +26862,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26905,7 +26905,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26925,7 +26925,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -26953,7 +26953,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -26973,7 +26973,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -27000,7 +27000,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27041,7 +27041,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27089,7 +27089,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27132,7 +27132,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27152,7 +27152,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -27180,7 +27180,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27200,7 +27200,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -27227,7 +27227,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27268,7 +27268,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27316,7 +27316,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27359,7 +27359,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27379,7 +27379,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -27407,7 +27407,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27427,7 +27427,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -27454,7 +27454,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27495,7 +27495,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27543,7 +27543,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27586,7 +27586,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27606,7 +27606,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -27634,7 +27634,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27654,7 +27654,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -27681,7 +27681,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27722,7 +27722,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27770,7 +27770,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27813,7 +27813,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27833,7 +27833,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -27861,7 +27861,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27881,7 +27881,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -27908,7 +27908,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -27949,7 +27949,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -27990,7 +27990,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28038,7 +28038,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28081,7 +28081,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28101,7 +28101,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -28129,7 +28129,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28149,7 +28149,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -28176,7 +28176,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28217,7 +28217,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28265,7 +28265,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28308,7 +28308,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28328,7 +28328,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -28356,7 +28356,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28376,7 +28376,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -28403,7 +28403,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28444,7 +28444,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28492,7 +28492,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28535,7 +28535,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28555,7 +28555,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -28583,7 +28583,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28603,7 +28603,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -28630,7 +28630,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -28671,7 +28671,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28711,7 +28711,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28759,7 +28759,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28801,7 +28801,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28821,7 +28821,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -28848,7 +28848,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28868,7 +28868,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -28895,7 +28895,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28935,7 +28935,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -28983,7 +28983,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29025,7 +29025,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29045,7 +29045,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -29072,7 +29072,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29092,7 +29092,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -29119,7 +29119,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29159,7 +29159,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29207,7 +29207,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29249,7 +29249,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29269,7 +29269,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -29296,7 +29296,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29316,7 +29316,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -29343,7 +29343,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29383,7 +29383,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29431,7 +29431,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29473,7 +29473,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29493,7 +29493,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -29520,7 +29520,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29540,7 +29540,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -29567,7 +29567,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29607,7 +29607,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29655,7 +29655,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29697,7 +29697,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29717,7 +29717,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -29744,7 +29744,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29764,7 +29764,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -29791,7 +29791,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -29832,7 +29832,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29872,7 +29872,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29920,7 +29920,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29962,7 +29962,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29982,7 +29982,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30009,7 +30009,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30029,7 +30029,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30056,7 +30056,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30096,7 +30096,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30144,7 +30144,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30186,7 +30186,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30206,7 +30206,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30233,7 +30233,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30253,7 +30253,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30280,7 +30280,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30320,7 +30320,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30368,7 +30368,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30410,7 +30410,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30430,7 +30430,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30457,7 +30457,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30477,7 +30477,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30504,7 +30504,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30545,7 +30545,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30586,7 +30586,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30634,7 +30634,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30677,7 +30677,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30697,7 +30697,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30725,7 +30725,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30745,7 +30745,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30772,7 +30772,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30813,7 +30813,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30861,7 +30861,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30904,7 +30904,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30924,7 +30924,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30952,7 +30952,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -30972,7 +30972,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -30999,7 +30999,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31040,7 +31040,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31088,7 +31088,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31131,7 +31131,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31151,7 +31151,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -31179,7 +31179,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31199,7 +31199,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -31226,7 +31226,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31267,7 +31267,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31315,7 +31315,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31358,7 +31358,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31378,7 +31378,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -31406,7 +31406,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31426,7 +31426,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -31453,7 +31453,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31494,7 +31494,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31542,7 +31542,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31585,7 +31585,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31605,7 +31605,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -31633,7 +31633,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31653,7 +31653,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -31680,7 +31680,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -31721,7 +31721,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31762,7 +31762,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31810,7 +31810,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31853,7 +31853,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31873,7 +31873,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -31901,7 +31901,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31921,7 +31921,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -31948,7 +31948,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -31989,7 +31989,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32037,7 +32037,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32080,7 +32080,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32100,7 +32100,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -32128,7 +32128,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32148,7 +32148,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -32175,7 +32175,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32216,7 +32216,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32264,7 +32264,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32307,7 +32307,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32327,7 +32327,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -32355,7 +32355,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32375,7 +32375,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -32402,7 +32402,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -32443,7 +32443,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32484,7 +32484,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32532,7 +32532,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32575,7 +32575,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32595,7 +32595,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -32623,7 +32623,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32643,7 +32643,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -32670,7 +32670,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32711,7 +32711,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32759,7 +32759,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32802,7 +32802,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32822,7 +32822,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -32850,7 +32850,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32870,7 +32870,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -32897,7 +32897,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32938,7 +32938,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -32986,7 +32986,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33029,7 +33029,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33049,7 +33049,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -33077,7 +33077,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33097,7 +33097,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -33124,7 +33124,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33165,7 +33165,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33213,7 +33213,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33256,7 +33256,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33276,7 +33276,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -33304,7 +33304,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33324,7 +33324,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -33351,7 +33351,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33392,7 +33392,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33440,7 +33440,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33483,7 +33483,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33503,7 +33503,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -33531,7 +33531,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33551,7 +33551,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -33578,7 +33578,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -33619,7 +33619,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33660,7 +33660,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33708,7 +33708,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33751,7 +33751,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33771,7 +33771,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -33799,7 +33799,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33819,7 +33819,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -33846,7 +33846,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33887,7 +33887,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33935,7 +33935,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33978,7 +33978,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33998,7 +33998,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34026,7 +34026,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34046,7 +34046,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34073,7 +34073,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34114,7 +34114,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34162,7 +34162,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34205,7 +34205,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34225,7 +34225,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34253,7 +34253,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34273,7 +34273,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34300,7 +34300,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34341,7 +34341,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34382,7 +34382,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34430,7 +34430,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34473,7 +34473,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34493,7 +34493,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34521,7 +34521,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34541,7 +34541,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34568,7 +34568,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34609,7 +34609,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34657,7 +34657,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34700,7 +34700,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34720,7 +34720,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34748,7 +34748,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34768,7 +34768,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34795,7 +34795,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34836,7 +34836,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34884,7 +34884,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34927,7 +34927,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34947,7 +34947,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34975,7 +34975,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -34995,7 +34995,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -35022,7 +35022,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35063,7 +35063,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35111,7 +35111,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35154,7 +35154,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35174,7 +35174,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -35202,7 +35202,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35222,7 +35222,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -35249,7 +35249,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35290,7 +35290,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35338,7 +35338,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35381,7 +35381,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35401,7 +35401,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -35429,7 +35429,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35449,7 +35449,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -35476,7 +35476,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35517,7 +35517,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35558,7 +35558,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35606,7 +35606,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35649,7 +35649,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35669,7 +35669,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -35697,7 +35697,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35717,7 +35717,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -35744,7 +35744,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35785,7 +35785,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35833,7 +35833,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35876,7 +35876,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35896,7 +35896,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -35924,7 +35924,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -35944,7 +35944,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -35971,7 +35971,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36012,7 +36012,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36060,7 +36060,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36103,7 +36103,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36123,7 +36123,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -36151,7 +36151,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36171,7 +36171,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -36198,7 +36198,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -36239,7 +36239,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36280,7 +36280,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36328,7 +36328,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36371,7 +36371,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36391,7 +36391,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -36419,7 +36419,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36439,7 +36439,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -36466,7 +36466,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36507,7 +36507,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36555,7 +36555,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36598,7 +36598,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36618,7 +36618,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -36646,7 +36646,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36666,7 +36666,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -36693,7 +36693,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36734,7 +36734,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36782,7 +36782,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36825,7 +36825,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36845,7 +36845,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -36873,7 +36873,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36893,7 +36893,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -36920,7 +36920,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -36961,7 +36961,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37009,7 +37009,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37052,7 +37052,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37072,7 +37072,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -37100,7 +37100,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37120,7 +37120,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -37147,7 +37147,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37188,7 +37188,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37236,7 +37236,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37279,7 +37279,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37299,7 +37299,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -37327,7 +37327,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37347,7 +37347,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -37374,7 +37374,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -37415,7 +37415,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37456,7 +37456,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37504,7 +37504,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37547,7 +37547,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37567,7 +37567,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -37595,7 +37595,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37615,7 +37615,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -37642,7 +37642,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37683,7 +37683,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37731,7 +37731,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37774,7 +37774,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37794,7 +37794,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -37822,7 +37822,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37842,7 +37842,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -37869,7 +37869,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37910,7 +37910,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37958,7 +37958,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38001,7 +38001,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38021,7 +38021,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38049,7 +38049,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38069,7 +38069,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38096,7 +38096,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -38137,7 +38137,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38178,7 +38178,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38226,7 +38226,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38269,7 +38269,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38289,7 +38289,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38317,7 +38317,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38337,7 +38337,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38364,7 +38364,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38405,7 +38405,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38453,7 +38453,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38496,7 +38496,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38516,7 +38516,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38544,7 +38544,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38564,7 +38564,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38591,7 +38591,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38632,7 +38632,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38680,7 +38680,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38723,7 +38723,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38743,7 +38743,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38771,7 +38771,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38791,7 +38791,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38818,7 +38818,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38859,7 +38859,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38907,7 +38907,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38950,7 +38950,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -38970,7 +38970,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38998,7 +38998,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39018,7 +39018,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -39045,7 +39045,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39086,7 +39086,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39134,7 +39134,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39177,7 +39177,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39197,7 +39197,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -39225,7 +39225,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39245,7 +39245,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -39272,7 +39272,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39313,7 +39313,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39354,7 +39354,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39402,7 +39402,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39445,7 +39445,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39465,7 +39465,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -39493,7 +39493,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39513,7 +39513,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -39540,7 +39540,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39581,7 +39581,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39629,7 +39629,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39672,7 +39672,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39692,7 +39692,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -39720,7 +39720,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39740,7 +39740,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -39767,7 +39767,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39808,7 +39808,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39856,7 +39856,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39899,7 +39899,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39919,7 +39919,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -39947,7 +39947,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -39967,7 +39967,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -39994,7 +39994,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -40035,7 +40035,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40075,7 +40075,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40123,7 +40123,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40165,7 +40165,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40185,7 +40185,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -40212,7 +40212,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40232,7 +40232,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -40259,7 +40259,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40299,7 +40299,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40347,7 +40347,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40389,7 +40389,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40409,7 +40409,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -40436,7 +40436,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40456,7 +40456,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -40483,7 +40483,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40523,7 +40523,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40571,7 +40571,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40613,7 +40613,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40633,7 +40633,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -40660,7 +40660,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40680,7 +40680,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -40707,7 +40707,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40747,7 +40747,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40795,7 +40795,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40837,7 +40837,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40857,7 +40857,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -40884,7 +40884,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40904,7 +40904,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -40931,7 +40931,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -40971,7 +40971,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41019,7 +41019,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41061,7 +41061,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41081,7 +41081,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -41108,7 +41108,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41128,7 +41128,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -41155,7 +41155,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -41196,7 +41196,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41236,7 +41236,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41284,7 +41284,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41326,7 +41326,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41346,7 +41346,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -41373,7 +41373,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41393,7 +41393,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -41420,7 +41420,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41460,7 +41460,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41508,7 +41508,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41550,7 +41550,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41570,7 +41570,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -41597,7 +41597,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41617,7 +41617,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -41644,7 +41644,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41684,7 +41684,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41732,7 +41732,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41774,7 +41774,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41794,7 +41794,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -41821,7 +41821,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41841,7 +41841,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -41868,7 +41868,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -41909,7 +41909,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41950,7 +41950,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -41998,7 +41998,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42041,7 +42041,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42061,7 +42061,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42089,7 +42089,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42109,7 +42109,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42136,7 +42136,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42177,7 +42177,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42225,7 +42225,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42268,7 +42268,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42288,7 +42288,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42316,7 +42316,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42336,7 +42336,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42363,7 +42363,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42404,7 +42404,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42452,7 +42452,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42495,7 +42495,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42515,7 +42515,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42543,7 +42543,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42563,7 +42563,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42590,7 +42590,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42631,7 +42631,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42679,7 +42679,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42722,7 +42722,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42742,7 +42742,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42770,7 +42770,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42790,7 +42790,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42817,7 +42817,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42858,7 +42858,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42906,7 +42906,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42949,7 +42949,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42969,7 +42969,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42997,7 +42997,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43017,7 +43017,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -43044,7 +43044,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43085,7 +43085,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43126,7 +43126,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43174,7 +43174,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43217,7 +43217,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43237,7 +43237,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -43265,7 +43265,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43285,7 +43285,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -43312,7 +43312,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43353,7 +43353,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43401,7 +43401,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43444,7 +43444,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43464,7 +43464,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -43492,7 +43492,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43512,7 +43512,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -43539,7 +43539,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43580,7 +43580,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43628,7 +43628,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43671,7 +43671,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43691,7 +43691,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -43719,7 +43719,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43739,7 +43739,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -43766,7 +43766,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43807,7 +43807,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43848,7 +43848,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43896,7 +43896,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43939,7 +43939,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43959,7 +43959,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -43987,7 +43987,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44007,7 +44007,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44034,7 +44034,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44075,7 +44075,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44123,7 +44123,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44166,7 +44166,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44186,7 +44186,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44214,7 +44214,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44234,7 +44234,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44261,7 +44261,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44302,7 +44302,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44350,7 +44350,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44393,7 +44393,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44413,7 +44413,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44441,7 +44441,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44461,7 +44461,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44488,7 +44488,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44529,7 +44529,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44577,7 +44577,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44620,7 +44620,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44640,7 +44640,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44668,7 +44668,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44688,7 +44688,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44715,7 +44715,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44756,7 +44756,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44804,7 +44804,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44847,7 +44847,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44867,7 +44867,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44895,7 +44895,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -44915,7 +44915,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44942,7 +44942,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -44983,7 +44983,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45024,7 +45024,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45072,7 +45072,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45115,7 +45115,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45135,7 +45135,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -45163,7 +45163,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45183,7 +45183,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -45210,7 +45210,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45251,7 +45251,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45299,7 +45299,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45342,7 +45342,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45362,7 +45362,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -45390,7 +45390,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45410,7 +45410,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -45437,7 +45437,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45478,7 +45478,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45526,7 +45526,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45569,7 +45569,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45589,7 +45589,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -45617,7 +45617,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45637,7 +45637,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -45664,7 +45664,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -45705,7 +45705,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45746,7 +45746,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45794,7 +45794,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45837,7 +45837,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45857,7 +45857,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -45885,7 +45885,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45905,7 +45905,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -45932,7 +45932,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -45973,7 +45973,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46021,7 +46021,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46064,7 +46064,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46084,7 +46084,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -46112,7 +46112,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46132,7 +46132,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -46159,7 +46159,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46200,7 +46200,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46248,7 +46248,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46291,7 +46291,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46311,7 +46311,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -46339,7 +46339,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46359,7 +46359,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -46386,7 +46386,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46427,7 +46427,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46475,7 +46475,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46518,7 +46518,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46538,7 +46538,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -46566,7 +46566,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46586,7 +46586,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -46613,7 +46613,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46654,7 +46654,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46702,7 +46702,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46745,7 +46745,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46765,7 +46765,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -46793,7 +46793,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46813,7 +46813,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -46840,7 +46840,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -46881,7 +46881,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46922,7 +46922,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46970,7 +46970,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47013,7 +47013,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47033,7 +47033,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -47061,7 +47061,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47081,7 +47081,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -47108,7 +47108,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47149,7 +47149,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47197,7 +47197,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47240,7 +47240,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47260,7 +47260,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -47288,7 +47288,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47308,7 +47308,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -47335,7 +47335,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47376,7 +47376,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47424,7 +47424,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47467,7 +47467,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47487,7 +47487,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -47515,7 +47515,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47535,7 +47535,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -47562,7 +47562,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47603,7 +47603,7 @@ Module num. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47644,7 +47644,7 @@ Module num. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47692,7 +47692,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47735,7 +47735,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47755,7 +47755,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -47783,7 +47783,7 @@ Module num. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47803,7 +47803,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -47830,7 +47830,7 @@ Module num. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47871,7 +47871,7 @@ Module num. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47919,7 +47919,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47962,7 +47962,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -47982,7 +47982,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48010,7 +48010,7 @@ Module num. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48030,7 +48030,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48057,7 +48057,7 @@ Module num. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48098,7 +48098,7 @@ Module num. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48146,7 +48146,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48189,7 +48189,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48209,7 +48209,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48237,7 +48237,7 @@ Module num. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48257,7 +48257,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48284,7 +48284,7 @@ Module num. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48325,7 +48325,7 @@ Module num. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48373,7 +48373,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48416,7 +48416,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48436,7 +48436,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48464,7 +48464,7 @@ Module num. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48484,7 +48484,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48511,7 +48511,7 @@ Module num. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48552,7 +48552,7 @@ Module num. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48600,7 +48600,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48643,7 +48643,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48663,7 +48663,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48691,7 +48691,7 @@ Module num. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48711,7 +48711,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48738,7 +48738,7 @@ Module num. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -48779,7 +48779,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48820,7 +48820,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48868,7 +48868,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48911,7 +48911,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48931,7 +48931,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48959,7 +48959,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -48979,7 +48979,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -49006,7 +49006,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49047,7 +49047,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49095,7 +49095,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49138,7 +49138,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49158,7 +49158,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -49186,7 +49186,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49206,7 +49206,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -49233,7 +49233,7 @@ Module num. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49274,7 +49274,7 @@ Module num. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49322,7 +49322,7 @@ Module num. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49365,7 +49365,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49385,7 +49385,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -49413,7 +49413,7 @@ Module num. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49433,7 +49433,7 @@ Module num. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -49460,7 +49460,7 @@ Module num. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -49502,7 +49502,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49541,7 +49541,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49580,7 +49580,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49619,7 +49619,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49658,7 +49658,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49697,7 +49697,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49736,7 +49736,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49775,7 +49775,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49814,7 +49814,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49853,7 +49853,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49892,7 +49892,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49931,7 +49931,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -49970,7 +49970,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50009,7 +50009,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50048,7 +50048,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50087,7 +50087,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50126,7 +50126,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50165,7 +50165,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50204,7 +50204,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50243,7 +50243,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50282,7 +50282,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50321,7 +50321,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50360,7 +50360,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50399,7 +50399,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50438,7 +50438,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50477,7 +50477,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50516,7 +50516,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50555,7 +50555,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50594,7 +50594,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50633,7 +50633,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50672,7 +50672,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50711,7 +50711,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50750,7 +50750,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50789,7 +50789,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50828,7 +50828,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50867,7 +50867,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50906,7 +50906,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50945,7 +50945,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50984,7 +50984,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51023,7 +51023,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51062,7 +51062,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51101,7 +51101,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51140,7 +51140,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51179,7 +51179,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51218,7 +51218,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51257,7 +51257,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51296,7 +51296,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51335,7 +51335,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51374,7 +51374,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51413,7 +51413,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51452,7 +51452,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51491,7 +51491,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51530,7 +51530,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51569,7 +51569,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51608,7 +51608,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51647,7 +51647,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51686,7 +51686,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51725,7 +51725,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51764,7 +51764,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51803,7 +51803,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51842,7 +51842,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51881,7 +51881,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51920,7 +51920,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51959,7 +51959,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -51998,7 +51998,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52037,7 +52037,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52076,7 +52076,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52115,7 +52115,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52154,7 +52154,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52193,7 +52193,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52232,7 +52232,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52271,7 +52271,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52310,7 +52310,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52349,7 +52349,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52388,7 +52388,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52427,7 +52427,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52466,7 +52466,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52505,7 +52505,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52544,7 +52544,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52583,7 +52583,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52622,7 +52622,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52661,7 +52661,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52700,7 +52700,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52739,7 +52739,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52778,7 +52778,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52817,7 +52817,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52856,7 +52856,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52895,7 +52895,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52934,7 +52934,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -52973,7 +52973,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53012,7 +53012,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53051,7 +53051,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53090,7 +53090,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53129,7 +53129,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53168,7 +53168,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53207,7 +53207,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53246,7 +53246,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53285,7 +53285,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53324,7 +53324,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53363,7 +53363,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53402,7 +53402,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53441,7 +53441,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53480,7 +53480,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53519,7 +53519,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53558,7 +53558,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53597,7 +53597,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53636,7 +53636,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53675,7 +53675,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53714,7 +53714,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53753,7 +53753,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53792,7 +53792,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53831,7 +53831,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53870,7 +53870,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53909,7 +53909,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53948,7 +53948,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -53987,7 +53987,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54026,7 +54026,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54065,7 +54065,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54104,7 +54104,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54143,7 +54143,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54182,7 +54182,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54221,7 +54221,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54260,7 +54260,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54299,7 +54299,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54338,7 +54338,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54377,7 +54377,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54416,7 +54416,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54455,7 +54455,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54494,7 +54494,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54533,7 +54533,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54572,7 +54572,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54611,7 +54611,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54650,7 +54650,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54689,7 +54689,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54728,7 +54728,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54767,7 +54767,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54806,7 +54806,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54845,7 +54845,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54884,7 +54884,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54923,7 +54923,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54962,7 +54962,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55001,7 +55001,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55040,7 +55040,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55079,7 +55079,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55118,7 +55118,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55157,7 +55157,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55196,7 +55196,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55235,7 +55235,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55274,7 +55274,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55313,7 +55313,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55352,7 +55352,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55391,7 +55391,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55430,7 +55430,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55469,7 +55469,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55508,7 +55508,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55547,7 +55547,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55586,7 +55586,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55625,7 +55625,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55664,7 +55664,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55703,7 +55703,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55742,7 +55742,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55781,7 +55781,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55820,7 +55820,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55859,7 +55859,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55898,7 +55898,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55937,7 +55937,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55976,7 +55976,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56015,7 +56015,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56054,7 +56054,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56093,7 +56093,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56132,7 +56132,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56171,7 +56171,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56210,7 +56210,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56249,7 +56249,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56288,7 +56288,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56327,7 +56327,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56366,7 +56366,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56405,7 +56405,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56444,7 +56444,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56483,7 +56483,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56522,7 +56522,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56561,7 +56561,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56600,7 +56600,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56639,7 +56639,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56678,7 +56678,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56717,7 +56717,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56756,7 +56756,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56795,7 +56795,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56834,7 +56834,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56873,7 +56873,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56912,7 +56912,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56951,7 +56951,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56990,7 +56990,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57029,7 +57029,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57068,7 +57068,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57107,7 +57107,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57146,7 +57146,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57185,7 +57185,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57224,7 +57224,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57263,7 +57263,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57302,7 +57302,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57341,7 +57341,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57380,7 +57380,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57419,7 +57419,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57458,7 +57458,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57497,7 +57497,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57536,7 +57536,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57575,7 +57575,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57614,7 +57614,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57653,7 +57653,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57692,7 +57692,7 @@ Module ops. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -57724,7 +57724,7 @@ Module ops. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -57756,7 +57756,7 @@ Module ops. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -57788,7 +57788,7 @@ Module ops. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -57820,7 +57820,7 @@ Module ops. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -57852,7 +57852,7 @@ Module ops. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -57884,7 +57884,7 @@ Module ops. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -57916,7 +57916,7 @@ Module ops. $imp::$method( *self) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -57945,7 +57945,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57965,7 +57965,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -57986,7 +57986,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58006,7 +58006,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58027,7 +58027,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58047,7 +58047,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58068,7 +58068,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58088,7 +58088,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58109,7 +58109,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58129,7 +58129,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58150,7 +58150,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58170,7 +58170,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58191,7 +58191,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58211,7 +58211,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58232,7 +58232,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58252,7 +58252,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58273,7 +58273,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58293,7 +58293,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58314,7 +58314,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58334,7 +58334,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58355,7 +58355,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58375,7 +58375,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58396,7 +58396,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58416,7 +58416,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58437,7 +58437,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58457,7 +58457,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58478,7 +58478,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58498,7 +58498,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58519,7 +58519,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58539,7 +58539,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58560,7 +58560,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58580,7 +58580,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58601,7 +58601,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58621,7 +58621,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58642,7 +58642,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58662,7 +58662,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58683,7 +58683,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58703,7 +58703,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58724,7 +58724,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58744,7 +58744,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58765,7 +58765,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58785,7 +58785,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58806,7 +58806,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58826,7 +58826,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58847,7 +58847,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58867,7 +58867,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58888,7 +58888,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58908,7 +58908,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58929,7 +58929,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58949,7 +58949,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -58970,7 +58970,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58990,7 +58990,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59011,7 +59011,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59031,7 +59031,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59052,7 +59052,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59072,7 +59072,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59093,7 +59093,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59113,7 +59113,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59134,7 +59134,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59154,7 +59154,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59175,7 +59175,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59195,7 +59195,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59216,7 +59216,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59236,7 +59236,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59257,7 +59257,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59277,7 +59277,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59298,7 +59298,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59318,7 +59318,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59339,7 +59339,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59359,7 +59359,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59380,7 +59380,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59400,7 +59400,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59421,7 +59421,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59441,7 +59441,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59462,7 +59462,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59482,7 +59482,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59503,7 +59503,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59523,7 +59523,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59544,7 +59544,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59564,7 +59564,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59585,7 +59585,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59605,7 +59605,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59626,7 +59626,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59646,7 +59646,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59667,7 +59667,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59687,7 +59687,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59708,7 +59708,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59728,7 +59728,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59749,7 +59749,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59769,7 +59769,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59790,7 +59790,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59810,7 +59810,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59831,7 +59831,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59851,7 +59851,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59872,7 +59872,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59892,7 +59892,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59913,7 +59913,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59933,7 +59933,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59954,7 +59954,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -59974,7 +59974,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -59995,7 +59995,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60015,7 +60015,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60036,7 +60036,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60056,7 +60056,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60077,7 +60077,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60097,7 +60097,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60118,7 +60118,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60138,7 +60138,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60159,7 +60159,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60179,7 +60179,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60200,7 +60200,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60220,7 +60220,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60241,7 +60241,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60261,7 +60261,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60282,7 +60282,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60302,7 +60302,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60323,7 +60323,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60343,7 +60343,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60364,7 +60364,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60384,7 +60384,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60405,7 +60405,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60425,7 +60425,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60446,7 +60446,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60466,7 +60466,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60487,7 +60487,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60507,7 +60507,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60528,7 +60528,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60548,7 +60548,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60569,7 +60569,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60589,7 +60589,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60610,7 +60610,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60630,7 +60630,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60651,7 +60651,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60671,7 +60671,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60692,7 +60692,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60712,7 +60712,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60733,7 +60733,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60753,7 +60753,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60774,7 +60774,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -60794,7 +60794,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -60820,7 +60820,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -60852,7 +60852,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -60884,7 +60884,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -60916,7 +60916,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -60948,7 +60948,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -60980,7 +60980,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61012,7 +61012,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61044,7 +61044,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61076,7 +61076,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61108,7 +61108,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61140,7 +61140,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61172,7 +61172,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61204,7 +61204,7 @@ Module ops. $imp::$method( *self) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61236,7 +61236,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61275,7 +61275,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61314,7 +61314,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61353,7 +61353,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61392,7 +61392,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61431,7 +61431,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61470,7 +61470,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61509,7 +61509,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61548,7 +61548,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61587,7 +61587,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61626,7 +61626,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61665,7 +61665,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61704,7 +61704,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61743,7 +61743,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61782,7 +61782,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61821,7 +61821,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61860,7 +61860,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61899,7 +61899,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61938,7 +61938,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -61977,7 +61977,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62016,7 +62016,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62055,7 +62055,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62094,7 +62094,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62133,7 +62133,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62172,7 +62172,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62211,7 +62211,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62250,7 +62250,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62289,7 +62289,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62328,7 +62328,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62367,7 +62367,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62406,7 +62406,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62445,7 +62445,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62484,7 +62484,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62523,7 +62523,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62562,7 +62562,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62601,7 +62601,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62640,7 +62640,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62679,7 +62679,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62718,7 +62718,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62757,7 +62757,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62796,7 +62796,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62835,7 +62835,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62874,7 +62874,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62913,7 +62913,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62952,7 +62952,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -62991,7 +62991,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63030,7 +63030,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63069,7 +63069,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63108,7 +63108,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63147,7 +63147,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63186,7 +63186,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63225,7 +63225,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63264,7 +63264,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63303,7 +63303,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63342,7 +63342,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63381,7 +63381,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63420,7 +63420,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63459,7 +63459,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63498,7 +63498,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63537,7 +63537,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63576,7 +63576,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63615,7 +63615,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63654,7 +63654,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63693,7 +63693,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63732,7 +63732,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63771,7 +63771,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63810,7 +63810,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63849,7 +63849,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63888,7 +63888,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63927,7 +63927,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -63966,7 +63966,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64005,7 +64005,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64044,7 +64044,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64083,7 +64083,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64122,7 +64122,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64161,7 +64161,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64200,7 +64200,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64239,7 +64239,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64278,7 +64278,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64317,7 +64317,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64356,7 +64356,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64395,7 +64395,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64434,7 +64434,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64473,7 +64473,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64512,7 +64512,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64551,7 +64551,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64590,7 +64590,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64629,7 +64629,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64668,7 +64668,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64707,7 +64707,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64746,7 +64746,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64785,7 +64785,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64824,7 +64824,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64863,7 +64863,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64902,7 +64902,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64941,7 +64941,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -64980,7 +64980,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65019,7 +65019,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65058,7 +65058,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65097,7 +65097,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65136,7 +65136,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65175,7 +65175,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65214,7 +65214,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65253,7 +65253,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65292,7 +65292,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65331,7 +65331,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65370,7 +65370,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65409,7 +65409,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65448,7 +65448,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65487,7 +65487,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65526,7 +65526,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65565,7 +65565,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65604,7 +65604,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65643,7 +65643,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65682,7 +65682,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65721,7 +65721,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65760,7 +65760,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65799,7 +65799,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65838,7 +65838,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65877,7 +65877,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65916,7 +65916,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65955,7 +65955,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -65994,7 +65994,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66033,7 +66033,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66072,7 +66072,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66111,7 +66111,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66150,7 +66150,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66189,7 +66189,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66228,7 +66228,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66267,7 +66267,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66306,7 +66306,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66345,7 +66345,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66384,7 +66384,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66423,7 +66423,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66462,7 +66462,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66501,7 +66501,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66540,7 +66540,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66579,7 +66579,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66618,7 +66618,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66657,7 +66657,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66696,7 +66696,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66735,7 +66735,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66774,7 +66774,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66813,7 +66813,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66852,7 +66852,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66891,7 +66891,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66930,7 +66930,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -66969,7 +66969,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67008,7 +67008,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67047,7 +67047,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67086,7 +67086,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67125,7 +67125,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67164,7 +67164,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67203,7 +67203,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67242,7 +67242,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67281,7 +67281,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67320,7 +67320,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67359,7 +67359,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67398,7 +67398,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67437,7 +67437,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67476,7 +67476,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67515,7 +67515,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67554,7 +67554,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67593,7 +67593,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67632,7 +67632,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67671,7 +67671,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67710,7 +67710,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67749,7 +67749,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67788,7 +67788,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67827,7 +67827,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67866,7 +67866,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67905,7 +67905,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67944,7 +67944,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -67983,7 +67983,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68022,7 +68022,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68061,7 +68061,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68100,7 +68100,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68139,7 +68139,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68178,7 +68178,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68217,7 +68217,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68256,7 +68256,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68295,7 +68295,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68334,7 +68334,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68373,7 +68373,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68412,7 +68412,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68451,7 +68451,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68490,7 +68490,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68529,7 +68529,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68568,7 +68568,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68607,7 +68607,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68646,7 +68646,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68685,7 +68685,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68724,7 +68724,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68763,7 +68763,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68802,7 +68802,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68841,7 +68841,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68880,7 +68880,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68919,7 +68919,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68958,7 +68958,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -68997,7 +68997,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69036,7 +69036,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69075,7 +69075,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69114,7 +69114,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69153,7 +69153,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69192,7 +69192,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69231,7 +69231,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69270,7 +69270,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69309,7 +69309,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69348,7 +69348,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69387,7 +69387,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69426,7 +69426,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69465,7 +69465,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69504,7 +69504,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69543,7 +69543,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69582,7 +69582,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69621,7 +69621,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69660,7 +69660,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69699,7 +69699,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69738,7 +69738,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69777,7 +69777,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69816,7 +69816,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69855,7 +69855,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69894,7 +69894,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69933,7 +69933,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -69972,7 +69972,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70011,7 +70011,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70050,7 +70050,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70089,7 +70089,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70128,7 +70128,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70167,7 +70167,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70206,7 +70206,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70245,7 +70245,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70284,7 +70284,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70323,7 +70323,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70362,7 +70362,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70401,7 +70401,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70440,7 +70440,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70479,7 +70479,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70518,7 +70518,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70557,7 +70557,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70596,7 +70596,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70635,7 +70635,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70674,7 +70674,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70713,7 +70713,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70752,7 +70752,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70791,7 +70791,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70830,7 +70830,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70869,7 +70869,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70908,7 +70908,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70947,7 +70947,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -70986,7 +70986,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71025,7 +71025,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71064,7 +71064,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71103,7 +71103,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71142,7 +71142,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71181,7 +71181,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71220,7 +71220,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71259,7 +71259,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71298,7 +71298,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71337,7 +71337,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71376,7 +71376,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71415,7 +71415,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71454,7 +71454,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71493,7 +71493,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71532,7 +71532,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71571,7 +71571,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71610,7 +71610,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71649,7 +71649,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71688,7 +71688,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71727,7 +71727,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71766,7 +71766,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71805,7 +71805,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71844,7 +71844,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71883,7 +71883,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71922,7 +71922,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -71961,7 +71961,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72000,7 +72000,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72039,7 +72039,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72078,7 +72078,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72117,7 +72117,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72156,7 +72156,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72195,7 +72195,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72234,7 +72234,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72273,7 +72273,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72312,7 +72312,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72351,7 +72351,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72390,7 +72390,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72429,7 +72429,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72468,7 +72468,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72507,7 +72507,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72546,7 +72546,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72585,7 +72585,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72624,7 +72624,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72663,7 +72663,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72702,7 +72702,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72741,7 +72741,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72780,7 +72780,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72819,7 +72819,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72858,7 +72858,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72897,7 +72897,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72936,7 +72936,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -72975,7 +72975,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73014,7 +73014,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73053,7 +73053,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73092,7 +73092,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73131,7 +73131,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73170,7 +73170,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73209,7 +73209,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73248,7 +73248,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73287,7 +73287,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73326,7 +73326,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73365,7 +73365,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73404,7 +73404,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73443,7 +73443,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73482,7 +73482,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73521,7 +73521,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73560,7 +73560,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73599,7 +73599,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73638,7 +73638,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73677,7 +73677,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73716,7 +73716,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73755,7 +73755,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73794,7 +73794,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73833,7 +73833,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73872,7 +73872,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73911,7 +73911,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73950,7 +73950,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -73989,7 +73989,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74028,7 +74028,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74067,7 +74067,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74106,7 +74106,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74145,7 +74145,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74184,7 +74184,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74223,7 +74223,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74262,7 +74262,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74301,7 +74301,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74340,7 +74340,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74379,7 +74379,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74418,7 +74418,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74457,7 +74457,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74496,7 +74496,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74535,7 +74535,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74574,7 +74574,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74613,7 +74613,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74652,7 +74652,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74691,7 +74691,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74730,7 +74730,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74769,7 +74769,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74808,7 +74808,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74847,7 +74847,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74886,7 +74886,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74925,7 +74925,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -74964,7 +74964,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75003,7 +75003,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75042,7 +75042,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75081,7 +75081,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75120,7 +75120,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75159,7 +75159,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75198,7 +75198,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75237,7 +75237,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75276,7 +75276,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75315,7 +75315,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75354,7 +75354,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75393,7 +75393,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75432,7 +75432,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75471,7 +75471,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75510,7 +75510,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75549,7 +75549,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75588,7 +75588,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75627,7 +75627,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75666,7 +75666,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75705,7 +75705,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75744,7 +75744,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75783,7 +75783,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75822,7 +75822,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75861,7 +75861,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75900,7 +75900,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75939,7 +75939,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -75978,7 +75978,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76017,7 +76017,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76056,7 +76056,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76095,7 +76095,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76134,7 +76134,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76173,7 +76173,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76212,7 +76212,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76251,7 +76251,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76290,7 +76290,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76329,7 +76329,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76368,7 +76368,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76407,7 +76407,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76446,7 +76446,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76485,7 +76485,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76524,7 +76524,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76563,7 +76563,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76602,7 +76602,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76641,7 +76641,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76680,7 +76680,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76719,7 +76719,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76758,7 +76758,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76797,7 +76797,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76836,7 +76836,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76875,7 +76875,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76914,7 +76914,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76953,7 +76953,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -76992,7 +76992,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77031,7 +77031,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77070,7 +77070,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77109,7 +77109,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77148,7 +77148,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77187,7 +77187,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77226,7 +77226,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77265,7 +77265,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77304,7 +77304,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77343,7 +77343,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77382,7 +77382,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77421,7 +77421,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77460,7 +77460,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77499,7 +77499,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77538,7 +77538,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77577,7 +77577,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77616,7 +77616,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77655,7 +77655,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77694,7 +77694,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77733,7 +77733,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77772,7 +77772,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77811,7 +77811,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77850,7 +77850,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77889,7 +77889,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77928,7 +77928,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -77967,7 +77967,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78006,7 +78006,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78045,7 +78045,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78084,7 +78084,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78123,7 +78123,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78162,7 +78162,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78201,7 +78201,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78240,7 +78240,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78279,7 +78279,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78318,7 +78318,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78357,7 +78357,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78396,7 +78396,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78435,7 +78435,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78474,7 +78474,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78513,7 +78513,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78552,7 +78552,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78591,7 +78591,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78630,7 +78630,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78669,7 +78669,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78708,7 +78708,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78747,7 +78747,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78786,7 +78786,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78825,7 +78825,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78864,7 +78864,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78903,7 +78903,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78942,7 +78942,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -78981,7 +78981,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79020,7 +79020,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79059,7 +79059,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79098,7 +79098,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79137,7 +79137,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79176,7 +79176,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79215,7 +79215,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79254,7 +79254,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79293,7 +79293,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79332,7 +79332,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79371,7 +79371,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79410,7 +79410,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79449,7 +79449,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79488,7 +79488,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79527,7 +79527,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79566,7 +79566,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79605,7 +79605,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79644,7 +79644,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79683,7 +79683,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79722,7 +79722,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79761,7 +79761,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79800,7 +79800,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79839,7 +79839,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79878,7 +79878,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79917,7 +79917,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79956,7 +79956,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -79995,7 +79995,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80034,7 +80034,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80073,7 +80073,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80112,7 +80112,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80151,7 +80151,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80190,7 +80190,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80229,7 +80229,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80268,7 +80268,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80307,7 +80307,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80346,7 +80346,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80385,7 +80385,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80424,7 +80424,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80463,7 +80463,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80502,7 +80502,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80541,7 +80541,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80580,7 +80580,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80619,7 +80619,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80658,7 +80658,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80697,7 +80697,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80736,7 +80736,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80775,7 +80775,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80814,7 +80814,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80853,7 +80853,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80892,7 +80892,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80931,7 +80931,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -80970,7 +80970,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81009,7 +81009,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81048,7 +81048,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81087,7 +81087,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81126,7 +81126,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81165,7 +81165,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81204,7 +81204,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81243,7 +81243,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81282,7 +81282,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81321,7 +81321,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81360,7 +81360,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81399,7 +81399,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81438,7 +81438,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81477,7 +81477,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81516,7 +81516,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81555,7 +81555,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81594,7 +81594,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81633,7 +81633,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81672,7 +81672,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81711,7 +81711,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81750,7 +81750,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81789,7 +81789,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81828,7 +81828,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81867,7 +81867,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81906,7 +81906,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81945,7 +81945,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -81984,7 +81984,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82023,7 +82023,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82062,7 +82062,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82101,7 +82101,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82140,7 +82140,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82179,7 +82179,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82218,7 +82218,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82257,7 +82257,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82296,7 +82296,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82335,7 +82335,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82374,7 +82374,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82413,7 +82413,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82452,7 +82452,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82491,7 +82491,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82530,7 +82530,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82569,7 +82569,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82608,7 +82608,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82647,7 +82647,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82686,7 +82686,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82725,7 +82725,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82764,7 +82764,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82803,7 +82803,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82842,7 +82842,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82881,7 +82881,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82920,7 +82920,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82959,7 +82959,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -82998,7 +82998,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83037,7 +83037,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83076,7 +83076,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83115,7 +83115,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83154,7 +83154,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83193,7 +83193,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83232,7 +83232,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83271,7 +83271,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83310,7 +83310,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83349,7 +83349,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83388,7 +83388,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83427,7 +83427,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83466,7 +83466,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83505,7 +83505,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83544,7 +83544,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83583,7 +83583,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83622,7 +83622,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83661,7 +83661,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83700,7 +83700,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83739,7 +83739,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83778,7 +83778,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83817,7 +83817,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83856,7 +83856,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83895,7 +83895,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83934,7 +83934,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -83973,7 +83973,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84012,7 +84012,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84051,7 +84051,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84090,7 +84090,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84129,7 +84129,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84168,7 +84168,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84207,7 +84207,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84246,7 +84246,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84285,7 +84285,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84324,7 +84324,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84363,7 +84363,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84402,7 +84402,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84441,7 +84441,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84480,7 +84480,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84519,7 +84519,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84558,7 +84558,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84597,7 +84597,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84636,7 +84636,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84675,7 +84675,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84714,7 +84714,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84753,7 +84753,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84792,7 +84792,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84831,7 +84831,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84870,7 +84870,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84909,7 +84909,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84948,7 +84948,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -84987,7 +84987,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85026,7 +85026,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85065,7 +85065,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85104,7 +85104,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85143,7 +85143,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85182,7 +85182,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85221,7 +85221,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85260,7 +85260,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85299,7 +85299,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85338,7 +85338,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85377,7 +85377,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85416,7 +85416,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85455,7 +85455,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85494,7 +85494,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85533,7 +85533,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85572,7 +85572,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85611,7 +85611,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85650,7 +85650,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85689,7 +85689,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85728,7 +85728,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85767,7 +85767,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85806,7 +85806,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85845,7 +85845,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85884,7 +85884,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85923,7 +85923,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -85962,7 +85962,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86001,7 +86001,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86040,7 +86040,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86079,7 +86079,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86118,7 +86118,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86157,7 +86157,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86196,7 +86196,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86235,7 +86235,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86274,7 +86274,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86313,7 +86313,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86352,7 +86352,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86391,7 +86391,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86430,7 +86430,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86469,7 +86469,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86508,7 +86508,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86547,7 +86547,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86586,7 +86586,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86625,7 +86625,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86664,7 +86664,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86703,7 +86703,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86742,7 +86742,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86781,7 +86781,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86820,7 +86820,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86859,7 +86859,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86898,7 +86898,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86937,7 +86937,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -86976,7 +86976,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87015,7 +87015,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87054,7 +87054,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87093,7 +87093,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87132,7 +87132,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87171,7 +87171,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87210,7 +87210,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87249,7 +87249,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87288,7 +87288,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87327,7 +87327,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87366,7 +87366,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87405,7 +87405,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87444,7 +87444,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87483,7 +87483,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87522,7 +87522,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87561,7 +87561,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87600,7 +87600,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87639,7 +87639,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87678,7 +87678,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87717,7 +87717,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87756,7 +87756,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87795,7 +87795,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87834,7 +87834,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87873,7 +87873,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87912,7 +87912,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87951,7 +87951,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -87990,7 +87990,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88029,7 +88029,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88068,7 +88068,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88107,7 +88107,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88146,7 +88146,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88185,7 +88185,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88224,7 +88224,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88263,7 +88263,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88302,7 +88302,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88341,7 +88341,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88380,7 +88380,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88419,7 +88419,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88458,7 +88458,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88497,7 +88497,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88536,7 +88536,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88575,7 +88575,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88614,7 +88614,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88653,7 +88653,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88692,7 +88692,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88731,7 +88731,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88770,7 +88770,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88809,7 +88809,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88848,7 +88848,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88887,7 +88887,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88926,7 +88926,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -88965,7 +88965,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89004,7 +89004,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89043,7 +89043,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89082,7 +89082,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89121,7 +89121,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89160,7 +89160,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89199,7 +89199,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89238,7 +89238,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89277,7 +89277,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89316,7 +89316,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89355,7 +89355,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89394,7 +89394,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89433,7 +89433,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89472,7 +89472,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89511,7 +89511,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89550,7 +89550,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89589,7 +89589,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89628,7 +89628,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89667,7 +89667,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89706,7 +89706,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89745,7 +89745,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89784,7 +89784,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89823,7 +89823,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89862,7 +89862,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89901,7 +89901,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89940,7 +89940,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -89979,7 +89979,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90018,7 +90018,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90057,7 +90057,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90096,7 +90096,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90135,7 +90135,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90174,7 +90174,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90213,7 +90213,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90252,7 +90252,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90291,7 +90291,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90330,7 +90330,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90369,7 +90369,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90408,7 +90408,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90447,7 +90447,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90486,7 +90486,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90525,7 +90525,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90564,7 +90564,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90603,7 +90603,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90642,7 +90642,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90681,7 +90681,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90720,7 +90720,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90759,7 +90759,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90798,7 +90798,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90837,7 +90837,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90876,7 +90876,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90915,7 +90915,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90954,7 +90954,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -90993,7 +90993,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91032,7 +91032,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91071,7 +91071,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91110,7 +91110,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91149,7 +91149,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91188,7 +91188,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91227,7 +91227,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91266,7 +91266,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91305,7 +91305,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91344,7 +91344,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91383,7 +91383,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91422,7 +91422,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91461,7 +91461,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91500,7 +91500,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91539,7 +91539,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91578,7 +91578,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91617,7 +91617,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91656,7 +91656,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91695,7 +91695,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91734,7 +91734,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91773,7 +91773,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91812,7 +91812,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91851,7 +91851,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91890,7 +91890,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91929,7 +91929,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -91968,7 +91968,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92007,7 +92007,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92046,7 +92046,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92085,7 +92085,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92124,7 +92124,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92163,7 +92163,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92202,7 +92202,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92241,7 +92241,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92280,7 +92280,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92319,7 +92319,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92358,7 +92358,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92397,7 +92397,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92436,7 +92436,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92475,7 +92475,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92514,7 +92514,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92553,7 +92553,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92592,7 +92592,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92631,7 +92631,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92670,7 +92670,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92709,7 +92709,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92748,7 +92748,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92787,7 +92787,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92826,7 +92826,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92865,7 +92865,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92904,7 +92904,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92943,7 +92943,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92982,7 +92982,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93021,7 +93021,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93060,7 +93060,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93099,7 +93099,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93138,7 +93138,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93177,7 +93177,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93216,7 +93216,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93255,7 +93255,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93294,7 +93294,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93333,7 +93333,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93372,7 +93372,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93411,7 +93411,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93450,7 +93450,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93489,7 +93489,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93528,7 +93528,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93567,7 +93567,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93606,7 +93606,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93645,7 +93645,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93684,7 +93684,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93723,7 +93723,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93762,7 +93762,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93801,7 +93801,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93840,7 +93840,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93879,7 +93879,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93918,7 +93918,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93957,7 +93957,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -93996,7 +93996,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94035,7 +94035,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94074,7 +94074,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94113,7 +94113,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94152,7 +94152,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94191,7 +94191,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94230,7 +94230,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94269,7 +94269,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94308,7 +94308,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94347,7 +94347,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94386,7 +94386,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94425,7 +94425,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94464,7 +94464,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94503,7 +94503,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94542,7 +94542,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94581,7 +94581,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94620,7 +94620,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94659,7 +94659,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94698,7 +94698,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94737,7 +94737,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94776,7 +94776,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94815,7 +94815,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94854,7 +94854,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94893,7 +94893,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94932,7 +94932,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -94971,7 +94971,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95010,7 +95010,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95049,7 +95049,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95088,7 +95088,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95127,7 +95127,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95166,7 +95166,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95205,7 +95205,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95244,7 +95244,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95283,7 +95283,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95322,7 +95322,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95361,7 +95361,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95400,7 +95400,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95439,7 +95439,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95478,7 +95478,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95517,7 +95517,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95556,7 +95556,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95595,7 +95595,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95634,7 +95634,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95673,7 +95673,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95712,7 +95712,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95751,7 +95751,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95790,7 +95790,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95829,7 +95829,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95868,7 +95868,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95907,7 +95907,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95946,7 +95946,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -95985,7 +95985,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96024,7 +96024,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96063,7 +96063,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96102,7 +96102,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96141,7 +96141,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96180,7 +96180,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96219,7 +96219,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96258,7 +96258,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96297,7 +96297,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96336,7 +96336,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96375,7 +96375,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96414,7 +96414,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96453,7 +96453,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96492,7 +96492,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96531,7 +96531,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96570,7 +96570,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96609,7 +96609,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96648,7 +96648,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96687,7 +96687,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96726,7 +96726,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96765,7 +96765,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96804,7 +96804,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96843,7 +96843,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96882,7 +96882,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96921,7 +96921,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96960,7 +96960,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -96999,7 +96999,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97038,7 +97038,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97077,7 +97077,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97116,7 +97116,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97155,7 +97155,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97194,7 +97194,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97233,7 +97233,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97272,7 +97272,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97311,7 +97311,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97350,7 +97350,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97389,7 +97389,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97428,7 +97428,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97467,7 +97467,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97506,7 +97506,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97545,7 +97545,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97584,7 +97584,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97623,7 +97623,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97662,7 +97662,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97701,7 +97701,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97740,7 +97740,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97779,7 +97779,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97818,7 +97818,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97857,7 +97857,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97896,7 +97896,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97935,7 +97935,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -97974,7 +97974,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98013,7 +98013,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98052,7 +98052,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98091,7 +98091,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98130,7 +98130,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98169,7 +98169,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98208,7 +98208,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98247,7 +98247,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98286,7 +98286,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98325,7 +98325,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98364,7 +98364,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98403,7 +98403,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98442,7 +98442,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98481,7 +98481,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98520,7 +98520,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98559,7 +98559,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98598,7 +98598,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98637,7 +98637,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98676,7 +98676,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98715,7 +98715,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98754,7 +98754,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98793,7 +98793,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98832,7 +98832,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98871,7 +98871,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98910,7 +98910,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98949,7 +98949,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -98988,7 +98988,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99027,7 +99027,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99066,7 +99066,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99105,7 +99105,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99144,7 +99144,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99183,7 +99183,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99222,7 +99222,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99261,7 +99261,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99300,7 +99300,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99339,7 +99339,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99378,7 +99378,7 @@ Module ops. $imp::$method( *self, other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99417,7 +99417,7 @@ Module ops. $imp::$method(self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99456,7 +99456,7 @@ Module ops. $imp::$method( *self, *other) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99492,7 +99492,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99512,7 +99512,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99533,7 +99533,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99553,7 +99553,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99574,7 +99574,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99594,7 +99594,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99615,7 +99615,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99635,7 +99635,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99656,7 +99656,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99676,7 +99676,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99697,7 +99697,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99717,7 +99717,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99738,7 +99738,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99758,7 +99758,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99779,7 +99779,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99799,7 +99799,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99820,7 +99820,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99840,7 +99840,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99861,7 +99861,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99881,7 +99881,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99902,7 +99902,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99922,7 +99922,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99943,7 +99943,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -99963,7 +99963,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99984,7 +99984,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100004,7 +100004,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100025,7 +100025,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100045,7 +100045,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100066,7 +100066,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100086,7 +100086,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100107,7 +100107,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100127,7 +100127,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100148,7 +100148,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100168,7 +100168,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100189,7 +100189,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100209,7 +100209,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100230,7 +100230,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100250,7 +100250,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100271,7 +100271,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100291,7 +100291,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100312,7 +100312,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100332,7 +100332,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100353,7 +100353,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100373,7 +100373,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100394,7 +100394,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100414,7 +100414,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100435,7 +100435,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100455,7 +100455,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100476,7 +100476,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100496,7 +100496,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100517,7 +100517,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100537,7 +100537,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100558,7 +100558,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100578,7 +100578,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100599,7 +100599,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100619,7 +100619,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100640,7 +100640,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100660,7 +100660,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100681,7 +100681,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100701,7 +100701,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100722,7 +100722,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100742,7 +100742,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100763,7 +100763,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100783,7 +100783,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100804,7 +100804,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100824,7 +100824,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100845,7 +100845,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100865,7 +100865,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100886,7 +100886,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100906,7 +100906,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100927,7 +100927,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100947,7 +100947,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100968,7 +100968,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -100988,7 +100988,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101009,7 +101009,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101029,7 +101029,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101050,7 +101050,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101070,7 +101070,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101091,7 +101091,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101111,7 +101111,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101132,7 +101132,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101152,7 +101152,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101173,7 +101173,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101193,7 +101193,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101214,7 +101214,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101234,7 +101234,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101255,7 +101255,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101275,7 +101275,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101296,7 +101296,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101316,7 +101316,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101337,7 +101337,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101357,7 +101357,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101378,7 +101378,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101398,7 +101398,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101419,7 +101419,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101439,7 +101439,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101460,7 +101460,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101480,7 +101480,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101501,7 +101501,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101521,7 +101521,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101542,7 +101542,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101562,7 +101562,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101583,7 +101583,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101603,7 +101603,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101624,7 +101624,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101644,7 +101644,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101665,7 +101665,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101685,7 +101685,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101706,7 +101706,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101726,7 +101726,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101747,7 +101747,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101767,7 +101767,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101788,7 +101788,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101808,7 +101808,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101829,7 +101829,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101849,7 +101849,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101870,7 +101870,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101890,7 +101890,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101911,7 +101911,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101931,7 +101931,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101952,7 +101952,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -101972,7 +101972,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -101993,7 +101993,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102013,7 +102013,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102034,7 +102034,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102054,7 +102054,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102075,7 +102075,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102095,7 +102095,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102116,7 +102116,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102136,7 +102136,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102157,7 +102157,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102177,7 +102177,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102198,7 +102198,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102218,7 +102218,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102239,7 +102239,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102259,7 +102259,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102280,7 +102280,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102300,7 +102300,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102321,7 +102321,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102341,7 +102341,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102362,7 +102362,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102382,7 +102382,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102403,7 +102403,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102423,7 +102423,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102444,7 +102444,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102464,7 +102464,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102485,7 +102485,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102505,7 +102505,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102526,7 +102526,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102546,7 +102546,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102567,7 +102567,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102587,7 +102587,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102608,7 +102608,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102628,7 +102628,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102649,7 +102649,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102669,7 +102669,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102690,7 +102690,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102710,7 +102710,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102731,7 +102731,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102751,7 +102751,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102772,7 +102772,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102792,7 +102792,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102813,7 +102813,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102833,7 +102833,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102854,7 +102854,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102874,7 +102874,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102895,7 +102895,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102915,7 +102915,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102936,7 +102936,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102956,7 +102956,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -102977,7 +102977,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -102997,7 +102997,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103018,7 +103018,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103038,7 +103038,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103059,7 +103059,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103079,7 +103079,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103100,7 +103100,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103120,7 +103120,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103141,7 +103141,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103161,7 +103161,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103182,7 +103182,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103202,7 +103202,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103223,7 +103223,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103243,7 +103243,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103264,7 +103264,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103284,7 +103284,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103305,7 +103305,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103325,7 +103325,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103346,7 +103346,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103366,7 +103366,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103387,7 +103387,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103407,7 +103407,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103428,7 +103428,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103448,7 +103448,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103469,7 +103469,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103489,7 +103489,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103510,7 +103510,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103530,7 +103530,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103551,7 +103551,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103571,7 +103571,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103592,7 +103592,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103612,7 +103612,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103633,7 +103633,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103653,7 +103653,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103674,7 +103674,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103694,7 +103694,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103715,7 +103715,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103735,7 +103735,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103756,7 +103756,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103776,7 +103776,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103797,7 +103797,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103817,7 +103817,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103838,7 +103838,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103858,7 +103858,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103879,7 +103879,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103899,7 +103899,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103920,7 +103920,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103940,7 +103940,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103961,7 +103961,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -103981,7 +103981,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104002,7 +104002,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104022,7 +104022,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104043,7 +104043,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104063,7 +104063,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104084,7 +104084,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104104,7 +104104,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104125,7 +104125,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104145,7 +104145,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104166,7 +104166,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104186,7 +104186,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104207,7 +104207,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104227,7 +104227,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104248,7 +104248,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104268,7 +104268,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104289,7 +104289,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104309,7 +104309,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104330,7 +104330,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104350,7 +104350,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104371,7 +104371,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104391,7 +104391,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104412,7 +104412,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104432,7 +104432,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104453,7 +104453,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104473,7 +104473,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104494,7 +104494,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104514,7 +104514,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104535,7 +104535,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104555,7 +104555,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104576,7 +104576,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104596,7 +104596,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104617,7 +104617,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104637,7 +104637,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104658,7 +104658,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104678,7 +104678,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104699,7 +104699,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104719,7 +104719,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104740,7 +104740,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104760,7 +104760,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104781,7 +104781,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104801,7 +104801,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104822,7 +104822,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104842,7 +104842,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104863,7 +104863,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104883,7 +104883,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104904,7 +104904,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104924,7 +104924,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104945,7 +104945,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104965,7 +104965,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -104986,7 +104986,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105006,7 +105006,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105027,7 +105027,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105047,7 +105047,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105068,7 +105068,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105088,7 +105088,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105109,7 +105109,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105129,7 +105129,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105150,7 +105150,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105170,7 +105170,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105191,7 +105191,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105211,7 +105211,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105232,7 +105232,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105252,7 +105252,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105273,7 +105273,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105293,7 +105293,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105314,7 +105314,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105334,7 +105334,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105355,7 +105355,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105375,7 +105375,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105396,7 +105396,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105416,7 +105416,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105437,7 +105437,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105457,7 +105457,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105478,7 +105478,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105498,7 +105498,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105519,7 +105519,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105539,7 +105539,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105560,7 +105560,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105580,7 +105580,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105601,7 +105601,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105621,7 +105621,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105642,7 +105642,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105662,7 +105662,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105683,7 +105683,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105703,7 +105703,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105724,7 +105724,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105744,7 +105744,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105765,7 +105765,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105785,7 +105785,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105806,7 +105806,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105826,7 +105826,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105847,7 +105847,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105867,7 +105867,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105888,7 +105888,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105908,7 +105908,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105929,7 +105929,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105949,7 +105949,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -105970,7 +105970,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -105990,7 +105990,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106011,7 +106011,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106031,7 +106031,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106052,7 +106052,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106072,7 +106072,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106093,7 +106093,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106113,7 +106113,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106134,7 +106134,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106154,7 +106154,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106175,7 +106175,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106195,7 +106195,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106216,7 +106216,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106236,7 +106236,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106257,7 +106257,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106277,7 +106277,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106298,7 +106298,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106318,7 +106318,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106339,7 +106339,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106359,7 +106359,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106380,7 +106380,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106400,7 +106400,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106421,7 +106421,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106441,7 +106441,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106462,7 +106462,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106482,7 +106482,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106503,7 +106503,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106523,7 +106523,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106544,7 +106544,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106564,7 +106564,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106585,7 +106585,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106605,7 +106605,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106626,7 +106626,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106646,7 +106646,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106667,7 +106667,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106687,7 +106687,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106708,7 +106708,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106728,7 +106728,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106749,7 +106749,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106769,7 +106769,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106790,7 +106790,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106810,7 +106810,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106831,7 +106831,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106851,7 +106851,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106872,7 +106872,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106892,7 +106892,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106913,7 +106913,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106933,7 +106933,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106954,7 +106954,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -106974,7 +106974,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106995,7 +106995,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107015,7 +107015,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107036,7 +107036,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107056,7 +107056,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107077,7 +107077,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107097,7 +107097,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107118,7 +107118,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107138,7 +107138,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107159,7 +107159,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107179,7 +107179,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107200,7 +107200,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107220,7 +107220,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107241,7 +107241,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107261,7 +107261,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107282,7 +107282,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107302,7 +107302,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107323,7 +107323,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107343,7 +107343,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107364,7 +107364,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107384,7 +107384,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107405,7 +107405,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107425,7 +107425,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107446,7 +107446,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107466,7 +107466,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107487,7 +107487,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107507,7 +107507,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107528,7 +107528,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107548,7 +107548,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107569,7 +107569,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107589,7 +107589,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107610,7 +107610,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107630,7 +107630,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107651,7 +107651,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107671,7 +107671,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107692,7 +107692,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107712,7 +107712,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107733,7 +107733,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107753,7 +107753,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107774,7 +107774,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107794,7 +107794,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107815,7 +107815,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107835,7 +107835,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107856,7 +107856,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107876,7 +107876,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107897,7 +107897,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107917,7 +107917,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107938,7 +107938,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107958,7 +107958,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107979,7 +107979,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -107999,7 +107999,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108020,7 +108020,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108040,7 +108040,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108061,7 +108061,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108081,7 +108081,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108102,7 +108102,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108122,7 +108122,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108143,7 +108143,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108163,7 +108163,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108184,7 +108184,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108204,7 +108204,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108225,7 +108225,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108245,7 +108245,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108266,7 +108266,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108286,7 +108286,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108307,7 +108307,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108327,7 +108327,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108348,7 +108348,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108368,7 +108368,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108389,7 +108389,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108409,7 +108409,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108430,7 +108430,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108450,7 +108450,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108471,7 +108471,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108491,7 +108491,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108512,7 +108512,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108532,7 +108532,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108553,7 +108553,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108573,7 +108573,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108594,7 +108594,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108614,7 +108614,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108635,7 +108635,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108655,7 +108655,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108676,7 +108676,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108696,7 +108696,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108717,7 +108717,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108737,7 +108737,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108758,7 +108758,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108778,7 +108778,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108799,7 +108799,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108819,7 +108819,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108840,7 +108840,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108860,7 +108860,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108881,7 +108881,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108901,7 +108901,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108922,7 +108922,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108942,7 +108942,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108963,7 +108963,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -108983,7 +108983,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109004,7 +109004,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109024,7 +109024,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109045,7 +109045,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109065,7 +109065,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109086,7 +109086,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109106,7 +109106,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109127,7 +109127,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109147,7 +109147,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109168,7 +109168,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109188,7 +109188,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109209,7 +109209,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109229,7 +109229,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109250,7 +109250,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109270,7 +109270,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109291,7 +109291,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109311,7 +109311,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109332,7 +109332,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109352,7 +109352,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109373,7 +109373,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109393,7 +109393,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109414,7 +109414,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109434,7 +109434,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109455,7 +109455,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109475,7 +109475,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109496,7 +109496,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109516,7 +109516,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109537,7 +109537,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109557,7 +109557,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109578,7 +109578,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109598,7 +109598,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109619,7 +109619,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109639,7 +109639,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109660,7 +109660,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109680,7 +109680,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109701,7 +109701,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109721,7 +109721,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109742,7 +109742,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109762,7 +109762,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109783,7 +109783,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109803,7 +109803,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109824,7 +109824,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109844,7 +109844,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109865,7 +109865,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109885,7 +109885,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109906,7 +109906,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109926,7 +109926,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109947,7 +109947,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -109967,7 +109967,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -109988,7 +109988,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110008,7 +110008,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110029,7 +110029,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110049,7 +110049,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110070,7 +110070,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110090,7 +110090,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110111,7 +110111,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110131,7 +110131,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110152,7 +110152,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110172,7 +110172,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110193,7 +110193,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110213,7 +110213,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110234,7 +110234,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110254,7 +110254,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110275,7 +110275,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110295,7 +110295,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110316,7 +110316,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110336,7 +110336,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110357,7 +110357,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110377,7 +110377,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110398,7 +110398,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110418,7 +110418,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110439,7 +110439,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110459,7 +110459,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110480,7 +110480,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110500,7 +110500,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110521,7 +110521,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110541,7 +110541,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110562,7 +110562,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110582,7 +110582,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110603,7 +110603,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110623,7 +110623,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110644,7 +110644,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110664,7 +110664,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110685,7 +110685,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110705,7 +110705,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110726,7 +110726,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110746,7 +110746,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110767,7 +110767,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110787,7 +110787,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110808,7 +110808,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110828,7 +110828,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110849,7 +110849,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110869,7 +110869,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110890,7 +110890,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110910,7 +110910,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110931,7 +110931,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110951,7 +110951,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -110972,7 +110972,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110992,7 +110992,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111013,7 +111013,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111033,7 +111033,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111054,7 +111054,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111074,7 +111074,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111095,7 +111095,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111115,7 +111115,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111136,7 +111136,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111156,7 +111156,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111177,7 +111177,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111197,7 +111197,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111218,7 +111218,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111238,7 +111238,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111259,7 +111259,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111279,7 +111279,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111300,7 +111300,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111320,7 +111320,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111341,7 +111341,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111361,7 +111361,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111382,7 +111382,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111402,7 +111402,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111423,7 +111423,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111443,7 +111443,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111464,7 +111464,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111484,7 +111484,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111505,7 +111505,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111525,7 +111525,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111546,7 +111546,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111566,7 +111566,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111587,7 +111587,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111607,7 +111607,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111628,7 +111628,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111648,7 +111648,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111669,7 +111669,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111689,7 +111689,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111710,7 +111710,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111730,7 +111730,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111751,7 +111751,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111771,7 +111771,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111792,7 +111792,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111812,7 +111812,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111833,7 +111833,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111853,7 +111853,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111874,7 +111874,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111894,7 +111894,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111915,7 +111915,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111935,7 +111935,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111956,7 +111956,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111976,7 +111976,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111997,7 +111997,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112017,7 +112017,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112038,7 +112038,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112058,7 +112058,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112079,7 +112079,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112099,7 +112099,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112120,7 +112120,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112140,7 +112140,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112161,7 +112161,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112181,7 +112181,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112202,7 +112202,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112222,7 +112222,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112243,7 +112243,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112263,7 +112263,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112284,7 +112284,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112304,7 +112304,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112325,7 +112325,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112345,7 +112345,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112366,7 +112366,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112386,7 +112386,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112407,7 +112407,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112427,7 +112427,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112448,7 +112448,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112468,7 +112468,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112489,7 +112489,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112509,7 +112509,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112530,7 +112530,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112550,7 +112550,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112571,7 +112571,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112591,7 +112591,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112612,7 +112612,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112632,7 +112632,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112653,7 +112653,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112673,7 +112673,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112694,7 +112694,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112714,7 +112714,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112735,7 +112735,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112755,7 +112755,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112776,7 +112776,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112796,7 +112796,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112817,7 +112817,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112837,7 +112837,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112858,7 +112858,7 @@ Module ops. $imp::$method(self, *other); } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -112878,7 +112878,7 @@ Module ops. [ M.read (| self |); M.read (| M.read (| other |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112910,7 +112910,7 @@ Module slice. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -112952,7 +112952,7 @@ Module slice. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -112973,7 +112973,10 @@ Module slice. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| byte |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| byte |)) ] |) + ] |))) ] |))) @@ -113000,7 +113003,7 @@ Module slice. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113021,7 +113024,7 @@ Module slice. "call", [] |), - [ self; Value.Tuple [ M.read (| byte |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| byte |)) ] |) ] |))) ] |))) @@ -113056,7 +113059,7 @@ Module str. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113078,7 +113081,7 @@ Module str. "strip_suffix", [ Ty.path "char" ] |), - [ M.read (| line |); Value.UnicodeChar 10 ] + [ M.read (| line |); M.of_value (| Value.UnicodeChar 10 |) ] |) |), [ @@ -113099,7 +113102,7 @@ Module str. "strip_suffix", [ Ty.path "char" ] |), - [ M.read (| line |); Value.UnicodeChar 13 ] + [ M.read (| line |); M.of_value (| Value.UnicodeChar 13 |) ] |) |), [ @@ -113143,7 +113146,7 @@ Module str. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113164,7 +113167,10 @@ Module str. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| line |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| line |)) ] |) + ] |))) ] |))) @@ -113191,7 +113197,7 @@ Module str. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113212,7 +113218,7 @@ Module str. "call", [] |), - [ self; Value.Tuple [ M.read (| line |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| line |)) ] |) ] |))) ] |))) @@ -113244,7 +113250,7 @@ Module str. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113261,13 +113267,16 @@ Module str. M.get_associated_function (| Ty.path "char", "escape_debug_ext", [] |), [ M.read (| c |); - Value.StructRecord - "core::char::methods::EscapeDebugExtArgs" - [ - ("escape_grapheme_extended", Value.Bool false); - ("escape_single_quote", Value.Bool true); - ("escape_double_quote", Value.Bool true) - ] + M.of_value (| + Value.StructRecord + "core::char::methods::EscapeDebugExtArgs" + [ + ("escape_grapheme_extended", + A.to_value (M.of_value (| Value.Bool false |))); + ("escape_single_quote", A.to_value (M.of_value (| Value.Bool true |))); + ("escape_double_quote", A.to_value (M.of_value (| Value.Bool true |))) + ] + |) ] |))) ] @@ -113294,7 +113303,7 @@ Module str. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113315,7 +113324,10 @@ Module str. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| c |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| c |)) ] |) + ] |))) ] |))) @@ -113341,7 +113353,7 @@ Module str. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113362,7 +113374,7 @@ Module str. "call", [] |), - [ self; Value.Tuple [ M.read (| c |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| c |)) ] |) ] |))) ] |))) @@ -113393,7 +113405,7 @@ Module str. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113434,7 +113446,7 @@ Module str. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113455,7 +113467,10 @@ Module str. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| c |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| c |)) ] |) + ] |))) ] |))) @@ -113481,7 +113496,7 @@ Module str. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113502,7 +113517,7 @@ Module str. "call", [] |), - [ self; Value.Tuple [ M.read (| c |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| c |)) ] |) ] |))) ] |))) @@ -113533,7 +113548,7 @@ Module str. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113574,7 +113589,7 @@ Module str. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113595,7 +113610,10 @@ Module str. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| c |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| c |)) ] |) + ] |))) ] |))) @@ -113621,7 +113639,7 @@ Module str. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113642,7 +113660,7 @@ Module str. "call", [] |), - [ self; Value.Tuple [ M.read (| c |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| c |)) ] |) ] |))) ] |))) @@ -113673,7 +113691,7 @@ Module str. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113714,7 +113732,7 @@ Module str. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113735,7 +113753,10 @@ Module str. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| c |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| c |)) ] |) + ] |))) ] |))) @@ -113761,7 +113782,7 @@ Module str. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113782,7 +113803,7 @@ Module str. "call", [] |), - [ self; Value.Tuple [ M.read (| c |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| c |)) ] |) ] |))) ] |))) @@ -113813,7 +113834,7 @@ Module str. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113855,7 +113876,7 @@ Module str. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113876,7 +113897,10 @@ Module str. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| byte |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| byte |)) ] |) + ] |))) ] |))) @@ -113903,7 +113927,7 @@ Module str. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113924,7 +113948,7 @@ Module str. "call", [] |), - [ self; Value.Tuple [ M.read (| byte |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| byte |)) ] |) ] |))) ] |))) @@ -113956,7 +113980,7 @@ Module str. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -113969,11 +113993,12 @@ Module str. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let s := M.copy (| γ0_0 |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_empty", [] |), [ M.read (| M.read (| s |) |) ] - |)))) + |) + |))) ] |))) | _, _ => M.impossible @@ -114002,7 +114027,7 @@ Module str. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -114026,7 +114051,10 @@ Module str. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| s |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| s |)) ] |) + ] |))) ] |))) @@ -114056,7 +114084,7 @@ Module str. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -114080,7 +114108,7 @@ Module str. "call", [] |), - [ self; Value.Tuple [ M.read (| s |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| s |)) ] |) ] |))) ] |))) @@ -114115,7 +114143,7 @@ Module str. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -114128,15 +114156,16 @@ Module str. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let s := M.copy (| γ0_0 |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "is_empty", [] |), [ M.read (| M.read (| s |) |) ] - |)))) + |) + |))) ] |))) | _, _ => M.impossible @@ -114170,7 +114199,7 @@ Module str. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -114202,7 +114231,10 @@ Module str. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| s |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| s |)) ] |) + ] |))) ] |))) @@ -114237,7 +114269,7 @@ Module str. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -114269,7 +114301,7 @@ Module str. "call", [] |), - [ self; Value.Tuple [ M.read (| s |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| s |)) ] |) ] |))) ] |))) @@ -114309,7 +114341,7 @@ Module str. $body } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -114354,7 +114386,7 @@ Module str. Fn::call(&*self, ($( $arg, )* )) } *) - Definition call_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -114378,7 +114410,10 @@ Module str. "call", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| bytes |) ] ] + [ + M.read (| self |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| bytes |)) ] |) + ] |))) ] |))) @@ -114408,7 +114443,7 @@ Module str. Fn::call(&self, ($( $arg, )* )) } *) - Definition call_once (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; β1 ] => ltac:(M.monadic @@ -114432,7 +114467,7 @@ Module str. "call", [] |), - [ self; Value.Tuple [ M.read (| bytes |) ] ] + [ self; M.of_value (| Value.Tuple [ A.to_value (M.read (| bytes |)) ] |) ] |))) ] |))) diff --git a/CoqOfRust/core/intrinsics.v b/CoqOfRust/core/intrinsics.v index 1ec8cb892..b0894f20a 100644 --- a/CoqOfRust/core/intrinsics.v +++ b/CoqOfRust/core/intrinsics.v @@ -13,17 +13,18 @@ Module hint. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| UnOp.Pure.not (Value.Bool false) |)) in + (let γ := + M.use (M.alloc (| UnOp.Pure.not (| M.of_value (| Value.Bool false |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| @@ -31,14 +32,16 @@ Module hint. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: hint::unreachable_unchecked must never be reached" + M.of_value (| + Value.String + "unsafe precondition(s) violated: hint::unreachable_unchecked must never be reached" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -46,8 +49,11 @@ Module hint. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. + Definition comptime (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. End unreachable_unchecked. End hint. @@ -58,7 +64,7 @@ Module intrinsics. unsafe { crate::ptr::drop_in_place(to_drop) } } *) - Definition drop_in_place (τ : list Ty.t) (α : list Value.t) : M := + Definition drop_in_place (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ to_drop ] => ltac:(M.monadic @@ -77,17 +83,18 @@ Module intrinsics. !ptr.is_null() && ptr.is_aligned() } *) - Definition is_aligned_and_not_null (τ : list Ty.t) (α : list Value.t) : M := + Definition is_aligned_and_not_null (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ ptr ] => ltac:(M.monadic (let ptr := M.alloc (| ptr |) in LogicalOp.and (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "is_null", [] |), [ M.read (| ptr |) ] - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "is_aligned", [] |), @@ -106,7 +113,7 @@ Module intrinsics. len <= max_len } *) - Definition is_valid_allocation_size (τ : list Ty.t) (α : list Value.t) : M := + Definition is_valid_allocation_size (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ len ] => ltac:(M.monadic @@ -116,7 +123,7 @@ Module intrinsics. M.copy (| M.get_constant (| "core::intrinsics::is_valid_allocation_size_discriminant" |) |) in - M.alloc (| BinOp.Pure.le (M.read (| len |)) (M.read (| max_len |)) |) + M.alloc (| BinOp.Pure.le (| M.read (| len |), M.read (| max_len |) |) |) |))) | _, _ => M.impossible end. @@ -134,7 +141,7 @@ Module intrinsics. diff >= size } *) - Definition is_nonoverlapping (τ : list Ty.t) (α : list Value.t) : M := + Definition is_nonoverlapping (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src; dst; count ] => ltac:(M.monadic @@ -173,7 +180,9 @@ Module intrinsics. ] |); M.read (| - Value.String "is_nonoverlapping: `size_of::() * count` overflows a usize" + M.of_value (| + Value.String "is_nonoverlapping: `size_of::() * count` overflows a usize" + |) |) ] |) @@ -185,7 +194,7 @@ Module intrinsics. [ M.read (| src_usize |); M.read (| dst_usize |) ] |) |) in - M.alloc (| BinOp.Pure.ge (M.read (| diff |)) (M.read (| size |)) |) + M.alloc (| BinOp.Pure.ge (| M.read (| diff |), M.read (| size |) |) |) |))) | _, _ => M.impossible end. @@ -213,7 +222,7 @@ Module intrinsics. } } *) - Definition copy_nonoverlapping (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_nonoverlapping (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src; dst; count ] => ltac:(M.monadic @@ -223,11 +232,11 @@ Module intrinsics. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -259,7 +268,14 @@ Module intrinsics. ] |), [ - Value.Tuple [ M.read (| src |); M.read (| dst |); M.read (| count |) ]; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| src |)); + A.to_value (M.read (| dst |)); + A.to_value (M.read (| count |)) + ] + |); M.get_function (| "core::intrinsics::copy_nonoverlapping.comptime", [] @@ -268,8 +284,8 @@ Module intrinsics. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -298,7 +314,7 @@ Module intrinsics. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src; dst; count ] => ltac:(M.monadic @@ -307,15 +323,15 @@ Module intrinsics. let count := M.alloc (| count |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| + UnOp.Pure.not (| + LogicalOp.and (| LogicalOp.and (| M.call_closure (| M.get_function (| @@ -330,7 +346,9 @@ Module intrinsics. "core::intrinsics::is_aligned_and_not_null", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| dst |)) + [ + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| dst |) |) ] |))) |), @@ -339,11 +357,13 @@ Module intrinsics. M.get_function (| "core::intrinsics::is_nonoverlapping", [ T ] |), [ M.read (| src |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| dst |)); + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| dst |) |); M.read (| count |) ] |))) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -352,14 +372,16 @@ Module intrinsics. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap" + M.of_value (| + Value.String + "unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -367,7 +389,7 @@ Module intrinsics. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0; β1; β2 ] => ltac:(M.monadic @@ -386,7 +408,7 @@ Module intrinsics. ltac:(M.monadic (M.match_operator (| β2, - [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] |))) ] |))) @@ -415,7 +437,7 @@ Module intrinsics. } } *) - Definition copy (τ : list Ty.t) (α : list Value.t) : M := + Definition copy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src; dst; count ] => ltac:(M.monadic @@ -425,11 +447,11 @@ Module intrinsics. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -452,14 +474,17 @@ Module intrinsics. ] |), [ - Value.Tuple [ M.read (| src |); M.read (| dst |) ]; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| src |)); A.to_value (M.read (| dst |)) ] + |); M.get_function (| "core::intrinsics::copy.comptime", [] |); M.get_function (| "core::intrinsics::copy.runtime", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -485,7 +510,7 @@ Module intrinsics. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src; dst ] => ltac:(M.monadic @@ -493,15 +518,15 @@ Module intrinsics. let dst := M.alloc (| dst |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| + UnOp.Pure.not (| + LogicalOp.and (| M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", @@ -515,9 +540,13 @@ Module intrinsics. "core::intrinsics::is_aligned_and_not_null", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| dst |)) ] + [ + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| dst |) |) + ] |))) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -526,14 +555,16 @@ Module intrinsics. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: ptr::copy requires that both pointer arguments are aligned and non-null" + M.of_value (| + Value.String + "unsafe precondition(s) violated: ptr::copy requires that both pointer arguments are aligned and non-null" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -541,7 +572,7 @@ Module intrinsics. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0; β1 ] => ltac:(M.monadic @@ -552,7 +583,10 @@ Module intrinsics. [ fun γ => ltac:(M.monadic - (M.match_operator (| β1, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + (M.match_operator (| + β1, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) ] |))) | _, _ => M.impossible @@ -577,7 +611,7 @@ Module intrinsics. } } *) - Definition write_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition write_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; count ] => ltac:(M.monadic @@ -587,11 +621,11 @@ Module intrinsics. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -606,14 +640,14 @@ Module intrinsics. ] |), [ - Value.Tuple [ M.read (| dst |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| dst |)) ] |); M.get_function (| "core::intrinsics::write_bytes.comptime", [] |); M.get_function (| "core::intrinsics::write_bytes.runtime", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -639,28 +673,29 @@ Module intrinsics. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst ] => ltac:(M.monadic (let dst := M.alloc (| dst |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| dst |)) ] - |)) + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| dst |) |) ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -669,14 +704,16 @@ Module intrinsics. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: ptr::write_bytes requires that the destination pointer is aligned and non-null" + M.of_value (| + Value.String + "unsafe precondition(s) violated: ptr::write_bytes requires that the destination pointer is aligned and non-null" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -684,12 +721,15 @@ Module intrinsics. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0 ] => ltac:(M.monadic (let β0 := M.alloc (| β0 |) in - M.match_operator (| β0, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| + β0, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. End write_bytes. @@ -707,7 +747,7 @@ Module ptr. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x; y; count ] => ltac:(M.monadic @@ -716,22 +756,23 @@ Module ptr. let count := M.alloc (| count |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| + UnOp.Pure.not (| + LogicalOp.and (| LogicalOp.and (| M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| x |)) ] + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| x |) |) + ] |), ltac:(M.monadic (M.call_closure (| @@ -739,19 +780,23 @@ Module ptr. "core::intrinsics::is_aligned_and_not_null", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| y |)) ] + [ + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| y |) |) + ] |))) |), ltac:(M.monadic (M.call_closure (| M.get_function (| "core::intrinsics::is_nonoverlapping", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| x |)); - (* MutToConstPointer *) M.pointer_coercion (M.read (| y |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| x |) |); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| y |) |); M.read (| count |) ] |))) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -760,14 +805,16 @@ Module ptr. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap" + M.of_value (| + Value.String + "unsafe precondition(s) violated: ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -775,7 +822,7 @@ Module ptr. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0; β1; β2 ] => ltac:(M.monadic @@ -794,7 +841,7 @@ Module ptr. ltac:(M.monadic (M.match_operator (| β2, - [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] |))) ] |))) @@ -815,28 +862,29 @@ Module ptr. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst ] => ltac:(M.monadic (let dst := M.alloc (| dst |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| dst |)) ] - |)) + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| dst |) |) ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -845,14 +893,16 @@ Module ptr. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: ptr::replace requires that the pointer argument is aligned and non-null" + M.of_value (| + Value.String + "unsafe precondition(s) violated: ptr::replace requires that the pointer argument is aligned and non-null" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -860,12 +910,15 @@ Module ptr. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0 ] => ltac:(M.monadic (let β0 := M.alloc (| β0 |) in - M.match_operator (| β0, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| + β0, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. End replace. @@ -881,28 +934,29 @@ Module ptr. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", [ T ] |), [ M.read (| src |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -911,14 +965,16 @@ Module ptr. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: ptr::read requires that the pointer argument is aligned and non-null" + M.of_value (| + Value.String + "unsafe precondition(s) violated: ptr::read requires that the pointer argument is aligned and non-null" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -926,12 +982,15 @@ Module ptr. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0 ] => ltac:(M.monadic (let β0 := M.alloc (| β0 |) in - M.match_operator (| β0, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| + β0, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. End read. @@ -947,28 +1006,29 @@ Module ptr. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst ] => ltac:(M.monadic (let dst := M.alloc (| dst |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| dst |)) ] - |)) + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| dst |) |) ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -977,14 +1037,16 @@ Module ptr. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: ptr::write requires that the pointer argument is aligned and non-null" + M.of_value (| + Value.String + "unsafe precondition(s) violated: ptr::write requires that the pointer argument is aligned and non-null" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -992,12 +1054,15 @@ Module ptr. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0 ] => ltac:(M.monadic (let β0 := M.alloc (| β0 |) in - M.match_operator (| β0, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| + β0, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. End write. @@ -1013,28 +1078,29 @@ Module ptr. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", [ T ] |), [ M.read (| src |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1043,14 +1109,16 @@ Module ptr. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: ptr::read_volatile requires that the pointer argument is aligned and non-null" + M.of_value (| + Value.String + "unsafe precondition(s) violated: ptr::read_volatile requires that the pointer argument is aligned and non-null" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -1058,12 +1126,15 @@ Module ptr. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0 ] => ltac:(M.monadic (let β0 := M.alloc (| β0 |) in - M.match_operator (| β0, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| + β0, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. End read_volatile. @@ -1079,28 +1150,29 @@ Module ptr. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst ] => ltac:(M.monadic (let dst := M.alloc (| dst |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| dst |)) ] - |)) + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| dst |) |) ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1109,14 +1181,16 @@ Module ptr. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: ptr::write_volatile requires that the pointer argument is aligned and non-null" + M.of_value (| + Value.String + "unsafe precondition(s) violated: ptr::write_volatile requires that the pointer argument is aligned and non-null" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -1124,12 +1198,15 @@ Module ptr. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0 ] => ltac:(M.monadic (let β0 := M.alloc (| β0 |) in - M.match_operator (| β0, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| + β0, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. End write_volatile. @@ -1148,7 +1225,7 @@ Module slice. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ data; len ] => ltac:(M.monadic @@ -1156,15 +1233,15 @@ Module slice. let len := M.alloc (| len |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| + UnOp.Pure.not (| + LogicalOp.and (| M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", @@ -1180,7 +1257,8 @@ Module slice. |), [ M.read (| len |) ] |))) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1189,14 +1267,16 @@ Module slice. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`" + M.of_value (| + Value.String + "unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -1204,7 +1284,7 @@ Module slice. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0; β1 ] => ltac:(M.monadic @@ -1215,7 +1295,10 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.match_operator (| β1, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + (M.match_operator (| + β1, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) ] |))) | _, _ => M.impossible @@ -1233,7 +1316,7 @@ Module slice. } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ data; len ] => ltac:(M.monadic @@ -1241,21 +1324,24 @@ Module slice. let len := M.alloc (| len |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| + UnOp.Pure.not (| + LogicalOp.and (| M.call_closure (| M.get_function (| "core::intrinsics::is_aligned_and_not_null", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| data |)) ] + [ + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| data |) |) + ] |), ltac:(M.monadic (M.call_closure (| @@ -1265,7 +1351,8 @@ Module slice. |), [ M.read (| len |) ] |))) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1274,14 +1361,16 @@ Module slice. M.get_function (| "core::panicking::panic_nounwind", [] |), [ M.read (| - Value.String - "unsafe precondition(s) violated: slice::from_raw_parts_mut requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`" + M.of_value (| + Value.String + "unsafe precondition(s) violated: slice::from_raw_parts_mut requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -1289,7 +1378,7 @@ Module slice. end. (* const fn comptime$(<$($tt)*>)?($(_:$ty),* ) {} *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0; β1 ] => ltac:(M.monadic @@ -1300,7 +1389,10 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.match_operator (| β1, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + (M.match_operator (| + β1, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/intrinsics/mir.v b/CoqOfRust/core/intrinsics/mir.v index bf32cb071..152c8df35 100644 --- a/CoqOfRust/core/intrinsics/mir.v +++ b/CoqOfRust/core/intrinsics/mir.v @@ -44,7 +44,7 @@ Module intrinsics. *) (* pub fn $($sig)* { panic!() } *) - Definition value_UnwindContinue (τ : list Ty.t) (α : list Value.t) : M := + Definition value_UnwindContinue (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -58,7 +58,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_UnwindUnreachable (τ : list Ty.t) (α : list Value.t) : M := + Definition value_UnwindUnreachable (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -75,7 +75,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_UnwindTerminate (τ : list Ty.t) (α : list Value.t) : M := + Definition value_UnwindTerminate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ reason ] => ltac:(M.monadic @@ -90,7 +90,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_UnwindCleanup (τ : list Ty.t) (α : list Value.t) : M := + Definition value_UnwindCleanup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ goto ] => ltac:(M.monadic @@ -105,7 +105,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Return (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Return (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -119,7 +119,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Goto (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Goto (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ destination ] => ltac:(M.monadic @@ -134,7 +134,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Unreachable (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Unreachable (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -148,7 +148,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Drop (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; U ], [ place; goto; unwind_action ] => ltac:(M.monadic @@ -165,7 +165,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Call (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ U ], [ call; goto; unwind_action ] => ltac:(M.monadic @@ -182,7 +182,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_UnwindResume (τ : list Ty.t) (α : list Value.t) : M := + Definition value_UnwindResume (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -196,7 +196,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_StorageLive (τ : list Ty.t) (α : list Value.t) : M := + Definition value_StorageLive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ local ] => ltac:(M.monadic @@ -211,7 +211,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_StorageDead (τ : list Ty.t) (α : list Value.t) : M := + Definition value_StorageDead (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ local ] => ltac:(M.monadic @@ -226,7 +226,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Deinit (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Deinit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ place ] => ltac:(M.monadic @@ -241,7 +241,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Checked (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ binop ] => ltac:(M.monadic @@ -256,7 +256,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Len (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ place ] => ltac:(M.monadic @@ -271,7 +271,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_CopyForDeref (τ : list Ty.t) (α : list Value.t) : M := + Definition value_CopyForDeref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ place ] => ltac:(M.monadic @@ -286,7 +286,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Retag (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Retag (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ place ] => ltac:(M.monadic @@ -301,7 +301,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Move (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Move (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ place ] => ltac:(M.monadic @@ -316,7 +316,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Static (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Static (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ s ] => ltac:(M.monadic @@ -331,7 +331,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_StaticMut (τ : list Ty.t) (α : list Value.t) : M := + Definition value_StaticMut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ s ] => ltac:(M.monadic @@ -346,7 +346,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Discriminant (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Discriminant (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ place ] => ltac:(M.monadic @@ -361,7 +361,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_SetDiscriminant (τ : list Ty.t) (α : list Value.t) : M := + Definition value_SetDiscriminant (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ place; index ] => ltac:(M.monadic @@ -377,7 +377,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Offset (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Offset (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; U ], [ ptr; count ] => ltac:(M.monadic @@ -393,7 +393,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Field (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Field (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ place; field ] => ltac:(M.monadic @@ -409,7 +409,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_Variant (τ : list Ty.t) (α : list Value.t) : M := + Definition value_Variant (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ place; index ] => ltac:(M.monadic @@ -425,7 +425,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition value_CastTransmute (τ : list Ty.t) (α : list Value.t) : M := + Definition value_CastTransmute (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; U ], [ operand ] => ltac:(M.monadic @@ -440,7 +440,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition __internal_make_place (τ : list Ty.t) (α : list Value.t) : M := + Definition __internal_make_place (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ place ] => ltac:(M.monadic @@ -458,7 +458,7 @@ Module intrinsics. end. (* pub fn $($sig)* { panic!() } *) - Definition __debuginfo (τ : list Ty.t) (α : list Value.t) : M := + Definition __debuginfo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ name; s ] => ltac:(M.monadic diff --git a/CoqOfRust/core/io/borrowed_buf.v b/CoqOfRust/core/io/borrowed_buf.v index 728b5112d..25742df14 100644 --- a/CoqOfRust/core/io/borrowed_buf.v +++ b/CoqOfRust/core/io/borrowed_buf.v @@ -34,7 +34,7 @@ Module io. .finish() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -75,33 +75,38 @@ Module io. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "BorrowedBuf" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "BorrowedBuf" |) |) + ] |) |); - M.read (| Value.String "init" |); + M.read (| M.of_value (| Value.String "init" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::io::borrowed_buf::BorrowedBuf", "init" - |)) + |) + |) ] |); - M.read (| Value.String "filled" |); + M.read (| M.of_value (| Value.String "filled" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::io::borrowed_buf::BorrowedBuf", "filled" - |)) + |) + |) ] |); - M.read (| Value.String "capacity" |); + M.read (| M.of_value (| Value.String "capacity" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::io::borrowed_buf::BorrowedBuf", @@ -110,7 +115,8 @@ Module io. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -141,7 +147,7 @@ Module io. } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ slice ] => ltac:(M.monadic @@ -159,46 +165,49 @@ Module io. |) |) in M.alloc (| - Value.StructRecord - "core::io::borrowed_buf::BorrowedBuf" - [ - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ + M.of_value (| + Value.StructRecord + "core::io::borrowed_buf::BorrowedBuf" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "&mut") + (Ty.path "core::option::Option") [ Ty.apply - (Ty.path "slice") + (Ty.path "&mut") [ Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ] + (Ty.path "slice") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ] + ] ] - ] - ], - "unwrap", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "*mut") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - "as_uninit_slice_mut", + ], + "unwrap", [] |), - [ M.read (| M.use (M.alloc (| M.read (| slice |) |)) |) ] - |) - ] - |)); - ("filled", Value.Integer Integer.Usize 0); - ("init", M.read (| len |)) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*mut") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "as_uninit_slice_mut", + [] + |), + [ M.read (| M.use (M.alloc (| M.read (| slice |) |)) |) ] + |) + ] + |))); + ("filled", A.to_value (M.of_value (| Value.Integer 0 |))); + ("init", A.to_value (M.read (| len |))) + ] + |) |) |))) | _, _ => M.impossible @@ -221,18 +230,20 @@ Module io. BorrowedBuf { buf, filled: 0, init: 0 } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ buf ] => ltac:(M.monadic (let buf := M.alloc (| buf |) in - Value.StructRecord - "core::io::borrowed_buf::BorrowedBuf" - [ - ("buf", M.read (| buf |)); - ("filled", Value.Integer Integer.Usize 0); - ("init", Value.Integer Integer.Usize 0) - ])) + M.of_value (| + Value.StructRecord + "core::io::borrowed_buf::BorrowedBuf" + [ + ("buf", A.to_value (M.read (| buf |))); + ("filled", A.to_value (M.of_value (| Value.Integer 0 |))); + ("init", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -262,7 +273,7 @@ Module io. self.buf.len() } *) - Definition capacity (τ : list Ty.t) (α : list Value.t) : M := + Definition capacity (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -295,7 +306,7 @@ Module io. self.filled } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -317,7 +328,7 @@ Module io. self.init } *) - Definition init_len (τ : list Ty.t) (α : list Value.t) : M := + Definition init_len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -340,7 +351,7 @@ Module io. unsafe { MaybeUninit::slice_assume_init_ref(&self.buf[0..self.filled]) } } *) - Definition filled (τ : list Ty.t) (α : list Value.t) : M := + Definition filled (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -371,19 +382,22 @@ Module io. "buf" |) |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedBuf", - "filled" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedBuf", + "filled" + |) + |))) + ] + |) ] |) ] @@ -399,7 +413,7 @@ Module io. unsafe { MaybeUninit::slice_assume_init_mut(&mut self.buf[0..self.filled]) } } *) - Definition filled_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition filled_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -430,19 +444,22 @@ Module io. "buf" |) |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedBuf", - "filled" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedBuf", + "filled" + |) + |))) + ] + |) ] |) ] @@ -464,34 +481,42 @@ Module io. } } *) - Definition unfilled (τ : list Ty.t) (α : list Value.t) : M := + Definition unfilled (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::io::borrowed_buf::BorrowedCursor" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedBuf", - "filled" - |) - |)); - ("buf", - M.call_closure (| - M.get_function (| - "core::intrinsics::transmute", - [ - Ty.apply (Ty.path "&mut") [ Ty.path "core::io::borrowed_buf::BorrowedBuf" ]; - Ty.apply (Ty.path "&mut") [ Ty.path "core::io::borrowed_buf::BorrowedBuf" ] - ] - |), - [ M.read (| self |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::io::borrowed_buf::BorrowedCursor" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedBuf", + "filled" + |) + |))); + ("buf", + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::transmute", + [ + Ty.apply + (Ty.path "&mut") + [ Ty.path "core::io::borrowed_buf::BorrowedBuf" ]; + Ty.apply + (Ty.path "&mut") + [ Ty.path "core::io::borrowed_buf::BorrowedBuf" ] + ] + |), + [ M.read (| self |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -503,7 +528,7 @@ Module io. self } *) - Definition clear (τ : list Ty.t) (α : list Value.t) : M := + Definition clear (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -516,7 +541,7 @@ Module io. "core::io::borrowed_buf::BorrowedBuf", "filled" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in M.alloc (| M.read (| self |) |) |))) @@ -531,7 +556,7 @@ Module io. self } *) - Definition set_init (τ : list Ty.t) (α : list Value.t) : M := + Definition set_init (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -582,7 +607,7 @@ Module io. Definition Self : Ty.t := Ty.path "core::io::borrowed_buf::BorrowedCursor". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -596,25 +621,27 @@ Module io. |), [ M.read (| f |); - M.read (| Value.String "BorrowedCursor" |); - M.read (| Value.String "buf" |); + M.read (| M.of_value (| Value.String "BorrowedCursor" |) |); + M.read (| M.of_value (| Value.String "buf" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::io::borrowed_buf::BorrowedCursor", "buf" - |)); - M.read (| Value.String "start" |); + |) + |); + M.read (| M.of_value (| Value.String "start" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::io::borrowed_buf::BorrowedCursor", "start" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -645,42 +672,50 @@ Module io. } } *) - Definition reborrow (τ : list Ty.t) (α : list Value.t) : M := + Definition reborrow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::io::borrowed_buf::BorrowedCursor" - [ - ("buf", - M.call_closure (| - M.get_function (| - "core::intrinsics::transmute", - [ - Ty.apply (Ty.path "&mut") [ Ty.path "core::io::borrowed_buf::BorrowedBuf" ]; - Ty.apply (Ty.path "&mut") [ Ty.path "core::io::borrowed_buf::BorrowedBuf" ] - ] - |), - [ - M.read (| + M.of_value (| + Value.StructRecord + "core::io::borrowed_buf::BorrowedCursor" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::transmute", + [ + Ty.apply + (Ty.path "&mut") + [ Ty.path "core::io::borrowed_buf::BorrowedBuf" ]; + Ty.apply + (Ty.path "&mut") + [ Ty.path "core::io::borrowed_buf::BorrowedBuf" ] + ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedCursor", + "buf" + |) + |) + ] + |))); + ("start", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::io::borrowed_buf::BorrowedCursor", - "buf" + "start" |) - |) - ] - |)); - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedCursor", - "start" - |) - |)) - ])) + |))) + ] + |))) | _, _ => M.impossible end. @@ -691,12 +726,13 @@ Module io. self.buf.capacity() - self.buf.filled } *) - Definition capacity (τ : list Ty.t) (α : list Value.t) : M := + Definition capacity (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::io::borrowed_buf::BorrowedBuf", @@ -737,12 +773,13 @@ Module io. self.buf.filled - self.start } *) - Definition written (τ : list Ty.t) (α : list Value.t) : M := + Definition written (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -775,7 +812,7 @@ Module io. unsafe { MaybeUninit::slice_assume_init_ref(&self.buf.buf[self.buf.filled..self.buf.init]) } } *) - Definition init_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition init_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -812,38 +849,42 @@ Module io. "buf" |) |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedCursor", - "buf" + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedCursor", + "buf" + |) + |), + "core::io::borrowed_buf::BorrowedBuf", + "filled" |) - |), - "core::io::borrowed_buf::BorrowedBuf", - "filled" - |) - |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| + |))); + ("end_", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedCursor", - "buf" + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedCursor", + "buf" + |) + |), + "core::io::borrowed_buf::BorrowedBuf", + "init" |) - |), - "core::io::borrowed_buf::BorrowedBuf", - "init" - |) - |)) - ] + |))) + ] + |) ] |) ] @@ -861,7 +902,7 @@ Module io. } } *) - Definition init_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition init_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -898,38 +939,42 @@ Module io. "buf" |) |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedCursor", - "buf" + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedCursor", + "buf" + |) + |), + "core::io::borrowed_buf::BorrowedBuf", + "filled" |) - |), - "core::io::borrowed_buf::BorrowedBuf", - "filled" - |) - |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| + |))); + ("end_", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedCursor", - "buf" + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedCursor", + "buf" + |) + |), + "core::io::borrowed_buf::BorrowedBuf", + "init" |) - |), - "core::io::borrowed_buf::BorrowedBuf", - "init" - |) - |)) - ] + |))) + ] + |) ] |) ] @@ -944,7 +989,7 @@ Module io. &mut self.buf.buf[self.buf.init..] } *) - Definition uninit_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition uninit_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -973,24 +1018,27 @@ Module io. "buf" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedCursor", - "buf" + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedCursor", + "buf" + |) + |), + "core::io::borrowed_buf::BorrowedBuf", + "init" |) - |), - "core::io::borrowed_buf::BorrowedBuf", - "init" - |) - |)) - ] + |))) + ] + |) ] |))) | _, _ => M.impossible @@ -1003,7 +1051,7 @@ Module io. &mut self.buf.buf[self.buf.filled..] } *) - Definition as_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1032,24 +1080,27 @@ Module io. "buf" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::io::borrowed_buf::BorrowedCursor", - "buf" + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::io::borrowed_buf::BorrowedCursor", + "buf" + |) + |), + "core::io::borrowed_buf::BorrowedBuf", + "filled" |) - |), - "core::io::borrowed_buf::BorrowedBuf", - "filled" - |) - |)) - ] + |))) + ] + |) ] |))) | _, _ => M.impossible @@ -1064,7 +1115,7 @@ Module io. self } *) - Definition advance (τ : list Ty.t) (α : list Value.t) : M := + Definition advance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -1084,7 +1135,10 @@ Module io. "core::io::borrowed_buf::BorrowedBuf", "filled" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| n |) |) |) in + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| n |) |) + |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -1150,7 +1204,7 @@ Module io. self } *) - Definition ensure_init (τ : list Ty.t) (α : list Value.t) : M := + Definition ensure_init (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1191,7 +1245,7 @@ Module io. |), [ M.read (| uninit |) ] |); - Value.Integer Integer.U8 0; + M.of_value (| Value.Integer 0 |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -1209,7 +1263,7 @@ Module io. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -1253,7 +1307,7 @@ Module io. self } *) - Definition set_init (τ : list Ty.t) (α : list Value.t) : M := + Definition set_init (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -1290,6 +1344,7 @@ Module io. |) |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -1331,7 +1386,7 @@ Module io. self.buf.filled += buf.len(); } *) - Definition append (τ : list Ty.t) (α : list Value.t) : M := + Definition append (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; buf ] => ltac:(M.monadic @@ -1340,31 +1395,33 @@ Module io. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.path "core::io::borrowed_buf::BorrowedCursor", "capacity", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1374,13 +1431,15 @@ Module io. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.capacity() >= buf.len()" + M.of_value (| + Value.String "assertion failed: self.capacity() >= buf.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1416,26 +1475,29 @@ Module io. |), [ M.read (| self |) ] |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| buf |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| buf |) ] + |))) + ] + |) ] |); M.read (| buf |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -1458,7 +1520,7 @@ Module io. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -1475,6 +1537,7 @@ Module io. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -1486,7 +1549,7 @@ Module io. |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/iter/adapters/array_chunks.v b/CoqOfRust/core/iter/adapters/array_chunks.v index 2891e69e8..ff3d7a945 100644 --- a/CoqOfRust/core/iter/adapters/array_chunks.v +++ b/CoqOfRust/core/iter/adapters/array_chunks.v @@ -23,7 +23,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::array_chunks::ArrayChunks") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -38,25 +38,27 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "ArrayChunks" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "ArrayChunks" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::array_chunks::ArrayChunks", "iter" - |)); - M.read (| Value.String "remainder" |); + |) + |); + M.read (| M.of_value (| Value.String "remainder" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::array_chunks::ArrayChunks", "remainder" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -76,46 +78,51 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::array_chunks::ArrayChunks") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::array_chunks::ArrayChunks" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::array_chunks::ArrayChunks", - "iter" - |) - ] - |)); - ("remainder", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "core::array::iter::IntoIter") [ Ty.associated ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::array_chunks::ArrayChunks", - "remainder" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::array_chunks::ArrayChunks" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::array_chunks::ArrayChunks", + "iter" + |) + ] + |))); + ("remainder", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "core::array::iter::IntoIter") [ Ty.associated ] + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::array_chunks::ArrayChunks", + "remainder" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -138,7 +145,7 @@ Module iter. Self { iter, remainder: None } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter ] => @@ -147,19 +154,21 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) - |)) - (Value.Integer Integer.Usize 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -176,31 +185,41 @@ Module iter. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "chunk size must be non-zero" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::iter::adapters::array_chunks::ArrayChunks" - [ - ("iter", M.read (| iter |)); - ("remainder", Value.StructTuple "core::option::Option::None" []) - ] + M.of_value (| + Value.StructRecord + "core::iter::adapters::array_chunks::ArrayChunks" + [ + ("iter", A.to_value (M.read (| iter |))); + ("remainder", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -215,7 +234,7 @@ Module iter. self.remainder } *) - Definition into_remainder (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_remainder (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -256,7 +275,7 @@ Module iter. self.remainder = Some(remainder); } *) - Definition next_back_remainder (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_remainder (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -267,7 +286,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -301,14 +320,17 @@ Module iter. Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", @@ -432,9 +454,13 @@ Module iter. "core::iter::adapters::array_chunks::ArrayChunks", "remainder" |), - Value.StructTuple "core::option::Option::Some" [ M.read (| remainder |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| remainder |)) ] + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -457,7 +483,7 @@ Module iter. self.try_for_each(ControlFlow::Break).break_value() } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -491,7 +517,7 @@ Module iter. |), [ M.read (| self |); - M.constructor_as_closure "core::ops::control_flow::ControlFlow::Break" + M.constructor_as_closure (| "core::ops::control_flow::ControlFlow::Break" |) ] |) ] @@ -506,7 +532,7 @@ Module iter. (lower / N, upper.map(|n| n / N)) } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -540,51 +566,60 @@ Module iter. let lower := M.copy (| γ0_0 |) in let upper := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| - 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" ], - "map", - [ - Ty.path "usize"; - Ty.function [ Ty.tuple [ Ty.path "usize" ] ] (Ty.path "usize") - ] - |), - [ - M.read (| upper |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let n := M.copy (| γ |) in - BinOp.Panic.div (| - M.read (| n |), - M.read (| - M.get_constant (| - "core::iter::adapters::array_chunks::N" - |) - |) - |))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.Usize, + M.read (| lower |), + M.read (| + M.get_constant (| "core::iter::adapters::array_chunks::N" |) + |) + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], + "map", + [ + Ty.path "usize"; + Ty.function + [ Ty.tuple [ Ty.path "usize" ] ] + (Ty.path "usize") + ] + |), + [ + M.read (| upper |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let n := M.copy (| γ |) in + BinOp.Panic.div (| + Integer.Usize, + M.read (| n |), + M.read (| + M.get_constant (| + "core::iter::adapters::array_chunks::N" + |) + |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |)) + ] + |) |))) ] |) @@ -597,13 +632,14 @@ Module iter. self.iter.count() / N } *) - Definition count (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", @@ -649,7 +685,7 @@ Module iter. } } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -722,7 +758,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| acc |); M.read (| chunk |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| chunk |)) + ] + |) ] |) ] @@ -827,7 +869,7 @@ Module iter. ::fold(self, init, f) } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -874,7 +916,7 @@ Module iter. self.try_rfold((), |(), x| ControlFlow::Break(x)).break_value() } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -909,9 +951,9 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; - M.closure - (fun γ => + M.of_value (| Value.Tuple [] |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -926,15 +968,18 @@ Module iter. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ M.read (| x |) ])) + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ A.to_value (M.read (| x |)) ] + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -968,7 +1013,7 @@ Module iter. try { acc } } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -1006,15 +1051,18 @@ Module iter. [] |), [ - Value.StructTuple - "core::iter::adapters::by_ref_sized::ByRefSized" - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::array_chunks::ArrayChunks", - "iter" - |) - ] + M.of_value (| + Value.StructTuple + "core::iter::adapters::by_ref_sized::ByRefSized" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::array_chunks::ArrayChunks", + "iter" + |)) + ] + |) ] |) |) in @@ -1022,7 +1070,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1061,7 +1109,7 @@ Module iter. "reverse", [] |), - [ (* Unsize *) M.pointer_coercion chunk ] + [ (* Unsize *) M.pointer_coercion (| chunk |) ] |) |) in M.write (| @@ -1094,8 +1142,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| acc |); M.read (| chunk |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| chunk |)) + ] + |) ] |) ] @@ -1152,7 +1205,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1186,7 +1239,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => @@ -1280,13 +1333,14 @@ Module iter. self.iter.len() / N } *) - Definition len (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", @@ -1313,14 +1367,14 @@ Module iter. self.iter.len() < N } *) - Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", I, @@ -1335,8 +1389,9 @@ 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. @@ -1367,7 +1422,7 @@ Module iter. self.try_fold(init, NeverShortCircuit::wrap_mut_2(f)).0 } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -1453,7 +1508,7 @@ Module iter. accum } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -1482,23 +1537,28 @@ Module iter. ] |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (BinOp.Panic.sub (| M.read (| inner_len |), M.read (| i |) |)) - (M.read (| + BinOp.Pure.ge (| + BinOp.Panic.sub (| + Integer.Usize, + M.read (| inner_len |), + M.read (| i |) + |), + M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1516,8 +1576,8 @@ Module iter. ] |), [ - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1531,6 +1591,7 @@ Module iter. let idx := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| i |), M.read (| local |) |) @@ -1558,7 +1619,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -1574,7 +1636,16 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| chunk |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| chunk |)) + ] + |) + ] |) |) in let _ := @@ -1582,13 +1653,14 @@ Module iter. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1598,7 +1670,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1632,7 +1704,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1672,7 +1744,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I : Ty.t) : Value.t := + Definition value_EXPAND_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -1689,7 +1761,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I : Ty.t) : Value.t := + Definition value_MERGE_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/by_ref_sized.v b/CoqOfRust/core/iter/adapters/by_ref_sized.v index d0bffef3a..c8005ed2d 100644 --- a/CoqOfRust/core/iter/adapters/by_ref_sized.v +++ b/CoqOfRust/core/iter/adapters/by_ref_sized.v @@ -16,7 +16,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::by_ref_sized::ByRefSized") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -31,16 +31,17 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "ByRefSized" |); + M.read (| M.of_value (| Value.String "ByRefSized" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::iter::adapters::by_ref_sized::ByRefSized", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -67,7 +68,7 @@ Module iter. I::next(self.0) } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -99,7 +100,7 @@ Module iter. I::size_hint(self.0) } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -131,7 +132,7 @@ Module iter. I::advance_by(self.0, n) } *) - Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -165,7 +166,7 @@ Module iter. I::nth(self.0, n) } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -197,7 +198,7 @@ Module iter. I::try_fold(self.0, init, NeverShortCircuit::wrap_mut_2(f)).0 } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -256,7 +257,7 @@ Module iter. I::try_fold(self.0, init, f) } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -314,7 +315,7 @@ Module iter. I::next_back(self.0) } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -346,7 +347,7 @@ Module iter. I::advance_back_by(self.0, n) } *) - Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -380,7 +381,7 @@ Module iter. I::nth_back(self.0, n) } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -418,7 +419,7 @@ Module iter. I::try_rfold(self.0, init, NeverShortCircuit::wrap_mut_2(f)).0 } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -477,7 +478,7 @@ Module iter. I::try_rfold(self.0, init, f) } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => diff --git a/CoqOfRust/core/iter/adapters/chain.v b/CoqOfRust/core/iter/adapters/chain.v index 7d8a683fe..b9ffa51f3 100644 --- a/CoqOfRust/core/iter/adapters/chain.v +++ b/CoqOfRust/core/iter/adapters/chain.v @@ -20,50 +20,54 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::chain::Chain") [ A; B ]. (* Clone *) - Definition clone (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::chain::Chain" - [ - ("a", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::chain::Chain", - "a" - |) - ] - |)); - ("b", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ B ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::chain::Chain", - "b" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::chain::Chain" + [ + ("a", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::chain::Chain", + "a" + |) + ] + |))); + ("b", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ B ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::chain::Chain", + "b" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -81,7 +85,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::chain::Chain") [ A; B ]. (* Debug *) - Definition fmt (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; f ] => @@ -96,25 +100,27 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Chain" |); - M.read (| Value.String "a" |); + M.read (| M.of_value (| Value.String "Chain" |) |); + M.read (| M.of_value (| Value.String "a" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::chain::Chain", "a" - |)); - M.read (| Value.String "b" |); + |) + |); + M.read (| M.of_value (| Value.String "b" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::chain::Chain", "b" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -138,19 +144,33 @@ Module iter. Chain { a: Some(a), b: Some(b) } } *) - Definition new (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - Value.StructRecord - "core::iter::adapters::chain::Chain" - [ - ("a", Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ]); - ("b", Value.StructTuple "core::option::Option::Some" [ M.read (| b |) ]) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::chain::Chain" + [ + ("a", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |))); + ("b", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| b |)) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -171,7 +191,7 @@ Module iter. and_then_or_clear(&mut self.a, Iterator::next).or_else(|| self.b.as_mut()?.next()) } *) - Definition next (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -214,8 +234,8 @@ Module iter. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -319,7 +339,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -338,7 +359,7 @@ Module iter. a_count + b_count } *) - Definition count (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -375,7 +396,7 @@ Module iter. [ M.read (| a |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -409,11 +430,13 @@ Module iter. [ M.read (| b |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in - M.alloc (| BinOp.Panic.add (| M.read (| a_count |), M.read (| b_count |) |) |) + M.alloc (| + BinOp.Panic.add (| Integer.Usize, M.read (| a_count |), M.read (| b_count |) |) + |) |))) | _, _ => M.impossible end. @@ -436,7 +459,7 @@ Module iter. try { acc } } *) - Definition try_fold (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ Acc; F; R ], [ self; acc; f ] => @@ -449,7 +472,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -543,15 +566,15 @@ Module iter. "core::iter::adapters::chain::Chain", "a" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -638,8 +661,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -673,7 +696,7 @@ Module iter. acc } *) - Definition fold (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ Acc; F ], [ self; acc; f ] => @@ -684,7 +707,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -715,13 +738,13 @@ Module iter. [ M.read (| a |); M.read (| acc |); f ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -752,8 +775,8 @@ Module iter. [ M.read (| b |); M.read (| acc |); M.read (| f |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in acc @@ -779,7 +802,7 @@ Module iter. NonZeroUsize::new(n).map_or(Ok(()), Err) } *) - Definition advance_by (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; n ] => @@ -791,7 +814,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -838,9 +861,14 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| Value.Tuple [] |)) + ] + |) |) |) |) @@ -875,15 +903,15 @@ Module iter. "core::iter::adapters::chain::Chain", "a" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -918,7 +946,7 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -948,8 +976,12 @@ Module iter. |), [ M.read (| n |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -975,7 +1007,7 @@ Module iter. self.b.as_mut()?.nth(n) } *) - Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; n ] => @@ -987,7 +1019,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1046,7 +1078,9 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.Integer Integer.Usize 0 |))); + (M.alloc (| + M.of_value (| Value.Integer 0 |) + |))); fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in @@ -1087,10 +1121,10 @@ Module iter. "core::iter::adapters::chain::Chain", "a" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1199,7 +1233,7 @@ Module iter. .or_else(|| self.b.as_mut()?.find(predicate)) } *) - Definition find (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ P ], [ self; predicate ] => @@ -1234,8 +1268,8 @@ Module iter. "core::iter::adapters::chain::Chain", "a" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1258,11 +1292,12 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1367,7 +1402,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1381,7 +1417,7 @@ Module iter. b_last.or(a_last) } *) - Definition last (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -1486,7 +1522,7 @@ Module iter. } } *) - Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -1580,8 +1616,13 @@ Module iter. M.copy (| M.match_operator (| M.alloc (| - Value.Tuple - [ M.read (| a_upper |); M.read (| b_upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a_upper |)); + A.to_value (M.read (| b_upper |)) + ] + |) |), [ fun γ => @@ -1617,15 +1658,23 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |))) ] |) |) in M.alloc (| - Value.Tuple [ M.read (| lower |); M.read (| upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| lower |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |))) @@ -1715,13 +1764,18 @@ Module iter. "b" |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))) ] |) @@ -1759,7 +1813,7 @@ Module iter. and_then_or_clear(&mut self.b, |b| b.next_back()).or_else(|| self.a.as_mut()?.next_back()) } *) - Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -1793,8 +1847,8 @@ Module iter. "core::iter::adapters::chain::Chain", "b" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1817,11 +1871,12 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1925,7 +1980,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1949,7 +2005,7 @@ Module iter. NonZeroUsize::new(n).map_or(Ok(()), Err) } *) - Definition advance_back_by (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; n ] => @@ -1961,7 +2017,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2008,9 +2064,14 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| Value.Tuple [] |)) + ] + |) |) |) |) @@ -2045,15 +2106,15 @@ Module iter. "core::iter::adapters::chain::Chain", "b" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2088,7 +2149,7 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2118,8 +2179,12 @@ Module iter. |), [ M.read (| n |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -2145,7 +2210,7 @@ Module iter. self.a.as_mut()?.nth_back(n) } *) - Definition nth_back (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; n ] => @@ -2157,7 +2222,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2216,7 +2281,9 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.Integer Integer.Usize 0 |))); + (M.alloc (| + M.of_value (| Value.Integer 0 |) + |))); fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in @@ -2257,10 +2324,10 @@ Module iter. "core::iter::adapters::chain::Chain", "b" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2369,7 +2436,7 @@ Module iter. .or_else(|| self.a.as_mut()?.rfind(predicate)) } *) - Definition rfind (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfind (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ P ], [ self; predicate ] => @@ -2404,8 +2471,8 @@ Module iter. "core::iter::adapters::chain::Chain", "b" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2428,11 +2495,12 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2537,7 +2605,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2561,7 +2630,7 @@ Module iter. try { acc } } *) - Definition try_rfold (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ Acc; F; R ], [ self; acc; f ] => @@ -2574,7 +2643,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2668,15 +2737,15 @@ Module iter. "core::iter::adapters::chain::Chain", "b" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2763,8 +2832,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2798,7 +2867,7 @@ Module iter. acc } *) - Definition rfold (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ Acc; F ], [ self; acc; f ] => @@ -2809,7 +2878,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2840,13 +2909,13 @@ Module iter. [ M.read (| b |); M.read (| acc |); f ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2877,8 +2946,8 @@ Module iter. [ M.read (| a |); M.read (| acc |); M.read (| f |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in acc @@ -2938,7 +3007,7 @@ Module iter. Chain::new(Default::default(), Default::default()) } *) - Definition default (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [] => @@ -2981,7 +3050,7 @@ Module iter. x } *) - Definition and_then_or_clear (τ : list Ty.t) (α : list Value.t) : M := + Definition and_then_or_clear (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; U; impl_FnOnce__mut_T__arrow_Option_U_ ], [ opt; f ] => ltac:(M.monadic @@ -3002,85 +3071,90 @@ Module iter. |), [ M.read (| f |); - Value.Tuple - [ - M.read (| - M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::Try", - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "&mut") [ T ] ], - [], - "branch", - [] - |), - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ T ], - "as_mut", + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&mut") [ T ] ], + [], + "branch", [] |), - [ M.read (| opt |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ T ], + "as_mut", + [] + |), + [ M.read (| opt |) ] + |) + ] |) - ] - |) - |), - [ - 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::option::Option") [ U ], - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "core::convert::Infallible" ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + |), + [ + 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::option::Option") + [ U ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "core::convert::Infallible" ] + ], + "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 - M.alloc (| M.read (| val |) |))) - ] - |) - |) - ] + |))); + 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 + M.alloc (| M.read (| val |) |))) + ] + |) + |)) + ] + |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3101,10 +3175,10 @@ Module iter. let _ := M.write (| M.read (| opt |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in x diff --git a/CoqOfRust/core/iter/adapters/cloned.v b/CoqOfRust/core/iter/adapters/cloned.v index 3ef2aa972..ac17b565e 100644 --- a/CoqOfRust/core/iter/adapters/cloned.v +++ b/CoqOfRust/core/iter/adapters/cloned.v @@ -16,27 +16,30 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::cloned::Cloned") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::cloned::Cloned" - [ - ("it", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::cloned::Cloned", - "it" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::cloned::Cloned" + [ + ("it", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::cloned::Cloned", + "it" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -54,7 +57,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::cloned::Cloned") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -69,17 +72,18 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Cloned" |); - M.read (| Value.String "it" |); + M.read (| M.of_value (| Value.String "Cloned" |) |); + M.read (| M.of_value (| Value.String "it" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::cloned::Cloned", "it" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -103,15 +107,17 @@ Module iter. Cloned { it } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ it ] => ltac:(M.monadic (let it := M.alloc (| it |) in - Value.StructRecord - "core::iter::adapters::cloned::Cloned" - [ ("it", M.read (| it |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::cloned::Cloned" + [ ("it", A.to_value (M.read (| it |))) ] + |))) | _, _ => M.impossible end. @@ -125,13 +131,13 @@ Module iter. move |acc, elt| f(acc, elt.clone()) } *) - Definition clone_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; Acc; R; impl_FnMut_Acc__T__arrow_R ], [ f ] => ltac:(M.monadic (let f := M.alloc (| f |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -157,20 +163,23 @@ Module iter. |), [ f; - Value.Tuple - [ - M.read (| acc |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - T, - [], - "clone", - [] - |), - [ M.read (| elt |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + T, + [], + "clone", + [] + |), + [ M.read (| elt |) ] + |)) + ] + |) ] |))) ] @@ -178,7 +187,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -198,7 +208,7 @@ Module iter. self.it.next().cloned() } *) - Definition next (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -237,7 +247,7 @@ Module iter. self.it.size_hint() } *) - Definition size_hint (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -272,7 +282,7 @@ Module iter. self.it.try_fold(init, clone_try_fold(f)) } *) - Definition try_fold (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -315,7 +325,7 @@ Module iter. self.it.map(T::clone).fold(init, f) } *) - Definition fold (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -370,7 +380,7 @@ Module iter. unsafe { try_get_unchecked(&mut self.it, idx).clone() } } *) - Definition __iterator_get_unchecked (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self; idx ] => @@ -422,7 +432,7 @@ Module iter. self.it.next_back().cloned() } *) - Definition next_back (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -466,7 +476,7 @@ Module iter. self.it.try_rfold(init, clone_try_fold(f)) } *) - Definition try_rfold (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -509,7 +519,7 @@ Module iter. self.it.map(T::clone).rfold(init, f) } *) - Definition rfold (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -577,7 +587,7 @@ Module iter. self.it.len() } *) - Definition len (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -607,7 +617,7 @@ Module iter. self.it.is_empty() } *) - Definition is_empty (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -677,9 +687,9 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = true; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (I : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (I : Ty.t) : A.t := let Self : Ty.t := Self I in - M.run ltac:(M.monadic (M.alloc (| Value.Bool true |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))). Axiom Implements : forall (I : Ty.t), @@ -717,7 +727,7 @@ Module iter. item.clone() } *) - Definition next_unchecked (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -771,7 +781,7 @@ Module iter. Self::new(Default::default()) } *) - Definition default (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [] => diff --git a/CoqOfRust/core/iter/adapters/copied.v b/CoqOfRust/core/iter/adapters/copied.v index 49e0eb952..04c12d9d1 100644 --- a/CoqOfRust/core/iter/adapters/copied.v +++ b/CoqOfRust/core/iter/adapters/copied.v @@ -16,27 +16,30 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::copied::Copied") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::copied::Copied" - [ - ("it", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::copied::Copied", - "it" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::copied::Copied" + [ + ("it", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::copied::Copied", + "it" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -54,7 +57,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::copied::Copied") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -69,17 +72,18 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Copied" |); - M.read (| Value.String "it" |); + M.read (| M.of_value (| Value.String "Copied" |) |); + M.read (| M.of_value (| Value.String "it" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::copied::Copied", "it" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -103,15 +107,17 @@ Module iter. Copied { it } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ it ] => ltac:(M.monadic (let it := M.alloc (| it |) in - Value.StructRecord - "core::iter::adapters::copied::Copied" - [ ("it", M.read (| it |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::copied::Copied" + [ ("it", A.to_value (M.read (| it |))) ] + |))) | _, _ => M.impossible end. @@ -125,13 +131,13 @@ Module iter. move |acc, &elt| f(acc, elt) } *) - Definition copy_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; Acc; impl_FnMut_Acc__T__arrow_Acc ], [ f ] => ltac:(M.monadic (let f := M.alloc (| f |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -156,14 +162,24 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| acc |); M.read (| elt |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| elt |)) + ] + |) + ] |))) ] |))) ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -176,13 +192,13 @@ Module iter. move |acc, &elt| f(acc, elt) } *) - Definition copy_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; Acc; R; impl_FnMut_Acc__T__arrow_R ], [ f ] => ltac:(M.monadic (let f := M.alloc (| f |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -207,14 +223,24 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| acc |); M.read (| elt |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| elt |)) + ] + |) + ] |))) ] |))) ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -234,7 +260,7 @@ Module iter. self.it.next().copied() } *) - Definition next (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -278,7 +304,7 @@ Module iter. >::spec_next_chunk(&mut self.it) } *) - Definition next_chunk (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_chunk (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -308,7 +334,7 @@ Module iter. self.it.size_hint() } *) - Definition size_hint (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -343,7 +369,7 @@ Module iter. self.it.try_fold(init, copy_try_fold(f)) } *) - Definition try_fold (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -386,7 +412,7 @@ Module iter. self.it.fold(init, copy_fold(f)) } *) - Definition fold (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -425,7 +451,7 @@ Module iter. self.it.nth(n).copied() } *) - Definition nth (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self; n ] => @@ -466,7 +492,7 @@ Module iter. self.it.last().copied() } *) - Definition last (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -507,7 +533,7 @@ Module iter. self.it.count() } *) - Definition count (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -539,7 +565,7 @@ Module iter. self.it.advance_by(n) } *) - Definition advance_by (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self; n ] => @@ -576,7 +602,7 @@ Module iter. *unsafe { try_get_unchecked(&mut self.it, idx) } } *) - Definition __iterator_get_unchecked (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self; idx ] => @@ -630,7 +656,7 @@ Module iter. self.it.next_back().copied() } *) - Definition next_back (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -674,7 +700,7 @@ Module iter. self.it.try_rfold(init, copy_try_fold(f)) } *) - Definition try_rfold (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -717,7 +743,7 @@ Module iter. self.it.rfold(init, copy_fold(f)) } *) - Definition rfold (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -756,7 +782,7 @@ Module iter. self.it.advance_back_by(n) } *) - Definition advance_back_by (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self; n ] => @@ -807,7 +833,7 @@ Module iter. self.it.len() } *) - Definition len (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -837,7 +863,7 @@ Module iter. self.it.is_empty() } *) - Definition is_empty (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -907,7 +933,7 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = I::MAY_HAVE_SIDE_EFFECT; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (I : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -950,7 +976,7 @@ Module iter. array::iter_next_chunk(&mut self.copied()) } *) - Definition spec_next_chunk (I T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_chunk (I T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I T in match τ, α with | [], [ self ] => @@ -1037,7 +1063,7 @@ Module iter. } } *) - Definition spec_next_chunk (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_chunk (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1074,7 +1100,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1091,20 +1117,21 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| len |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| len |), + M.read (| M.get_constant (| "core::iter::adapters::copied::N" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1133,39 +1160,52 @@ Module iter. fun γ => ltac:(M.monadic (M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::array::iter::IntoIter") - [ T ], - "new_unchecked", - [] - |), - [ - M.read (| raw_array |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::array::iter::IntoIter") + [ T ], + "new_unchecked", + [] + |), [ - ("start", - Value.Integer - Integer.Usize - 0); - ("end_", M.read (| len |)) + M.read (| raw_array |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer + 0 + |))); + ("end_", + A.to_value + (M.read (| + len + |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -1190,44 +1230,48 @@ Module iter. fun γ => ltac:(M.monadic (M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ T ], - "array_assume_init", - [] - |), - [ M.read (| raw_array |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ T ], + "array_assume_init", + [] + |), + [ M.read (| raw_array |) ] + |)) + ] + |) |))) ] |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| len |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| len |), + M.read (| M.get_constant (| "core::iter::adapters::copied::N" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1270,8 +1314,8 @@ Module iter. |) ] |); - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1284,8 +1328,9 @@ Module iter. "as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion raw_array ] - |)); + [ (* Unsize *) M.pointer_coercion (| raw_array |) ] + |) + |); M.read (| len |) ] |) @@ -1307,35 +1352,45 @@ Module iter. fun γ => ltac:(M.monadic (M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::array::iter::IntoIter") - [ T ], - "new_unchecked", - [] - |), - [ - M.read (| raw_array |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::array::iter::IntoIter") + [ T ], + "new_unchecked", + [] + |), [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| len |)) + M.read (| raw_array |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value (M.read (| len |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1364,8 +1419,8 @@ Module iter. |) ] |); - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1377,8 +1432,9 @@ Module iter. "as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion raw_array ] - |)); + [ (* Unsize *) M.pointer_coercion (| raw_array |) ] + |) + |); M.read (| M.get_constant (| "core::iter::adapters::copied::N" |) |) ] |) @@ -1403,20 +1459,23 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ T ], - "array_assume_init", - [] - |), - [ M.read (| raw_array |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ], + "array_assume_init", + [] + |), + [ M.read (| raw_array |) ] + |)) + ] + |) |))) ] |) @@ -1443,7 +1502,7 @@ Module iter. Self::new(Default::default()) } *) - Definition default (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [] => diff --git a/CoqOfRust/core/iter/adapters/cycle.v b/CoqOfRust/core/iter/adapters/cycle.v index 01e27baa8..6ea1cee78 100644 --- a/CoqOfRust/core/iter/adapters/cycle.v +++ b/CoqOfRust/core/iter/adapters/cycle.v @@ -16,38 +16,42 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::cycle::Cycle") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::cycle::Cycle" - [ - ("orig", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::cycle::Cycle", - "orig" - |) - ] - |)); - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::cycle::Cycle", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::cycle::Cycle" + [ + ("orig", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::cycle::Cycle", + "orig" + |) + ] + |))); + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::cycle::Cycle", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -65,7 +69,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::cycle::Cycle") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -80,25 +84,27 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Cycle" |); - M.read (| Value.String "orig" |); + M.read (| M.of_value (| Value.String "Cycle" |) |); + M.read (| M.of_value (| Value.String "orig" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::cycle::Cycle", "orig" - |)); - M.read (| Value.String "iter" |); + |) + |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::cycle::Cycle", "iter" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -122,22 +128,25 @@ Module iter. Cycle { orig: iter.clone(), iter } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "core::iter::adapters::cycle::Cycle" - [ - ("orig", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ iter ] - |)); - ("iter", M.read (| iter |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::cycle::Cycle" + [ + ("orig", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ iter ] + |))); + ("iter", A.to_value (M.read (| iter |))) + ] + |))) | _, _ => M.impossible end. @@ -164,7 +173,7 @@ Module iter. } } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -249,7 +258,7 @@ Module iter. } } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -282,10 +291,7 @@ Module iter. let γ1_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ1_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ1_0 |), - Value.Integer Integer.Usize 0 - |) in + M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 0 |) in let γ2_0 := M.SubPointer.get_struct_tuple_field (| γ1_1, @@ -293,35 +299,39 @@ Module iter. 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ2_0 |), - Value.Integer Integer.Usize 0 - |) in + M.is_constant_or_break_match (| M.read (| γ2_0 |), Value.Integer 0 |) in sz)); 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_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.Usize 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple "core::option::Option::None" [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.read (| M.get_constant (| "core::num::MAX" |) |); - Value.StructTuple "core::option::Option::None" [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)); + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |)) + ] + |) |))) ] |) @@ -359,7 +369,7 @@ Module iter. } } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F; R ], [ self; acc; f ] => @@ -466,7 +476,7 @@ Module iter. ] |) |) in - let is_empty := M.alloc (| Value.Bool true |) in + let is_empty := M.alloc (| M.of_value (| Value.Bool true |) |) in let _ := M.write (| acc, @@ -497,8 +507,8 @@ Module iter. "iter" |); M.read (| acc |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -518,7 +528,9 @@ Module iter. let _ := M.write (| is_empty, - Value.Bool false + M.of_value (| + Value.Bool false + |) |) in M.alloc (| M.call_closure (| @@ -534,11 +546,15 @@ Module iter. |), [ f; - Value.Tuple - [ - M.read (| acc |); - M.read (| x |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| acc |)); + A.to_value + (M.read (| x |)) + ] + |) ] |) |) @@ -548,7 +564,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -598,7 +615,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -626,7 +643,7 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -736,7 +753,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) |) |) @@ -765,7 +782,7 @@ Module iter. NonZeroUsize::new(n).map_or(Ok(()), Err) } *) - Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -810,9 +827,11 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) |) |) @@ -843,16 +862,17 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| n |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -920,9 +940,14 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| Value.Tuple [] |)) + ] + |) |) |) |) @@ -939,8 +964,8 @@ Module iter. let rem := M.copy (| γ1_0 |) in let γ := M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", @@ -948,8 +973,9 @@ Module iter. [] |), [ M.read (| rem |) ] - |)) - (M.read (| n |)) + |), + M.read (| n |) + |) |) in let _ := M.is_constant_or_break_match (| @@ -984,7 +1010,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -994,7 +1020,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1028,8 +1054,12 @@ Module iter. |), [ M.read (| n |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) diff --git a/CoqOfRust/core/iter/adapters/enumerate.v b/CoqOfRust/core/iter/adapters/enumerate.v index 353a4439c..203c75e99 100644 --- a/CoqOfRust/core/iter/adapters/enumerate.v +++ b/CoqOfRust/core/iter/adapters/enumerate.v @@ -16,44 +16,48 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::enumerate::Enumerate") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::enumerate::Enumerate" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::enumerate::Enumerate", - "iter" - |) - ] - |)); - ("count", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::enumerate::Enumerate", - "count" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::enumerate::Enumerate" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::enumerate::Enumerate", + "iter" + |) + ] + |))); + ("count", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::enumerate::Enumerate", + "count" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -71,7 +75,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::enumerate::Enumerate") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -86,25 +90,27 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Enumerate" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "Enumerate" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::enumerate::Enumerate", "iter" - |)); - M.read (| Value.String "count" |); + |) + |); + M.read (| M.of_value (| Value.String "count" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::enumerate::Enumerate", "count" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -128,15 +134,20 @@ Module iter. Enumerate { iter, count: 0 } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "core::iter::adapters::enumerate::Enumerate" - [ ("iter", M.read (| iter |)); ("count", Value.Integer Integer.Usize 0) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::enumerate::Enumerate" + [ + ("iter", A.to_value (M.read (| iter |))); + ("count", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -160,7 +171,7 @@ Module iter. Some((i, a)) } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -265,12 +276,24 @@ Module iter. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| i |); M.read (| a |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| i |)); A.to_value (M.read (| a |)) ] + |)) + ] + |) |) |))) |))) @@ -282,7 +305,7 @@ Module iter. self.iter.size_hint() } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -315,7 +338,7 @@ Module iter. Some((i, a)) } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -408,6 +431,7 @@ Module iter. let i := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -425,12 +449,24 @@ Module iter. "core::iter::adapters::enumerate::Enumerate", "count" |), - BinOp.Panic.add (| M.read (| i |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| i |); M.read (| a |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| i |)); A.to_value (M.read (| a |)) ] + |)) + ] + |) |) |))) |))) @@ -442,7 +478,7 @@ Module iter. self.iter.count() } *) - Definition count (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -492,7 +528,7 @@ Module iter. self.iter.try_fold(init, enumerate(&mut self.count, fold)) } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -552,7 +588,7 @@ Module iter. self.iter.fold(init, enumerate(self.count, fold)) } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -606,7 +642,7 @@ Module iter. remaining } *) - Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -659,6 +695,7 @@ Module iter. let rem := M.copy (| γ0_0 |) in M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), M.call_closure (| M.get_associated_function (| @@ -680,7 +717,10 @@ Module iter. "core::iter::adapters::enumerate::Enumerate", "count" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| advanced |) |) |) in + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| advanced |) |) + |) in remaining |))) | _, _ => M.impossible @@ -697,7 +737,7 @@ Module iter. (self.count + idx, value) } *) - Definition __iterator_get_unchecked (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; idx ] => @@ -720,20 +760,24 @@ Module iter. |) |) in M.alloc (| - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::enumerate::Enumerate", - "count" - |) - |), - M.read (| idx |) - |); - M.read (| value |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::enumerate::Enumerate", + "count" + |) + |), + M.read (| idx |) + |)); + A.to_value (M.read (| value |)) + ] + |) |) |))) | _, _ => M.impossible @@ -772,7 +816,7 @@ Module iter. Some((self.count + len, a)) } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -880,24 +924,31 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::enumerate::Enumerate", - "count" - |) - |), - M.read (| len |) - |); - M.read (| a |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::enumerate::Enumerate", + "count" + |) + |), + M.read (| len |) + |)); + A.to_value (M.read (| a |)) + ] + |)) + ] + |) |) |))) |))) @@ -913,7 +964,7 @@ Module iter. Some((self.count + len, a)) } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1023,24 +1074,31 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::enumerate::Enumerate", - "count" - |) - |), - M.read (| len |) - |); - M.read (| a |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::enumerate::Enumerate", + "count" + |) + |), + M.read (| len |) + |)); + A.to_value (M.read (| a |)) + ] + |)) + ] + |) |) |))) |))) @@ -1070,7 +1128,7 @@ Module iter. self.iter.try_rfold(init, enumerate(count, fold)) } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -1082,6 +1140,7 @@ Module iter. let count := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1155,7 +1214,7 @@ Module iter. self.iter.rfold(init, enumerate(count, fold)) } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1167,6 +1226,7 @@ Module iter. let count := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -1228,7 +1288,7 @@ Module iter. self.iter.advance_back_by(n) } *) - Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1280,7 +1340,7 @@ Module iter. self.iter.len() } *) - Definition len (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1310,7 +1370,7 @@ Module iter. self.iter.is_empty() } *) - Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1365,7 +1425,7 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = I::MAY_HAVE_SIDE_EFFECT; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (I : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -1436,7 +1496,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1476,7 +1536,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I : Ty.t) : Value.t := + Definition value_EXPAND_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -1486,7 +1546,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I : Ty.t) : Value.t := + Definition value_MERGE_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -1514,7 +1574,7 @@ Module iter. Enumerate::new(Default::default()) } *) - Definition default (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [] => diff --git a/CoqOfRust/core/iter/adapters/filter.v b/CoqOfRust/core/iter/adapters/filter.v index dcc089930..a7492e86e 100644 --- a/CoqOfRust/core/iter/adapters/filter.v +++ b/CoqOfRust/core/iter/adapters/filter.v @@ -16,38 +16,42 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::filter::Filter") [ I; P ]. (* Clone *) - Definition clone (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::filter::Filter" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::filter::Filter", - "iter" - |) - ] - |)); - ("predicate", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::filter::Filter", - "predicate" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::filter::Filter" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::filter::Filter", + "iter" + |) + ] + |))); + ("predicate", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::filter::Filter", + "predicate" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -69,16 +73,21 @@ Module iter. Filter { iter, predicate } } *) - Definition new (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ iter; predicate ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let predicate := M.alloc (| predicate |) in - Value.StructRecord - "core::iter::adapters::filter::Filter" - [ ("iter", M.read (| iter |)); ("predicate", M.read (| predicate |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::filter::Filter" + [ + ("iter", A.to_value (M.read (| iter |))); + ("predicate", A.to_value (M.read (| predicate |))) + ] + |))) | _, _ => M.impossible end. @@ -96,7 +105,7 @@ Module iter. f.debug_struct("Filter").field("iter", &self.iter).finish() } *) - Definition fmt (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self; f ] => @@ -124,17 +133,18 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Filter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Filter" |) |) ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::filter::Filter", "iter" - |)) + |) + |) ] |) ] @@ -159,15 +169,15 @@ Module iter. move |acc, item| if predicate(&item) { fold(acc, item) } else { acc } } *) - Definition filter_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition filter_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; Acc; impl_FnMut__T__arrow_bool; impl_FnMut_Acc__T__arrow_Acc ], [ predicate; fold ] => ltac:(M.monadic (let predicate := M.alloc (| predicate |) in let fold := M.alloc (| fold |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -185,7 +195,7 @@ Module iter. (let item := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -201,7 +211,12 @@ Module iter. "call_mut", [] |), - [ predicate; Value.Tuple [ item ] ] + [ + predicate; + M.of_value (| + Value.Tuple [ A.to_value item ] + |) + ] |) |)) in let _ := @@ -220,8 +235,13 @@ Module iter. |), [ fold; - Value.Tuple - [ M.read (| acc |); M.read (| item |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| item |)) + ] + |) ] |) |))); @@ -234,7 +254,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -250,15 +271,15 @@ Module iter. move |acc, item| if predicate(&item) { fold(acc, item) } else { try { acc } } } *) - Definition filter_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition filter_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; Acc; R; impl_FnMut__T__arrow_bool; impl_FnMut_Acc__T__arrow_R__plus__'a ], [ predicate; fold ] => ltac:(M.monadic (let predicate := M.alloc (| predicate |) in let fold := M.alloc (| fold |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -276,7 +297,7 @@ Module iter. (let item := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -292,7 +313,11 @@ Module iter. "call_mut", [] |), - [ M.read (| predicate |); Value.Tuple [ item ] + [ + M.read (| predicate |); + M.of_value (| + Value.Tuple [ A.to_value item ] + |) ] |) |)) in @@ -312,8 +337,13 @@ Module iter. |), [ fold; - Value.Tuple - [ M.read (| acc |); M.read (| item |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| item |)) + ] + |) ] |) |))); @@ -339,7 +369,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -359,7 +390,7 @@ Module iter. self.iter.find(&mut self.predicate) } *) - Definition next (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -441,7 +472,7 @@ Module iter. } } *) - Definition next_chunk (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_chunk (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -461,12 +492,14 @@ Module iter. |) in let guard := M.alloc (| - Value.StructRecord - "core::iter::adapters::filter::next_chunk::Guard" - [ - ("array", (* Unsize *) M.pointer_coercion array); - ("initialized", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "core::iter::adapters::filter::next_chunk::Guard" + [ + ("array", A.to_value (* Unsize *) (M.pointer_coercion (| array |))); + ("initialized", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let result := M.alloc (| @@ -493,8 +526,8 @@ Module iter. "core::iter::adapters::filter::Filter", "iter" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -521,9 +554,10 @@ Module iter. "initialized" |), BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", P, @@ -541,9 +575,12 @@ Module iter. "core::iter::adapters::filter::Filter", "predicate" |); - Value.Tuple [ element ] + M.of_value (| + Value.Tuple [ A.to_value element ] + |) ] - |)) + |) + |) |) |) in let _ := @@ -586,26 +623,27 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| guard, "core::iter::adapters::filter::next_chunk::Guard", "initialized" |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::iter::adapters::filter::next_chunk::N" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -613,16 +651,26 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.of_value (| Value.Tuple [] |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.of_value (| Value.Tuple [] |)) + ] + |) |))) ] |) @@ -630,7 +678,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -663,20 +712,23 @@ Module iter. 0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.associated ], - "array_assume_init", - [] - |), - [ M.read (| array |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.associated ], + "array_assume_init", + [] + |), + [ M.read (| array |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -710,28 +762,34 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::array::iter::IntoIter") - [ Ty.associated ], - "new_unchecked", - [] - |), - [ - M.read (| array |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::array::iter::IntoIter") + [ Ty.associated ], + "new_unchecked", + [] + |), [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| initialized |)) + M.read (| array |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| initialized |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -745,7 +803,7 @@ Module iter. (0, upper) // can't know a lower bound, due to the predicate } *) - Definition size_hint (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -778,7 +836,13 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let upper := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple [ Value.Integer Integer.Usize 0; M.read (| upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |) @@ -796,7 +860,7 @@ Module iter. self.iter.map(to_usize(self.predicate)).sum() } *) - Definition count (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -856,7 +920,7 @@ Module iter. self.iter.try_fold(init, filter_try_fold(&mut self.predicate, fold)) } *) - Definition try_fold (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -906,7 +970,7 @@ Module iter. self.iter.fold(init, filter_fold(self.predicate, fold)) } *) - Definition fold (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -979,7 +1043,7 @@ Module iter. self.iter.rfind(&mut self.predicate) } *) - Definition next_back (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -1019,7 +1083,7 @@ Module iter. self.iter.try_rfold(init, filter_try_fold(&mut self.predicate, fold)) } *) - Definition try_rfold (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -1069,7 +1133,7 @@ Module iter. self.iter.rfold(init, filter_fold(self.predicate, fold)) } *) - Definition rfold (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1168,7 +1232,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (P I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (P I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P I in match τ, α with | [], [ self ] => @@ -1208,7 +1272,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I P : Ty.t) : Value.t := + Definition value_EXPAND_BY (I P : Ty.t) : A.t := let Self : Ty.t := Self I P in M.run ltac:(M.monadic @@ -1218,7 +1282,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I P : Ty.t) : Value.t := + Definition value_MERGE_BY (I P : Ty.t) : A.t := let Self : Ty.t := Self I P in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/filter_map.v b/CoqOfRust/core/iter/adapters/filter_map.v index 3f473fc50..d5a4fa411 100644 --- a/CoqOfRust/core/iter/adapters/filter_map.v +++ b/CoqOfRust/core/iter/adapters/filter_map.v @@ -16,38 +16,42 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::filter_map::FilterMap") [ I; F ]. (* Clone *) - Definition clone (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::filter_map::FilterMap" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::filter_map::FilterMap", - "iter" - |) - ] - |)); - ("f", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::filter_map::FilterMap", - "f" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::filter_map::FilterMap" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::filter_map::FilterMap", + "iter" + |) + ] + |))); + ("f", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::filter_map::FilterMap", + "f" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -69,16 +73,18 @@ Module iter. FilterMap { iter, f } } *) - Definition new (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ iter; f ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let f := M.alloc (| f |) in - Value.StructRecord - "core::iter::adapters::filter_map::FilterMap" - [ ("iter", M.read (| iter |)); ("f", M.read (| f |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::filter_map::FilterMap" + [ ("iter", A.to_value (M.read (| iter |))); ("f", A.to_value (M.read (| f |))) ] + |))) | _, _ => M.impossible end. @@ -96,7 +102,7 @@ Module iter. f.debug_struct("FilterMap").field("iter", &self.iter).finish() } *) - Definition fmt (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self; f ] => @@ -124,17 +130,18 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "FilterMap" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "FilterMap" |) |) ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::filter_map::FilterMap", "iter" - |)) + |) + |) ] |) ] @@ -162,14 +169,14 @@ Module iter. } } *) - Definition filter_map_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition filter_map_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; B; Acc; impl_FnMut_T__arrow_Option_B_; impl_FnMut_Acc__B__arrow_Acc ], [ f; fold ] => ltac:(M.monadic (let f := M.alloc (| f |) in let fold := M.alloc (| fold |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -196,7 +203,12 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| item |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| item |)) ] + |) + ] |) |), [ @@ -220,7 +232,13 @@ Module iter. |), [ fold; - Value.Tuple [ M.read (| acc |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| x |)) + ] + |) ] |) |))); @@ -233,7 +251,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -252,15 +271,15 @@ Module iter. } } *) - Definition filter_map_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition filter_map_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; B; Acc; R; impl_FnMut_T__arrow_Option_B_; impl_FnMut_Acc__B__arrow_R__plus__'a ], [ f; fold ] => ltac:(M.monadic (let f := M.alloc (| f |) in let fold := M.alloc (| fold |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -287,7 +306,12 @@ Module iter. "call_mut", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| item |) ] ] + [ + M.read (| f |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| item |)) ] + |) + ] |) |), [ @@ -311,7 +335,13 @@ Module iter. |), [ fold; - Value.Tuple [ M.read (| acc |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| x |)) + ] + |) ] |) |))); @@ -337,7 +367,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -357,7 +388,7 @@ Module iter. self.iter.find_map(&mut self.f) } *) - Definition next (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -448,7 +479,7 @@ Module iter. } } *) - Definition next_chunk (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_chunk (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -468,12 +499,14 @@ Module iter. |) in let guard := M.alloc (| - Value.StructRecord - "core::iter::adapters::filter_map::next_chunk::Guard" - [ - ("array", (* Unsize *) M.pointer_coercion array); - ("initialized", Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.StructRecord + "core::iter::adapters::filter_map::next_chunk::Guard" + [ + ("array", A.to_value (* Unsize *) (M.pointer_coercion (| array |))); + ("initialized", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let result := M.alloc (| @@ -500,8 +533,8 @@ Module iter. "core::iter::adapters::filter_map::FilterMap", "iter" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -536,7 +569,10 @@ Module iter. "core::iter::adapters::filter_map::FilterMap", "f" |); - Value.Tuple [ M.read (| element |) ] + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| element |)) ] + |) ] |) |) in @@ -548,9 +584,10 @@ Module iter. "initialized" |), BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -559,7 +596,8 @@ Module iter. [] |), [ val ] - |)) + |) + |) |) |) in let _ := @@ -605,7 +643,9 @@ Module iter. [ M.read (| (* `OffsetOf` expression are not handled yet *) - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |) ] |) @@ -672,7 +712,7 @@ Module iter. [ M.read (| opt_payload_at |); M.read (| dst |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -690,28 +730,29 @@ Module iter. [ M.read (| val |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| guard, "core::iter::adapters::filter_map::next_chunk::Guard", "initialized" |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::iter::adapters::filter_map::next_chunk::N" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -719,16 +760,26 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.of_value (| Value.Tuple [] |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.of_value (| Value.Tuple [] |)) + ] + |) |))) ] |) @@ -736,7 +787,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -769,18 +821,23 @@ Module iter. 0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ B ], - "array_assume_init", - [] - |), - [ M.read (| array |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ B ], + "array_assume_init", + [] + |), + [ M.read (| array |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -815,26 +872,32 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::array::iter::IntoIter") [ B ], - "new_unchecked", - [] - |), - [ - M.read (| array |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::array::iter::IntoIter") [ B ], + "new_unchecked", + [] + |), [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| initialized |)) + M.read (| array |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| initialized |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -848,7 +911,7 @@ Module iter. (0, upper) // can't know a lower bound, due to the predicate } *) - Definition size_hint (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -881,7 +944,13 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let upper := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple [ Value.Integer Integer.Usize 0; M.read (| upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |) @@ -899,7 +968,7 @@ Module iter. self.iter.try_fold(init, filter_map_try_fold(&mut self.f, fold)) } *) - Definition try_fold (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -949,7 +1018,7 @@ Module iter. self.iter.fold(init, filter_map_fold(self.f, fold)) } *) - Definition fold (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1031,7 +1100,7 @@ Module iter. self.iter.try_rfold((), find(&mut self.f)).break_value() } *) - Definition next_back (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -1062,7 +1131,7 @@ Module iter. "core::iter::adapters::filter_map::FilterMap", "iter" |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "find.next_back", [] |), [ @@ -1090,7 +1159,7 @@ Module iter. self.iter.try_rfold(init, filter_map_try_fold(&mut self.f, fold)) } *) - Definition try_rfold (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -1140,7 +1209,7 @@ Module iter. self.iter.rfold(init, filter_map_fold(self.f, fold)) } *) - Definition rfold (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1239,7 +1308,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => @@ -1279,7 +1348,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I F : Ty.t) : Value.t := + Definition value_EXPAND_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic @@ -1289,7 +1358,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I F : Ty.t) : Value.t := + Definition value_MERGE_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/flatten.v b/CoqOfRust/core/iter/adapters/flatten.v index 761018ba9..4ffa87ed9 100644 --- a/CoqOfRust/core/iter/adapters/flatten.v +++ b/CoqOfRust/core/iter/adapters/flatten.v @@ -26,42 +26,45 @@ Module iter. FlatMap { inner: FlattenCompat::new(iter.map(f)) } } *) - Definition new (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ iter; f ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let f := M.alloc (| f |) in - Value.StructRecord - "core::iter::adapters::flatten::FlatMap" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::iter::adapters::flatten::FlattenCompat") - [ - Ty.apply (Ty.path "core::iter::adapters::map::Map") [ I; F ]; - Ty.associated - ], - "new", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - I, - [], - "map", - [ U; F ] + M.of_value (| + Value.StructRecord + "core::iter::adapters::flatten::FlatMap" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::iter::adapters::flatten::FlattenCompat") + [ + Ty.apply (Ty.path "core::iter::adapters::map::Map") [ I; F ]; + Ty.associated + ], + "new", + [] |), - [ M.read (| iter |); M.read (| f |) ] - |) - ] - |)) - ])) + [ + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + I, + [], + "map", + [ U; F ] + |), + [ M.read (| iter |); M.read (| f |) ] + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -79,38 +82,41 @@ Module iter. FlatMap { inner: self.inner.clone() } } *) - Definition clone (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::flatten::FlatMap" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::flatten::FlattenCompat") + M.of_value (| + Value.StructRecord + "core::iter::adapters::flatten::FlatMap" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::iter::adapters::flatten::FlattenCompat") + [ + Ty.apply (Ty.path "core::iter::adapters::map::Map") [ I; F ]; + Ty.associated + ], + [], + "clone", + [] + |), [ - Ty.apply (Ty.path "core::iter::adapters::map::Map") [ I; F ]; - Ty.associated - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::flatten::FlatMap", - "inner" - |) - ] - |)) - ])) + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::flatten::FlatMap", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -132,7 +138,7 @@ Module iter. f.debug_struct("FlatMap").field("inner", &self.inner).finish() } *) - Definition fmt (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self; f ] => @@ -160,17 +166,18 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "FlatMap" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "FlatMap" |) |) ] |) |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::flatten::FlatMap", "inner" - |)) + |) + |) ] |) ] @@ -199,7 +206,7 @@ Module iter. self.inner.next() } *) - Definition next (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self ] => @@ -231,7 +238,7 @@ Module iter. self.inner.size_hint() } *) - Definition size_hint (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self ] => @@ -268,7 +275,7 @@ Module iter. self.inner.try_fold(init, fold) } *) - Definition try_fold (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -307,7 +314,7 @@ Module iter. self.inner.fold(init, fold) } *) - Definition fold (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -345,7 +352,7 @@ Module iter. self.inner.advance_by(n) } *) - Definition advance_by (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self; n ] => @@ -379,7 +386,7 @@ Module iter. self.inner.count() } *) - Definition count (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self ] => @@ -413,7 +420,7 @@ Module iter. self.inner.last() } *) - Definition last (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self ] => @@ -470,7 +477,7 @@ Module iter. self.inner.next_back() } *) - Definition next_back (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self ] => @@ -507,7 +514,7 @@ Module iter. self.inner.try_rfold(init, fold) } *) - Definition try_rfold (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -546,7 +553,7 @@ Module iter. self.inner.rfold(init, fold) } *) - Definition rfold (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -584,7 +591,7 @@ Module iter. self.inner.advance_back_by(n) } *) - Definition advance_back_by (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self; n ] => @@ -669,7 +676,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I U F : Ty.t) : Value.t := + Definition value_EXPAND_BY (I U F : Ty.t) : A.t := let Self : Ty.t := Self I U F in M.run ltac:(M.monadic @@ -679,7 +686,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I U F : Ty.t) : Value.t := + Definition value_MERGE_BY (I U F : Ty.t) : A.t := let Self : Ty.t := Self I U F in M.run ltac:(M.monadic @@ -711,7 +718,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.inner.iter) } } *) - Definition as_inner (I U F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I U F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U F in match τ, α with | [], [ self ] => @@ -839,7 +846,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_UPPER_BOUND (T : Ty.t) : Value.t := + Definition value_UPPER_BOUND (T : Ty.t) : A.t := let Self : Ty.t := Self T in M.run ltac:(M.monadic @@ -870,7 +877,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_UPPER_BOUND (T : Ty.t) : Value.t := + Definition value_UPPER_BOUND (T : Ty.t) : A.t := let Self : Ty.t := Self T in M.run ltac:(M.monadic @@ -902,7 +909,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_UPPER_BOUND (I P : Ty.t) : Value.t := + Definition value_UPPER_BOUND (I P : Ty.t) : A.t := let Self : Ty.t := Self I P in M.run ltac:(M.monadic @@ -926,7 +933,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_UPPER_BOUND (I P : Ty.t) : Value.t := + Definition value_UPPER_BOUND (I P : Ty.t) : A.t := let Self : Ty.t := Self I P in M.run ltac:(M.monadic @@ -950,7 +957,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_UPPER_BOUND (I F : Ty.t) : Value.t := + Definition value_UPPER_BOUND (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic @@ -974,7 +981,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_UPPER_BOUND (I : Ty.t) : Value.t := + Definition value_UPPER_BOUND (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -997,7 +1004,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_UPPER_BOUND (I : Ty.t) : Value.t := + Definition value_UPPER_BOUND (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -1034,27 +1041,30 @@ Module iter. Flatten { inner: FlattenCompat::new(iter) } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "core::iter::adapters::flatten::Flatten" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::iter::adapters::flatten::FlattenCompat") - [ I; Ty.associated ], - "new", - [] - |), - [ M.read (| iter |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::flatten::Flatten" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::iter::adapters::flatten::FlattenCompat") + [ I; Ty.associated ], + "new", + [] + |), + [ M.read (| iter |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1072,7 +1082,7 @@ Module iter. f.debug_struct("Flatten").field("inner", &self.inner).finish() } *) - Definition fmt (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self; f ] => @@ -1100,17 +1110,18 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Flatten" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Flatten" |) |) ] |) |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::flatten::Flatten", "inner" - |)) + |) + |) ] |) ] @@ -1136,33 +1147,38 @@ Module iter. Flatten { inner: self.inner.clone() } } *) - Definition clone (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::flatten::Flatten" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::iter::adapters::flatten::FlattenCompat") [ I; U ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::flatten::Flatten", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::flatten::Flatten" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::iter::adapters::flatten::FlattenCompat") + [ I; U ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::flatten::Flatten", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1187,7 +1203,7 @@ Module iter. self.inner.next() } *) - Definition next (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -1217,7 +1233,7 @@ Module iter. self.inner.size_hint() } *) - Definition size_hint (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -1252,7 +1268,7 @@ Module iter. self.inner.try_fold(init, fold) } *) - Definition try_fold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -1289,7 +1305,7 @@ Module iter. self.inner.fold(init, fold) } *) - Definition fold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1325,7 +1341,7 @@ Module iter. self.inner.advance_by(n) } *) - Definition advance_by (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self; n ] => @@ -1357,7 +1373,7 @@ Module iter. self.inner.count() } *) - Definition count (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -1389,7 +1405,7 @@ Module iter. self.inner.last() } *) - Definition last (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -1444,7 +1460,7 @@ Module iter. self.inner.next_back() } *) - Definition next_back (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -1479,7 +1495,7 @@ Module iter. self.inner.try_rfold(init, fold) } *) - Definition try_rfold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -1516,7 +1532,7 @@ Module iter. self.inner.rfold(init, fold) } *) - Definition rfold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1552,7 +1568,7 @@ Module iter. self.inner.advance_back_by(n) } *) - Definition advance_back_by (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self; n ] => @@ -1635,7 +1651,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I : Ty.t) : Value.t := + Definition value_EXPAND_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -1645,7 +1661,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I : Ty.t) : Value.t := + Definition value_MERGE_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -1677,7 +1693,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.inner.iter) } } *) - Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1728,7 +1744,7 @@ Module iter. Flatten::new(Default::default()) } *) - Definition default (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [] => @@ -1775,67 +1791,72 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::flatten::FlattenCompat") [ I; U ]. (* Clone *) - Definition clone (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::flatten::FlattenCompat" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::iter::adapters::fuse::Fuse") [ I ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::flatten::FlattenCompat", - "iter" - |) - ] - |)); - ("frontiter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ U ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::flatten::FlattenCompat", - "frontiter" - |) - ] - |)); - ("backiter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ U ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::flatten::FlattenCompat", - "backiter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::flatten::FlattenCompat" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::iter::adapters::fuse::Fuse") [ I ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::flatten::FlattenCompat", + "iter" + |) + ] + |))); + ("frontiter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ U ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::flatten::FlattenCompat", + "frontiter" + |) + ] + |))); + ("backiter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ U ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::flatten::FlattenCompat", + "backiter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1853,7 +1874,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::flatten::FlattenCompat") [ I; U ]. (* Debug *) - Definition fmt (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self; f ] => @@ -1868,33 +1889,36 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "FlattenCompat" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "FlattenCompat" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::flatten::FlattenCompat", "iter" - |)); - M.read (| Value.String "frontiter" |); + |) + |); + M.read (| M.of_value (| Value.String "frontiter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::flatten::FlattenCompat", "frontiter" - |)); - M.read (| Value.String "backiter" |); + |) + |); + M.read (| M.of_value (| Value.String "backiter" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::flatten::FlattenCompat", "backiter" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1918,29 +1942,36 @@ Module iter. FlattenCompat { iter: iter.fuse(), frontiter: None, backiter: None } } *) - Definition new (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "core::iter::adapters::flatten::FlattenCompat" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - I, - [], - "fuse", - [] - |), - [ M.read (| iter |) ] - |)); - ("frontiter", Value.StructTuple "core::option::Option::None" []); - ("backiter", Value.StructTuple "core::option::Option::None" []) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::flatten::FlattenCompat" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + I, + [], + "fuse", + [] + |), + [ M.read (| iter |) ] + |))); + ("frontiter", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("backiter", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -1972,7 +2003,7 @@ Module iter. acc } *) - Definition iter_fold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_fold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold ], [ self; acc; fold ] => @@ -1983,7 +2014,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2011,11 +2042,20 @@ Module iter. "call_mut", [] |), - [ fold; Value.Tuple [ M.read (| acc |); M.read (| iter |) ] ] + [ + fold; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| iter |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2047,7 +2087,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2075,11 +2115,20 @@ Module iter. "call_mut", [] |), - [ fold; Value.Tuple [ M.read (| acc |); M.read (| iter |) ] ] + [ + fold; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| iter |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in acc @@ -2121,7 +2170,7 @@ Module iter. try { acc } } *) - Definition iter_try_fold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_try_fold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold; R ], [ self; acc; fold ] => @@ -2134,7 +2183,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2180,7 +2229,13 @@ Module iter. |), [ fold; - Value.Tuple [ M.read (| acc |); M.read (| iter |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| iter |)) + ] + |) ] |) ] @@ -2228,8 +2283,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2239,7 +2294,7 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "frontiter" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.write (| @@ -2340,11 +2395,11 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "frontiter" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2390,7 +2445,13 @@ Module iter. |), [ fold; - Value.Tuple [ M.read (| acc |); M.read (| iter |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| iter |)) + ] + |) ] |) ] @@ -2438,8 +2499,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2449,7 +2510,7 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "backiter" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in M.alloc (| M.call_closure (| @@ -2496,7 +2557,7 @@ Module iter. acc } *) - Definition iter_rfold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_rfold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold ], [ self; acc; fold ] => @@ -2507,7 +2568,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2535,11 +2596,20 @@ Module iter. "call_mut", [] |), - [ fold; Value.Tuple [ M.read (| acc |); M.read (| iter |) ] ] + [ + fold; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| iter |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2571,7 +2641,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2599,11 +2669,20 @@ Module iter. "call_mut", [] |), - [ fold; Value.Tuple [ M.read (| acc |); M.read (| iter |) ] ] + [ + fold; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| iter |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in acc @@ -2645,7 +2724,7 @@ Module iter. try { acc } } *) - Definition iter_try_rfold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_try_rfold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold; R ], [ self; acc; fold ] => @@ -2658,7 +2737,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2704,7 +2783,13 @@ Module iter. |), [ fold; - Value.Tuple [ M.read (| acc |); M.read (| iter |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| iter |)) + ] + |) ] |) ] @@ -2752,8 +2837,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2763,7 +2848,7 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "backiter" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.write (| @@ -2864,11 +2949,11 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "backiter" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2914,7 +2999,13 @@ Module iter. |), [ fold; - Value.Tuple [ M.read (| acc |); M.read (| iter |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| iter |)) + ] + |) ] |) ] @@ -2962,8 +3053,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2973,7 +3064,7 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "frontiter" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in M.alloc (| M.call_closure (| @@ -3019,7 +3110,7 @@ Module iter. } } *) - Definition next (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -3033,7 +3124,7 @@ Module iter. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3080,7 +3171,8 @@ Module iter. M.read (| M.return_ (| M.read (| elt |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -3156,20 +3248,23 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "frontiter" |), - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.associated, - [], - "into_iter", - [] - |), - [ M.read (| inner |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.associated, + [], + "into_iter", + [] + |), + [ M.read (| inner |) ] + |)) + ] + |) |))) ] |))) @@ -3202,7 +3297,7 @@ Module iter. } } *) - Definition size_hint (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -3249,13 +3344,18 @@ Module iter. |) ] |); - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ]; + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |); M.get_trait_method (| "core::iter::traits::iterator::Iterator", U, @@ -3315,13 +3415,18 @@ Module iter. |) ] |); - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ]; + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |); M.get_trait_method (| "core::iter::traits::iterator::Iterator", U, @@ -3352,7 +3457,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3860,45 +3965,52 @@ Module iter. |) |) in M.return_ (| - Value.Tuple - [ - M.read (| lower |); - M.read (| upper |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| lower |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::iter::adapters::fuse::Fuse") - [ I ], - [], - "size_hint", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::flatten::FlattenCompat", - "iter" - |) - ] - |); - M.read (| fhi |); - M.read (| bhi |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::iter::adapters::fuse::Fuse") + [ I ], + [], + "size_hint", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::flatten::FlattenCompat", + "iter" + |) + ] + |)); + A.to_value (M.read (| fhi |)); + A.to_value (M.read (| bhi |)) + ] + |) |), [ fun γ => @@ -3913,7 +4025,7 @@ Module iter. let _ := M.is_constant_or_break_match (| M.read (| γ1_0 |), - Value.Integer Integer.Usize 0 + Value.Integer 0 |) in let γ2_0 := M.SubPointer.get_struct_tuple_field (| @@ -3924,7 +4036,7 @@ Module iter. let _ := M.is_constant_or_break_match (| M.read (| γ2_0 |), - Value.Integer Integer.Usize 0 + Value.Integer 0 |) in let γ1_0 := M.SubPointer.get_struct_tuple_field (| @@ -3941,27 +4053,37 @@ Module iter. |) in let b := M.copy (| γ1_0 |) in M.alloc (| - Value.Tuple - [ - M.read (| lo |); - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "checked_add", - [] - |), - [ M.read (| a |); M.read (| b |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| lo |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "checked_add", + [] + |), + [ M.read (| a |); M.read (| b |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.read (| lo |); - Value.StructTuple "core::option::Option::None" [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| lo |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |)) + ] + |) |))) ] |))) @@ -3991,7 +4113,7 @@ Module iter. self.iter_try_fold(init, flatten(fold)) } *) - Definition try_fold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -4032,7 +4154,7 @@ Module iter. self.iter_fold(init, flatten(fold)) } *) - Definition fold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -4075,7 +4197,7 @@ Module iter. } } *) - Definition advance_by (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self; n ] => @@ -4145,15 +4267,23 @@ Module iter. |), [ M.read (| remaining |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))) ] |) @@ -4172,7 +4302,7 @@ Module iter. self.iter_fold(0, count) } *) - Definition count (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -4186,7 +4316,7 @@ Module iter. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.get_associated_function (| Self, "count.count", [] |) ] |))) @@ -4203,7 +4333,7 @@ Module iter. self.iter_fold(None, last) } *) - Definition last (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -4222,7 +4352,7 @@ Module iter. |), [ M.read (| self |); - Value.StructTuple "core::option::Option::None" []; + M.of_value (| Value.StructTuple "core::option::Option::None" [] |); M.get_associated_function (| Self, "last.last", [] |) ] |))) @@ -4265,7 +4395,7 @@ Module iter. } } *) - Definition next_back (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self ] => @@ -4279,7 +4409,7 @@ Module iter. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4304,8 +4434,8 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "backiter" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4328,7 +4458,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -4344,7 +4475,8 @@ Module iter. M.read (| M.return_ (| M.read (| elt |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -4392,8 +4524,8 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "frontiter" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4416,7 +4548,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -4438,20 +4571,23 @@ Module iter. "core::iter::adapters::flatten::FlattenCompat", "backiter" |), - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.associated, - [], - "into_iter", - [] - |), - [ M.read (| inner |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.associated, + [], + "into_iter", + [] + |), + [ M.read (| inner |) ] + |)) + ] + |) |))) ] |))) @@ -4479,7 +4615,7 @@ Module iter. self.iter_try_rfold(init, flatten(fold)) } *) - Definition try_rfold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -4520,7 +4656,7 @@ Module iter. self.iter_rfold(init, flatten(fold)) } *) - Definition rfold (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -4563,7 +4699,7 @@ Module iter. } } *) - Definition advance_back_by (I U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I U in match τ, α with | [], [ self; n ] => @@ -4633,15 +4769,23 @@ Module iter. |), [ M.read (| remaining |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))) ] |) @@ -4704,10 +4848,11 @@ Module iter. None } *) - Definition size (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "core::option::Option::None" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) | _, _ => M.impossible end. @@ -4728,14 +4873,19 @@ Module iter. Some(N) } *) - Definition size (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::option::Option::Some" - [ M.read (| M.get_constant (| "core::iter::adapters::flatten::N" |) |) ])) + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| M.get_constant (| "core::iter::adapters::flatten::N" |) |)) + ] + |))) | _, _ => M.impossible end. @@ -4757,14 +4907,19 @@ Module iter. Some(N) } *) - Definition size (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::option::Option::Some" - [ M.read (| M.get_constant (| "core::iter::adapters::flatten::N" |) |) ])) + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| M.get_constant (| "core::iter::adapters::flatten::N" |) |)) + ] + |))) | _, _ => M.impossible end. @@ -4786,14 +4941,19 @@ Module iter. Some(N) } *) - Definition size (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::option::Option::Some" - [ M.read (| M.get_constant (| "core::iter::adapters::flatten::N" |) |) ])) + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| M.get_constant (| "core::iter::adapters::flatten::N" |) |)) + ] + |))) | _, _ => M.impossible end. @@ -4815,7 +4975,7 @@ Module iter. x } *) - Definition and_then_or_clear (τ : list Ty.t) (α : list Value.t) : M := + Definition and_then_or_clear (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; U; impl_FnOnce__mut_T__arrow_Option_U_ ], [ opt; f ] => ltac:(M.monadic @@ -4836,85 +4996,90 @@ Module iter. |), [ M.read (| f |); - Value.Tuple - [ - M.read (| - M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::Try", - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "&mut") [ T ] ], - [], - "branch", - [] - |), - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ T ], - "as_mut", + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&mut") [ T ] ], + [], + "branch", [] |), - [ M.read (| opt |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ T ], + "as_mut", + [] + |), + [ M.read (| opt |) ] + |) + ] |) - ] - |) - |), - [ - 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::option::Option") [ U ], - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "core::convert::Infallible" ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + |), + [ + 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::option::Option") + [ U ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "core::convert::Infallible" ] + ], + "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 - M.alloc (| M.read (| val |) |))) - ] - |) - |) - ] + |))); + 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 + M.alloc (| M.read (| val |) |))) + ] + |) + |)) + ] + |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4935,10 +5100,10 @@ Module iter. let _ := M.write (| M.read (| opt |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in x diff --git a/CoqOfRust/core/iter/adapters/fuse.v b/CoqOfRust/core/iter/adapters/fuse.v index e62371887..3e53e4a39 100644 --- a/CoqOfRust/core/iter/adapters/fuse.v +++ b/CoqOfRust/core/iter/adapters/fuse.v @@ -16,33 +16,36 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::fuse::Fuse") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::fuse::Fuse" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ I ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::fuse::Fuse", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::fuse::Fuse" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ I ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::fuse::Fuse", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -60,7 +63,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::fuse::Fuse") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -75,17 +78,18 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Fuse" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "Fuse" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::fuse::Fuse", "iter" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -109,15 +113,25 @@ Module iter. Fuse { iter: Some(iter) } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "core::iter::adapters::fuse::Fuse" - [ ("iter", Value.StructTuple "core::option::Option::Some" [ M.read (| iter |) ]) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::fuse::Fuse" + [ + ("iter", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| iter |)) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -164,7 +178,7 @@ Module iter. FuseImpl::next(self) } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -188,7 +202,7 @@ Module iter. FuseImpl::nth(self, n) } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -216,7 +230,7 @@ Module iter. } } *) - Definition last (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -253,7 +267,9 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -268,7 +284,7 @@ Module iter. } } *) - Definition count (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -303,7 +319,7 @@ Module iter. [ M.read (| iter |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -318,7 +334,7 @@ Module iter. } } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -356,13 +372,18 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))) ] |) @@ -380,7 +401,7 @@ Module iter. FuseImpl::try_fold(self, acc, fold) } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; acc; fold ] => @@ -412,7 +433,7 @@ Module iter. acc } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold ], [ self; acc; fold ] => @@ -423,7 +444,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -454,8 +475,8 @@ Module iter. [ M.read (| iter |); M.read (| acc |); M.read (| fold |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in acc @@ -471,7 +492,7 @@ Module iter. FuseImpl::find(self, predicate) } *) - Definition find (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ P ], [ self; predicate ] => @@ -505,7 +526,7 @@ Module iter. } } *) - Definition __iterator_get_unchecked (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; idx ] => @@ -584,7 +605,7 @@ Module iter. FuseImpl::next_back(self) } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -608,7 +629,7 @@ Module iter. FuseImpl::nth_back(self, n) } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -638,7 +659,7 @@ Module iter. FuseImpl::try_rfold(self, acc, fold) } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; acc; fold ] => @@ -670,7 +691,7 @@ Module iter. acc } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold ], [ self; acc; fold ] => @@ -681,7 +702,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -712,8 +733,8 @@ Module iter. [ M.read (| iter |); M.read (| acc |); M.read (| fold |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in acc @@ -729,7 +750,7 @@ Module iter. FuseImpl::rfind(self, predicate) } *) - Definition rfind (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfind (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ P ], [ self; predicate ] => @@ -777,7 +798,7 @@ Module iter. } } *) - Definition len (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -812,7 +833,7 @@ Module iter. [ M.read (| iter |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -827,7 +848,7 @@ Module iter. } } *) - Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -862,7 +883,7 @@ Module iter. [ M.read (| iter |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -889,26 +910,29 @@ Module iter. Fuse { iter: Default::default() } } *) - Definition default (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::iter::adapters::fuse::Fuse" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::option::Option") [ I ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::iter::adapters::fuse::Fuse" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::option::Option") [ I ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -953,7 +977,7 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = I::MAY_HAVE_SIDE_EFFECT; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (I : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -987,7 +1011,7 @@ Module iter. and_then_or_clear(&mut self.iter, Iterator::next) } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1027,7 +1051,7 @@ Module iter. and_then_or_clear(&mut self.iter, |iter| iter.nth(n)) } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1051,8 +1075,8 @@ Module iter. "core::iter::adapters::fuse::Fuse", "iter" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1075,7 +1099,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1095,7 +1120,7 @@ Module iter. try { acc } } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; acc; fold ] => @@ -1108,7 +1133,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1206,10 +1231,10 @@ Module iter. "core::iter::adapters::fuse::Fuse", "iter" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1237,7 +1262,7 @@ Module iter. and_then_or_clear(&mut self.iter, |iter| iter.find(predicate)) } *) - Definition find (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ P ], [ self; predicate ] => @@ -1261,8 +1286,8 @@ Module iter. "core::iter::adapters::fuse::Fuse", "iter" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1285,7 +1310,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1299,7 +1325,7 @@ Module iter. and_then_or_clear(&mut self.iter, |iter| iter.next_back()) } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1322,8 +1348,8 @@ Module iter. "core::iter::adapters::fuse::Fuse", "iter" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1346,7 +1372,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1360,7 +1387,7 @@ Module iter. and_then_or_clear(&mut self.iter, |iter| iter.nth_back(n)) } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1384,8 +1411,8 @@ Module iter. "core::iter::adapters::fuse::Fuse", "iter" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1408,7 +1435,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1429,7 +1457,7 @@ Module iter. try { acc } } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; acc; fold ] => @@ -1442,7 +1470,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1540,10 +1568,10 @@ Module iter. "core::iter::adapters::fuse::Fuse", "iter" |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1572,7 +1600,7 @@ Module iter. and_then_or_clear(&mut self.iter, |iter| iter.rfind(predicate)) } *) - Definition rfind (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfind (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ P ], [ self; predicate ] => @@ -1596,8 +1624,8 @@ Module iter. "core::iter::adapters::fuse::Fuse", "iter" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1620,7 +1648,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1655,7 +1684,7 @@ Module iter. self.iter.as_mut()?.next() } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1761,7 +1790,7 @@ Module iter. self.iter.as_mut()?.nth(n) } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1877,7 +1906,7 @@ Module iter. try { acc } } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; acc; fold ] => @@ -1890,7 +1919,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1981,8 +2010,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2010,7 +2039,7 @@ Module iter. self.iter.as_mut()?.find(predicate) } *) - Definition find (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ P ], [ self; predicate ] => @@ -2121,7 +2150,7 @@ Module iter. self.iter.as_mut()?.next_back() } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -2230,7 +2259,7 @@ Module iter. self.iter.as_mut()?.nth_back(n) } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -2347,7 +2376,7 @@ Module iter. try { acc } } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; acc; fold ] => @@ -2360,7 +2389,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2451,8 +2480,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2481,7 +2510,7 @@ Module iter. self.iter.as_mut()?.rfind(predicate) } *) - Definition rfind (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfind (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ P ], [ self; predicate ] => @@ -2618,7 +2647,7 @@ Module iter. unsafe { SourceIter::as_inner(self.iter.as_mut().unwrap_unchecked()) } } *) - Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -2677,7 +2706,7 @@ Module iter. x } *) - Definition and_then_or_clear (τ : list Ty.t) (α : list Value.t) : M := + Definition and_then_or_clear (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; U; impl_FnOnce__mut_T__arrow_Option_U_ ], [ opt; f ] => ltac:(M.monadic @@ -2698,85 +2727,90 @@ Module iter. |), [ M.read (| f |); - Value.Tuple - [ - M.read (| - M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::Try", - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "&mut") [ T ] ], - [], - "branch", - [] - |), - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ T ], - "as_mut", + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&mut") [ T ] ], + [], + "branch", [] |), - [ M.read (| opt |) ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ T ], + "as_mut", + [] + |), + [ M.read (| opt |) ] + |) + ] |) - ] - |) - |), - [ - 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::option::Option") [ U ], - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "core::convert::Infallible" ] - ], - "from_residual", - [] - |), - [ M.read (| residual |) ] + |), + [ + 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::option::Option") + [ U ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "core::convert::Infallible" ] + ], + "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 - M.alloc (| M.read (| val |) |))) - ] - |) - |) - ] + |))); + 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 + M.alloc (| M.read (| val |) |))) + ] + |) + |)) + ] + |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2797,10 +2831,10 @@ Module iter. let _ := M.write (| M.read (| opt |), - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in x diff --git a/CoqOfRust/core/iter/adapters/inspect.v b/CoqOfRust/core/iter/adapters/inspect.v index e323a9af1..2247aee1a 100644 --- a/CoqOfRust/core/iter/adapters/inspect.v +++ b/CoqOfRust/core/iter/adapters/inspect.v @@ -16,38 +16,42 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::inspect::Inspect") [ I; F ]. (* Clone *) - Definition clone (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::inspect::Inspect" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::inspect::Inspect", - "iter" - |) - ] - |)); - ("f", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::inspect::Inspect", - "f" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::inspect::Inspect" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::inspect::Inspect", + "iter" + |) + ] + |))); + ("f", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::inspect::Inspect", + "f" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -69,16 +73,18 @@ Module iter. Inspect { iter, f } } *) - Definition new (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ iter; f ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let f := M.alloc (| f |) in - Value.StructRecord - "core::iter::adapters::inspect::Inspect" - [ ("iter", M.read (| iter |)); ("f", M.read (| f |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::inspect::Inspect" + [ ("iter", A.to_value (M.read (| iter |))); ("f", A.to_value (M.read (| f |))) ] + |))) | _, _ => M.impossible end. @@ -94,7 +100,7 @@ Module iter. elt } *) - Definition do_inspect (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition do_inspect (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self; elt ] => @@ -104,7 +110,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -132,12 +138,12 @@ Module iter. "core::iter::adapters::inspect::Inspect", "f" |); - Value.Tuple [ M.read (| a |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| a |)) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in elt @@ -159,7 +165,7 @@ Module iter. f.debug_struct("Inspect").field("iter", &self.iter).finish() } *) - Definition fmt (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self; f ] => @@ -187,17 +193,18 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Inspect" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Inspect" |) |) ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::inspect::Inspect", "iter" - |)) + |) + |) ] |) ] @@ -226,14 +233,14 @@ Module iter. } } *) - Definition inspect_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition inspect_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; Acc; impl_FnMut__T_; impl_FnMut_Acc__T__arrow_Acc ], [ f; fold ] => ltac:(M.monadic (let f := M.alloc (| f |) in let fold := M.alloc (| fold |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -260,7 +267,7 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ item ] ] + [ f; M.of_value (| Value.Tuple [ A.to_value item ] |) ] |) |) in M.alloc (| @@ -274,7 +281,13 @@ Module iter. |), [ fold; - Value.Tuple [ M.read (| acc |); M.read (| item |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| item |)) + ] + |) ] |) |) @@ -284,7 +297,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -303,14 +317,14 @@ Module iter. } } *) - Definition inspect_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition inspect_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; Acc; R; impl_FnMut__T_; impl_FnMut_Acc__T__arrow_R__plus__'a ], [ f; fold ] => ltac:(M.monadic (let f := M.alloc (| f |) in let fold := M.alloc (| fold |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -337,7 +351,10 @@ Module iter. "call_mut", [] |), - [ M.read (| f |); Value.Tuple [ item ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value item ] |) + ] |) |) in M.alloc (| @@ -351,7 +368,13 @@ Module iter. |), [ fold; - Value.Tuple [ M.read (| acc |); M.read (| item |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| item |)) + ] + |) ] |) |) @@ -361,7 +384,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -382,7 +406,7 @@ Module iter. self.do_inspect(next) } *) - Definition next (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => @@ -427,7 +451,7 @@ Module iter. self.iter.size_hint() } *) - Definition size_hint (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => @@ -462,7 +486,7 @@ Module iter. self.iter.try_fold(init, inspect_try_fold(&mut self.f, fold)) } *) - Definition try_fold (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -512,7 +536,7 @@ Module iter. self.iter.fold(init, inspect_fold(self.f, fold)) } *) - Definition fold (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -584,7 +608,7 @@ Module iter. self.do_inspect(next) } *) - Definition next_back (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => @@ -634,7 +658,7 @@ Module iter. self.iter.try_rfold(init, inspect_try_fold(&mut self.f, fold)) } *) - Definition try_rfold (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -684,7 +708,7 @@ Module iter. self.iter.rfold(init, inspect_fold(self.f, fold)) } *) - Definition rfold (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -753,7 +777,7 @@ Module iter. self.iter.len() } *) - Definition len (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => @@ -783,7 +807,7 @@ Module iter. self.iter.is_empty() } *) - Definition is_empty (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => @@ -860,7 +884,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => @@ -900,7 +924,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I F : Ty.t) : Value.t := + Definition value_EXPAND_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic @@ -910,7 +934,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I F : Ty.t) : Value.t := + Definition value_MERGE_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/intersperse.v b/CoqOfRust/core/iter/adapters/intersperse.v index c5da606ef..98ffed99d 100644 --- a/CoqOfRust/core/iter/adapters/intersperse.v +++ b/CoqOfRust/core/iter/adapters/intersperse.v @@ -21,7 +21,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::intersperse::Intersperse") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -36,33 +36,36 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Intersperse" |); - M.read (| Value.String "separator" |); + M.read (| M.of_value (| Value.String "Intersperse" |) |); + M.read (| M.of_value (| Value.String "separator" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::intersperse::Intersperse", "separator" - |)); - M.read (| Value.String "iter" |); + |) + |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::intersperse::Intersperse", "iter" - |)); - M.read (| Value.String "needs_sep" |); + |) + |); + M.read (| M.of_value (| Value.String "needs_sep" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::intersperse::Intersperse", "needs_sep" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -82,61 +85,72 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::intersperse::Intersperse") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::intersperse::Intersperse" - [ - ("separator", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.associated, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::intersperse::Intersperse", - "separator" - |) - ] - |)); - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::iter::adapters::peekable::Peekable") [ I ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::intersperse::Intersperse", - "iter" - |) - ] - |)); - ("needs_sep", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "bool", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::intersperse::Intersperse", - "needs_sep" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::intersperse::Intersperse" + [ + ("separator", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.associated, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::intersperse::Intersperse", + "separator" + |) + ] + |))); + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::iter::adapters::peekable::Peekable") [ I ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::intersperse::Intersperse", + "iter" + |) + ] + |))); + ("needs_sep", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::intersperse::Intersperse", + "needs_sep" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -158,30 +172,33 @@ Module iter. Self { iter: iter.peekable(), separator, needs_sep: false } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter; separator ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let separator := M.alloc (| separator |) in - Value.StructRecord - "core::iter::adapters::intersperse::Intersperse" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - I, - [], - "peekable", - [] - |), - [ M.read (| iter |) ] - |)); - ("separator", M.read (| separator |)); - ("needs_sep", Value.Bool false) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::intersperse::Intersperse" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + I, + [], + "peekable", + [] + |), + [ M.read (| iter |) ] + |))); + ("separator", A.to_value (M.read (| separator |))); + ("needs_sep", A.to_value (M.of_value (| Value.Bool false |))) + ] + |))) | _, _ => M.impossible end. @@ -208,7 +225,7 @@ Module iter. } } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -216,7 +233,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -272,29 +289,32 @@ Module iter. "core::iter::adapters::intersperse::Intersperse", "needs_sep" |), - Value.Bool false + M.of_value (| Value.Bool false |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.associated, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::intersperse::Intersperse", - "separator" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.associated, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::intersperse::Intersperse", + "separator" + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -305,7 +325,7 @@ Module iter. "core::iter::adapters::intersperse::Intersperse", "needs_sep" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| M.call_closure (| @@ -341,7 +361,7 @@ Module iter. intersperse_fold(self.iter, init, f, move || separator.clone(), self.needs_sep) } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -379,8 +399,8 @@ Module iter. |); M.read (| init |); M.read (| f |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -402,7 +422,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)); + end) + |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -422,7 +443,7 @@ Module iter. intersperse_size_hint(&self.iter, self.needs_sep) } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -491,7 +512,7 @@ Module iter. .finish() } *) - Definition fmt (I G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I G in match τ, α with | [], [ self; f ] => @@ -533,37 +554,43 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "IntersperseWith" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "IntersperseWith" |) |) + ] |) |); - M.read (| Value.String "separator" |); + M.read (| M.of_value (| Value.String "separator" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::intersperse::IntersperseWith", "separator" - |)) + |) + |) ] |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::intersperse::IntersperseWith", "iter" - |)) + |) + |) ] |); - M.read (| Value.String "needs_sep" |); + M.read (| M.of_value (| Value.String "needs_sep" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::intersperse::IntersperseWith", "needs_sep" - |)) + |) + |) ] |) ] @@ -593,61 +620,66 @@ Module iter. } } *) - Definition clone (I G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I G in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::intersperse::IntersperseWith" - [ - ("separator", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", G, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::intersperse::IntersperseWith", - "separator" - |) - ] - |)); - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::iter::adapters::peekable::Peekable") [ I ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::intersperse::IntersperseWith", - "iter" - |) - ] - |)); - ("needs_sep", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "bool", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::intersperse::IntersperseWith", - "needs_sep" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::intersperse::IntersperseWith" + [ + ("separator", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", G, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::intersperse::IntersperseWith", + "separator" + |) + ] + |))); + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::iter::adapters::peekable::Peekable") [ I ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::intersperse::IntersperseWith", + "iter" + |) + ] + |))); + ("needs_sep", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::intersperse::IntersperseWith", + "needs_sep" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -669,30 +701,33 @@ Module iter. Self { iter: iter.peekable(), separator, needs_sep: false } } *) - Definition new (I G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I G in match τ, α with | [], [ iter; separator ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let separator := M.alloc (| separator |) in - Value.StructRecord - "core::iter::adapters::intersperse::IntersperseWith" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - I, - [], - "peekable", - [] - |), - [ M.read (| iter |) ] - |)); - ("separator", M.read (| separator |)); - ("needs_sep", Value.Bool false) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::intersperse::IntersperseWith" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + I, + [], + "peekable", + [] + |), + [ M.read (| iter |) ] + |))); + ("separator", A.to_value (M.read (| separator |))); + ("needs_sep", A.to_value (M.of_value (| Value.Bool false |))) + ] + |))) | _, _ => M.impossible end. @@ -719,7 +754,7 @@ Module iter. } } *) - Definition next (I G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I G in match τ, α with | [], [ self ] => @@ -727,7 +762,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -783,30 +818,33 @@ Module iter. "core::iter::adapters::intersperse::IntersperseWith", "needs_sep" |), - Value.Bool false + M.of_value (| Value.Bool false |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnMut", - G, - [ Ty.tuple [] ], - "call_mut", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::intersperse::IntersperseWith", - "separator" - |); - Value.Tuple [] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + G, + [ Ty.tuple [] ], + "call_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::intersperse::IntersperseWith", + "separator" + |); + M.of_value (| Value.Tuple [] |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -817,7 +855,7 @@ Module iter. "core::iter::adapters::intersperse::IntersperseWith", "needs_sep" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| M.call_closure (| @@ -852,7 +890,7 @@ Module iter. intersperse_fold(self.iter, init, f, self.separator, self.needs_sep) } *) - Definition fold (I G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I G in match τ, α with | [ B; F ], [ self; init; f ] => @@ -899,7 +937,7 @@ Module iter. intersperse_size_hint(&self.iter, self.needs_sep) } *) - Definition size_hint (I G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I G in match τ, α with | [], [ self ] => @@ -956,7 +994,7 @@ Module iter. ) } *) - Definition intersperse_size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition intersperse_size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter; needs_sep ] => ltac:(M.monadic @@ -983,76 +1021,91 @@ 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 - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.path "usize", - "saturating_sub", + "saturating_add", [] |), - [ M.read (| lo |); M.rust_cast (M.read (| next_is_elem |)) ] - |); - M.read (| lo |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], - "and_then", - [ - Ty.path "usize"; - Ty.function - [ Ty.tuple [ Ty.path "usize" ] ] - (Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ]) - ] - |), - [ - M.read (| hi |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let hi := M.copy (| γ |) in - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "checked_add", - [] - |), - [ + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ M.read (| lo |); M.rust_cast (| M.read (| next_is_elem |) |) + ] + |); + M.read (| lo |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], + "and_then", + [ + Ty.path "usize"; + Ty.function + [ Ty.tuple [ Ty.path "usize" ] ] + (Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ]) + ] + |), + [ + M.read (| hi |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let hi := M.copy (| γ |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", - "saturating_sub", + "checked_add", [] |), [ - M.read (| hi |); - M.rust_cast (M.read (| next_is_elem |)) + M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ + M.read (| hi |); + M.rust_cast (| + M.read (| next_is_elem |) + |) + ] + |); + M.read (| hi |) ] - |); - M.read (| hi |) - ] - |))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |)) + ] + |) |))) ] |) @@ -1090,7 +1143,7 @@ Module iter. }) } *) - Definition intersperse_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition intersperse_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I; B; F; G ], [ iter; init; f; separator; needs_sep ] => ltac:(M.monadic @@ -1105,16 +1158,16 @@ Module iter. let accum := M.copy (| init |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| UnOp.Pure.not (M.read (| needs_sep |)) |)) in + M.use (M.alloc (| UnOp.Pure.not (| M.read (| needs_sep |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1149,10 +1202,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1162,7 +1224,7 @@ Module iter. |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1177,8 +1239,8 @@ Module iter. [ M.read (| iter |); M.read (| accum |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1208,20 +1270,28 @@ Module iter. |), [ f; - Value.Tuple - [ - M.read (| accum |); - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnMut", - G, - [ Ty.tuple [] ], - "call_mut", - [] - |), - [ separator; Value.Tuple [] ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + G, + [ Ty.tuple [] ], + "call_mut", + [] + |), + [ + separator; + M.of_value (| + Value.Tuple [] + |) + ] + |)) + ] + |) ] |) |) in @@ -1238,8 +1308,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) |) in @@ -1250,7 +1325,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) diff --git a/CoqOfRust/core/iter/adapters/map.v b/CoqOfRust/core/iter/adapters/map.v index f661a7cad..437d70f11 100644 --- a/CoqOfRust/core/iter/adapters/map.v +++ b/CoqOfRust/core/iter/adapters/map.v @@ -16,38 +16,42 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::map::Map") [ I; F ]. (* Clone *) - Definition clone (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::map::Map" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map::Map", - "iter" - |) - ] - |)); - ("f", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map::Map", - "f" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::map::Map" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map::Map", + "iter" + |) + ] + |))); + ("f", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map::Map", + "f" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -69,16 +73,18 @@ Module iter. Map { iter, f } } *) - Definition new (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ iter; f ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let f := M.alloc (| f |) in - Value.StructRecord - "core::iter::adapters::map::Map" - [ ("iter", M.read (| iter |)); ("f", M.read (| f |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::map::Map" + [ ("iter", A.to_value (M.read (| iter |))); ("f", A.to_value (M.read (| f |))) ] + |))) | _, _ => M.impossible end. @@ -96,7 +102,7 @@ Module iter. f.debug_struct("Map").field("iter", &self.iter).finish() } *) - Definition fmt (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self; f ] => @@ -124,17 +130,18 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Map" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Map" |) |) ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map::Map", "iter" - |)) + |) + |) ] |) ] @@ -159,14 +166,14 @@ Module iter. move |acc, elt| g(acc, f(elt)) } *) - Definition map_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition map_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; B; Acc; impl_FnMut_T__arrow_B; impl_FnMut_Acc__B__arrow_Acc ], [ f; g ] => ltac:(M.monadic (let f := M.alloc (| f |) in let g := M.alloc (| g |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -192,20 +199,28 @@ Module iter. |), [ g; - Value.Tuple - [ - M.read (| acc |); - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnMut", - impl_FnMut_T__arrow_B, - [ Ty.tuple [ T ] ], - "call_mut", - [] - |), - [ f; Value.Tuple [ M.read (| elt |) ] ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + impl_FnMut_T__arrow_B, + [ Ty.tuple [ T ] ], + "call_mut", + [] + |), + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| elt |)) ] + |) + ] + |)) + ] + |) ] |))) ] @@ -213,7 +228,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -229,14 +245,14 @@ Module iter. move |acc, elt| g(acc, f(elt)) } *) - Definition map_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition map_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; B; Acc; R; impl_FnMut_T__arrow_B; impl_FnMut_Acc__B__arrow_R__plus__'a ], [ f; g ] => ltac:(M.monadic (let f := M.alloc (| f |) in let g := M.alloc (| g |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -262,20 +278,28 @@ Module iter. |), [ g; - Value.Tuple - [ - M.read (| acc |); - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnMut", - impl_FnMut_T__arrow_B, - [ Ty.tuple [ T ] ], - "call_mut", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| elt |) ] ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + impl_FnMut_T__arrow_B, + [ Ty.tuple [ T ] ], + "call_mut", + [] + |), + [ + M.read (| f |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| elt |)) ] + |) + ] + |)) + ] + |) ] |))) ] @@ -283,7 +307,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -303,7 +328,7 @@ Module iter. self.iter.next().map(&mut self.f) } *) - Definition next (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -347,7 +372,7 @@ Module iter. self.iter.size_hint() } *) - Definition size_hint (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -382,7 +407,7 @@ Module iter. self.iter.try_fold(init, map_try_fold(&mut self.f, g)) } *) - Definition try_fold (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [ Acc; G; R ], [ self; init; g ] => @@ -432,7 +457,7 @@ Module iter. self.iter.fold(init, map_fold(self.f, g)) } *) - Definition fold (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [ Acc; G ], [ self; init; g ] => @@ -488,7 +513,7 @@ Module iter. unsafe { (self.f)(try_get_unchecked(&mut self.iter, idx)) } } *) - Definition __iterator_get_unchecked (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self; idx ] => @@ -509,20 +534,26 @@ Module iter. "core::iter::adapters::map::Map", "f" |); - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::iter::adapters::zip::try_get_unchecked", [ I ] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map::Map", - "iter" - |); - M.read (| idx |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::iter::adapters::zip::try_get_unchecked", + [ I ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map::Map", + "iter" + |); + M.read (| idx |) + ] + |)) + ] + |) ] |))) | _, _ => M.impossible @@ -554,7 +585,7 @@ Module iter. self.iter.next_back().map(&mut self.f) } *) - Definition next_back (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -603,7 +634,7 @@ Module iter. self.iter.try_rfold(init, map_try_fold(&mut self.f, g)) } *) - Definition try_rfold (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [ Acc; G; R ], [ self; init; g ] => @@ -653,7 +684,7 @@ Module iter. self.iter.rfold(init, map_fold(self.f, g)) } *) - Definition rfold (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [ Acc; G ], [ self; init; g ] => @@ -722,7 +753,7 @@ Module iter. self.iter.len() } *) - Definition len (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -752,7 +783,7 @@ Module iter. self.iter.is_empty() } *) - Definition is_empty (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -841,7 +872,7 @@ Module iter. (self.f)(item) } *) - Definition next_unchecked (B I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (B I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I F in match τ, α with | [], [ self ] => @@ -882,7 +913,7 @@ Module iter. "core::iter::adapters::map::Map", "f" |); - Value.Tuple [ M.read (| item |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| item |)) ] |) ] |) |) @@ -918,9 +949,9 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = true; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (I F : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in - M.run ltac:(M.monadic (M.alloc (| Value.Bool true |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))). Axiom Implements : forall (I F : Ty.t), @@ -948,7 +979,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => @@ -988,7 +1019,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I F : Ty.t) : Value.t := + Definition value_EXPAND_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic @@ -998,7 +1029,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I F : Ty.t) : Value.t := + Definition value_MERGE_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/map_while.v b/CoqOfRust/core/iter/adapters/map_while.v index 072fab425..d476753d2 100644 --- a/CoqOfRust/core/iter/adapters/map_while.v +++ b/CoqOfRust/core/iter/adapters/map_while.v @@ -16,38 +16,42 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::map_while::MapWhile") [ I; P ]. (* Clone *) - Definition clone (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::map_while::MapWhile" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map_while::MapWhile", - "iter" - |) - ] - |)); - ("predicate", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map_while::MapWhile", - "predicate" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::map_while::MapWhile" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map_while::MapWhile", + "iter" + |) + ] + |))); + ("predicate", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map_while::MapWhile", + "predicate" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -69,16 +73,21 @@ Module iter. MapWhile { iter, predicate } } *) - Definition new (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ iter; predicate ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let predicate := M.alloc (| predicate |) in - Value.StructRecord - "core::iter::adapters::map_while::MapWhile" - [ ("iter", M.read (| iter |)); ("predicate", M.read (| predicate |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::map_while::MapWhile" + [ + ("iter", A.to_value (M.read (| iter |))); + ("predicate", A.to_value (M.read (| predicate |))) + ] + |))) | _, _ => M.impossible end. @@ -96,7 +105,7 @@ Module iter. f.debug_struct("MapWhile").field("iter", &self.iter).finish() } *) - Definition fmt (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self; f ] => @@ -124,17 +133,18 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "MapWhile" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "MapWhile" |) |) ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_while::MapWhile", "iter" - |)) + |) + |) ] |) ] @@ -164,7 +174,7 @@ Module iter. (self.predicate)(x) } *) - Definition next (B I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (B I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I P in match τ, α with | [], [ self ] => @@ -265,7 +275,7 @@ Module iter. "core::iter::adapters::map_while::MapWhile", "predicate" |); - Value.Tuple [ M.read (| x |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) ] |) |) @@ -280,7 +290,7 @@ Module iter. (0, upper) // can't know a lower bound, due to the predicate } *) - Definition size_hint (B I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (B I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I P in match τ, α with | [], [ self ] => @@ -313,7 +323,13 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let upper := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple [ Value.Integer Integer.Usize 0; M.read (| upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |) @@ -336,7 +352,7 @@ Module iter. .into_try() } *) - Definition try_fold (B I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (B I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I P in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -396,8 +412,8 @@ Module iter. [ M.read (| iter |); M.read (| init |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -426,7 +442,13 @@ Module iter. |), [ M.read (| predicate |); - Value.Tuple [ M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| x |)) + ] + |) ] |) |), @@ -462,11 +484,19 @@ Module iter. |), [ fold; - Value.Tuple - [ - M.read (| acc |); - M.read (| item |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + acc + |)); + A.to_value + (M.read (| + item + |)) + ] + |) ] |) ] @@ -475,20 +505,23 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::Try", - R, - [], - "from_output", - [] - |), - [ M.read (| acc |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + R, + [], + "from_output", + [] + |), + [ M.read (| acc |) ] + |)) + ] + |) |))) ] |) @@ -498,7 +531,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -520,7 +554,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition fold (B I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (B I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I P in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => @@ -593,7 +627,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -633,7 +667,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I P : Ty.t) : Value.t := + Definition value_EXPAND_BY (I P : Ty.t) : A.t := let Self : Ty.t := Self I P in M.run ltac:(M.monadic @@ -643,7 +677,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I P : Ty.t) : Value.t := + Definition value_MERGE_BY (I P : Ty.t) : A.t := let Self : Ty.t := Self I P in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/map_windows.v b/CoqOfRust/core/iter/adapters/map_windows.v index fbd2ef2df..e07a423d5 100644 --- a/CoqOfRust/core/iter/adapters/map_windows.v +++ b/CoqOfRust/core/iter/adapters/map_windows.v @@ -68,7 +68,7 @@ Module iter. Self { inner: MapWindowsInner::new(iter), f } } *) - Definition new (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ iter; f ] => @@ -78,19 +78,21 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |)) - (Value.Integer Integer.Usize 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -107,54 +109,61 @@ Module iter. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "array in `Iterator::map_windows` must contain more than 0 elements" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "array in `Iterator::map_windows` must contain more than 0 elements" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.associated ] |), [] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -176,12 +185,13 @@ Module iter. "core::iter::adapters::map_windows::N" |) |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -201,46 +211,56 @@ Module iter. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "array size of `Iterator::map_windows` is too large" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "array size of `Iterator::map_windows` is too large" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::iter::adapters::map_windows::MapWindows" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::iter::adapters::map_windows::MapWindowsInner") - [ I ], - "new", - [] - |), - [ M.read (| iter |) ] - |)); - ("f", M.read (| f |)) - ] + M.of_value (| + Value.StructRecord + "core::iter::adapters::map_windows::MapWindows" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::iter::adapters::map_windows::MapWindowsInner") + [ I ], + "new", + [] + |), + [ M.read (| iter |) ] + |))); + ("f", A.to_value (M.read (| f |))) + ] + |) |) |))) | _, _ => M.impossible @@ -260,18 +280,28 @@ Module iter. Self { iter: Some(iter), buffer: None } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "core::iter::adapters::map_windows::MapWindowsInner" - [ - ("iter", Value.StructTuple "core::option::Option::Some" [ M.read (| iter |) ]); - ("buffer", Value.StructTuple "core::option::Option::None" []) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::map_windows::MapWindowsInner" + [ + ("iter", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| iter |)) ] + |))); + ("buffer", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -301,7 +331,7 @@ Module iter. self.buffer.as_ref().map(Buffer::as_array_ref) } *) - Definition next_window (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_window (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -486,7 +516,7 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -600,7 +630,7 @@ Module iter. } } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -644,7 +674,7 @@ Module iter. let lo := M.copy (| γ0_0 |) in let hi := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -679,84 +709,97 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.Tuple [ M.read (| lo |); M.read (| hi |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| lo |)); + A.to_value (M.read (| hi |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_sub", - [] - |), - [ - M.read (| lo |); - BinOp.Panic.sub (| - M.read (| - M.get_constant (| - "core::iter::adapters::map_windows::N" + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ + M.read (| lo |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| + M.get_constant (| + "core::iter::adapters::map_windows::N" + |) + |), + M.of_value (| Value.Integer 1 |) |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ], + "map", + [ + Ty.path "usize"; + Ty.function + [ Ty.tuple [ Ty.path "usize" ] ] + (Ty.path "usize") + ] |), - Value.Integer Integer.Usize 1 - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "usize" ], - "map", - [ - Ty.path "usize"; - Ty.function - [ Ty.tuple [ Ty.path "usize" ] ] - (Ty.path "usize") - ] - |), - [ - M.read (| hi |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let hi := M.copy (| γ |) in - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_sub", - [] - |), - [ - M.read (| hi |); - BinOp.Panic.sub (| - M.read (| - M.get_constant (| - "core::iter::adapters::map_windows::N" - |) + [ + M.read (| hi |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let hi := M.copy (| γ |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] |), - Value.Integer - Integer.Usize - 1 - |) - ] - |))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - ] + [ + M.read (| hi |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| + M.get_constant (| + "core::iter::adapters::map_windows::N" + |) + |), + M.of_value (| + Value.Integer 1 + |) + |) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |)) + ] + |) |))) ] |))) @@ -784,7 +827,7 @@ Module iter. Some(Self { buffer, start: 0 }) } *) - Definition try_from_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ impl_Iterator_Item___T_ ], [ iter ] => @@ -886,50 +929,59 @@ Module iter. |) in let buffer := M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.apply (Ty.path "array") [ T ] ], - "transpose", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.apply (Ty.path "array") [ T ] ], - "new", + "transpose", [] |), - [ M.read (| first_half |) ] - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], - "uninit_array", - [] - |), - [] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.apply (Ty.path "array") [ T ] ], + "new", + [] + |), + [ M.read (| first_half |) ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], + "uninit_array", + [] + |), + [] + |)) + ] + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "core::iter::adapters::map_windows::Buffer" - [ - ("buffer", M.read (| buffer |)); - ("start", Value.Integer Integer.Usize 0) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::iter::adapters::map_windows::Buffer" + [ + ("buffer", A.to_value (M.read (| buffer |))); + ("start", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |)) + ] + |) |) |))) |))) @@ -945,7 +997,7 @@ Module iter. self.buffer.as_ptr().cast() } *) - Definition buffer_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition buffer_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -978,12 +1030,13 @@ Module iter. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_windows::Buffer", "buffer" - |)) + |) + |) ] |) ] @@ -1000,7 +1053,7 @@ Module iter. self.buffer.as_mut_ptr().cast() } *) - Definition buffer_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition buffer_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1033,12 +1086,13 @@ Module iter. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_windows::Buffer", "buffer" - |)) + |) + |) ] |) ] @@ -1058,7 +1112,7 @@ Module iter. unsafe { &*self.buffer_ptr().add(self.start).cast() } } *) - Definition as_array_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_array_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1067,25 +1121,26 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1098,15 +1153,18 @@ Module iter. "core::iter::adapters::map_windows::N" |) |) - |)) - (BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + |), + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1119,18 +1177,21 @@ Module iter. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.start + N <= 2 * N" + M.of_value (| + Value.String + "assertion failed: self.start + N <= 2 * N" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1188,7 +1249,7 @@ Module iter. unsafe { &mut *self.buffer_mut_ptr().add(self.start).cast() } } *) - Definition as_uninit_array_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_array_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1197,25 +1258,26 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1228,15 +1290,18 @@ Module iter. "core::iter::adapters::map_windows::N" |) |) - |)) - (BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + |), + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1249,18 +1314,21 @@ Module iter. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.start + N <= 2 * N" + M.of_value (| + Value.String + "assertion failed: self.start + N <= 2 * N" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1371,7 +1439,7 @@ Module iter. unsafe { ptr::drop_in_place(to_drop.cast::()) }; } *) - Definition push (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; next ] => @@ -1392,25 +1460,26 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1423,15 +1492,18 @@ Module iter. "core::iter::adapters::map_windows::N" |) |) - |)) - (BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + |), + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1444,41 +1516,45 @@ Module iter. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.start + N <= 2 * N" + M.of_value (| + Value.String + "assertion failed: self.start + N <= 2 * N" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let to_drop := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + 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" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1497,8 +1573,8 @@ Module iter. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -1513,6 +1589,7 @@ Module iter. [ M.read (| buffer_mut_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1520,18 +1597,20 @@ Module iter. "start" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] - |)); + |) + |); M.read (| buffer_mut_ptr |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -1562,12 +1641,13 @@ Module iter. [ M.read (| buffer_mut_ptr |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -1608,7 +1688,7 @@ Module iter. "core::iter::adapters::map_windows::Buffer", "start" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in to_drop)); fun γ => @@ -1641,6 +1721,7 @@ Module iter. [ M.read (| buffer_mut_ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1695,7 +1776,11 @@ Module iter. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in to_drop)) ] @@ -1719,7 +1804,7 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1743,7 +1828,7 @@ Module iter. buffer } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1752,38 +1837,50 @@ Module iter. M.read (| let buffer := M.alloc (| - Value.StructRecord - "core::iter::adapters::map_windows::Buffer" - [ - ("buffer", - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], - "uninit_array", - [] - |), - [] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], - "uninit_array", - [] - |), - [] - |) - ]); - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map_windows::Buffer", - "start" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::iter::adapters::map_windows::Buffer" + [ + ("buffer", + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ], + "uninit_array", + [] + |), + [] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ], + "uninit_array", + [] + |), + [] + |)) + ] + |))); + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map_windows::Buffer", + "start" + |) + |))) + ] + |) |) in let _ := M.alloc (| @@ -1851,56 +1948,60 @@ Module iter. Self { iter: self.iter.clone(), buffer: self.buffer.clone() } } *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::map_windows::MapWindowsInner" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ I ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map_windows::MapWindowsInner", - "iter" - |) - ] - |)); - ("buffer", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::option::Option") + M.of_value (| + Value.StructRecord + "core::iter::adapters::map_windows::MapWindowsInner" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ I ], + [], + "clone", + [] + |), [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map_windows::MapWindowsInner", + "iter" + |) + ] + |))); + ("buffer", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", Ty.apply - (Ty.path "core::iter::adapters::map_windows::Buffer") - [ Ty.associated ] - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map_windows::MapWindowsInner", - "buffer" - |) - ] - |)) - ])) + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "core::iter::adapters::map_windows::Buffer") + [ Ty.associated ] + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map_windows::MapWindowsInner", + "buffer" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1930,7 +2031,7 @@ Module iter. } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1996,7 +2097,7 @@ Module iter. [ M.read (| initialized_part |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2024,7 +2125,7 @@ Module iter. Some(out) } *) - Definition next (I F R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I F R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F R in match τ, α with | [], [ self ] => @@ -2139,12 +2240,16 @@ Module iter. "core::iter::adapters::map_windows::MapWindows", "f" |); - Value.Tuple [ M.read (| window |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| window |)) ] |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| out |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| out |)) ] + |) |) |))) |))) @@ -2156,7 +2261,7 @@ Module iter. self.inner.size_hint() } *) - Definition size_hint (I F R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I F R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F R in match τ, α with | [], [ self ] => @@ -2228,7 +2333,7 @@ Module iter. f.debug_struct("MapWindows").field("iter", &self.inner.iter).finish() } *) - Definition fmt (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self; f ] => @@ -2256,13 +2361,14 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "MapWindows" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "MapWindows" |) |) + ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_windows::MapWindows", @@ -2270,7 +2376,8 @@ Module iter. |), "core::iter::adapters::map_windows::MapWindowsInner", "iter" - |)) + |) + |) ] |) ] @@ -2296,46 +2403,50 @@ Module iter. Self { f: self.f.clone(), inner: self.inner.clone() } } *) - Definition clone (I F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::map_windows::MapWindows" - [ - ("f", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map_windows::MapWindows", - "f" - |) - ] - |)); - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::map_windows::MapWindowsInner") - [ I ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::map_windows::MapWindows", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::map_windows::MapWindows" + [ + ("f", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map_windows::MapWindows", + "f" + |) + ] + |))); + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::iter::adapters::map_windows::MapWindowsInner") + [ I ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::map_windows::MapWindows", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/iter/adapters/mod.v b/CoqOfRust/core/iter/adapters/mod.v index 74d7225db..a96b995ca 100644 --- a/CoqOfRust/core/iter/adapters/mod.v +++ b/CoqOfRust/core/iter/adapters/mod.v @@ -34,19 +34,22 @@ Module iter. } } *) - Definition try_process (τ : list Ty.t) (α : list Value.t) : M := + Definition try_process (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I; T; R; F; U ], [ iter; f ] => ltac:(M.monadic (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 residual := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let shunt := M.alloc (| - Value.StructRecord - "core::iter::adapters::GenericShunt" - [ ("iter", M.read (| iter |)); ("residual", residual) ] + M.of_value (| + Value.StructRecord + "core::iter::adapters::GenericShunt" + [ ("iter", A.to_value (M.read (| iter |))); ("residual", A.to_value residual) ] + |) |) in let value := M.alloc (| @@ -59,7 +62,7 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| shunt |) ] ] + [ f; M.of_value (| Value.Tuple [ A.to_value (M.read (| shunt |)) ] |) ] |) |) in M.match_operator (| @@ -118,7 +121,7 @@ Module iter. self.try_for_each(ControlFlow::Break).break_value() } *) - Definition next (I R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I R in match τ, α with | [], [ self ] => @@ -152,7 +155,7 @@ Module iter. |), [ M.read (| self |); - M.constructor_as_closure "core::ops::control_flow::ControlFlow::Break" + M.constructor_as_closure (| "core::ops::control_flow::ControlFlow::Break" |) ] |) ] @@ -170,7 +173,7 @@ Module iter. } } *) - Definition size_hint (I R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I R in match τ, α with | [], [ self ] => @@ -178,7 +181,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -204,13 +207,18 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -240,7 +248,13 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let upper := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple [ Value.Integer Integer.Usize 0; M.read (| upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |))) @@ -267,7 +281,7 @@ Module iter. .into_try() } *) - Definition try_fold (I R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I R in match τ, α with | [ B; F; T ], [ self; init; f ] => @@ -303,8 +317,8 @@ Module iter. "iter" |); M.read (| init |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -365,9 +379,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| acc |); M.read (| x |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -391,25 +409,30 @@ Module iter. "residual" |) |), - Value.StructTuple - "core::option::Option::Some" - [ M.read (| r |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| r |)) ] + |) |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::Try", - T, - [], - "from_output", - [] - |), - [ M.read (| acc |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + T, + [], + "from_output", + [] + |), + [ M.read (| acc |) ] + |)) + ] + |) |))) ] |) @@ -419,7 +442,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -437,7 +461,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition fold (I R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I R in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => @@ -510,7 +534,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I R in match τ, α with | [], [ self ] => @@ -548,7 +572,7 @@ Module iter. (* const EXPAND_BY: Option = I::EXPAND_BY; *) (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I R : Ty.t) : Value.t := + Definition value_EXPAND_BY (I R : Ty.t) : A.t := let Self : Ty.t := Self I R in M.run ltac:(M.monadic @@ -556,7 +580,7 @@ Module iter. (* const MERGE_BY: Option = I::MERGE_BY; *) (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I R : Ty.t) : Value.t := + Definition value_MERGE_BY (I R : Ty.t) : A.t := let Self : Ty.t := Self I R in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/peekable.v b/CoqOfRust/core/iter/adapters/peekable.v index be8ef2739..ec99c8bbd 100644 --- a/CoqOfRust/core/iter/adapters/peekable.v +++ b/CoqOfRust/core/iter/adapters/peekable.v @@ -23,46 +23,50 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::peekable::Peekable") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::peekable::Peekable" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::peekable::Peekable", - "iter" - |) - ] - |)); - ("peeked", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "core::option::Option") [ Ty.associated ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::peekable::Peekable", - "peeked" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::peekable::Peekable" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::peekable::Peekable", + "iter" + |) + ] + |))); + ("peeked", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "core::option::Option") [ Ty.associated ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::peekable::Peekable", + "peeked" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -80,7 +84,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::peekable::Peekable") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -95,25 +99,27 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Peekable" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "Peekable" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::peekable::Peekable", "iter" - |)); - M.read (| Value.String "peeked" |); + |) + |); + M.read (| M.of_value (| Value.String "peeked" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::peekable::Peekable", "peeked" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -137,18 +143,22 @@ Module iter. Peekable { iter, peeked: None } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord - "core::iter::adapters::peekable::Peekable" - [ - ("iter", M.read (| iter |)); - ("peeked", Value.StructTuple "core::option::Option::None" []) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::peekable::Peekable" + [ + ("iter", A.to_value (M.read (| iter |))); + ("peeked", + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -161,7 +171,7 @@ Module iter. self.peeked.get_or_insert_with(|| iter.next()).as_ref() } *) - Definition peek (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -202,8 +212,8 @@ Module iter. "core::iter::adapters::peekable::Peekable", "peeked" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -225,7 +235,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -245,7 +256,7 @@ Module iter. self.peeked.get_or_insert_with(|| iter.next()).as_mut() } *) - Definition peek_mut (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_mut (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -286,8 +297,8 @@ Module iter. "core::iter::adapters::peekable::Peekable", "peeked" |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -309,7 +320,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -336,7 +348,7 @@ Module iter. } } *) - Definition next_if (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_if (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ impl_FnOnce__I_Item__arrow_bool ], [ self; func ] => @@ -377,28 +389,35 @@ Module iter. "call_once", [] |), - [ M.read (| func |); Value.Tuple [ matched ] ] + [ + M.read (| func |); + M.of_value (| Value.Tuple [ A.to_value matched ] |) + ] |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| matched |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| matched |)) ] + |) |))); fun γ => ltac:(M.monadic (let other := M.copy (| γ |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -417,7 +436,8 @@ Module iter. "peeked" |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -430,13 +450,16 @@ Module iter. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.peeked.is_none()" + M.of_value (| + Value.String "assertion failed: self.peeked.is_none()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -446,9 +469,15 @@ Module iter. "core::iter::adapters::peekable::Peekable", "peeked" |), - Value.StructTuple "core::option::Option::Some" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| other |)) ] + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -468,7 +497,7 @@ Module iter. self.next_if(|next| next == expected) } *) - Definition next_if_eq (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_if_eq (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ T ], [ self; expected ] => @@ -487,8 +516,8 @@ Module iter. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -511,7 +540,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -537,7 +567,7 @@ Module iter. } } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -609,7 +639,7 @@ Module iter. } } *) - Definition count (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -644,7 +674,7 @@ Module iter. "core::option::Option::Some", 0 |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -661,7 +691,8 @@ Module iter. |) in M.alloc (| BinOp.Panic.add (| - Value.Integer Integer.Usize 1, + Integer.Usize, + M.of_value (| Value.Integer 1 |), M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", @@ -720,7 +751,7 @@ Module iter. } } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -756,7 +787,9 @@ Module iter. "core::option::Option::Some", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -774,7 +807,7 @@ Module iter. |) in let γ := M.alloc (| - BinOp.Pure.eq (M.read (| n |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -808,7 +841,11 @@ Module iter. "core::iter::adapters::peekable::Peekable", "iter" |); - BinOp.Panic.sub (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) ] |) |))); @@ -849,7 +886,7 @@ Module iter. self.iter.last().or(peek_opt) } *) - Definition last (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -892,7 +929,9 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -909,7 +948,9 @@ Module iter. v)); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |) in @@ -964,7 +1005,7 @@ Module iter. (lo, hi) } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -994,13 +1035,19 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)) + ] + |) |) |) |) @@ -1019,8 +1066,9 @@ Module iter. "core::option::Option::Some", 0 |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -1088,12 +1136,19 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| lo |); M.read (| hi |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| lo |)); A.to_value (M.read (| hi |)) ] + |) + |))) ] |) |))) @@ -1116,7 +1171,7 @@ Module iter. self.iter.try_fold(acc, f) } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -1209,7 +1264,16 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| init |); M.read (| v |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| init |)); + A.to_value (M.read (| v |)) + ] + |) + ] |) ] |) @@ -1296,7 +1360,7 @@ Module iter. self.iter.fold(acc, fold) } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1353,7 +1417,16 @@ Module iter. "call_mut", [] |), - [ fold; Value.Tuple [ M.read (| init |); M.read (| v |) ] ] + [ + fold; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| init |)); + A.to_value (M.read (| v |)) + ] + |) + ] |) |))); fun γ => ltac:(M.monadic init) @@ -1419,7 +1492,7 @@ Module iter. } } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1490,8 +1563,8 @@ Module iter. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1513,7 +1586,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))); @@ -1526,7 +1600,9 @@ Module iter. 0 |) in let γ0_0 := M.read (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1573,7 +1649,7 @@ Module iter. } } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -1688,7 +1764,16 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| acc |); M.read (| v |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| v |)) + ] + |) + ] |) |))); fun γ => @@ -1707,13 +1792,18 @@ Module iter. "core::iter::adapters::peekable::Peekable", "peeked" |), - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::option::Option::Some" - [ M.read (| v |) ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| v |)) ] + |)) + ] + |) |) in M.alloc (| M.call_closure (| @@ -1772,7 +1862,7 @@ Module iter. } } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1844,7 +1934,13 @@ Module iter. "call_mut", [] |), - [ fold; Value.Tuple [ M.read (| acc |); M.read (| v |) ] ] + [ + fold; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| acc |)); A.to_value (M.read (| v |)) ] + |) + ] |) |))); fun γ => @@ -1944,7 +2040,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/iter/adapters/rev.v b/CoqOfRust/core/iter/adapters/rev.v index 993c52cae..5b394e745 100644 --- a/CoqOfRust/core/iter/adapters/rev.v +++ b/CoqOfRust/core/iter/adapters/rev.v @@ -16,27 +16,30 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::rev::Rev") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::rev::Rev" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::rev::Rev", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::rev::Rev" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::rev::Rev", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -54,7 +57,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::rev::Rev") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -69,17 +72,18 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Rev" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "Rev" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::rev::Rev", "iter" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -103,13 +107,17 @@ Module iter. Rev { iter } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in - Value.StructRecord "core::iter::adapters::rev::Rev" [ ("iter", M.read (| iter |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::rev::Rev" + [ ("iter", A.to_value (M.read (| iter |))) ] + |))) | _, _ => M.impossible end. @@ -130,7 +138,7 @@ Module iter. self.iter.next_back() } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -160,7 +168,7 @@ Module iter. self.iter.size_hint() } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -190,7 +198,7 @@ Module iter. self.iter.advance_back_by(n) } *) - Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -222,7 +230,7 @@ Module iter. self.iter.nth_back(n) } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -259,7 +267,7 @@ Module iter. self.iter.try_rfold(init, f) } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -296,7 +304,7 @@ Module iter. self.iter.rfold(init, f) } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -335,7 +343,7 @@ Module iter. self.iter.rfind(predicate) } *) - Definition find (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ P ], [ self; predicate ] => @@ -390,7 +398,7 @@ Module iter. self.iter.next() } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -420,7 +428,7 @@ Module iter. self.iter.advance_by(n) } *) - Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -452,7 +460,7 @@ Module iter. self.iter.nth(n) } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -483,7 +491,7 @@ Module iter. self.iter.try_fold(init, f) } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -520,7 +528,7 @@ Module iter. self.iter.fold(init, f) } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -559,7 +567,7 @@ Module iter. self.iter.find(predicate) } *) - Definition rfind (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfind (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ P ], [ self; predicate ] => @@ -612,7 +620,7 @@ Module iter. self.iter.len() } *) - Definition len (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -642,7 +650,7 @@ Module iter. self.iter.is_empty() } *) - Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -713,7 +721,7 @@ Module iter. Rev::new(Default::default()) } *) - Definition default (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [] => diff --git a/CoqOfRust/core/iter/adapters/scan.v b/CoqOfRust/core/iter/adapters/scan.v index 08aa788fa..995b4ee7c 100644 --- a/CoqOfRust/core/iter/adapters/scan.v +++ b/CoqOfRust/core/iter/adapters/scan.v @@ -16,49 +16,54 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::scan::Scan") [ I; St; F ]. (* Clone *) - Definition clone (I St F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I St F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I St F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::scan::Scan" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::scan::Scan", - "iter" - |) - ] - |)); - ("f", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::scan::Scan", - "f" - |) - ] - |)); - ("state", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", St, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::scan::Scan", - "state" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::scan::Scan" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::scan::Scan", + "iter" + |) + ] + |))); + ("f", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::scan::Scan", + "f" + |) + ] + |))); + ("state", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", St, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::scan::Scan", + "state" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -80,7 +85,7 @@ Module iter. Scan { iter, state, f } } *) - Definition new (I St F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I St F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I St F in match τ, α with | [], [ iter; state; f ] => @@ -88,10 +93,15 @@ Module iter. (let iter := M.alloc (| iter |) in let state := M.alloc (| state |) in let f := M.alloc (| f |) in - Value.StructRecord - "core::iter::adapters::scan::Scan" - [ ("iter", M.read (| iter |)); ("state", M.read (| state |)); ("f", M.read (| f |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::scan::Scan" + [ + ("iter", A.to_value (M.read (| iter |))); + ("state", A.to_value (M.read (| state |))); + ("f", A.to_value (M.read (| f |))) + ] + |))) | _, _ => M.impossible end. @@ -109,7 +119,7 @@ Module iter. f.debug_struct("Scan").field("iter", &self.iter).field("state", &self.state).finish() } *) - Definition fmt (I St F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I St F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I St F in match τ, α with | [], [ self; f ] => @@ -144,27 +154,29 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Scan" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Scan" |) |) ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::scan::Scan", "iter" - |)) + |) + |) ] |); - M.read (| Value.String "state" |); + M.read (| M.of_value (| Value.String "state" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::scan::Scan", "state" - |)) + |) + |) ] |) ] @@ -194,7 +206,7 @@ Module iter. (self.f)(&mut self.state, a) } *) - Definition next (B I St F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (B I St F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I St F in match τ, α with | [], [ self ] => @@ -295,15 +307,18 @@ Module iter. "core::iter::adapters::scan::Scan", "f" |); - Value.Tuple - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::scan::Scan", - "state" - |); - M.read (| a |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::scan::Scan", + "state" + |)); + A.to_value (M.read (| a |)) + ] + |) ] |) |) @@ -318,7 +333,7 @@ Module iter. (0, upper) // can't know a lower bound, due to the scan function } *) - Definition size_hint (B I St F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (B I St F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I St F in match τ, α with | [], [ self ] => @@ -351,7 +366,13 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let upper := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple [ Value.Integer Integer.Usize 0; M.read (| upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |) @@ -382,7 +403,7 @@ Module iter. self.iter.try_fold(init, scan(state, f, fold)).into_try() } *) - Definition try_fold (B I St F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (B I St F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I St F in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -459,7 +480,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition fold (B I St F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (B I St F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B I St F in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => @@ -532,7 +553,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (St F I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (St F I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self St F I in match τ, α with | [], [ self ] => @@ -572,7 +593,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (St F I : Ty.t) : Value.t := + Definition value_EXPAND_BY (St F I : Ty.t) : A.t := let Self : Ty.t := Self St F I in M.run ltac:(M.monadic @@ -582,7 +603,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (St F I : Ty.t) : Value.t := + Definition value_MERGE_BY (St F I : Ty.t) : A.t := let Self : Ty.t := Self St F I in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/skip.v b/CoqOfRust/core/iter/adapters/skip.v index 682f1cf6a..015e8d7b5 100644 --- a/CoqOfRust/core/iter/adapters/skip.v +++ b/CoqOfRust/core/iter/adapters/skip.v @@ -16,44 +16,48 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::skip::Skip") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::skip::Skip" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::skip::Skip", - "iter" - |) - ] - |)); - ("n", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::skip::Skip", - "n" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::skip::Skip" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::skip::Skip", + "iter" + |) + ] + |))); + ("n", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::skip::Skip", + "n" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -71,7 +75,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::skip::Skip") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -86,25 +90,27 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Skip" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "Skip" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::skip::Skip", "iter" - |)); - M.read (| Value.String "n" |); + |) + |); + M.read (| M.of_value (| Value.String "n" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::skip::Skip", "n" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -128,16 +134,18 @@ Module iter. Skip { iter, n } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter; n ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let n := M.alloc (| n |) in - Value.StructRecord - "core::iter::adapters::skip::Skip" - [ ("iter", M.read (| iter |)); ("n", M.read (| n |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::skip::Skip" + [ ("iter", A.to_value (M.read (| iter |))); ("n", A.to_value (M.read (| n |))) ] + |))) | _, _ => M.impossible end. @@ -162,7 +170,7 @@ Module iter. } } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -170,7 +178,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -180,15 +188,16 @@ Module iter. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::skip::Skip", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) ] |) |)) in @@ -270,7 +279,7 @@ Module iter. } } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -281,22 +290,23 @@ Module iter. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::skip::Skip", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -368,8 +378,9 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| skip |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -487,7 +498,7 @@ Module iter. self.iter.count() } *) - Definition count (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -498,22 +509,23 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::skip::Skip", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -521,7 +533,7 @@ Module iter. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -553,6 +565,7 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -560,7 +573,7 @@ Module iter. "n" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -575,13 +588,16 @@ Module iter. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.Usize 0 |) |) + M.read (| + M.return_ (| M.of_value (| Value.Integer 0 |) |) + |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -618,7 +634,7 @@ Module iter. self.iter.last() } *) - Definition last (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -629,22 +645,23 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::skip::Skip", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -678,6 +695,7 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -685,7 +703,7 @@ Module iter. "n" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -738,8 +756,8 @@ Module iter. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -780,7 +798,7 @@ Module iter. (lower, upper) } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -844,37 +862,47 @@ Module iter. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_sub", - [] - |), - [ - M.read (| x |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::skip::Skip", - "n" - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ + M.read (| x |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::skip::Skip", + "n" + |) + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| lower |); M.read (| upper |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| lower |)); A.to_value (M.read (| upper |)) ] + |) + |))) ] |) |))) @@ -899,7 +927,7 @@ Module iter. self.iter.try_fold(init, fold) } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -925,18 +953,21 @@ Module iter. "core::iter::adapters::skip::Skip", "n" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| n |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -944,7 +975,7 @@ Module iter. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -976,8 +1007,9 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -1008,10 +1040,11 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1053,7 +1086,7 @@ Module iter. self.iter.fold(init, fold) } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1066,22 +1099,23 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::skip::Skip", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1089,7 +1123,7 @@ Module iter. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1121,6 +1155,7 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -1128,7 +1163,7 @@ Module iter. "n" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -1146,10 +1181,11 @@ Module iter. M.read (| M.return_ (| M.read (| init |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1203,7 +1239,7 @@ Module iter. NonZeroUsize::new(n).map_or(Ok(()), Err) } *) - Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1257,7 +1293,7 @@ Module iter. "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1282,13 +1318,18 @@ Module iter. |) in let advanced_inner := M.alloc (| - BinOp.Panic.sub (| M.read (| skip_and_advance |), M.read (| remainder |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| skip_and_advance |), + M.read (| remainder |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), @@ -1319,7 +1360,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1330,13 +1371,15 @@ Module iter. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.and (| - BinOp.Pure.eq - (M.read (| remainder |)) - (Value.Integer Integer.Usize 0), + BinOp.Pure.eq (| + M.read (| remainder |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| n |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.gt (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |))) |) ] |) @@ -1375,7 +1418,7 @@ Module iter. "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1399,7 +1442,7 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1429,8 +1472,12 @@ Module iter. |), [ M.read (| n |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -1480,7 +1527,7 @@ Module iter. if self.len() > 0 { self.iter.next_back() } else { None } } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1488,15 +1535,15 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -1508,8 +1555,9 @@ Module iter. [] |), [ self ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1533,7 +1581,9 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1554,7 +1604,7 @@ Module iter. } } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1578,12 +1628,13 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.lt (M.read (| n |)) (M.read (| len |)) |)) in + M.use + (M.alloc (| BinOp.Pure.lt (| M.read (| n |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1609,16 +1660,17 @@ Module iter. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| len |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1642,17 +1694,21 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1681,7 +1737,7 @@ Module iter. if n == 0 { try { init } } else { self.iter.try_rfold(init, check(n, fold)).into_try() } } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -1706,14 +1762,14 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| n |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1787,7 +1843,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => @@ -1839,7 +1895,7 @@ Module iter. NonZeroUsize::new(n - min).map_or(Ok(()), Err) } *) - Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1890,15 +1946,15 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::result::Result") @@ -1907,7 +1963,8 @@ Module iter. [] |), [ rem ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1924,22 +1981,29 @@ Module iter. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "ExactSizeIterator contract violation" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "ExactSizeIterator contract violation" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1967,10 +2031,14 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| min |) |) ] + [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| min |) |) ] + |); + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -2033,7 +2101,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -2073,7 +2141,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I : Ty.t) : Value.t := + Definition value_EXPAND_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -2083,7 +2151,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I : Ty.t) : Value.t := + Definition value_MERGE_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/skip_while.v b/CoqOfRust/core/iter/adapters/skip_while.v index e327eeccc..486c17f71 100644 --- a/CoqOfRust/core/iter/adapters/skip_while.v +++ b/CoqOfRust/core/iter/adapters/skip_while.v @@ -16,55 +16,60 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::skip_while::SkipWhile") [ I; P ]. (* Clone *) - Definition clone (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::skip_while::SkipWhile" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::skip_while::SkipWhile", - "iter" - |) - ] - |)); - ("flag", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "bool", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::skip_while::SkipWhile", - "flag" - |) - ] - |)); - ("predicate", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::skip_while::SkipWhile", - "predicate" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::skip_while::SkipWhile" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::skip_while::SkipWhile", + "iter" + |) + ] + |))); + ("flag", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::skip_while::SkipWhile", + "flag" + |) + ] + |))); + ("predicate", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::skip_while::SkipWhile", + "predicate" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -86,20 +91,22 @@ Module iter. SkipWhile { iter, flag: false, predicate } } *) - Definition new (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ iter; predicate ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let predicate := M.alloc (| predicate |) in - Value.StructRecord - "core::iter::adapters::skip_while::SkipWhile" - [ - ("iter", M.read (| iter |)); - ("flag", Value.Bool false); - ("predicate", M.read (| predicate |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::skip_while::SkipWhile" + [ + ("iter", A.to_value (M.read (| iter |))); + ("flag", A.to_value (M.of_value (| Value.Bool false |))); + ("predicate", A.to_value (M.read (| predicate |))) + ] + |))) | _, _ => M.impossible end. @@ -117,7 +124,7 @@ Module iter. f.debug_struct("SkipWhile").field("iter", &self.iter).field("flag", &self.flag).finish() } *) - Definition fmt (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self; f ] => @@ -152,27 +159,32 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SkipWhile" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SkipWhile" |) |) + ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::skip_while::SkipWhile", "iter" - |)) + |) + |) ] |); - M.read (| Value.String "flag" |); + M.read (| M.of_value (| Value.String "flag" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::skip_while::SkipWhile", "flag" - |)) + |) + |) ] |) ] @@ -217,7 +229,7 @@ Module iter. self.iter.find(check(flag, pred)) } *) - Definition next (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -272,7 +284,7 @@ Module iter. (0, upper) // can't know a lower bound, due to the predicate } *) - Definition size_hint (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -305,7 +317,13 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let upper := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple [ Value.Integer Integer.Usize 0; M.read (| upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |) @@ -329,7 +347,7 @@ Module iter. self.iter.try_fold(init, fold) } *) - Definition try_fold (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -342,21 +360,22 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::skip_while::SkipWhile", "flag" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -412,8 +431,13 @@ Module iter. |), [ fold; - Value.Tuple - [ M.read (| init |); M.read (| v |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| init |)); + A.to_value (M.read (| v |)) + ] + |) ] |) ] @@ -483,7 +507,7 @@ Module iter. |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -525,7 +549,7 @@ Module iter. self.iter.fold(init, fold) } *) - Definition fold (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -538,21 +562,22 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::skip_while::SkipWhile", "flag" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -594,7 +619,15 @@ Module iter. "call_mut", [] |), - [ fold; Value.Tuple [ M.read (| init |); M.read (| v |) ] + [ + fold; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| init |)); + A.to_value (M.read (| v |)) + ] + |) ] |) |))); @@ -607,7 +640,7 @@ Module iter. |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -692,7 +725,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (P I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (P I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P I in match τ, α with | [], [ self ] => @@ -732,7 +765,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I F : Ty.t) : Value.t := + Definition value_EXPAND_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic @@ -742,7 +775,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I F : Ty.t) : Value.t := + Definition value_MERGE_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/step_by.v b/CoqOfRust/core/iter/adapters/step_by.v index af55d8728..56a0ed43c 100644 --- a/CoqOfRust/core/iter/adapters/step_by.v +++ b/CoqOfRust/core/iter/adapters/step_by.v @@ -16,61 +16,66 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::step_by::StepBy") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::step_by::StepBy" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::step_by::StepBy", - "iter" - |) - ] - |)); - ("step", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::step_by::StepBy", - "step" - |) - ] - |)); - ("first_take", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "bool", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::step_by::StepBy", - "first_take" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::step_by::StepBy" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::step_by::StepBy", + "iter" + |) + ] + |))); + ("step", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::step_by::StepBy", + "step" + |) + ] + |))); + ("first_take", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::step_by::StepBy", + "first_take" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -88,7 +93,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::step_by::StepBy") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -103,33 +108,36 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "StepBy" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "StepBy" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "iter" - |)); - M.read (| Value.String "step" |); + |) + |); + M.read (| M.of_value (| Value.String "step" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" - |)); - M.read (| Value.String "first_take" |); + |) + |); + M.read (| M.of_value (| Value.String "first_take" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "first_take" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -155,7 +163,7 @@ Module iter. StepBy { iter, step: step - 1, first_take: true } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter; step ] => @@ -165,17 +173,19 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| step |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| step |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -183,11 +193,15 @@ Module iter. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: step != 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: step != 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let iter := @@ -204,14 +218,21 @@ Module iter. |) |) in M.alloc (| - Value.StructRecord - "core::iter::adapters::step_by::StepBy" - [ - ("iter", M.read (| iter |)); - ("step", - BinOp.Panic.sub (| M.read (| step |), Value.Integer Integer.Usize 1 |)); - ("first_take", Value.Bool true) - ] + M.of_value (| + Value.StructRecord + "core::iter::adapters::step_by::StepBy" + [ + ("iter", A.to_value (M.read (| iter |))); + ("step", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| step |), + M.of_value (| Value.Integer 1 |) + |))); + ("first_take", A.to_value (M.of_value (| Value.Bool true |))) + ] + |) |) |))) | _, _ => M.impossible @@ -226,7 +247,7 @@ Module iter. if self.first_take { if rem == 0 { self.step } else { rem - 1 } } else { rem } } *) - Definition next_back_index (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_index (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -236,6 +257,7 @@ Module iter. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", @@ -253,6 +275,7 @@ Module iter. ] |), BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -260,12 +283,12 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -279,16 +302,17 @@ Module iter. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| rem |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| rem |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -304,8 +328,9 @@ Module iter. ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| rem |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -334,7 +359,7 @@ Module iter. self.spec_next() } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -358,7 +383,7 @@ Module iter. self.spec_size_hint() } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -382,7 +407,7 @@ Module iter. self.spec_nth(n) } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -411,7 +436,7 @@ Module iter. self.spec_try_fold(acc, f) } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F; R ], [ self; acc; f ] => @@ -440,7 +465,7 @@ Module iter. self.spec_fold(acc, f) } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F ], [ self; acc; f ] => @@ -488,7 +513,7 @@ Module iter. self.spec_next_back() } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -512,7 +537,7 @@ Module iter. self.spec_nth_back(n) } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -541,7 +566,7 @@ Module iter. self.spec_try_rfold(init, f) } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F; R ], [ self; init; f ] => @@ -571,7 +596,7 @@ Module iter. self.spec_rfold(init, f) } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -631,7 +656,7 @@ Module iter. inner } *) - Definition setup (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition setup (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ inner; _step ] => @@ -671,7 +696,7 @@ Module iter. self.iter.nth(step_size) } *) - Definition spec_next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -681,7 +706,7 @@ Module iter. let step_size := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -694,7 +719,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (M.SubPointer.get_struct_record_field (| @@ -712,7 +737,7 @@ Module iter. "core::iter::adapters::step_by::StepBy", "first_take" |), - Value.Bool false + M.of_value (| Value.Bool false |) |) in M.alloc (| M.call_closure (| @@ -760,7 +785,7 @@ Module iter. } } *) - Definition spec_size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -794,7 +819,7 @@ Module iter. let low := M.copy (| γ0_0 |) in let high := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -830,29 +855,38 @@ Module iter. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::Fn", - Ty.associated, - [ Ty.tuple [ Ty.path "usize" ] ], - "call", - [] - |), - [ f; Value.Tuple [ M.read (| low |) ] ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "usize" ], - "map", - [ Ty.path "usize"; Ty.associated ] - |), - [ M.read (| high |); M.read (| f |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + Ty.associated, + [ Ty.tuple [ Ty.path "usize" ] ], + "call", + [] + |), + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| low |)) ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ], + "map", + [ Ty.path "usize"; Ty.associated ] + |), + [ M.read (| high |); M.read (| f |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -876,29 +910,38 @@ Module iter. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::Fn", - Ty.associated, - [ Ty.tuple [ Ty.path "usize" ] ], - "call", - [] - |), - [ f; Value.Tuple [ M.read (| low |) ] ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "usize" ], - "map", - [ Ty.path "usize"; Ty.associated ] - |), - [ M.read (| high |); M.read (| f |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + Ty.associated, + [ Ty.tuple [ Ty.path "usize" ] ], + "call", + [] + |), + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| low |)) ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ], + "map", + [ Ty.path "usize"; Ty.associated ] + |), + [ M.read (| high |); M.read (| f |) ] + |)) + ] + |) |))) ] |))) @@ -953,7 +996,7 @@ Module iter. } } *) - Definition spec_nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -965,7 +1008,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -988,7 +1031,7 @@ Module iter. "core::iter::adapters::step_by::StepBy", "first_take" |), - Value.Bool false + M.of_value (| Value.Bool false |) |) in let first := M.alloc (| @@ -1011,16 +1054,17 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| n |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1032,7 +1076,9 @@ Module iter. M.read (| M.return_ (| M.read (| first |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1040,17 +1086,19 @@ Module iter. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let step := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1058,21 +1106,22 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| n |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + BinOp.Pure.eq (| + M.read (| n |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1096,13 +1145,14 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| step |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1110,11 +1160,12 @@ Module iter. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1135,7 +1186,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1182,6 +1233,7 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -1192,7 +1244,7 @@ Module iter. |), [ M.read (| mul |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -1200,12 +1252,15 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let div_n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.read (| M.get_constant (| "core::num::MAX" |) |), M.read (| n |) |) @@ -1213,31 +1268,41 @@ Module iter. let div_step := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.read (| M.get_constant (| "core::num::MAX" |) |), M.read (| step |) |) |) in let nth_n := M.alloc (| - BinOp.Panic.mul (| M.read (| div_n |), M.read (| n |) |) + BinOp.Panic.mul (| + Integer.Usize, + M.read (| div_n |), + M.read (| n |) + |) |) in let nth_step := M.alloc (| - BinOp.Panic.mul (| M.read (| div_step |), M.read (| step |) |) + BinOp.Panic.mul (| + Integer.Usize, + M.read (| div_step |), + M.read (| step |) + |) |) in let nth := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| nth_n |)) - (M.read (| nth_step |)) + BinOp.Pure.gt (| + M.read (| nth_n |), + M.read (| nth_step |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1249,6 +1314,7 @@ Module iter. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| div_n |) |) @@ -1261,6 +1327,7 @@ Module iter. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| div_step |) |) @@ -1286,13 +1353,14 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| nth |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) |) |) @@ -1323,7 +1391,7 @@ Module iter. from_fn(nth(&mut self.iter, self.step)).try_fold(acc, f) } *) - Definition spec_try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F; R ], [ self; acc; f ] => @@ -1336,7 +1404,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1359,7 +1427,7 @@ Module iter. "core::iter::adapters::step_by::StepBy", "first_take" |), - Value.Bool false + M.of_value (| Value.Bool false |) |) in M.match_operator (| M.alloc (| @@ -1434,8 +1502,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| acc |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -1485,7 +1558,7 @@ Module iter. |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1557,7 +1630,7 @@ Module iter. from_fn(nth(&mut self.iter, self.step)).fold(acc, f) } *) - Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F ], [ self; acc; f ] => @@ -1570,7 +1643,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1593,7 +1666,7 @@ Module iter. "core::iter::adapters::step_by::StepBy", "first_take" |), - Value.Bool false + M.of_value (| Value.Bool false |) |) in M.match_operator (| M.alloc (| @@ -1641,12 +1714,21 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| acc |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1725,7 +1807,7 @@ Module iter. self.iter.nth_back(self.next_back_index()) } *) - Definition spec_next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -1768,7 +1850,7 @@ Module iter. self.iter.nth_back(n) } *) - Definition spec_nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1786,6 +1868,7 @@ Module iter. [ M.read (| n |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1793,7 +1876,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -1854,7 +1937,7 @@ Module iter. } } *) - Definition spec_try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F; R ], [ self; init; f ] => @@ -1923,7 +2006,16 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| init |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| init |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) ] |) @@ -2047,7 +2139,7 @@ Module iter. } } *) - Definition spec_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -2090,7 +2182,13 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| init |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| init |)); A.to_value (M.read (| x |)) ] + |) + ] |) |) in M.alloc (| @@ -2171,7 +2269,7 @@ Module iter. r } *) - Definition setup (τ : list Ty.t) (α : list Value.t) : M := + Definition setup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ r; step ] => ltac:(M.monadic @@ -2206,7 +2304,7 @@ Module iter. let _ := M.write (| M.SubPointer.get_struct_record_field (| r, "core::ops::range::Range", "end" |), - M.rust_cast (M.read (| yield_count |)) + M.rust_cast (| M.read (| yield_count |) |) |) in r |))) @@ -2247,7 +2345,7 @@ Module iter. } } *) - Definition spec_next (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2274,6 +2372,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2281,7 +2380,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -2302,14 +2401,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.U8 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2352,14 +2454,24 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| M.read (| remaining |), Value.Integer Integer.U8 1 |) + BinOp.Panic.sub (| + Integer.U8, + M.read (| remaining |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2372,7 +2484,7 @@ Module iter. (remaining, Some(remaining)) } *) - Definition spec_size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2380,8 +2492,8 @@ Module iter. M.read (| let remaining := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2391,14 +2503,22 @@ Module iter. "core::ops::range::Range", "end" |) - |)) + |) + |) |) in M.alloc (| - Value.Tuple - [ - M.read (| remaining |); - Value.StructTuple "core::option::Option::Some" [ M.read (| remaining |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| remaining |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| remaining |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -2410,7 +2530,7 @@ Module iter. self.next() } *) - Definition spec_nth (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -2539,7 +2659,7 @@ Module iter. try { accum } } *) - Definition spec_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -2554,7 +2674,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2609,8 +2729,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -2658,7 +2783,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2668,7 +2793,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2712,7 +2837,7 @@ Module iter. acc } *) - Definition spec_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F ], [ self; init; f ] => ltac:(M.monadic @@ -2741,6 +2866,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -2748,7 +2874,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -2794,12 +2920,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.U8 0); - ("end_", M.read (| remaining |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| remaining |))) + ] + |) ] |) |), @@ -2852,7 +2980,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| acc |); M.read (| val |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| val |)) + ] + |) ] |) |) in @@ -2868,10 +3002,10 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2924,7 +3058,7 @@ Module iter. r } *) - Definition setup (τ : list Ty.t) (α : list Value.t) : M := + Definition setup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ r; step ] => ltac:(M.monadic @@ -2959,7 +3093,7 @@ Module iter. let _ := M.write (| M.SubPointer.get_struct_record_field (| r, "core::ops::range::Range", "end" |), - M.rust_cast (M.read (| yield_count |)) + M.rust_cast (| M.read (| yield_count |) |) |) in r |))) @@ -3000,7 +3134,7 @@ Module iter. } } *) - Definition spec_next (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3027,6 +3161,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3034,7 +3169,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -3055,14 +3190,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.U16 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3106,16 +3244,23 @@ Module iter. "end" |), BinOp.Panic.sub (| + Integer.U16, M.read (| remaining |), - Value.Integer Integer.U16 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3128,7 +3273,7 @@ Module iter. (remaining, Some(remaining)) } *) - Definition spec_size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3136,8 +3281,8 @@ Module iter. M.read (| let remaining := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3147,14 +3292,22 @@ Module iter. "core::ops::range::Range", "end" |) - |)) + |) + |) |) in M.alloc (| - Value.Tuple - [ - M.read (| remaining |); - Value.StructTuple "core::option::Option::Some" [ M.read (| remaining |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| remaining |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| remaining |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -3166,7 +3319,7 @@ Module iter. self.next() } *) - Definition spec_nth (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -3295,7 +3448,7 @@ Module iter. try { accum } } *) - Definition spec_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -3310,7 +3463,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3365,8 +3518,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -3414,7 +3572,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3424,7 +3582,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -3468,7 +3626,7 @@ Module iter. acc } *) - Definition spec_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F ], [ self; init; f ] => ltac:(M.monadic @@ -3497,6 +3655,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -3504,7 +3663,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -3550,12 +3709,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.U16 0); - ("end_", M.read (| remaining |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| remaining |))) + ] + |) ] |) |), @@ -3608,7 +3769,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| acc |); M.read (| val |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| val |)) + ] + |) ] |) |) in @@ -3624,10 +3791,10 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3680,7 +3847,7 @@ Module iter. r } *) - Definition setup (τ : list Ty.t) (α : list Value.t) : M := + Definition setup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ r; step ] => ltac:(M.monadic @@ -3715,7 +3882,7 @@ Module iter. let _ := M.write (| M.SubPointer.get_struct_record_field (| r, "core::ops::range::Range", "end" |), - M.rust_cast (M.read (| yield_count |)) + M.rust_cast (| M.read (| yield_count |) |) |) in r |))) @@ -3756,7 +3923,7 @@ Module iter. } } *) - Definition spec_next (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3783,6 +3950,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3790,7 +3958,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -3811,14 +3979,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.U32 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3862,16 +4033,23 @@ Module iter. "end" |), BinOp.Panic.sub (| + Integer.U32, M.read (| remaining |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3884,7 +4062,7 @@ Module iter. (remaining, Some(remaining)) } *) - Definition spec_size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3892,8 +4070,8 @@ Module iter. M.read (| let remaining := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3903,14 +4081,22 @@ Module iter. "core::ops::range::Range", "end" |) - |)) + |) + |) |) in M.alloc (| - Value.Tuple - [ - M.read (| remaining |); - Value.StructTuple "core::option::Option::Some" [ M.read (| remaining |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| remaining |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| remaining |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -3922,7 +4108,7 @@ Module iter. self.next() } *) - Definition spec_nth (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -4051,7 +4237,7 @@ Module iter. try { accum } } *) - Definition spec_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -4066,7 +4252,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4121,8 +4307,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -4170,7 +4361,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4180,7 +4371,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4224,7 +4415,7 @@ Module iter. acc } *) - Definition spec_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F ], [ self; init; f ] => ltac:(M.monadic @@ -4253,6 +4444,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -4260,7 +4452,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -4306,12 +4498,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.U32 0); - ("end_", M.read (| remaining |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| remaining |))) + ] + |) ] |) |), @@ -4364,7 +4558,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| acc |); M.read (| val |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| val |)) + ] + |) ] |) |) in @@ -4380,10 +4580,10 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4436,7 +4636,7 @@ Module iter. r } *) - Definition setup (τ : list Ty.t) (α : list Value.t) : M := + Definition setup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ r; step ] => ltac:(M.monadic @@ -4471,7 +4671,7 @@ Module iter. let _ := M.write (| M.SubPointer.get_struct_record_field (| r, "core::ops::range::Range", "end" |), - M.rust_cast (M.read (| yield_count |)) + M.rust_cast (| M.read (| yield_count |) |) |) in r |))) @@ -4512,7 +4712,7 @@ Module iter. } } *) - Definition spec_next (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4539,6 +4739,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4546,7 +4747,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -4567,14 +4768,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.U64 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4618,16 +4822,23 @@ Module iter. "end" |), BinOp.Panic.sub (| + Integer.U64, M.read (| remaining |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4640,7 +4851,7 @@ Module iter. (remaining, Some(remaining)) } *) - Definition spec_size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4648,8 +4859,8 @@ Module iter. M.read (| let remaining := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4659,14 +4870,22 @@ Module iter. "core::ops::range::Range", "end" |) - |)) + |) + |) |) in M.alloc (| - Value.Tuple - [ - M.read (| remaining |); - Value.StructTuple "core::option::Option::Some" [ M.read (| remaining |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| remaining |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| remaining |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -4678,7 +4897,7 @@ Module iter. self.next() } *) - Definition spec_nth (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -4807,7 +5026,7 @@ Module iter. try { accum } } *) - Definition spec_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -4822,7 +5041,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4877,8 +5096,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -4926,7 +5150,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4936,7 +5160,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4980,7 +5204,7 @@ Module iter. acc } *) - Definition spec_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F ], [ self; init; f ] => ltac:(M.monadic @@ -5009,6 +5233,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -5016,7 +5241,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -5062,12 +5287,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.U64 0); - ("end_", M.read (| remaining |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| remaining |))) + ] + |) ] |) |), @@ -5120,7 +5347,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| acc |); M.read (| val |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| val |)) + ] + |) ] |) |) in @@ -5136,10 +5369,10 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -5192,7 +5425,7 @@ Module iter. r } *) - Definition setup (τ : list Ty.t) (α : list Value.t) : M := + Definition setup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ r; step ] => ltac:(M.monadic @@ -5268,7 +5501,7 @@ Module iter. } } *) - Definition spec_next (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5295,6 +5528,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5302,7 +5536,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -5323,14 +5557,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5374,16 +5611,23 @@ Module iter. "end" |), BinOp.Panic.sub (| + Integer.Usize, M.read (| remaining |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5396,7 +5640,7 @@ Module iter. (remaining, Some(remaining)) } *) - Definition spec_size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5416,11 +5660,18 @@ Module iter. |)) |) in M.alloc (| - Value.Tuple - [ - M.read (| remaining |); - Value.StructTuple "core::option::Option::Some" [ M.read (| remaining |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| remaining |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| remaining |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -5432,7 +5683,7 @@ Module iter. self.next() } *) - Definition spec_nth (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -5561,7 +5812,7 @@ Module iter. try { accum } } *) - Definition spec_try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -5576,7 +5827,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5631,8 +5882,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -5680,7 +5936,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5690,7 +5946,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -5734,7 +5990,7 @@ Module iter. acc } *) - Definition spec_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F ], [ self; init; f ] => ltac:(M.monadic @@ -5763,6 +6019,7 @@ Module iter. |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -5770,7 +6027,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); @@ -5816,12 +6073,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| remaining |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| remaining |))) + ] + |) ] |) |), @@ -5874,7 +6133,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| acc |); M.read (| val |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| val |)) + ] + |) ] |) |) in @@ -5890,10 +6155,10 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -5953,7 +6218,7 @@ Module iter. } } *) - Definition spec_next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5961,8 +6226,9 @@ Module iter. M.read (| let step := M.alloc (| - M.rust_cast - (BinOp.Panic.add (| + M.rust_cast (| + BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5970,8 +6236,9 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let remaining := M.copy (| @@ -5986,14 +6253,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.U8 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6020,27 +6290,39 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| M.read (| remaining |), Value.Integer Integer.U8 1 |) + BinOp.Panic.sub (| + Integer.U8, + M.read (| remaining |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.read (| start |), - BinOp.Panic.mul (| - M.read (| step |), - BinOp.Panic.sub (| - M.read (| remaining |), - Value.Integer Integer.U8 1 - |) - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.U8, + M.read (| start |), + BinOp.Panic.mul (| + Integer.U8, + M.read (| step |), + BinOp.Panic.sub (| + Integer.U8, + M.read (| remaining |), + M.of_value (| Value.Integer 1 |) + |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -6057,7 +6339,7 @@ Module iter. self.next_back() } *) - Definition spec_nth_back (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -6068,7 +6350,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6115,12 +6397,14 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -6156,7 +6440,7 @@ Module iter. try { accum } } *) - Definition spec_try_rfold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_rfold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -6171,7 +6455,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6226,8 +6510,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -6275,7 +6564,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -6285,7 +6574,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -6322,7 +6611,7 @@ Module iter. accum } *) - Definition spec_rfold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_rfold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F ], [ self; init; f ] => ltac:(M.monadic @@ -6335,7 +6624,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6376,10 +6665,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -6389,7 +6687,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -6437,7 +6735,7 @@ Module iter. } } *) - Definition spec_next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6445,8 +6743,9 @@ Module iter. M.read (| let step := M.alloc (| - M.rust_cast - (BinOp.Panic.add (| + M.rust_cast (| + BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6454,8 +6753,9 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let remaining := M.copy (| @@ -6470,14 +6770,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.U16 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6505,29 +6808,38 @@ Module iter. "end" |), BinOp.Panic.sub (| + Integer.U16, M.read (| remaining |), - Value.Integer Integer.U16 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.read (| start |), - BinOp.Panic.mul (| - M.read (| step |), - BinOp.Panic.sub (| - M.read (| remaining |), - Value.Integer Integer.U16 1 - |) - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.U16, + M.read (| start |), + BinOp.Panic.mul (| + Integer.U16, + M.read (| step |), + BinOp.Panic.sub (| + Integer.U16, + M.read (| remaining |), + M.of_value (| Value.Integer 1 |) + |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -6544,7 +6856,7 @@ Module iter. self.next_back() } *) - Definition spec_nth_back (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -6555,7 +6867,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6602,12 +6914,14 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -6643,7 +6957,7 @@ Module iter. try { accum } } *) - Definition spec_try_rfold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_rfold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -6658,7 +6972,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6713,8 +7027,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -6762,7 +7081,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -6772,7 +7091,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -6809,7 +7128,7 @@ Module iter. accum } *) - Definition spec_rfold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_rfold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F ], [ self; init; f ] => ltac:(M.monadic @@ -6822,7 +7141,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6863,10 +7182,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -6876,7 +7204,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -6924,7 +7252,7 @@ Module iter. } } *) - Definition spec_next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6932,8 +7260,9 @@ Module iter. M.read (| let step := M.alloc (| - M.rust_cast - (BinOp.Panic.add (| + M.rust_cast (| + BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6941,8 +7270,9 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let remaining := M.copy (| @@ -6957,14 +7287,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.U32 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6992,29 +7325,38 @@ Module iter. "end" |), BinOp.Panic.sub (| + Integer.U32, M.read (| remaining |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.read (| start |), - BinOp.Panic.mul (| - M.read (| step |), - BinOp.Panic.sub (| - M.read (| remaining |), - Value.Integer Integer.U32 1 - |) - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.U32, + M.read (| start |), + BinOp.Panic.mul (| + Integer.U32, + M.read (| step |), + BinOp.Panic.sub (| + Integer.U32, + M.read (| remaining |), + M.of_value (| Value.Integer 1 |) + |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7031,7 +7373,7 @@ Module iter. self.next_back() } *) - Definition spec_nth_back (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -7042,7 +7384,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7089,12 +7431,14 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -7130,7 +7474,7 @@ Module iter. try { accum } } *) - Definition spec_try_rfold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_rfold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -7145,7 +7489,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7200,8 +7544,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -7249,7 +7598,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7259,7 +7608,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7296,7 +7645,7 @@ Module iter. accum } *) - Definition spec_rfold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_rfold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F ], [ self; init; f ] => ltac:(M.monadic @@ -7309,7 +7658,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7350,10 +7699,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7363,7 +7721,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7411,7 +7769,7 @@ Module iter. } } *) - Definition spec_next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7422,6 +7780,7 @@ Module iter. M.use (M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7429,7 +7788,7 @@ Module iter. "step" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |)) |) in @@ -7446,14 +7805,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -7481,29 +7843,38 @@ Module iter. "end" |), BinOp.Panic.sub (| + Integer.Usize, M.read (| remaining |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.read (| start |), - BinOp.Panic.mul (| - M.read (| step |), - BinOp.Panic.sub (| - M.read (| remaining |), - Value.Integer Integer.Usize 1 - |) - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| start |), + BinOp.Panic.mul (| + Integer.Usize, + M.read (| step |), + BinOp.Panic.sub (| + Integer.Usize, + M.read (| remaining |), + M.of_value (| Value.Integer 1 |) + |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7520,7 +7891,7 @@ Module iter. self.next_back() } *) - Definition spec_nth_back (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -7531,7 +7902,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7578,12 +7949,14 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -7619,7 +7992,7 @@ Module iter. try { accum } } *) - Definition spec_try_rfold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_rfold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -7634,7 +8007,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7689,8 +8062,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -7738,7 +8116,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7748,7 +8126,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7785,7 +8163,7 @@ Module iter. accum } *) - Definition spec_rfold (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_rfold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; F ], [ self; init; f ] => ltac:(M.monadic @@ -7798,7 +8176,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7839,10 +8217,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7852,7 +8239,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) diff --git a/CoqOfRust/core/iter/adapters/take.v b/CoqOfRust/core/iter/adapters/take.v index 5e0354070..bdbd0ef3f 100644 --- a/CoqOfRust/core/iter/adapters/take.v +++ b/CoqOfRust/core/iter/adapters/take.v @@ -16,44 +16,48 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::take::Take") [ I ]. (* Clone *) - Definition clone (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::take::Take" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::take::Take", - "iter" - |) - ] - |)); - ("n", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::take::Take", - "n" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::take::Take" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::take::Take", + "iter" + |) + ] + |))); + ("n", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::take::Take", + "n" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -71,7 +75,7 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::take::Take") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -86,25 +90,27 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Take" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "Take" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "iter" - |)); - M.read (| Value.String "n" |); + |) + |); + M.read (| M.of_value (| Value.String "n" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -128,16 +134,18 @@ Module iter. Take { iter, n } } *) - Definition new (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ iter; n ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let n := M.alloc (| n |) in - Value.StructRecord - "core::iter::adapters::take::Take" - [ ("iter", M.read (| iter |)); ("n", M.read (| n |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::take::Take" + [ ("iter", A.to_value (M.read (| iter |))); ("n", A.to_value (M.read (| n |))) ] + |))) | _, _ => M.impossible end. @@ -163,7 +171,7 @@ Module iter. } } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -171,22 +179,23 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -199,7 +208,11 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| M.call_closure (| @@ -221,7 +234,9 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -242,7 +257,7 @@ Module iter. } } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -251,22 +266,23 @@ Module iter. let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) - (M.read (| n |)) + |), + M.read (| n |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -280,8 +296,13 @@ Module iter. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) |) |) in M.alloc (| @@ -307,22 +328,23 @@ Module iter. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -346,6 +368,7 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -353,7 +376,7 @@ Module iter. "n" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -365,13 +388,16 @@ Module iter. "core::iter::adapters::take::Take", "n" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -396,7 +422,7 @@ Module iter. (lower, upper) } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -407,22 +433,23 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -433,18 +460,23 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -505,15 +537,16 @@ Module iter. let x := M.copy (| γ0_0 |) in let γ := M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) + |) + |) |) in let _ := M.is_constant_or_break_match (| @@ -521,29 +554,40 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::take::Take", - "n" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::take::Take", + "n" + |) + |)) + ] + |) |))) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| lower |); M.read (| upper |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| lower |)); A.to_value (M.read (| upper |)) + ] + |) + |))) ] |) |))) @@ -576,7 +620,7 @@ Module iter. } } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -586,22 +630,23 @@ Module iter. let fold := M.alloc (| fold |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -682,7 +727,7 @@ Module iter. Self::spec_fold(self, init, f) } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -708,7 +753,7 @@ Module iter. Self::spec_for_each(self, f) } *) - Definition for_each (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition for_each (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ F ], [ self; f ] => @@ -740,7 +785,7 @@ Module iter. NonZeroUsize::new(n - advanced).map_or(Ok(()), Err) } *) - Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -795,7 +840,7 @@ Module iter. "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -819,7 +864,9 @@ Module iter. |) |) in let advanced := - M.alloc (| BinOp.Panic.sub (| M.read (| min |), M.read (| rem |) |) |) in + M.alloc (| + BinOp.Panic.sub (| Integer.Usize, M.read (| min |), M.read (| rem |) |) + |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -827,7 +874,10 @@ Module iter. "core::iter::adapters::take::Take", "n" |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| advanced |) |) |) in + M.write (| + β, + BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| advanced |) |) + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -853,10 +903,15 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| advanced |) |) ] + [ BinOp.Panic.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" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -896,7 +951,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -936,7 +991,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I : Ty.t) : Value.t := + Definition value_EXPAND_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -946,7 +1001,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I : Ty.t) : Value.t := + Definition value_MERGE_BY (I : Ty.t) : A.t := let Self : Ty.t := Self I in M.run ltac:(M.monadic @@ -980,7 +1035,7 @@ Module iter. } } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -988,26 +1043,29 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let n := @@ -1027,7 +1085,11 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| M.call_closure (| @@ -1094,7 +1156,7 @@ Module iter. } } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1122,28 +1184,30 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) - (M.read (| n |)) + |), + M.read (| n |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let m := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "usize", @@ -1174,8 +1238,13 @@ Module iter. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) |) |) in M.alloc (| @@ -1201,16 +1270,17 @@ Module iter. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| len |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1234,17 +1304,21 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1270,7 +1344,7 @@ Module iter. } } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -1280,22 +1354,23 @@ Module iter. let fold := M.alloc (| fold |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1333,7 +1408,7 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1341,15 +1416,16 @@ Module iter. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| len |)) - (M.read (| + BinOp.Pure.gt (| + M.read (| len |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_associated_function (| @@ -1376,7 +1452,9 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| M.SubPointer.get_struct_record_field (| @@ -1386,7 +1464,7 @@ Module iter. |) |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -1460,7 +1538,7 @@ Module iter. } } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ Acc; Fold ], [ self; init; fold ] => @@ -1470,22 +1548,23 @@ Module iter. let fold := M.alloc (| fold |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::take::Take", "n" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1512,7 +1591,7 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1520,15 +1599,16 @@ Module iter. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| len |)) - (M.read (| + BinOp.Pure.gt (| + M.read (| len |), + M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::take::Take", "n" |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_associated_function (| @@ -1555,7 +1635,9 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| M.SubPointer.get_struct_record_field (| @@ -1565,7 +1647,7 @@ Module iter. |) |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -1632,7 +1714,7 @@ Module iter. NonZeroUsize::new(n - advanced_by).map_or(Ok(()), Err) } *) - Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -1709,7 +1791,7 @@ Module iter. "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1734,11 +1816,19 @@ Module iter. |) in let advanced_by_inner := M.alloc (| - BinOp.Panic.sub (| M.read (| advance_by |), M.read (| remainder |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| advance_by |), + M.read (| remainder |) + |) |) in let advanced_by := M.alloc (| - BinOp.Panic.sub (| M.read (| advanced_by_inner |), M.read (| trim_inner |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| advanced_by_inner |), + M.read (| trim_inner |) + |) |) in let _ := let β := @@ -1747,7 +1837,10 @@ Module iter. "core::iter::adapters::take::Take", "n" |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| advanced_by |) |) |) in + M.write (| + β, + BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| advanced_by |) |) + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1773,10 +1866,20 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| advanced_by |) |) ] + [ + BinOp.Panic.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" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -1869,7 +1972,7 @@ Module iter. self.try_fold(init, NeverShortCircuit::wrap_mut_2(f)).0 } *) - Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -1933,7 +2036,7 @@ Module iter. } } *) - Definition spec_for_each (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_for_each (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ F ], [ self; f ] => @@ -1950,14 +2053,17 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| remaining |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| remaining |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1982,8 +2088,9 @@ Module iter. "iter" |); BinOp.Panic.sub (| + Integer.Usize, M.read (| remaining |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); M.call_closure (| M.get_associated_function (| Self, "check.spec_for_each", [] |), @@ -1992,8 +2099,8 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -2033,7 +2140,7 @@ Module iter. acc } *) - Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -2087,12 +2194,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| end_ |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |), @@ -2166,14 +2275,20 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| acc |); M.read (| val |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value (M.read (| val |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2192,7 +2307,7 @@ Module iter. } } *) - Definition spec_for_each (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_for_each (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ F ], [ self; f ] => @@ -2243,10 +2358,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.Usize 0); ("end_", M.read (| end_ |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |), @@ -2317,13 +2436,18 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| val |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| val |)) ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) diff --git a/CoqOfRust/core/iter/adapters/take_while.v b/CoqOfRust/core/iter/adapters/take_while.v index 9ce6d3d91..67b4a6bb2 100644 --- a/CoqOfRust/core/iter/adapters/take_while.v +++ b/CoqOfRust/core/iter/adapters/take_while.v @@ -16,55 +16,60 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::take_while::TakeWhile") [ I; P ]. (* Clone *) - Definition clone (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::take_while::TakeWhile" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::take_while::TakeWhile", - "iter" - |) - ] - |)); - ("flag", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "bool", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::take_while::TakeWhile", - "flag" - |) - ] - |)); - ("predicate", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::take_while::TakeWhile", - "predicate" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::take_while::TakeWhile" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", I, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::take_while::TakeWhile", + "iter" + |) + ] + |))); + ("flag", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::take_while::TakeWhile", + "flag" + |) + ] + |))); + ("predicate", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::take_while::TakeWhile", + "predicate" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -86,20 +91,22 @@ Module iter. TakeWhile { iter, flag: false, predicate } } *) - Definition new (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ iter; predicate ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in let predicate := M.alloc (| predicate |) in - Value.StructRecord - "core::iter::adapters::take_while::TakeWhile" - [ - ("iter", M.read (| iter |)); - ("flag", Value.Bool false); - ("predicate", M.read (| predicate |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::take_while::TakeWhile" + [ + ("iter", A.to_value (M.read (| iter |))); + ("flag", A.to_value (M.of_value (| Value.Bool false |))); + ("predicate", A.to_value (M.read (| predicate |))) + ] + |))) | _, _ => M.impossible end. @@ -117,7 +124,7 @@ Module iter. f.debug_struct("TakeWhile").field("iter", &self.iter).field("flag", &self.flag).finish() } *) - Definition fmt (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self; f ] => @@ -152,27 +159,32 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "TakeWhile" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "TakeWhile" |) |) + ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take_while::TakeWhile", "iter" - |)) + |) + |) ] |); - M.read (| Value.String "flag" |); + M.read (| M.of_value (| Value.String "flag" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take_while::TakeWhile", "flag" - |)) + |) + |) ] |) ] @@ -211,7 +223,7 @@ Module iter. } } *) - Definition next (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -221,7 +233,7 @@ Module iter. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -234,7 +246,9 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let x := @@ -317,7 +331,7 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -341,7 +355,7 @@ Module iter. "core::iter::adapters::take_while::TakeWhile", "predicate" |); - Value.Tuple [ x ] + M.of_value (| Value.Tuple [ A.to_value x ] |) ] |) |)) in @@ -351,9 +365,11 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -364,10 +380,12 @@ Module iter. "core::iter::adapters::take_while::TakeWhile", "flag" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |))) @@ -388,7 +406,7 @@ Module iter. } } *) - Definition size_hint (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [], [ self ] => @@ -396,7 +414,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -410,13 +428,18 @@ Module iter. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -446,7 +469,13 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let upper := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple [ Value.Integer Integer.Usize 0; M.read (| upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |))) @@ -487,7 +516,7 @@ Module iter. } } *) - Definition try_fold (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -497,7 +526,7 @@ Module iter. let fold := M.alloc (| fold |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -596,7 +625,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition fold (I P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I P in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => @@ -695,7 +724,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.iter) } } *) - Definition as_inner (P I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (P I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P I in match τ, α with | [], [ self ] => @@ -735,7 +764,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (I F : Ty.t) : Value.t := + Definition value_EXPAND_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic @@ -745,7 +774,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (I F : Ty.t) : Value.t := + Definition value_MERGE_BY (I F : Ty.t) : A.t := let Self : Ty.t := Self I F in M.run ltac:(M.monadic diff --git a/CoqOfRust/core/iter/adapters/zip.v b/CoqOfRust/core/iter/adapters/zip.v index c85128156..8af350d0e 100644 --- a/CoqOfRust/core/iter/adapters/zip.v +++ b/CoqOfRust/core/iter/adapters/zip.v @@ -23,89 +23,96 @@ Module iter. Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [ A; B ]. (* Clone *) - Definition clone (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::adapters::zip::Zip" - [ - ("a", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "a" - |) - ] - |)); - ("b", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", B, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "b" - |) - ] - |)); - ("index", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "index" - |) - ] - |)); - ("len", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "len" - |) - ] - |)); - ("a_len", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "a_len" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::zip::Zip" + [ + ("a", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "a" + |) + ] + |))); + ("b", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", B, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "b" + |) + ] + |))); + ("index", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "index" + |) + ] + |))); + ("len", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "len" + |) + ] + |))); + ("a_len", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "a_len" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -127,7 +134,7 @@ Module iter. ZipImpl::new(a, b) } *) - Definition new (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ a; b ] => @@ -162,7 +169,7 @@ Module iter. None } *) - Definition super_nth (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition super_nth (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; n ] => @@ -176,7 +183,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -204,16 +211,17 @@ Module iter. let x := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| n |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -224,14 +232,18 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -239,11 +251,12 @@ Module iter. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -253,14 +266,14 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -280,7 +293,7 @@ Module iter. ZipImpl::new(a.into_iter(), b.into_iter()) } *) - Definition zip (τ : list Ty.t) (α : list Value.t) : M := + Definition zip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A; B ], [ a; b ] => ltac:(M.monadic @@ -334,7 +347,7 @@ Module iter. ZipImpl::next(self) } *) - Definition next (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -358,7 +371,7 @@ Module iter. ZipImpl::size_hint(self) } *) - Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -382,7 +395,7 @@ Module iter. ZipImpl::nth(self, n) } *) - Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; n ] => @@ -410,7 +423,7 @@ Module iter. ZipImpl::fold(self, init, f) } *) - Definition fold (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -441,7 +454,7 @@ Module iter. unsafe { ZipImpl::get_unchecked(self, idx) } } *) - Definition __iterator_get_unchecked (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; idx ] => @@ -487,7 +500,7 @@ Module iter. ZipImpl::next_back(self) } *) - Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -536,22 +549,24 @@ Module iter. } } *) - Definition new (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - Value.StructRecord - "core::iter::adapters::zip::Zip" - [ - ("a", M.read (| a |)); - ("b", M.read (| b |)); - ("index", Value.Integer Integer.Usize 0); - ("len", Value.Integer Integer.Usize 0); - ("a_len", Value.Integer Integer.Usize 0) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::zip::Zip" + [ + ("a", A.to_value (M.read (| a |))); + ("b", A.to_value (M.read (| b |))); + ("index", A.to_value (M.of_value (| Value.Integer 0 |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("a_len", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -562,7 +577,7 @@ Module iter. Some((x, y)) } *) - Definition next (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -730,9 +745,17 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| x |); M.read (| y |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| x |)); A.to_value (M.read (| y |)) ] + |)) + ] + |) |) |))) |))) @@ -744,7 +767,7 @@ Module iter. self.super_nth(n) } *) - Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; n ] => @@ -793,7 +816,7 @@ Module iter. } } *) - Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -840,26 +863,26 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| a_sz |)) (M.read (| b_sz |)) + BinOp.Pure.ne (| M.read (| a_sz |), M.read (| b_sz |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| a_sz |)) (M.read (| b_sz |)) + BinOp.Pure.gt (| M.read (| a_sz |), M.read (| b_sz |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -880,16 +903,21 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - M.read (| a_sz |), - M.read (| b_sz |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| a_sz |), + M.read (| b_sz |) + |))) + ] + |) ] |) |), @@ -950,10 +978,12 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -973,16 +1003,21 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - M.read (| b_sz |), - M.read (| a_sz |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| b_sz |), + M.read (| a_sz |) + |))) + ] + |) ] |) |), @@ -1043,55 +1078,61 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::double_ended::DoubleEndedIterator", - A, - [], - "next_back", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "a" - |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::double_ended::DoubleEndedIterator", - B, - [], - "next_back", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "b" - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::double_ended::DoubleEndedIterator", + A, + [], + "next_back", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "a" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::double_ended::DoubleEndedIterator", + B, + [], + "next_back", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "b" + |) + ] + |)) + ] + |) |), [ fun γ => @@ -1113,22 +1154,37 @@ Module iter. |) in let y := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| x |); M.read (| y |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| x |)); A.to_value (M.read (| y |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "internal error: entered unreachable code" |) + [ + M.read (| + M.of_value (| + Value.String "internal error: entered unreachable code" + |) + |) ] |) |) @@ -1156,7 +1212,7 @@ Module iter. (lower, upper) } *) - Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -1226,7 +1282,13 @@ Module iter. M.copy (| M.match_operator (| M.alloc (| - Value.Tuple [ M.read (| a_upper |); M.read (| b_upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a_upper |)); + A.to_value (M.read (| b_upper |)) + ] + |) |), [ fun γ => @@ -1248,17 +1310,20 @@ Module iter. |) in let y := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::cmp::min", - [ Ty.path "usize" ] - |), - [ M.read (| x |); M.read (| y |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::cmp::min", + [ Ty.path "usize" ] + |), + [ M.read (| x |); M.read (| y |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1272,9 +1337,11 @@ Module iter. |) in let x := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -1288,22 +1355,32 @@ Module iter. |) in let y := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| y |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| y |)) ] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |) |) in M.alloc (| - Value.Tuple [ M.read (| lower |); M.read (| upper |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| lower |)); + A.to_value (M.read (| upper |)) + ] + |) |))) ] |))) @@ -1321,7 +1398,7 @@ Module iter. unreachable!("Always specialized"); } *) - Definition get_unchecked (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; _idx ] => @@ -1336,19 +1413,25 @@ Module iter. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "internal error: entered unreachable code: Always specialized" - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: Always specialized" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -1357,7 +1440,8 @@ Module iter. |), [] |) - |)) + |) + |) ] |) ] @@ -1374,7 +1458,7 @@ Module iter. SpecFold::spec_fold(self, init, f) } *) - Definition fold (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -1429,22 +1513,24 @@ Module iter. } } *) - Definition new (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - Value.StructRecord - "core::iter::adapters::zip::Zip" - [ - ("a", M.read (| a |)); - ("b", M.read (| b |)); - ("index", Value.Integer Integer.Usize 0); - ("len", Value.Integer Integer.Usize 0); - ("a_len", Value.Integer Integer.Usize 0) - ])) + M.of_value (| + Value.StructRecord + "core::iter::adapters::zip::Zip" + [ + ("a", A.to_value (M.read (| a |))); + ("b", A.to_value (M.read (| b |))); + ("index", A.to_value (M.of_value (| Value.Integer 0 |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("a_len", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -1455,7 +1541,7 @@ Module iter. Some((x, y)) } *) - Definition next (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -1623,9 +1709,17 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| x |); M.read (| y |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| x |)); A.to_value (M.read (| y |)) ] + |)) + ] + |) |) |))) |))) @@ -1637,7 +1731,7 @@ Module iter. self.super_nth(n) } *) - Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; n ] => @@ -1686,7 +1780,7 @@ Module iter. } } *) - Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -1733,26 +1827,26 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| a_sz |)) (M.read (| b_sz |)) + BinOp.Pure.ne (| M.read (| a_sz |), M.read (| b_sz |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| a_sz |)) (M.read (| b_sz |)) + BinOp.Pure.gt (| M.read (| a_sz |), M.read (| b_sz |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1773,16 +1867,21 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - M.read (| a_sz |), - M.read (| b_sz |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| a_sz |), + M.read (| b_sz |) + |))) + ] + |) ] |) |), @@ -1843,10 +1942,12 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -1866,16 +1967,21 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - M.read (| b_sz |), - M.read (| a_sz |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| b_sz |), + M.read (| a_sz |) + |))) + ] + |) ] |) |), @@ -1936,55 +2042,61 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::double_ended::DoubleEndedIterator", - A, - [], - "next_back", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "a" - |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::double_ended::DoubleEndedIterator", - B, - [], - "next_back", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "b" - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::double_ended::DoubleEndedIterator", + A, + [], + "next_back", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "a" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::double_ended::DoubleEndedIterator", + B, + [], + "next_back", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "b" + |) + ] + |)) + ] + |) |), [ fun γ => @@ -2006,22 +2118,37 @@ Module iter. |) in let y := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| x |); M.read (| y |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| x |)); A.to_value (M.read (| y |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "internal error: entered unreachable code" |) + [ + M.read (| + M.of_value (| + Value.String "internal error: entered unreachable code" + |) + |) ] |) |) @@ -2038,7 +2165,7 @@ Module iter. (size, Some(size)) } *) - Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -2086,11 +2213,18 @@ Module iter. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| size |); - Value.StructTuple "core::option::Option::Some" [ M.read (| size |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| size |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| size |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -2104,7 +2238,7 @@ Module iter. unsafe { (self.a.__iterator_get_unchecked(idx), self.b.__iterator_get_unchecked(idx)) } } *) - Definition get_unchecked (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; idx ] => @@ -2115,6 +2249,7 @@ Module iter. let idx := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2126,43 +2261,47 @@ Module iter. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - A, - [], - "__iterator_get_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "a" - |); - M.read (| idx |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - B, - [], - "__iterator_get_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "b" - |); - M.read (| idx |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + A, + [], + "__iterator_get_unchecked", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "a" + |); + M.read (| idx |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + B, + [], + "__iterator_get_unchecked", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "b" + |); + M.read (| idx |) + ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -2186,7 +2325,7 @@ Module iter. accum } *) - Definition fold (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -2227,10 +2366,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.Usize 0); ("end_", M.read (| len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) ] |) |), @@ -2290,30 +2433,33 @@ Module iter. |), [ f; - Value.Tuple - [ - M.read (| accum |); - M.call_closure (| - M.get_trait_method (| - "core::iter::adapters::zip::ZipImpl", - Ty.apply - (Ty.path - "core::iter::adapters::zip::Zip") - [ A; B ], - [ A; B ], - "get_unchecked", - [] - |), - [ self; M.read (| i |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::adapters::zip::ZipImpl", + Ty.apply + (Ty.path + "core::iter::adapters::zip::Zip") + [ A; B ], + [ A; B ], + "get_unchecked", + [] + |), + [ self; M.read (| i |) ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2351,7 +2497,7 @@ Module iter. Zip { a, b, index: 0, len, a_len } } *) - Definition new (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ a; b ] => @@ -2392,15 +2538,17 @@ Module iter. |) |) in M.alloc (| - Value.StructRecord - "core::iter::adapters::zip::Zip" - [ - ("a", M.read (| a |)); - ("b", M.read (| b |)); - ("index", Value.Integer Integer.Usize 0); - ("len", M.read (| len |)); - ("a_len", M.read (| a_len |)) - ] + M.of_value (| + Value.StructRecord + "core::iter::adapters::zip::Zip" + [ + ("a", A.to_value (M.read (| a |))); + ("b", A.to_value (M.read (| b |))); + ("index", A.to_value (M.of_value (| Value.Integer 0 |))); + ("len", A.to_value (M.read (| len |))); + ("a_len", A.to_value (M.read (| a_len |))) + ] + |) |) |))) | _, _ => M.impossible @@ -2433,7 +2581,7 @@ Module iter. } } *) - Definition next (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -2441,28 +2589,29 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "index" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2476,62 +2625,73 @@ Module iter. |) in let _ := let β := - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "index" - |) in - M.write (| - β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) - |) in - M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - A, - [], - "__iterator_get_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "a" - |); - M.read (| i |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - B, - [], - "__iterator_get_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "b" - |); - M.read (| i |) - ] - |) - ] - ] + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "index" + |) in + M.write (| + β, + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + A, + [], + "__iterator_get_unchecked", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "a" + |); + M.read (| i |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + B, + [], + "__iterator_get_unchecked", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "b" + |); + M.read (| i |) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2545,21 +2705,22 @@ Module iter. |) |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| + (BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "index" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "a_len" |) - |)))) + |) + |))) |) |)) in let _ := @@ -2585,8 +2746,9 @@ Module iter. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -2599,8 +2761,9 @@ Module iter. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -2624,11 +2787,15 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))) ] @@ -2643,7 +2810,7 @@ Module iter. (len, Some(len)) } *) - Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -2653,6 +2820,7 @@ Module iter. let len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2670,11 +2838,18 @@ Module iter. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| len |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -2708,7 +2883,7 @@ Module iter. self.super_nth(n - delta) } *) - Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; n ] => @@ -2723,6 +2898,7 @@ Module iter. [ M.read (| n |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2744,6 +2920,7 @@ Module iter. let end_ := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2758,22 +2935,23 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "index" |) - |)) - (M.read (| end_ |)) + |), + M.read (| end_ |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2798,13 +2976,14 @@ Module iter. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2838,12 +3017,14 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2877,8 +3058,9 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -2890,7 +3072,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2904,7 +3086,10 @@ Module iter. "super_nth", [] |), - [ M.read (| self |); BinOp.Panic.sub (| M.read (| n |), M.read (| delta |) |) ] + [ + M.read (| self |); + BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| delta |) |) + ] |) |) |))) @@ -2958,7 +3143,7 @@ Module iter. } } *) - Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -2967,7 +3152,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3029,14 +3214,14 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| sz_a |)) (M.read (| sz_b |)) + BinOp.Pure.ne (| M.read (| sz_a |), M.read (| sz_b |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -3064,7 +3249,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3078,15 +3263,16 @@ Module iter. |) |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| sz_a |)) - (M.read (| + (BinOp.Pure.gt (| + M.read (| sz_a |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "len" |) - |)))) + |) + |))) |) |)) in let _ := @@ -3109,23 +3295,30 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - M.read (| sz_a |), - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "len" - |) - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| sz_a |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "len" + |) + |) + |))) + ] + |) ] |) |), @@ -3178,10 +3371,11 @@ Module iter. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in let _ := @@ -3203,21 +3397,30 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| Value.Bool true |)) in + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -3226,19 +3429,23 @@ Module iter. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "a_len" - |); - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "len" - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "a_len" + |)); + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "len" + |)) + ] + |) |), [ fun γ => @@ -3257,25 +3464,29 @@ Module iter. let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3287,9 +3498,11 @@ Module iter. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -3312,9 +3525,11 @@ Module iter. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -3324,19 +3539,28 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let sz_b := @@ -3359,7 +3583,7 @@ Module iter. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3373,15 +3597,16 @@ Module iter. |) |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| sz_b |)) - (M.read (| + (BinOp.Pure.gt (| + M.read (| sz_b |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "len" |) - |)))) + |) + |))) |) |)) in let _ := @@ -3403,22 +3628,28 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - M.read (| sz_b |), - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "len" - |) - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| sz_b |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "len" + |) + |) + |))) + ] + |) ] |) |), @@ -3480,45 +3711,53 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "index" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3531,7 +3770,11 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := let β := @@ -3542,7 +3785,11 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let i := M.copy (| @@ -3553,51 +3800,60 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - A, - [], - "__iterator_get_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "a" - |); - M.read (| i |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - B, - [], - "__iterator_get_unchecked", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::adapters::zip::Zip", - "b" - |); - M.read (| i |) - ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + A, + [], + "__iterator_get_unchecked", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "a" + |); + M.read (| i |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + B, + [], + "__iterator_get_unchecked", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::adapters::zip::Zip", + "b" + |); + M.read (| i |) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3652,7 +3908,7 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = A::MAY_HAVE_SIDE_EFFECT || B::MAY_HAVE_SIDE_EFFECT; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (A B : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (A B : Ty.t) : A.t := let Self : Ty.t := Self A B in M.run ltac:(M.monadic @@ -3750,7 +4006,7 @@ Module iter. unsafe { SourceIter::as_inner(&mut self.a) } } *) - Definition as_inner (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_inner (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self ] => @@ -3790,7 +4046,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_EXPAND_BY (A B : Ty.t) : Value.t := + Definition value_EXPAND_BY (A B : Ty.t) : A.t := let Self : Ty.t := Self A B in M.run ltac:(M.monadic @@ -3800,7 +4056,7 @@ Module iter. (* Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::num::nonzero::NonZeroUsize" ] *) - Definition value_MERGE_BY (A B : Ty.t) : Value.t := + Definition value_MERGE_BY (A B : Ty.t) : A.t := let Self : Ty.t := Self A B in M.run ltac:(M.monadic @@ -3828,7 +4084,7 @@ Module iter. ZipFmt::fmt(self, f) } *) - Definition fmt (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; f ] => @@ -3869,7 +4125,7 @@ Module iter. f.debug_struct("Zip").field("a", &self.a).field("b", &self.b).finish() } *) - Definition fmt (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; f ] => @@ -3904,27 +4160,29 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Zip" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Zip" |) |) ] |) |); - M.read (| Value.String "a" |); + M.read (| M.of_value (| Value.String "a" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "a" - |)) + |) + |) ] |); - M.read (| Value.String "b" |); + M.read (| M.of_value (| Value.String "b" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "b" - |)) + |) + |) ] |) ] @@ -3952,7 +4210,7 @@ Module iter. f.debug_struct("Zip").finish() } *) - Definition fmt (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; f ] => @@ -3973,7 +4231,7 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Zip" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Zip" |) |) ] |) |) ] @@ -3995,7 +4253,7 @@ Module iter. (* Trait *) Module TrustedRandomAccessNoCoerce. - Definition size (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4034,7 +4292,7 @@ Module iter. unsafe { it.try_get_unchecked(idx) } } *) - Definition try_get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition try_get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ it; idx ] => ltac:(M.monadic @@ -4064,7 +4322,7 @@ Module iter. panic!("Should only be called on TrustedRandomAccess iterators"); } *) - Definition try_get_unchecked (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_get_unchecked (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; β1 ] => @@ -4088,16 +4346,22 @@ Module iter. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "Should only be called on TrustedRandomAccess iterators" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Should only be called on TrustedRandomAccess iterators" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -4127,7 +4391,7 @@ Module iter. unsafe { self.__iterator_get_unchecked(index) } } *) - Definition try_get_unchecked (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_get_unchecked (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; index ] => @@ -4175,7 +4439,7 @@ Module iter. accum } *) - Definition spec_fold (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -4189,7 +4453,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4225,10 +4489,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4238,7 +4511,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4292,7 +4565,7 @@ Module iter. accum } *) - Definition spec_fold (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [ Acc; F ], [ self; init; f ] => @@ -4307,7 +4580,7 @@ Module iter. ltac:(M.monadic (M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4337,16 +4610,25 @@ Module iter. |) in let upper := M.copy (| γ0_0 |) in M.alloc (| - Value.Tuple [ M.read (| upper |); Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| upper |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.read (| M.get_constant (| "core::num::MAX" |) |); - Value.Bool true - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.get_constant (| "core::num::MAX" |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |))) ] |), @@ -4372,12 +4654,15 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| upper |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| upper |))) + ] + |) ] |) |), @@ -4421,65 +4706,69 @@ Module iter. |) in let pair_ := M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::option::Option") - [ Ty.associated ], - "unwrap_unchecked", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - A, - [], - "next", + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::option::Option") + [ Ty.associated ], + "unwrap_unchecked", [] |), [ - M.SubPointer.get_struct_record_field (| - self, - "core::iter::adapters::zip::Zip", - "a" + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + A, + [], + "next", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + self, + "core::iter::adapters::zip::Zip", + "a" + |) + ] |) ] - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::option::Option") - [ Ty.associated ], - "unwrap_unchecked", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - B, - [], - "next", + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::option::Option") + [ Ty.associated ], + "unwrap_unchecked", [] |), [ - M.SubPointer.get_struct_record_field (| - self, - "core::iter::adapters::zip::Zip", - "b" + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + B, + [], + "next", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + self, + "core::iter::adapters::zip::Zip", + "b" + |) + ] |) ] - |) - ] - |) - ] + |)) + ] + |) |) in let _ := M.write (| @@ -4504,28 +4793,35 @@ Module iter. |), [ f; - Value.Tuple - [ - M.read (| accum |); - M.read (| pair_ |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| accum |)); + A.to_value + (M.read (| pair_ |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| UnOp.Pure.not (M.read (| more |)) |)) in + M.use + (M.alloc (| UnOp.Pure.not (| M.read (| more |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -4534,7 +4830,8 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] diff --git a/CoqOfRust/core/iter/range.v b/CoqOfRust/core/iter/range.v index 0acfe32de..2c4542202 100644 --- a/CoqOfRust/core/iter/range.v +++ b/CoqOfRust/core/iter/range.v @@ -181,7 +181,7 @@ Module iter. (* Trait *) Module Step. - Definition forward (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -204,14 +204,14 @@ Module iter. |), [ M.read (| start |); M.read (| count |) ] |); - M.read (| Value.String "overflow in `Step::forward`" |) + M.read (| M.of_value (| Value.String "overflow in `Step::forward`" |) |) ] |))) | _, _ => M.impossible end. Axiom ProvidedMethod_forward : M.IsProvidedMethod "core::iter::range::Step" "forward" forward. - Definition forward_unchecked (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -226,7 +226,7 @@ Module iter. Axiom ProvidedMethod_forward_unchecked : M.IsProvidedMethod "core::iter::range::Step" "forward_unchecked" forward_unchecked. - Definition backward (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -249,7 +249,7 @@ Module iter. |), [ M.read (| start |); M.read (| count |) ] |); - M.read (| Value.String "overflow in `Step::backward`" |) + M.read (| M.of_value (| Value.String "overflow in `Step::backward`" |) |) ] |))) | _, _ => M.impossible @@ -257,7 +257,7 @@ Module iter. Axiom ProvidedMethod_backward : M.IsProvidedMethod "core::iter::range::Step" "backward" backward. - Definition backward_unchecked (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -283,7 +283,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -291,7 +291,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -302,7 +302,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -310,7 +310,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -326,7 +326,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -335,7 +335,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -369,19 +369,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.U8, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.U8 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -399,7 +403,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -408,7 +412,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -442,19 +446,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.U8, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.U8 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -471,7 +479,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -479,32 +487,40 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (BinOp.Panic.sub (| - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.sub (| + Integer.U8, + M.read (| M.read (| end_ |) |), + M.read (| M.read (| start |) |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -519,7 +535,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -563,7 +579,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -578,7 +596,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -622,7 +640,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -655,7 +675,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -663,7 +683,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i8", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -674,7 +694,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -682,7 +702,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i8", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -698,7 +718,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -707,7 +727,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -741,19 +761,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.I8, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I8 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -771,7 +795,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -780,7 +804,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -814,19 +838,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.I8, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.I8 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -847,7 +875,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -855,35 +883,46 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ - M.rust_cast (M.read (| M.read (| end_ |) |)); - M.rust_cast (M.read (| M.read (| start |) |)) - ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "isize", + "wrapping_sub", + [] + |), + [ + M.rust_cast (| M.read (| M.read (| end_ |) |) |); + M.rust_cast (| M.read (| M.read (| start |) |) |) + ] + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -911,7 +950,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -945,18 +984,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.ge (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -964,13 +1003,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -981,7 +1024,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1009,7 +1054,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1043,18 +1088,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.le (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1062,13 +1107,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -1079,7 +1128,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1112,7 +1163,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1120,7 +1171,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -1131,7 +1182,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1139,7 +1190,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -1155,7 +1206,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1164,7 +1215,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1198,19 +1249,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.U16, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.U16 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -1228,7 +1283,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1237,7 +1292,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1271,19 +1326,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.U16, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.U16 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -1300,7 +1359,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -1308,32 +1367,40 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (BinOp.Panic.sub (| - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.sub (| + Integer.U16, + M.read (| M.read (| end_ |) |), + M.read (| M.read (| start |) |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1348,7 +1415,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1392,7 +1459,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1407,7 +1476,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1451,7 +1520,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1484,7 +1555,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1492,7 +1563,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i16", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -1503,7 +1574,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1511,7 +1582,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i16", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -1527,7 +1598,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1536,7 +1607,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1570,19 +1641,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.I16, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -1600,7 +1675,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1609,7 +1684,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1643,19 +1718,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.I16, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -1676,7 +1755,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -1684,35 +1763,46 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ - M.rust_cast (M.read (| M.read (| end_ |) |)); - M.rust_cast (M.read (| M.read (| start |) |)) - ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "isize", + "wrapping_sub", + [] + |), + [ + M.rust_cast (| M.read (| M.read (| end_ |) |) |); + M.rust_cast (| M.read (| M.read (| start |) |) |) + ] + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1740,7 +1830,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1774,18 +1864,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.ge (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1793,13 +1883,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -1810,7 +1904,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1838,7 +1934,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1872,18 +1968,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.le (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1891,13 +1987,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -1908,7 +2008,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1941,7 +2043,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1949,7 +2051,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -1960,7 +2062,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1968,7 +2070,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -1984,7 +2086,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -1993,7 +2095,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2027,19 +2129,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -2057,7 +2163,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2066,7 +2172,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2100,19 +2206,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -2129,7 +2239,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -2137,32 +2247,40 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (BinOp.Panic.sub (| - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.sub (| + Integer.U32, + M.read (| M.read (| end_ |) |), + M.read (| M.read (| start |) |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2177,7 +2295,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2221,7 +2339,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2236,7 +2356,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2280,7 +2400,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2313,7 +2435,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2321,7 +2443,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i32", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -2332,7 +2454,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2340,7 +2462,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i32", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -2356,7 +2478,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2365,7 +2487,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2399,19 +2521,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.I32, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -2429,7 +2555,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2438,7 +2564,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2472,19 +2598,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.I32, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -2505,7 +2635,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -2513,35 +2643,46 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ - M.rust_cast (M.read (| M.read (| end_ |) |)); - M.rust_cast (M.read (| M.read (| start |) |)) - ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "isize", + "wrapping_sub", + [] + |), + [ + M.rust_cast (| M.read (| M.read (| end_ |) |) |); + M.rust_cast (| M.read (| M.read (| start |) |) |) + ] + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2569,7 +2710,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2603,18 +2744,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.ge (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -2622,13 +2763,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -2639,7 +2784,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2667,7 +2814,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2701,18 +2848,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.le (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -2720,13 +2867,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -2737,7 +2888,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2770,7 +2923,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2778,7 +2931,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -2789,7 +2942,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2797,7 +2950,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -2813,7 +2966,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2822,7 +2975,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2856,19 +3009,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.U64, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -2886,7 +3043,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -2895,7 +3052,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2929,19 +3086,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.U64, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -2958,7 +3119,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -2966,32 +3127,40 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (BinOp.Panic.sub (| - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.sub (| + Integer.U64, + M.read (| M.read (| end_ |) |), + M.read (| M.read (| start |) |) + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3006,7 +3175,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3050,7 +3219,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3065,7 +3236,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3109,7 +3280,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3142,7 +3315,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3150,7 +3323,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i64", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -3161,7 +3334,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3169,7 +3342,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i64", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -3185,7 +3358,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3194,7 +3367,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3228,19 +3401,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.I64, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I64 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -3258,7 +3435,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3267,7 +3444,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3301,19 +3478,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.I64, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.I64 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -3334,7 +3515,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -3342,35 +3523,46 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ - M.rust_cast (M.read (| M.read (| end_ |) |)); - M.rust_cast (M.read (| M.read (| start |) |)) - ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "isize", + "wrapping_sub", + [] + |), + [ + M.rust_cast (| M.read (| M.read (| end_ |) |) |); + M.rust_cast (| M.read (| M.read (| start |) |) |) + ] + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3398,7 +3590,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3432,18 +3624,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.ge (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -3451,13 +3643,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -3468,7 +3664,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3496,7 +3694,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3530,18 +3728,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.le (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -3549,13 +3747,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -3566,7 +3768,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3599,7 +3803,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3618,7 +3822,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3642,7 +3846,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3651,7 +3855,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3685,13 +3889,17 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3715,7 +3923,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3724,7 +3932,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3758,13 +3966,17 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3787,7 +3999,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -3795,36 +4007,43 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.use - (M.alloc (| - BinOp.Panic.sub (| - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.use + (M.alloc (| + BinOp.Panic.sub (| + Integer.Usize, + M.read (| M.read (| end_ |) |), + M.read (| M.read (| start |) |) + |) + |)) |)) - |) - ] + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3839,7 +4058,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3883,7 +4102,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3898,7 +4119,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3942,7 +4163,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3975,7 +4198,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -3983,7 +4206,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "isize", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -3994,7 +4217,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4002,7 +4225,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "isize", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -4018,7 +4241,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4027,7 +4250,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4061,19 +4284,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.Isize, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.Isize 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -4091,7 +4318,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4100,7 +4327,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4134,19 +4361,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.Isize, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.Isize 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -4167,7 +4398,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -4175,35 +4406,46 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ - M.read (| M.use (M.read (| end_ |)) |); - M.read (| M.use (M.read (| start |)) |) - ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "isize", + "wrapping_sub", + [] + |), + [ + M.read (| M.use (M.read (| end_ |)) |); + M.read (| M.use (M.read (| start |)) |) + ] + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4231,7 +4473,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4265,18 +4507,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.ge (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -4284,13 +4526,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -4301,7 +4547,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4329,7 +4577,7 @@ Module iter. } } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4363,18 +4611,18 @@ Module iter. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| wrapped |)) (M.read (| start |)) + BinOp.Pure.le (| M.read (| wrapped |), M.read (| start |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -4382,13 +4630,17 @@ Module iter. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| wrapped |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| wrapped |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => @@ -4399,7 +4651,9 @@ Module iter. "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4432,7 +4686,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4440,7 +4694,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -4451,7 +4705,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4459,7 +4713,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -4475,7 +4729,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4484,7 +4738,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4518,19 +4772,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.U128, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.U128 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -4548,7 +4806,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4557,7 +4815,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4591,19 +4849,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.U128, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.U128 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -4619,7 +4881,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -4627,16 +4889,17 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -4659,6 +4922,7 @@ Module iter. |), [ BinOp.Panic.sub (| + Integer.U128, M.read (| M.read (| end_ |) |), M.read (| M.read (| start |) |) |) @@ -4669,7 +4933,9 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4681,7 +4947,7 @@ Module iter. start.checked_add(n as Self) } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4689,7 +4955,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "checked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -4699,7 +4965,7 @@ Module iter. start.checked_sub(n as Self) } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4707,7 +4973,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "checked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -4738,7 +5004,7 @@ Module iter. unsafe { start.unchecked_add(n as Self) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4746,7 +5012,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "unchecked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -4757,7 +5023,7 @@ Module iter. unsafe { start.unchecked_sub(n as Self) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4765,7 +5031,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "unchecked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -4781,7 +5047,7 @@ Module iter. start.wrapping_add(n as Self) } *) - Definition forward (τ : list Ty.t) (α : list Value.t) : M := + Definition forward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4790,7 +5056,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4824,19 +5090,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.add (| + Integer.I128, M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I128 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i128", "wrapping_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -4854,7 +5124,7 @@ Module iter. start.wrapping_sub(n as Self) } *) - Definition backward (τ : list Ty.t) (α : list Value.t) : M := + Definition backward (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -4863,7 +5133,7 @@ Module iter. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4897,19 +5167,23 @@ Module iter. M.match_operator (| M.alloc (| BinOp.Panic.sub (| + Integer.I128, M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer Integer.I128 1 + M.of_value (| Value.Integer 1 |) |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i128", "wrapping_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |) |) |))) @@ -4930,7 +5204,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -4938,16 +5212,17 @@ Module iter. let end_ := M.alloc (| end_ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| M.read (| start |) |)) - (M.read (| M.read (| end_ |) |)) + BinOp.Pure.le (| + M.read (| M.read (| start |) |), + M.read (| M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| @@ -4993,12 +5268,16 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5010,7 +5289,7 @@ Module iter. start.checked_add(n as Self) } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -5018,7 +5297,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "checked_add", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -5028,7 +5307,7 @@ Module iter. start.checked_sub(n as Self) } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; n ] => ltac:(M.monadic @@ -5036,7 +5315,7 @@ Module iter. let n := M.alloc (| n |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "checked_sub", [] |), - [ M.read (| start |); M.rust_cast (M.read (| n |)) ] + [ M.read (| start |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -5077,7 +5356,7 @@ Module iter. } } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0; β1 ] => ltac:(M.monadic @@ -5098,17 +5377,20 @@ 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 [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| start |)) (M.read (| end_ |)) + BinOp.Pure.le (| + M.read (| start |), + M.read (| end_ |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5118,12 +5400,13 @@ Module iter. let count := M.alloc (| BinOp.Panic.sub (| + Integer.U32, M.read (| end_ |), M.read (| start |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5131,13 +5414,15 @@ Module iter. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| start |)) - (Value.Integer Integer.U32 55296), + BinOp.Pure.lt (| + M.read (| start |), + M.of_value (| Value.Integer 55296 |) + |), ltac:(M.monadic - (BinOp.Pure.le - (Value.Integer Integer.U32 57344) - (M.read (| end_ |)))) + (BinOp.Pure.le (| + M.of_value (| Value.Integer 57344 |), + M.read (| end_ |) + |))) |) |)) in let _ := @@ -5168,8 +5453,9 @@ Module iter. |), [ BinOp.Panic.sub (| + Integer.U32, M.read (| count |), - Value.Integer Integer.U32 2048 + M.of_value (| Value.Integer 2048 |) |) ] |) @@ -5209,7 +5495,9 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |) @@ -5237,7 +5525,7 @@ Module iter. } } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -5246,7 +5534,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let start := M.alloc (| M.rust_cast (M.read (| start |)) |) in + let start := M.alloc (| M.rust_cast (| M.read (| start |) |) |) in let res := M.copy (| M.match_operator (| @@ -5322,7 +5610,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5330,13 +5618,15 @@ Module iter. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| start |)) - (Value.Integer Integer.U32 55296), + BinOp.Pure.lt (| + M.read (| start |), + M.of_value (| Value.Integer 55296 |) + |), ltac:(M.monadic - (BinOp.Pure.le - (Value.Integer Integer.U32 55296) - (M.read (| res |)))) + (BinOp.Pure.le (| + M.of_value (| Value.Integer 55296 |), + M.read (| res |) + |))) |) |)) in let _ := @@ -5366,7 +5656,8 @@ Module iter. "forward_checked", [] |), - [ M.read (| res |); Value.Integer Integer.Usize 2048 ] + [ M.read (| res |); M.of_value (| Value.Integer 2048 |) + ] |) ] |) @@ -5419,42 +5710,49 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| res |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::char::methods::MAX" |) |))) + BinOp.Pure.le (| + M.read (| res |), + M.rust_cast (| + M.read (| M.get_constant (| "core::char::methods::MAX" |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "char", - "from_u32_unchecked", - [] - |), - [ M.read (| res |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "char", + "from_u32_unchecked", + [] + |), + [ M.read (| res |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5474,7 +5772,7 @@ Module iter. Some(unsafe { char::from_u32_unchecked(res) }) } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -5483,7 +5781,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let start := M.alloc (| M.rust_cast (M.read (| start |)) |) in + let start := M.alloc (| M.rust_cast (| M.read (| start |) |) |) in let res := M.copy (| M.match_operator (| @@ -5559,7 +5857,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5567,13 +5865,15 @@ Module iter. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ge - (M.read (| start |)) - (Value.Integer Integer.U32 57344), + BinOp.Pure.ge (| + M.read (| start |), + M.of_value (| Value.Integer 57344 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (Value.Integer Integer.U32 57344) - (M.read (| res |)))) + (BinOp.Pure.gt (| + M.of_value (| Value.Integer 57344 |), + M.read (| res |) + |))) |) |)) in let _ := @@ -5603,7 +5903,8 @@ Module iter. "backward_checked", [] |), - [ M.read (| res |); Value.Integer Integer.Usize 2048 ] + [ M.read (| res |); M.of_value (| Value.Integer 2048 |) + ] |) ] |) @@ -5656,19 +5957,26 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "char", "from_u32_unchecked", [] |), - [ M.read (| res |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "char", + "from_u32_unchecked", + [] + |), + [ M.read (| res |) ] + |)) + ] + |) |) |))) |))) @@ -5691,14 +5999,14 @@ Module iter. unsafe { char::from_u32_unchecked(res) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic (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 start := M.alloc (| M.rust_cast (| M.read (| start |) |) |) in let res := M.alloc (| M.call_closure (| @@ -5714,7 +6022,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5722,13 +6030,15 @@ Module iter. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| start |)) - (Value.Integer Integer.U32 55296), + BinOp.Pure.lt (| + M.read (| start |), + M.of_value (| Value.Integer 55296 |) + |), ltac:(M.monadic - (BinOp.Pure.le - (Value.Integer Integer.U32 55296) - (M.read (| res |)))) + (BinOp.Pure.le (| + M.of_value (| Value.Integer 55296 |), + M.read (| res |) + |))) |) |)) in let _ := @@ -5744,11 +6054,11 @@ Module iter. "forward_unchecked", [] |), - [ M.read (| res |); Value.Integer Integer.Usize 2048 ] + [ M.read (| res |); M.of_value (| Value.Integer 2048 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -5777,14 +6087,14 @@ Module iter. unsafe { char::from_u32_unchecked(res) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic (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 start := M.alloc (| M.rust_cast (| M.read (| start |) |) |) in let res := M.alloc (| M.call_closure (| @@ -5800,7 +6110,7 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5808,13 +6118,15 @@ Module iter. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ge - (M.read (| start |)) - (Value.Integer Integer.U32 57344), + BinOp.Pure.ge (| + M.read (| start |), + M.of_value (| Value.Integer 57344 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (Value.Integer Integer.U32 57344) - (M.read (| res |)))) + (BinOp.Pure.gt (| + M.of_value (| Value.Integer 57344 |), + M.read (| res |) + |))) |) |)) in let _ := @@ -5830,11 +6142,11 @@ Module iter. "backward_unchecked", [] |), - [ M.read (| res |); Value.Integer Integer.Usize 2048 ] + [ M.read (| res |); M.of_value (| Value.Integer 2048 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -5870,7 +6182,7 @@ Module iter. Step::steps_between(&start.to_u8(), &end.to_u8()) } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0; β1 ] => ltac:(M.monadic @@ -5934,7 +6246,7 @@ Module iter. AsciiChar::from_u8(end) } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6049,7 +6361,7 @@ Module iter. Some(unsafe { AsciiChar::from_u8_unchecked(end) }) } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6142,18 +6454,21 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ascii::ascii_char::AsciiChar", - "from_u8_unchecked", - [] - |), - [ M.read (| end_ |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ascii::ascii_char::AsciiChar", + "from_u8_unchecked", + [] + |), + [ M.read (| end_ |) ] + |)) + ] + |) |) |))) |))) @@ -6170,7 +6485,7 @@ Module iter. unsafe { AsciiChar::from_u8_unchecked(end) } } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6224,7 +6539,7 @@ Module iter. unsafe { AsciiChar::from_u8_unchecked(end) } } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6291,7 +6606,7 @@ Module iter. u32::steps_between(&start.to_bits(), &end.to_bits()) } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0; β1 ] => ltac:(M.monadic @@ -6354,7 +6669,7 @@ Module iter. u32::forward_checked(start.to_bits(), count).map(Ipv4Addr::from_bits) } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6405,7 +6720,7 @@ Module iter. u32::backward_checked(start.to_bits(), count).map(Ipv4Addr::from_bits) } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6458,7 +6773,7 @@ Module iter. Ipv4Addr::from_bits(unsafe { u32::forward_unchecked(start.to_bits(), count) }) } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6503,7 +6818,7 @@ Module iter. Ipv4Addr::from_bits(unsafe { u32::backward_unchecked(start.to_bits(), count) }) } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6564,7 +6879,7 @@ Module iter. u128::steps_between(&start.to_bits(), &end.to_bits()) } *) - Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := + Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0; β1 ] => ltac:(M.monadic @@ -6627,7 +6942,7 @@ Module iter. u128::forward_checked(start.to_bits(), count).map(Ipv6Addr::from_bits) } *) - Definition forward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6678,7 +6993,7 @@ Module iter. u128::backward_checked(start.to_bits(), count).map(Ipv6Addr::from_bits) } *) - Definition backward_checked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_checked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6731,7 +7046,7 @@ Module iter. Ipv6Addr::from_bits(unsafe { u128::forward_unchecked(start.to_bits(), count) }) } *) - Definition forward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition forward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6776,7 +7091,7 @@ Module iter. Ipv6Addr::from_bits(unsafe { u128::backward_unchecked(start.to_bits(), count) }) } *) - Definition backward_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition backward_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; count ] => ltac:(M.monadic @@ -6849,7 +7164,7 @@ Module iter. } } *) - Definition spec_next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -6857,7 +7172,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6915,33 +7230,40 @@ Module iter. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); - M.read (| Value.String "`Step` invariants not upheld" |) + M.read (| + M.of_value (| Value.String "`Step` invariants not upheld" |) + |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::mem::replace", [ A ] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "start" - |); - M.read (| n |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::replace", [ A ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "start" + |); + M.read (| n |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -6962,7 +7284,7 @@ Module iter. None } *) - Definition spec_nth (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -6974,7 +7296,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7017,7 +7339,7 @@ Module iter. |) in let plus_n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7083,27 +7405,32 @@ Module iter. |), [ plus_n ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); M.read (| - Value.String "`Step` invariants not upheld" + M.of_value (| + Value.String "`Step` invariants not upheld" + |) |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| plus_n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| plus_n |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -7124,7 +7451,7 @@ Module iter. ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -7146,7 +7473,7 @@ Module iter. NonZeroUsize::new(n - taken).map_or(Ok(()), Err) } *) - Definition spec_advance_by (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_advance_by (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -7157,7 +7484,7 @@ Module iter. let available := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7221,7 +7548,7 @@ Module iter. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -7268,7 +7595,7 @@ Module iter. M.read (| taken |) ] |); - M.read (| Value.String "`Step` invariants not upheld" |) + M.read (| M.of_value (| Value.String "`Step` invariants not upheld" |) |) ] |) |) in @@ -7297,10 +7624,14 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| taken |) |) ] + [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| taken |) |) ] + |); + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -7319,7 +7650,7 @@ Module iter. } } *) - Definition spec_next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -7327,7 +7658,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7390,32 +7721,39 @@ Module iter. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); - M.read (| Value.String "`Step` invariants not upheld" |) + M.read (| + M.of_value (| Value.String "`Step` invariants not upheld" |) + |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "end" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "end" + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7436,7 +7774,7 @@ Module iter. None } *) - Definition spec_nth_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -7448,7 +7786,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7491,7 +7829,7 @@ Module iter. |) in let minus_n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7548,44 +7886,50 @@ Module iter. |), [ M.read (| minus_n |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); M.read (| - Value.String "`Step` invariants not upheld" + M.of_value (| + Value.String "`Step` invariants not upheld" + |) |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "end" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "end" + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -7606,7 +7950,7 @@ Module iter. ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -7628,7 +7972,7 @@ Module iter. NonZeroUsize::new(n - taken).map_or(Ok(()), Err) } *) - Definition spec_advance_back_by (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_advance_back_by (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -7639,7 +7983,7 @@ Module iter. let available := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7703,7 +8047,7 @@ Module iter. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -7750,7 +8094,7 @@ Module iter. M.read (| taken |) ] |); - M.read (| Value.String "`Step` invariants not upheld" |) + M.read (| M.of_value (| Value.String "`Step` invariants not upheld" |) |) ] |) |) in @@ -7779,10 +8123,14 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| taken |) |) ] + [ BinOp.Panic.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" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -7823,7 +8171,7 @@ Module iter. } } *) - Definition spec_next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -7831,7 +8179,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7878,15 +8226,21 @@ Module iter. "forward_unchecked", [] |), - [ M.read (| old |); Value.Integer Integer.Usize 1 ] + [ M.read (| old |); M.of_value (| Value.Integer 1 |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| old |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| old |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7907,7 +8261,7 @@ Module iter. None } *) - Definition spec_nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -7919,7 +8273,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7953,7 +8307,7 @@ Module iter. |) in let plus_n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8001,22 +8355,27 @@ Module iter. "forward_unchecked", [] |), - [ M.read (| plus_n |); Value.Integer Integer.Usize 1 + [ + M.read (| plus_n |); + M.of_value (| Value.Integer 1 |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| plus_n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| plus_n |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -8034,7 +8393,7 @@ Module iter. |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -8059,7 +8418,7 @@ Module iter. NonZeroUsize::new(n - taken).map_or(Ok(()), Err) } *) - Definition spec_advance_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_advance_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -8070,7 +8429,7 @@ Module iter. let available := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8134,7 +8493,7 @@ Module iter. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -8197,10 +8556,14 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| taken |) |) ] + [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| taken |) |) ] + |); + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -8219,7 +8582,7 @@ Module iter. } } *) - Definition spec_next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8227,7 +8590,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8274,26 +8637,31 @@ Module iter. "end" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "end" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "end" + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -8314,7 +8682,7 @@ Module iter. None } *) - Definition spec_nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -8326,7 +8694,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8360,7 +8728,7 @@ Module iter. |) in let minus_n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8410,30 +8778,34 @@ Module iter. |), [ M.read (| minus_n |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "end" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "end" + |) + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -8451,7 +8823,7 @@ Module iter. |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -8473,7 +8845,7 @@ Module iter. NonZeroUsize::new(n - taken).map_or(Ok(()), Err) } *) - Definition spec_advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -8484,7 +8856,7 @@ Module iter. let available := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8548,7 +8920,7 @@ Module iter. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -8611,10 +8983,14 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| taken |) |) ] + [ BinOp.Panic.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" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -8650,7 +9026,7 @@ Module iter. self.spec_next() } *) - Definition next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -8679,7 +9055,7 @@ Module iter. } } *) - Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -8687,7 +9063,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8736,32 +9112,40 @@ Module iter. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], - "unwrap_or", - [] - |), - [ - M.read (| hint |); - M.read (| M.get_constant (| "core::num::MAX" |) |) - ] - |); - M.read (| hint |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], + "unwrap_or", + [] + |), + [ + M.read (| hint |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |)); + A.to_value (M.read (| hint |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))) ] |) @@ -8778,7 +9162,7 @@ Module iter. } } *) - Definition count (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -8786,7 +9170,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8839,11 +9223,11 @@ Module iter. |) ] |); - M.read (| Value.String "count overflowed usize" |) + M.read (| M.of_value (| Value.String "count overflowed usize" |) |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -8855,7 +9239,7 @@ Module iter. self.spec_nth(n) } *) - Definition nth (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -8880,7 +9264,7 @@ Module iter. self.next_back() } *) - Definition last (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -8907,7 +9291,7 @@ Module iter. self.next() } *) - Definition min (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -8934,7 +9318,7 @@ Module iter. self.next_back() } *) - Definition max (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -8958,13 +9342,13 @@ Module iter. true } *) - Definition is_sorted (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sorted (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -8973,7 +9357,7 @@ Module iter. self.spec_advance_by(n) } *) - Definition advance_by (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -9005,7 +9389,7 @@ Module iter. unsafe { Step::forward_unchecked(self.start.clone(), idx) } } *) - Definition __iterator_get_unchecked (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; idx ] => @@ -9157,8 +9541,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9185,8 +9569,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9213,8 +9597,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9241,8 +9625,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9269,8 +9653,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9297,8 +9681,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9325,8 +9709,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9353,8 +9737,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9381,8 +9765,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9409,8 +9793,8 @@ Module iter. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -9477,7 +9861,7 @@ Module iter. self.spec_next_back() } *) - Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -9501,7 +9885,7 @@ Module iter. self.spec_nth_back(n) } *) - Definition nth_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -9526,7 +9910,7 @@ Module iter. self.spec_advance_back_by(n) } *) - Definition advance_back_by (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -9596,7 +9980,7 @@ Module iter. Some(mem::replace(&mut self.start, n)) } *) - Definition next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -9618,26 +10002,29 @@ Module iter. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::mem::replace", [ A ] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeFrom", - "start" - |); - M.read (| n |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::mem::replace", [ A ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeFrom", + "start" + |); + M.read (| n |) + ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -9648,17 +10035,19 @@ Module iter. (usize::MAX, None) } *) - Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| M.get_constant (| "core::num::MAX" |) |); - Value.StructTuple "core::option::Option::None" [] - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)); + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |))) | _, _ => M.impossible end. @@ -9669,7 +10058,7 @@ Module iter. Some(plus_n) } *) - Definition nth (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -9710,11 +10099,17 @@ Module iter. M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), [ plus_n ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| plus_n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| plus_n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -9784,7 +10179,7 @@ Module iter. }) } *) - Definition spec_next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -9795,7 +10190,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9816,11 +10211,15 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let is_iterating := @@ -9842,108 +10241,115 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use is_iterating in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - let n := - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ A ], - "expect", - [] - |), - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_iterating in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let n := + M.alloc (| M.call_closure (| - M.get_trait_method (| - "core::iter::range::Step", - A, - [], - "forward_checked", + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ A ], + "expect", [] |), [ M.call_closure (| M.get_trait_method (| - "core::clone::Clone", + "core::iter::range::Step", A, [], - "clone", + "forward_checked", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |) + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + ] + |); + M.of_value (| Value.Integer 1 |) ] |); - Value.Integer Integer.Usize 1 + M.read (| + M.of_value (| + Value.String "`Step` invariants not upheld" + |) + |) ] - |); - M.read (| Value.String "`Step` invariants not upheld" |) - ] - |) - |) in - M.alloc (| - M.call_closure (| - M.get_function (| "core::mem::replace", [ A ] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |); - M.read (| n |) - ] - |) - |))); - fun γ => - ltac:(M.monadic - (let _ := - M.write (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "exhausted" - |), - Value.Bool true - |) in - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" + |) + |) in + M.alloc (| + M.call_closure (| + M.get_function (| "core::mem::replace", [ A ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |); + M.read (| n |) + ] |) - ] - |) - |))) - ] - |) - |) - ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "exhausted" + |), + M.of_value (| Value.Bool true |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + ] + |) + |))) + ] + |) + |)) + ] + |) |) |))) |))) @@ -9979,7 +10385,7 @@ Module iter. try { accum } } *) - Definition spec_try_fold (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -9992,7 +10398,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10028,7 +10434,7 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let accum := M.copy (| init |) in @@ -10036,7 +10442,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10104,10 +10510,14 @@ Module iter. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); - M.read (| Value.String "`Step` invariants not upheld" |) + M.read (| + M.of_value (| + Value.String "`Step` invariants not upheld" + |) + |) ] |) |) in @@ -10150,7 +10560,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| accum |); M.read (| n |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| n |)) + ] + |) ] |) ] @@ -10198,7 +10614,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -10208,7 +10624,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -10222,11 +10638,11 @@ Module iter. "core::ops::range::RangeInclusive", "exhausted" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10282,26 +10698,29 @@ Module iter. |), [ f; - Value.Tuple - [ - M.read (| accum |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + ] + |)) + ] + |) ] |) ] @@ -10349,8 +10768,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -10386,7 +10805,7 @@ Module iter. }) } *) - Definition spec_next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -10397,7 +10816,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10418,11 +10837,15 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let is_iterating := @@ -10444,108 +10867,115 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use is_iterating in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - let n := - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ A ], - "expect", - [] - |), - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_iterating in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let n := + M.alloc (| M.call_closure (| - M.get_trait_method (| - "core::iter::range::Step", - A, - [], - "backward_checked", + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ A ], + "expect", [] |), [ M.call_closure (| M.get_trait_method (| - "core::clone::Clone", + "core::iter::range::Step", A, [], - "clone", + "backward_checked", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" - |) + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |) + ] + |); + M.of_value (| Value.Integer 1 |) ] |); - Value.Integer Integer.Usize 1 + M.read (| + M.of_value (| + Value.String "`Step` invariants not upheld" + |) + |) ] - |); - M.read (| Value.String "`Step` invariants not upheld" |) - ] - |) - |) in - M.alloc (| - M.call_closure (| - M.get_function (| "core::mem::replace", [ A ] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" - |); - M.read (| n |) - ] - |) - |))); - fun γ => - ltac:(M.monadic - (let _ := - M.write (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "exhausted" - |), - Value.Bool true - |) in - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" + |) + |) in + M.alloc (| + M.call_closure (| + M.get_function (| "core::mem::replace", [ A ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |); + M.read (| n |) + ] |) - ] - |) - |))) - ] - |) - |) - ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "exhausted" + |), + M.of_value (| Value.Bool true |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |) + ] + |) + |))) + ] + |) + |)) + ] + |) |) |))) |))) @@ -10581,7 +11011,7 @@ Module iter. try { accum } } *) - Definition spec_try_rfold (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_rfold (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -10594,7 +11024,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10630,7 +11060,7 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let accum := M.copy (| init |) in @@ -10638,7 +11068,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10706,10 +11136,14 @@ Module iter. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |); - M.read (| Value.String "`Step` invariants not upheld" |) + M.read (| + M.of_value (| + Value.String "`Step` invariants not upheld" + |) + |) ] |) |) in @@ -10752,7 +11186,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| accum |); M.read (| n |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| n |)) + ] + |) ] |) ] @@ -10800,7 +11240,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -10810,7 +11250,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -10824,11 +11264,11 @@ Module iter. "core::ops::range::RangeInclusive", "exhausted" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10884,26 +11324,29 @@ Module iter. |), [ f; - Value.Tuple - [ - M.read (| accum |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + ] + |)) + ] + |) ] |) ] @@ -10951,8 +11394,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -11008,7 +11451,7 @@ Module iter. }) } *) - Definition spec_next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11019,7 +11462,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11040,11 +11483,15 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let is_iterating := @@ -11066,98 +11513,101 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use is_iterating in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - let n := - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::range::Step", - T, - [], - "forward_unchecked", - [] - |), - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_iterating in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let n := + M.alloc (| M.call_closure (| M.get_trait_method (| - "core::clone::Clone", + "core::iter::range::Step", T, [], - "clone", + "forward_unchecked", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |) + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + T, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + ] + |); + M.of_value (| Value.Integer 1 |) ] - |); - Value.Integer Integer.Usize 1 - ] - |) - |) in - M.alloc (| - M.call_closure (| - M.get_function (| "core::mem::replace", [ T ] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |); - M.read (| n |) - ] - |) - |))); - fun γ => - ltac:(M.monadic - (let _ := - M.write (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "exhausted" - |), - Value.Bool true - |) in - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - T, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" + |) + |) in + M.alloc (| + M.call_closure (| + M.get_function (| "core::mem::replace", [ T ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |); + M.read (| n |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "exhausted" + |), + M.of_value (| Value.Bool true |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + T, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + ] |) - ] - |) - |))) - ] - |) - |) - ] + |))) + ] + |) + |)) + ] + |) |) |))) |))) @@ -11193,7 +11643,7 @@ Module iter. try { accum } } *) - Definition spec_try_fold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -11206,7 +11656,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11242,7 +11692,7 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let accum := M.copy (| init |) in @@ -11250,7 +11700,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11311,7 +11761,7 @@ Module iter. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -11354,7 +11804,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| accum |); M.read (| n |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| n |)) + ] + |) ] |) ] @@ -11402,7 +11858,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -11412,7 +11868,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -11426,11 +11882,11 @@ Module iter. "core::ops::range::RangeInclusive", "exhausted" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11486,26 +11942,29 @@ Module iter. |), [ f; - Value.Tuple - [ - M.read (| accum |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - T, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + T, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + ] + |)) + ] + |) ] |) ] @@ -11553,8 +12012,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -11590,7 +12049,7 @@ Module iter. }) } *) - Definition spec_next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11601,7 +12060,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11622,11 +12081,15 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let is_iterating := @@ -11648,98 +12111,101 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use is_iterating in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - let n := - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::range::Step", - T, - [], - "backward_unchecked", - [] - |), - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_iterating in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let n := + M.alloc (| M.call_closure (| M.get_trait_method (| - "core::clone::Clone", + "core::iter::range::Step", T, [], - "clone", + "backward_unchecked", [] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" - |) + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + T, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |) + ] + |); + M.of_value (| Value.Integer 1 |) ] - |); - Value.Integer Integer.Usize 1 - ] - |) - |) in - M.alloc (| - M.call_closure (| - M.get_function (| "core::mem::replace", [ T ] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" - |); - M.read (| n |) - ] - |) - |))); - fun γ => - ltac:(M.monadic - (let _ := - M.write (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "exhausted" - |), - Value.Bool true - |) in - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - T, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" + |) + |) in + M.alloc (| + M.call_closure (| + M.get_function (| "core::mem::replace", [ T ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |); + M.read (| n |) + ] |) - ] - |) - |))) - ] - |) - |) - ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "exhausted" + |), + M.of_value (| Value.Bool true |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + T, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |) + ] + |) + |))) + ] + |) + |)) + ] + |) |) |))) |))) @@ -11775,7 +12241,7 @@ Module iter. try { accum } } *) - Definition spec_try_rfold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_rfold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -11788,7 +12254,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11824,7 +12290,7 @@ Module iter. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let accum := M.copy (| init |) in @@ -11832,7 +12298,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11893,7 +12359,7 @@ Module iter. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -11936,7 +12402,13 @@ Module iter. |), [ f; - Value.Tuple [ M.read (| accum |); M.read (| n |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| n |)) + ] + |) ] |) ] @@ -11984,7 +12456,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -11994,7 +12466,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -12008,11 +12480,11 @@ Module iter. "core::ops::range::RangeInclusive", "exhausted" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12068,26 +12540,29 @@ Module iter. |), [ f; - Value.Tuple - [ - M.read (| accum |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - T, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + T, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + ] + |)) + ] + |) ] |) ] @@ -12135,8 +12610,8 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -12183,7 +12658,7 @@ Module iter. self.spec_next() } *) - Definition next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -12214,7 +12689,7 @@ Module iter. } } *) - Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -12225,7 +12700,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12247,18 +12722,23 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -12296,34 +12776,43 @@ Module iter. |) in let hint := M.copy (| γ0_0 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_add", - [] - |), - [ M.read (| hint |); Value.Integer Integer.Usize 1 ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "checked_add", - [] - |), - [ M.read (| hint |); Value.Integer Integer.Usize 1 ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_add", + [] + |), + [ M.read (| hint |); M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "checked_add", + [] + |), + [ M.read (| hint |); M.of_value (| Value.Integer 1 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.read (| M.get_constant (| "core::num::MAX" |) |); - Value.StructTuple "core::option::Option::None" [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)); + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |)) + ] + |) |))) ] |) @@ -12343,7 +12832,7 @@ Module iter. .expect("count overflowed usize") } *) - Definition count (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -12354,7 +12843,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12374,10 +12863,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.Usize 0 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 0 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -12421,8 +12910,8 @@ Module iter. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -12438,15 +12927,17 @@ Module iter. "checked_add", [] |), - [ M.read (| steps |); Value.Integer Integer.Usize 1 ] + [ M.read (| steps |); M.of_value (| Value.Integer 1 |) + ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.read (| Value.String "count overflowed usize" |) + M.read (| M.of_value (| Value.String "count overflowed usize" |) |) ] |) |) @@ -12483,7 +12974,7 @@ Module iter. None } *) - Definition nth (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -12495,7 +12986,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12516,16 +13007,20 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12625,14 +13120,16 @@ Module iter. |), [ plus_n ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| plus_n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| plus_n |)) ] + |) |) |) |) @@ -12673,20 +13170,23 @@ Module iter. "core::ops::range::RangeInclusive", "exhausted" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| plus_n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| plus_n |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -12714,9 +13214,9 @@ Module iter. "core::ops::range::RangeInclusive", "exhausted" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -12732,7 +13232,7 @@ Module iter. self.spec_try_fold(init, f) } *) - Definition try_fold (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -12763,7 +13263,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition fold (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => @@ -12812,7 +13312,7 @@ Module iter. self.next_back() } *) - Definition last (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -12839,7 +13339,7 @@ Module iter. self.next() } *) - Definition min (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -12866,7 +13366,7 @@ Module iter. self.next_back() } *) - Definition max (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -12890,13 +13390,13 @@ Module iter. true } *) - Definition is_sorted (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sorted (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -12931,7 +13431,7 @@ Module iter. self.spec_next_back() } *) - Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -12978,7 +13478,7 @@ Module iter. None } *) - Definition nth_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -12990,7 +13490,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13011,16 +13511,20 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13120,14 +13624,16 @@ Module iter. |), [ minus_n ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| minus_n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| minus_n |)) ] + |) |) |) |) @@ -13168,20 +13674,23 @@ Module iter. "core::ops::range::RangeInclusive", "exhausted" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| minus_n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| minus_n |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -13209,9 +13718,9 @@ Module iter. "core::ops::range::RangeInclusive", "exhausted" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -13227,7 +13736,7 @@ Module iter. self.spec_try_rfold(init, f) } *) - Definition try_rfold (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -13258,7 +13767,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition rfold (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => diff --git a/CoqOfRust/core/iter/sources/empty.v b/CoqOfRust/core/iter/sources/empty.v index 8c4a18005..9220c1eff 100644 --- a/CoqOfRust/core/iter/sources/empty.v +++ b/CoqOfRust/core/iter/sources/empty.v @@ -9,13 +9,15 @@ Module iter. Empty(marker::PhantomData) } *) - Definition empty (τ : list Ty.t) (α : list Value.t) : M := + Definition empty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic - (Value.StructTuple - "core::iter::sources::empty::Empty" - [ Value.StructTuple "core::marker::PhantomData" [] ])) + (M.of_value (| + Value.StructTuple + "core::iter::sources::empty::Empty" + [ A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) ] + |))) | _, _ => M.impossible end. @@ -35,7 +37,7 @@ Module iter. f.debug_struct("Empty").finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -56,7 +58,7 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Empty" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Empty" |) |) ] |) |) ] @@ -85,13 +87,13 @@ Module iter. None } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::option::Option::None" [])) + M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) | _, _ => M.impossible end. @@ -100,17 +102,24 @@ Module iter. (0, Some(0)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.Usize 0 ] - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -137,13 +146,13 @@ Module iter. None } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::option::Option::None" [])) + M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) | _, _ => M.impossible end. @@ -165,13 +174,13 @@ Module iter. 0 } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Integer Integer.Usize 0)) + M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -219,15 +228,17 @@ Module iter. Empty(marker::PhantomData) } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::iter::sources::empty::Empty" - [ Value.StructTuple "core::marker::PhantomData" [] ])) + M.of_value (| + Value.StructTuple + "core::iter::sources::empty::Empty" + [ A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) ] + |))) | _, _ => M.impossible end. @@ -249,14 +260,16 @@ Module iter. Empty(marker::PhantomData) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::iter::sources::empty::Empty" - [ Value.StructTuple "core::marker::PhantomData" [] ])) + (M.of_value (| + Value.StructTuple + "core::iter::sources::empty::Empty" + [ A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/iter/sources/from_coroutine.v b/CoqOfRust/core/iter/sources/from_coroutine.v index 9f4d0ed83..7fd33ce03 100644 --- a/CoqOfRust/core/iter/sources/from_coroutine.v +++ b/CoqOfRust/core/iter/sources/from_coroutine.v @@ -9,14 +9,16 @@ Module iter. FromCoroutine(coroutine) } *) - Definition from_coroutine (τ : list Ty.t) (α : list Value.t) : M := + Definition from_coroutine (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ G ], [ coroutine ] => ltac:(M.monadic (let coroutine := M.alloc (| coroutine |) in - Value.StructTuple - "core::iter::sources::from_coroutine::FromCoroutine" - [ M.read (| coroutine |) ])) + M.of_value (| + Value.StructTuple + "core::iter::sources::from_coroutine::FromCoroutine" + [ A.to_value (M.read (| coroutine |)) ] + |))) | _, _ => M.impossible end. @@ -32,26 +34,29 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::from_coroutine::FromCoroutine") [ G ]. (* Clone *) - Definition clone (G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self G in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::iter::sources::from_coroutine::FromCoroutine" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", G, [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::iter::sources::from_coroutine::FromCoroutine", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::iter::sources::from_coroutine::FromCoroutine" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", G, [], "clone", [] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::iter::sources::from_coroutine::FromCoroutine", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -79,7 +84,7 @@ Module iter. } } *) - Definition next (G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self G in match τ, α with | [], [ self ] => @@ -111,7 +116,7 @@ Module iter. |) ] |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |) |), @@ -126,7 +131,11 @@ Module iter. |) in let n := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -136,7 +145,9 @@ Module iter. "core::ops::coroutine::CoroutineState::Complete", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -162,7 +173,7 @@ Module iter. f.debug_struct("FromCoroutine").finish() } *) - Definition fmt (G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self G in match τ, α with | [], [ self; f ] => @@ -183,7 +194,7 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "FromCoroutine" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "FromCoroutine" |) |) ] |) |) ] diff --git a/CoqOfRust/core/iter/sources/from_fn.v b/CoqOfRust/core/iter/sources/from_fn.v index 3d4dbba46..4142216c9 100644 --- a/CoqOfRust/core/iter/sources/from_fn.v +++ b/CoqOfRust/core/iter/sources/from_fn.v @@ -12,12 +12,16 @@ Module iter. FromFn(f) } *) - Definition from_fn (τ : list Ty.t) (α : list Value.t) : M := + Definition from_fn (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ f ] => ltac:(M.monadic (let f := M.alloc (| f |) in - Value.StructTuple "core::iter::sources::from_fn::FromFn" [ M.read (| f |) ])) + M.of_value (| + Value.StructTuple + "core::iter::sources::from_fn::FromFn" + [ A.to_value (M.read (| f |)) ] + |))) | _, _ => M.impossible end. @@ -33,26 +37,29 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::from_fn::FromFn") [ F ]. (* Clone *) - Definition clone (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::iter::sources::from_fn::FromFn" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::iter::sources::from_fn::FromFn", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::iter::sources::from_fn::FromFn" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::iter::sources::from_fn::FromFn", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -77,7 +84,7 @@ Module iter. (self.0)() } *) - Definition next (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self ] => @@ -97,7 +104,7 @@ Module iter. "core::iter::sources::from_fn::FromFn", 0 |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |))) | _, _ => M.impossible @@ -122,7 +129,7 @@ Module iter. f.debug_struct("FromFn").finish() } *) - Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; f ] => @@ -143,7 +150,7 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "FromFn" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "FromFn" |) |) ] |) |) ] diff --git a/CoqOfRust/core/iter/sources/once.v b/CoqOfRust/core/iter/sources/once.v index 7276b41f1..43a38c053 100644 --- a/CoqOfRust/core/iter/sources/once.v +++ b/CoqOfRust/core/iter/sources/once.v @@ -9,26 +9,35 @@ Module iter. Once { inner: Some(value).into_iter() } } *) - Definition once (τ : list Ty.t) (α : list Value.t) : M := + Definition once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "core::iter::sources::once::Once" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.apply (Ty.path "core::option::Option") [ T ], - [], - "into_iter", - [] - |), - [ Value.StructTuple "core::option::Option::Some" [ M.read (| value |) ] ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::once::Once" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply (Ty.path "core::option::Option") [ T ], + [], + "into_iter", + [] + |), + [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| value |)) ] + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -44,33 +53,36 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::once::Once") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::sources::once::Once" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::IntoIter") [ T ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::once::Once", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::once::Once" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::IntoIter") [ T ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::once::Once", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -88,7 +100,7 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::once::Once") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -103,17 +115,18 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Once" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "Once" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::sources::once::Once", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -140,7 +153,7 @@ Module iter. self.inner.next() } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -170,7 +183,7 @@ Module iter. self.inner.size_hint() } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -218,7 +231,7 @@ Module iter. self.inner.next_back() } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -261,7 +274,7 @@ Module iter. self.inner.len() } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/iter/sources/once_with.v b/CoqOfRust/core/iter/sources/once_with.v index 60206ace3..b7b91c86a 100644 --- a/CoqOfRust/core/iter/sources/once_with.v +++ b/CoqOfRust/core/iter/sources/once_with.v @@ -9,14 +9,24 @@ Module iter. OnceWith { gen: Some(gen) } } *) - Definition once_with (τ : list Ty.t) (α : list Value.t) : M := + Definition once_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A; F ], [ gen ] => ltac:(M.monadic (let gen := M.alloc (| gen |) in - Value.StructRecord - "core::iter::sources::once_with::OnceWith" - [ ("gen", Value.StructTuple "core::option::Option::Some" [ M.read (| gen |) ]) ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::once_with::OnceWith" + [ + ("gen", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| gen |)) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -32,33 +42,36 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::once_with::OnceWith") [ F ]. (* Clone *) - Definition clone (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::sources::once_with::OnceWith" - [ - ("gen", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ F ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::once_with::OnceWith", - "gen" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::once_with::OnceWith" + [ + ("gen", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ F ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::once_with::OnceWith", + "gen" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -84,7 +97,7 @@ Module iter. } } *) - Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; f ] => @@ -93,7 +106,7 @@ Module iter. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -124,7 +137,10 @@ Module iter. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "OnceWith(Some(_))" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "OnceWith(Some(_))" |) |) + ] |) |))); fun γ => @@ -136,7 +152,10 @@ Module iter. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "OnceWith(None)" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "OnceWith(None)" |) |) + ] |) |))) ] @@ -167,7 +186,7 @@ Module iter. Some(f()) } *) - Definition next (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self ] => @@ -252,20 +271,23 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [] ], + "call_once", + [] + |), + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] + |)) + ] + |) |) |))) |))) @@ -277,7 +299,7 @@ Module iter. self.gen.iter().size_hint() } *) - Definition size_hint (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self ] => @@ -336,7 +358,7 @@ Module iter. self.next() } *) - Definition next_back (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self ] => @@ -373,7 +395,7 @@ Module iter. self.gen.iter().len() } *) - Definition len (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/iter/sources/repeat.v b/CoqOfRust/core/iter/sources/repeat.v index 2dc3f8b5e..190646b2d 100644 --- a/CoqOfRust/core/iter/sources/repeat.v +++ b/CoqOfRust/core/iter/sources/repeat.v @@ -9,14 +9,16 @@ Module iter. Repeat { element: elt } } *) - Definition repeat (τ : list Ty.t) (α : list Value.t) : M := + Definition repeat (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ elt ] => ltac:(M.monadic (let elt := M.alloc (| elt |) in - Value.StructRecord - "core::iter::sources::repeat::Repeat" - [ ("element", M.read (| elt |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::repeat::Repeat" + [ ("element", A.to_value (M.read (| elt |))) ] + |))) | _, _ => M.impossible end. @@ -32,27 +34,30 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::repeat::Repeat") [ A ]. (* Clone *) - Definition clone (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::sources::repeat::Repeat" - [ - ("element", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat::Repeat", - "element" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::repeat::Repeat" + [ + ("element", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat::Repeat", + "element" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -70,7 +75,7 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::repeat::Repeat") [ A ]. (* Debug *) - Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; f ] => @@ -85,17 +90,18 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "Repeat" |); - M.read (| Value.String "element" |); + M.read (| M.of_value (| Value.String "Repeat" |) |); + M.read (| M.of_value (| Value.String "element" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::sources::repeat::Repeat", "element" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -122,26 +128,29 @@ Module iter. Some(self.element.clone()) } *) - Definition next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat::Repeat", - "element" - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat::Repeat", + "element" + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -150,17 +159,19 @@ Module iter. (usize::MAX, None) } *) - Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| M.get_constant (| "core::num::MAX" |) |); - Value.StructTuple "core::option::Option::None" [] - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)); + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |))) | _, _ => M.impossible end. @@ -171,7 +182,7 @@ Module iter. Ok(()) } *) - Definition advance_by (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -185,7 +196,11 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))) ] |) @@ -199,7 +214,7 @@ Module iter. Some(self.element.clone()) } *) - Definition nth (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -213,20 +228,29 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat::Repeat", - "element" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat::Repeat", + "element" + |) + ] + |)) + ] + |) |))) ] |) @@ -239,14 +263,16 @@ Module iter. loop {} } *) - Definition last (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.never_to_any (| - M.read (| M.loop (| ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) |) |) + M.read (| + M.loop (| ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) + |) |))) | _, _ => M.impossible end. @@ -256,14 +282,16 @@ Module iter. loop {} } *) - Definition count (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.never_to_any (| - M.read (| M.loop (| ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) |) |) + M.read (| + M.loop (| ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) + |) |))) | _, _ => M.impossible end. @@ -295,26 +323,29 @@ Module iter. Some(self.element.clone()) } *) - Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat::Repeat", - "element" - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat::Repeat", + "element" + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -325,7 +356,7 @@ Module iter. Ok(()) } *) - Definition advance_back_by (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -339,7 +370,11 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))) ] |) @@ -353,7 +388,7 @@ Module iter. Some(self.element.clone()) } *) - Definition nth_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -367,20 +402,29 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat::Repeat", - "element" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat::Repeat", + "element" + |) + ] + |)) + ] + |) |))) ] |) diff --git a/CoqOfRust/core/iter/sources/repeat_n.v b/CoqOfRust/core/iter/sources/repeat_n.v index dc1bf7783..76cb11db0 100644 --- a/CoqOfRust/core/iter/sources/repeat_n.v +++ b/CoqOfRust/core/iter/sources/repeat_n.v @@ -18,7 +18,7 @@ Module iter. RepeatN { element, count } } *) - Definition repeat_n (τ : list Ty.t) (α : list Value.t) : M := + Definition repeat_n (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ element; count ] => ltac:(M.monadic @@ -38,14 +38,17 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| count |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| count |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -60,14 +63,19 @@ Module iter. [ element ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::iter::sources::repeat_n::RepeatN" - [ ("element", M.read (| element |)); ("count", M.read (| count |)) ] + M.of_value (| + Value.StructRecord + "core::iter::sources::repeat_n::RepeatN" + [ + ("element", A.to_value (M.read (| element |))); + ("count", A.to_value (M.read (| count |))) + ] + |) |) |))) | _, _ => M.impossible @@ -89,50 +97,54 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::repeat_n::RepeatN") [ A ]. (* Clone *) - Definition clone (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::sources::repeat_n::RepeatN" - [ - ("count", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat_n::RepeatN", - "count" - |) - ] - |)); - ("element", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat_n::RepeatN", - "element" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::repeat_n::RepeatN" + [ + ("count", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat_n::RepeatN", + "count" + |) + ] + |))); + ("element", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat_n::RepeatN", + "element" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -150,7 +162,7 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::repeat_n::RepeatN") [ A ]. (* Debug *) - Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; f ] => @@ -165,25 +177,27 @@ Module iter. |), [ M.read (| f |); - M.read (| Value.String "RepeatN" |); - M.read (| Value.String "count" |); + M.read (| M.of_value (| Value.String "RepeatN" |) |); + M.read (| M.of_value (| Value.String "count" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::sources::repeat_n::RepeatN", "count" - |)); - M.read (| Value.String "element" |); + |) + |); + M.read (| M.of_value (| Value.String "element" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::sources::repeat_n::RepeatN", "element" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -214,7 +228,7 @@ Module iter. } } *) - Definition take_element (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_element (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -222,22 +236,23 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::sources::repeat_n::RepeatN", "count" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -248,31 +263,38 @@ Module iter. "core::iter::sources::repeat_n::RepeatN", "count" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ A ], - "take", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat_n::RepeatN", - "element" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ A ], + "take", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat_n::RepeatN", + "element" + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -293,7 +315,7 @@ Module iter. self.take_element(); } *) - Definition drop (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -311,7 +333,7 @@ Module iter. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -349,7 +371,7 @@ Module iter. }) } *) - Definition next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -360,22 +382,23 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::sources::repeat_n::RepeatN", "count" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -386,12 +409,14 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -403,74 +428,50 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := - M.use - (M.alloc (| - BinOp.Pure.eq - (M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat_n::RepeatN", - "count" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat_n::RepeatN", + "count" + |) + |), + M.of_value (| Value.Integer 0 |) |) - |)) - (Value.Integer Integer.Usize 0) - |)) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ A ], - "take", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat_n::RepeatN", - "element" - |) - ] - |) - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - A, - [], - "clone", - [] - |), - [ + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", + M.get_associated_function (| Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ A ], - [], - "deref", + "take", [] |), [ @@ -481,13 +482,46 @@ Module iter. |) ] |) - ] - |) - |))) - ] - |) - |) - ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + A, + [], + "clone", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ A ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat_n::RepeatN", + "element" + |) + ] + |) + ] + |) + |))) + ] + |) + |)) + ] + |) |) |))) |))) @@ -500,7 +534,7 @@ Module iter. (len, Some(len)) } *) - Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -521,11 +555,18 @@ Module iter. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| len |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -548,7 +589,7 @@ Module iter. } } *) - Definition advance_by (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; skip ] => @@ -566,14 +607,14 @@ Module iter. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| skip |)) (M.read (| len |)) + BinOp.Pure.ge (| M.read (| skip |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -588,33 +629,44 @@ Module iter. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| skip |)) (M.read (| len |)) |)) in + (M.alloc (| + BinOp.Pure.gt (| M.read (| skip |), M.read (| len |) |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "new_unchecked", - [] - |), - [ BinOp.Panic.sub (| M.read (| skip |), M.read (| len |) |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "new_unchecked", + [] + |), + [ + BinOp.Panic.sub (| + Integer.Usize, + M.read (| skip |), + M.read (| len |) + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -625,10 +677,14 @@ Module iter. "core::iter::sources::repeat_n::RepeatN", "count" |), - BinOp.Panic.sub (| M.read (| len |), M.read (| skip |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| skip |) |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))) ] |) @@ -641,7 +697,7 @@ Module iter. self.take_element() } *) - Definition last (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -663,7 +719,7 @@ Module iter. self.len() } *) - Definition count (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -708,7 +764,7 @@ Module iter. self.count } *) - Definition len (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -742,7 +798,7 @@ Module iter. self.next() } *) - Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -766,7 +822,7 @@ Module iter. self.advance_by(n) } *) - Definition advance_back_by (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => @@ -791,7 +847,7 @@ Module iter. self.nth(n) } *) - Definition nth_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; n ] => diff --git a/CoqOfRust/core/iter/sources/repeat_with.v b/CoqOfRust/core/iter/sources/repeat_with.v index 9a9b40b83..34340ab69 100644 --- a/CoqOfRust/core/iter/sources/repeat_with.v +++ b/CoqOfRust/core/iter/sources/repeat_with.v @@ -9,14 +9,16 @@ Module iter. RepeatWith { repeater } } *) - Definition repeat_with (τ : list Ty.t) (α : list Value.t) : M := + Definition repeat_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A; F ], [ repeater ] => ltac:(M.monadic (let repeater := M.alloc (| repeater |) in - Value.StructRecord - "core::iter::sources::repeat_with::RepeatWith" - [ ("repeater", M.read (| repeater |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::repeat_with::RepeatWith" + [ ("repeater", A.to_value (M.read (| repeater |))) ] + |))) | _, _ => M.impossible end. @@ -45,27 +47,30 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::repeat_with::RepeatWith") [ F ]. (* Clone *) - Definition clone (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::sources::repeat_with::RepeatWith" - [ - ("repeater", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat_with::RepeatWith", - "repeater" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::repeat_with::RepeatWith" + [ + ("repeater", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat_with::RepeatWith", + "repeater" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -87,7 +92,7 @@ Module iter. f.debug_struct("RepeatWith").finish_non_exhaustive() } *) - Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; f ] => @@ -108,7 +113,7 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "RepeatWith" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RepeatWith" |) |) ] |) |) ] @@ -137,33 +142,36 @@ Module iter. Some((self.repeater)()) } *) - Definition next (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnMut", - F, - [ Ty.tuple [] ], - "call_mut", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::repeat_with::RepeatWith", - "repeater" - |); - Value.Tuple [] - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + F, + [ Ty.tuple [] ], + "call_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::repeat_with::RepeatWith", + "repeater" + |); + M.of_value (| Value.Tuple [] |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -172,17 +180,19 @@ Module iter. (usize::MAX, None) } *) - Definition size_hint (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| M.get_constant (| "core::num::MAX" |) |); - Value.StructTuple "core::option::Option::None" [] - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)); + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |))) | _, _ => M.impossible end. @@ -202,7 +212,7 @@ Module iter. } } *) - Definition try_fold (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => @@ -232,7 +242,7 @@ Module iter. "core::iter::sources::repeat_with::RepeatWith", "repeater" |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |) |) in @@ -261,7 +271,13 @@ Module iter. |), [ fold; - Value.Tuple [ M.read (| init |); M.read (| item |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| init |)); + A.to_value (M.read (| item |)) + ] + |) ] |) ] @@ -309,7 +325,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) |) |))) diff --git a/CoqOfRust/core/iter/sources/successors.v b/CoqOfRust/core/iter/sources/successors.v index 930f4cc94..dc6a859f8 100644 --- a/CoqOfRust/core/iter/sources/successors.v +++ b/CoqOfRust/core/iter/sources/successors.v @@ -15,15 +15,20 @@ Module iter. Successors { next: first, succ } } *) - Definition successors (τ : list Ty.t) (α : list Value.t) : M := + Definition successors (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ first; succ ] => ltac:(M.monadic (let first := M.alloc (| first |) in let succ := M.alloc (| succ |) in - Value.StructRecord - "core::iter::sources::successors::Successors" - [ ("next", M.read (| first |)); ("succ", M.read (| succ |)) ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::successors::Successors" + [ + ("next", A.to_value (M.read (| first |))); + ("succ", A.to_value (M.read (| succ |))) + ] + |))) | _, _ => M.impossible end. @@ -39,44 +44,48 @@ Module iter. Ty.apply (Ty.path "core::iter::sources::successors::Successors") [ T; F ]. (* Clone *) - Definition clone (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::iter::sources::successors::Successors" - [ - ("next", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ T ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::successors::Successors", - "next" - |) - ] - |)); - ("succ", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::iter::sources::successors::Successors", - "succ" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::iter::sources::successors::Successors" + [ + ("next", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ T ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::successors::Successors", + "next" + |) + ] + |))); + ("succ", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", F, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::iter::sources::successors::Successors", + "succ" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -103,7 +112,7 @@ Module iter. Some(item) } *) - Definition next (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self ] => @@ -208,12 +217,16 @@ Module iter. "core::iter::sources::successors::Successors", "succ" |); - Value.Tuple [ item ] + M.of_value (| Value.Tuple [ A.to_value item ] |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| item |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| item |)) ] + |) |) |))) |))) @@ -225,7 +238,7 @@ Module iter. if self.next.is_some() { (1, None) } else { (0, Some(0)) } } *) - Definition size_hint (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self ] => @@ -233,7 +246,7 @@ Module iter. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -258,22 +271,32 @@ Module iter. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 1; - Value.StructTuple "core::option::Option::None" [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))) ] |) @@ -317,7 +340,7 @@ Module iter. f.debug_struct("Successors").field("next", &self.next).finish() } *) - Definition fmt (T F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T F in match τ, α with | [], [ self; f ] => @@ -345,17 +368,19 @@ Module iter. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Successors" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Successors" |) |) + ] |) |); - M.read (| Value.String "next" |); + M.read (| M.of_value (| Value.String "next" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::sources::successors::Successors", "next" - |)) + |) + |) ] |) ] diff --git a/CoqOfRust/core/iter/traits/accum.v b/CoqOfRust/core/iter/traits/accum.v index d3099ba03..4961d3206 100644 --- a/CoqOfRust/core/iter/traits/accum.v +++ b/CoqOfRust/core/iter/traits/accum.v @@ -22,7 +22,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -40,9 +40,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I8 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -58,13 +58,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.I8, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -90,7 +95,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -108,9 +113,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I8 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -126,13 +131,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.I8, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -158,7 +168,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -178,9 +188,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I8 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -211,7 +221,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -237,7 +248,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -257,9 +268,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I8 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -290,7 +301,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -316,7 +328,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -334,9 +346,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I16 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -352,13 +364,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.I16, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -384,7 +401,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -402,9 +419,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I16 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -420,13 +437,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.I16, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -452,7 +474,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -472,9 +494,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I16 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -505,7 +527,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -531,7 +554,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -551,9 +574,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I16 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -584,7 +607,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -610,7 +634,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -628,9 +652,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I32 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -646,13 +670,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.I32, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -678,7 +707,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -696,9 +725,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I32 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -714,13 +743,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.I32, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -746,7 +780,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -766,9 +800,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I32 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -799,7 +833,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -825,7 +860,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -845,9 +880,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I32 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -878,7 +913,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -904,7 +940,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -922,9 +958,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I64 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -940,13 +976,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.I64, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -972,7 +1013,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -990,9 +1031,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I64 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1008,13 +1049,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.I64, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1040,7 +1086,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1060,9 +1106,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I64 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1093,7 +1139,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1119,7 +1166,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1139,9 +1186,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I64 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1172,7 +1219,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1198,7 +1246,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1216,9 +1264,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I128 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1234,13 +1282,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.I128, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1266,7 +1319,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1284,9 +1337,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I128 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1302,13 +1355,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.I128, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1334,7 +1392,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1354,9 +1412,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I128 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1387,7 +1445,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1413,7 +1472,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1433,9 +1492,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.I128 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1466,7 +1525,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1492,7 +1552,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1510,9 +1570,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.Isize 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1528,13 +1588,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.Isize, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1560,7 +1625,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1578,9 +1643,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.Isize 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1596,13 +1661,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.Isize, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1628,7 +1698,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1648,9 +1718,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.Isize 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1681,7 +1751,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1707,7 +1778,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1727,9 +1798,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.Isize 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1760,7 +1831,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1786,7 +1858,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1804,9 +1876,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U8 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1822,13 +1894,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.U8, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1854,7 +1931,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1872,9 +1949,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U8 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1890,13 +1967,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.U8, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1922,7 +2004,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -1942,9 +2024,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U8 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1975,7 +2057,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2001,7 +2084,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2021,9 +2104,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U8 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2054,7 +2137,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2080,7 +2164,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2098,9 +2182,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U16 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2116,13 +2200,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.U16, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2148,7 +2237,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2166,9 +2255,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U16 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2184,13 +2273,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.U16, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2216,7 +2310,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2236,9 +2330,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U16 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2269,7 +2363,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2295,7 +2390,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2315,9 +2410,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U16 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2348,7 +2443,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2374,7 +2470,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2392,9 +2488,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U32 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2410,13 +2506,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.U32, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2442,7 +2543,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2460,9 +2561,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U32 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2478,13 +2579,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.U32, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2510,7 +2616,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2530,9 +2636,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U32 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2563,7 +2669,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2589,7 +2696,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2609,9 +2716,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U32 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2642,7 +2749,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2668,7 +2776,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2686,9 +2794,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U64 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2704,13 +2812,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.U64, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2736,7 +2849,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2754,9 +2867,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U64 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2772,13 +2885,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.U64, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2804,7 +2922,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2824,9 +2942,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U64 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2857,7 +2975,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2883,7 +3002,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2903,9 +3022,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U64 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2936,7 +3055,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2962,7 +3082,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -2980,9 +3100,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U128 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2998,13 +3118,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.U128, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3030,7 +3155,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3048,9 +3173,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U128 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3066,13 +3191,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.U128, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3098,7 +3228,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3118,9 +3248,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U128 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3151,7 +3281,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3177,7 +3308,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3197,9 +3328,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.U128 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3230,7 +3361,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3256,7 +3388,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3274,9 +3406,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.Usize 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3292,13 +3424,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.Usize, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3324,7 +3461,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3342,9 +3479,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.Usize 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3360,13 +3497,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.Usize, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3392,7 +3534,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3412,9 +3554,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.Usize 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3445,7 +3587,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3471,7 +3614,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3491,9 +3634,9 @@ Module iter. |), [ M.read (| iter |); - Value.Integer Integer.Usize 1; - M.closure - (fun γ => + M.of_value (| Value.Integer 1 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3524,7 +3667,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3551,7 +3695,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3577,9 +3721,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I8 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3616,7 +3764,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3643,7 +3792,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3669,9 +3818,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I8 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3708,7 +3861,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3735,7 +3889,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3764,9 +3918,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I8 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3807,7 +3965,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3840,7 +3999,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3869,9 +4028,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I8 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -3912,7 +4075,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3945,7 +4109,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -3971,9 +4135,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I16 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4010,7 +4178,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4037,7 +4206,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4063,9 +4232,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I16 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4102,7 +4275,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4129,7 +4303,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4158,9 +4332,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I16 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4201,7 +4379,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4234,7 +4413,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4263,9 +4442,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I16 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4306,7 +4489,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4339,7 +4523,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4365,9 +4549,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I32 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4404,7 +4592,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4431,7 +4620,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4457,9 +4646,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I32 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4496,7 +4689,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4523,7 +4717,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4552,9 +4746,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I32 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4595,7 +4793,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4628,7 +4827,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4657,9 +4856,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I32 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4700,7 +4903,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4733,7 +4937,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4759,9 +4963,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I64 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4798,7 +5006,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4825,7 +5034,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4851,9 +5060,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I64 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4890,7 +5103,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4917,7 +5131,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -4946,9 +5160,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I64 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -4989,7 +5207,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5022,7 +5241,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5051,9 +5270,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I64 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5094,7 +5317,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5127,7 +5351,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5153,11 +5377,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.I128 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5194,7 +5420,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5221,7 +5448,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5247,11 +5474,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.I128 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5288,7 +5517,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5315,7 +5545,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5347,11 +5577,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.I128 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5392,7 +5624,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5425,7 +5658,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5457,11 +5690,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.I128 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5502,7 +5737,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5535,7 +5771,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5561,11 +5797,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.Isize 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5602,7 +5840,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5629,7 +5868,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5655,11 +5894,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.Isize 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5696,7 +5937,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5723,7 +5965,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5755,11 +5997,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.Isize 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5800,7 +6044,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5833,7 +6078,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5865,11 +6110,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.Isize 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5910,7 +6157,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5943,7 +6191,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -5969,9 +6217,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U8 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6008,7 +6260,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6035,7 +6288,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6061,9 +6314,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U8 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6100,7 +6357,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6127,7 +6385,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6156,9 +6414,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U8 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6199,7 +6461,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6232,7 +6495,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6261,9 +6524,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U8 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6304,7 +6571,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6337,7 +6605,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6363,9 +6631,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U16 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6402,7 +6674,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6429,7 +6702,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6455,9 +6728,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U16 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6494,7 +6771,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6521,7 +6799,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6550,9 +6828,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U16 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6593,7 +6875,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6626,7 +6909,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6655,9 +6938,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U16 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6698,7 +6985,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6731,7 +7019,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6757,9 +7045,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U32 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6796,7 +7088,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6823,7 +7116,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6849,9 +7142,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U32 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6888,7 +7185,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6915,7 +7213,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -6944,9 +7242,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U32 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6987,7 +7289,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7020,7 +7323,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7049,9 +7352,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U32 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7092,7 +7399,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7125,7 +7433,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7151,9 +7459,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U64 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7190,7 +7502,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7217,7 +7530,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7243,9 +7556,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U64 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7282,7 +7599,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7309,7 +7627,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7338,9 +7656,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U64 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7381,7 +7703,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7414,7 +7737,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7443,9 +7766,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U64 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7486,7 +7813,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7519,7 +7847,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7545,11 +7873,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.U128 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7586,7 +7916,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7613,7 +7944,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7639,11 +7970,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.U128 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7680,7 +8013,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7707,7 +8041,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7739,11 +8073,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.U128 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7784,7 +8120,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7817,7 +8154,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7849,11 +8186,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.U128 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7894,7 +8233,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7927,7 +8267,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -7953,11 +8293,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.Usize 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7994,7 +8336,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8021,7 +8364,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8047,11 +8390,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.Usize 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8088,7 +8433,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8115,7 +8461,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8147,11 +8493,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.Usize 0 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8192,7 +8540,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8225,7 +8574,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8257,11 +8606,13 @@ Module iter. |), [ M.read (| iter |); - Value.StructTuple - "core::num::wrapping::Wrapping" - [ Value.Integer Integer.Usize 1 ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8302,7 +8653,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8334,7 +8686,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8352,9 +8704,9 @@ Module iter. |), [ M.read (| iter |); - M.read (| UnsupportedLiteral |); - M.closure - (fun γ => + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8370,13 +8722,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.Usize, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8402,7 +8759,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8420,9 +8777,9 @@ Module iter. |), [ M.read (| iter |); - M.read (| UnsupportedLiteral |); - M.closure - (fun γ => + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8438,13 +8795,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.Usize, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8470,7 +8832,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8490,9 +8852,9 @@ Module iter. |), [ M.read (| iter |); - M.read (| UnsupportedLiteral |); - M.closure - (fun γ => + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8523,7 +8885,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8549,7 +8912,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8569,9 +8932,9 @@ Module iter. |), [ M.read (| iter |); - M.read (| UnsupportedLiteral |); - M.closure - (fun γ => + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8602,7 +8965,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8628,7 +8992,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8646,9 +9010,9 @@ Module iter. |), [ M.read (| iter |); - M.read (| UnsupportedLiteral |); - M.closure - (fun γ => + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8664,13 +9028,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| + Integer.Usize, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8696,7 +9065,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8714,9 +9083,9 @@ Module iter. |), [ M.read (| iter |); - M.read (| UnsupportedLiteral |); - M.closure - (fun γ => + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8732,13 +9101,18 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.mul (| + Integer.Usize, + M.read (| a |), + M.read (| b |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8764,7 +9138,7 @@ Module iter. ) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8784,9 +9158,9 @@ Module iter. |), [ M.read (| iter |); - M.read (| UnsupportedLiteral |); - M.closure - (fun γ => + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8817,7 +9191,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8843,7 +9218,7 @@ Module iter. ) } *) - Definition product (τ : list Ty.t) (α : list Value.t) : M := + Definition product (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -8863,9 +9238,9 @@ Module iter. |), [ M.read (| iter |); - M.read (| UnsupportedLiteral |); - M.closure - (fun γ => + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8896,7 +9271,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8921,7 +9297,7 @@ Module iter. iter::try_process(iter, |i| i.sum()) } *) - Definition sum (T U E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (T U E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U E in match τ, α with | [ _ as I ], [ iter ] => @@ -8956,8 +9332,8 @@ Module iter. |), [ M.read (| iter |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -8987,7 +9363,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -9014,7 +9391,7 @@ Module iter. iter::try_process(iter, |i| i.product()) } *) - Definition product (T U E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition product (T U E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U E in match τ, α with | [ _ as I ], [ iter ] => @@ -9049,8 +9426,8 @@ Module iter. |), [ M.read (| iter |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -9080,7 +9457,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -9107,7 +9485,7 @@ Module iter. iter::try_process(iter, |i| i.sum()) } *) - Definition sum (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [ _ as I ], [ iter ] => @@ -9142,8 +9520,8 @@ Module iter. |), [ M.read (| iter |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -9173,7 +9551,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -9200,7 +9579,7 @@ Module iter. iter::try_process(iter, |i| i.product()) } *) - Definition product (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition product (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [ _ as I ], [ iter ] => @@ -9235,8 +9614,8 @@ Module iter. |), [ M.read (| iter |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -9266,7 +9645,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/iter/traits/collect.v b/CoqOfRust/core/iter/traits/collect.v index 654e401ef..d5891b4bf 100644 --- a/CoqOfRust/core/iter/traits/collect.v +++ b/CoqOfRust/core/iter/traits/collect.v @@ -24,7 +24,7 @@ Module iter. self } *) - Definition into_iter (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -50,7 +50,7 @@ Module iter. (* Trait *) Module Extend. - Definition extend_one (A Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (A Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; item ] => ltac:(M.monadic @@ -69,11 +69,15 @@ Module iter. |), [ M.read (| self |); - Value.StructTuple "core::option::Option::Some" [ M.read (| item |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| item |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -81,7 +85,7 @@ Module iter. Axiom ProvidedMethod_extend_one : forall (A : Ty.t), M.IsProvidedMethod "core::iter::traits::collect::Extend" "extend_one" (extend_one A). - Definition extend_reserve (A Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_reserve (A Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; additional ] => ltac:(M.monadic @@ -90,7 +94,7 @@ Module iter. M.read (| M.match_operator (| additional, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -112,7 +116,7 @@ Module iter. iter.into_iter().for_each(drop) } *) - Definition extend (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self; iter ] => ltac:(M.monadic @@ -144,13 +148,13 @@ Module iter. end. (* fn extend_one(&mut self, _item: ()) {} *) - Definition extend_one (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _item ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _item := M.alloc (| _item |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -193,7 +197,7 @@ Module iter. iter.fold((), extend(a, b)); } *) - Definition extend (A B ExtendA ExtendB : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend (A B ExtendA ExtendB : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B ExtendA ExtendB in match τ, α with | [ T ], [ self; into_iter ] => @@ -245,16 +249,17 @@ Module iter. let lower_bound := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| lower_bound |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| lower_bound |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -287,8 +292,10 @@ Module iter. [ M.read (| b |); M.read (| lower_bound |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -303,7 +310,7 @@ Module iter. |), [ M.read (| iter |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "extend.extend", [] |), [ M.read (| a |); M.read (| b |) ] @@ -311,7 +318,7 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -326,7 +333,7 @@ Module iter. self.1.extend_one(item.1); } *) - Definition extend_one (A B ExtendA ExtendB : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition extend_one (A B ExtendA ExtendB : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B ExtendA ExtendB in match τ, α with | [], [ self; item ] => @@ -366,7 +373,7 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -377,11 +384,7 @@ Module iter. self.1.extend_reserve(additional); } *) - Definition extend_reserve - (A B ExtendA ExtendB : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition extend_reserve (A B ExtendA ExtendB : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B ExtendA ExtendB in match τ, α with | [], [ self; additional ] => @@ -421,7 +424,7 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/iter/traits/double_ended.v b/CoqOfRust/core/iter/traits/double_ended.v index 15fb77d31..4b625cc83 100644 --- a/CoqOfRust/core/iter/traits/double_ended.v +++ b/CoqOfRust/core/iter/traits/double_ended.v @@ -6,7 +6,7 @@ Module iter. Module double_ended. (* Trait *) Module DoubleEndedIterator. - Definition advance_back_by (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -28,12 +28,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| n |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| n |))) + ] + |) ] |) |), @@ -75,7 +77,7 @@ Module iter. |) in let i := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -115,39 +117,52 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::num::nonzero::NonZeroUsize", - "new_unchecked", - [] - |), - [ - BinOp.Panic.sub (| - M.read (| n |), - M.read (| i |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::num::nonzero::NonZeroUsize", + "new_unchecked", + [] + |), + [ + BinOp.Panic.sub (| + Integer.Usize, + M.read (| n |), + M.read (| i |) + |) + ] + |)) + ] + |) |) |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -158,7 +173,7 @@ Module iter. "core::iter::traits::double_ended::DoubleEndedIterator" "advance_back_by" advance_back_by. - Definition nth_back (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -169,7 +184,7 @@ Module iter. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -210,12 +225,14 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -240,7 +257,7 @@ Module iter. "core::iter::traits::double_ended::DoubleEndedIterator" "nth_back" nth_back. - Definition try_rfold (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -255,7 +272,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -304,8 +321,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -353,7 +375,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -363,7 +385,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -392,7 +414,7 @@ Module iter. "core::iter::traits::double_ended::DoubleEndedIterator" "try_rfold" try_rfold. - Definition rfold (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F ], [ self; init; f ] => ltac:(M.monadic @@ -405,7 +427,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -440,10 +462,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -453,7 +484,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -467,7 +498,7 @@ Module iter. Axiom ProvidedMethod_rfold : M.IsProvidedMethod "core::iter::traits::double_ended::DoubleEndedIterator" "rfold" rfold. - Definition rfind (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfind (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -498,7 +529,7 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "check.rfind", [] |), [ M.read (| predicate |) ] @@ -522,7 +553,7 @@ Module iter. ( **self).next_back() } *) - Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -546,7 +577,7 @@ Module iter. ( **self).advance_back_by(n) } *) - Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -571,7 +602,7 @@ Module iter. ( **self).nth_back(n) } *) - Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -599,7 +630,7 @@ Module iter. self.spec_rfold(init, f) } *) - Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -629,7 +660,7 @@ Module iter. self.spec_try_rfold(init, f) } *) - Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -684,7 +715,7 @@ Module iter. accum } *) - Definition spec_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -698,7 +729,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -733,10 +764,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -746,7 +786,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -771,7 +811,7 @@ Module iter. try { accum } } *) - Definition spec_try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -787,7 +827,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -836,8 +876,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -885,7 +930,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -895,7 +940,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -945,7 +990,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition spec_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => @@ -998,7 +1043,7 @@ Module iter. ( **self).try_rfold(init, f) } *) - Definition spec_try_rfold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_rfold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => diff --git a/CoqOfRust/core/iter/traits/exact_size.v b/CoqOfRust/core/iter/traits/exact_size.v index adea3d2e5..b21115a98 100644 --- a/CoqOfRust/core/iter/traits/exact_size.v +++ b/CoqOfRust/core/iter/traits/exact_size.v @@ -6,7 +6,7 @@ Module iter. Module exact_size. (* Trait *) Module ExactSizeIterator. - Definition len (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35,15 +35,20 @@ Module iter. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - upper; - M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| lower |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value upper; + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| lower |)) ] + |) + |)) + ] + |) |), [ fun γ => @@ -53,15 +58,15 @@ Module iter. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply @@ -77,7 +82,8 @@ Module iter. |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -89,9 +95,11 @@ Module iter. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -110,16 +118,20 @@ Module iter. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -133,13 +145,13 @@ Module iter. Axiom ProvidedMethod_len : M.IsProvidedMethod "core::iter::traits::exact_size::ExactSizeIterator" "len" len. - Definition is_empty (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Self, @@ -148,8 +160,9 @@ Module iter. [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -168,7 +181,7 @@ Module iter. ( **self).len() } *) - Definition len (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -192,7 +205,7 @@ Module iter. ( **self).is_empty() } *) - Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/iter/traits/iterator.v b/CoqOfRust/core/iter/traits/iterator.v index bee4ebc4f..036c85cd8 100644 --- a/CoqOfRust/core/iter/traits/iterator.v +++ b/CoqOfRust/core/iter/traits/iterator.v @@ -5,18 +5,21 @@ Module iter. Module traits. Module iterator. (* fn _assert_is_object_safe(_: &dyn Iterator) {} *) - Definition _assert_is_object_safe (τ : list Ty.t) (α : list Value.t) : M := + Definition _assert_is_object_safe (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0 ] => ltac:(M.monadic (let β0 := M.alloc (| β0 |) in - M.match_operator (| β0, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| + β0, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. (* Trait *) Module Iterator. - Definition next_chunk (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_chunk (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30,20 +33,24 @@ Module iter. Axiom ProvidedMethod_next_chunk : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "next_chunk" next_chunk. - Definition size_hint (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ Value.Integer Integer.Usize 0; Value.StructTuple "core::option::Option::None" [] - ])) + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |))) | _, _ => M.impossible end. Axiom ProvidedMethod_size_hint : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "size_hint" size_hint. - Definition count (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61,9 +68,9 @@ Module iter. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -79,15 +86,17 @@ Module iter. fun γ => ltac:(M.monadic (BinOp.Panic.add (| + Integer.Usize, M.read (| count |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -95,7 +104,7 @@ Module iter. Axiom ProvidedMethod_count : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "count" count. - Definition last (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -115,7 +124,7 @@ Module iter. |), [ M.read (| self |); - Value.StructTuple "core::option::Option::None" []; + M.of_value (| Value.StructTuple "core::option::Option::None" [] |); M.get_associated_function (| Self, "some.last", [] |) ] |))) @@ -124,7 +133,7 @@ Module iter. Axiom ProvidedMethod_last : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "last" last. - Definition advance_by (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -146,12 +155,14 @@ Module iter. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| n |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| n |))) + ] + |) ] |) |), @@ -193,7 +204,7 @@ Module iter. |) in let i := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -233,39 +244,52 @@ Module iter. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::num::nonzero::NonZeroUsize", - "new_unchecked", - [] - |), - [ - BinOp.Panic.sub (| - M.read (| n |), - M.read (| i |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::num::nonzero::NonZeroUsize", + "new_unchecked", + [] + |), + [ + BinOp.Panic.sub (| + Integer.Usize, + M.read (| n |), + M.read (| i |) + |) + ] + |)) + ] + |) |) |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -273,7 +297,7 @@ Module iter. Axiom ProvidedMethod_advance_by : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "advance_by" advance_by. - Definition nth (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -383,7 +407,7 @@ Module iter. Axiom ProvidedMethod_nth : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "nth" nth. - Definition step_by (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition step_by (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; step ] => ltac:(M.monadic @@ -402,7 +426,7 @@ Module iter. Axiom ProvidedMethod_step_by : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "step_by" step_by. - Definition chain (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition chain (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ U ], [ self; other ] => ltac:(M.monadic @@ -433,7 +457,7 @@ Module iter. Axiom ProvidedMethod_chain : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "chain" chain. - Definition zip (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition zip (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ U ], [ self; other ] => ltac:(M.monadic @@ -464,7 +488,7 @@ Module iter. Axiom ProvidedMethod_zip : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "zip" zip. - Definition intersperse (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition intersperse (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; separator ] => ltac:(M.monadic @@ -483,7 +507,7 @@ Module iter. Axiom ProvidedMethod_intersperse : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "intersperse" intersperse. - Definition intersperse_with (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition intersperse_with (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ G ], [ self; separator ] => ltac:(M.monadic @@ -507,7 +531,7 @@ Module iter. "core::iter::traits::iterator::Iterator" "intersperse_with" intersperse_with. - Definition map (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F ], [ self; f ] => ltac:(M.monadic @@ -526,7 +550,7 @@ Module iter. Axiom ProvidedMethod_map : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "map" map. - Definition for_each (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition for_each (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; f ] => ltac:(M.monadic @@ -545,7 +569,7 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "call.for_each", [] |), [ M.read (| f |) ] @@ -553,14 +577,14 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. Axiom ProvidedMethod_for_each : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "for_each" for_each. - Definition filter (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition filter (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -579,7 +603,7 @@ Module iter. Axiom ProvidedMethod_filter : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "filter" filter. - Definition filter_map (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition filter_map (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F ], [ self; f ] => ltac:(M.monadic @@ -598,7 +622,7 @@ Module iter. Axiom ProvidedMethod_filter_map : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "filter_map" filter_map. - Definition enumerate (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition enumerate (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -616,7 +640,7 @@ Module iter. Axiom ProvidedMethod_enumerate : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "enumerate" enumerate. - Definition peekable (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition peekable (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -634,7 +658,7 @@ Module iter. Axiom ProvidedMethod_peekable : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "peekable" peekable. - Definition skip_while (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition skip_while (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -653,7 +677,7 @@ Module iter. Axiom ProvidedMethod_skip_while : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "skip_while" skip_while. - Definition take_while (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_while (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -672,7 +696,7 @@ Module iter. Axiom ProvidedMethod_take_while : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "take_while" take_while. - Definition map_while (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_while (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; P ], [ self; predicate ] => ltac:(M.monadic @@ -691,7 +715,7 @@ Module iter. Axiom ProvidedMethod_map_while : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "map_while" map_while. - Definition skip (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition skip (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -710,7 +734,7 @@ Module iter. Axiom ProvidedMethod_skip : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "skip" skip. - Definition take (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -729,7 +753,7 @@ Module iter. Axiom ProvidedMethod_take : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "take" take. - Definition scan (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition scan (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ St; B; F ], [ self; initial_state; f ] => ltac:(M.monadic @@ -749,7 +773,7 @@ Module iter. Axiom ProvidedMethod_scan : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "scan" scan. - Definition flat_map (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition flat_map (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ U; F ], [ self; f ] => ltac:(M.monadic @@ -768,7 +792,7 @@ Module iter. Axiom ProvidedMethod_flat_map : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "flat_map" flat_map. - Definition flatten (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition flatten (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -786,7 +810,7 @@ Module iter. Axiom ProvidedMethod_flatten : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "flatten" flatten. - Definition map_windows (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_windows (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F; R ], [ self; f ] => ltac:(M.monadic @@ -805,7 +829,7 @@ Module iter. Axiom ProvidedMethod_map_windows : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "map_windows" map_windows. - Definition fuse (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fuse (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -823,7 +847,7 @@ Module iter. Axiom ProvidedMethod_fuse : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "fuse" fuse. - Definition inspect (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inspect (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; f ] => ltac:(M.monadic @@ -842,7 +866,7 @@ Module iter. Axiom ProvidedMethod_inspect : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "inspect" inspect. - Definition by_ref (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition by_ref (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -853,7 +877,7 @@ Module iter. Axiom ProvidedMethod_by_ref : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "by_ref" by_ref. - Definition collect (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition collect (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B ], [ self ] => ltac:(M.monadic @@ -873,7 +897,7 @@ Module iter. Axiom ProvidedMethod_collect : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "collect" collect. - Definition try_collect (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_collect (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B ], [ self ] => ltac:(M.monadic @@ -904,11 +928,13 @@ Module iter. ] |), [ - Value.StructTuple - "core::iter::adapters::by_ref_sized::ByRefSized" - [ M.read (| self |) ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::iter::adapters::by_ref_sized::ByRefSized" + [ A.to_value (M.read (| self |)) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -939,7 +965,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -947,7 +974,7 @@ Module iter. Axiom ProvidedMethod_try_collect : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "try_collect" try_collect. - Definition collect_into (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition collect_into (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ E ], [ self; collection ] => ltac:(M.monadic @@ -974,7 +1001,7 @@ Module iter. Axiom ProvidedMethod_collect_into : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "collect_into" collect_into. - Definition partition (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partition (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F ], [ self; f ] => ltac:(M.monadic @@ -1007,7 +1034,7 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "extend.partition", [] |), [ M.read (| f |); left; right ] @@ -1015,14 +1042,18 @@ Module iter. ] |) |) in - M.alloc (| Value.Tuple [ M.read (| left |); M.read (| right |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| left |)); A.to_value (M.read (| right |)) ] + |) + |) |))) | _, _ => M.impossible end. Axiom ProvidedMethod_partition : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "partition" partition. - Definition partition_in_place (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_in_place (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; P ], [ self; β1 ] => ltac:(M.monadic @@ -1035,12 +1066,12 @@ Module iter. ltac:(M.monadic (let predicate := M.alloc (| γ |) in M.read (| - let true_count := M.alloc (| Value.Integer Integer.Usize 0 |) in + let true_count := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1075,7 +1106,7 @@ Module iter. |) in let head := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1121,11 +1152,12 @@ Module iter. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1142,7 +1174,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1161,7 +1193,7 @@ Module iter. "core::iter::traits::iterator::Iterator" "partition_in_place" partition_in_place. - Definition is_partitioned (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_partitioned (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -1179,8 +1211,8 @@ Module iter. [ self; predicate ] |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Self, @@ -1189,7 +1221,8 @@ Module iter. [ P ] |), [ self; M.read (| predicate |) ] - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -1199,7 +1232,7 @@ Module iter. "core::iter::traits::iterator::Iterator" "is_partitioned" is_partitioned. - Definition try_fold (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F; R ], [ self; init; f ] => ltac:(M.monadic @@ -1214,7 +1247,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1263,8 +1296,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -1312,7 +1350,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1322,7 +1360,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1348,7 +1386,7 @@ Module iter. Axiom ProvidedMethod_try_fold : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "try_fold" try_fold. - Definition try_for_each (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_for_each (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F; R ], [ self; f ] => ltac:(M.monadic @@ -1364,7 +1402,7 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "call.try_for_each", [] |), [ M.read (| f |) ] @@ -1376,7 +1414,7 @@ Module iter. Axiom ProvidedMethod_try_for_each : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "try_for_each" try_for_each. - Definition fold (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F ], [ self; init; f ] => ltac:(M.monadic @@ -1389,7 +1427,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1424,10 +1462,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1437,7 +1484,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1451,7 +1498,7 @@ Module iter. Axiom ProvidedMethod_fold : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "fold" fold. - Definition reduce (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reduce (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; f ] => ltac:(M.monadic @@ -1534,20 +1581,23 @@ Module iter. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Self, - [], - "fold", - [ Ty.associated; F ] - |), - [ M.read (| self |); M.read (| first |); M.read (| f |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Self, + [], + "fold", + [ Ty.associated; F ] + |), + [ M.read (| self |); M.read (| first |); M.read (| f |) ] + |)) + ] + |) |) |))) |))) @@ -1556,7 +1606,7 @@ Module iter. Axiom ProvidedMethod_reduce : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "reduce" reduce. - Definition try_reduce (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_reduce (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F; R ], [ self; f ] => ltac:(M.monadic @@ -1605,7 +1655,11 @@ Module iter. "from_output", [] |), - [ Value.StructTuple "core::option::Option::None" [] ] + [ + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + ] |) |) |) @@ -1672,7 +1726,12 @@ Module iter. "from_output", [] |), - [ Value.StructTuple "core::option::Option::Some" [ M.read (| i |) ] + [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| i |)) ] + |) ] |) |))) @@ -1685,7 +1744,7 @@ Module iter. Axiom ProvidedMethod_try_reduce : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "try_reduce" try_reduce. - Definition all (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition all (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; f ] => ltac:(M.monadic @@ -1723,7 +1782,7 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "check.all", [] |), [ M.read (| f |) ] @@ -1732,9 +1791,11 @@ Module iter. |) |); M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) ] |))) @@ -1743,7 +1804,7 @@ Module iter. Axiom ProvidedMethod_all : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "all" all. - Definition any (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition any (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; f ] => ltac:(M.monadic @@ -1781,7 +1842,7 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "check.any", [] |), [ M.read (| f |) ] @@ -1790,9 +1851,11 @@ Module iter. |) |); M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |) ] |))) @@ -1801,7 +1864,7 @@ Module iter. Axiom ProvidedMethod_any : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "any" any. - Definition find (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -1832,7 +1895,7 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "check.find", [] |), [ M.read (| predicate |) ] @@ -1846,7 +1909,7 @@ Module iter. Axiom ProvidedMethod_find : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "find" find. - Definition find_map (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find_map (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F ], [ self; f ] => ltac:(M.monadic @@ -1873,7 +1936,7 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "check.find_map", [] |), [ M.read (| f |) ] @@ -1887,7 +1950,7 @@ Module iter. Axiom ProvidedMethod_find_map : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "find_map" find_map. - Definition try_find (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_find (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F; R ], [ self; f ] => ltac:(M.monadic @@ -1912,7 +1975,7 @@ Module iter. |), [ M.read (| self |); - Value.Tuple []; + M.of_value (| Value.Tuple [] |); M.call_closure (| M.get_associated_function (| Self, "check.try_find", [] |), [ M.read (| f |) ] @@ -1948,7 +2011,7 @@ Module iter. "from_output", [] |), - [ Value.StructTuple "core::option::Option::None" [] ] + [ M.of_value (| Value.StructTuple "core::option::Option::None" [] |) ] |) |))) ] @@ -1959,7 +2022,7 @@ Module iter. Axiom ProvidedMethod_try_find : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "try_find" try_find. - Definition position (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition position (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -1990,7 +2053,7 @@ Module iter. |), [ M.read (| self |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.call_closure (| M.get_associated_function (| Self, "check.position", [] |), [ M.read (| predicate |) ] @@ -2004,7 +2067,7 @@ Module iter. Axiom ProvidedMethod_position : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "position" position. - Definition rposition (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rposition (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -2066,7 +2129,7 @@ Module iter. Axiom ProvidedMethod_rposition : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "rposition" rposition. - Definition max (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2096,7 +2159,7 @@ Module iter. Axiom ProvidedMethod_max : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "max" max. - Definition min (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2126,7 +2189,7 @@ Module iter. Axiom ProvidedMethod_min : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "min" min. - Definition max_by_key (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max_by_key (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F ], [ self; f ] => ltac:(M.monadic @@ -2242,7 +2305,11 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let x := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))) ] |) @@ -2253,7 +2320,7 @@ Module iter. Axiom ProvidedMethod_max_by_key : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "max_by_key" max_by_key. - Definition max_by (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition max_by (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; compare ] => ltac:(M.monadic @@ -2280,7 +2347,7 @@ Module iter. Axiom ProvidedMethod_max_by : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "max_by" max_by. - Definition min_by_key (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min_by_key (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; F ], [ self; f ] => ltac:(M.monadic @@ -2396,7 +2463,11 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let x := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))) ] |) @@ -2407,7 +2478,7 @@ Module iter. Axiom ProvidedMethod_min_by_key : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "min_by_key" min_by_key. - Definition min_by (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition min_by (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; compare ] => ltac:(M.monadic @@ -2434,7 +2505,7 @@ Module iter. Axiom ProvidedMethod_min_by : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "min_by" min_by. - Definition rev (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rev (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2452,7 +2523,7 @@ Module iter. Axiom ProvidedMethod_rev : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "rev" rev. - Definition unzip (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unzip (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A; B; FromA; FromB ], [ self ] => ltac:(M.monadic @@ -2491,7 +2562,7 @@ Module iter. Axiom ProvidedMethod_unzip : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "unzip" unzip. - Definition copied (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copied (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -2509,7 +2580,7 @@ Module iter. Axiom ProvidedMethod_copied : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "copied" copied. - Definition cloned (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cloned (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self ] => ltac:(M.monadic @@ -2527,7 +2598,7 @@ Module iter. Axiom ProvidedMethod_cloned : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "cloned" cloned. - Definition cycle (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cycle (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2545,7 +2616,7 @@ Module iter. Axiom ProvidedMethod_cycle : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "cycle" cycle. - Definition array_chunks (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition array_chunks (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2563,7 +2634,7 @@ Module iter. Axiom ProvidedMethod_array_chunks : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "array_chunks" array_chunks. - Definition sum (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as S ], [ self ] => ltac:(M.monadic @@ -2583,7 +2654,7 @@ Module iter. Axiom ProvidedMethod_sum : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "sum" sum. - Definition product (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition product (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self ] => ltac:(M.monadic @@ -2603,7 +2674,7 @@ Module iter. Axiom ProvidedMethod_product : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "product" product. - Definition cmp (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; other ] => ltac:(M.monadic @@ -2625,8 +2696,8 @@ Module iter. [ M.read (| self |); M.read (| other |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2657,7 +2728,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2665,7 +2737,7 @@ Module iter. Axiom ProvidedMethod_cmp : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "cmp" cmp. - Definition cmp_by (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp_by (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I; F ], [ self; other; cmp ] => ltac:(M.monadic @@ -2728,7 +2800,7 @@ Module iter. Axiom ProvidedMethod_cmp_by : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "cmp_by" cmp_by. - Definition partial_cmp (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; other ] => ltac:(M.monadic @@ -2750,8 +2822,8 @@ Module iter. [ M.read (| self |); M.read (| other |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2782,7 +2854,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2790,7 +2863,7 @@ Module iter. Axiom ProvidedMethod_partial_cmp : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "partial_cmp" partial_cmp. - Definition partial_cmp_by (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp_by (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I; F ], [ self; other; partial_cmp ] => ltac:(M.monadic @@ -2842,7 +2915,11 @@ Module iter. |) in let ord := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| ord |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| ord |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -2865,7 +2942,7 @@ Module iter. "core::iter::traits::iterator::Iterator" "partial_cmp_by" partial_cmp_by. - Definition eq (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; other ] => ltac:(M.monadic @@ -2882,8 +2959,8 @@ Module iter. [ M.read (| self |); M.read (| other |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2914,7 +2991,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2922,7 +3000,7 @@ Module iter. Axiom ProvidedMethod_eq : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "eq" eq. - Definition eq_by (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq_by (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I; F ], [ self; other; eq ] => ltac:(M.monadic @@ -2975,7 +3053,12 @@ Module iter. "eq", [] |), - [ ord; M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) ] + [ + ord; + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |) + ] |) |))); fun γ => @@ -2986,7 +3069,7 @@ Module iter. "core::ops::control_flow::ControlFlow::Break", 0 |) in - M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -2995,14 +3078,14 @@ Module iter. Axiom ProvidedMethod_eq_by : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "eq_by" eq_by. - Definition ne (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Self, @@ -3011,13 +3094,14 @@ Module iter. [ I ] |), [ M.read (| self |); M.read (| other |) ] - |)))) + |) + |))) | _, _ => M.impossible end. Axiom ProvidedMethod_ne : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "ne" ne. - Definition lt (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; other ] => ltac:(M.monadic @@ -3045,9 +3129,14 @@ Module iter. |) |); M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Less" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |)) + ] + |) |) ] |))) @@ -3056,7 +3145,7 @@ Module iter. Axiom ProvidedMethod_lt : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "lt" lt. - Definition le (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; other ] => ltac:(M.monadic @@ -3088,18 +3177,19 @@ Module iter. M.find_or_pattern (| γ0_0, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -3108,7 +3198,7 @@ Module iter. Axiom ProvidedMethod_le : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "le" le. - Definition gt (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; other ] => ltac:(M.monadic @@ -3136,9 +3226,14 @@ Module iter. |) |); M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Greater" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |)) + ] + |) |) ] |))) @@ -3147,7 +3242,7 @@ Module iter. Axiom ProvidedMethod_gt : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "gt" gt. - Definition ge (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; other ] => ltac:(M.monadic @@ -3179,18 +3274,19 @@ Module iter. M.find_or_pattern (| γ0_0, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -3199,7 +3295,7 @@ Module iter. Axiom ProvidedMethod_ge : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "ge" ge. - Definition is_sorted (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sorted (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3235,7 +3331,7 @@ Module iter. Axiom ProvidedMethod_is_sorted : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "is_sorted" is_sorted. - Definition is_sorted_by (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sorted_by (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; compare ] => ltac:(M.monadic @@ -3273,7 +3369,9 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool true |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool true |) |) |) + |) |))) ] |) @@ -3303,7 +3401,7 @@ Module iter. Axiom ProvidedMethod_is_sorted_by : M.IsProvidedMethod "core::iter::traits::iterator::Iterator" "is_sorted_by" is_sorted_by. - Definition is_sorted_by_key (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sorted_by_key (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F; K ], [ self; f ] => ltac:(M.monadic @@ -3338,7 +3436,7 @@ Module iter. "core::iter::traits::iterator::Iterator" "is_sorted_by_key" is_sorted_by_key. - Definition __iterator_get_unchecked (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _idx ] => ltac:(M.monadic @@ -3352,19 +3450,25 @@ Module iter. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "internal error: entered unreachable code: Always specialized" - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: Always specialized" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -3373,7 +3477,8 @@ Module iter. |), [] |) - |)) + |) + |) ] |) ] @@ -3419,7 +3524,7 @@ Module iter. } } *) - Definition iter_compare (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_compare (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A; B; F; T ], [ a; b; f ] => ltac:(M.monadic @@ -3469,44 +3574,51 @@ Module iter. 0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ - M.read (| - M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - B, - [], - "next", - [] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + B, + [], + "next", + [] + |), + [ b ] + |) |), - [ b ] + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + M.alloc (| + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) + |))) + ] |) - |), - [ - fun γ => - ltac:(M.monadic - (M.alloc (| - Value.StructTuple "core::cmp::Ordering::Equal" [] - |))); - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_struct_tuple_field (| - γ, - "core::option::Option::Some", - 0 - |) in - M.alloc (| - Value.StructTuple "core::cmp::Ordering::Less" [] - |))) - ] - |) - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3539,14 +3651,14 @@ Module iter. } } *) - Definition compare (τ : list Ty.t) (α : list Value.t) : M := + Definition compare (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ B; X; T; impl_FnMut_X__B_Item__arrow_ControlFlow_T___plus__'a ], [ b; f ] => ltac:(M.monadic (let b := M.alloc (| b |) in let f := M.alloc (| f |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3574,17 +3686,25 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ - Value.StructTuple - "core::cmp::Ordering::Greater" - [] - ] - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3622,11 +3742,20 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| x |); M.read (| y |) ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| x |)); + A.to_value (M.read (| y |)) + ] + |) ] |); - M.constructor_as_closure + M.constructor_as_closure (| "core::ops::control_flow::ControlFlow::Break" + |) ] |) |))) @@ -3636,7 +3765,8 @@ Module iter. ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -3656,7 +3786,7 @@ Module iter. ( **self).next() } *) - Definition next (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -3680,7 +3810,7 @@ Module iter. ( **self).size_hint() } *) - Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self ] => @@ -3704,7 +3834,7 @@ Module iter. ( **self).advance_by(n) } *) - Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -3729,7 +3859,7 @@ Module iter. ( **self).nth(n) } *) - Definition nth (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; n ] => @@ -3751,7 +3881,7 @@ Module iter. self.spec_fold(init, f) } *) - Definition fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -3781,7 +3911,7 @@ Module iter. self.spec_try_fold(init, f) } *) - Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -3838,7 +3968,7 @@ Module iter. accum } *) - Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F ], [ self; init; f ] => @@ -3852,7 +3982,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3887,10 +4017,19 @@ Module iter. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3900,7 +4039,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -3925,7 +4064,7 @@ Module iter. try { accum } } *) - Definition spec_try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => @@ -3941,7 +4080,7 @@ Module iter. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3990,8 +4129,13 @@ Module iter. |), [ f; - Value.Tuple - [ M.read (| accum |); M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| accum |)); + A.to_value (M.read (| x |)) + ] + |) ] |) ] @@ -4039,7 +4183,7 @@ Module iter. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4049,7 +4193,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4099,7 +4243,7 @@ Module iter. self.$try_fold(init, NeverShortCircuit::wrap_mut_2(fold)).0 } *) - Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ AAA; FFF ], [ self; init; fold ] => @@ -4152,7 +4296,7 @@ Module iter. ( **self).try_fold(init, f) } *) - Definition spec_try_fold (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_try_fold (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [ B; F; R ], [ self; init; f ] => diff --git a/CoqOfRust/core/iter/traits/unchecked_iterator.v b/CoqOfRust/core/iter/traits/unchecked_iterator.v index c812d1d73..ec1bf0d8e 100644 --- a/CoqOfRust/core/iter/traits/unchecked_iterator.v +++ b/CoqOfRust/core/iter/traits/unchecked_iterator.v @@ -6,7 +6,7 @@ Module iter. Module unchecked_iterator. (* Trait *) Module UncheckedIterator. - Definition next_unchecked (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/core/marker.v b/CoqOfRust/core/marker.v index e6da7c389..1106c2488 100644 --- a/CoqOfRust/core/marker.v +++ b/CoqOfRust/core/marker.v @@ -741,14 +741,17 @@ Module marker. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::marker::PhantomData") [ T ]. (* fn hash(&self, _: &mut H) {} *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ H ], [ self; β1 ] => ltac:(M.monadic (let self := M.alloc (| self |) in let β1 := M.alloc (| β1 |) in - M.match_operator (| β1, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| + β1, + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. @@ -769,14 +772,14 @@ Module marker. true } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; _other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _other := M.alloc (| _other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -805,16 +808,18 @@ Module marker. Option::Some(cmp::Ordering::Equal) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; _other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _other := M.alloc (| _other |) in - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Equal" [] ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |)) ] + |))) | _, _ => M.impossible end. @@ -835,14 +840,14 @@ Module marker. cmp::Ordering::Equal } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; _other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let _other := M.alloc (| _other |) in - Value.StructTuple "core::cmp::Ordering::Equal" [])) + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))) | _, _ => M.impossible end. @@ -875,13 +880,15 @@ Module marker. Self } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| (* Expected a function name *) M.alloc (| Value.Tuple [] |) |))) + M.read (| + (* Expected a function name *) M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) | _, _ => M.impossible end. @@ -902,11 +909,14 @@ Module marker. Self } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => - ltac:(M.monadic (M.read (| (* Expected a function name *) M.alloc (| Value.Tuple [] |) |))) + ltac:(M.monadic + (M.read (| + (* Expected a function name *) M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) | _, _ => M.impossible end. @@ -1035,7 +1045,7 @@ Module marker. Definition Self : Ty.t := Ty.path "core::marker::PhantomPinned". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1043,7 +1053,7 @@ Module marker. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "PhantomPinned" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "PhantomPinned" |) |) ] |))) | _, _ => M.impossible end. @@ -1060,9 +1070,10 @@ Module marker. Definition Self : Ty.t := Ty.path "core::marker::PhantomPinned". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "core::marker::PhantomPinned" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "core::marker::PhantomPinned" [] |))) | _, _ => M.impossible end. @@ -1089,7 +1100,7 @@ Module marker. Definition Self : Ty.t := Ty.path "core::marker::PhantomPinned". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1121,12 +1132,12 @@ Module marker. Definition Self : Ty.t := Ty.path "core::marker::PhantomPinned". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -1154,13 +1165,13 @@ Module marker. Definition Self : Ty.t := Ty.path "core::marker::PhantomPinned". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -1176,13 +1187,13 @@ Module marker. Definition Self : Ty.t := Ty.path "core::marker::PhantomPinned". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple "core::cmp::Ordering::Equal" [])) + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))) | _, _ => M.impossible end. @@ -1198,15 +1209,17 @@ Module marker. Definition Self : Ty.t := Ty.path "core::marker::PhantomPinned". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Equal" [] ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |)) ] + |))) | _, _ => M.impossible end. @@ -1222,13 +1235,13 @@ Module marker. Definition Self : Ty.t := Ty.path "core::marker::PhantomPinned". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic (let self := M.alloc (| self |) in let state := M.alloc (| state |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/mem/manually_drop.v b/CoqOfRust/core/mem/manually_drop.v index 8ab388a9b..09f1f120e 100644 --- a/CoqOfRust/core/mem/manually_drop.v +++ b/CoqOfRust/core/mem/manually_drop.v @@ -28,27 +28,30 @@ Module mem. Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::mem::manually_drop::ManuallyDrop" - [ - ("value", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::mem::manually_drop::ManuallyDrop", - "value" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::mem::manually_drop::ManuallyDrop" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::mem::manually_drop::ManuallyDrop", + "value" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -66,7 +69,7 @@ Module mem. Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -81,17 +84,18 @@ Module mem. |), [ M.read (| f |); - M.read (| Value.String "ManuallyDrop" |); - M.read (| Value.String "value" |); + M.read (| M.of_value (| Value.String "ManuallyDrop" |) |); + M.read (| M.of_value (| Value.String "value" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::mem::manually_drop::ManuallyDrop", "value" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -111,20 +115,23 @@ Module mem. Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ]. (* Default *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::mem::manually_drop::ManuallyDrop" - [ - ("value", - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::mem::manually_drop::ManuallyDrop" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -155,7 +162,7 @@ Module mem. Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ]. (* PartialEq *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -207,7 +214,7 @@ Module mem. Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ]. (* Eq *) - Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -215,8 +222,8 @@ Module mem. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -237,7 +244,7 @@ Module mem. Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ]. (* PartialOrd *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -276,7 +283,7 @@ Module mem. Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ]. (* Ord *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -315,7 +322,7 @@ Module mem. Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ]. (* Hash *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ __H ], [ self; state ] => @@ -354,15 +361,17 @@ Module mem. ManuallyDrop { value } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "core::mem::manually_drop::ManuallyDrop" - [ ("value", M.read (| value |)) ])) + M.of_value (| + Value.StructRecord + "core::mem::manually_drop::ManuallyDrop" + [ ("value", A.to_value (M.read (| value |))) ] + |))) | _, _ => M.impossible end. @@ -375,7 +384,7 @@ Module mem. slot.value } *) - Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slot ] => @@ -402,7 +411,7 @@ Module mem. unsafe { ptr::read(&slot.value) } } *) - Definition take (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slot ] => @@ -432,7 +441,7 @@ Module mem. unsafe { ptr::drop_in_place(&mut slot.value) } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slot ] => @@ -469,7 +478,7 @@ Module mem. &self.value } *) - Definition deref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -502,7 +511,7 @@ Module mem. &mut self.value } *) - Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/mem/maybe_uninit.v b/CoqOfRust/core/mem/maybe_uninit.v index be7d34f7b..f25ad3196 100644 --- a/CoqOfRust/core/mem/maybe_uninit.v +++ b/CoqOfRust/core/mem/maybe_uninit.v @@ -28,7 +28,7 @@ Module mem. *self } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -56,7 +56,7 @@ Module mem. f.pad(type_name::()) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -97,25 +97,28 @@ Module mem. MaybeUninit { value: ManuallyDrop::new(val) } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in - Value.StructRecord - "core::mem::maybe_uninit::MaybeUninit" - [ - ("value", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ], - "new", - [] - |), - [ M.read (| val |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::mem::maybe_uninit::MaybeUninit" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ], + "new", + [] + |), + [ M.read (| val |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -128,14 +131,16 @@ Module mem. MaybeUninit { uninit: () } } *) - Definition uninit (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition uninit (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::mem::maybe_uninit::MaybeUninit" - [ ("uninit", Value.Tuple []) ])) + (M.of_value (| + Value.StructRecord + "core::mem::maybe_uninit::MaybeUninit" + [ ("uninit", A.to_value (M.of_value (| Value.Tuple [] |))) ] + |))) | _, _ => M.impossible end. @@ -149,7 +154,7 @@ Module mem. unsafe { MaybeUninit::<[MaybeUninit; N]>::uninit().assume_init() } } *) - Definition uninit_array (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition uninit_array (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -198,7 +203,7 @@ Module mem. u } *) - Definition zeroed (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition zeroed (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -232,8 +237,8 @@ Module mem. |), [ u ] |); - Value.Integer Integer.U8 0; - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -253,7 +258,7 @@ Module mem. unsafe { self.assume_init_mut() } } *) - Definition write (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val ] => @@ -297,13 +302,13 @@ Module mem. self as *const _ as *const T } *) - Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |))) | _, _ => M.impossible end. @@ -317,13 +322,13 @@ Module mem. self as *mut _ as *mut T } *) - Definition as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |))) | _, _ => M.impossible end. @@ -341,7 +346,7 @@ Module mem. } } *) - Definition assume_init (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -391,7 +396,7 @@ Module mem. } } *) - Definition assume_init_read (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init_read (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -436,7 +441,7 @@ Module mem. unsafe { ptr::drop_in_place(self.as_mut_ptr()) } } *) - Definition assume_init_drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init_drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -472,7 +477,7 @@ Module mem. } } *) - Definition assume_init_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -514,7 +519,7 @@ Module mem. } } *) - Definition assume_init_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assume_init_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -559,7 +564,7 @@ Module mem. } } *) - Definition array_assume_init (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition array_assume_init (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -607,13 +612,13 @@ Module mem. unsafe { &*(slice as *const [Self] as *const [T]) } } *) - Definition slice_assume_init_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_assume_init_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| slice |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| slice |) |)) |) |))) | _, _ => M.impossible end. @@ -628,13 +633,13 @@ Module mem. unsafe { &mut *(slice as *mut [Self] as *mut [T]) } } *) - Definition slice_assume_init_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_assume_init_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| slice |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| slice |) |)) |) |))) | _, _ => M.impossible end. @@ -647,14 +652,14 @@ Module mem. this.as_ptr() as *const T } *) - Definition slice_as_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_as_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -663,7 +668,8 @@ Module mem. [] |), [ M.read (| this |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -676,14 +682,14 @@ Module mem. this.as_mut_ptr() as *mut T } *) - Definition slice_as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -692,7 +698,8 @@ Module mem. [] |), [ M.read (| this |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -714,7 +721,7 @@ Module mem. unsafe { MaybeUninit::slice_assume_init_mut(this) } } *) - Definition write_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this; src ] => @@ -817,7 +824,7 @@ Module mem. unsafe { MaybeUninit::slice_assume_init_mut(this) } } *) - Definition write_slice_cloned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_slice_cloned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this; src ] => @@ -828,31 +835,39 @@ Module mem. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ], - "len", - [] - |), - [ M.read (| this |) ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| src |) ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ], + "len", + [] + |), + [ M.read (| this |) ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| src |) ] + |) + |)) + ] + |) |), [ fun γ => @@ -862,17 +877,19 @@ Module mem. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -884,7 +901,9 @@ Module mem. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -896,37 +915,47 @@ Module mem. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::Arguments", - "new_const", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "destination and source slices have different lengths" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "destination and source slices have different lengths" + |) + |)) + ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -956,15 +985,24 @@ Module mem. |), [ M.read (| src |); - Value.StructRecord "core::ops::range::RangeTo" [ ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| len |))) ] + |) ] |) |) in let guard := M.alloc (| - Value.StructRecord - "core::mem::maybe_uninit::write_slice_cloned::Guard" - [ ("slice", M.read (| this |)); ("initialized", Value.Integer Integer.Usize 0) ] + M.of_value (| + Value.StructRecord + "core::mem::maybe_uninit::write_slice_cloned::Guard" + [ + ("slice", A.to_value (M.read (| this |))); + ("initialized", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let _ := M.use @@ -979,9 +1017,14 @@ Module mem. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.Usize 0); ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) ] |) |), @@ -1071,14 +1114,15 @@ Module mem. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -1122,7 +1166,7 @@ Module mem. } } *) - Definition as_bytes (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1134,15 +1178,16 @@ Module mem. [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ] ] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], "as_ptr", [] |), [ M.read (| self |) ] - |)); + |) + |); M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |) ] |))) @@ -1164,7 +1209,7 @@ Module mem. } } *) - Definition as_bytes_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1176,15 +1221,16 @@ Module mem. [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ] ] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], "as_mut_ptr", [] |), [ M.read (| self |) ] - |)); + |) + |); M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |) ] |))) @@ -1202,7 +1248,7 @@ Module mem. unsafe { slice::from_raw_parts(this.as_ptr() as *const MaybeUninit, bytes) } } *) - Definition slice_as_bytes (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_as_bytes (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this ] => @@ -1230,8 +1276,8 @@ Module mem. [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ] ] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1240,7 +1286,8 @@ Module mem. [] |), [ M.read (| this |) ] - |)); + |) + |); M.read (| bytes |) ] |) @@ -1260,7 +1307,7 @@ Module mem. unsafe { slice::from_raw_parts_mut(this.as_mut_ptr() as *mut MaybeUninit, bytes) } } *) - Definition slice_as_bytes_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_as_bytes_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this ] => @@ -1288,8 +1335,8 @@ Module mem. [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ] ] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1298,7 +1345,8 @@ Module mem. [] |), [ M.read (| this |) ] - |)); + |) + |); M.read (| bytes |) ] |) @@ -1324,7 +1372,7 @@ Module mem. unsafe { intrinsics::transmute_unchecked(self) } } *) - Definition transpose (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition transpose (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1364,7 +1412,7 @@ Module mem. unsafe { intrinsics::transmute_unchecked(self) } } *) - Definition transpose (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition transpose (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/mem/mod.v b/CoqOfRust/core/mem/mod.v index 87a62ffc1..d37bf078c 100644 --- a/CoqOfRust/core/mem/mod.v +++ b/CoqOfRust/core/mem/mod.v @@ -7,7 +7,7 @@ Module mem. let _ = ManuallyDrop::new(t); } *) - Definition forget (τ : list Ty.t) (α : list Value.t) : M := + Definition forget (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -24,7 +24,7 @@ Module mem. [ M.read (| t |) ] |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -35,7 +35,7 @@ Module mem. intrinsics::forget(t) } *) - Definition forget_unsized (τ : list Ty.t) (α : list Value.t) : M := + Definition forget_unsized (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -52,7 +52,7 @@ Module mem. intrinsics::size_of::() } *) - Definition size_of (τ : list Ty.t) (α : list Value.t) : M := + Definition size_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -66,7 +66,7 @@ Module mem. unsafe { intrinsics::size_of_val(val) } } *) - Definition size_of_val (τ : list Ty.t) (α : list Value.t) : M := + Definition size_of_val (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ val ] => ltac:(M.monadic @@ -84,7 +84,7 @@ Module mem. unsafe { intrinsics::size_of_val(val) } } *) - Definition size_of_val_raw (τ : list Ty.t) (α : list Value.t) : M := + Definition size_of_val_raw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ val ] => ltac:(M.monadic @@ -101,7 +101,7 @@ Module mem. intrinsics::min_align_of::() } *) - Definition min_align_of (τ : list Ty.t) (α : list Value.t) : M := + Definition min_align_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -115,7 +115,7 @@ Module mem. unsafe { intrinsics::min_align_of_val(val) } } *) - Definition min_align_of_val (τ : list Ty.t) (α : list Value.t) : M := + Definition min_align_of_val (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ val ] => ltac:(M.monadic @@ -132,7 +132,7 @@ Module mem. intrinsics::min_align_of::() } *) - Definition align_of (τ : list Ty.t) (α : list Value.t) : M := + Definition align_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -146,7 +146,7 @@ Module mem. unsafe { intrinsics::min_align_of_val(val) } } *) - Definition align_of_val (τ : list Ty.t) (α : list Value.t) : M := + Definition align_of_val (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ val ] => ltac:(M.monadic @@ -164,7 +164,7 @@ Module mem. unsafe { intrinsics::min_align_of_val(val) } } *) - Definition align_of_val_raw (τ : list Ty.t) (α : list Value.t) : M := + Definition align_of_val_raw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ val ] => ltac:(M.monadic @@ -181,7 +181,7 @@ Module mem. intrinsics::needs_drop::() } *) - Definition needs_drop (τ : list Ty.t) (α : list Value.t) : M := + Definition needs_drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -198,7 +198,7 @@ Module mem. } } *) - Definition zeroed (τ : list Ty.t) (α : list Value.t) : M := + Definition zeroed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -250,7 +250,7 @@ Module mem. } } *) - Definition uninitialized (τ : list Ty.t) (α : list Value.t) : M := + Definition uninitialized (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -275,11 +275,12 @@ Module mem. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| UnOp.Pure.not (Value.Bool false) |)) in + (let γ := + M.use (M.alloc (| UnOp.Pure.not (| M.of_value (| Value.Bool false |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -298,13 +299,13 @@ Module mem. |), [ val ] |); - Value.Integer Integer.U8 1; - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -350,7 +351,7 @@ Module mem. swap_simple(x, y); } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x; y ] => ltac:(M.monadic @@ -361,15 +362,16 @@ Module mem. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (BinOp.Panic.div (| + BinOp.Pure.gt (| + BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] @@ -378,8 +380,9 @@ Module mem. M.get_function (| "core::mem::align_of", [ T ] |), [] |) - |)) - (Value.Integer Integer.Usize 4) + |), + M.of_value (| Value.Integer 4 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -389,13 +392,14 @@ Module mem. M.return_ (| M.call_closure (| M.get_function (| "core::ptr::swap_nonoverlapping", [ T ] |), - [ M.read (| x |); M.read (| y |); Value.Integer Integer.Usize 1 ] + [ M.read (| x |); M.read (| y |); M.of_value (| Value.Integer 1 |) + ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -405,7 +409,7 @@ Module mem. [ M.read (| x |); M.read (| y |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -439,7 +443,7 @@ Module mem. } } *) - Definition swap_simple (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_simple (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x; y ] => ltac:(M.monadic @@ -468,7 +472,7 @@ Module mem. [ M.read (| y |); M.read (| a |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -478,7 +482,7 @@ Module mem. replace(dest, T::default()) } *) - Definition take (τ : list Ty.t) (α : list Value.t) : M := + Definition take (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dest ] => ltac:(M.monadic @@ -512,7 +516,7 @@ Module mem. } } *) - Definition replace (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dest; src ] => ltac:(M.monadic @@ -539,12 +543,12 @@ Module mem. end. (* pub fn drop(_x: T) {} *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ _x ] => ltac:(M.monadic (let _x := M.alloc (| _x |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -553,7 +557,7 @@ Module mem. *x } *) - Definition copy (τ : list Ty.t) (α : list Value.t) : M := + Definition copy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -582,7 +586,7 @@ Module mem. } } *) - Definition transmute_copy (τ : list Ty.t) (α : list Value.t) : M := + Definition transmute_copy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Src; Dst ], [ src ] => ltac:(M.monadic @@ -590,23 +594,25 @@ Module mem. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ Src ] |), [] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_function (| "core::mem::size_of", [ Dst ] |), [] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -622,48 +628,55 @@ Module mem. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "cannot transmute_copy if Dst is larger than Src" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "cannot transmute_copy if Dst is larger than Src" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_function (| "core::mem::align_of", [ Dst ] |), [] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_function (| "core::mem::align_of", [ Src ] |), [] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read_unaligned", [ Dst ] |), - [ M.rust_cast (M.read (| M.use (M.alloc (| M.read (| src |) |)) |)) ] + [ M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| src |) |)) |) |) ] |) |))); fun γ => @@ -671,7 +684,7 @@ Module mem. (M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ Dst ] |), - [ M.rust_cast (M.read (| M.use (M.alloc (| M.read (| src |) |)) |)) ] + [ M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| src |) |)) |) |) ] |) |))) ] @@ -707,7 +720,7 @@ Module mem. *self } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -734,7 +747,7 @@ Module mem. self.0 == rhs.0 } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; rhs ] => @@ -790,7 +803,7 @@ Module mem. self.0.hash(state); } *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ H ], [ self; state ] => @@ -812,7 +825,7 @@ Module mem. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -834,7 +847,7 @@ Module mem. fmt.debug_tuple("Discriminant").field(&self.0).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; fmt ] => @@ -858,16 +871,18 @@ Module mem. "debug_tuple", [] |), - [ M.read (| fmt |); M.read (| Value.String "Discriminant" |) ] + [ M.read (| fmt |); M.read (| M.of_value (| Value.String "Discriminant" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::mem::Discriminant", 0 - |)) + |) + |) ] |) ] @@ -889,19 +904,22 @@ Module mem. Discriminant(intrinsics::discriminant_value(v)) } *) - Definition discriminant (τ : list Ty.t) (α : list Value.t) : M := + Definition discriminant (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructTuple - "core::mem::Discriminant" - [ - M.call_closure (| - M.get_function (| "core::intrinsics::discriminant_value", [ T ] |), - [ M.read (| v |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::mem::Discriminant" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::intrinsics::discriminant_value", [ T ] |), + [ M.read (| v |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -910,7 +928,7 @@ Module mem. intrinsics::variant_count::() } *) - Definition variant_count (τ : list Ty.t) (α : list Value.t) : M := + Definition variant_count (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic diff --git a/CoqOfRust/core/mem/transmutability.v b/CoqOfRust/core/mem/transmutability.v index 54e3a668a..6df384f26 100644 --- a/CoqOfRust/core/mem/transmutability.v +++ b/CoqOfRust/core/mem/transmutability.v @@ -34,7 +34,7 @@ Module mem. Definition Self : Ty.t := Ty.path "core::mem::transmutability::Assume". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -43,71 +43,75 @@ Module mem. LogicalOp.and (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::mem::transmutability::Assume", "alignment" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::mem::transmutability::Assume", "alignment" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::mem::transmutability::Assume", "lifetimes" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::mem::transmutability::Assume", "lifetimes" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::mem::transmutability::Assume", "safety" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::mem::transmutability::Assume", "safety" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::mem::transmutability::Assume", "validity" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::mem::transmutability::Assume", "validity" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -135,15 +139,15 @@ Module mem. Definition Self : Ty.t := Ty.path "core::mem::transmutability::Assume". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -162,14 +166,14 @@ Module mem. Definition Self : Ty.t := Ty.path "core::mem::transmutability::Assume". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -199,7 +203,7 @@ Module mem. Definition Self : Ty.t := Ty.path "core::mem::transmutability::Assume". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -213,41 +217,45 @@ Module mem. |), [ M.read (| f |); - M.read (| Value.String "Assume" |); - M.read (| Value.String "alignment" |); + M.read (| M.of_value (| Value.String "Assume" |) |); + M.read (| M.of_value (| Value.String "alignment" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::mem::transmutability::Assume", "alignment" - |)); - M.read (| Value.String "lifetimes" |); + |) + |); + M.read (| M.of_value (| Value.String "lifetimes" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::mem::transmutability::Assume", "lifetimes" - |)); - M.read (| Value.String "safety" |); + |) + |); + M.read (| M.of_value (| Value.String "safety" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::mem::transmutability::Assume", "safety" - |)); - M.read (| Value.String "validity" |); + |) + |); + M.read (| M.of_value (| Value.String "validity" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::mem::transmutability::Assume", "validity" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -280,18 +288,20 @@ Module mem. Self { alignment: false, lifetimes: false, safety: false, validity: false }; *) (* Ty.path "core::mem::transmutability::Assume" *) - Definition value_NOTHING : Value.t := + Definition value_NOTHING : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructRecord - "core::mem::transmutability::Assume" - [ - ("alignment", Value.Bool false); - ("lifetimes", Value.Bool false); - ("safety", Value.Bool false); - ("validity", Value.Bool false) - ] + M.of_value (| + Value.StructRecord + "core::mem::transmutability::Assume" + [ + ("alignment", A.to_value (M.of_value (| Value.Bool false |))); + ("lifetimes", A.to_value (M.of_value (| Value.Bool false |))); + ("safety", A.to_value (M.of_value (| Value.Bool false |))); + ("validity", A.to_value (M.of_value (| Value.Bool false |))) + ] + |) |))). Axiom AssociatedConstant_value_NOTHING : @@ -299,13 +309,15 @@ Module mem. (* pub const ALIGNMENT: Self = Self { alignment: true, ..Self::NOTHING }; *) (* Ty.path "core::mem::transmutability::Assume" *) - Definition value_ALIGNMENT : Value.t := + Definition value_ALIGNMENT : A.t := M.run ltac:(M.monadic (M.alloc (| - M.struct_record_update - (M.read (| M.get_constant (| "core::mem::transmutability::NOTHING" |) |)) - [ ("alignment", Value.Bool true) ] + M.of_value (| + M.struct_record_update + (M.read (| M.get_constant (| "core::mem::transmutability::NOTHING" |) |)) + [ ("alignment", A.to_value (M.of_value (| Value.Bool true |))) ] + |) |))). Axiom AssociatedConstant_value_ALIGNMENT : @@ -313,13 +325,15 @@ Module mem. (* pub const LIFETIMES: Self = Self { lifetimes: true, ..Self::NOTHING }; *) (* Ty.path "core::mem::transmutability::Assume" *) - Definition value_LIFETIMES : Value.t := + Definition value_LIFETIMES : A.t := M.run ltac:(M.monadic (M.alloc (| - M.struct_record_update - (M.read (| M.get_constant (| "core::mem::transmutability::NOTHING" |) |)) - [ ("lifetimes", Value.Bool true) ] + M.of_value (| + M.struct_record_update + (M.read (| M.get_constant (| "core::mem::transmutability::NOTHING" |) |)) + [ ("lifetimes", A.to_value (M.of_value (| Value.Bool true |))) ] + |) |))). Axiom AssociatedConstant_value_LIFETIMES : @@ -327,13 +341,15 @@ Module mem. (* pub const SAFETY: Self = Self { safety: true, ..Self::NOTHING }; *) (* Ty.path "core::mem::transmutability::Assume" *) - Definition value_SAFETY : Value.t := + Definition value_SAFETY : A.t := M.run ltac:(M.monadic (M.alloc (| - M.struct_record_update - (M.read (| M.get_constant (| "core::mem::transmutability::NOTHING" |) |)) - [ ("safety", Value.Bool true) ] + M.of_value (| + M.struct_record_update + (M.read (| M.get_constant (| "core::mem::transmutability::NOTHING" |) |)) + [ ("safety", A.to_value (M.of_value (| Value.Bool true |))) ] + |) |))). Axiom AssociatedConstant_value_SAFETY : @@ -341,13 +357,15 @@ Module mem. (* pub const VALIDITY: Self = Self { validity: true, ..Self::NOTHING }; *) (* Ty.path "core::mem::transmutability::Assume" *) - Definition value_VALIDITY : Value.t := + Definition value_VALIDITY : A.t := M.run ltac:(M.monadic (M.alloc (| - M.struct_record_update - (M.read (| M.get_constant (| "core::mem::transmutability::NOTHING" |) |)) - [ ("validity", Value.Bool true) ] + M.of_value (| + M.struct_record_update + (M.read (| M.get_constant (| "core::mem::transmutability::NOTHING" |) |)) + [ ("validity", A.to_value (M.of_value (| Value.Bool true |))) ] + |) |))). Axiom AssociatedConstant_value_VALIDITY : @@ -363,88 +381,94 @@ Module mem. } } *) - Definition and (τ : list Ty.t) (α : list Value.t) : M := + Definition and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other_assumptions ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other_assumptions := M.alloc (| other_assumptions |) in - Value.StructRecord - "core::mem::transmutability::Assume" - [ - ("alignment", - LogicalOp.or (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::mem::transmutability::Assume", - "alignment" - |) - |), - ltac:(M.monadic - (M.read (| - M.SubPointer.get_struct_record_field (| - other_assumptions, - "core::mem::transmutability::Assume", - "alignment" - |) - |))) - |)); - ("lifetimes", - LogicalOp.or (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::mem::transmutability::Assume", - "lifetimes" - |) - |), - ltac:(M.monadic - (M.read (| - M.SubPointer.get_struct_record_field (| - other_assumptions, - "core::mem::transmutability::Assume", - "lifetimes" - |) - |))) - |)); - ("safety", - LogicalOp.or (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::mem::transmutability::Assume", - "safety" - |) - |), - ltac:(M.monadic - (M.read (| - M.SubPointer.get_struct_record_field (| - other_assumptions, - "core::mem::transmutability::Assume", - "safety" - |) - |))) - |)); - ("validity", - LogicalOp.or (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::mem::transmutability::Assume", - "validity" - |) - |), - ltac:(M.monadic - (M.read (| - M.SubPointer.get_struct_record_field (| - other_assumptions, - "core::mem::transmutability::Assume", - "validity" - |) + M.of_value (| + Value.StructRecord + "core::mem::transmutability::Assume" + [ + ("alignment", + A.to_value + (LogicalOp.or (| + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::mem::transmutability::Assume", + "alignment" + |) + |), + ltac:(M.monadic + (M.read (| + M.SubPointer.get_struct_record_field (| + other_assumptions, + "core::mem::transmutability::Assume", + "alignment" + |) + |))) + |))); + ("lifetimes", + A.to_value + (LogicalOp.or (| + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::mem::transmutability::Assume", + "lifetimes" + |) + |), + ltac:(M.monadic + (M.read (| + M.SubPointer.get_struct_record_field (| + other_assumptions, + "core::mem::transmutability::Assume", + "lifetimes" + |) + |))) + |))); + ("safety", + A.to_value + (LogicalOp.or (| + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::mem::transmutability::Assume", + "safety" + |) + |), + ltac:(M.monadic + (M.read (| + M.SubPointer.get_struct_record_field (| + other_assumptions, + "core::mem::transmutability::Assume", + "safety" + |) + |))) + |))); + ("validity", + A.to_value + (LogicalOp.or (| + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::mem::transmutability::Assume", + "validity" + |) + |), + ltac:(M.monadic + (M.read (| + M.SubPointer.get_struct_record_field (| + other_assumptions, + "core::mem::transmutability::Assume", + "validity" + |) + |))) |))) - |)) - ])) + ] + |))) | _, _ => M.impossible end. @@ -460,92 +484,102 @@ Module mem. } } *) - Definition but_not (τ : list Ty.t) (α : list Value.t) : M := + Definition but_not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other_assumptions ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other_assumptions := M.alloc (| other_assumptions |) in - Value.StructRecord - "core::mem::transmutability::Assume" - [ - ("alignment", - LogicalOp.and (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::mem::transmutability::Assume", - "alignment" - |) - |), - ltac:(M.monadic - (UnOp.Pure.not - (M.read (| + M.of_value (| + Value.StructRecord + "core::mem::transmutability::Assume" + [ + ("alignment", + A.to_value + (LogicalOp.and (| + M.read (| M.SubPointer.get_struct_record_field (| - other_assumptions, + self, "core::mem::transmutability::Assume", "alignment" |) - |)))) - |)); - ("lifetimes", - LogicalOp.and (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::mem::transmutability::Assume", - "lifetimes" - |) - |), - ltac:(M.monadic - (UnOp.Pure.not - (M.read (| + |), + ltac:(M.monadic + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + other_assumptions, + "core::mem::transmutability::Assume", + "alignment" + |) + |) + |))) + |))); + ("lifetimes", + A.to_value + (LogicalOp.and (| + M.read (| M.SubPointer.get_struct_record_field (| - other_assumptions, + self, "core::mem::transmutability::Assume", "lifetimes" |) - |)))) - |)); - ("safety", - LogicalOp.and (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::mem::transmutability::Assume", - "safety" - |) - |), - ltac:(M.monadic - (UnOp.Pure.not - (M.read (| + |), + ltac:(M.monadic + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + other_assumptions, + "core::mem::transmutability::Assume", + "lifetimes" + |) + |) + |))) + |))); + ("safety", + A.to_value + (LogicalOp.and (| + M.read (| M.SubPointer.get_struct_record_field (| - other_assumptions, + self, "core::mem::transmutability::Assume", "safety" |) - |)))) - |)); - ("validity", - LogicalOp.and (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::mem::transmutability::Assume", - "validity" - |) - |), - ltac:(M.monadic - (UnOp.Pure.not - (M.read (| + |), + ltac:(M.monadic + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + other_assumptions, + "core::mem::transmutability::Assume", + "safety" + |) + |) + |))) + |))); + ("validity", + A.to_value + (LogicalOp.and (| + M.read (| M.SubPointer.get_struct_record_field (| - other_assumptions, + self, "core::mem::transmutability::Assume", "validity" |) - |)))) - |)) - ])) + |), + ltac:(M.monadic + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + other_assumptions, + "core::mem::transmutability::Assume", + "validity" + |) + |) + |))) + |))) + ] + |))) | _, _ => M.impossible end. @@ -563,7 +597,7 @@ Module mem. self.and(other_assumptions) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other_assumptions ] => ltac:(M.monadic @@ -600,7 +634,7 @@ Module mem. self.but_not(other_assumptions) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other_assumptions ] => ltac:(M.monadic diff --git a/CoqOfRust/core/net/display_buffer.v b/CoqOfRust/core/net/display_buffer.v index df2fac28e..6f7f35fc6 100644 --- a/CoqOfRust/core/net/display_buffer.v +++ b/CoqOfRust/core/net/display_buffer.v @@ -25,24 +25,29 @@ Module net. Self { buf: MaybeUninit::uninit_array(), len: 0 } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::net::display_buffer::DisplayBuffer" - [ - ("buf", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ], - "uninit_array", - [] - |), - [] - |)); - ("len", Value.Integer Integer.Usize 0) - ])) + (M.of_value (| + Value.StructRecord + "core::net::display_buffer::DisplayBuffer" + [ + ("buf", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ], + "uninit_array", + [] + |), + [] + |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -58,7 +63,7 @@ Module net. } } *) - Definition as_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -93,18 +98,21 @@ Module net. "core::net::display_buffer::DisplayBuffer", "buf" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::net::display_buffer::DisplayBuffer", - "len" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::net::display_buffer::DisplayBuffer", + "len" + |) + |))) + ] + |) ] |) ] @@ -139,7 +147,7 @@ Module net. } } *) - Definition write_str (τ : list Ty.t) (α : list Value.t) : M := + Definition write_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; s ] => ltac:(M.monadic @@ -154,7 +162,7 @@ Module net. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -174,42 +182,48 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::net::display_buffer::DisplayBuffer", "buf" - |)); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::net::display_buffer::DisplayBuffer", - "len" - |) - |)); - ("end_", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::net::display_buffer::DisplayBuffer", - "len" - |) - |), - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| bytes |) ] - |) - |)) - ] + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::net::display_buffer::DisplayBuffer", + "len" + |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::net::display_buffer::DisplayBuffer", + "len" + |) + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| bytes |) ] + |) + |))) + ] + |) ] |) |) in @@ -243,6 +257,7 @@ Module net. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -255,14 +270,21 @@ Module net. |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::fmt::Error" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.of_value (| Value.StructTuple "core::fmt::Error" [] |)) + ] + |) |))) ] |) diff --git a/CoqOfRust/core/net/ip_addr.v b/CoqOfRust/core/net/ip_addr.v index 2057e9114..d03c3f978 100644 --- a/CoqOfRust/core/net/ip_addr.v +++ b/CoqOfRust/core/net/ip_addr.v @@ -38,19 +38,19 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::IpAddr". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -82,20 +82,21 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::IpAddr". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -127,7 +128,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::IpAddr". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -156,11 +157,16 @@ Module net. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -257,7 +263,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::IpAddr". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -352,7 +358,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::IpAddr". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -380,7 +386,11 @@ Module net. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -478,7 +488,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::IpAddr". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -516,7 +526,12 @@ Module net. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -634,14 +649,14 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv4Addr". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -671,7 +686,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv4Addr". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -724,15 +739,15 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv4Addr". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -751,7 +766,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv4Addr". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -807,14 +822,14 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv6Addr". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -844,7 +859,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv6Addr". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -897,15 +912,15 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv6Addr". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -924,7 +939,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv6Addr". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -1029,7 +1044,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv6MulticastScope". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1056,7 +1071,7 @@ Module net. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -1084,12 +1099,12 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv6MulticastScope". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -1106,7 +1121,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv6MulticastScope". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1127,7 +1142,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv6MulticastScope". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -1166,7 +1181,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::ip_addr::Ipv6MulticastScope". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1183,31 +1198,35 @@ Module net. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "InterfaceLocal" |) |))); + M.alloc (| + M.read (| M.of_value (| Value.String "InterfaceLocal" |) |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "LinkLocal" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "LinkLocal" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "RealmLocal" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "RealmLocal" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "AdminLocal" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "AdminLocal" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "SiteLocal" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "SiteLocal" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "OrganizationLocal" |) |))); + M.alloc (| + M.read (| M.of_value (| Value.String "OrganizationLocal" |) |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Global" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Global" |) |) |))) ] |) |) @@ -1235,7 +1254,7 @@ Module net. } } *) - Definition is_unspecified (τ : list Ty.t) (α : list Value.t) : M := + Definition is_unspecified (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1301,7 +1320,7 @@ Module net. } } *) - Definition is_loopback (τ : list Ty.t) (α : list Value.t) : M := + Definition is_loopback (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1366,7 +1385,7 @@ Module net. } } *) - Definition is_global (τ : list Ty.t) (α : list Value.t) : M := + Definition is_global (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1431,7 +1450,7 @@ Module net. } } *) - Definition is_multicast (τ : list Ty.t) (α : list Value.t) : M := + Definition is_multicast (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1497,7 +1516,7 @@ Module net. } } *) - Definition is_documentation (τ : list Ty.t) (α : list Value.t) : M := + Definition is_documentation (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1563,7 +1582,7 @@ Module net. } } *) - Definition is_benchmarking (τ : list Ty.t) (α : list Value.t) : M := + Definition is_benchmarking (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1626,7 +1645,7 @@ Module net. matches!(self, IpAddr::V4(_)) } *) - Definition is_ipv4 (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ipv4 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1644,8 +1663,8 @@ Module net. "core::net::ip_addr::IpAddr::V4", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1659,7 +1678,7 @@ Module net. matches!(self, IpAddr::V6(_)) } *) - Definition is_ipv6 (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ipv6 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1677,8 +1696,8 @@ Module net. "core::net::ip_addr::IpAddr::V6", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -1695,7 +1714,7 @@ Module net. } } *) - Definition to_canonical (τ : list Ty.t) (α : list Value.t) : M := + Definition to_canonical (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1752,7 +1771,7 @@ Module net. Ipv4Addr { octets: [a, b, c, d] } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; c; d ] => ltac:(M.monadic @@ -1760,12 +1779,23 @@ Module net. let b := M.alloc (| b |) in let c := M.alloc (| c |) in let d := M.alloc (| d |) in - Value.StructRecord - "core::net::ip_addr::Ipv4Addr" - [ - ("octets", - Value.Array [ M.read (| a |); M.read (| b |); M.read (| c |); M.read (| d |) ]) - ])) + M.of_value (| + Value.StructRecord + "core::net::ip_addr::Ipv4Addr" + [ + ("octets", + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)); + A.to_value (M.read (| c |)); + A.to_value (M.read (| d |)) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1773,8 +1803,8 @@ Module net. (* pub const BITS: u32 = 32; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 32 |))). + Definition value_BITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 32 |) |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -1783,7 +1813,7 @@ Module net. u32::from_be_bytes(self.octets) } *) - Definition to_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition to_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1810,20 +1840,23 @@ Module net. Ipv4Addr { octets: bits.to_be_bytes() } } *) - Definition from_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition from_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bits ] => ltac:(M.monadic (let bits := M.alloc (| bits |) in - Value.StructRecord - "core::net::ip_addr::Ipv4Addr" - [ - ("octets", - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "to_be_bytes", [] |), - [ M.read (| bits |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::net::ip_addr::Ipv4Addr" + [ + ("octets", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "to_be_bytes", [] |), + [ M.read (| bits |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1831,17 +1864,17 @@ Module net. (* pub const LOCALHOST: Self = Ipv4Addr::new(127, 0, 0, 1); *) (* Ty.path "core::net::ip_addr::Ipv4Addr" *) - Definition value_LOCALHOST : Value.t := + Definition value_LOCALHOST : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv4Addr", "new", [] |), [ - Value.Integer Integer.U8 127; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1 + M.of_value (| Value.Integer 127 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) ] |) |))). @@ -1851,17 +1884,17 @@ Module net. (* pub const UNSPECIFIED: Self = Ipv4Addr::new(0, 0, 0, 0); *) (* Ty.path "core::net::ip_addr::Ipv4Addr" *) - Definition value_UNSPECIFIED : Value.t := + Definition value_UNSPECIFIED : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv4Addr", "new", [] |), [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) ] |) |))). @@ -1871,17 +1904,17 @@ Module net. (* pub const BROADCAST: Self = Ipv4Addr::new(255, 255, 255, 255); *) (* Ty.path "core::net::ip_addr::Ipv4Addr" *) - Definition value_BROADCAST : Value.t := + Definition value_BROADCAST : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv4Addr", "new", [] |), [ - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 255 + M.of_value (| Value.Integer 255 |); + M.of_value (| Value.Integer 255 |); + M.of_value (| Value.Integer 255 |); + M.of_value (| Value.Integer 255 |) ] |) |))). @@ -1894,7 +1927,7 @@ Module net. self.octets } *) - Definition octets (τ : list Ty.t) (α : list Value.t) : M := + Definition octets (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1916,13 +1949,13 @@ Module net. u32::from_be_bytes(self.octets) == 0 } *) - Definition is_unspecified (τ : list Ty.t) (α : list Value.t) : M := + Definition is_unspecified (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u32", "from_be_bytes", [] |), [ M.read (| @@ -1933,8 +1966,9 @@ Module net. |) |) ] - |)) - (Value.Integer Integer.U32 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -1946,13 +1980,13 @@ Module net. self.octets()[0] == 127 } *) - Definition is_loopback (τ : list Ty.t) (α : list Value.t) : M := + Definition is_loopback (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -1964,10 +1998,11 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U8 127))) + |), + M.of_value (| Value.Integer 127 |) + |))) | _, _ => M.impossible end. @@ -1983,7 +2018,7 @@ Module net. } } *) - Definition is_private (τ : list Ty.t) (α : list Value.t) : M := + Definition is_private (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2006,50 +2041,38 @@ Module net. (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in let γ0_rest := M.SubPointer.get_slice_rest (| γ, 1, 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U8 10 - |) in - M.alloc (| Value.Bool true |))); + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 10 |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in let γ0_rest := M.SubPointer.get_slice_rest (| γ, 2, 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U8 172 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 172 |) in let b := M.copy (| γ0_1 |) in let γ := M.alloc (| - BinOp.Pure.ge (M.read (| b |)) (Value.Integer Integer.U8 16) + BinOp.Pure.ge (| M.read (| b |), M.of_value (| Value.Integer 16 |) |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let γ := M.alloc (| - BinOp.Pure.le (M.read (| b |)) (Value.Integer Integer.U8 31) + BinOp.Pure.le (| M.read (| b |), M.of_value (| Value.Integer 31 |) |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Bool true |))); + M.alloc (| M.of_value (| Value.Bool true |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in let γ0_rest := M.SubPointer.get_slice_rest (| γ, 2, 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U8 192 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 192 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U8 168 - |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 168 |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -2063,7 +2086,7 @@ Module net. matches!(self.octets(), [169, 254, ..]) } *) - Definition is_link_local (τ : list Ty.t) (α : list Value.t) : M := + Definition is_link_local (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2087,17 +2110,11 @@ Module net. let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in let γ0_rest := M.SubPointer.get_slice_rest (| γ, 2, 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U8 169 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 169 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U8 254 - |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 254 |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -2122,13 +2139,13 @@ Module net. || self.is_broadcast()) } *) - Definition is_global (τ : list Ty.t) (α : list Value.t) : M := + Definition is_global (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (LogicalOp.or (| + UnOp.Pure.not (| + LogicalOp.or (| LogicalOp.or (| LogicalOp.or (| LogicalOp.or (| @@ -2137,8 +2154,8 @@ Module net. LogicalOp.or (| LogicalOp.or (| LogicalOp.or (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2150,10 +2167,11 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U8 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (M.call_closure (| M.get_associated_function (| @@ -2197,8 +2215,8 @@ Module net. ltac:(M.monadic (LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2210,13 +2228,14 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U8 192), + |), + M.of_value (| Value.Integer 192 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2228,14 +2247,15 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |) - |)) - (Value.Integer Integer.U8 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2247,10 +2267,11 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 2 |) + M.alloc (| M.of_value (| Value.Integer 2 |) |) |) - |)) - (Value.Integer Integer.U8 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |))) |), ltac:(M.monadic @@ -2292,7 +2313,8 @@ Module net. |), [ M.read (| self |) ] |))) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -2303,14 +2325,14 @@ Module net. self.octets()[0] == 100 && (self.octets()[1] & 0b1100_0000 == 0b0100_0000) } *) - Definition is_shared (τ : list Ty.t) (α : list Value.t) : M := + Definition is_shared (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2322,14 +2344,15 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U8 100), + |), + M.of_value (| Value.Integer 100 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| + (BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2341,11 +2364,13 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |) - |)) - (Value.Integer Integer.U8 192)) - (Value.Integer Integer.U8 64))) + |), + M.of_value (| Value.Integer 192 |) + |), + M.of_value (| Value.Integer 64 |) + |))) |))) | _, _ => M.impossible end. @@ -2357,14 +2382,14 @@ Module net. self.octets()[0] == 198 && (self.octets()[1] & 0xfe) == 18 } *) - Definition is_benchmarking (τ : list Ty.t) (α : list Value.t) : M := + Definition is_benchmarking (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2376,14 +2401,15 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U8 198), + |), + M.of_value (| Value.Integer 198 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| + (BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2395,11 +2421,13 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |) - |)) - (Value.Integer Integer.U8 254)) - (Value.Integer Integer.U8 18))) + |), + M.of_value (| Value.Integer 254 |) + |), + M.of_value (| Value.Integer 18 |) + |))) |))) | _, _ => M.impossible end. @@ -2412,15 +2440,15 @@ Module net. self.octets()[0] & 240 == 240 && !self.is_broadcast() } *) - Definition is_reserved (τ : list Ty.t) (α : list Value.t) : M := + Definition is_reserved (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in LogicalOp.and (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2432,21 +2460,24 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U8 240)) - (Value.Integer Integer.U8 240), + |), + M.of_value (| Value.Integer 240 |) + |), + M.of_value (| Value.Integer 240 |) + |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv4Addr", "is_broadcast", [] |), [ M.read (| self |) ] - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -2458,14 +2489,14 @@ Module net. self.octets()[0] >= 224 && self.octets()[0] <= 239 } *) - Definition is_multicast (τ : list Ty.t) (α : list Value.t) : M := + Definition is_multicast (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in LogicalOp.and (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2477,13 +2508,14 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U8 224), + |), + M.of_value (| Value.Integer 224 |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -2495,10 +2527,11 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U8 239))) + |), + M.of_value (| Value.Integer 239 |) + |))) |))) | _, _ => M.impossible end. @@ -2511,13 +2544,13 @@ Module net. u32::from_be_bytes(self.octets()) == u32::from_be_bytes(Self::BROADCAST.octets()) } *) - Definition is_broadcast (τ : list Ty.t) (α : list Value.t) : M := + Definition is_broadcast (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u32", "from_be_bytes", [] |), [ M.call_closure (| @@ -2529,8 +2562,8 @@ Module net. [ M.read (| self |) ] |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "u32", "from_be_bytes", [] |), [ M.call_closure (| @@ -2542,7 +2575,8 @@ Module net. [ M.get_constant (| "core::net::ip_addr::BROADCAST" |) ] |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -2554,7 +2588,7 @@ Module net. matches!(self.octets(), [192, 0, 2, _] | [198, 51, 100, _] | [203, 0, 113, _]) } *) - Definition is_documentation (τ : list Ty.t) (α : list Value.t) : M := + Definition is_documentation (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2586,19 +2620,19 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 192 + Value.Integer 192 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U8 0 + Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), - Value.Integer Integer.U8 2 + Value.Integer 2 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in @@ -2608,19 +2642,19 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 198 + Value.Integer 198 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U8 51 + Value.Integer 51 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), - Value.Integer Integer.U8 100 + Value.Integer 100 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in @@ -2630,29 +2664,30 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 203 + Value.Integer 203 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U8 0 + Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), - Value.Integer Integer.U8 113 + Value.Integer 113 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -2668,7 +2703,7 @@ Module net. Ipv6Addr { octets: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, a, b, c, d] } } *) - Definition to_ipv6_compatible (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ipv6_compatible (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2697,30 +2732,35 @@ Module net. let c := M.copy (| γ0_2 |) in let d := M.copy (| γ0_3 |) in M.alloc (| - Value.StructRecord - "core::net::ip_addr::Ipv6Addr" - [ - ("octets", - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - M.read (| a |); - M.read (| b |); - M.read (| c |); - M.read (| d |) - ]) - ] + M.of_value (| + Value.StructRecord + "core::net::ip_addr::Ipv6Addr" + [ + ("octets", + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)); + A.to_value (M.read (| c |)); + A.to_value (M.read (| d |)) + ] + |))) + ] + |) |))) ] |) @@ -2737,7 +2777,7 @@ Module net. Ipv6Addr { octets: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, a, b, c, d] } } *) - Definition to_ipv6_mapped (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ipv6_mapped (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2766,30 +2806,35 @@ Module net. let c := M.copy (| γ0_2 |) in let d := M.copy (| γ0_3 |) in M.alloc (| - Value.StructRecord - "core::net::ip_addr::Ipv6Addr" - [ - ("octets", - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 255; - M.read (| a |); - M.read (| b |); - M.read (| c |); - M.read (| d |) - ]) - ] + M.of_value (| + Value.StructRecord + "core::net::ip_addr::Ipv6Addr" + [ + ("octets", + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)); + A.to_value (M.read (| c |)); + A.to_value (M.read (| d |)) + ] + |))) + ] + |) |))) ] |) @@ -2812,7 +2857,7 @@ Module net. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -2888,7 +2933,7 @@ Module net. fmt::Display::fmt(self, fmt) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -2923,12 +2968,14 @@ Module net. IpAddr::V4(ipv4) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ipv4 ] => ltac:(M.monadic (let ipv4 := M.alloc (| ipv4 |) in - Value.StructTuple "core::net::ip_addr::IpAddr::V4" [ M.read (| ipv4 |) ])) + M.of_value (| + Value.StructTuple "core::net::ip_addr::IpAddr::V4" [ A.to_value (M.read (| ipv4 |)) ] + |))) | _, _ => M.impossible end. @@ -2948,12 +2995,14 @@ Module net. IpAddr::V6(ipv6) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ipv6 ] => ltac:(M.monadic (let ipv6 := M.alloc (| ipv6 |) in - Value.StructTuple "core::net::ip_addr::IpAddr::V6" [ M.read (| ipv6 |) ])) + M.of_value (| + Value.StructTuple "core::net::ip_addr::IpAddr::V6" [ A.to_value (M.read (| ipv6 |)) ] + |))) | _, _ => M.impossible end. @@ -2987,7 +3036,7 @@ Module net. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -3006,7 +3055,7 @@ Module net. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3073,75 +3122,89 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String "." |); - M.read (| Value.String "." |); - M.read (| Value.String "." |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "." |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "." |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "." |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.SubPointer.get_array_field (| - octets, - M.alloc (| Value.Integer Integer.Usize 0 |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.SubPointer.get_array_field (| - octets, - M.alloc (| Value.Integer Integer.Usize 1 |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.SubPointer.get_array_field (| - octets, - M.alloc (| Value.Integer Integer.Usize 2 |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.SubPointer.get_array_field (| - octets, - M.alloc (| Value.Integer Integer.Usize 3 |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.SubPointer.get_array_field (| + octets, + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.SubPointer.get_array_field (| + octets, + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.SubPointer.get_array_field (| + octets, + M.alloc (| M.of_value (| Value.Integer 2 |) |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.SubPointer.get_array_field (| + octets, + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -3189,103 +3252,125 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String "." |); - M.read (| Value.String "." |); - M.read (| Value.String "." |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "." |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "." |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "." |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.SubPointer.get_array_field (| - octets, - M.alloc (| Value.Integer Integer.Usize 0 |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.SubPointer.get_array_field (| - octets, - M.alloc (| Value.Integer Integer.Usize 1 |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.SubPointer.get_array_field (| - octets, - M.alloc (| Value.Integer Integer.Usize 2 |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.SubPointer.get_array_field (| - octets, - M.alloc (| Value.Integer Integer.Usize 3 |) - |) - ] - |) - ] - |)) - ] - |) - ] - |) - ] - |) - |) in - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "core::fmt::Formatter", "pad", [] |), - [ - M.read (| fmt |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::display_buffer::DisplayBuffer", - "as_str", - [] - |), - [ buf ] - |) - ] - |) - |))) - ] - |) - |))) - | _, _ => M.impossible - end. + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.SubPointer.get_array_field (| + octets, + M.alloc (| + M.of_value (| Value.Integer 0 |) + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.SubPointer.get_array_field (| + octets, + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.SubPointer.get_array_field (| + octets, + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.SubPointer.get_array_field (| + octets, + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + ] + |)) + ] + |) + |) + |) + ] + |) + ] + |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "core::fmt::Formatter", "pad", [] |), + [ + M.read (| fmt |); + M.call_closure (| + M.get_associated_function (| + Ty.path "core::net::display_buffer::DisplayBuffer", + "as_str", + [] + |), + [ buf ] + |) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -3303,7 +3388,7 @@ Module net. fmt::Display::fmt(self, fmt) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -3341,7 +3426,7 @@ Module net. } } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3382,7 +3467,7 @@ Module net. "core::net::ip_addr::IpAddr::V6", 0 |) in - M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -3408,7 +3493,7 @@ Module net. } } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3449,7 +3534,7 @@ Module net. "core::net::ip_addr::IpAddr::V6", 0 |) in - M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -3472,26 +3557,29 @@ Module net. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - Ty.path "core::net::ip_addr::Ipv4Addr", - [], - "cmp", - [] - |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "core::net::ip_addr::Ipv4Addr", + [], + "cmp", + [] + |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3514,7 +3602,7 @@ Module net. } } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3556,9 +3644,16 @@ Module net. 0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Greater" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |)) + ] + |) |))) ] |) @@ -3585,7 +3680,7 @@ Module net. } } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3627,9 +3722,14 @@ Module net. 0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Less" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |)) + ] + |) |))) ] |) @@ -3653,7 +3753,7 @@ Module net. self.octets.cmp(&other.octets) } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3699,7 +3799,7 @@ Module net. ip.to_bits() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ip ] => ltac:(M.monadic @@ -3727,7 +3827,7 @@ Module net. Ipv4Addr::from_bits(ip) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ip ] => ltac:(M.monadic @@ -3759,12 +3859,16 @@ Module net. Ipv4Addr { octets } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ octets ] => ltac:(M.monadic (let octets := M.alloc (| octets |) in - Value.StructRecord "core::net::ip_addr::Ipv4Addr" [ ("octets", M.read (| octets |)) ])) + M.of_value (| + Value.StructRecord + "core::net::ip_addr::Ipv4Addr" + [ ("octets", A.to_value (M.read (| octets |))) ] + |))) | _, _ => M.impossible end. @@ -3784,25 +3888,28 @@ Module net. IpAddr::V4(Ipv4Addr::from(octets)) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ octets ] => ltac:(M.monadic (let octets := M.alloc (| octets |) in - Value.StructTuple - "core::net::ip_addr::IpAddr::V4" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "core::net::ip_addr::Ipv4Addr", - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], - "from", - [] - |), - [ M.read (| octets |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::net::ip_addr::IpAddr::V4" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "core::net::ip_addr::Ipv4Addr", + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], + "from", + [] + |), + [ M.read (| octets |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3817,25 +3924,28 @@ Module net. IpAddr::V6(Ipv6Addr::from(octets)) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ octets ] => ltac:(M.monadic (let octets := M.alloc (| octets |) in - Value.StructTuple - "core::net::ip_addr::IpAddr::V6" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "core::net::ip_addr::Ipv6Addr", - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], - "from", - [] - |), - [ M.read (| octets |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::net::ip_addr::IpAddr::V6" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "core::net::ip_addr::Ipv6Addr", + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], + "from", + [] + |), + [ M.read (| octets |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3869,7 +3979,7 @@ Module net. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; c; d; e; f; g; h ] => ltac:(M.monadic @@ -3884,58 +3994,71 @@ Module net. M.read (| let addr16 := M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ M.read (| a |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ M.read (| b |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ M.read (| c |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ M.read (| d |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ M.read (| e |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ M.read (| f |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ M.read (| g |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ M.read (| h |) ] - |) - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ M.read (| a |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ M.read (| b |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ M.read (| c |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ M.read (| d |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ M.read (| e |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ M.read (| f |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ M.read (| g |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ M.read (| h |) ] + |)) + ] + |) |) in M.alloc (| - Value.StructRecord - "core::net::ip_addr::Ipv6Addr" - [ - ("octets", - M.call_closure (| - M.get_function (| - "core::intrinsics::transmute", - [ - Ty.apply (Ty.path "array") [ Ty.path "u16" ]; - Ty.apply (Ty.path "array") [ Ty.path "u8" ] - ] - |), - [ M.read (| addr16 |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::net::ip_addr::Ipv6Addr" + [ + ("octets", + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::transmute", + [ + Ty.apply (Ty.path "array") [ Ty.path "u16" ]; + Ty.apply (Ty.path "array") [ Ty.path "u8" ] + ] + |), + [ M.read (| addr16 |) ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3945,8 +4068,8 @@ Module net. (* pub const BITS: u32 = 128; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 128 |))). + Definition value_BITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 128 |) |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -3955,7 +4078,7 @@ Module net. u128::from_be_bytes(self.octets) } *) - Definition to_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition to_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3982,20 +4105,23 @@ Module net. Ipv6Addr { octets: bits.to_be_bytes() } } *) - Definition from_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition from_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bits ] => ltac:(M.monadic (let bits := M.alloc (| bits |) in - Value.StructRecord - "core::net::ip_addr::Ipv6Addr" - [ - ("octets", - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "to_be_bytes", [] |), - [ M.read (| bits |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::net::ip_addr::Ipv6Addr" + [ + ("octets", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "to_be_bytes", [] |), + [ M.read (| bits |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4003,21 +4129,21 @@ Module net. (* pub const LOCALHOST: Self = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1); *) (* Ty.path "core::net::ip_addr::Ipv6Addr" *) - Definition value_LOCALHOST : Value.t := + Definition value_LOCALHOST : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv6Addr", "new", [] |), [ - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 1 + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) ] |) |))). @@ -4027,21 +4153,21 @@ Module net. (* pub const UNSPECIFIED: Self = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0); *) (* Ty.path "core::net::ip_addr::Ipv6Addr" *) - Definition value_UNSPECIFIED : Value.t := + Definition value_UNSPECIFIED : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv6Addr", "new", [] |), [ - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 0 + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) ] |) |))). @@ -4067,7 +4193,7 @@ Module net. ] } *) - Definition segments (τ : list Ty.t) (α : list Value.t) : M := + Definition segments (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4114,41 +4240,51 @@ Module net. let g := M.copy (| γ0_6 |) in let h := M.copy (| γ0_7 |) in M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ M.read (| a |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ M.read (| b |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ M.read (| c |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ M.read (| d |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ M.read (| e |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ M.read (| f |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ M.read (| g |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ M.read (| h |) ] - |) - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ M.read (| a |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ M.read (| b |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ M.read (| c |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ M.read (| d |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ M.read (| e |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ M.read (| f |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ M.read (| g |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ M.read (| h |) ] + |)) + ] + |) |))) ] |) @@ -4163,13 +4299,13 @@ Module net. u128::from_be_bytes(self.octets()) == u128::from_be_bytes(Ipv6Addr::UNSPECIFIED.octets()) } *) - Definition is_unspecified (τ : list Ty.t) (α : list Value.t) : M := + Definition is_unspecified (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "from_be_bytes", [] |), [ M.call_closure (| @@ -4181,8 +4317,8 @@ Module net. [ M.read (| self |) ] |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "u128", "from_be_bytes", [] |), [ M.call_closure (| @@ -4194,7 +4330,8 @@ Module net. [ M.get_constant (| "core::net::ip_addr::UNSPECIFIED" |) ] |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4206,13 +4343,13 @@ Module net. u128::from_be_bytes(self.octets()) == u128::from_be_bytes(Ipv6Addr::LOCALHOST.octets()) } *) - Definition is_loopback (τ : list Ty.t) (α : list Value.t) : M := + Definition is_loopback (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "from_be_bytes", [] |), [ M.call_closure (| @@ -4224,8 +4361,8 @@ Module net. [ M.read (| self |) ] |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "u128", "from_be_bytes", [] |), [ M.call_closure (| @@ -4237,7 +4374,8 @@ Module net. [ M.get_constant (| "core::net::ip_addr::LOCALHOST" |) ] |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4272,13 +4410,13 @@ Module net. || self.is_unicast_link_local()) } *) - Definition is_global (τ : list Ty.t) (α : list Value.t) : M := + Definition is_global (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (LogicalOp.or (| + UnOp.Pure.not (| + LogicalOp.or (| LogicalOp.or (| LogicalOp.or (| LogicalOp.or (| @@ -4331,35 +4469,37 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U16 0 + Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U16 0 + Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), - Value.Integer Integer.U16 0 + Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_3 |), - Value.Integer Integer.U16 0 + Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_4 |), - Value.Integer Integer.U16 0 + Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_5 |), - Value.Integer Integer.U16 65535 + Value.Integer 65535 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -4391,20 +4531,22 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U16 100 + Value.Integer 100 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U16 65435 + Value.Integer 65435 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), - Value.Integer Integer.U16 1 + Value.Integer 1 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -4436,25 +4578,26 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U16 256 + Value.Integer 256 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U16 0 + Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), - Value.Integer Integer.U16 0 + Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_3 |), - Value.Integer Integer.U16 0 + Value.Integer 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -4487,33 +4630,35 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U16 8193 + Value.Integer 8193 |) in let b := M.copy (| γ0_1 |) in let γ := M.alloc (| - BinOp.Pure.lt - (M.read (| b |)) - (Value.Integer Integer.U16 512) + BinOp.Pure.lt (| + M.read (| b |), + M.of_value (| Value.Integer 512 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |), ltac:(M.monadic - (UnOp.Pure.not - (LogicalOp.or (| + (UnOp.Pure.not (| + LogicalOp.or (| LogicalOp.or (| LogicalOp.or (| LogicalOp.or (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "from_be_bytes", @@ -4529,13 +4674,14 @@ Module net. [ M.read (| self |) ] |) ] - |)) - (Value.Integer - Integer.U128 - 42540488241204005274814694018844196865), + |), + M.of_value (| + Value.Integer 42540488241204005274814694018844196865 + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.call_closure (| + (BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "from_be_bytes", @@ -4551,10 +4697,11 @@ Module net. [ M.read (| self |) ] |) ] - |)) - (Value.Integer - Integer.U128 - 42540488241204005274814694018844196866))) + |), + M.of_value (| + Value.Integer 42540488241204005274814694018844196866 + |) + |))) |), ltac:(M.monadic (M.read (| @@ -4591,16 +4738,17 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U16 8193 + Value.Integer 8193 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U16 3 + Value.Integer 3 |) in - M.alloc (| Value.Bool true |))); + M.alloc (| M.of_value (| Value.Bool true |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Bool false |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -4633,20 +4781,22 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U16 8193 + Value.Integer 8193 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U16 4 + Value.Integer 4 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), - Value.Integer Integer.U16 274 + Value.Integer 274 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -4678,14 +4828,15 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U16 8193 + Value.Integer 8193 |) in let b := M.copy (| γ0_1 |) in let γ := M.alloc (| - BinOp.Pure.ge - (M.read (| b |)) - (Value.Integer Integer.U16 32) + BinOp.Pure.ge (| + M.read (| b |), + M.of_value (| Value.Integer 32 |) + |) |) in let _ := M.is_constant_or_break_match (| @@ -4694,21 +4845,25 @@ Module net. |) in let γ := M.alloc (| - BinOp.Pure.le - (M.read (| b |)) - (Value.Integer Integer.U16 47) + BinOp.Pure.le (| + M.read (| b |), + M.of_value (| Value.Integer 47 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) - |)))) + |) + |))) |))) |), ltac:(M.monadic @@ -4740,7 +4895,8 @@ Module net. |), [ M.read (| self |) ] |))) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4751,14 +4907,14 @@ Module net. (self.segments()[0] & 0xfe00) == 0xfc00 } *) - Definition is_unique_local (τ : list Ty.t) (α : list Value.t) : M := + Definition is_unique_local (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -4770,11 +4926,13 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U16 65024)) - (Value.Integer Integer.U16 64512))) + |), + M.of_value (| Value.Integer 65024 |) + |), + M.of_value (| Value.Integer 64512 |) + |))) | _, _ => M.impossible end. @@ -4786,20 +4944,21 @@ Module net. !self.is_multicast() } *) - Definition is_unicast (τ : list Ty.t) (α : list Value.t) : M := + Definition is_unicast (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv6Addr", "is_multicast", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4810,14 +4969,14 @@ Module net. (self.segments()[0] & 0xffc0) == 0xfe80 } *) - Definition is_unicast_link_local (τ : list Ty.t) (α : list Value.t) : M := + Definition is_unicast_link_local (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -4829,11 +4988,13 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U16 65472)) - (Value.Integer Integer.U16 65152))) + |), + M.of_value (| Value.Integer 65472 |) + |), + M.of_value (| Value.Integer 65152 |) + |))) | _, _ => M.impossible end. @@ -4845,14 +5006,14 @@ Module net. (self.segments()[0] == 0x2001) && (self.segments()[1] == 0xdb8) } *) - Definition is_documentation (τ : list Ty.t) (α : list Value.t) : M := + Definition is_documentation (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -4864,13 +5025,14 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U16 8193), + |), + M.of_value (| Value.Integer 8193 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -4882,10 +5044,11 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |) - |)) - (Value.Integer Integer.U16 3512))) + |), + M.of_value (| Value.Integer 3512 |) + |))) |))) | _, _ => M.impossible end. @@ -4898,15 +5061,15 @@ Module net. (self.segments()[0] == 0x2001) && (self.segments()[1] == 0x2) && (self.segments()[2] == 0) } *) - Definition is_benchmarking (τ : list Ty.t) (α : list Value.t) : M := + Definition is_benchmarking (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -4918,13 +5081,14 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U16 8193), + |), + M.of_value (| Value.Integer 8193 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -4936,14 +5100,15 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |) - |)) - (Value.Integer Integer.U16 2))) + |), + M.of_value (| Value.Integer 2 |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -4955,10 +5120,11 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 2 |) + M.alloc (| M.of_value (| Value.Integer 2 |) |) |) - |)) - (Value.Integer Integer.U16 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |))) | _, _ => M.impossible end. @@ -4977,7 +5143,7 @@ Module net. && !self.is_benchmarking() } *) - Definition is_unicast_global (τ : list Ty.t) (α : list Value.t) : M := + Definition is_unicast_global (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4997,70 +5163,76 @@ Module net. [ M.read (| self |) ] |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv6Addr", "is_loopback", [] |), [ M.read (| self |) ] - |)))) + |) + |))) |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv6Addr", "is_unicast_link_local", [] |), [ M.read (| self |) ] - |)))) + |) + |))) |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv6Addr", "is_unique_local", [] |), [ M.read (| self |) ] - |)))) + |) + |))) |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv6Addr", "is_unspecified", [] |), [ M.read (| self |) ] - |)))) + |) + |))) |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv6Addr", "is_documentation", [] |), [ M.read (| self |) ] - |)))) + |) + |))) |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::net::ip_addr::Ipv6Addr", "is_benchmarking", [] |), [ M.read (| self |) ] - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -5086,14 +5258,14 @@ Module net. } } *) - Definition multicast_scope (τ : list Ty.t) (α : list Value.t) : M := + Definition multicast_scope (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5112,8 +5284,8 @@ Module net. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -5125,10 +5297,11 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U16 15) + |), + M.of_value (| Value.Integer 15 |) + |) |), [ fun γ => @@ -5136,121 +5309,160 @@ Module net. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U16 1 + Value.Integer 1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::net::ip_addr::Ipv6MulticastScope::InterfaceLocal" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::net::ip_addr::Ipv6MulticastScope::InterfaceLocal" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U16 2 + Value.Integer 2 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::net::ip_addr::Ipv6MulticastScope::LinkLocal" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::net::ip_addr::Ipv6MulticastScope::LinkLocal" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U16 3 + Value.Integer 3 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::net::ip_addr::Ipv6MulticastScope::RealmLocal" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::net::ip_addr::Ipv6MulticastScope::RealmLocal" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U16 4 + Value.Integer 4 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::net::ip_addr::Ipv6MulticastScope::AdminLocal" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::net::ip_addr::Ipv6MulticastScope::AdminLocal" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U16 5 + Value.Integer 5 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::net::ip_addr::Ipv6MulticastScope::SiteLocal" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::net::ip_addr::Ipv6MulticastScope::SiteLocal" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U16 8 + Value.Integer 8 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::net::ip_addr::Ipv6MulticastScope::OrganizationLocal" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::net::ip_addr::Ipv6MulticastScope::OrganizationLocal" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U16 14 + Value.Integer 14 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::net::ip_addr::Ipv6MulticastScope::Global" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::net::ip_addr::Ipv6MulticastScope::Global" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5265,14 +5477,14 @@ Module net. (self.segments()[0] & 0xff00) == 0xff00 } *) - Definition is_multicast (τ : list Ty.t) (α : list Value.t) : M := + Definition is_multicast (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_array_field (| M.alloc (| M.call_closure (| @@ -5284,11 +5496,13 @@ Module net. [ M.read (| self |) ] |) |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (Value.Integer Integer.U16 65280)) - (Value.Integer Integer.U16 65280))) + |), + M.of_value (| Value.Integer 65280 |) + |), + M.of_value (| Value.Integer 65280 |) + |))) | _, _ => M.impossible end. @@ -5305,7 +5519,7 @@ Module net. } } *) - Definition to_ipv4_mapped (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ipv4_mapped (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5342,86 +5556,55 @@ Module net. let γ0_14 := M.SubPointer.get_slice_index (| γ, 14 |) in let γ0_15 := M.SubPointer.get_slice_index (| γ, 15 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_2 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_3 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_3 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_4 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_4 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_5 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_5 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_6 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_6 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_7 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_7 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_8 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_8 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_9 |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_9 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_10 |), - Value.Integer Integer.U8 255 - |) in + M.is_constant_or_break_match (| M.read (| γ0_10 |), Value.Integer 255 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_11 |), - Value.Integer Integer.U8 255 - |) in + M.is_constant_or_break_match (| M.read (| γ0_11 |), Value.Integer 255 |) in let a := M.copy (| γ0_12 |) in let b := M.copy (| γ0_13 |) in let c := M.copy (| γ0_14 |) in let d := M.copy (| γ0_15 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::ip_addr::Ipv4Addr", - "new", - [] - |), - [ M.read (| a |); M.read (| b |); M.read (| c |); M.read (| d |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::net::ip_addr::Ipv4Addr", + "new", + [] + |), + [ M.read (| a |); M.read (| b |); M.read (| c |); M.read (| d |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5442,14 +5625,14 @@ Module net. } } *) - Definition to_ipv4 (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ipv4 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5473,30 +5656,15 @@ Module net. let γ0_6 := M.SubPointer.get_slice_index (| γ, 6 |) in let γ0_7 := M.SubPointer.get_slice_index (| γ, 7 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U16 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U16 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_2 |), - Value.Integer Integer.U16 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_3 |), - Value.Integer Integer.U16 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_3 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_4 |), - Value.Integer Integer.U16 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_4 |), Value.Integer 0 |) in M.find_or_pattern (| γ0_5, [ @@ -5505,20 +5673,20 @@ Module net. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U16 0 + Value.Integer 0 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U16 65535 + Value.Integer 65535 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => @@ -5563,34 +5731,41 @@ Module net. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::ip_addr::Ipv4Addr", - "new", - [] - |), - [ - M.read (| a |); - M.read (| b |); - M.read (| c |); - M.read (| d |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::ip_addr::Ipv4Addr", + "new", + [] + |), + [ + M.read (| a |); + M.read (| b |); + M.read (| c |); + M.read (| d |) + ] + |)) + ] + |) |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5607,7 +5782,7 @@ Module net. IpAddr::V6( *self) } *) - Definition to_canonical (τ : list Ty.t) (α : list Value.t) : M := + Definition to_canonical (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5617,7 +5792,7 @@ Module net. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5643,20 +5818,24 @@ Module net. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::net::ip_addr::IpAddr::V4" - [ M.read (| mapped |) ] + M.of_value (| + Value.StructTuple + "core::net::ip_addr::IpAddr::V4" + [ A.to_value (M.read (| mapped |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::net::ip_addr::IpAddr::V6" - [ M.read (| M.read (| self |) |) ] + M.of_value (| + Value.StructTuple + "core::net::ip_addr::IpAddr::V6" + [ A.to_value (M.read (| M.read (| self |) |)) ] + |) |) |))) |))) @@ -5671,7 +5850,7 @@ Module net. self.octets } *) - Definition octets (τ : list Ty.t) (α : list Value.t) : M := + Definition octets (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5764,7 +5943,7 @@ Module net. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5774,7 +5953,7 @@ Module net. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5839,7 +6018,7 @@ Module net. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5878,25 +6057,39 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "::ffff:" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "::ffff:" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "core::net::ip_addr::Ipv4Addr" ] - |), - [ ipv4 ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "core::net::ip_addr::Ipv4Addr" + ] + |), + [ ipv4 ] + |)) + ] + |) + |) + |) ] |) ] @@ -5971,7 +6164,10 @@ Module net. "iter", [] |), - [ (* Unsize *) M.pointer_coercion segments ] + [ + (* Unsize *) + M.pointer_coercion (| segments |) + ] |) ] |) @@ -6036,20 +6232,23 @@ Module net. let γ1_1 := M.read (| γ1_1 |) in let segment := M.copy (| γ1_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| segment - |)) - (Value.Integer - Integer.U16 - 0) + |), + M.of_value (| + Value.Integer 0 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6059,7 +6258,9 @@ Module net. let _ := M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -6067,17 +6268,19 @@ Module net. (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| current, "core::net::ip_addr::fmt::Span", "len" |) - |)) - (Value.Integer - Integer.Usize - 0) + |), + M.of_value (| + Value.Integer + 0 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6097,12 +6300,16 @@ Module net. M.read (| i |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -6116,15 +6323,18 @@ Module net. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -6132,21 +6342,22 @@ Module net. (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| current, "core::net::ip_addr::fmt::Span", "len" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| longest, "core::net::ip_addr::fmt::Span", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6161,12 +6372,16 @@ Module net. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))); @@ -6188,35 +6403,40 @@ Module net. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)) in longest |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| zeroes, "core::net::ip_addr::fmt::Span", "len" |) - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6262,18 +6482,21 @@ Module net. |), [ segments; - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - zeroes, - "core::net::ip_addr::fmt::Span", - "start" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + zeroes, + "core::net::ip_addr::fmt::Span", + "start" + |) + |))) + ] + |) ] |) ] @@ -6356,7 +6579,9 @@ Module net. |), [ M.read (| f |); - M.read (| Value.String "::" |) + M.read (| + M.of_value (| Value.String "::" |) + |) ] |) ] @@ -6438,27 +6663,31 @@ Module net. |), [ segments; - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - zeroes, - "core::net::ip_addr::fmt::Span", - "start" - |) - |), - M.read (| - M.SubPointer.get_struct_record_field (| - zeroes, - "core::net::ip_addr::fmt::Span", - "len" - |) - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + zeroes, + "core::net::ip_addr::fmt::Span", + "start" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + zeroes, + "core::net::ip_addr::fmt::Span", + "len" + |) + |) + |))) + ] + |) ] |) ] @@ -6475,7 +6704,7 @@ Module net. |), [ M.read (| f |); - (* Unsize *) M.pointer_coercion segments + (* Unsize *) M.pointer_coercion (| segments |) ] |) |))) @@ -6525,29 +6754,45 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "core::net::ip_addr::Ipv6Addr" ] - ] - |), - [ self ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ + Ty.path + "core::net::ip_addr::Ipv6Addr" + ] + ] + |), + [ self ] + |)) + ] + |) + |) + |) ] |) ] @@ -6598,7 +6843,7 @@ Module net. fmt::Display::fmt(self, fmt) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -6636,7 +6881,7 @@ Module net. } } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6655,7 +6900,7 @@ Module net. "core::net::ip_addr::IpAddr::V4", 0 |) in - M.alloc (| Value.Bool false |))); + M.alloc (| M.of_value (| Value.Bool false |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in @@ -6703,7 +6948,7 @@ Module net. } } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6722,7 +6967,7 @@ Module net. "core::net::ip_addr::IpAddr::V4", 0 |) in - M.alloc (| Value.Bool false |))); + M.alloc (| M.of_value (| Value.Bool false |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in @@ -6767,26 +7012,29 @@ Module net. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - Ty.path "core::net::ip_addr::Ipv6Addr", - [], - "cmp", - [] - |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "core::net::ip_addr::Ipv6Addr", + [], + "cmp", + [] + |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6809,7 +7057,7 @@ Module net. } } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6829,9 +7077,14 @@ Module net. 0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Less" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -6880,7 +7133,7 @@ Module net. } } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6900,9 +7153,16 @@ Module net. 0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::cmp::Ordering::Greater" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -6948,7 +7208,7 @@ Module net. self.segments().cmp(&other.segments()) } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7004,7 +7264,7 @@ Module net. ip.to_bits() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ip ] => ltac:(M.monadic @@ -7032,7 +7292,7 @@ Module net. Ipv6Addr::from_bits(ip) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ip ] => ltac:(M.monadic @@ -7064,12 +7324,16 @@ Module net. Ipv6Addr { octets } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ octets ] => ltac:(M.monadic (let octets := M.alloc (| octets |) in - Value.StructRecord "core::net::ip_addr::Ipv6Addr" [ ("octets", M.read (| octets |)) ])) + M.of_value (| + Value.StructRecord + "core::net::ip_addr::Ipv6Addr" + [ ("octets", A.to_value (M.read (| octets |))) ] + |))) | _, _ => M.impossible end. @@ -7090,7 +7354,7 @@ Module net. Ipv6Addr::new(a, b, c, d, e, f, g, h) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ segments ] => ltac:(M.monadic @@ -7159,25 +7423,28 @@ Module net. IpAddr::V6(Ipv6Addr::from(segments)) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ segments ] => ltac:(M.monadic (let segments := M.alloc (| segments |) in - Value.StructTuple - "core::net::ip_addr::IpAddr::V6" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "core::net::ip_addr::Ipv6Addr", - [ Ty.apply (Ty.path "array") [ Ty.path "u16" ] ], - "from", - [] - |), - [ M.read (| segments |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::net::ip_addr::IpAddr::V6" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "core::net::ip_addr::Ipv6Addr", + [ Ty.apply (Ty.path "array") [ Ty.path "u16" ] ], + "from", + [] + |), + [ M.read (| segments |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7203,7 +7470,7 @@ Module net. self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7270,12 +7537,12 @@ Module net. let _ := M.write (| M.read (| octet |), - UnOp.Pure.not (M.read (| M.read (| octet |) |)) + UnOp.Pure.not (| M.read (| M.read (| octet |) |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -7304,7 +7571,7 @@ Module net. !*self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7345,7 +7612,7 @@ Module net. self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7412,12 +7679,12 @@ Module net. let _ := M.write (| M.read (| octet |), - UnOp.Pure.not (M.read (| M.read (| octet |) |)) + UnOp.Pure.not (| M.read (| M.read (| octet |) |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -7446,7 +7713,7 @@ Module net. !*self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7483,7 +7750,7 @@ Module net. } } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7595,10 +7862,10 @@ Module net. [ M.read (| lhs |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -7622,7 +7889,7 @@ Module net. self.$bitop_assign( *rhs); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7642,7 +7909,7 @@ Module net. [ M.read (| self |); M.read (| M.read (| rhs |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7668,7 +7935,7 @@ Module net. self } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7714,7 +7981,7 @@ Module net. self } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7762,7 +8029,7 @@ Module net. lhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7810,7 +8077,7 @@ Module net. lhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7856,7 +8123,7 @@ Module net. } } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7968,10 +8235,10 @@ Module net. [ M.read (| lhs |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -7995,7 +8262,7 @@ Module net. self.$bitop_assign( *rhs); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8015,7 +8282,7 @@ Module net. [ M.read (| self |); M.read (| M.read (| rhs |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8041,7 +8308,7 @@ Module net. self } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8087,7 +8354,7 @@ Module net. self } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8135,7 +8402,7 @@ Module net. lhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8183,7 +8450,7 @@ Module net. lhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8229,7 +8496,7 @@ Module net. } } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8341,10 +8608,10 @@ Module net. [ M.read (| lhs |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -8368,7 +8635,7 @@ Module net. self.$bitop_assign( *rhs); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8388,7 +8655,7 @@ Module net. [ M.read (| self |); M.read (| M.read (| rhs |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8414,7 +8681,7 @@ Module net. self } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8460,7 +8727,7 @@ Module net. self } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8508,7 +8775,7 @@ Module net. lhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8556,7 +8823,7 @@ Module net. lhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8602,7 +8869,7 @@ Module net. } } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8714,10 +8981,10 @@ Module net. [ M.read (| lhs |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -8741,7 +9008,7 @@ Module net. self.$bitop_assign( *rhs); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8761,7 +9028,7 @@ Module net. [ M.read (| self |); M.read (| M.read (| rhs |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8787,7 +9054,7 @@ Module net. self } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8833,7 +9100,7 @@ Module net. self } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8881,7 +9148,7 @@ Module net. lhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8929,7 +9196,7 @@ Module net. lhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic diff --git a/CoqOfRust/core/net/parser.v b/CoqOfRust/core/net/parser.v index 024d161b9..75a1a449f 100644 --- a/CoqOfRust/core/net/parser.v +++ b/CoqOfRust/core/net/parser.v @@ -11,15 +11,15 @@ Module net. (* const ZERO: Self = 0; *) (* Ty.path "u8" *) - Definition value_ZERO : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 0 |))). + Definition value_ZERO : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). (* fn checked_mul(&self, other: u32) -> Option { Self::checked_mul( *self, other.try_into().ok()?) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -125,7 +125,7 @@ Module net. Self::checked_add( *self, other.try_into().ok()?) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -244,15 +244,15 @@ Module net. (* const ZERO: Self = 0; *) (* Ty.path "u16" *) - Definition value_ZERO : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U16 0 |))). + Definition value_ZERO : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). (* fn checked_mul(&self, other: u32) -> Option { Self::checked_mul( *self, other.try_into().ok()?) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -358,7 +358,7 @@ Module net. Self::checked_add( *self, other.try_into().ok()?) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -477,15 +477,15 @@ Module net. (* const ZERO: Self = 0; *) (* Ty.path "u32" *) - Definition value_ZERO : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 0 |))). + Definition value_ZERO : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). (* fn checked_mul(&self, other: u32) -> Option { Self::checked_mul( *self, other.try_into().ok()?) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -591,7 +591,7 @@ Module net. Self::checked_add( *self, other.try_into().ok()?) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -721,12 +721,16 @@ Module net. Parser { state: input } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ input ] => ltac:(M.monadic (let input := M.alloc (| input |) in - Value.StructRecord "core::net::parser::Parser" [ ("state", M.read (| input |)) ])) + M.of_value (| + Value.StructRecord + "core::net::parser::Parser" + [ ("state", A.to_value (M.read (| input |))) ] + |))) | _, _ => M.impossible end. @@ -745,7 +749,7 @@ Module net. result } *) - Definition read_atomically (τ : list Ty.t) (α : list Value.t) : M := + Definition read_atomically (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ self; inner ] => ltac:(M.monadic @@ -773,12 +777,15 @@ Module net. "call_once", [] |), - [ M.read (| inner |); Value.Tuple [ M.read (| self |) ] ] + [ + M.read (| inner |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |) + ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -805,8 +812,8 @@ Module net. |), M.read (| state |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in result @@ -826,7 +833,7 @@ Module net. if self.state.is_empty() { result } else { None }.ok_or(AddrParseError(kind)) } *) - Definition parse_with (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ self; inner; kind ] => ltac:(M.monadic @@ -847,7 +854,10 @@ Module net. "call_once", [] |), - [ M.read (| inner |); Value.Tuple [ M.read (| self |) ] ] + [ + M.read (| inner |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |) + ] |) |) in M.alloc (| @@ -860,7 +870,7 @@ Module net. [ M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -892,11 +902,17 @@ Module net. result)); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |); - Value.StructTuple "core::net::parser::AddrParseError" [ M.read (| kind |) ] + M.of_value (| + Value.StructTuple + "core::net::parser::AddrParseError" + [ A.to_value (M.read (| kind |)) ] + |) ] |) |) @@ -911,7 +927,7 @@ Module net. self.state.first().map(|&b| char::from(b)) } *) - Definition peek_char (τ : list Ty.t) (α : list Value.t) : M := + Definition peek_char (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -946,8 +962,8 @@ Module net. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -971,7 +987,8 @@ Module net. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -987,7 +1004,7 @@ Module net. }) } *) - Definition read_char (τ : list Ty.t) (α : list Value.t) : M := + Definition read_char (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1037,8 +1054,8 @@ Module net. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1078,7 +1095,8 @@ Module net. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1093,7 +1111,7 @@ Module net. }) } *) - Definition read_given_char (τ : list Ty.t) (α : list Value.t) : M := + Definition read_given_char (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; target ] => ltac:(M.monadic @@ -1113,8 +1131,8 @@ Module net. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1144,8 +1162,8 @@ Module net. |), [ M.read (| p |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1157,16 +1175,19 @@ Module net. (let c := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| c |)) - (M.read (| target |)) + BinOp.Pure.eq (| + M.read (| c |), + M.read (| target |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1174,16 +1195,25 @@ Module net. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |))) ] |) @@ -1191,13 +1221,15 @@ Module net. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1219,7 +1251,7 @@ Module net. }) } *) - Definition read_separator (τ : list Ty.t) (α : list Value.t) : M := + Definition read_separator (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ self; sep; index; inner ] => ltac:(M.monadic @@ -1241,8 +1273,8 @@ Module net. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1255,16 +1287,17 @@ Module net. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| index |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| index |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1346,8 +1379,10 @@ Module net. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1366,14 +1401,18 @@ Module net. "call_once", [] |), - [ M.read (| inner |); Value.Tuple [ M.read (| p |) ] ] + [ + M.read (| inner |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| p |)) ] |) + ] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1415,7 +1454,7 @@ Module net. }) } *) - Definition read_number (τ : list Ty.t) (α : list Value.t) : M := + Definition read_number (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ self; radix; max_digits; allow_zero_prefix ] => ltac:(M.monadic @@ -1437,8 +1476,8 @@ Module net. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1455,7 +1494,8 @@ Module net. "core::net::parser::ReadNumberHelper::ZERO" |) |) in - let digit_count := M.alloc (| Value.Integer Integer.Usize 0 |) in + let digit_count := + M.alloc (| M.of_value (| Value.Integer 0 |) |) in let has_leading_zero := M.alloc (| M.call_closure (| @@ -1484,9 +1524,12 @@ Module net. |) |); M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.UnicodeChar 48 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.UnicodeChar 48 |)) + ] + |) |) ] |) @@ -1495,7 +1538,7 @@ Module net. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1526,8 +1569,8 @@ Module net. |), [ M.read (| p |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1650,7 +1693,8 @@ Module net. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -1832,12 +1876,13 @@ Module net. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1850,16 +1895,19 @@ Module net. |) in let max_digits := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| digit_count |)) - (M.read (| max_digits |)) + BinOp.Pure.gt (| + M.read (| digit_count |), + M.read (| max_digits |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1870,21 +1918,27 @@ Module net. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => @@ -1898,7 +1952,7 @@ Module net. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1906,16 +1960,17 @@ Module net. |))) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| digit_count |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| digit_count |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1923,12 +1978,14 @@ Module net. Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1937,15 +1994,17 @@ Module net. (M.alloc (| LogicalOp.and (| LogicalOp.and (| - UnOp.Pure.not - (M.read (| allow_zero_prefix |)), + UnOp.Pure.not (| + M.read (| allow_zero_prefix |) + |), ltac:(M.monadic (M.read (| has_leading_zero |))) |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| digit_count |)) - (Value.Integer Integer.Usize 1))) + (BinOp.Pure.gt (| + M.read (| digit_count |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := @@ -1954,16 +2013,20 @@ Module net. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| result |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| result |)) ] + |) |))) ] |))) @@ -1973,7 +2036,8 @@ Module net. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1998,7 +2062,7 @@ Module net. }) } *) - Definition read_ipv4_addr (τ : list Ty.t) (α : list Value.t) : M := + Definition read_ipv4_addr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2019,8 +2083,8 @@ Module net. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2032,7 +2096,9 @@ Module net. (let p := M.copy (| γ |) in M.read (| let groups := - M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |) in + M.alloc (| + repeat (| M.of_value (| Value.Integer 0 |), 4 |) + |) in let _ := M.use (M.match_operator (| @@ -2070,7 +2136,7 @@ Module net. "iter_mut", [] |), - [ (* Unsize *) M.pointer_coercion groups ] + [ (* Unsize *) M.pointer_coercion (| groups |) ] |) ] |) @@ -2180,10 +2246,12 @@ Module net. |), [ M.read (| p |); - Value.UnicodeChar 46; + M.of_value (| + Value.UnicodeChar 46 + |); M.read (| i |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2213,25 +2281,33 @@ Module net. M.read (| p |); - Value.Integer - Integer.U32 - 10; - Value.StructTuple - "core::option::Option::Some" - [ - Value.Integer - Integer.Usize - 3 - ]; - Value.Bool - false + M.of_value (| + Value.Integer + 10 + |); + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Integer + 3 + |)) + ] + |); + M.of_value (| + Value.Bool + false + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -2299,34 +2375,40 @@ Module net. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.apply (Ty.path "array") [ Ty.path "u8" ], - [ Ty.path "core::net::ip_addr::Ipv4Addr" ], - "into", - [] - |), - [ M.read (| groups |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [ Ty.path "core::net::ip_addr::Ipv4Addr" ], + "into", + [] + |), + [ M.read (| groups |) ] + |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2402,7 +2484,7 @@ Module net. }) } *) - Definition read_ipv6_addr (τ : list Ty.t) (α : list Value.t) : M := + Definition read_ipv6_addr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2423,8 +2505,8 @@ Module net. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2436,7 +2518,9 @@ Module net. (let p := M.copy (| γ |) in M.read (| let head := - M.alloc (| repeat (Value.Integer Integer.U16 0) 8 |) in + M.alloc (| + repeat (| M.of_value (| Value.Integer 0 |), 8 |) + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -2445,7 +2529,8 @@ Module net. "read_groups.read_ipv6_addr", [] |), - [ M.read (| p |); (* Unsize *) M.pointer_coercion head ] + [ M.read (| p |); (* Unsize *) M.pointer_coercion (| head |) + ] |) |), [ @@ -2457,16 +2542,17 @@ Module net. let head_ipv4 := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| head_size |)) - (Value.Integer Integer.Usize 8) + BinOp.Pure.eq (| + M.read (| head_size |), + M.of_value (| Value.Integer 8 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2477,36 +2563,40 @@ Module net. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.apply - (Ty.path "array") - [ Ty.path "u16" ], - [ - Ty.path - "core::net::ip_addr::Ipv6Addr" - ], - "into", - [] - |), - [ M.read (| head |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply + (Ty.path "array") + [ Ty.path "u16" ], + [ + Ty.path + "core::net::ip_addr::Ipv6Addr" + ], + "into", + [] + |), + [ M.read (| head |) ] + |)) + ] + |) |) |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2520,15 +2610,18 @@ Module net. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2551,7 +2644,10 @@ Module net. "read_given_char", [] |), - [ M.read (| p |); Value.UnicodeChar 58 ] + [ + M.read (| p |); + M.of_value (| Value.UnicodeChar 58 |) + ] |) ] |) @@ -2628,7 +2724,10 @@ Module net. "read_given_char", [] |), - [ M.read (| p |); Value.UnicodeChar 58 ] + [ + M.read (| p |); + M.of_value (| Value.UnicodeChar 58 |) + ] |) ] |) @@ -2686,14 +2785,18 @@ Module net. ] |) in let tail := - M.alloc (| repeat (Value.Integer Integer.U16 0) 7 |) in + M.alloc (| + repeat (| M.of_value (| Value.Integer 0 |), 7 |) + |) in let limit := M.alloc (| BinOp.Panic.sub (| - Value.Integer Integer.Usize 8, + Integer.Usize, + M.of_value (| Value.Integer 8 |), BinOp.Panic.add (| + Integer.Usize, M.read (| head_size |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -2721,9 +2824,14 @@ Module net. |), [ tail; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| limit |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value (M.read (| limit |))) + ] + |) ] |) ] @@ -2765,17 +2873,26 @@ Module net. |), [ head; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.sub (| - Value.Integer Integer.Usize 8, - M.read (| tail_size |) - |)); - ("end_", - Value.Integer Integer.Usize 8) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.of_value (| + Value.Integer 8 + |), + M.read (| tail_size |) + |))); + ("end_", + A.to_value + (M.of_value (| + Value.Integer 8 + |))) + ] + |) ] |); M.call_closure (| @@ -2795,32 +2912,43 @@ Module net. |), [ tail; - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| tail_size |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| tail_size |))) + ] + |) ] |) ] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.apply - (Ty.path "array") - [ Ty.path "u16" ], - [ Ty.path "core::net::ip_addr::Ipv6Addr" - ], - "into", - [] - |), - [ M.read (| head |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply + (Ty.path "array") + [ Ty.path "u16" ], + [ + Ty.path + "core::net::ip_addr::Ipv6Addr" + ], + "into", + [] + |), + [ M.read (| head |) ] + |)) + ] + |) |))) ] |))) @@ -2830,7 +2958,8 @@ Module net. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2844,7 +2973,7 @@ Module net. self.read_ipv4_addr().map(IpAddr::V4).or_else(move || self.read_ipv6_addr().map(IpAddr::V6)) } *) - Definition read_ip_addr (τ : list Ty.t) (α : list Value.t) : M := + Definition read_ip_addr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2884,11 +3013,11 @@ Module net. |), [ M.read (| self |) ] |); - M.constructor_as_closure "core::net::ip_addr::IpAddr::V4" + M.constructor_as_closure (| "core::net::ip_addr::IpAddr::V4" |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2919,13 +3048,14 @@ Module net. |), [ M.read (| self |) ] |); - M.constructor_as_closure "core::net::ip_addr::IpAddr::V6" + M.constructor_as_closure (| "core::net::ip_addr::IpAddr::V6" |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2942,7 +3072,7 @@ Module net. }) } *) - Definition read_port (τ : list Ty.t) (α : list Value.t) : M := + Definition read_port (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2961,8 +3091,8 @@ Module net. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2993,7 +3123,10 @@ Module net. "read_given_char", [] |), - [ M.read (| p |); Value.UnicodeChar 58 ] + [ + M.read (| p |); + M.of_value (| Value.UnicodeChar 58 |) + ] |) ] |) @@ -3053,9 +3186,11 @@ Module net. |), [ M.read (| p |); - Value.Integer Integer.U32 10; - Value.StructTuple "core::option::Option::None" []; - Value.Bool true + M.of_value (| Value.Integer 10 |); + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |); + M.of_value (| Value.Bool true |) ] |) |) @@ -3063,7 +3198,8 @@ Module net. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3079,7 +3215,7 @@ Module net. }) } *) - Definition read_scope_id (τ : list Ty.t) (α : list Value.t) : M := + Definition read_scope_id (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3098,8 +3234,8 @@ Module net. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3130,7 +3266,10 @@ Module net. "read_given_char", [] |), - [ M.read (| p |); Value.UnicodeChar 37 ] + [ + M.read (| p |); + M.of_value (| Value.UnicodeChar 37 |) + ] |) ] |) @@ -3190,9 +3329,11 @@ Module net. |), [ M.read (| p |); - Value.Integer Integer.U32 10; - Value.StructTuple "core::option::Option::None" []; - Value.Bool true + M.of_value (| Value.Integer 10 |); + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |); + M.of_value (| Value.Bool true |) ] |) |) @@ -3200,7 +3341,8 @@ Module net. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3218,7 +3360,7 @@ Module net. }) } *) - Definition read_socket_addr_v4 (τ : list Ty.t) (α : list Value.t) : M := + Definition read_socket_addr_v4 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3239,8 +3381,8 @@ Module net. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3406,24 +3548,28 @@ Module net. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::socket_addr::SocketAddrV4", - "new", - [] - |), - [ M.read (| ip |); M.read (| port |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::net::socket_addr::SocketAddrV4", + "new", + [] + |), + [ M.read (| ip |); M.read (| port |) ] + |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3445,7 +3591,7 @@ Module net. }) } *) - Definition read_socket_addr_v6 (τ : list Ty.t) (α : list Value.t) : M := + Definition read_socket_addr_v6 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3466,8 +3612,8 @@ Module net. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3498,7 +3644,10 @@ Module net. "read_given_char", [] |), - [ M.read (| p |); Value.UnicodeChar 91 ] + [ + M.read (| p |); + M.of_value (| Value.UnicodeChar 91 |) + ] |) ] |) @@ -3648,7 +3797,7 @@ Module net. |), [ M.read (| p |) ] |); - Value.Integer Integer.U32 0 + M.of_value (| Value.Integer 0 |) ] |) |) in @@ -3672,7 +3821,10 @@ Module net. "read_given_char", [] |), - [ M.read (| p |); Value.UnicodeChar 93 ] + [ + M.read (| p |); + M.of_value (| Value.UnicodeChar 93 |) + ] |) ] |) @@ -3804,29 +3956,33 @@ Module net. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::socket_addr::SocketAddrV6", - "new", - [] - |), - [ - M.read (| ip |); - M.read (| port |); - Value.Integer Integer.U32 0; - M.read (| scope_id |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::net::socket_addr::SocketAddrV6", + "new", + [] + |), + [ + M.read (| ip |); + M.read (| port |); + M.of_value (| Value.Integer 0 |); + M.read (| scope_id |) + ] + |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3842,7 +3998,7 @@ Module net. .or_else(|| self.read_socket_addr_v6().map(SocketAddr::V6)) } *) - Definition read_socket_addr (τ : list Ty.t) (α : list Value.t) : M := + Definition read_socket_addr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3884,11 +4040,11 @@ Module net. |), [ M.read (| self |) ] |); - M.constructor_as_closure "core::net::socket_addr::SocketAddr::V4" + M.constructor_as_closure (| "core::net::socket_addr::SocketAddr::V4" |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3919,14 +4075,16 @@ Module net. |), [ M.read (| self |) ] |); - M.constructor_as_closure + M.constructor_as_closure (| "core::net::socket_addr::SocketAddr::V6" + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3944,7 +4102,7 @@ Module net. Parser::new(b).parse_with(|p| p.read_ip_addr(), AddrKind::Ip) } *) - Definition parse_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic @@ -3970,8 +4128,8 @@ Module net. [ M.read (| b |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3992,8 +4150,9 @@ Module net. ] |) | _ => M.impossible (||) - end)); - Value.StructTuple "core::net::parser::AddrKind::Ip" [] + end) + |); + M.of_value (| Value.StructTuple "core::net::parser::AddrKind::Ip" [] |) ] |))) | _, _ => M.impossible @@ -4013,7 +4172,7 @@ Module net. Self::parse_ascii(s.as_bytes()) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -4056,40 +4215,51 @@ Module net. } } *) - Definition parse_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic (let b := M.alloc (| b |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| b |) ] - |)) - (Value.Integer Integer.Usize 15) + |), + M.of_value (| Value.Integer 15 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "core::net::parser::AddrParseError" - [ Value.StructTuple "core::net::parser::AddrKind::Ipv4" [] ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::net::parser::AddrParseError" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::net::parser::AddrKind::Ipv4" [] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -4125,8 +4295,8 @@ Module net. [ M.read (| b |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4147,8 +4317,11 @@ Module net. ] |) | _ => M.impossible (||) - end)); - Value.StructTuple "core::net::parser::AddrKind::Ipv4" [] + end) + |); + M.of_value (| + Value.StructTuple "core::net::parser::AddrKind::Ipv4" [] + |) ] |) |))) @@ -4172,7 +4345,7 @@ Module net. Self::parse_ascii(s.as_bytes()) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -4210,7 +4383,7 @@ Module net. Parser::new(b).parse_with(|p| p.read_ipv6_addr(), AddrKind::Ipv6) } *) - Definition parse_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic @@ -4236,8 +4409,8 @@ Module net. [ M.read (| b |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4258,8 +4431,9 @@ Module net. ] |) | _ => M.impossible (||) - end)); - Value.StructTuple "core::net::parser::AddrKind::Ipv6" [] + end) + |); + M.of_value (| Value.StructTuple "core::net::parser::AddrKind::Ipv6" [] |) ] |))) | _, _ => M.impossible @@ -4279,7 +4453,7 @@ Module net. Self::parse_ascii(s.as_bytes()) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -4317,7 +4491,7 @@ Module net. Parser::new(b).parse_with(|p| p.read_socket_addr_v4(), AddrKind::SocketV4) } *) - Definition parse_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic @@ -4343,8 +4517,8 @@ Module net. [ M.read (| b |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4365,8 +4539,9 @@ Module net. ] |) | _ => M.impossible (||) - end)); - Value.StructTuple "core::net::parser::AddrKind::SocketV4" [] + end) + |); + M.of_value (| Value.StructTuple "core::net::parser::AddrKind::SocketV4" [] |) ] |))) | _, _ => M.impossible @@ -4386,7 +4561,7 @@ Module net. Self::parse_ascii(s.as_bytes()) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -4424,7 +4599,7 @@ Module net. Parser::new(b).parse_with(|p| p.read_socket_addr_v6(), AddrKind::SocketV6) } *) - Definition parse_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic @@ -4450,8 +4625,8 @@ Module net. [ M.read (| b |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4472,8 +4647,9 @@ Module net. ] |) | _ => M.impossible (||) - end)); - Value.StructTuple "core::net::parser::AddrKind::SocketV6" [] + end) + |); + M.of_value (| Value.StructTuple "core::net::parser::AddrKind::SocketV6" [] |) ] |))) | _, _ => M.impossible @@ -4493,7 +4669,7 @@ Module net. Self::parse_ascii(s.as_bytes()) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -4531,7 +4707,7 @@ Module net. Parser::new(b).parse_with(|p| p.read_socket_addr(), AddrKind::Socket) } *) - Definition parse_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic @@ -4557,8 +4733,8 @@ Module net. [ M.read (| b |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4579,8 +4755,9 @@ Module net. ] |) | _ => M.impossible (||) - end)); - Value.StructTuple "core::net::parser::AddrKind::Socket" [] + end) + |); + M.of_value (| Value.StructTuple "core::net::parser::AddrKind::Socket" [] |) ] |))) | _, _ => M.impossible @@ -4600,7 +4777,7 @@ Module net. Self::parse_ascii(s.as_bytes()) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -4674,7 +4851,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::parser::AddrKind". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4691,27 +4868,27 @@ Module net. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Ip" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Ip" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Ipv4" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Ipv4" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Ipv6" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Ipv6" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Socket" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Socket" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "SocketV4" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "SocketV4" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "SocketV6" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "SocketV6" |) |) |))) ] |) |) @@ -4732,7 +4909,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::parser::AddrKind". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4744,27 +4921,43 @@ Module net. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::net::parser::AddrKind::Ip" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::net::parser::AddrKind::Ip" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::net::parser::AddrKind::Ipv4" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::net::parser::AddrKind::Ipv4" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::net::parser::AddrKind::Ipv6" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::net::parser::AddrKind::Ipv6" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::net::parser::AddrKind::Socket" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::net::parser::AddrKind::Socket" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::net::parser::AddrKind::SocketV4" [] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::net::parser::AddrKind::SocketV4" [] + |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::net::parser::AddrKind::SocketV6" [] |))) + M.alloc (| + M.of_value (| + Value.StructTuple "core::net::parser::AddrKind::SocketV6" [] + |) + |))) ] |) |))) @@ -4794,7 +4987,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::parser::AddrKind". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4821,7 +5014,7 @@ Module net. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -4849,12 +5042,12 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::parser::AddrKind". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -4878,7 +5071,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::parser::AddrParseError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4892,16 +5085,17 @@ Module net. |), [ M.read (| f |); - M.read (| Value.String "AddrParseError" |); + M.read (| M.of_value (| Value.String "AddrParseError" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::net::parser::AddrParseError", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -4919,31 +5113,34 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::parser::AddrParseError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::net::parser::AddrParseError" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::net::parser::AddrKind", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::net::parser::AddrParseError", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::net::parser::AddrParseError" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::net::parser::AddrKind", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::net::parser::AddrParseError", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4970,7 +5167,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::parser::AddrParseError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5023,15 +5220,15 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::parser::AddrParseError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -5054,7 +5251,7 @@ Module net. fmt.write_str(self.description()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -5102,7 +5299,7 @@ Module net. } } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5117,25 +5314,37 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid IP address syntax" |) |))); + (M.alloc (| + M.read (| M.of_value (| Value.String "invalid IP address syntax" |) |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid IPv4 address syntax" |) |))); + (M.alloc (| + M.read (| M.of_value (| Value.String "invalid IPv4 address syntax" |) |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid IPv6 address syntax" |) |))); + (M.alloc (| + M.read (| M.of_value (| Value.String "invalid IPv6 address syntax" |) |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid socket address syntax" |) |))); + (M.alloc (| + M.read (| M.of_value (| Value.String "invalid socket address syntax" |) |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "invalid IPv4 socket address syntax" |) + M.read (| + M.of_value (| Value.String "invalid IPv4 socket address syntax" |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "invalid IPv6 socket address syntax" |) + M.read (| + M.of_value (| Value.String "invalid IPv6 socket address syntax" |) + |) |))) ] |) diff --git a/CoqOfRust/core/net/socket_addr.v b/CoqOfRust/core/net/socket_addr.v index f532111c8..49b71b245 100644 --- a/CoqOfRust/core/net/socket_addr.v +++ b/CoqOfRust/core/net/socket_addr.v @@ -38,19 +38,19 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddr". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -82,7 +82,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddr". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -111,11 +111,16 @@ Module net. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -223,20 +228,21 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddr". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -257,7 +263,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddr". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -352,7 +358,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddr". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -380,7 +386,11 @@ Module net. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -478,7 +488,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddr". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -516,7 +526,12 @@ Module net. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -634,19 +649,19 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV4". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -678,20 +693,21 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV4". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -723,7 +739,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV4". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -752,21 +768,22 @@ Module net. ] |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::net::socket_addr::SocketAddrV4", "port" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::net::socket_addr::SocketAddrV4", "port" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -783,7 +800,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV4". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -856,7 +873,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV4". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -941,7 +958,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV4". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -1021,24 +1038,24 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV6". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -1072,25 +1089,28 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV6". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |))) @@ -1124,7 +1144,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV6". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1155,55 +1175,58 @@ Module net. ] |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::net::socket_addr::SocketAddrV6", "port" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::net::socket_addr::SocketAddrV6", "port" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::net::socket_addr::SocketAddrV6", "flowinfo" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::net::socket_addr::SocketAddrV6", "flowinfo" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::net::socket_addr::SocketAddrV6", "scope_id" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::net::socket_addr::SocketAddrV6", "scope_id" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -1220,7 +1243,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV6". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1359,7 +1382,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV6". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1522,7 +1545,7 @@ Module net. Definition Self : Ty.t := Ty.path "core::net::socket_addr::SocketAddrV6". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -1613,7 +1636,7 @@ Module net. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ip; port ] => ltac:(M.monadic @@ -1633,18 +1656,21 @@ Module net. |) in let a := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::net::socket_addr::SocketAddr::V4" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::socket_addr::SocketAddrV4", - "new", - [] - |), - [ M.read (| a |); M.read (| port |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::net::socket_addr::SocketAddr::V4" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::net::socket_addr::SocketAddrV4", + "new", + [] + |), + [ M.read (| a |); M.read (| port |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1656,23 +1682,26 @@ Module net. |) in let a := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::net::socket_addr::SocketAddr::V6" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::socket_addr::SocketAddrV6", - "new", - [] - |), - [ - M.read (| a |); - M.read (| port |); - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0 - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::net::socket_addr::SocketAddr::V6" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::net::socket_addr::SocketAddrV6", + "new", + [] + |), + [ + M.read (| a |); + M.read (| port |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |)) + ] + |) |))) ] |) @@ -1690,7 +1719,7 @@ Module net. } } *) - Definition ip (τ : list Ty.t) (α : list Value.t) : M := + Definition ip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1709,20 +1738,23 @@ Module net. |) in let a := M.alloc (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::net::ip_addr::IpAddr::V4" - [ - M.read (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::socket_addr::SocketAddrV4", - "ip", - [] - |), - [ M.read (| a |) ] - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::net::ip_addr::IpAddr::V4" + [ + A.to_value + (M.read (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::net::socket_addr::SocketAddrV4", + "ip", + [] + |), + [ M.read (| a |) ] + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1734,20 +1766,23 @@ Module net. |) in let a := M.alloc (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::net::ip_addr::IpAddr::V6" - [ - M.read (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::socket_addr::SocketAddrV6", - "ip", - [] - |), - [ M.read (| a |) ] - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::net::ip_addr::IpAddr::V6" + [ + A.to_value + (M.read (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::net::socket_addr::SocketAddrV6", + "ip", + [] + |), + [ M.read (| a |) ] + |) + |)) + ] + |) |))) ] |) @@ -1767,7 +1802,7 @@ Module net. } } *) - Definition set_ip (τ : list Ty.t) (α : list Value.t) : M := + Definition set_ip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_ip ] => ltac:(M.monadic @@ -1775,7 +1810,11 @@ Module net. let new_ip := M.alloc (| new_ip |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| new_ip |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| new_ip |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -1878,7 +1917,7 @@ Module net. } } *) - Definition port (τ : list Ty.t) (α : list Value.t) : M := + Definition port (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1941,7 +1980,7 @@ Module net. } } *) - Definition set_port (τ : list Ty.t) (α : list Value.t) : M := + Definition set_port (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_port ] => ltac:(M.monadic @@ -2002,7 +2041,7 @@ Module net. matches!( *self, SocketAddr::V4(_)) } *) - Definition is_ipv4 (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ipv4 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2019,8 +2058,8 @@ Module net. "core::net::socket_addr::SocketAddr::V4", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -2034,7 +2073,7 @@ Module net. matches!( *self, SocketAddr::V6(_)) } *) - Definition is_ipv6 (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ipv6 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2051,8 +2090,8 @@ Module net. "core::net::socket_addr::SocketAddr::V6", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -2070,15 +2109,17 @@ Module net. SocketAddrV4 { ip, port } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ip; port ] => ltac:(M.monadic (let ip := M.alloc (| ip |) in let port := M.alloc (| port |) in - Value.StructRecord - "core::net::socket_addr::SocketAddrV4" - [ ("ip", M.read (| ip |)); ("port", M.read (| port |)) ])) + M.of_value (| + Value.StructRecord + "core::net::socket_addr::SocketAddrV4" + [ ("ip", A.to_value (M.read (| ip |))); ("port", A.to_value (M.read (| port |))) ] + |))) | _, _ => M.impossible end. @@ -2089,7 +2130,7 @@ Module net. &self.ip } *) - Definition ip (τ : list Ty.t) (α : list Value.t) : M := + Definition ip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2109,7 +2150,7 @@ Module net. self.ip = new_ip; } *) - Definition set_ip (τ : list Ty.t) (α : list Value.t) : M := + Definition set_ip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_ip ] => ltac:(M.monadic @@ -2125,7 +2166,7 @@ Module net. |), M.read (| new_ip |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2137,7 +2178,7 @@ Module net. self.port } *) - Definition port (τ : list Ty.t) (α : list Value.t) : M := + Definition port (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2159,7 +2200,7 @@ Module net. self.port = new_port; } *) - Definition set_port (τ : list Ty.t) (α : list Value.t) : M := + Definition set_port (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_port ] => ltac:(M.monadic @@ -2175,7 +2216,7 @@ Module net. |), M.read (| new_port |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2191,7 +2232,7 @@ Module net. SocketAddrV6 { ip, port, flowinfo, scope_id } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ip; port; flowinfo; scope_id ] => ltac:(M.monadic @@ -2199,14 +2240,16 @@ Module net. let port := M.alloc (| port |) in let flowinfo := M.alloc (| flowinfo |) in let scope_id := M.alloc (| scope_id |) in - Value.StructRecord - "core::net::socket_addr::SocketAddrV6" - [ - ("ip", M.read (| ip |)); - ("port", M.read (| port |)); - ("flowinfo", M.read (| flowinfo |)); - ("scope_id", M.read (| scope_id |)) - ])) + M.of_value (| + Value.StructRecord + "core::net::socket_addr::SocketAddrV6" + [ + ("ip", A.to_value (M.read (| ip |))); + ("port", A.to_value (M.read (| port |))); + ("flowinfo", A.to_value (M.read (| flowinfo |))); + ("scope_id", A.to_value (M.read (| scope_id |))) + ] + |))) | _, _ => M.impossible end. @@ -2217,7 +2260,7 @@ Module net. &self.ip } *) - Definition ip (τ : list Ty.t) (α : list Value.t) : M := + Definition ip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2237,7 +2280,7 @@ Module net. self.ip = new_ip; } *) - Definition set_ip (τ : list Ty.t) (α : list Value.t) : M := + Definition set_ip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_ip ] => ltac:(M.monadic @@ -2253,7 +2296,7 @@ Module net. |), M.read (| new_ip |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2265,7 +2308,7 @@ Module net. self.port } *) - Definition port (τ : list Ty.t) (α : list Value.t) : M := + Definition port (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2287,7 +2330,7 @@ Module net. self.port = new_port; } *) - Definition set_port (τ : list Ty.t) (α : list Value.t) : M := + Definition set_port (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_port ] => ltac:(M.monadic @@ -2303,7 +2346,7 @@ Module net. |), M.read (| new_port |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2315,7 +2358,7 @@ Module net. self.flowinfo } *) - Definition flowinfo (τ : list Ty.t) (α : list Value.t) : M := + Definition flowinfo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2337,7 +2380,7 @@ Module net. self.flowinfo = new_flowinfo; } *) - Definition set_flowinfo (τ : list Ty.t) (α : list Value.t) : M := + Definition set_flowinfo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_flowinfo ] => ltac:(M.monadic @@ -2353,7 +2396,7 @@ Module net. |), M.read (| new_flowinfo |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2366,7 +2409,7 @@ Module net. self.scope_id } *) - Definition scope_id (τ : list Ty.t) (α : list Value.t) : M := + Definition scope_id (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2388,7 +2431,7 @@ Module net. self.scope_id = new_scope_id; } *) - Definition set_scope_id (τ : list Ty.t) (α : list Value.t) : M := + Definition set_scope_id (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_scope_id ] => ltac:(M.monadic @@ -2404,7 +2447,7 @@ Module net. |), M.read (| new_scope_id |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2421,12 +2464,16 @@ Module net. SocketAddr::V4(sock4) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ sock4 ] => ltac:(M.monadic (let sock4 := M.alloc (| sock4 |) in - Value.StructTuple "core::net::socket_addr::SocketAddr::V4" [ M.read (| sock4 |) ])) + M.of_value (| + Value.StructTuple + "core::net::socket_addr::SocketAddr::V4" + [ A.to_value (M.read (| sock4 |)) ] + |))) | _, _ => M.impossible end. @@ -2446,12 +2493,16 @@ Module net. SocketAddr::V6(sock6) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ sock6 ] => ltac:(M.monadic (let sock6 := M.alloc (| sock6 |) in - Value.StructTuple "core::net::socket_addr::SocketAddr::V6" [ M.read (| sock6 |) ])) + M.of_value (| + Value.StructTuple + "core::net::socket_addr::SocketAddr::V6" + [ A.to_value (M.read (| sock6 |)) ] + |))) | _, _ => M.impossible end. @@ -2471,7 +2522,7 @@ Module net. SocketAddr::new(pieces.0.into(), pieces.1) } *) - Definition from (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ pieces ] => @@ -2520,7 +2571,7 @@ Module net. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2594,7 +2645,7 @@ Module net. fmt::Display::fmt(self, fmt) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -2641,7 +2692,7 @@ Module net. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2649,7 +2700,7 @@ Module net. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2716,61 +2767,75 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String ":" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ":" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "core::net::ip_addr::Ipv4Addr" ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::socket_addr::SocketAddrV4", - "ip", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u16" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::net::socket_addr::SocketAddrV4", - "port", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "core::net::ip_addr::Ipv4Addr" ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV4", + "ip", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u16" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV4", + "port", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -2818,65 +2883,75 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String ":" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ":" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "core::net::ip_addr::Ipv4Addr" ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV4", - "ip", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u16" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV4", - "port", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "core::net::ip_addr::Ipv4Addr" ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV4", + "ip", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u16" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV4", + "port", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -2922,7 +2997,7 @@ Module net. fmt::Display::fmt(self, fmt) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -2977,7 +3052,7 @@ Module net. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2985,7 +3060,7 @@ Module net. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3052,7 +3127,7 @@ Module net. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U32 0 + Value.Integer 0 |) in M.alloc (| M.call_closure (| @@ -3071,65 +3146,80 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "[" |); - M.read (| Value.String "]:" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "[" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String "]:" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "core::net::ip_addr::Ipv6Addr" ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV6", - "ip", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u16" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV6", - "port", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "core::net::ip_addr::Ipv6Addr" + ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV6", + "ip", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u16" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV6", + "port", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -3155,74 +3245,93 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "[" |); - M.read (| Value.String "%" |); - M.read (| Value.String "]:" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "[" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String "%" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String "]:" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "core::net::ip_addr::Ipv6Addr" ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV6", - "ip", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ scope_id ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u16" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV6", - "port", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "core::net::ip_addr::Ipv6Addr" + ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV6", + "ip", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ scope_id ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u16" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV6", + "port", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -3272,7 +3381,7 @@ Module net. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U32 0 + Value.Integer 0 |) in M.alloc (| M.call_closure (| @@ -3293,68 +3402,82 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "[" |); - M.read (| Value.String "]:" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "[" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String "]:" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", [ - Ty.path - "core::net::ip_addr::Ipv6Addr" + Ty.apply + (Ty.path "&") + [ + Ty.path + "core::net::ip_addr::Ipv6Addr" + ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV6", - "ip", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u16" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV6", - "port", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV6", + "ip", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u16" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV6", + "port", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -3382,77 +3505,95 @@ Module net. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "[" |); - M.read (| Value.String "%" |); - M.read (| Value.String "]:" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "[" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String "%" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String "]:" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", [ - Ty.path - "core::net::ip_addr::Ipv6Addr" + Ty.apply + (Ty.path "&") + [ + Ty.path + "core::net::ip_addr::Ipv6Addr" + ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV6", - "ip", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ scope_id ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u16" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::net::socket_addr::SocketAddrV6", - "port", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV6", + "ip", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ scope_id ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u16" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::net::socket_addr::SocketAddrV6", + "port", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -3502,7 +3643,7 @@ Module net. fmt::Display::fmt(self, fmt) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic diff --git a/CoqOfRust/core/num/bignum.v b/CoqOfRust/core/num/bignum.v index c3155aaf9..6da3f3453 100644 --- a/CoqOfRust/core/num/bignum.v +++ b/CoqOfRust/core/num/bignum.v @@ -18,7 +18,7 @@ Module num. ((v >> <$ty>::BITS) as $ty, v as $ty) } *) - Definition full_mul_add (τ : list Ty.t) (α : list Value.t) : M := + Definition full_mul_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; other2; carry ] => ltac:(M.monadic @@ -30,26 +30,33 @@ Module num. let v := M.alloc (| BinOp.Panic.add (| + Integer.U16, BinOp.Panic.add (| + Integer.U16, BinOp.Panic.mul (| - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| other |)) + 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 (| other2 |) |) |), - M.rust_cast (M.read (| carry |)) + 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" |) |) - |)); - M.rust_cast (M.read (| v |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| + M.read (| v |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |) + |)); + A.to_value (M.rust_cast (| M.read (| v |) |)) + ] + |) |) |))) | _, _ => M.impossible @@ -64,7 +71,7 @@ Module num. ((lhs / rhs) as $ty, (lhs % rhs) as $ty) } *) - Definition full_div_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition full_div_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; borrow ] => ltac:(M.monadic @@ -74,24 +81,28 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt (M.read (| borrow |)) (M.read (| other |))) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| borrow |), + M.read (| other |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -104,35 +115,47 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: borrow < other" + M.of_value (| + Value.String "assertion failed: borrow < other" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let lhs := M.alloc (| - BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast (M.read (| borrow |)), + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| + M.rust_cast (| M.read (| borrow |) |), M.read (| M.get_constant (| "core::num::BITS" |) |) - |)) - (M.rust_cast (M.read (| self |))) + |), + 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 (| M.read (| lhs |), M.read (| rhs |) |)); - M.rust_cast (BinOp.Panic.rem (| M.read (| lhs |), M.read (| rhs |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.div (| Integer.U16, M.read (| lhs |), M.read (| rhs |) |) + |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.rem (| Integer.U16, M.read (| lhs |), M.read (| rhs |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -162,7 +185,7 @@ Module num. ((v >> <$ty>::BITS) as $ty, v as $ty) } *) - Definition full_mul_add (τ : list Ty.t) (α : list Value.t) : M := + Definition full_mul_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; other2; carry ] => ltac:(M.monadic @@ -174,26 +197,33 @@ Module num. let v := M.alloc (| BinOp.Panic.add (| + Integer.U32, BinOp.Panic.add (| + Integer.U32, BinOp.Panic.mul (| - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| other |)) + 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 (| other2 |) |) |), - M.rust_cast (M.read (| carry |)) + 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" |) |) - |)); - M.rust_cast (M.read (| v |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| + M.read (| v |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |) + |)); + A.to_value (M.rust_cast (| M.read (| v |) |)) + ] + |) |) |))) | _, _ => M.impossible @@ -208,7 +238,7 @@ Module num. ((lhs / rhs) as $ty, (lhs % rhs) as $ty) } *) - Definition full_div_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition full_div_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; borrow ] => ltac:(M.monadic @@ -218,24 +248,28 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt (M.read (| borrow |)) (M.read (| other |))) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| borrow |), + M.read (| other |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -248,35 +282,47 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: borrow < other" + M.of_value (| + Value.String "assertion failed: borrow < other" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let lhs := M.alloc (| - BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast (M.read (| borrow |)), + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| + M.rust_cast (| M.read (| borrow |) |), M.read (| M.get_constant (| "core::num::BITS" |) |) - |)) - (M.rust_cast (M.read (| self |))) + |), + 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 (| M.read (| lhs |), M.read (| rhs |) |)); - M.rust_cast (BinOp.Panic.rem (| M.read (| lhs |), M.read (| rhs |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.div (| Integer.U32, M.read (| lhs |), M.read (| rhs |) |) + |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.rem (| Integer.U32, M.read (| lhs |), M.read (| rhs |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -306,7 +352,7 @@ Module num. ((v >> <$ty>::BITS) as $ty, v as $ty) } *) - Definition full_mul_add (τ : list Ty.t) (α : list Value.t) : M := + Definition full_mul_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; other2; carry ] => ltac:(M.monadic @@ -318,26 +364,33 @@ Module num. let v := M.alloc (| BinOp.Panic.add (| + Integer.U64, BinOp.Panic.add (| + Integer.U64, BinOp.Panic.mul (| - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| other |)) + 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 (| other2 |) |) |), - M.rust_cast (M.read (| carry |)) + 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" |) |) - |)); - M.rust_cast (M.read (| v |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| + M.read (| v |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |) + |)); + A.to_value (M.rust_cast (| M.read (| v |) |)) + ] + |) |) |))) | _, _ => M.impossible @@ -352,7 +405,7 @@ Module num. ((lhs / rhs) as $ty, (lhs % rhs) as $ty) } *) - Definition full_div_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition full_div_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; borrow ] => ltac:(M.monadic @@ -362,24 +415,28 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt (M.read (| borrow |)) (M.read (| other |))) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| borrow |), + M.read (| other |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -392,35 +449,47 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: borrow < other" + M.of_value (| + Value.String "assertion failed: borrow < other" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let lhs := M.alloc (| - BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast (M.read (| borrow |)), + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| + M.rust_cast (| M.read (| borrow |) |), M.read (| M.get_constant (| "core::num::BITS" |) |) - |)) - (M.rust_cast (M.read (| self |))) + |), + 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 (| M.read (| lhs |), M.read (| rhs |) |)); - M.rust_cast (BinOp.Panic.rem (| M.read (| lhs |), M.read (| rhs |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + BinOp.Panic.div (| Integer.U64, M.read (| lhs |), M.read (| rhs |) |) + |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.rem (| Integer.U64, M.read (| lhs |), M.read (| rhs |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -438,16 +507,39 @@ Module num. ]. End Impl_core_num_bignum_FullOps_for_u32. - Definition value_SMALL_POW5 : Value.t := + Definition value_SMALL_POW5 : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Array - [ - Value.Tuple [ Value.Integer Integer.U64 125; Value.Integer Integer.Usize 3 ]; - Value.Tuple [ Value.Integer Integer.U64 15625; Value.Integer Integer.Usize 6 ]; - Value.Tuple [ Value.Integer Integer.U64 1220703125; Value.Integer Integer.Usize 13 ] - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 125 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15625 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1220703125 |)); + A.to_value (M.of_value (| Value.Integer 13 |)) + ] + |)) + ] + |) |))). Axiom Digit32 : (Ty.path "core::num::bignum::Digit32") = (Ty.path "u32"). @@ -470,25 +562,30 @@ Module num. $name { size: 1, base } } *) - Definition from_small (τ : list Ty.t) (α : list Value.t) : M := + Definition from_small (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let base := M.alloc (| repeat (Value.Integer Integer.U32 0) 40 |) in + let base := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 40 |) |) in let _ := M.write (| M.SubPointer.get_array_field (| base, - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.read (| v |) |) in M.alloc (| - Value.StructRecord - "core::num::bignum::Big32x40" - [ ("size", Value.Integer Integer.Usize 1); ("base", M.read (| base |)) ] + M.of_value (| + Value.StructRecord + "core::num::bignum::Big32x40" + [ + ("size", A.to_value (M.of_value (| Value.Integer 1 |))); + ("base", A.to_value (M.read (| base |))) + ] + |) |) |))) | _, _ => M.impossible @@ -508,33 +605,36 @@ Module num. $name { size: sz, base } } *) - Definition from_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let base := M.alloc (| repeat (Value.Integer Integer.U32 0) 40 |) in - let sz := M.alloc (| Value.Integer Integer.Usize 0 |) in + let base := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 40 |) |) in + let sz := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| v |)) (Value.Integer Integer.U64 0) + BinOp.Pure.gt (| + M.read (| v |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.write (| M.SubPointer.get_array_field (| base, sz |), - M.rust_cast (M.read (| v |)) + M.rust_cast (| M.read (| v |) |) |) in let _ := let β := v in @@ -549,9 +649,13 @@ Module num. let β := sz in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -559,7 +663,7 @@ Module num. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -567,9 +671,14 @@ Module num. |))) |) in M.alloc (| - Value.StructRecord - "core::num::bignum::Big32x40" - [ ("size", M.read (| sz |)); ("base", M.read (| base |)) ] + M.of_value (| + Value.StructRecord + "core::num::bignum::Big32x40" + [ + ("size", A.to_value (M.read (| sz |))); + ("base", A.to_value (M.read (| base |))) + ] + |) |) |))) | _, _ => M.impossible @@ -582,7 +691,7 @@ Module num. &self.base[..self.size] } *) - Definition digits (τ : list Ty.t) (α : list Value.t) : M := + Definition digits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -601,18 +710,21 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::Big32x40", - "size" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::Big32x40", + "size" + |) + |))) + ] + |) ] |))) | _, _ => M.impossible @@ -628,7 +740,7 @@ Module num. ((self.base[d] >> b) & 1) as u8 } *) - Definition get_bit (τ : list Ty.t) (α : list Value.t) : M := + Definition get_bit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -636,13 +748,21 @@ Module num. let i := M.alloc (| i |) in M.read (| let digitbits := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let d := M.alloc (| BinOp.Panic.div (| M.read (| i |), M.read (| digitbits |) |) |) in - let b := M.alloc (| BinOp.Panic.rem (| M.read (| i |), M.read (| digitbits |) |) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |) + |) in + let d := + M.alloc (| + BinOp.Panic.div (| Integer.Usize, M.read (| i |), M.read (| digitbits |) |) + |) in + let b := + M.alloc (| + BinOp.Panic.rem (| Integer.Usize, M.read (| i |), M.read (| digitbits |) |) + |) in M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -654,8 +774,10 @@ Module num. |) |), M.read (| b |) - |)) - (Value.Integer Integer.U32 1)) + |), + M.of_value (| Value.Integer 1 |) + |) + |) |) |))) | _, _ => M.impossible @@ -668,7 +790,7 @@ Module num. self.digits().iter().all(|&v| v == 0) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -705,8 +827,8 @@ Module num. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -717,11 +839,15 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let v := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| v |)) (Value.Integer Integer.U32 0))) + BinOp.Pure.eq (| + M.read (| v |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -742,14 +868,16 @@ Module num. } } *) - Definition bit_length (τ : list Ty.t) (α : list Value.t) : M := + Definition bit_length (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| let digitbits := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |) + |) in let digits := M.alloc (| M.call_closure (| @@ -786,8 +914,8 @@ Module num. [ M.read (| digits |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -798,11 +926,15 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let x := M.copy (| γ |) in - BinOp.Pure.ne (M.read (| x |)) (Value.Integer Integer.U32 0))) + BinOp.Pure.ne (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -820,22 +952,29 @@ Module num. let msd := M.copy (| γ0_0 |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| - BinOp.Panic.mul (| M.read (| msd |), M.read (| digitbits |) |), - M.rust_cast - (M.call_closure (| + Integer.Usize, + BinOp.Panic.mul (| + Integer.Usize, + M.read (| msd |), + M.read (| digitbits |) + |), + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u32", "ilog2", [] |), [ M.read (| M.SubPointer.get_array_field (| M.read (| digits |), msd |) |) ] - |)) + |) + |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -864,7 +1003,7 @@ Module num. self } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -893,7 +1032,7 @@ Module num. ] |) |) in - let carry := M.alloc (| Value.Bool false |) in + let carry := M.alloc (| M.of_value (| Value.Bool false |) |) in let _ := M.use (M.match_operator (| @@ -943,9 +1082,11 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |); M.call_closure (| @@ -966,9 +1107,11 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -1050,18 +1193,18 @@ Module num. let _ := M.write (| M.read (| a |), M.read (| v |) |) in let _ := M.write (| carry, M.read (| c |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1078,16 +1221,20 @@ Module num. |), sz |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) in let _ := let β := sz in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1123,7 +1270,7 @@ Module num. self } *) - Definition add_small (τ : list Ty.t) (α : list Value.t) : M := + Definition add_small (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1142,11 +1289,11 @@ Module num. "core::num::bignum::Big32x40", "base" |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |); M.read (| other |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |), @@ -1165,16 +1312,16 @@ Module num. "core::num::bignum::Big32x40", "base" |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.read (| v |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 1 |) in + let i := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1203,7 +1350,7 @@ Module num. i |) |); - Value.Integer Integer.U32 0; + M.of_value (| Value.Integer 0 |); M.read (| carry |) ] |) @@ -1233,11 +1380,12 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -1249,7 +1397,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1258,22 +1406,23 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| i |)) - (M.read (| + BinOp.Pure.gt (| + M.read (| i |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::bignum::Big32x40", "size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1289,8 +1438,9 @@ Module num. |), M.read (| i |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.read (| self |) |))) @@ -1319,7 +1469,7 @@ Module num. self } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1348,7 +1498,7 @@ Module num. ] |) |) in - let noborrow := M.alloc (| Value.Bool true |) in + let noborrow := M.alloc (| M.of_value (| Value.Bool true |) |) in let _ := M.use (M.match_operator (| @@ -1398,9 +1548,11 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |); M.call_closure (| @@ -1421,9 +1573,11 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -1488,7 +1642,7 @@ Module num. |), [ M.read (| M.read (| a |) |); - UnOp.Pure.not (M.read (| M.read (| b |) |)); + UnOp.Pure.not (| M.read (| M.read (| b |) |) |); M.read (| noborrow |) ] |) @@ -1505,33 +1659,37 @@ Module num. let _ := M.write (| M.read (| a |), M.read (| v |) |) in let _ := M.write (| noborrow, M.read (| c |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| UnOp.Pure.not (M.read (| noborrow |)) |)) in + (let γ := M.use (M.alloc (| UnOp.Pure.not (| M.read (| noborrow |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: noborrow" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: noborrow" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1567,7 +1725,7 @@ Module num. self } *) - Definition mul_small (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_small (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1582,7 +1740,7 @@ Module num. "size" |) |) in - let carry := M.alloc (| Value.Integer Integer.U32 0 |) in + let carry := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -1613,9 +1771,11 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -1685,25 +1845,28 @@ Module num. let _ := M.write (| M.read (| a |), M.read (| v |) |) in let _ := M.write (| carry, M.read (| c |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| carry |)) (Value.Integer Integer.U32 0) + BinOp.Pure.gt (| + M.read (| carry |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1723,10 +1886,14 @@ Module num. let β := sz in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1784,7 +1951,7 @@ Module num. self } *) - Definition mul_pow2 (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_pow2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; bits ] => ltac:(M.monadic @@ -1792,24 +1959,32 @@ Module num. let bits := M.alloc (| bits |) in M.read (| let digitbits := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |) + |) in let digits := - M.alloc (| BinOp.Panic.div (| M.read (| bits |), M.read (| digitbits |) |) |) in + M.alloc (| + BinOp.Panic.div (| Integer.Usize, M.read (| bits |), M.read (| digitbits |) |) + |) in let bits := - M.alloc (| BinOp.Panic.rem (| M.read (| bits |), M.read (| digitbits |) |) |) in + M.alloc (| + BinOp.Panic.rem (| Integer.Usize, M.read (| bits |), M.read (| digitbits |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| digits |)) - (Value.Integer Integer.Usize 40)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| digits |), + M.of_value (| Value.Integer 40 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1817,33 +1992,37 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: digits < 40" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: digits < 40" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply @@ -1889,22 +2068,28 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - BinOp.Panic.sub (| - Value.Integer Integer.Usize 40, - M.read (| digits |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.of_value (| + Value.Integer 40 + |), + M.read (| digits |) + |))) + ] + |) ] |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1915,15 +2100,18 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let v := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| v |)) - (Value.Integer Integer.U32 0))) + BinOp.Pure.eq (| + M.read (| v |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1936,46 +2124,50 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.base[40 - digits..].iter().all(|&v| v == 0)" + M.of_value (| + Value.String + "assertion failed: self.base[40 - digits..].iter().all(|&v| v == 0)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| - BinOp.Pure.eq - (M.read (| bits |)) - (Value.Integer Integer.Usize 0), + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| + M.read (| bits |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.shr (| + (BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1985,22 +2177,27 @@ Module num. |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| - Value.Integer Integer.Usize 40, + Integer.Usize, + M.of_value (| Value.Integer 40 |), M.read (| digits |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) |), BinOp.Panic.sub (| + Integer.Usize, M.read (| digitbits |), M.read (| bits |) |) - |)) - (Value.Integer Integer.U32 0))) - |)) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2013,18 +2210,21 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: bits == 0 || (self.base[40 - digits - 1] >> (digitbits - bits)) == 0" + M.of_value (| + Value.String + "assertion failed: bits == 0 || (self.base[40 - digits - 1] >> (digitbits - bits)) == 0" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2051,19 +2251,22 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::Big32x40", - "size" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::Big32x40", + "size" + |) + |))) + ] + |) ] |) ] @@ -2120,6 +2323,7 @@ Module num. |), M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| i |), M.read (| digits |) |) @@ -2136,10 +2340,10 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2156,12 +2360,14 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| digits |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| digits |))) + ] + |) ] |) |), @@ -2212,18 +2418,19 @@ Module num. |), i |), - Value.Integer Integer.U32 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let sz := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2236,14 +2443,17 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| bits |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| bits |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2260,27 +2470,33 @@ Module num. |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| last |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) |), - BinOp.Panic.sub (| M.read (| digitbits |), M.read (| bits |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| digitbits |), + M.read (| bits |) + |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| overflow |)) - (Value.Integer Integer.U32 0) + BinOp.Pure.gt (| + M.read (| overflow |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2304,12 +2520,14 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2342,16 +2560,20 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| digits |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| last |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| digits |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| last |))) + ] + |) ] |) ] @@ -2408,8 +2630,8 @@ Module num. |), i |), - BinOp.Pure.bit_or - (BinOp.Panic.shl (| + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -2421,8 +2643,8 @@ Module num. |) |), M.read (| bits |) - |)) - (BinOp.Panic.shr (| + |), + BinOp.Panic.shr (| M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -2432,22 +2654,25 @@ Module num. |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| i |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) |), BinOp.Panic.sub (| + Integer.Usize, M.read (| digitbits |), M.read (| bits |) |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2465,8 +2690,8 @@ Module num. β, BinOp.Panic.shl (| M.read (| β |), M.read (| bits |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2512,7 +2737,7 @@ Module num. self } *) - Definition mul_pow5 (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_pow5 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; e ] => ltac:(M.monadic @@ -2521,8 +2746,8 @@ Module num. M.read (| let table_index := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "trailing_zeros", [] |), [ M.call_closure (| @@ -2530,7 +2755,8 @@ Module num. [] |) ] - |)) + |) + |) |) in M.match_operator (| M.SubPointer.get_array_field (| @@ -2544,19 +2770,19 @@ 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 small_power := M.alloc (| M.rust_cast (| M.read (| small_power |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| e |)) (M.read (| small_e |)) + BinOp.Pure.ge (| M.read (| e |), M.read (| small_e |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -2578,9 +2804,13 @@ Module num. let β := e in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), M.read (| small_e |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.read (| small_e |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2590,14 +2820,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - let rest_power := M.alloc (| Value.Integer Integer.U32 1 |) in + let rest_power := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.use (M.match_operator (| @@ -2611,12 +2841,14 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| e |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| e |))) + ] + |) ] |) |), @@ -2661,14 +2893,15 @@ Module num. M.write (| β, BinOp.Panic.mul (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 5 + M.of_value (| Value.Integer 5 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2732,40 +2965,41 @@ Module num. self } *) - Definition mul_digits (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_digits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let ret := M.alloc (| repeat (Value.Integer Integer.U32 0) 40 |) in + let ret := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 40 |) |) in let retsz := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::bignum::Big32x40", "size" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u32" ], "len", [] |), [ M.read (| other |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2849,7 +3083,7 @@ Module num. (self, borrow) } *) - Definition div_rem_small (τ : list Ty.t) (α : list Value.t) : M := + Definition div_rem_small (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2858,15 +3092,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt (M.read (| other |)) (Value.Integer Integer.U32 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| other |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2874,11 +3112,15 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: other > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: other > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let sz := @@ -2889,7 +3131,7 @@ Module num. "size" |) |) in - let borrow := M.alloc (| Value.Integer Integer.U32 0 |) in + let borrow := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -2939,9 +3181,11 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -3021,16 +3265,20 @@ Module num. let _ := M.write (| M.read (| a |), M.read (| q |) |) in let _ := M.write (| borrow, M.read (| r |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| borrow |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| borrow |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -3074,7 +3322,7 @@ Module num. debug_assert!(r.base[r.size..].iter().all(|&d| d == 0)); } *) - Definition div_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition div_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; d; q; r ] => ltac:(M.monadic @@ -3085,23 +3333,25 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::bignum::Big32x40", "is_zero", [] |), [ M.read (| d |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3109,15 +3359,21 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: !d.is_zero()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: !d.is_zero()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let digitbits := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |) + |) in let _ := M.use (M.match_operator (| @@ -3147,7 +3403,7 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -3193,12 +3449,12 @@ Module num. let _ := M.write (| M.read (| digit |), - Value.Integer Integer.U32 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3231,7 +3487,7 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -3277,12 +3533,12 @@ Module num. let _ := M.write (| M.read (| digit |), - Value.Integer Integer.U32 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3308,9 +3564,9 @@ Module num. "core::num::bignum::Big32x40", "size" |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) in - let q_is_zero := M.alloc (| Value.Bool true |) in + let q_is_zero := M.alloc (| M.of_value (| Value.Bool true |) |) in let end_ := M.alloc (| M.call_closure (| @@ -3346,12 +3602,14 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| end_ |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) ] @@ -3406,7 +3664,7 @@ Module num. "mul_pow2", [] |), - [ M.read (| r |); Value.Integer Integer.Usize 1 ] + [ M.read (| r |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -3417,24 +3675,26 @@ Module num. "core::num::bignum::Big32x40", "base" |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.rust_cast - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| β |), + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::bignum::Big32x40", "get_bit", [] |), [ M.read (| self |); M.read (| i |) ] - |))) + |) + |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3484,6 +3744,7 @@ Module num. let digit_idx := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.read (| i |), M.read (| digitbits |) |) @@ -3491,13 +3752,14 @@ Module num. let bit_idx := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.read (| i |), M.read (| digitbits |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3515,19 +3777,24 @@ Module num. "size" |), BinOp.Panic.add (| + Integer.Usize, M.read (| digit_idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.write (| q_is_zero, - Value.Bool false + M.of_value (| Value.Bool false |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -3542,43 +3809,46 @@ Module num. |) in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), M.read (| bit_idx |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply @@ -3624,25 +3894,28 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| q |), - "core::num::bignum::Big32x40", - "size" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| q |), + "core::num::bignum::Big32x40", + "size" + |) + |))) + ] + |) ] |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3653,15 +3926,18 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let d := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| d |)) - (Value.Integer Integer.U32 0))) + BinOp.Pure.eq (| + M.read (| d |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3674,40 +3950,43 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: q.base[q.size..].iter().all(|&d| d == 0)" + M.of_value (| + Value.String + "assertion failed: q.base[q.size..].iter().all(|&d| d == 0)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply @@ -3753,25 +4032,28 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| r |), - "core::num::bignum::Big32x40", - "size" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| r |), + "core::num::bignum::Big32x40", + "size" + |) + |))) + ] + |) ] |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3782,15 +4064,18 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let d := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| d |)) - (Value.Integer Integer.U32 0))) + BinOp.Pure.eq (| + M.read (| d |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3803,21 +4088,24 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: r.base[r.size..].iter().all(|&d| d == 0)" + M.of_value (| + Value.String + "assertion failed: r.base[r.size..].iter().all(|&d| d == 0)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3833,7 +4121,7 @@ Module num. self.base[..] == other.base[..] } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3862,7 +4150,7 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -3879,7 +4167,7 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -3910,26 +4198,29 @@ Module num. crate::option::Option::Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - Ty.path "core::num::bignum::Big32x40", - [], - "cmp", - [] - |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "core::num::bignum::Big32x40", + [], + "cmp", + [] + |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3953,7 +4244,7 @@ Module num. lhs.cmp(rhs) } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4029,9 +4320,11 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -4088,9 +4381,11 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -4146,31 +4441,35 @@ Module num. Self { size: self.size, base: self.base } } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::num::bignum::Big32x40" - [ - ("size", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::Big32x40", - "size" - |) - |)); - ("base", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::Big32x40", - "base" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::num::bignum::Big32x40" + [ + ("size", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::Big32x40", + "size" + |) + |))); + ("base", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::Big32x40", + "base" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -4197,7 +4496,7 @@ Module num. crate::result::Result::Ok(()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4209,29 +4508,30 @@ Module num. let sz := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::bignum::Big32x40", "size" |) - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); + M.alloc (| M.of_value (| Value.Integer 1 |) |))); fun γ => ltac:(M.monadic (M.SubPointer.get_struct_record_field (| @@ -4245,8 +4545,9 @@ Module num. let digitlen := M.alloc (| BinOp.Panic.div (| - M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)), - Value.Integer Integer.Usize 4 + Integer.Usize, + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |), + M.of_value (| Value.Integer 4 |) |) |) in let _ := @@ -4279,63 +4580,89 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "" |) ] |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "u32" ] - |), - [ - M.SubPointer.get_array_field (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::Big32x40", - "base" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "u32" ] |), - M.alloc (| - BinOp.Panic.sub (| - M.read (| sz |), - Value.Integer Integer.Usize 1 + [ + M.SubPointer.get_array_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::Big32x40", + "base" + |), + M.alloc (| + BinOp.Panic.sub (| + Integer.Usize, + M.read (| sz |), + M.of_value (| Value.Integer 1 |) + |) + |) |) - |) - |) - ] - |) - ] - |)); + ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple - "core::fmt::rt::Alignment::Unknown" - []; - Value.Integer Integer.U32 4; - Value.StructTuple - "core::fmt::rt::Count::Implied" - []; - Value.StructTuple "core::fmt::rt::Count::Implied" [] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Alignment::Unknown" + [] + |); + M.of_value (| Value.Integer 4 |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -4449,15 +4776,19 @@ Module num. "core::num::bignum::Big32x40", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.read (| sz |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| sz |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) ] @@ -4539,74 +4870,102 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "_" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "_" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "u32" ] - |), - [ v ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "from_usize", - [] - |), - [ digitlen ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "u32" ] + |), + [ v ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "from_usize", + [] + |), + [ digitlen ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer - Integer.Usize - 0; - Value.UnicodeChar 32; - Value.StructTuple - "core::fmt::rt::Alignment::Unknown" - []; - Value.Integer - Integer.U32 - 8; - Value.StructTuple - "core::fmt::rt::Count::Implied" - []; - Value.StructTuple - "core::fmt::rt::Count::Param" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Placeholder", + "new", + [] + |), [ - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 0 + |); + M.of_value (| + Value.UnicodeChar 32 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Alignment::Unknown" + [] + |); + M.of_value (| + Value.Integer 8 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Param" + [ + A.to_value + (M.of_value (| + Value.Integer + 1 + |)) + ] + |) ] - ] - |) - ] - |)); + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path @@ -4677,14 +5036,20 @@ Module num. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -4717,25 +5082,30 @@ Module num. $name { size: 1, base } } *) - Definition from_small (τ : list Ty.t) (α : list Value.t) : M := + Definition from_small (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let base := M.alloc (| repeat (Value.Integer Integer.U8 0) 3 |) in + let base := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 3 |) |) in let _ := M.write (| M.SubPointer.get_array_field (| base, - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.read (| v |) |) in M.alloc (| - Value.StructRecord - "core::num::bignum::tests::Big8x3" - [ ("size", Value.Integer Integer.Usize 1); ("base", M.read (| base |)) ] + M.of_value (| + Value.StructRecord + "core::num::bignum::tests::Big8x3" + [ + ("size", A.to_value (M.of_value (| Value.Integer 1 |))); + ("base", A.to_value (M.read (| base |))) + ] + |) |) |))) | _, _ => M.impossible @@ -4755,26 +5125,29 @@ Module num. $name { size: sz, base } } *) - Definition from_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let base := M.alloc (| repeat (Value.Integer Integer.U8 0) 3 |) in - let sz := M.alloc (| Value.Integer Integer.Usize 0 |) in + let base := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 3 |) |) in + let sz := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| v |)) (Value.Integer Integer.U64 0) + BinOp.Pure.gt (| + M.read (| v |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4784,7 +5157,7 @@ Module num. let _ := M.write (| M.SubPointer.get_array_field (| base, sz |), - M.rust_cast (M.read (| v |)) + M.rust_cast (| M.read (| v |) |) |) in let _ := let β := v in @@ -4800,11 +5173,12 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4814,7 +5188,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4822,9 +5196,14 @@ Module num. |))) |) in M.alloc (| - Value.StructRecord - "core::num::bignum::tests::Big8x3" - [ ("size", M.read (| sz |)); ("base", M.read (| base |)) ] + M.of_value (| + Value.StructRecord + "core::num::bignum::tests::Big8x3" + [ + ("size", A.to_value (M.read (| sz |))); + ("base", A.to_value (M.read (| base |))) + ] + |) |) |))) | _, _ => M.impossible @@ -4837,7 +5216,7 @@ Module num. &self.base[..self.size] } *) - Definition digits (τ : list Ty.t) (α : list Value.t) : M := + Definition digits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4856,18 +5235,21 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::tests::Big8x3", - "size" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::tests::Big8x3", + "size" + |) + |))) + ] + |) ] |))) | _, _ => M.impossible @@ -4883,7 +5265,7 @@ Module num. ((self.base[d] >> b) & 1) as u8 } *) - Definition get_bit (τ : list Ty.t) (α : list Value.t) : M := + Definition get_bit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; i ] => ltac:(M.monadic @@ -4891,15 +5273,21 @@ Module num. let i := M.alloc (| i |) in M.read (| let digitbits := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |) + |) in let d := - M.alloc (| BinOp.Panic.div (| M.read (| i |), M.read (| digitbits |) |) |) in + M.alloc (| + BinOp.Panic.div (| Integer.Usize, M.read (| i |), M.read (| digitbits |) |) + |) in let b := - M.alloc (| BinOp.Panic.rem (| M.read (| i |), M.read (| digitbits |) |) |) in + M.alloc (| + BinOp.Panic.rem (| Integer.Usize, M.read (| i |), M.read (| digitbits |) |) + |) in M.use (M.alloc (| - BinOp.Pure.bit_and - (BinOp.Panic.shr (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -4911,8 +5299,9 @@ Module num. |) |), M.read (| b |) - |)) - (Value.Integer Integer.U8 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) |))) | _, _ => M.impossible @@ -4925,7 +5314,7 @@ Module num. self.digits().iter().all(|&v| v == 0) } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4962,8 +5351,8 @@ Module num. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4974,11 +5363,15 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let v := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| v |)) (Value.Integer Integer.U8 0))) + BinOp.Pure.eq (| + M.read (| v |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -4999,14 +5392,16 @@ Module num. } } *) - Definition bit_length (τ : list Ty.t) (α : list Value.t) : M := + Definition bit_length (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| let digitbits := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |) + |) in let digits := M.alloc (| M.call_closure (| @@ -5043,8 +5438,8 @@ Module num. [ M.read (| digits |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5055,13 +5450,15 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let x := M.copy (| γ |) in - BinOp.Pure.ne - (M.read (| x |)) - (Value.Integer Integer.U8 0))) + BinOp.Pure.ne (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -5079,22 +5476,29 @@ Module num. let msd := M.copy (| γ0_0 |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| - BinOp.Panic.mul (| M.read (| msd |), M.read (| digitbits |) |), - M.rust_cast - (M.call_closure (| + Integer.Usize, + BinOp.Panic.mul (| + Integer.Usize, + M.read (| msd |), + M.read (| digitbits |) + |), + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "ilog2", [] |), [ M.read (| M.SubPointer.get_array_field (| M.read (| digits |), msd |) |) ] - |)) + |) + |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -5123,7 +5527,7 @@ Module num. self } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5152,7 +5556,7 @@ Module num. ] |) |) in - let carry := M.alloc (| Value.Bool false |) in + let carry := M.alloc (| M.of_value (| Value.Bool false |) |) in let _ := M.use (M.match_operator (| @@ -5202,9 +5606,11 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |); M.call_closure (| @@ -5225,9 +5631,11 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -5309,18 +5717,18 @@ Module num. let _ := M.write (| M.read (| a |), M.read (| v |) |) in let _ := M.write (| carry, M.read (| c |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5337,16 +5745,20 @@ Module num. |), sz |), - Value.Integer Integer.U8 1 + M.of_value (| Value.Integer 1 |) |) in let _ := let β := sz in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -5382,7 +5794,7 @@ Module num. self } *) - Definition add_small (τ : list Ty.t) (α : list Value.t) : M := + Definition add_small (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5401,11 +5813,11 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |); M.read (| other |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |), @@ -5424,16 +5836,16 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.read (| v |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 1 |) in + let i := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5462,7 +5874,7 @@ Module num. i |) |); - Value.Integer Integer.U8 0; + M.of_value (| Value.Integer 0 |); M.read (| carry |) ] |) @@ -5493,11 +5905,12 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -5509,7 +5922,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -5518,22 +5931,23 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| i |)) - (M.read (| + BinOp.Pure.gt (| + M.read (| i |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::bignum::tests::Big8x3", "size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5549,8 +5963,9 @@ Module num. |), M.read (| i |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.read (| self |) |))) @@ -5579,7 +5994,7 @@ Module num. self } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5608,7 +6023,7 @@ Module num. ] |) |) in - let noborrow := M.alloc (| Value.Bool true |) in + let noborrow := M.alloc (| M.of_value (| Value.Bool true |) |) in let _ := M.use (M.match_operator (| @@ -5658,9 +6073,11 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |); M.call_closure (| @@ -5681,9 +6098,11 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -5748,7 +6167,7 @@ Module num. |), [ M.read (| M.read (| a |) |); - UnOp.Pure.not (M.read (| M.read (| b |) |)); + UnOp.Pure.not (| M.read (| M.read (| b |) |) |); M.read (| noborrow |) ] |) @@ -5765,33 +6184,38 @@ Module num. let _ := M.write (| M.read (| a |), M.read (| v |) |) in let _ := M.write (| noborrow, M.read (| c |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| UnOp.Pure.not (M.read (| noborrow |)) |)) in + (let γ := + M.use (M.alloc (| UnOp.Pure.not (| M.read (| noborrow |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: noborrow" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: noborrow" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -5827,7 +6251,7 @@ Module num. self } *) - Definition mul_small (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_small (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5842,7 +6266,7 @@ Module num. "size" |) |) in - let carry := M.alloc (| Value.Integer Integer.U8 0 |) in + let carry := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -5873,9 +6297,11 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -5945,25 +6371,28 @@ Module num. let _ := M.write (| M.read (| a |), M.read (| v |) |) in let _ := M.write (| carry, M.read (| c |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| carry |)) (Value.Integer Integer.U8 0) + BinOp.Pure.gt (| + M.read (| carry |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5983,10 +6412,14 @@ Module num. let β := sz in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6044,7 +6477,7 @@ Module num. self } *) - Definition mul_pow2 (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_pow2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; bits ] => ltac:(M.monadic @@ -6052,24 +6485,32 @@ Module num. let bits := M.alloc (| bits |) in M.read (| let digitbits := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |) + |) in let digits := - M.alloc (| BinOp.Panic.div (| M.read (| bits |), M.read (| digitbits |) |) |) in + M.alloc (| + BinOp.Panic.div (| Integer.Usize, M.read (| bits |), M.read (| digitbits |) |) + |) in let bits := - M.alloc (| BinOp.Panic.rem (| M.read (| bits |), M.read (| digitbits |) |) |) in + M.alloc (| + BinOp.Panic.rem (| Integer.Usize, M.read (| bits |), M.read (| digitbits |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| digits |)) - (Value.Integer Integer.Usize 3)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| digits |), + M.of_value (| Value.Integer 3 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6077,33 +6518,37 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: digits < 3" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: digits < 3" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply @@ -6150,22 +6595,28 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - BinOp.Panic.sub (| - Value.Integer Integer.Usize 3, - M.read (| digits |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.of_value (| + Value.Integer 3 + |), + M.read (| digits |) + |))) + ] + |) ] |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6176,15 +6627,18 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let v := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| v |)) - (Value.Integer Integer.U8 0))) + BinOp.Pure.eq (| + M.read (| v |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6197,46 +6651,50 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.base[3 - digits..].iter().all(|&v| v == 0)" + M.of_value (| + Value.String + "assertion failed: self.base[3 - digits..].iter().all(|&v| v == 0)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| - BinOp.Pure.eq - (M.read (| bits |)) - (Value.Integer Integer.Usize 0), + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| + M.read (| bits |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.shr (| + (BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -6246,22 +6704,27 @@ Module num. |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| - Value.Integer Integer.Usize 3, + Integer.Usize, + M.of_value (| Value.Integer 3 |), M.read (| digits |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) |), BinOp.Panic.sub (| + Integer.Usize, M.read (| digitbits |), M.read (| bits |) |) - |)) - (Value.Integer Integer.U8 0))) - |)) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6274,18 +6737,21 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: bits == 0 || (self.base[3 - digits - 1] >> (digitbits - bits)) == 0" + M.of_value (| + Value.String + "assertion failed: bits == 0 || (self.base[3 - digits - 1] >> (digitbits - bits)) == 0" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6312,19 +6778,22 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::tests::Big8x3", - "size" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::tests::Big8x3", + "size" + |) + |))) + ] + |) ] |) ] @@ -6381,6 +6850,7 @@ Module num. |), M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| i |), M.read (| digits |) |) @@ -6397,10 +6867,10 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -6417,12 +6887,14 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| digits |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| digits |))) + ] + |) ] |) |), @@ -6473,18 +6945,19 @@ Module num. |), i |), - Value.Integer Integer.U8 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let sz := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6497,14 +6970,17 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| bits |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| bits |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6521,27 +6997,33 @@ Module num. |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| last |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) |), - BinOp.Panic.sub (| M.read (| digitbits |), M.read (| bits |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| digitbits |), + M.read (| bits |) + |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| overflow |)) - (Value.Integer Integer.U8 0) + BinOp.Pure.gt (| + M.read (| overflow |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6565,12 +7047,14 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6603,16 +7087,20 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| digits |), - Value.Integer Integer.Usize 1 - |)); - ("end_", M.read (| last |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| digits |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", A.to_value (M.read (| last |))) + ] + |) ] |) ] @@ -6669,8 +7157,8 @@ Module num. |), i |), - BinOp.Pure.bit_or - (BinOp.Panic.shl (| + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -6682,8 +7170,8 @@ Module num. |) |), M.read (| bits |) - |)) - (BinOp.Panic.shr (| + |), + BinOp.Panic.shr (| M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -6693,22 +7181,25 @@ Module num. |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| i |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) |), BinOp.Panic.sub (| + Integer.Usize, M.read (| digitbits |), M.read (| bits |) |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -6726,8 +7217,8 @@ Module num. β, BinOp.Panic.shl (| M.read (| β |), M.read (| bits |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6773,7 +7264,7 @@ Module num. self } *) - Definition mul_pow5 (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_pow5 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; e ] => ltac:(M.monadic @@ -6782,8 +7273,8 @@ Module num. M.read (| let table_index := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "trailing_zeros", [] |), [ M.call_closure (| @@ -6791,7 +7282,8 @@ Module num. [] |) ] - |)) + |) + |) |) in M.match_operator (| M.SubPointer.get_array_field (| @@ -6805,19 +7297,20 @@ 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 small_power := + M.alloc (| M.rust_cast (| M.read (| small_power |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| e |)) (M.read (| small_e |)) + BinOp.Pure.ge (| M.read (| e |), M.read (| small_e |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -6839,9 +7332,13 @@ Module num. let β := e in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), M.read (| small_e |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.read (| small_e |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -6851,14 +7348,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - let rest_power := M.alloc (| Value.Integer Integer.U8 1 |) in + let rest_power := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.use (M.match_operator (| @@ -6874,12 +7371,14 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| e |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| e |))) + ] + |) ] |) |), @@ -6924,14 +7423,15 @@ Module num. M.write (| β, BinOp.Panic.mul (| + Integer.U8, M.read (| β |), - Value.Integer Integer.U8 5 + M.of_value (| Value.Integer 5 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -6995,40 +7495,41 @@ Module num. self } *) - Definition mul_digits (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_digits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let ret := M.alloc (| repeat (Value.Integer Integer.U8 0) 3 |) in + let ret := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 3 |) |) in let retsz := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::bignum::tests::Big8x3", "size" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| other |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -7112,7 +7613,7 @@ Module num. (self, borrow) } *) - Definition div_rem_small (τ : list Ty.t) (α : list Value.t) : M := + Definition div_rem_small (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7121,15 +7622,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt (M.read (| other |)) (Value.Integer Integer.U8 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| other |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -7137,11 +7642,15 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: other > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: other > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let sz := @@ -7152,7 +7661,7 @@ Module num. "size" |) |) in - let borrow := M.alloc (| Value.Integer Integer.U8 0 |) in + let borrow := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -7202,9 +7711,11 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -7284,16 +7795,20 @@ Module num. let _ := M.write (| M.read (| a |), M.read (| q |) |) in let _ := M.write (| borrow, M.read (| r |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| borrow |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| borrow |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -7337,7 +7852,7 @@ Module num. debug_assert!(r.base[r.size..].iter().all(|&d| d == 0)); } *) - Definition div_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition div_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; d; q; r ] => ltac:(M.monadic @@ -7348,23 +7863,25 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::bignum::tests::Big8x3", "is_zero", [] |), [ M.read (| d |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -7372,15 +7889,21 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: !d.is_zero()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: !d.is_zero()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let digitbits := - M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in + M.alloc (| + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |) + |) in let _ := M.use (M.match_operator (| @@ -7410,7 +7933,7 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -7456,12 +7979,12 @@ Module num. let _ := M.write (| M.read (| digit |), - Value.Integer Integer.U8 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -7494,7 +8017,7 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -7540,12 +8063,12 @@ Module num. let _ := M.write (| M.read (| digit |), - Value.Integer Integer.U8 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -7571,9 +8094,9 @@ Module num. "core::num::bignum::tests::Big8x3", "size" |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) in - let q_is_zero := M.alloc (| Value.Bool true |) in + let q_is_zero := M.alloc (| M.of_value (| Value.Bool true |) |) in let end_ := M.alloc (| M.call_closure (| @@ -7609,12 +8132,14 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| end_ |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) ] @@ -7669,7 +8194,7 @@ Module num. "mul_pow2", [] |), - [ M.read (| r |); Value.Integer Integer.Usize 1 ] + [ M.read (| r |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -7680,13 +8205,13 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.use (M.alloc (| M.call_closure (| @@ -7699,10 +8224,11 @@ Module num. [ M.read (| self |); M.read (| i |) ] |) |)) - |)) + |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7755,6 +8281,7 @@ Module num. let digit_idx := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.read (| i |), M.read (| digitbits |) |) @@ -7762,13 +8289,14 @@ Module num. let bit_idx := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.read (| i |), M.read (| digitbits |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7786,19 +8314,24 @@ Module num. "size" |), BinOp.Panic.add (| + Integer.Usize, M.read (| digit_idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.write (| q_is_zero, - Value.Bool false + M.of_value (| Value.Bool false |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -7813,44 +8346,46 @@ Module num. |) in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U8 1, + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), M.read (| bit_idx |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply @@ -7897,25 +8432,28 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| q |), - "core::num::bignum::tests::Big8x3", - "size" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| q |), + "core::num::bignum::tests::Big8x3", + "size" + |) + |))) + ] + |) ] |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7926,15 +8464,18 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let d := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| d |)) - (Value.Integer Integer.U8 0))) + BinOp.Pure.eq (| + M.read (| d |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7947,40 +8488,43 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: q.base[q.size..].iter().all(|&d| d == 0)" + M.of_value (| + Value.String + "assertion failed: q.base[q.size..].iter().all(|&d| d == 0)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply @@ -8027,25 +8571,28 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| r |), - "core::num::bignum::tests::Big8x3", - "size" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| r |), + "core::num::bignum::tests::Big8x3", + "size" + |) + |))) + ] + |) ] |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -8056,15 +8603,18 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let d := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| d |)) - (Value.Integer Integer.U8 0))) + BinOp.Pure.eq (| + M.read (| d |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8077,21 +8627,24 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: r.base[r.size..].iter().all(|&d| d == 0)" + M.of_value (| + Value.String + "assertion failed: r.base[r.size..].iter().all(|&d| d == 0)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8107,7 +8660,7 @@ Module num. self.base[..] == other.base[..] } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8136,7 +8689,7 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |); M.call_closure (| @@ -8153,7 +8706,7 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructTuple "core::ops::range::RangeFull" [] + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) ] |) ] @@ -8184,26 +8737,29 @@ Module num. crate::option::Option::Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - Ty.path "core::num::bignum::tests::Big8x3", - [], - "cmp", - [] - |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "core::num::bignum::tests::Big8x3", + [], + "cmp", + [] + |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8227,7 +8783,7 @@ Module num. lhs.cmp(rhs) } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8303,9 +8859,11 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -8362,9 +8920,11 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| sz |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| sz |))) ] + |) ] |) ] @@ -8420,31 +8980,35 @@ Module num. Self { size: self.size, base: self.base } } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::num::bignum::tests::Big8x3" - [ - ("size", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::tests::Big8x3", - "size" - |) - |)); - ("base", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::tests::Big8x3", - "base" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::num::bignum::tests::Big8x3" + [ + ("size", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::tests::Big8x3", + "size" + |) + |))); + ("base", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::tests::Big8x3", + "base" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -8471,7 +9035,7 @@ Module num. crate::result::Result::Ok(()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8483,29 +9047,30 @@ Module num. let sz := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::bignum::tests::Big8x3", "size" |) - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); + M.alloc (| M.of_value (| Value.Integer 1 |) |))); fun γ => ltac:(M.monadic (M.SubPointer.get_struct_record_field (| @@ -8519,8 +9084,9 @@ Module num. let digitlen := M.alloc (| BinOp.Panic.div (| - M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)), - Value.Integer Integer.Usize 4 + Integer.Usize, + M.rust_cast (| M.read (| M.get_constant (| "core::num::BITS" |) |) |), + M.of_value (| Value.Integer 4 |) |) |) in let _ := @@ -8553,67 +9119,89 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "u8" ] - |), - [ - M.SubPointer.get_array_field (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::bignum::tests::Big8x3", - "base" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "u8" ] |), - M.alloc (| - BinOp.Panic.sub (| - M.read (| sz |), - Value.Integer Integer.Usize 1 + [ + M.SubPointer.get_array_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::bignum::tests::Big8x3", + "base" + |), + M.alloc (| + BinOp.Panic.sub (| + Integer.Usize, + M.read (| sz |), + M.of_value (| Value.Integer 1 |) + |) + |) |) - |) - |) - ] - |) - ] - |)); + ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple - "core::fmt::rt::Alignment::Unknown" - []; - Value.Integer Integer.U32 4; - Value.StructTuple - "core::fmt::rt::Count::Implied" - []; - Value.StructTuple - "core::fmt::rt::Count::Implied" - [] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Alignment::Unknown" + [] + |); + M.of_value (| Value.Integer 4 |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -8727,15 +9315,19 @@ Module num. "core::num::bignum::tests::Big8x3", "base" |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.read (| sz |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| sz |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) ] @@ -8818,77 +9410,103 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "_" - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "_" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "u8" ] - |), - [ v ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "from_usize", - [] - |), - [ digitlen ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "u8" ] + |), + [ v ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "from_usize", + [] + |), + [ digitlen ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer - Integer.Usize - 0; - Value.UnicodeChar 32; - Value.StructTuple - "core::fmt::rt::Alignment::Unknown" - []; - Value.Integer - Integer.U32 - 8; - Value.StructTuple - "core::fmt::rt::Count::Implied" - []; - Value.StructTuple - "core::fmt::rt::Count::Param" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Placeholder", + "new", + [] + |), [ - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 0 + |); + M.of_value (| + Value.UnicodeChar + 32 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Alignment::Unknown" + [] + |); + M.of_value (| + Value.Integer 8 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Param" + [ + A.to_value + (M.of_value (| + Value.Integer + 1 + |)) + ] + |) ] - ] - |) - ] - |)); + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path @@ -8960,14 +9578,20 @@ Module num. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/num/dec2flt/common.v b/CoqOfRust/core/num/dec2flt/common.v index f875f8463..872c60a24 100644 --- a/CoqOfRust/core/num/dec2flt/common.v +++ b/CoqOfRust/core/num/dec2flt/common.v @@ -17,13 +17,13 @@ Module num. u64::from_le_bytes(tmp) } *) - Definition read_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition read_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let tmp := M.alloc (| repeat (Value.Integer Integer.U8 0) 8 |) in + let tmp := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 8 |) |) in let _ := M.alloc (| M.call_closure (| @@ -33,7 +33,7 @@ Module num. [] |), [ - (* Unsize *) M.pointer_coercion tmp; + (* Unsize *) M.pointer_coercion (| tmp |); M.call_closure (| M.get_trait_method (| "core::ops::index::Index", @@ -44,9 +44,11 @@ Module num. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 8) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.of_value (| Value.Integer 8 |))) ] + |) ] |) ] @@ -67,7 +69,7 @@ Module num. self[..8].copy_from_slice(&value.to_le_bytes()) } *) - Definition write_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition write_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; value ] => ltac:(M.monadic @@ -90,19 +92,22 @@ Module num. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 8) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.of_value (| Value.Integer 8 |))) ] + |) ] |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "to_le_bytes", [] |), [ M.read (| value |) ] |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -113,31 +118,34 @@ Module num. other.len() as isize - self.len() as isize } *) - Definition offset_from (τ : list Ty.t) (α : list Value.t) : M := + Definition offset_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in BinOp.Panic.sub (| - M.rust_cast - (M.call_closure (| + Integer.Isize, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| other |) ] - |)), - M.rust_cast - (M.call_closure (| + |) + |), + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| self |) ] - |)) + |) + |) |))) | _, _ => M.impossible end. @@ -161,7 +169,7 @@ Module num. s } *) - Definition parse_digits (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_digits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ impl_FnMut_u8_ ], [ self; func ] => ltac:(M.monadic @@ -173,7 +181,7 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -191,20 +199,24 @@ Module num. "wrapping_sub", [] |), - [ M.read (| M.read (| c |) |); M.read (| UnsupportedLiteral |) ] + [ + M.read (| M.read (| c |) |); + M.read (| M.of_value (| UnsupportedLiteral |) |) + ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| c |)) - (Value.Integer Integer.U8 10) + BinOp.Pure.lt (| + M.read (| c |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -221,11 +233,16 @@ Module num. "call_mut", [] |), - [ func; Value.Tuple [ M.read (| c |) ] ] + [ + func; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| c |)) ] + |) + ] |) |) in let _ := M.write (| s, M.read (| s_next |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -242,7 +259,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -275,7 +292,7 @@ Module num. (a | b) & 0x8080_8080_8080_8080 == 0 } *) - Definition is_8digits (τ : list Ty.t) (α : list Value.t) : M := + Definition is_8digits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -285,22 +302,24 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), - [ M.read (| v |); Value.Integer Integer.U64 5063812098665367110 ] + [ M.read (| v |); M.of_value (| Value.Integer 5063812098665367110 |) ] |) |) in let b := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_sub", [] |), - [ M.read (| v |); Value.Integer Integer.U64 3472328296227680304 ] + [ M.read (| v |); M.of_value (| Value.Integer 3472328296227680304 |) ] |) |) in M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (BinOp.Pure.bit_or (M.read (| a |)) (M.read (| b |))) - (Value.Integer Integer.U64 9259542123273814144)) - (Value.Integer Integer.U64 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + BinOp.Pure.bit_or (| M.read (| a |), M.read (| b |) |), + M.of_value (| Value.Integer 9259542123273814144 |) + |), + M.of_value (| Value.Integer 0 |) + |) |) |))) | _, _ => M.impossible @@ -317,7 +336,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::common::BiasedFp". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -331,25 +350,27 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "BiasedFp" |); - M.read (| Value.String "f" |); + M.read (| M.of_value (| Value.String "BiasedFp" |) |); + M.read (| M.of_value (| Value.String "f" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::common::BiasedFp", "f" - |)); - M.read (| Value.String "e" |); + |) + |); + M.read (| M.of_value (| Value.String "e" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::common::BiasedFp", "e" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -378,19 +399,19 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::common::BiasedFp". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -422,44 +443,46 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::common::BiasedFp". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::common::BiasedFp", "f" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::dec2flt::common::BiasedFp", "f" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::common::BiasedFp", "e" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::dec2flt::common::BiasedFp", "e" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -487,20 +510,23 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::common::BiasedFp". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -521,36 +547,40 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::common::BiasedFp". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::num::dec2flt::common::BiasedFp" - [ - ("f", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u64", - [], - "default", - [] - |), - [] - |)); - ("e", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "i32", - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::num::dec2flt::common::BiasedFp" + [ + ("f", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u64", + [], + "default", + [] + |), + [] + |))); + ("e", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "i32", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -570,14 +600,19 @@ Module num. Self { f: 0, e } } *) - Definition zero_pow2 (τ : list Ty.t) (α : list Value.t) : M := + Definition zero_pow2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ e ] => ltac:(M.monadic (let e := M.alloc (| e |) in - Value.StructRecord - "core::num::dec2flt::common::BiasedFp" - [ ("f", Value.Integer Integer.U64 0); ("e", M.read (| e |)) ])) + M.of_value (| + Value.StructRecord + "core::num::dec2flt::common::BiasedFp" + [ + ("f", A.to_value (M.of_value (| Value.Integer 0 |))); + ("e", A.to_value (M.read (| e |))) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/num/dec2flt/decimal.v b/CoqOfRust/core/num/dec2flt/decimal.v index bd1fc48e7..b1ab48a6b 100644 --- a/CoqOfRust/core/num/dec2flt/decimal.v +++ b/CoqOfRust/core/num/dec2flt/decimal.v @@ -21,77 +21,89 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::decimal::Decimal". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::num::dec2flt::decimal::Decimal" - [ - ("num_digits", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "usize", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::dec2flt::decimal::Decimal", - "num_digits" - |) - ] - |)); - ("decimal_point", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "i32", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::dec2flt::decimal::Decimal", - "decimal_point" - |) - ] - |)); - ("truncated", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "bool", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::dec2flt::decimal::Decimal", - "truncated" - |) - ] - |)); - ("digits", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "array") [ Ty.path "u8" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::dec2flt::decimal::Decimal", - "digits" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::num::dec2flt::decimal::Decimal" + [ + ("num_digits", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::dec2flt::decimal::Decimal", + "num_digits" + |) + ] + |))); + ("decimal_point", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "i32", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::dec2flt::decimal::Decimal", + "decimal_point" + |) + ] + |))); + ("truncated", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::dec2flt::decimal::Decimal", + "truncated" + |) + ] + |))); + ("digits", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::dec2flt::decimal::Decimal", + "digits" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -111,18 +123,20 @@ Module num. Self { num_digits: 0, decimal_point: 0, truncated: false, digits: [0; Self::MAX_DIGITS] } } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::num::dec2flt::decimal::Decimal" - [ - ("num_digits", Value.Integer Integer.Usize 0); - ("decimal_point", Value.Integer Integer.I32 0); - ("truncated", Value.Bool false); - ("digits", repeat (Value.Integer Integer.U8 0) 768) - ])) + (M.of_value (| + Value.StructRecord + "core::num::dec2flt::decimal::Decimal" + [ + ("num_digits", A.to_value (M.of_value (| Value.Integer 0 |))); + ("decimal_point", A.to_value (M.of_value (| Value.Integer 0 |))); + ("truncated", A.to_value (M.of_value (| Value.Bool false |))); + ("digits", A.to_value (repeat (| M.of_value (| Value.Integer 0 |), 768 |))) + ] + |))) | _, _ => M.impossible end. @@ -139,16 +153,16 @@ Module num. (* pub const MAX_DIGITS: usize = 768; *) (* Ty.path "usize" *) - Definition value_MAX_DIGITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 768 |))). + Definition value_MAX_DIGITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 768 |) |))). Axiom AssociatedConstant_value_MAX_DIGITS : M.IsAssociatedConstant Self "value_MAX_DIGITS" value_MAX_DIGITS. (* pub const MAX_DIGITS_WITHOUT_OVERFLOW: usize = 19; *) (* Ty.path "usize" *) - Definition value_MAX_DIGITS_WITHOUT_OVERFLOW : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 19 |))). + Definition value_MAX_DIGITS_WITHOUT_OVERFLOW : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 19 |) |))). Axiom AssociatedConstant_value_MAX_DIGITS_WITHOUT_OVERFLOW : M.IsAssociatedConstant @@ -158,8 +172,8 @@ Module num. (* pub const DECIMAL_POINT_RANGE: i32 = 2047; *) (* Ty.path "i32" *) - Definition value_DECIMAL_POINT_RANGE : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 2047 |))). + Definition value_DECIMAL_POINT_RANGE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2047 |) |))). Axiom AssociatedConstant_value_DECIMAL_POINT_RANGE : M.IsAssociatedConstant Self "value_DECIMAL_POINT_RANGE" value_DECIMAL_POINT_RANGE. @@ -172,7 +186,7 @@ Module num. self.num_digits += 1; } *) - Definition try_add_digit (τ : list Ty.t) (α : list Value.t) : M := + Definition try_add_digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; digit ] => ltac:(M.monadic @@ -181,24 +195,25 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -218,8 +233,8 @@ Module num. |), M.read (| digit |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -231,9 +246,13 @@ Module num. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -256,7 +275,7 @@ Module num. } } *) - Definition trim (τ : list Ty.t) (α : list Value.t) : M := + Definition trim (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -264,36 +283,38 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -306,24 +327,27 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.num_digits <= Self::MAX_DIGITS" + M.of_value (| + Value.String + "assertion failed: self.num_digits <= Self::MAX_DIGITS" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -331,18 +355,19 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (Value.Integer Integer.Usize 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -351,6 +376,7 @@ Module num. |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -358,12 +384,13 @@ Module num. "num_digits" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) - |)) - (Value.Integer Integer.U8 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -377,9 +404,13 @@ Module num. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -387,7 +418,7 @@ Module num. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -428,7 +459,7 @@ Module num. n } *) - Definition round (τ : list Ty.t) (α : list Value.t) : M := + Definition round (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -438,7 +469,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -446,25 +477,27 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (Value.Integer Integer.Usize 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| + (BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (Value.Integer Integer.I32 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -474,28 +507,29 @@ Module num. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U64 0 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 0 |) |) |) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (Value.Integer Integer.I32 18) + |), + M.of_value (| Value.Integer 18 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -506,28 +540,30 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Integer Integer.U64 18446744073709551615 + M.of_value (| Value.Integer 18446744073709551615 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in let dp := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) + |) + |) |) in - let n := M.alloc (| Value.Integer Integer.U64 0 |) in + let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -541,12 +577,14 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| dp |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| dp |))) + ] + |) ] |) |), @@ -592,27 +630,29 @@ Module num. M.write (| β, BinOp.Panic.mul (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| i |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| i |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -624,9 +664,10 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U64, M.read (| β |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -635,39 +676,46 @@ Module num. |), i |) - |)) + |) + |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - let round_up := M.alloc (| Value.Bool false |) in + let round_up := M.alloc (| M.of_value (| Value.Bool false |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| dp |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| dp |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -677,8 +725,8 @@ Module num. let _ := M.write (| round_up, - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -687,11 +735,12 @@ Module num. |), dp |) - |)) - (Value.Integer Integer.U8 5) + |), + M.of_value (| Value.Integer 5 |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -699,8 +748,8 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -709,21 +758,24 @@ Module num. |), dp |) - |)) - (Value.Integer Integer.U8 5), + |), + M.of_value (| Value.Integer 5 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.add (| + (BinOp.Pure.eq (| + BinOp.Panic.add (| + Integer.Usize, M.read (| dp |), - Value.Integer Integer.Usize 1 - |)) - (M.read (| + M.of_value (| Value.Integer 1 |) + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)))) + |) + |))) |) |)) in let _ := @@ -743,14 +795,15 @@ Module num. |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.ne - (M.read (| dp |)) - (Value.Integer Integer.Usize 0), + BinOp.Pure.ne (| + M.read (| dp |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.ne - (BinOp.Pure.bit_and - (Value.Integer Integer.U8 1) - (M.read (| + (BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.of_value (| Value.Integer 1 |), + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -759,25 +812,29 @@ Module num. |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| dp |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) - |))) - (Value.Integer Integer.U8 0))) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -791,10 +848,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U64 1 |) + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in n @@ -846,7 +907,7 @@ Module num. self.trim(); } *) - Definition left_shift (τ : list Ty.t) (α : list Value.t) : M := + Definition left_shift (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; shift ] => ltac:(M.monadic @@ -857,22 +918,23 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -880,9 +942,11 @@ Module num. Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let num_new_digits := @@ -906,6 +970,7 @@ Module num. let write_index := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -916,21 +981,22 @@ Module num. M.read (| num_new_digits |) |) |) in - let n := M.alloc (| Value.Integer Integer.U64 0 |) in + let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| read_index |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + M.read (| read_index |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -942,8 +1008,9 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -951,8 +1018,9 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -960,10 +1028,11 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U64, M.read (| β |), BinOp.Panic.shl (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -972,7 +1041,8 @@ Module num. |), read_index |) - |)), + |) + |), M.read (| shift |) |) |) @@ -980,36 +1050,40 @@ Module num. let quotient := M.alloc (| BinOp.Panic.div (| + Integer.U64, M.read (| n |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let remainder := M.alloc (| BinOp.Panic.sub (| + Integer.U64, M.read (| n |), BinOp.Panic.mul (| - Value.Integer Integer.U64 10, + Integer.U64, + M.of_value (| Value.Integer 10 |), M.read (| quotient |) |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| write_index |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| write_index |), + M.read (| M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1026,22 +1100,23 @@ Module num. |), write_index |), - M.rust_cast (M.read (| remainder |)) + M.rust_cast (| M.read (| remainder |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| remainder |)) - (Value.Integer Integer.U64 0) + BinOp.Pure.gt (| + M.read (| remainder |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1055,17 +1130,18 @@ Module num. "core::num::dec2flt::decimal::Decimal", "truncated" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in let _ := M.write (| n, M.read (| quotient |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1075,7 +1151,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1086,14 +1162,17 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| n |)) (Value.Integer Integer.U64 0) + BinOp.Pure.gt (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1105,43 +1184,48 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let quotient := M.alloc (| BinOp.Panic.div (| + Integer.U64, M.read (| n |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let remainder := M.alloc (| BinOp.Panic.sub (| + Integer.U64, M.read (| n |), BinOp.Panic.mul (| - Value.Integer Integer.U64 10, + Integer.U64, + M.of_value (| Value.Integer 10 |), M.read (| quotient |) |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| write_index |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| write_index |), + M.read (| M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1158,22 +1242,23 @@ Module num. |), write_index |), - M.rust_cast (M.read (| remainder |)) + M.rust_cast (| M.read (| remainder |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| remainder |)) - (Value.Integer Integer.U64 0) + BinOp.Pure.gt (| + M.read (| remainder |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1187,17 +1272,18 @@ Module num. "core::num::dec2flt::decimal::Decimal", "truncated" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in let _ := M.write (| n, M.read (| quotient |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1207,7 +1293,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1223,30 +1309,35 @@ Module num. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| num_new_digits |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.read (| num_new_digits |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1264,8 +1355,8 @@ Module num. M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1278,8 +1369,9 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I32, M.read (| β |), - M.rust_cast (M.read (| num_new_digits |)) + M.rust_cast (| M.read (| num_new_digits |) |) |) |) in let _ := @@ -1293,7 +1385,7 @@ Module num. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -1350,7 +1442,7 @@ Module num. self.trim(); } *) - Definition right_shift (τ : list Ty.t) (α : list Value.t) : M := + Definition right_shift (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; shift ] => ltac:(M.monadic @@ -1359,23 +1451,24 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let read_index := M.alloc (| Value.Integer Integer.Usize 0 |) in - let write_index := M.alloc (| Value.Integer Integer.Usize 0 |) in - let n := M.alloc (| Value.Integer Integer.U64 0 |) in + let read_index := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let write_index := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) |)) - (Value.Integer Integer.U64 0) + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1383,22 +1476,23 @@ Module num. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| read_index |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| read_index |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1409,12 +1503,14 @@ Module num. M.write (| n, BinOp.Panic.add (| + Integer.U64, BinOp.Panic.mul (| - Value.Integer Integer.U64 10, + Integer.U64, + M.of_value (| Value.Integer 10 |), M.read (| n |) |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1423,7 +1519,8 @@ Module num. |), read_index |) - |)) + |) + |) |) |) in let _ := @@ -1431,24 +1528,26 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| n |)) - (Value.Integer Integer.U64 0) + BinOp.Pure.eq (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1457,7 +1556,11 @@ Module num. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Tuple [] |) |) + M.read (| + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) |) |))); fun γ => @@ -1469,21 +1572,24 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) - |)) - (Value.Integer - Integer.U64 - 0) + |), + M.of_value (| + Value.Integer 0 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1495,10 +1601,11 @@ Module num. M.write (| β, BinOp.Panic.mul (| + Integer.U64, M.read (| β |), - Value.Integer - Integer.U64 - 10 + M.of_value (| + Value.Integer 10 + |) |) |) in let _ := @@ -1506,14 +1613,17 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic @@ -1529,7 +1639,9 @@ Module num. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |) |) |) @@ -1554,7 +1666,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1571,37 +1683,41 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.I32, M.read (| β |), BinOp.Panic.sub (| - M.rust_cast (M.read (| read_index |)), - Value.Integer Integer.I32 1 + Integer.I32, + M.rust_cast (| M.read (| read_index |) |), + M.of_value (| Value.Integer 1 |) |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (UnOp.Panic.neg (| + |), + UnOp.Panic.neg (| + Integer.I32, M.read (| M.get_constant (| "core::num::dec2flt::decimal::DECIMAL_POINT_RANGE" |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1618,7 +1734,7 @@ Module num. "core::num::dec2flt::decimal::Decimal", "num_digits" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| @@ -1627,7 +1743,7 @@ Module num. "core::num::dec2flt::decimal::Decimal", "decimal_point" |), - Value.Integer Integer.I32 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| @@ -1636,42 +1752,47 @@ Module num. "core::num::dec2flt::decimal::Decimal", "truncated" |), - Value.Bool false + M.of_value (| Value.Bool false |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let mask := M.alloc (| BinOp.Panic.sub (| - BinOp.Panic.shl (| Value.Integer Integer.U64 1, M.read (| shift |) |), - Value.Integer Integer.U64 1 + Integer.U64, + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.read (| shift |) + |), + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| read_index |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| read_index |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1680,19 +1801,22 @@ Module num. |) in let new_digit := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) |)) + M.rust_cast (| + BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) |) + |) |) in let _ := M.write (| n, BinOp.Panic.add (| + Integer.U64, BinOp.Panic.mul (| - Value.Integer Integer.U64 10, - BinOp.Pure.bit_and (M.read (| n |)) (M.read (| mask |)) + Integer.U64, + M.of_value (| Value.Integer 10 |), + BinOp.Pure.bit_and (| M.read (| n |), M.read (| mask |) |) |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1701,7 +1825,8 @@ Module num. |), read_index |) - |)) + |) + |) |) |) in let _ := @@ -1709,8 +1834,9 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -1730,11 +1856,12 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1744,7 +1871,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1755,14 +1882,17 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| n |)) (Value.Integer Integer.U64 0) + BinOp.Pure.gt (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1771,32 +1901,35 @@ Module num. |) in let new_digit := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) |)) + M.rust_cast (| + BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) |) + |) |) in let _ := M.write (| n, BinOp.Panic.mul (| - Value.Integer Integer.U64 10, - BinOp.Pure.bit_and (M.read (| n |)) (M.read (| mask |)) + Integer.U64, + M.of_value (| Value.Integer 10 |), + BinOp.Pure.bit_and (| M.read (| n |), M.read (| mask |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| write_index |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| write_index |), + M.read (| M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1820,24 +1953,26 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| new_digit |)) - (Value.Integer Integer.U8 0) + BinOp.Pure.gt (| + M.read (| new_digit |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1851,11 +1986,12 @@ Module num. "core::num::dec2flt::decimal::Decimal", "truncated" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -1869,7 +2005,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1896,7 +2032,7 @@ Module num. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -1983,7 +2119,7 @@ Module num. d } *) - Definition parse_decimal (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_decimal (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -2007,7 +2143,7 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2034,11 +2170,11 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ1_0 |), - Value.Integer Integer.U8 48 + Value.Integer 48 |) in let s_next := M.copy (| γ1_1 |) in let _ := M.write (| s, M.read (| s_next |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2046,7 +2182,7 @@ Module num. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2066,8 +2202,8 @@ Module num. |), [ M.read (| s |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2088,13 +2224,14 @@ Module num. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2119,31 +2256,29 @@ Module num. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let γ1_0 := M.read (| γ1_0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ1_0 |), - Value.Integer Integer.U8 46 - |) in + 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 _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2153,7 +2288,7 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2182,11 +2317,11 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ1_0 |), - Value.Integer Integer.U8 48 + Value.Integer 48 |) in let s_next := M.copy (| γ1_1 |) in let _ := M.write (| s, M.read (| s_next |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2198,21 +2333,22 @@ Module num. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2220,19 +2356,21 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| s |) ] - |)) - (Value.Integer Integer.Usize 8), + |), + M.of_value (| Value.Integer 8 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (BinOp.Panic.add (| + (BinOp.Pure.lt (| + BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| d, @@ -2240,13 +2378,14 @@ Module num. "num_digits" |) |), - Value.Integer Integer.Usize 8 - |)) - (M.read (| + M.of_value (| Value.Integer 8 |) + |), + M.read (| M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) - |)))) + |) + |))) |) |)) in let _ := @@ -2269,21 +2408,22 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::num::dec2flt::common::is_8digits", [] |), [ M.read (| v |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2293,7 +2433,9 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2325,23 +2467,27 @@ Module num. "core::num::dec2flt::decimal::Decimal", "digits" |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - d, - "core::num::dec2flt::decimal::Decimal", - "num_digits" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + d, + "core::num::dec2flt::decimal::Decimal", + "num_digits" + |) + |))) + ] + |) ] |); BinOp.Panic.sub (| + Integer.U64, M.read (| v |), - Value.Integer Integer.U64 3472328296227680304 + M.of_value (| Value.Integer 3472328296227680304 |) |) ] |) @@ -2356,8 +2502,9 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 8 + M.of_value (| Value.Integer 8 |) |) |) in let _ := @@ -2377,13 +2524,18 @@ Module num. |), [ M.read (| s |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 8) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 8 |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2393,7 +2545,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2413,8 +2565,8 @@ Module num. |), [ M.read (| s |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2435,7 +2587,8 @@ Module num. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -2447,52 +2600,56 @@ Module num. "decimal_point" |), BinOp.Panic.sub (| - M.rust_cast - (M.call_closure (| + Integer.I32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| s |) ] - |)), - M.rust_cast - (M.call_closure (| + |) + |), + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| first |) ] - |)) + |) + |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let n_trailing_zeros := M.alloc (| Value.Integer Integer.Usize 0 |) in + let n_trailing_zeros := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -2544,33 +2701,37 @@ Module num. |), [ M.read (| start |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| start |) ] - |), - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| s |) ] - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| start |) ] + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| s |) ] + |) + |))) + ] + |) ] |) ] @@ -2623,16 +2784,21 @@ Module num. let γ0_0 := M.read (| γ0_0 |) in let c := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| c |)) - (M.read (| UnsupportedLiteral |)) + BinOp.Pure.eq (| + M.read (| c |), + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2644,26 +2810,34 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| c |)) - (M.read (| - UnsupportedLiteral - |)) + BinOp.Pure.ne (| + M.read (| c |), + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2677,14 +2851,16 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2698,8 +2874,9 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I32, M.read (| β |), - M.rust_cast (M.read (| n_trailing_zeros |)) + M.rust_cast (| M.read (| n_trailing_zeros |) |) |) |) in let _ := @@ -2711,7 +2888,11 @@ Module num. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), M.read (| n_trailing_zeros |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.read (| n_trailing_zeros |) + |) |) in let _ := let β := @@ -2723,38 +2904,41 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I32, M.read (| β |), - M.rust_cast - (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 [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2768,7 +2952,7 @@ Module num. "core::num::dec2flt::decimal::Decimal", "truncated" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in let _ := M.write (| @@ -2781,16 +2965,17 @@ Module num. M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2817,7 +3002,7 @@ Module num. let ch := M.copy (| γ1_0 |) in let s_next := M.copy (| γ1_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2825,13 +3010,15 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (M.read (| ch |)) - (M.read (| UnsupportedLiteral |)), + BinOp.Pure.eq (| + M.read (| ch |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| ch |)) - (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.eq (| + M.read (| ch |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) |) |)) in let _ := @@ -2840,10 +3027,10 @@ Module num. Value.Bool true |) in let _ := M.write (| s, M.read (| s_next |) |) in - let neg_exp := M.alloc (| Value.Bool false |) in + let neg_exp := M.alloc (| M.of_value (| Value.Bool false |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2872,12 +3059,13 @@ Module num. let _ := M.write (| neg_exp, - BinOp.Pure.eq - (M.read (| ch |)) - (M.read (| UnsupportedLiteral |)) + BinOp.Pure.eq (| + M.read (| ch |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2885,13 +3073,19 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (M.read (| ch |)) - (M.read (| UnsupportedLiteral |)), + BinOp.Pure.eq (| + M.read (| ch |), + M.read (| + M.of_value (| UnsupportedLiteral |) + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| ch |)) - (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.eq (| + M.read (| ch |), + M.read (| + M.of_value (| UnsupportedLiteral |) + |) + |))) |) |)) in let _ := @@ -2900,15 +3094,18 @@ Module num. Value.Bool true |) in let _ := M.write (| s, M.read (| s_next |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let exp_num := M.alloc (| Value.Integer Integer.I32 0 |) in + let exp_num := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.alloc (| M.call_closure (| @@ -2921,8 +3118,8 @@ Module num. |), [ M.read (| s |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2934,18 +3131,21 @@ Module num. (let digit := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exp_num |)) - (Value.Integer - Integer.I32 - 65536) + BinOp.Pure.lt (| + M.read (| exp_num |), + M.of_value (| + Value.Integer 65536 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2956,27 +3156,35 @@ Module num. M.write (| exp_num, BinOp.Panic.add (| + Integer.I32, BinOp.Panic.mul (| - Value.Integer - Integer.I32 - 10, + Integer.I32, + M.of_value (| + Value.Integer 10 + |), M.read (| exp_num |) |), - M.rust_cast - (M.read (| digit |)) + M.rust_cast (| + M.read (| digit |) + |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -2990,10 +3198,11 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I32, M.read (| β |), M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3004,7 +3213,10 @@ Module num. Value.Bool true |) in M.alloc (| - UnOp.Panic.neg (| M.read (| exp_num |) |) + UnOp.Panic.neg (| + Integer.I32, + M.read (| exp_num |) + |) |))); fun γ => ltac:(M.monadic exp_num) ] @@ -3012,11 +3224,12 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -3032,24 +3245,28 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - d, - "core::num::dec2flt::decimal::Decimal", - "num_digits" - |) - |)); - ("end_", - M.read (| - M.get_constant (| - "core::num::dec2flt::decimal::MAX_DIGITS_WITHOUT_OVERFLOW" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + d, + "core::num::dec2flt::decimal::Decimal", + "num_digits" + |) + |))); + ("end_", + A.to_value + (M.read (| + M.get_constant (| + "core::num::dec2flt::decimal::MAX_DIGITS_WITHOUT_OVERFLOW" + |) + |))) + ] + |) ] |) |), @@ -3100,12 +3317,12 @@ Module num. |), i |), - Value.Integer Integer.U8 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3194,7 +3411,7 @@ Module num. num_new_digits } *) - Definition number_of_digits_decimal_left_shift (τ : list Ty.t) (α : list Value.t) : M := + Definition number_of_digits_decimal_left_shift (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d; shift ] => ltac:(M.monadic @@ -3207,7 +3424,7 @@ Module num. let β := shift in M.write (| β, - BinOp.Pure.bit_and (M.read (| β |)) (Value.Integer Integer.Usize 63) + BinOp.Pure.bit_and (| M.read (| β |), M.of_value (| Value.Integer 63 |) |) |) in let x_a := M.copy (| @@ -3225,24 +3442,37 @@ Module num. "core::num::dec2flt::decimal::number_of_digits_decimal_left_shift::TABLE" |), M.alloc (| - BinOp.Panic.add (| M.read (| shift |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| shift |), + M.of_value (| Value.Integer 1 |) + |) |) |) |) in let num_new_digits := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| M.read (| x_a |), Value.Integer Integer.I32 11 |)) + M.rust_cast (| + BinOp.Panic.shr (| M.read (| x_a |), M.of_value (| Value.Integer 11 |) |) + |) |) in let pow5_a := M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and (Value.Integer Integer.U16 2047) (M.read (| x_a |))) + M.rust_cast (| + BinOp.Pure.bit_and (| + M.of_value (| Value.Integer 2047 |), + M.read (| x_a |) + |) + |) |) in let pow5_b := M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and (Value.Integer Integer.U16 2047) (M.read (| x_b |))) + M.rust_cast (| + BinOp.Pure.bit_and (| + M.of_value (| Value.Integer 2047 |), + M.read (| x_b |) + |) + |) |) in let pow5 := M.alloc (| @@ -3258,9 +3488,11 @@ Module num. M.get_constant (| "core::num::dec2flt::decimal::number_of_digits_decimal_left_shift::TABLE_POW5" |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| pow5_a |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| pow5_a |))) ] + |) ] |) |) in @@ -3315,7 +3547,11 @@ Module num. |) ] |); - BinOp.Panic.sub (| M.read (| pow5_b |), M.read (| pow5_a |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| pow5_b |), + M.read (| pow5_a |) + |) ] |) ] @@ -3374,22 +3610,23 @@ Module num. let γ1_1 := M.read (| γ1_1 |) in let p5 := M.copy (| γ1_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| i |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| i |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3401,8 +3638,9 @@ Module num. M.read (| M.return_ (| BinOp.Panic.sub (| + Integer.Usize, M.read (| num_new_digits |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) @@ -3411,15 +3649,15 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| d |), @@ -3428,8 +3666,9 @@ Module num. |), i |) - |)) - (M.read (| p5 |)) + |), + M.read (| p5 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3444,15 +3683,17 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| d |), @@ -3461,8 +3702,9 @@ Module num. |), i |) - |)) - (M.read (| p5 |)) + |), + M.read (| p5 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3474,12 +3716,13 @@ Module num. M.read (| M.return_ (| BinOp.Panic.sub (| + Integer.Usize, M.read (| num_new_digits |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) |) @@ -3506,7 +3749,7 @@ Module num. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3517,1395 +3760,1399 @@ Module num. end. Module number_of_digits_decimal_left_shift. - Definition value_TABLE : Value.t := + Definition value_TABLE : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Array - [ - Value.Integer Integer.U16 0; - Value.Integer Integer.U16 2048; - Value.Integer Integer.U16 2049; - Value.Integer Integer.U16 2051; - Value.Integer Integer.U16 4102; - Value.Integer Integer.U16 4105; - Value.Integer Integer.U16 4109; - Value.Integer Integer.U16 6162; - Value.Integer Integer.U16 6167; - Value.Integer Integer.U16 6173; - Value.Integer Integer.U16 8228; - Value.Integer Integer.U16 8235; - Value.Integer Integer.U16 8243; - Value.Integer Integer.U16 8252; - Value.Integer Integer.U16 10310; - Value.Integer Integer.U16 10320; - Value.Integer Integer.U16 10331; - Value.Integer Integer.U16 12391; - Value.Integer Integer.U16 12403; - Value.Integer Integer.U16 12416; - Value.Integer Integer.U16 14478; - Value.Integer Integer.U16 14492; - Value.Integer Integer.U16 14507; - Value.Integer Integer.U16 14523; - Value.Integer Integer.U16 16588; - Value.Integer Integer.U16 16605; - Value.Integer Integer.U16 16623; - Value.Integer Integer.U16 18690; - Value.Integer Integer.U16 18709; - Value.Integer Integer.U16 18729; - Value.Integer Integer.U16 20798; - Value.Integer Integer.U16 20819; - Value.Integer Integer.U16 20841; - Value.Integer Integer.U16 20864; - Value.Integer Integer.U16 22936; - Value.Integer Integer.U16 22960; - Value.Integer Integer.U16 22985; - Value.Integer Integer.U16 25059; - Value.Integer Integer.U16 25085; - Value.Integer Integer.U16 25112; - Value.Integer Integer.U16 27188; - Value.Integer Integer.U16 27216; - Value.Integer Integer.U16 27245; - Value.Integer Integer.U16 27275; - Value.Integer Integer.U16 29354; - Value.Integer Integer.U16 29385; - Value.Integer Integer.U16 29417; - Value.Integer Integer.U16 31498; - Value.Integer Integer.U16 31531; - Value.Integer Integer.U16 31565; - Value.Integer Integer.U16 33648; - Value.Integer Integer.U16 33683; - Value.Integer Integer.U16 33719; - Value.Integer Integer.U16 33756; - Value.Integer Integer.U16 35842; - Value.Integer Integer.U16 35880; - Value.Integer Integer.U16 35919; - Value.Integer Integer.U16 38007; - Value.Integer Integer.U16 38047; - Value.Integer Integer.U16 38088; - Value.Integer Integer.U16 40178; - Value.Integer Integer.U16 1308; - Value.Integer Integer.U16 1308; - Value.Integer Integer.U16 1308; - Value.Integer Integer.U16 1308 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2048 |)); + A.to_value (M.of_value (| Value.Integer 2049 |)); + A.to_value (M.of_value (| Value.Integer 2051 |)); + A.to_value (M.of_value (| Value.Integer 4102 |)); + A.to_value (M.of_value (| Value.Integer 4105 |)); + A.to_value (M.of_value (| Value.Integer 4109 |)); + A.to_value (M.of_value (| Value.Integer 6162 |)); + A.to_value (M.of_value (| Value.Integer 6167 |)); + A.to_value (M.of_value (| Value.Integer 6173 |)); + A.to_value (M.of_value (| Value.Integer 8228 |)); + A.to_value (M.of_value (| Value.Integer 8235 |)); + A.to_value (M.of_value (| Value.Integer 8243 |)); + A.to_value (M.of_value (| Value.Integer 8252 |)); + A.to_value (M.of_value (| Value.Integer 10310 |)); + A.to_value (M.of_value (| Value.Integer 10320 |)); + A.to_value (M.of_value (| Value.Integer 10331 |)); + A.to_value (M.of_value (| Value.Integer 12391 |)); + A.to_value (M.of_value (| Value.Integer 12403 |)); + A.to_value (M.of_value (| Value.Integer 12416 |)); + A.to_value (M.of_value (| Value.Integer 14478 |)); + A.to_value (M.of_value (| Value.Integer 14492 |)); + A.to_value (M.of_value (| Value.Integer 14507 |)); + A.to_value (M.of_value (| Value.Integer 14523 |)); + A.to_value (M.of_value (| Value.Integer 16588 |)); + A.to_value (M.of_value (| Value.Integer 16605 |)); + A.to_value (M.of_value (| Value.Integer 16623 |)); + A.to_value (M.of_value (| Value.Integer 18690 |)); + A.to_value (M.of_value (| Value.Integer 18709 |)); + A.to_value (M.of_value (| Value.Integer 18729 |)); + A.to_value (M.of_value (| Value.Integer 20798 |)); + A.to_value (M.of_value (| Value.Integer 20819 |)); + A.to_value (M.of_value (| Value.Integer 20841 |)); + A.to_value (M.of_value (| Value.Integer 20864 |)); + A.to_value (M.of_value (| Value.Integer 22936 |)); + A.to_value (M.of_value (| Value.Integer 22960 |)); + A.to_value (M.of_value (| Value.Integer 22985 |)); + A.to_value (M.of_value (| Value.Integer 25059 |)); + A.to_value (M.of_value (| Value.Integer 25085 |)); + A.to_value (M.of_value (| Value.Integer 25112 |)); + A.to_value (M.of_value (| Value.Integer 27188 |)); + A.to_value (M.of_value (| Value.Integer 27216 |)); + A.to_value (M.of_value (| Value.Integer 27245 |)); + A.to_value (M.of_value (| Value.Integer 27275 |)); + A.to_value (M.of_value (| Value.Integer 29354 |)); + A.to_value (M.of_value (| Value.Integer 29385 |)); + A.to_value (M.of_value (| Value.Integer 29417 |)); + A.to_value (M.of_value (| Value.Integer 31498 |)); + A.to_value (M.of_value (| Value.Integer 31531 |)); + A.to_value (M.of_value (| Value.Integer 31565 |)); + A.to_value (M.of_value (| Value.Integer 33648 |)); + A.to_value (M.of_value (| Value.Integer 33683 |)); + A.to_value (M.of_value (| Value.Integer 33719 |)); + A.to_value (M.of_value (| Value.Integer 33756 |)); + A.to_value (M.of_value (| Value.Integer 35842 |)); + A.to_value (M.of_value (| Value.Integer 35880 |)); + A.to_value (M.of_value (| Value.Integer 35919 |)); + A.to_value (M.of_value (| Value.Integer 38007 |)); + A.to_value (M.of_value (| Value.Integer 38047 |)); + A.to_value (M.of_value (| Value.Integer 38088 |)); + A.to_value (M.of_value (| Value.Integer 40178 |)); + A.to_value (M.of_value (| Value.Integer 1308 |)); + A.to_value (M.of_value (| Value.Integer 1308 |)); + A.to_value (M.of_value (| Value.Integer 1308 |)); + A.to_value (M.of_value (| Value.Integer 1308 |)) + ] + |) |))). - Definition value_TABLE_POW5 : Value.t := + Definition value_TABLE_POW5 : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |) |))). End number_of_digits_decimal_left_shift. End decimal. diff --git a/CoqOfRust/core/num/dec2flt/float.v b/CoqOfRust/core/num/dec2flt/float.v index 6511c9c91..109191ea7 100644 --- a/CoqOfRust/core/num/dec2flt/float.v +++ b/CoqOfRust/core/num/dec2flt/float.v @@ -12,82 +12,85 @@ Module num. (* const INFINITY: Self = f32::INFINITY; *) (* Ty.path "f32" *) - Definition value_INFINITY : Value.t := + Definition value_INFINITY : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::INFINITY" |))). (* const NEG_INFINITY: Self = f32::NEG_INFINITY; *) (* Ty.path "f32" *) - Definition value_NEG_INFINITY : Value.t := + Definition value_NEG_INFINITY : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::NEG_INFINITY" |))). (* const NAN: Self = f32::NAN; *) (* Ty.path "f32" *) - Definition value_NAN : Value.t := + Definition value_NAN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::NAN" |))). (* const NEG_NAN: Self = -f32::NAN; *) (* Ty.path "f32" *) - Definition value_NEG_NAN : Value.t := + Definition value_NEG_NAN : A.t := M.run ltac:(M.monadic (M.alloc (| - UnOp.Panic.neg (| M.read (| M.get_constant (| "core::f32::NAN" |) |) |) + UnOp.Panic.neg (| + Integer.Usize, + M.read (| M.get_constant (| "core::f32::NAN" |) |) + |) |))). (* const MANTISSA_EXPLICIT_BITS: usize = 23; *) (* Ty.path "usize" *) - Definition value_MANTISSA_EXPLICIT_BITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 23 |))). + Definition value_MANTISSA_EXPLICIT_BITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 23 |) |))). (* const MIN_EXPONENT_ROUND_TO_EVEN: i32 = -17; *) (* Ty.path "i32" *) - Definition value_MIN_EXPONENT_ROUND_TO_EVEN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-17) |))). + Definition value_MIN_EXPONENT_ROUND_TO_EVEN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-17) |) |))). (* const MAX_EXPONENT_ROUND_TO_EVEN: i32 = 10; *) (* Ty.path "i32" *) - Definition value_MAX_EXPONENT_ROUND_TO_EVEN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 10 |))). + Definition value_MAX_EXPONENT_ROUND_TO_EVEN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). (* const MIN_EXPONENT_FAST_PATH: i64 = -10; *) (* Ty.path "i64" *) - Definition value_MIN_EXPONENT_FAST_PATH : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I64 (-10) |))). + Definition value_MIN_EXPONENT_FAST_PATH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-10) |) |))). (* const MAX_EXPONENT_FAST_PATH: i64 = 10; *) (* Ty.path "i64" *) - Definition value_MAX_EXPONENT_FAST_PATH : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I64 10 |))). + Definition value_MAX_EXPONENT_FAST_PATH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). (* const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 17; *) (* Ty.path "i64" *) - Definition value_MAX_EXPONENT_DISGUISED_FAST_PATH : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I64 17 |))). + Definition value_MAX_EXPONENT_DISGUISED_FAST_PATH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 17 |) |))). (* const MINIMUM_EXPONENT: i32 = -127; *) (* Ty.path "i32" *) - Definition value_MINIMUM_EXPONENT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-127) |))). + Definition value_MINIMUM_EXPONENT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-127) |) |))). (* const INFINITE_POWER: i32 = 0xFF; *) (* Ty.path "i32" *) - Definition value_INFINITE_POWER : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 255 |))). + Definition value_INFINITE_POWER : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 255 |) |))). (* const SIGN_INDEX: usize = 31; *) (* Ty.path "usize" *) - Definition value_SIGN_INDEX : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 31 |))). + Definition value_SIGN_INDEX : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 31 |) |))). (* const SMALLEST_POWER_OF_TEN: i32 = -65; *) (* Ty.path "i32" *) - Definition value_SMALLEST_POWER_OF_TEN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-65) |))). + Definition value_SMALLEST_POWER_OF_TEN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-65) |) |))). (* const LARGEST_POWER_OF_TEN: i32 = 38; *) (* Ty.path "i32" *) - Definition value_LARGEST_POWER_OF_TEN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 38 |))). + Definition value_LARGEST_POWER_OF_TEN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 38 |) |))). (* fn from_u64(v: u64) -> Self { @@ -95,7 +98,7 @@ Module num. v as _ } *) - Definition from_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -103,30 +106,32 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| v |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| v |), + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MAX_MANTISSA_FAST_PATH" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -139,21 +144,24 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: v <= Self::MAX_MANTISSA_FAST_PATH" + M.of_value (| + Value.String + "assertion failed: v <= Self::MAX_MANTISSA_FAST_PATH" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| v |)) |) + M.alloc (| M.rust_cast (| M.read (| v |) |) |) |))) | _, _ => M.impossible end. @@ -163,7 +171,7 @@ Module num. f32::from_bits((v & 0xFFFFFFFF) as u32) } *) - Definition from_u64_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u64_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -171,8 +179,12 @@ Module num. M.call_closure (| M.get_associated_function (| Ty.path "f32", "from_bits", [] |), [ - M.rust_cast - (BinOp.Pure.bit_and (M.read (| v |)) (Value.Integer Integer.U64 4294967295)) + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| v |), + M.of_value (| Value.Integer 4294967295 |) + |) + |) ] |))) | _, _ => M.impossible @@ -186,7 +198,7 @@ Module num. TABLE[exponent & 15] } *) - Definition pow10_fast_path (τ : list Ty.t) (α : list Value.t) : M := + Definition pow10_fast_path (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ exponent ] => ltac:(M.monadic @@ -195,7 +207,10 @@ Module num. M.SubPointer.get_array_field (| M.get_constant (| "core::num::dec2flt::float::pow10_fast_path::TABLE" |), M.alloc (| - BinOp.Pure.bit_and (M.read (| exponent |)) (Value.Integer Integer.Usize 15) + BinOp.Pure.bit_and (| + M.read (| exponent |), + M.of_value (| Value.Integer 15 |) + |) |) |) |))) @@ -214,7 +229,7 @@ Module num. (mantissa as u64, exponent, sign) } *) - Definition integer_decode (τ : list Ty.t) (α : list Value.t) : M := + Definition integer_decode (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -230,66 +245,74 @@ Module num. let sign := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| bits |), - Value.Integer Integer.I32 31 - |)) - (Value.Integer Integer.U32 0) + M.of_value (| Value.Integer 31 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I8 1 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I8 (-1) |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-1) |) |))) ] |) |) in let exponent := M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer Integer.I32 23 |)) - (Value.Integer Integer.U32 255)) + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| bits |), M.of_value (| Value.Integer 23 |) |), + M.of_value (| Value.Integer 255 |) + |) + |) |) in let mantissa := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| exponent |)) - (Value.Integer Integer.I16 0) + BinOp.Pure.eq (| + M.read (| exponent |), + M.of_value (| Value.Integer 0 |) + |) |)) in 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 Integer.U32 8388607), - Value.Integer Integer.I32 1 + BinOp.Pure.bit_and (| + M.read (| bits |), + M.of_value (| Value.Integer 8388607 |) + |), + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Pure.bit_or - (BinOp.Pure.bit_and - (M.read (| bits |)) - (Value.Integer Integer.U32 8388607)) - (Value.Integer Integer.U32 8388608) + BinOp.Pure.bit_or (| + BinOp.Pure.bit_and (| + M.read (| bits |), + M.of_value (| Value.Integer 8388607 |) + |), + M.of_value (| Value.Integer 8388608 |) + |) |))) ] |) @@ -299,17 +322,24 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.I16, M.read (| β |), BinOp.Panic.add (| - Value.Integer Integer.I16 127, - Value.Integer Integer.I16 23 + Integer.I16, + M.of_value (| Value.Integer 127 |), + M.of_value (| Value.Integer 23 |) |) |) |) in M.alloc (| - Value.Tuple - [ M.rust_cast (M.read (| mantissa |)); M.read (| exponent |); M.read (| sign |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| mantissa |) |)); + A.to_value (M.read (| exponent |)); + A.to_value (M.read (| sign |)) + ] + |) |) |))) | _, _ => M.impossible @@ -320,7 +350,7 @@ Module num. self.classify() } *) - Definition classify (τ : list Ty.t) (α : list Value.t) : M := + Definition classify (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -370,82 +400,85 @@ Module num. (* const INFINITY: Self = f64::INFINITY; *) (* Ty.path "f64" *) - Definition value_INFINITY : Value.t := + Definition value_INFINITY : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::INFINITY" |))). (* const NEG_INFINITY: Self = f64::NEG_INFINITY; *) (* Ty.path "f64" *) - Definition value_NEG_INFINITY : Value.t := + Definition value_NEG_INFINITY : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::NEG_INFINITY" |))). (* const NAN: Self = f64::NAN; *) (* Ty.path "f64" *) - Definition value_NAN : Value.t := + Definition value_NAN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::NAN" |))). (* const NEG_NAN: Self = -f64::NAN; *) (* Ty.path "f64" *) - Definition value_NEG_NAN : Value.t := + Definition value_NEG_NAN : A.t := M.run ltac:(M.monadic (M.alloc (| - UnOp.Panic.neg (| M.read (| M.get_constant (| "core::f64::NAN" |) |) |) + UnOp.Panic.neg (| + Integer.Usize, + M.read (| M.get_constant (| "core::f64::NAN" |) |) + |) |))). (* const MANTISSA_EXPLICIT_BITS: usize = 52; *) (* Ty.path "usize" *) - Definition value_MANTISSA_EXPLICIT_BITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 52 |))). + Definition value_MANTISSA_EXPLICIT_BITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 52 |) |))). (* const MIN_EXPONENT_ROUND_TO_EVEN: i32 = -4; *) (* Ty.path "i32" *) - Definition value_MIN_EXPONENT_ROUND_TO_EVEN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-4) |))). + Definition value_MIN_EXPONENT_ROUND_TO_EVEN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-4) |) |))). (* const MAX_EXPONENT_ROUND_TO_EVEN: i32 = 23; *) (* Ty.path "i32" *) - Definition value_MAX_EXPONENT_ROUND_TO_EVEN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 23 |))). + Definition value_MAX_EXPONENT_ROUND_TO_EVEN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 23 |) |))). (* const MIN_EXPONENT_FAST_PATH: i64 = -22; *) (* Ty.path "i64" *) - Definition value_MIN_EXPONENT_FAST_PATH : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I64 (-22) |))). + Definition value_MIN_EXPONENT_FAST_PATH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-22) |) |))). (* const MAX_EXPONENT_FAST_PATH: i64 = 22; *) (* Ty.path "i64" *) - Definition value_MAX_EXPONENT_FAST_PATH : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I64 22 |))). + Definition value_MAX_EXPONENT_FAST_PATH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 22 |) |))). (* const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37; *) (* Ty.path "i64" *) - Definition value_MAX_EXPONENT_DISGUISED_FAST_PATH : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I64 37 |))). + Definition value_MAX_EXPONENT_DISGUISED_FAST_PATH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 37 |) |))). (* const MINIMUM_EXPONENT: i32 = -1023; *) (* Ty.path "i32" *) - Definition value_MINIMUM_EXPONENT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-1023) |))). + Definition value_MINIMUM_EXPONENT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-1023) |) |))). (* const INFINITE_POWER: i32 = 0x7FF; *) (* Ty.path "i32" *) - Definition value_INFINITE_POWER : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 2047 |))). + Definition value_INFINITE_POWER : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2047 |) |))). (* const SIGN_INDEX: usize = 63; *) (* Ty.path "usize" *) - Definition value_SIGN_INDEX : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 63 |))). + Definition value_SIGN_INDEX : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 63 |) |))). (* const SMALLEST_POWER_OF_TEN: i32 = -342; *) (* Ty.path "i32" *) - Definition value_SMALLEST_POWER_OF_TEN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-342) |))). + Definition value_SMALLEST_POWER_OF_TEN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-342) |) |))). (* const LARGEST_POWER_OF_TEN: i32 = 308; *) (* Ty.path "i32" *) - Definition value_LARGEST_POWER_OF_TEN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 308 |))). + Definition value_LARGEST_POWER_OF_TEN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 308 |) |))). (* fn from_u64(v: u64) -> Self { @@ -453,7 +486,7 @@ Module num. v as _ } *) - Definition from_u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -461,30 +494,32 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| v |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| v |), + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MAX_MANTISSA_FAST_PATH" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -497,21 +532,24 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: v <= Self::MAX_MANTISSA_FAST_PATH" + M.of_value (| + Value.String + "assertion failed: v <= Self::MAX_MANTISSA_FAST_PATH" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| v |)) |) + M.alloc (| M.rust_cast (| M.read (| v |) |) |) |))) | _, _ => M.impossible end. @@ -521,7 +559,7 @@ Module num. f64::from_bits(v) } *) - Definition from_u64_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u64_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -542,7 +580,7 @@ Module num. TABLE[exponent & 31] } *) - Definition pow10_fast_path (τ : list Ty.t) (α : list Value.t) : M := + Definition pow10_fast_path (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ exponent ] => ltac:(M.monadic @@ -551,7 +589,10 @@ Module num. M.SubPointer.get_array_field (| M.get_constant (| "core::num::dec2flt::float::pow10_fast_path::TABLE" |), M.alloc (| - BinOp.Pure.bit_and (M.read (| exponent |)) (Value.Integer Integer.Usize 31) + BinOp.Pure.bit_and (| + M.read (| exponent |), + M.of_value (| Value.Integer 31 |) + |) |) |) |))) @@ -573,7 +614,7 @@ Module num. (mantissa, exponent, sign) } *) - Definition integer_decode (τ : list Ty.t) (α : list Value.t) : M := + Definition integer_decode (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -589,66 +630,74 @@ Module num. let sign := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| bits |), - Value.Integer Integer.I32 63 - |)) - (Value.Integer Integer.U64 0) + M.of_value (| Value.Integer 63 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I8 1 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I8 (-1) |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-1) |) |))) ] |) |) in let exponent := M.alloc (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer Integer.I32 52 |)) - (Value.Integer Integer.U64 2047)) + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| bits |), M.of_value (| Value.Integer 52 |) |), + M.of_value (| Value.Integer 2047 |) + |) + |) |) in let mantissa := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| exponent |)) - (Value.Integer Integer.I16 0) + BinOp.Pure.eq (| + M.read (| exponent |), + M.of_value (| Value.Integer 0 |) + |) |)) in 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 Integer.U64 4503599627370495), - Value.Integer Integer.I32 1 + BinOp.Pure.bit_and (| + M.read (| bits |), + M.of_value (| Value.Integer 4503599627370495 |) + |), + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Pure.bit_or - (BinOp.Pure.bit_and - (M.read (| bits |)) - (Value.Integer Integer.U64 4503599627370495)) - (Value.Integer Integer.U64 4503599627370496) + BinOp.Pure.bit_or (| + BinOp.Pure.bit_and (| + M.read (| bits |), + M.of_value (| Value.Integer 4503599627370495 |) + |), + M.of_value (| Value.Integer 4503599627370496 |) + |) |))) ] |) @@ -658,15 +707,24 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.I16, M.read (| β |), BinOp.Panic.add (| - Value.Integer Integer.I16 1023, - Value.Integer Integer.I16 52 + Integer.I16, + M.of_value (| Value.Integer 1023 |), + M.of_value (| Value.Integer 52 |) |) |) |) in M.alloc (| - Value.Tuple [ M.read (| mantissa |); M.read (| exponent |); M.read (| sign |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| mantissa |)); + A.to_value (M.read (| exponent |)); + A.to_value (M.read (| sign |)) + ] + |) |) |))) | _, _ => M.impossible @@ -677,7 +735,7 @@ Module num. self.classify() } *) - Definition classify (τ : list Ty.t) (α : list Value.t) : M := + Definition classify (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/core/num/dec2flt/fpu.v b/CoqOfRust/core/num/dec2flt/fpu.v index 235f93995..7faa6ca1c 100644 --- a/CoqOfRust/core/num/dec2flt/fpu.v +++ b/CoqOfRust/core/num/dec2flt/fpu.v @@ -6,9 +6,9 @@ Module num. Module fpu. Module fpu_precision. (* pub fn set_precision() {} *) - Definition set_precision (τ : list Ty.t) (α : list Value.t) : M := + Definition set_precision (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [ T ], [] => ltac:(M.monadic (Value.Tuple [])) + | [ T ], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. End fpu_precision. diff --git a/CoqOfRust/core/num/dec2flt/lemire.v b/CoqOfRust/core/num/dec2flt/lemire.v index c4edccc8f..01281d1f2 100644 --- a/CoqOfRust/core/num/dec2flt/lemire.v +++ b/CoqOfRust/core/num/dec2flt/lemire.v @@ -95,7 +95,7 @@ Module num. BiasedFp { f: mantissa, e: power2 } } *) - Definition compute_float (τ : list Ty.t) (α : list Value.t) : M := + Definition compute_float (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ q; w ] => ltac:(M.monadic @@ -112,7 +112,7 @@ Module num. "zero_pow2", [] |), - [ Value.Integer Integer.I32 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |) in let fp_inf := @@ -140,12 +140,12 @@ Module num. "zero_pow2", [] |), - [ Value.Integer Integer.I32 (-1) ] + [ M.of_value (| Value.Integer (-1) |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -153,16 +153,21 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq (M.read (| w |)) (Value.Integer Integer.U64 0), + BinOp.Pure.eq (| + M.read (| w |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| q |)) - (M.rust_cast - (M.read (| + (BinOp.Pure.lt (| + M.read (| q |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::SMALLEST_POWER_OF_TEN" |) - |))))) + |) + |) + |))) |) |)) in let _ := @@ -173,21 +178,23 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| q |)) - (M.rust_cast - (M.read (| + BinOp.Pure.gt (| + M.read (| q |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::LARGEST_POWER_OF_TEN" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -199,7 +206,8 @@ Module num. M.read (| M.return_ (| M.read (| fp_inf |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -225,12 +233,13 @@ Module num. M.read (| q |); M.read (| w |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) |), - Value.Integer Integer.Usize 3 + M.of_value (| Value.Integer 3 |) |) ] |) @@ -244,16 +253,17 @@ Module num. let hi := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| lo |)) - (Value.Integer Integer.U64 18446744073709551615) + BinOp.Pure.eq (| + M.read (| lo |), + M.of_value (| Value.Integer 18446744073709551615 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -263,24 +273,28 @@ Module num. let inside_safe_exponent := M.alloc (| LogicalOp.and (| - BinOp.Pure.ge - (M.read (| q |)) - (Value.Integer Integer.I64 (-27)), + BinOp.Pure.ge (| + M.read (| q |), + M.of_value (| Value.Integer (-27) |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| q |)) - (Value.Integer Integer.I64 55))) + (BinOp.Pure.le (| + M.read (| q |), + M.of_value (| Value.Integer 55 |) + |))) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (M.read (| inside_safe_exponent |)) + UnOp.Pure.not (| + M.read (| inside_safe_exponent |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -292,53 +306,64 @@ Module num. M.read (| M.return_ (| M.read (| fp_error |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let upperbit := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| hi |), - Value.Integer Integer.I32 63 - |)) + M.of_value (| Value.Integer 63 |) + |) + |) |) in 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 Integer.I32 64 + M.of_value (| Value.Integer 64 |) |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |)) + |) + |) |), - Value.Integer Integer.I32 3 + M.of_value (| Value.Integer 3 |) |) |) |) in let power2 := M.alloc (| BinOp.Panic.sub (| + Integer.I32, BinOp.Panic.sub (| + Integer.I32, BinOp.Panic.add (| + Integer.I32, M.call_closure (| M.get_function (| "core::num::dec2flt::lemire::power", [] |), - [ M.rust_cast (M.read (| q |)) ] + [ M.rust_cast (| M.read (| q |) |) ] |), M.read (| upperbit |) |), - M.rust_cast (M.read (| lz |)) + M.rust_cast (| M.read (| lz |) |) |), M.read (| M.get_constant (| @@ -349,16 +374,17 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| power2 |)) - (Value.Integer Integer.I32 0) + BinOp.Pure.le (| + M.read (| power2 |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -370,21 +396,24 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (BinOp.Panic.add (| + BinOp.Pure.ge (| + BinOp.Panic.add (| + Integer.I32, UnOp.Panic.neg (| + Integer.I32, M.read (| power2 |) |), - Value.Integer Integer.I32 1 - |)) - (Value.Integer Integer.I32 64) + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 64 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -399,7 +428,8 @@ Module num. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -409,8 +439,12 @@ Module num. BinOp.Panic.shr (| M.read (| β |), BinOp.Panic.add (| - UnOp.Panic.neg (| M.read (| power2 |) |), - Value.Integer Integer.I32 1 + Integer.I32, + UnOp.Panic.neg (| + Integer.I32, + M.read (| power2 |) + |), + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -419,10 +453,12 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U64, M.read (| β |), - BinOp.Pure.bit_and - (M.read (| mantissa |)) - (Value.Integer Integer.U64 1) + BinOp.Pure.bit_and (| + M.read (| mantissa |), + M.of_value (| Value.Integer 1 |) + |) |) |) in let _ := @@ -431,41 +467,46 @@ Module num. β, BinOp.Panic.shr (| M.read (| β |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.write (| power2, - M.rust_cast - (BinOp.Pure.ge - (M.read (| mantissa |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.rust_cast (| + BinOp.Pure.ge (| + M.read (| mantissa |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) |) - |))) + |) + |) + |) |) in M.return_ (| - Value.StructRecord - "core::num::dec2flt::common::BiasedFp" - [ - ("f", M.read (| mantissa |)); - ("e", M.read (| power2 |)) - ] + M.of_value (| + Value.StructRecord + "core::num::dec2flt::common::BiasedFp" + [ + ("f", A.to_value (M.read (| mantissa |))); + ("e", A.to_value (M.read (| power2 |))) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -476,57 +517,69 @@ Module num. LogicalOp.and (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.le - (M.read (| lo |)) - (Value.Integer Integer.U64 1), + BinOp.Pure.le (| + M.read (| lo |), + M.of_value (| Value.Integer 1 |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (M.read (| q |)) - (M.rust_cast - (M.read (| + (BinOp.Pure.ge (| + M.read (| q |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MIN_EXPONENT_ROUND_TO_EVEN" |) - |))))) + |) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| q |)) - (M.rust_cast - (M.read (| + (BinOp.Pure.le (| + M.read (| q |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MAX_EXPONENT_ROUND_TO_EVEN" |) - |))))) + |) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| mantissa |)) - (Value.Integer Integer.U64 3)) - (Value.Integer Integer.U64 1))) + (BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| mantissa |), + M.of_value (| Value.Integer 3 |) + |), + M.of_value (| Value.Integer 1 |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.shl (| + (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 Integer.I32 64 + M.of_value (| Value.Integer 64 |) |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |)) + |) + |) |), - Value.Integer Integer.I32 3 + M.of_value (| Value.Integer 3 |) |) - |)) - (M.read (| hi |)))) + |), + M.read (| hi |) + |))) |) |)) in let _ := @@ -538,12 +591,14 @@ Module num. let β := mantissa in M.write (| β, - BinOp.Pure.bit_and - (M.read (| β |)) - (UnOp.Pure.not (Value.Integer Integer.U64 1)) + BinOp.Pure.bit_and (| + M.read (| β |), + UnOp.Pure.not (| M.of_value (| Value.Integer 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -551,37 +606,40 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U64, M.read (| β |), - BinOp.Pure.bit_and - (M.read (| mantissa |)) - (Value.Integer Integer.U64 1) + BinOp.Pure.bit_and (| + M.read (| mantissa |), + M.of_value (| Value.Integer 1 |) + |) |) |) in let _ := let β := mantissa in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer Integer.I32 1 |) + BinOp.Panic.shr (| M.read (| β |), M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| mantissa |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U64 2, + BinOp.Pure.ge (| + M.read (| mantissa |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 2 |), M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -592,7 +650,7 @@ Module num. M.write (| mantissa, BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" @@ -605,46 +663,51 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I32, M.read (| β |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := mantissa in M.write (| β, - BinOp.Pure.bit_and - (M.read (| β |)) - (UnOp.Pure.not - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + BinOp.Pure.bit_and (| + M.read (| β |), + UnOp.Pure.not (| + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) |) - |))) + |) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| power2 |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| power2 |), + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::INFINITE_POWER" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -656,13 +719,19 @@ Module num. M.read (| M.return_ (| M.read (| fp_inf |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::num::dec2flt::common::BiasedFp" - [ ("f", M.read (| mantissa |)); ("e", M.read (| power2 |)) ] + M.of_value (| + Value.StructRecord + "core::num::dec2flt::common::BiasedFp" + [ + ("f", A.to_value (M.read (| mantissa |))); + ("e", A.to_value (M.read (| power2 |))) + ] + |) |))) ] |) @@ -676,26 +745,28 @@ Module num. (q.wrapping_mul(152_170 + 65536) >> 16) + 63 } *) - Definition power (τ : list Ty.t) (α : list Value.t) : M := + Definition power (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ q ] => ltac:(M.monadic (let q := M.alloc (| q |) in BinOp.Panic.add (| + Integer.I32, BinOp.Panic.shr (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_mul", [] |), [ M.read (| q |); BinOp.Panic.add (| - Value.Integer Integer.I32 152170, - Value.Integer Integer.I32 65536 + Integer.I32, + M.of_value (| Value.Integer 152170 |), + M.of_value (| Value.Integer 65536 |) |) ] |), - Value.Integer Integer.I32 16 + M.of_value (| Value.Integer 16 |) |), - Value.Integer Integer.I32 63 + M.of_value (| Value.Integer 63 |) |))) | _, _ => M.impossible end. @@ -706,7 +777,7 @@ Module num. (r as u64, (r >> 64) as u64) } *) - Definition full_multiplication (τ : list Ty.t) (α : list Value.t) : M := + Definition full_multiplication (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b ] => ltac:(M.monadic @@ -715,14 +786,23 @@ Module num. M.read (| let r := M.alloc (| - BinOp.Panic.mul (| M.rust_cast (M.read (| a |)), M.rust_cast (M.read (| b |)) |) + BinOp.Panic.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 Integer.I32 64 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| r |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| r |), M.of_value (| Value.Integer 64 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -764,7 +844,7 @@ Module num. (first_lo, first_hi) } *) - Definition compute_product_approx (τ : list Ty.t) (α : list Value.t) : M := + Definition compute_product_approx (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ q; w; precision ] => ltac:(M.monadic @@ -774,31 +854,34 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.read (| q |)) - (M.rust_cast - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| q |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::dec2flt::table::SMALLEST_POWER_OF_FIVE" |) - |)))) + |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -811,47 +894,53 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: q >= SMALLEST_POWER_OF_FIVE as i64" + M.of_value (| + Value.String + "assertion failed: q >= SMALLEST_POWER_OF_FIVE as i64" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| q |)) - (M.rust_cast - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| q |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::dec2flt::table::LARGEST_POWER_OF_FIVE" |) - |)))) + |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -864,42 +953,47 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: q <= LARGEST_POWER_OF_FIVE as i64" + M.of_value (| + Value.String + "assertion failed: q <= LARGEST_POWER_OF_FIVE as i64" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| precision |)) - (Value.Integer Integer.Usize 64)) + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| precision |), + M.of_value (| Value.Integer 64 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -912,57 +1006,64 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: precision <= 64" + M.of_value (| + Value.String "assertion failed: precision <= 64" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let mask := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| precision |)) - (Value.Integer Integer.Usize 64) + BinOp.Pure.lt (| + M.read (| precision |), + M.of_value (| Value.Integer 64 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| BinOp.Panic.shr (| - Value.Integer Integer.U64 18446744073709551615, + M.of_value (| Value.Integer 18446744073709551615 |), M.read (| precision |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Integer Integer.U64 18446744073709551615 |))) + (M.alloc (| M.of_value (| Value.Integer 18446744073709551615 |) |))) ] |) |) in let index := M.alloc (| - M.rust_cast - (BinOp.Panic.sub (| + M.rust_cast (| + BinOp.Panic.sub (| + Integer.I64, M.read (| q |), - M.rust_cast - (M.read (| + 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 (| @@ -995,18 +1096,20 @@ Module num. let first_hi := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| first_hi |)) - (M.read (| mask |))) - (M.read (| mask |)) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| first_hi |), + M.read (| mask |) + |), + M.read (| mask |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1047,16 +1150,17 @@ Module num. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| second_hi |)) - (M.read (| first_lo |)) + BinOp.Pure.gt (| + M.read (| second_hi |), + M.read (| first_lo |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1068,23 +1172,36 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.Tuple [ M.read (| first_lo |); M.read (| first_hi |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| first_lo |)); + A.to_value (M.read (| first_hi |)) + ] + |) |))) ] |))) diff --git a/CoqOfRust/core/num/dec2flt/mod.v b/CoqOfRust/core/num/dec2flt/mod.v index 02eef7110..3985b8ecf 100644 --- a/CoqOfRust/core/num/dec2flt/mod.v +++ b/CoqOfRust/core/num/dec2flt/mod.v @@ -14,7 +14,7 @@ Module num. dec2flt(src) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -46,7 +46,7 @@ Module num. dec2flt(src) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -78,7 +78,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::ParseFloatError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -92,17 +92,18 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "ParseFloatError" |); - M.read (| Value.String "kind" |); + M.read (| M.of_value (| Value.String "ParseFloatError" |) |); + M.read (| M.of_value (| Value.String "kind" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::ParseFloatError", "kind" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -120,32 +121,35 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::ParseFloatError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::num::dec2flt::ParseFloatError" - [ - ("kind", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::num::dec2flt::FloatErrorKind", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::dec2flt::ParseFloatError", - "kind" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::num::dec2flt::ParseFloatError" + [ + ("kind", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::num::dec2flt::FloatErrorKind", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::dec2flt::ParseFloatError", + "kind" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -172,7 +176,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::ParseFloatError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -225,15 +229,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::ParseFloatError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -272,7 +276,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::FloatErrorKind". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -289,11 +293,11 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Empty" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Empty" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Invalid" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Invalid" |) |) |))) ] |) |) @@ -314,7 +318,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::FloatErrorKind". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -327,13 +331,17 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple "core::num::dec2flt::FloatErrorKind::Empty" [] + M.of_value (| + Value.StructTuple "core::num::dec2flt::FloatErrorKind::Empty" [] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple "core::num::dec2flt::FloatErrorKind::Invalid" [] + M.of_value (| + Value.StructTuple "core::num::dec2flt::FloatErrorKind::Invalid" [] + |) |))) ] |) @@ -364,7 +372,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::FloatErrorKind". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -391,7 +399,7 @@ Module num. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -419,12 +427,12 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::FloatErrorKind". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -448,7 +456,7 @@ Module num. } } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -464,11 +472,15 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "cannot parse float from empty string" |) + M.read (| + M.of_value (| Value.String "cannot parse float from empty string" |) + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid float literal" |) |))) + (M.alloc (| + M.read (| M.of_value (| Value.String "invalid float literal" |) |) + |))) ] |) |))) @@ -492,7 +504,7 @@ Module num. self.description().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -530,13 +542,21 @@ Module num. ParseFloatError { kind: FloatErrorKind::Empty } } *) - Definition pfe_empty (τ : list Ty.t) (α : list Value.t) : M := + Definition pfe_empty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::num::dec2flt::ParseFloatError" - [ ("kind", Value.StructTuple "core::num::dec2flt::FloatErrorKind::Empty" []) ])) + (M.of_value (| + Value.StructRecord + "core::num::dec2flt::ParseFloatError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::dec2flt::FloatErrorKind::Empty" [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -545,13 +565,21 @@ Module num. ParseFloatError { kind: FloatErrorKind::Invalid } } *) - Definition pfe_invalid (τ : list Ty.t) (α : list Value.t) : M := + Definition pfe_invalid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::num::dec2flt::ParseFloatError" - [ ("kind", Value.StructTuple "core::num::dec2flt::FloatErrorKind::Invalid" []) ])) + (M.of_value (| + Value.StructRecord + "core::num::dec2flt::ParseFloatError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::dec2flt::FloatErrorKind::Invalid" [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -562,7 +590,7 @@ Module num. T::from_u64_bits(word) } *) - Definition biased_fp_to_float (τ : list Ty.t) (α : list Value.t) : M := + Definition biased_fp_to_float (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -580,23 +608,25 @@ Module num. let β := word in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shl (| - M.rust_cast - (M.read (| + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shl (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| x, "core::num::dec2flt::common::BiasedFp", "e" |) - |)), + |) + |), M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) |) - |)) + |) + |) |) in M.alloc (| M.call_closure (| @@ -661,7 +691,7 @@ Module num. Ok(float) } *) - Definition dec2flt (τ : list Ty.t) (α : list Value.t) : M := + Definition dec2flt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ s ] => ltac:(M.monadic @@ -679,7 +709,7 @@ Module num. let c := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -709,14 +739,20 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_function (| "core::num::dec2flt::pfe_empty", [] |), - [] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::num::dec2flt::pfe_empty", + [] + |), + [] + |)) + ] + |) |) |) |) @@ -725,10 +761,15 @@ Module num. |) |) in let negative := - M.alloc (| BinOp.Pure.eq (M.read (| c |)) (M.read (| UnsupportedLiteral |)) |) in + M.alloc (| + BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -736,11 +777,15 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq (M.read (| c |)) (M.read (| UnsupportedLiteral |)), + BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| c |)) - (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) |) |)) in let _ := @@ -762,19 +807,21 @@ Module num. |), [ M.read (| s |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.of_value (| Value.Integer 1 |))) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -796,19 +843,25 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_function (| "core::num::dec2flt::pfe_invalid", [] |), - [] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::num::dec2flt::pfe_invalid", + [] + |), + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let num := @@ -854,9 +907,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ M.read (| value |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| value |)) ] + |) |) |) |) @@ -867,17 +922,20 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_function (| - "core::num::dec2flt::pfe_invalid", - [] - |), - [] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::num::dec2flt::pfe_invalid", + [] + |), + [] + |)) + ] + |) |) |) |) @@ -896,7 +954,7 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -922,14 +980,16 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ M.read (| value |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| value |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let fp := @@ -956,7 +1016,7 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -973,15 +1033,16 @@ Module num. |) |), ltac:(M.monadic - (BinOp.Pure.ge - (M.read (| + (BinOp.Pure.ge (| + M.read (| M.SubPointer.get_struct_record_field (| fp, "core::num::dec2flt::common::BiasedFp", "e" |) - |)) - (Value.Integer Integer.I32 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (M.call_closure (| @@ -1009,6 +1070,7 @@ Module num. |) |); BinOp.Panic.add (| + Integer.U64, M.read (| M.SubPointer.get_struct_record_field (| num, @@ -1016,7 +1078,7 @@ Module num. "mantissa" |) |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -1034,30 +1096,31 @@ Module num. "core::num::dec2flt::common::BiasedFp", "e" |), - Value.Integer Integer.I32 (-1) + M.of_value (| Value.Integer (-1) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| fp, "core::num::dec2flt::common::BiasedFp", "e" |) - |)) - (Value.Integer Integer.I32 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1072,8 +1135,8 @@ Module num. [ M.read (| s |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let float := @@ -1085,7 +1148,7 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1106,11 +1169,15 @@ Module num. [ M.read (| float |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| float |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| float |)) ] + |) + |) |))) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/num/dec2flt/number.v b/CoqOfRust/core/num/dec2flt/number.v index c272af088..412a2188e 100644 --- a/CoqOfRust/core/num/dec2flt/number.v +++ b/CoqOfRust/core/num/dec2flt/number.v @@ -4,29 +4,31 @@ Require Import CoqOfRust.CoqOfRust. Module num. Module dec2flt. Module number. - Definition value_INT_POW10 : Value.t := + Definition value_INT_POW10 : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Array - [ - Value.Integer Integer.U64 1; - Value.Integer Integer.U64 10; - Value.Integer Integer.U64 100; - Value.Integer Integer.U64 1000; - Value.Integer Integer.U64 10000; - Value.Integer Integer.U64 100000; - Value.Integer Integer.U64 1000000; - Value.Integer Integer.U64 10000000; - Value.Integer Integer.U64 100000000; - Value.Integer Integer.U64 1000000000; - Value.Integer Integer.U64 10000000000; - Value.Integer Integer.U64 100000000000; - Value.Integer Integer.U64 1000000000000; - Value.Integer Integer.U64 10000000000000; - Value.Integer Integer.U64 100000000000000; - Value.Integer Integer.U64 1000000000000000 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 1000 |)); + A.to_value (M.of_value (| Value.Integer 10000 |)); + A.to_value (M.of_value (| Value.Integer 100000 |)); + A.to_value (M.of_value (| Value.Integer 1000000 |)); + A.to_value (M.of_value (| Value.Integer 10000000 |)); + A.to_value (M.of_value (| Value.Integer 100000000 |)); + A.to_value (M.of_value (| Value.Integer 1000000000 |)); + A.to_value (M.of_value (| Value.Integer 10000000000 |)); + A.to_value (M.of_value (| Value.Integer 100000000000 |)); + A.to_value (M.of_value (| Value.Integer 1000000000000 |)); + A.to_value (M.of_value (| Value.Integer 10000000000000 |)); + A.to_value (M.of_value (| Value.Integer 100000000000000 |)); + A.to_value (M.of_value (| Value.Integer 1000000000000000 |)) + ] + |) |))). (* StructRecord @@ -46,24 +48,24 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::number::Number". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -97,7 +99,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::number::Number". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -111,41 +113,45 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "Number" |); - M.read (| Value.String "exponent" |); + M.read (| M.of_value (| Value.String "Number" |) |); + M.read (| M.of_value (| Value.String "exponent" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "exponent" - |)); - M.read (| Value.String "mantissa" |); + |) + |); + M.read (| M.of_value (| Value.String "mantissa" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "mantissa" - |)); - M.read (| Value.String "negative" |); + |) + |); + M.read (| M.of_value (| Value.String "negative" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "negative" - |)); - M.read (| Value.String "many_digits" |); + |) + |); + M.read (| M.of_value (| Value.String "many_digits" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "many_digits" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -163,58 +169,64 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::number::Number". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::num::dec2flt::number::Number" - [ - ("exponent", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "i64", - [], - "default", - [] - |), - [] - |)); - ("mantissa", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u64", - [], - "default", - [] - |), - [] - |)); - ("negative", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "bool", - [], - "default", - [] - |), - [] - |)); - ("many_digits", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "bool", - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::num::dec2flt::number::Number" + [ + ("exponent", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "i64", + [], + "default", + [] + |), + [] + |))); + ("mantissa", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u64", + [], + "default", + [] + |), + [] + |))); + ("negative", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))); + ("many_digits", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -241,7 +253,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::number::Number". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -250,71 +262,75 @@ Module num. LogicalOp.and (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "exponent" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::dec2flt::number::Number", "exponent" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "mantissa" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::dec2flt::number::Number", "mantissa" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "negative" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::dec2flt::number::Number", "negative" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "many_digits" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::dec2flt::number::Number", "many_digits" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -342,25 +358,29 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::dec2flt::number::Number". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |))) @@ -390,7 +410,7 @@ Module num. && !self.many_digits } *) - Definition is_fast_path (τ : list Ty.t) (α : list Value.t) : M := + Definition is_fast_path (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self ] => ltac:(M.monadic @@ -398,58 +418,62 @@ Module num. LogicalOp.and (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MIN_EXPONENT_FAST_PATH" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "exponent" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + 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_DISGUISED_FAST_PATH" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "mantissa" |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MAX_MANTISSA_FAST_PATH" |) - |)))) + |) + |))) |), ltac:(M.monadic - (UnOp.Pure.not - (M.read (| + (UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "many_digits" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -494,7 +518,7 @@ Module num. } } *) - Definition try_fast_path (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fast_path (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self ] => ltac:(M.monadic @@ -513,7 +537,7 @@ Module num. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -534,26 +558,27 @@ Module num. let value := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + 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 _ := M.is_constant_or_break_match (| @@ -582,22 +607,23 @@ Module num. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "exponent" |) - |)) - (Value.Integer Integer.I64 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -624,8 +650,9 @@ Module num. [] |), [ - M.rust_cast - (UnOp.Panic.neg (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I64, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -633,7 +660,8 @@ Module num. "exponent" |) |) - |)) + |) + |) ] |) ] @@ -661,14 +689,15 @@ Module num. [] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "exponent" |) - |)) + |) + |) ] |) ] @@ -681,6 +710,7 @@ Module num. (let shift := M.alloc (| BinOp.Panic.sub (| + Integer.I64, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -730,7 +760,7 @@ Module num. "core::num::dec2flt::number::INT_POW10" |), M.alloc (| - M.rust_cast (M.read (| shift |)) + M.rust_cast (| M.read (| shift |) |) |) |) |) @@ -791,20 +821,21 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| mantissa |)) - (M.read (| + BinOp.Pure.gt (| + M.read (| mantissa |), + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MAX_MANTISSA_FAST_PATH" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -815,15 +846,18 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -855,12 +889,13 @@ Module num. [] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MAX_EXPONENT_FAST_PATH" |) - |)) + |) + |) ] |) ] @@ -871,7 +906,7 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -901,16 +936,23 @@ Module num. [ M.read (| value |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| value |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| value |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) diff --git a/CoqOfRust/core/num/dec2flt/parse.v b/CoqOfRust/core/num/dec2flt/parse.v index 4f32c2e41..042a0bc3f 100644 --- a/CoqOfRust/core/num/dec2flt/parse.v +++ b/CoqOfRust/core/num/dec2flt/parse.v @@ -4,8 +4,8 @@ Require Import CoqOfRust.CoqOfRust. Module num. Module dec2flt. Module parse. - Definition value_MIN_19DIGIT_INT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 1000000000000000000 |))). + Definition value_MIN_19DIGIT_INT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1000000000000000000 |) |))). (* fn parse_8digits(mut v: u64) -> u64 { @@ -19,7 +19,7 @@ Module num. ((v1.wrapping_add(v2) >> 32) as u32) as u64 } *) - Definition parse_8digits (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_8digits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -30,16 +30,22 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 3472328296227680304 + M.of_value (| Value.Integer 3472328296227680304 |) |) |) in let _ := M.write (| v, BinOp.Panic.add (| - BinOp.Panic.mul (| M.read (| v |), Value.Integer Integer.U64 10 |), - BinOp.Panic.shr (| M.read (| v |), Value.Integer Integer.I32 8 |) + Integer.U64, + BinOp.Panic.mul (| + Integer.U64, + M.read (| v |), + M.of_value (| Value.Integer 10 |) + |), + BinOp.Panic.shr (| M.read (| v |), M.of_value (| Value.Integer 8 |) |) |) |) in let v1 := @@ -47,11 +53,12 @@ Module num. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_mul", [] |), [ - BinOp.Pure.bit_and - (M.read (| v |)) - (M.read (| + BinOp.Pure.bit_and (| + M.read (| v |), + M.read (| M.get_constant (| "core::num::dec2flt::parse::parse_8digits::MASK" |) - |)); + |) + |); M.read (| M.get_constant (| "core::num::dec2flt::parse::parse_8digits::MUL1" |) |) @@ -63,11 +70,12 @@ Module num. M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_mul", [] |), [ - BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| v |), Value.Integer Integer.I32 16 |)) - (M.read (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| v |), M.of_value (| Value.Integer 16 |) |), + M.read (| M.get_constant (| "core::num::dec2flt::parse::parse_8digits::MASK" |) - |)); + |) + |); M.read (| M.get_constant (| "core::num::dec2flt::parse::parse_8digits::MUL2" |) |) @@ -75,29 +83,31 @@ Module num. |) |) in M.alloc (| - M.rust_cast - (M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + M.rust_cast (| + BinOp.Panic.shr (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ M.read (| v1 |); M.read (| v2 |) ] |), - Value.Integer Integer.I32 32 - |))) + M.of_value (| Value.Integer 32 |) + |) + |) + |) |) |))) | _, _ => M.impossible end. Module parse_8digits. - Definition value_MASK : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 1095216660735 |))). + Definition value_MASK : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1095216660735 |) |))). - Definition value_MUL1 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 4294967296000100 |))). + Definition value_MUL1 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4294967296000100 |) |))). - Definition value_MUL2 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 42949672960001 |))). + Definition value_MUL2 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 42949672960001 |) |))). End parse_8digits. (* @@ -121,7 +131,7 @@ Module num. (s, x) } *) - Definition try_parse_digits (τ : list Ty.t) (α : list Value.t) : M := + Definition try_parse_digits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s; x ] => ltac:(M.monadic @@ -132,23 +142,24 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| s |) ] - |)) - (Value.Integer Integer.Usize 8) + |), + M.of_value (| Value.Integer 8 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -166,7 +177,7 @@ Module num. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -202,7 +213,9 @@ Module num. "wrapping_mul", [] |), - [ M.read (| x |); Value.Integer Integer.U64 100000000 + [ + M.read (| x |); + M.of_value (| Value.Integer 100000000 |) ] |); M.call_closure (| @@ -232,13 +245,18 @@ Module num. |), [ M.read (| s |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 8) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 8 |))) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))) @@ -251,7 +269,7 @@ Module num. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -271,8 +289,8 @@ Module num. |), [ M.read (| s |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -299,22 +317,30 @@ Module num. "wrapping_mul", [] |), - [ M.read (| x |); Value.Integer Integer.U64 10 ] + [ + M.read (| x |); + M.of_value (| Value.Integer 10 |) + ] |); - M.rust_cast (M.read (| digit |)) + M.rust_cast (| M.read (| digit |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| s |); M.read (| x |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| s |)); A.to_value (M.read (| x |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -343,7 +369,7 @@ Module num. *s_ref = s; } *) - Definition try_parse_19digits (τ : list Ty.t) (α : list Value.t) : M := + Definition try_parse_19digits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s_ref; x ] => ltac:(M.monadic @@ -355,25 +381,26 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.read (| x |) |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| M.read (| x |) |), + M.read (| M.get_constant (| "core::num::dec2flt::parse::MIN_19DIGIT_INT" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -393,21 +420,22 @@ Module num. |), [ M.read (| M.read (| c |) |); - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| digit |)) - (Value.Integer Integer.U8 10) + BinOp.Pure.lt (| + M.read (| digit |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -418,15 +446,17 @@ Module num. M.write (| M.read (| x |), BinOp.Panic.add (| + Integer.U64, BinOp.Panic.mul (| + Integer.U64, M.read (| M.read (| x |) |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |), - M.rust_cast (M.read (| digit |)) + M.rust_cast (| M.read (| digit |) |) |) |) in let _ := M.write (| s, M.read (| s_next |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -446,7 +476,7 @@ Module num. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -454,7 +484,7 @@ Module num. |))) |) in let _ := M.write (| M.read (| s_ref |), M.read (| s |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -487,18 +517,18 @@ Module num. } } *) - Definition parse_scientific (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_scientific (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s_ref ] => ltac:(M.monadic (let s_ref := M.alloc (| s_ref |) in M.read (| - let exponent := M.alloc (| Value.Integer Integer.I64 0 |) in - let negative := M.alloc (| Value.Bool false |) in + let exponent := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let negative := M.alloc (| M.of_value (| Value.Bool false |) |) in let s := M.copy (| M.read (| s_ref |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -527,10 +557,13 @@ Module num. let _ := M.write (| negative, - BinOp.Pure.eq (M.read (| c |)) (M.read (| UnsupportedLiteral |)) + BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -538,13 +571,15 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (M.read (| c |)) - (M.read (| UnsupportedLiteral |)), + BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| c |)) - (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) |) |)) in let _ := @@ -553,15 +588,16 @@ Module num. Value.Bool true |) in let _ := M.write (| s, M.read (| s_next |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -605,8 +641,9 @@ Module num. M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -623,8 +660,8 @@ Module num. |), [ M.read (| s |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -636,16 +673,17 @@ Module num. (let digit := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exponent |)) - (Value.Integer Integer.I64 65536) + BinOp.Pure.lt (| + M.read (| exponent |), + M.of_value (| Value.Integer 65536 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -656,29 +694,36 @@ Module num. M.write (| exponent, BinOp.Panic.add (| + Integer.I64, BinOp.Panic.mul (| - Value.Integer Integer.I64 10, + Integer.I64, + M.of_value (| Value.Integer 10 |), M.read (| exponent |) |), - M.rust_cast (M.read (| digit |)) + M.rust_cast (| M.read (| digit |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -689,23 +734,32 @@ Module num. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ UnOp.Panic.neg (| M.read (| exponent |) |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (UnOp.Panic.neg (| Integer.I64, M.read (| exponent |) |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| exponent |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| exponent |)) ] + |) |))) ] |))); fun γ => ltac:(M.monadic (let _ := M.write (| M.read (| s_ref |), M.read (| s |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -795,7 +849,7 @@ Module num. Some((Number { exponent, mantissa, negative: false, many_digits }, len)) } *) - Definition parse_partial_number (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_partial_number (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -805,32 +859,34 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "is_empty", [] |), [ M.read (| s |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -843,20 +899,23 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: !s.is_empty()" + M.of_value (| + Value.String "assertion failed: !s.is_empty()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let mantissa := M.alloc (| Value.Integer Integer.U64 0 |) in + let mantissa := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let start := M.copy (| s |) in let tmp := M.alloc (| @@ -885,12 +944,12 @@ Module num. [ M.read (| s |); M.read (| start |) ] |) |) in - let n_after_dot := M.alloc (| Value.Integer Integer.Isize 0 |) in - let exponent := M.alloc (| Value.Integer Integer.I64 0 |) in + let n_after_dot := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let exponent := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let int_end := M.copy (| s |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -917,7 +976,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ1_0 |), - Value.Integer Integer.U8 46 + Value.Integer 46 |) in let s_next := M.copy (| γ1_1 |) in let _ := M.write (| s, M.read (| s_next |) |) in @@ -959,47 +1018,54 @@ Module num. let _ := M.write (| exponent, - M.rust_cast (UnOp.Panic.neg (| M.read (| n_after_dot |) |)) + M.rust_cast (| + UnOp.Panic.neg (| Integer.Isize, M.read (| n_after_dot |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := n_digits in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| n_after_dot |) |) + BinOp.Panic.add (| Integer.Isize, M.read (| β |), M.read (| n_after_dot |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| n_digits |)) - (Value.Integer Integer.Isize 0) + BinOp.Pure.eq (| + M.read (| n_digits |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let exp_number := M.alloc (| Value.Integer Integer.I64 0 |) in + let exp_number := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1026,7 +1092,7 @@ Module num. let c := M.copy (| γ1_0 |) in let s_next := M.copy (| γ1_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1034,13 +1100,15 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (M.read (| c |)) - (M.read (| UnsupportedLiteral |)), + BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| c |)) - (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) |) |)) in let _ := @@ -1139,21 +1207,23 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I64, M.read (| β |), M.read (| exp_number |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::num::dec2flt::common::ByteSlice", Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -1162,20 +1232,22 @@ Module num. [] |), [ M.read (| s |); M.read (| start |) ] - |)) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| n_digits |)) - (Value.Integer Integer.Isize 19) + BinOp.Pure.le (| + M.read (| n_digits |), + M.of_value (| Value.Integer 19 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1183,42 +1255,60 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - Value.StructRecord - "core::num::dec2flt::number::Number" - [ - ("exponent", M.read (| exponent |)); - ("mantissa", M.read (| mantissa |)); - ("negative", Value.Bool false); - ("many_digits", Value.Bool false) - ]; - M.read (| len |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::num::dec2flt::number::Number" + [ + ("exponent", + A.to_value (M.read (| exponent |))); + ("mantissa", + A.to_value (M.read (| mantissa |))); + ("negative", + A.to_value + (M.of_value (| Value.Bool false |))); + ("many_digits", + A.to_value + (M.of_value (| Value.Bool false |))) + ] + |)); + A.to_value (M.read (| len |)) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := n_digits in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Isize 19 |) + BinOp.Panic.sub (| + Integer.Isize, + M.read (| β |), + M.of_value (| Value.Integer 19 |) + |) |) in - let many_digits := M.alloc (| Value.Bool false |) in + let many_digits := M.alloc (| M.of_value (| Value.Bool false |) |) in let p := M.copy (| start |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1245,7 +1335,7 @@ Module num. let c := M.copy (| γ1_0 |) in let p_next := M.copy (| γ1_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1253,13 +1343,15 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (M.read (| c |)) - (M.read (| UnsupportedLiteral |)), + BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| c |)) - (M.read (| UnsupportedLiteral |)))) + (BinOp.Pure.eq (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) |) |)) in let _ := @@ -1272,9 +1364,10 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.Isize, M.read (| β |), - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "saturating_sub", @@ -1283,15 +1376,19 @@ Module num. [ M.read (| c |); BinOp.Panic.sub (| - M.read (| UnsupportedLiteral |), - Value.Integer Integer.U8 1 + Integer.U8, + M.read (| + M.of_value (| UnsupportedLiteral |) + |), + M.of_value (| Value.Integer 1 |) |) ] - |)) + |) + |) |) |) in let _ := M.write (| p, M.read (| p_next |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1308,7 +1405,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1317,21 +1414,22 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| n_digits |)) - (Value.Integer Integer.Isize 0) + BinOp.Pure.gt (| + M.read (| n_digits |), + M.of_value (| Value.Integer 0 |) + |) |)) 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 Integer.U64 0 |) in + let _ := M.write (| many_digits, M.of_value (| Value.Bool true |) |) in + let _ := M.write (| mantissa, M.of_value (| Value.Integer 0 |) |) in let s := M.copy (| start |) in let _ := M.alloc (| @@ -1346,23 +1444,24 @@ Module num. let _ := M.write (| exponent, - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| mantissa |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| mantissa |), + M.read (| M.get_constant (| "core::num::dec2flt::parse::MIN_19DIGIT_INT" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1400,9 +1499,15 @@ Module num. |), [ M.read (| s |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) ] |) |) in @@ -1419,6 +1524,7 @@ Module num. |) in M.alloc (| UnOp.Panic.neg (| + Integer.Isize, M.call_closure (| M.get_trait_method (| "core::num::dec2flt::common::ByteSlice", @@ -1433,35 +1539,49 @@ Module num. |))) ] |) - |)) + |) + |) |) in let _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| exp_number |) |) + BinOp.Panic.add (| + Integer.I64, + M.read (| β |), + M.read (| exp_number |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - Value.StructRecord - "core::num::dec2flt::number::Number" - [ - ("exponent", M.read (| exponent |)); - ("mantissa", M.read (| mantissa |)); - ("negative", Value.Bool false); - ("many_digits", M.read (| many_digits |)) - ]; - M.read (| len |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::num::dec2flt::number::Number" + [ + ("exponent", A.to_value (M.read (| exponent |))); + ("mantissa", A.to_value (M.read (| mantissa |))); + ("negative", + A.to_value (M.of_value (| Value.Bool false |))); + ("many_digits", A.to_value (M.read (| many_digits |))) + ] + |)); + A.to_value (M.read (| len |)) + ] + |)) + ] + |) |) |))) |))) @@ -1478,7 +1598,7 @@ Module num. None } *) - Definition parse_number (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_number (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -1488,7 +1608,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1513,23 +1633,24 @@ Module num. let float := M.copy (| γ1_0 |) in let rest := M.copy (| γ1_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| rest |)) - (M.call_closure (| + BinOp.Pure.eq (| + M.read (| rest |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| s |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1540,20 +1661,23 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| float |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| float |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -1605,7 +1729,7 @@ Module num. if negative { Some(-float) } else { Some(float) } } *) - Definition parse_inf_nan (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_inf_nan (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ s; negative ] => ltac:(M.monadic @@ -1614,27 +1738,28 @@ 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 register := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in + let len := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| s |) ] - |)) - (Value.Integer Integer.Usize 8) + |), + M.of_value (| Value.Integer 8 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1652,28 +1777,29 @@ Module num. [ M.read (| s |) ] |) |) in - let _ := M.write (| len, Value.Integer Integer.Usize 8 |) in - M.alloc (| Value.Tuple [] |))); + let _ := M.write (| len, M.of_value (| Value.Integer 8 |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| s |) ] - |)) - (Value.Integer Integer.Usize 3) + |), + M.of_value (| Value.Integer 3 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1682,58 +1808,65 @@ Module num. |) in let a := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.read (| s |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) + |) + |) |) in let b := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.read (| s |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |) - |)) + |) + |) |) in let c := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.read (| s |), - M.alloc (| Value.Integer Integer.Usize 2 |) + M.alloc (| M.of_value (| Value.Integer 2 |) |) |) - |)) + |) + |) |) in let _ := M.write (| register, - BinOp.Pure.bit_or - (BinOp.Pure.bit_or - (BinOp.Panic.shl (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| M.read (| c |), - Value.Integer Integer.I32 16 - |)) - (BinOp.Panic.shl (| + M.of_value (| Value.Integer 16 |) + |), + BinOp.Panic.shl (| M.read (| b |), - Value.Integer Integer.I32 8 - |))) - (M.read (| a |)) + M.of_value (| Value.Integer 8 |) + |) + |), + M.read (| a |) + |) |) in - let _ := M.write (| len, Value.Integer Integer.Usize 3 |) in - M.alloc (| Value.Tuple [] |))); + let _ := M.write (| len, M.of_value (| Value.Integer 3 |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -1746,14 +1879,20 @@ Module num. let β := register in M.write (| β, - BinOp.Pure.bit_and - (M.read (| β |)) - (Value.Integer Integer.U64 16131858542891098079) + BinOp.Pure.bit_and (| + M.read (| β |), + M.of_value (| Value.Integer 16131858542891098079 |) + |) |) in let float := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| register |); M.read (| len |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| register |)); A.to_value (M.read (| len |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -1762,12 +1901,12 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U64 4607561 + Value.Integer 4607561 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.Usize 3 + Value.Integer 3 |) in M.get_constant (| "core::num::dec2flt::float::RawFloat::INFINITY" @@ -1779,12 +1918,12 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U64 6436850368004902473 + Value.Integer 6436850368004902473 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.Usize 8 + Value.Integer 8 |) in M.get_constant (| "core::num::dec2flt::float::RawFloat::INFINITY" @@ -1796,12 +1935,12 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U64 5128526 + Value.Integer 5128526 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.Usize 3 + Value.Integer 3 |) in M.get_constant (| "core::num::dec2flt::float::RawFloat::NAN" |))); fun γ => @@ -1810,7 +1949,9 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -1819,7 +1960,7 @@ Module num. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1827,25 +1968,32 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Neg", - F, - [], - "neg", - [] - |), - [ M.read (| float |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Neg", + F, + [], + "neg", + [] + |), + [ M.read (| float |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| float |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| float |)) ] + |) |))) ] |) @@ -1855,14 +2003,14 @@ Module num. end. Module parse_inf_nan. - Definition value_INF_3 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 4607561 |))). + Definition value_INF_3 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4607561 |) |))). - Definition value_INF_8 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 6436850368004902473 |))). + Definition value_INF_8 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 6436850368004902473 |) |))). - Definition value_NAN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 5128526 |))). + Definition value_NAN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 5128526 |) |))). End parse_inf_nan. End parse. End dec2flt. diff --git a/CoqOfRust/core/num/dec2flt/slow.v b/CoqOfRust/core/num/dec2flt/slow.v index 595508fb4..5341655bb 100644 --- a/CoqOfRust/core/num/dec2flt/slow.v +++ b/CoqOfRust/core/num/dec2flt/slow.v @@ -90,7 +90,7 @@ Module num. BiasedFp { f: mantissa, e: power2 } } *) - Definition parse_long_mantissa (τ : list Ty.t) (α : list Value.t) : M := + Definition parse_long_mantissa (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ s ] => ltac:(M.monadic @@ -100,8 +100,8 @@ Module num. (M.read (| let get_shift := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -113,20 +113,21 @@ Module num. (let n := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| n |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| n |), + M.read (| M.get_constant (| "core::num::dec2flt::slow::parse_long_mantissa::NUM_POWERS" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -134,15 +135,16 @@ Module num. Value.Bool true |) in M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.get_constant (| "core::num::dec2flt::slow::parse_long_mantissa::POWERS" |), n |) - |)) + |) + |) |))); fun γ => ltac:(M.monadic @@ -155,7 +157,8 @@ Module num. ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let fp_zero := M.alloc (| @@ -165,7 +168,7 @@ Module num. "zero_pow2", [] |), - [ Value.Integer Integer.I32 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |) in let fp_inf := @@ -194,7 +197,7 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -202,25 +205,27 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - (Value.Integer Integer.Usize 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| + (BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (Value.Integer Integer.I32 (-324)))) + |), + M.of_value (| Value.Integer (-324) |) + |))) |) |)) in let _ := @@ -231,22 +236,23 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (Value.Integer Integer.I32 310) + |), + M.of_value (| Value.Integer 310 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -258,32 +264,34 @@ Module num. M.read (| M.return_ (| M.read (| fp_inf |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - let exp2 := M.alloc (| Value.Integer Integer.I32 0 |) in + let exp2 := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (Value.Integer Integer.I32 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -292,14 +300,15 @@ Module num. |) in let n := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) + |) + |) |) in let shift := M.alloc (| @@ -313,7 +322,10 @@ Module num. "call", [] |), - [ get_shift; Value.Tuple [ M.read (| n |) ] ] + [ + get_shift; + M.of_value (| Value.Tuple [ A.to_value (M.read (| n |)) ] |) + ] |) |) in let _ := @@ -329,28 +341,30 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (UnOp.Panic.neg (| + |), + UnOp.Panic.neg (| + Integer.I32, M.read (| M.get_constant (| "core::num::dec2flt::decimal::DECIMAL_POINT_RANGE" |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -362,7 +376,9 @@ Module num. M.read (| M.return_ (| M.read (| fp_zero |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -370,11 +386,12 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I32, M.read (| β |), - M.rust_cast (M.read (| shift |)) + M.rust_cast (| M.read (| shift |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -384,7 +401,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -395,22 +412,23 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (Value.Integer Integer.I32 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -420,22 +438,23 @@ Module num. let shift := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (Value.Integer Integer.I32 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -449,7 +468,7 @@ Module num. "core::num::dec2flt::decimal::Decimal", "digits" |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), [ fun γ => @@ -457,9 +476,10 @@ Module num. (let digit := M.copy (| γ |) in let γ := M.alloc (| - BinOp.Pure.ge - (M.read (| digit |)) - (Value.Integer Integer.U8 5) + BinOp.Pure.ge (| + M.read (| digit |), + M.of_value (| Value.Integer 5 |) + |) |) in let _ := M.is_constant_or_break_match (| @@ -479,32 +499,35 @@ Module num. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U8 0 + Value.Integer 0 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U8 1 + Value.Integer 1 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => M.alloc (| - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Integer Integer.Usize 1 |))) + (M.alloc (| + M.of_value (| Value.Integer 1 |) + |))) ] |))); fun γ => @@ -522,19 +545,24 @@ Module num. |), [ get_shift; - Value.Tuple - [ - M.rust_cast - (UnOp.Panic.neg (| - M.read (| - M.SubPointer.get_struct_record_field (| - d, - "core::num::dec2flt::decimal::Decimal", - "decimal_point" + M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + UnOp.Panic.neg (| + Integer.I32, + M.read (| + M.SubPointer.get_struct_record_field (| + d, + "core::num::dec2flt::decimal::Decimal", + "decimal_point" + |) + |) |) - |) - |)) - ] + |)) + ] + |) ] |) |))) @@ -554,26 +582,27 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "decimal_point" |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::dec2flt::decimal::DECIMAL_POINT_RANGE" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -585,7 +614,9 @@ Module num. M.read (| M.return_ (| M.read (| fp_inf |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -593,11 +624,12 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.I32, M.read (| β |), - M.rust_cast (M.read (| shift |)) + M.rust_cast (| M.read (| shift |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -607,7 +639,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -618,29 +650,35 @@ Module num. let β := exp2 in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.I32 1 |) + BinOp.Panic.sub (| + Integer.I32, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (BinOp.Panic.add (| + BinOp.Pure.gt (| + BinOp.Panic.add (| + Integer.I32, M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) |), - Value.Integer Integer.I32 1 - |)) - (M.read (| exp2 |)) + M.of_value (| Value.Integer 1 |) + |), + M.read (| exp2 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -649,35 +687,39 @@ Module num. |) in let n := M.alloc (| - M.rust_cast - (BinOp.Panic.sub (| + M.rust_cast (| + BinOp.Panic.sub (| + Integer.I32, BinOp.Panic.add (| + Integer.I32, M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |), M.read (| exp2 |) - |)) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| n |)) - (M.read (| + BinOp.Pure.gt (| + M.read (| n |), + M.read (| M.get_constant (| "core::num::dec2flt::slow::parse_long_mantissa::MAX_SHIFT" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -693,8 +735,10 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -713,11 +757,12 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I32, M.read (| β |), - M.rust_cast (M.read (| n |)) + M.rust_cast (| M.read (| n |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -727,7 +772,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -736,34 +781,36 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (BinOp.Panic.sub (| + BinOp.Pure.ge (| + BinOp.Panic.sub (| + Integer.I32, M.read (| exp2 |), M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::INFINITE_POWER" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| fp_inf |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -777,12 +824,13 @@ Module num. [ d; BinOp.Panic.add (| + Integer.Usize, M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -800,26 +848,28 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| mantissa |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + BinOp.Pure.ge (| + M.read (| mantissa |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), BinOp.Panic.add (| + Integer.Usize, M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -831,14 +881,18 @@ Module num. "right_shift", [] |), - [ d; Value.Integer Integer.Usize 1 ] + [ d; M.of_value (| Value.Integer 1 |) ] |) |) in let _ := let β := exp2 in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I32 1 |) + BinOp.Panic.add (| + Integer.I32, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.write (| @@ -853,27 +907,29 @@ Module num. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (BinOp.Panic.sub (| + BinOp.Pure.ge (| + BinOp.Panic.sub (| + Integer.I32, M.read (| exp2 |), M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::INFINITE_POWER" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -885,15 +941,17 @@ Module num. M.read (| M.return_ (| M.read (| fp_inf |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let power2 := M.alloc (| BinOp.Panic.sub (| + Integer.I32, M.read (| exp2 |), M.read (| M.get_constant (| @@ -904,23 +962,24 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| mantissa |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + BinOp.Pure.lt (| + M.read (| mantissa |), + BinOp.Panic.shl (| + M.of_value (| 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 @@ -928,34 +987,45 @@ Module num. let β := power2 in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.I32 1 |) + BinOp.Panic.sub (| + Integer.I32, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := mantissa in M.write (| β, - BinOp.Pure.bit_and - (M.read (| β |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| β |), + BinOp.Panic.sub (| + Integer.U64, BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) |) |), - Value.Integer Integer.U64 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in M.alloc (| - Value.StructRecord - "core::num::dec2flt::common::BiasedFp" - [ ("f", M.read (| mantissa |)); ("e", M.read (| power2 |)) ] + M.of_value (| + Value.StructRecord + "core::num::dec2flt::common::BiasedFp" + [ + ("f", A.to_value (M.read (| mantissa |))); + ("e", A.to_value (M.read (| power2 |))) + ] + |) |) |))) |))) @@ -963,38 +1033,40 @@ Module num. end. Module parse_long_mantissa. - Definition value_MAX_SHIFT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 60 |))). + Definition value_MAX_SHIFT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 60 |) |))). - Definition value_NUM_POWERS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 19 |))). + Definition value_NUM_POWERS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 19 |) |))). - Definition value_POWERS : Value.t := + Definition value_POWERS : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 53; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 59 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 53 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 59 |)) + ] + |) |))). End parse_long_mantissa. End slow. diff --git a/CoqOfRust/core/num/dec2flt/table.v b/CoqOfRust/core/num/dec2flt/table.v index 0cbcd133c..66cd2e5de 100644 --- a/CoqOfRust/core/num/dec2flt/table.v +++ b/CoqOfRust/core/num/dec2flt/table.v @@ -4,19 +4,21 @@ Require Import CoqOfRust.CoqOfRust. Module num. Module dec2flt. Module table. - Definition value_SMALLEST_POWER_OF_FIVE : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-342) |))). + Definition value_SMALLEST_POWER_OF_FIVE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-342) |) |))). - Definition value_LARGEST_POWER_OF_FIVE : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 308 |))). + Definition value_LARGEST_POWER_OF_FIVE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 308 |) |))). - Definition value_N_POWERS_OF_FIVE : Value.t := + Definition value_N_POWERS_OF_FIVE : A.t := M.run ltac:(M.monadic (M.alloc (| - M.rust_cast - (BinOp.Panic.add (| + M.rust_cast (| + BinOp.Panic.add (| + Integer.I32, BinOp.Panic.sub (| + Integer.I32, M.read (| M.get_constant (| "core::num::dec2flt::table::LARGEST_POWER_OF_FIVE" |) |), @@ -24,3217 +26,5229 @@ Module num. M.get_constant (| "core::num::dec2flt::table::SMALLEST_POWER_OF_FIVE" |) |) |), - Value.Integer Integer.I32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |))). - Definition value_POWER_OF_FIVE_128 : Value.t := + Definition value_POWER_OF_FIVE_128 : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Tuple - [ - Value.Integer Integer.U64 17218479456385750618; - Value.Integer Integer.U64 1242899115359157055 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10761549660241094136; - Value.Integer Integer.U64 5388497965526861063 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13451937075301367670; - Value.Integer Integer.U64 6735622456908576329 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16814921344126709587; - Value.Integer Integer.U64 17642900107990496220 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10509325840079193492; - Value.Integer Integer.U64 8720969558280366185 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13136657300098991865; - Value.Integer Integer.U64 10901211947850457732 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16420821625123739831; - Value.Integer Integer.U64 18238200953240460069 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10263013515702337394; - Value.Integer Integer.U64 18316404623416369399 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12828766894627921743; - Value.Integer Integer.U64 13672133742415685941 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16035958618284902179; - Value.Integer Integer.U64 12478481159592219522 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10022474136428063862; - Value.Integer Integer.U64 5493207715531443249 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12528092670535079827; - Value.Integer Integer.U64 16089881681269079869 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15660115838168849784; - Value.Integer Integer.U64 15500666083158961933 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9787572398855531115; - Value.Integer Integer.U64 9687916301974351208 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12234465498569413894; - Value.Integer Integer.U64 7498209359040551106 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15293081873211767368; - Value.Integer Integer.U64 149389661945913074 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9558176170757354605; - Value.Integer Integer.U64 93368538716195671 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11947720213446693256; - Value.Integer Integer.U64 4728396691822632493 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14934650266808366570; - Value.Integer Integer.U64 5910495864778290617 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9334156416755229106; - Value.Integer Integer.U64 8305745933913819539 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11667695520944036383; - Value.Integer Integer.U64 1158810380537498616 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14584619401180045478; - Value.Integer Integer.U64 15283571030954036982 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18230774251475056848; - Value.Integer Integer.U64 9881091751837770420 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11394233907171910530; - Value.Integer Integer.U64 6175682344898606512 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14242792383964888162; - Value.Integer Integer.U64 16942974967978033949 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17803490479956110203; - Value.Integer Integer.U64 11955346673117766628 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11127181549972568877; - Value.Integer Integer.U64 5166248661484910190 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13908976937465711096; - Value.Integer Integer.U64 11069496845283525642 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17386221171832138870; - Value.Integer Integer.U64 13836871056604407053 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10866388232395086794; - Value.Integer Integer.U64 4036358391950366504 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13582985290493858492; - Value.Integer Integer.U64 14268820026792733938 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16978731613117323115; - Value.Integer Integer.U64 17836025033490917422 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10611707258198326947; - Value.Integer Integer.U64 8841672636718129437 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13264634072747908684; - Value.Integer Integer.U64 6440404777470273892 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16580792590934885855; - Value.Integer Integer.U64 8050505971837842365 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10362995369334303659; - Value.Integer Integer.U64 11949095260039733334 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12953744211667879574; - Value.Integer Integer.U64 10324683056622278764 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16192180264584849468; - Value.Integer Integer.U64 3682481783923072647 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10120112665365530917; - Value.Integer Integer.U64 11524923151806696212 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12650140831706913647; - Value.Integer Integer.U64 571095884476206553 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15812676039633642058; - Value.Integer Integer.U64 14548927910877421904 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9882922524771026286; - Value.Integer Integer.U64 13704765962725776594 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12353653155963782858; - Value.Integer Integer.U64 7907585416552444934 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15442066444954728573; - Value.Integer Integer.U64 661109733835780360 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9651291528096705358; - Value.Integer Integer.U64 2719036592861056677 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12064114410120881697; - Value.Integer Integer.U64 12622167777931096654 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15080143012651102122; - Value.Integer Integer.U64 1942651667131707105 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9425089382906938826; - Value.Integer Integer.U64 5825843310384704845 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11781361728633673532; - Value.Integer Integer.U64 16505676174835656864 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14726702160792091916; - Value.Integer Integer.U64 2185351144835019464 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18408377700990114895; - Value.Integer Integer.U64 2731688931043774330 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11505236063118821809; - Value.Integer Integer.U64 8624834609543440812 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14381545078898527261; - Value.Integer Integer.U64 15392729280356688919 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17976931348623159077; - Value.Integer Integer.U64 5405853545163697437 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11235582092889474423; - Value.Integer Integer.U64 5684501474941004850 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14044477616111843029; - Value.Integer Integer.U64 2493940825248868159 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17555597020139803786; - Value.Integer Integer.U64 7729112049988473103 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10972248137587377366; - Value.Integer Integer.U64 9442381049670183593 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13715310171984221708; - Value.Integer Integer.U64 2579604275232953683 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17144137714980277135; - Value.Integer Integer.U64 3224505344041192104 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10715086071862673209; - Value.Integer Integer.U64 8932844867666826921 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13393857589828341511; - Value.Integer Integer.U64 15777742103010921555 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16742321987285426889; - Value.Integer Integer.U64 15110491610336264040 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10463951242053391806; - Value.Integer Integer.U64 2526528228819083169 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13079939052566739757; - Value.Integer Integer.U64 12381532322878629770 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16349923815708424697; - Value.Integer Integer.U64 1641857348316123500 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10218702384817765435; - Value.Integer Integer.U64 12555375888766046947 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12773377981022206794; - Value.Integer Integer.U64 11082533842530170780 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15966722476277758493; - Value.Integer Integer.U64 4629795266307937667 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9979201547673599058; - Value.Integer Integer.U64 5199465050656154994 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12474001934591998822; - Value.Integer Integer.U64 15722703350174969551 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15592502418239998528; - Value.Integer Integer.U64 10430007150863936130 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9745314011399999080; - Value.Integer Integer.U64 6518754469289960081 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12181642514249998850; - Value.Integer Integer.U64 8148443086612450102 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15227053142812498563; - Value.Integer Integer.U64 962181821410786819 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9516908214257811601; - Value.Integer Integer.U64 16742264702877599426 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11896135267822264502; - Value.Integer Integer.U64 7092772823314835570 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14870169084777830627; - Value.Integer Integer.U64 18089338065998320271 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9293855677986144142; - Value.Integer Integer.U64 8999993282035256217 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11617319597482680178; - Value.Integer Integer.U64 2026619565689294464 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14521649496853350222; - Value.Integer Integer.U64 11756646493966393888 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18152061871066687778; - Value.Integer Integer.U64 5472436080603216552 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11345038669416679861; - Value.Integer Integer.U64 8031958568804398249 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14181298336770849826; - Value.Integer Integer.U64 14651634229432885715 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17726622920963562283; - Value.Integer Integer.U64 9091170749936331336 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11079139325602226427; - Value.Integer Integer.U64 3376138709496513133 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13848924157002783033; - Value.Integer Integer.U64 18055231442152805128 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17311155196253478792; - Value.Integer Integer.U64 8733981247408842698 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10819471997658424245; - Value.Integer Integer.U64 5458738279630526686 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13524339997073030306; - Value.Integer Integer.U64 11435108867965546262 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16905424996341287883; - Value.Integer Integer.U64 5070514048102157020 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10565890622713304927; - Value.Integer Integer.U64 863228270850154185 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13207363278391631158; - Value.Integer Integer.U64 14914093393844856443 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16509204097989538948; - Value.Integer Integer.U64 9419244705451294746 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10318252561243461842; - Value.Integer Integer.U64 15110399977761835024 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12897815701554327303; - Value.Integer Integer.U64 9664627935347517973 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16122269626942909129; - Value.Integer Integer.U64 7469098900757009562 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10076418516839318205; - Value.Integer Integer.U64 16197401859041600736 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12595523146049147757; - Value.Integer Integer.U64 6411694268519837208 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15744403932561434696; - Value.Integer Integer.U64 12626303854077184414 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9840252457850896685; - Value.Integer Integer.U64 7891439908798240259 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12300315572313620856; - Value.Integer Integer.U64 14475985904425188227 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15375394465392026070; - Value.Integer Integer.U64 18094982380531485284 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9609621540870016294; - Value.Integer Integer.U64 6697677969404790399 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12012026926087520367; - Value.Integer Integer.U64 17595469498610763806 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15015033657609400459; - Value.Integer Integer.U64 17382650854836066854 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9384396036005875287; - Value.Integer Integer.U64 8558313775058847832 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11730495045007344109; - Value.Integer Integer.U64 6086206200396171886 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14663118806259180136; - Value.Integer Integer.U64 12219443768922602761 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18328898507823975170; - Value.Integer Integer.U64 15274304711153253452 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11455561567389984481; - Value.Integer Integer.U64 14158126462898171311 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14319451959237480602; - Value.Integer Integer.U64 3862600023340550427 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17899314949046850752; - Value.Integer Integer.U64 14051622066030463842 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11187071843154281720; - Value.Integer Integer.U64 8782263791269039901 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13983839803942852150; - Value.Integer Integer.U64 10977829739086299876 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17479799754928565188; - Value.Integer Integer.U64 4498915137003099037 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10924874846830353242; - Value.Integer Integer.U64 12035193997481712706 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13656093558537941553; - Value.Integer Integer.U64 5820620459997365075 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17070116948172426941; - Value.Integer Integer.U64 11887461593424094248 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10668823092607766838; - Value.Integer Integer.U64 9735506505103752857 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13336028865759708548; - Value.Integer Integer.U64 2946011094524915263 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16670036082199635685; - Value.Integer Integer.U64 3682513868156144079 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10418772551374772303; - Value.Integer Integer.U64 4607414176811284001 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13023465689218465379; - Value.Integer Integer.U64 1147581702586717097 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16279332111523081723; - Value.Integer Integer.U64 15269535183515560084 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10174582569701926077; - Value.Integer Integer.U64 7237616480483531100 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12718228212127407596; - Value.Integer Integer.U64 13658706619031801779 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15897785265159259495; - Value.Integer Integer.U64 17073383273789752224 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9936115790724537184; - Value.Integer Integer.U64 17588393573759676996 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12420144738405671481; - Value.Integer Integer.U64 3538747893490044629 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15525180923007089351; - Value.Integer Integer.U64 9035120885289943691 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9703238076879430844; - Value.Integer Integer.U64 12564479580947296663 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12129047596099288555; - Value.Integer Integer.U64 15705599476184120828 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15161309495124110694; - Value.Integer Integer.U64 15020313326802763131 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9475818434452569184; - Value.Integer Integer.U64 4776009810824339053 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11844773043065711480; - Value.Integer Integer.U64 5970012263530423816 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14805966303832139350; - Value.Integer Integer.U64 7462515329413029771 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9253728939895087094; - Value.Integer Integer.U64 52386062455755702 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11567161174868858867; - Value.Integer Integer.U64 9288854614924470436 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14458951468586073584; - Value.Integer Integer.U64 6999382250228200141 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18073689335732591980; - Value.Integer Integer.U64 8749227812785250177 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11296055834832869987; - Value.Integer Integer.U64 14691639419845557168 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14120069793541087484; - Value.Integer Integer.U64 13752863256379558556 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17650087241926359355; - Value.Integer Integer.U64 17191079070474448196 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11031304526203974597; - Value.Integer Integer.U64 8438581409832836170 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13789130657754968246; - Value.Integer Integer.U64 15159912780718433117 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17236413322193710308; - Value.Integer Integer.U64 9726518939043265588 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10772758326371068942; - Value.Integer Integer.U64 15302446373756816800 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13465947907963836178; - Value.Integer Integer.U64 9904685930341245193 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16832434884954795223; - Value.Integer Integer.U64 3157485376071780683 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10520271803096747014; - Value.Integer Integer.U64 8890957387685944783 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13150339753870933768; - Value.Integer Integer.U64 1890324697752655170 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16437924692338667210; - Value.Integer Integer.U64 2362905872190818963 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10273702932711667006; - Value.Integer Integer.U64 6088502188546649756 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12842128665889583757; - Value.Integer Integer.U64 16833999772538088003 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16052660832361979697; - Value.Integer Integer.U64 7207441660390446292 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10032913020226237310; - Value.Integer Integer.U64 16033866083812498692 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12541141275282796638; - Value.Integer Integer.U64 10818960567910847557 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15676426594103495798; - Value.Integer Integer.U64 4300328673033783639 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9797766621314684873; - Value.Integer Integer.U64 16522763475928278486 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12247208276643356092; - Value.Integer Integer.U64 6818396289628184396 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15309010345804195115; - Value.Integer Integer.U64 8522995362035230495 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9568131466127621947; - Value.Integer Integer.U64 3021029092058325107 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11960164332659527433; - Value.Integer Integer.U64 17611344420355070096 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14950205415824409292; - Value.Integer Integer.U64 8179122470161673908 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9343878384890255807; - Value.Integer Integer.U64 14335323580705822000 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11679847981112819759; - Value.Integer Integer.U64 13307468457454889596 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14599809976391024699; - Value.Integer Integer.U64 12022649553391224092 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18249762470488780874; - Value.Integer Integer.U64 10416625923311642211 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11406101544055488046; - Value.Integer Integer.U64 11122077220497164286 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14257626930069360058; - Value.Integer Integer.U64 4679224488766679549 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17822033662586700072; - Value.Integer Integer.U64 15072402647813125244 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11138771039116687545; - Value.Integer Integer.U64 9420251654883203278 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13923463798895859431; - Value.Integer Integer.U64 16387000587031392001 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17404329748619824289; - Value.Integer Integer.U64 15872064715361852097 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10877706092887390181; - Value.Integer Integer.U64 3002511419460075705 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13597132616109237726; - Value.Integer Integer.U64 8364825292752482535 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16996415770136547158; - Value.Integer Integer.U64 1232659579085827361 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10622759856335341973; - Value.Integer Integer.U64 14605470292210805812 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13278449820419177467; - Value.Integer Integer.U64 4421779809981343554 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16598062275523971834; - Value.Integer Integer.U64 915538744049291538 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10373788922202482396; - Value.Integer Integer.U64 5183897733458195115 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12967236152753102995; - Value.Integer Integer.U64 6479872166822743894 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16209045190941378744; - Value.Integer Integer.U64 3488154190101041964 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10130653244338361715; - Value.Integer Integer.U64 2180096368813151227 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12663316555422952143; - Value.Integer Integer.U64 16560178516298602746 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15829145694278690179; - Value.Integer Integer.U64 16088537126945865529 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9893216058924181362; - Value.Integer Integer.U64 7749492695127472003 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12366520073655226703; - Value.Integer Integer.U64 463493832054564196 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15458150092069033378; - Value.Integer Integer.U64 14414425345350368957 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9661343807543145861; - Value.Integer Integer.U64 13620701859271368502 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12076679759428932327; - Value.Integer Integer.U64 3190819268807046916 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15095849699286165408; - Value.Integer Integer.U64 17823582141290972357 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9434906062053853380; - Value.Integer Integer.U64 11139738838306857723 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11793632577567316725; - Value.Integer Integer.U64 13924673547883572154 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14742040721959145907; - Value.Integer Integer.U64 3570783879572301480 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18427550902448932383; - Value.Integer Integer.U64 18298537904747540562 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11517219314030582739; - Value.Integer Integer.U64 18354115218108294707 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14396524142538228424; - Value.Integer Integer.U64 18330958004207980480 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17995655178172785531; - Value.Integer Integer.U64 4466953431550423984 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11247284486357990957; - Value.Integer Integer.U64 486002885505321038 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14059105607947488696; - Value.Integer Integer.U64 5219189625309039202 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17573882009934360870; - Value.Integer Integer.U64 6523987031636299002 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10983676256208975543; - Value.Integer Integer.U64 17912549950054850588 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13729595320261219429; - Value.Integer Integer.U64 17779001419141175331 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17161994150326524287; - Value.Integer Integer.U64 8388693718644305452 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10726246343954077679; - Value.Integer Integer.U64 12160462601793772764 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13407807929942597099; - Value.Integer Integer.U64 10588892233814828051 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16759759912428246374; - Value.Integer Integer.U64 8624429273841147159 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10474849945267653984; - Value.Integer Integer.U64 778582277723329070 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13093562431584567480; - Value.Integer Integer.U64 973227847154161338 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16366953039480709350; - Value.Integer Integer.U64 1216534808942701673 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10229345649675443343; - Value.Integer Integer.U64 14595392310871352257 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12786682062094304179; - Value.Integer Integer.U64 13632554370161802418 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15983352577617880224; - Value.Integer Integer.U64 12429006944274865118 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9989595361011175140; - Value.Integer Integer.U64 7768129340171790699 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12486994201263968925; - Value.Integer Integer.U64 9710161675214738374 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15608742751579961156; - Value.Integer Integer.U64 16749388112445810871 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9755464219737475723; - Value.Integer Integer.U64 1244995533423855986 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12194330274671844653; - Value.Integer Integer.U64 15391302472061983695 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15242912843339805817; - Value.Integer Integer.U64 5404070034795315907 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9526820527087378635; - Value.Integer Integer.U64 14906758817815542202 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11908525658859223294; - Value.Integer Integer.U64 14021762503842039848 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14885657073574029118; - Value.Integer Integer.U64 8303831092947774002 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9303535670983768199; - Value.Integer Integer.U64 578208414664970847 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11629419588729710248; - Value.Integer Integer.U64 14557818573613377271 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14536774485912137810; - Value.Integer Integer.U64 18197273217016721589 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18170968107390172263; - Value.Integer Integer.U64 13523219484416126178 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11356855067118857664; - Value.Integer Integer.U64 15369541205401160717 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14196068833898572081; - Value.Integer Integer.U64 765182433041899281 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17745086042373215101; - Value.Integer Integer.U64 5568164059729762005 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11090678776483259438; - Value.Integer Integer.U64 5785945546544795205 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13863348470604074297; - Value.Integer Integer.U64 16455803970035769814 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17329185588255092872; - Value.Integer Integer.U64 6734696907262548556 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10830740992659433045; - Value.Integer Integer.U64 4209185567039092847 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13538426240824291306; - Value.Integer Integer.U64 9873167977226253963 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16923032801030364133; - Value.Integer Integer.U64 3118087934678041646 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10576895500643977583; - Value.Integer Integer.U64 4254647968387469981 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13221119375804971979; - Value.Integer Integer.U64 706623942056949572 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16526399219756214973; - Value.Integer Integer.U64 14718337982853350677 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10328999512347634358; - Value.Integer Integer.U64 11504804248497038125 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12911249390434542948; - Value.Integer Integer.U64 5157633273766521849 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16139061738043178685; - Value.Integer Integer.U64 6447041592208152311 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10086913586276986678; - Value.Integer Integer.U64 6335244004343789146 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12608641982846233347; - Value.Integer Integer.U64 17142427042284512241 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15760802478557791684; - Value.Integer Integer.U64 16816347784428252397 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9850501549098619803; - Value.Integer Integer.U64 1286845328412881940 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12313126936373274753; - Value.Integer Integer.U64 15443614715798266137 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15391408670466593442; - Value.Integer Integer.U64 5469460339465668959 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9619630419041620901; - Value.Integer Integer.U64 8030098730593431003 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12024538023802026126; - Value.Integer Integer.U64 14649309431669176658 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15030672529752532658; - Value.Integer Integer.U64 9088264752731695015 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9394170331095332911; - Value.Integer Integer.U64 10291851488884697288 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11742712913869166139; - Value.Integer Integer.U64 8253128342678483706 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14678391142336457674; - Value.Integer Integer.U64 5704724409920716729 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18347988927920572092; - Value.Integer Integer.U64 16354277549255671720 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11467493079950357558; - Value.Integer Integer.U64 998051431430019017 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14334366349937946947; - Value.Integer Integer.U64 10470936326142299579 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17917957937422433684; - Value.Integer Integer.U64 8476984389250486570 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11198723710889021052; - Value.Integer Integer.U64 14521487280136329914 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13998404638611276315; - Value.Integer Integer.U64 18151859100170412392 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17498005798264095394; - Value.Integer Integer.U64 18078137856785627587 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10936253623915059621; - Value.Integer Integer.U64 15910522178918405146 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13670317029893824527; - Value.Integer Integer.U64 6053094668365842720 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17087896287367280659; - Value.Integer Integer.U64 2954682317029915496 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10679935179604550411; - Value.Integer Integer.U64 17987577512639554849 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13349918974505688014; - Value.Integer Integer.U64 17872785872372055657 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16687398718132110018; - Value.Integer Integer.U64 13117610303610293764 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10429624198832568761; - Value.Integer Integer.U64 12810192458183821506 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13037030248540710952; - Value.Integer Integer.U64 2177682517447613171 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16296287810675888690; - Value.Integer Integer.U64 2722103146809516464 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10185179881672430431; - Value.Integer Integer.U64 6313000485183335694 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12731474852090538039; - Value.Integer Integer.U64 3279564588051781713 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15914343565113172548; - Value.Integer Integer.U64 17934513790346890853 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9946464728195732843; - Value.Integer Integer.U64 1985699082112030975 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12433080910244666053; - Value.Integer Integer.U64 16317181907922202431 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15541351137805832567; - Value.Integer Integer.U64 6561419329620589327 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9713344461128645354; - Value.Integer Integer.U64 11018416108653950185 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12141680576410806693; - Value.Integer Integer.U64 4549648098962661924 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15177100720513508366; - Value.Integer Integer.U64 10298746142130715309 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9485687950320942729; - Value.Integer Integer.U64 1825030320404309164 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11857109937901178411; - Value.Integer Integer.U64 6892973918932774359 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14821387422376473014; - Value.Integer Integer.U64 4004531380238580045 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9263367138985295633; - Value.Integer Integer.U64 16337890167931276240 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11579208923731619542; - Value.Integer Integer.U64 6587304654631931588 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14474011154664524427; - Value.Integer Integer.U64 17457502855144690293 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18092513943330655534; - Value.Integer Integer.U64 17210192550503474962 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11307821214581659709; - Value.Integer Integer.U64 6144684325637283947 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14134776518227074636; - Value.Integer Integer.U64 12292541425473992838 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17668470647783843295; - Value.Integer Integer.U64 15365676781842491048 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11042794154864902059; - Value.Integer Integer.U64 16521077016292638761 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13803492693581127574; - Value.Integer Integer.U64 16039660251938410547 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17254365866976409468; - Value.Integer Integer.U64 10826203278068237376 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10783978666860255917; - Value.Integer Integer.U64 15989749085647424168 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13479973333575319897; - Value.Integer Integer.U64 6152128301777116498 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16849966666969149871; - Value.Integer Integer.U64 12301846395648783526 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10531229166855718669; - Value.Integer Integer.U64 14606183024921571560 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13164036458569648337; - Value.Integer Integer.U64 4422670725869800738 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16455045573212060421; - Value.Integer Integer.U64 10140024425764638826 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10284403483257537763; - Value.Integer Integer.U64 8643358275316593218 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12855504354071922204; - Value.Integer Integer.U64 6192511825718353619 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16069380442589902755; - Value.Integer Integer.U64 7740639782147942024 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10043362776618689222; - Value.Integer Integer.U64 2532056854628769813 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12554203470773361527; - Value.Integer Integer.U64 12388443105140738074 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15692754338466701909; - Value.Integer Integer.U64 10873867862998534689 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9807971461541688693; - Value.Integer Integer.U64 9102010423587778132 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12259964326927110866; - Value.Integer Integer.U64 15989199047912110569 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15324955408658888583; - Value.Integer Integer.U64 10763126773035362404 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9578097130411805364; - Value.Integer Integer.U64 13644483260788183358 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11972621413014756705; - Value.Integer Integer.U64 17055604075985229198 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14965776766268445882; - Value.Integer Integer.U64 7484447039699372786 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9353610478917778676; - Value.Integer Integer.U64 9289465418239495895 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11692013098647223345; - Value.Integer Integer.U64 11611831772799369869 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14615016373309029182; - Value.Integer Integer.U64 679731660717048624 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18268770466636286477; - Value.Integer Integer.U64 10073036612751086588 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11417981541647679048; - Value.Integer Integer.U64 8601490892183123070 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14272476927059598810; - Value.Integer Integer.U64 10751863615228903838 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17840596158824498513; - Value.Integer Integer.U64 4216457482181353989 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11150372599265311570; - Value.Integer Integer.U64 14164500972431816003 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13937965749081639463; - Value.Integer Integer.U64 8482254178684994196 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17422457186352049329; - Value.Integer Integer.U64 5991131704928854841 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10889035741470030830; - Value.Integer Integer.U64 15273672361649004036 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13611294676837538538; - Value.Integer Integer.U64 9868718415206479237 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17014118346046923173; - Value.Integer Integer.U64 3112525982153323238 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10633823966279326983; - Value.Integer Integer.U64 4251171748059520976 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13292279957849158729; - Value.Integer Integer.U64 702278666647013315 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16615349947311448411; - Value.Integer Integer.U64 5489534351736154548 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10384593717069655257; - Value.Integer Integer.U64 1125115960621402641 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12980742146337069071; - Value.Integer Integer.U64 6018080969204141205 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16225927682921336339; - Value.Integer Integer.U64 2910915193077788602 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10141204801825835211; - Value.Integer Integer.U64 17960223060169475540 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12676506002282294014; - Value.Integer Integer.U64 17838592806784456521 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15845632502852867518; - Value.Integer Integer.U64 13074868971625794844 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9903520314283042199; - Value.Integer Integer.U64 3560107088838733873 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12379400392853802748; - Value.Integer Integer.U64 18285191916330581054 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15474250491067253436; - Value.Integer Integer.U64 4409745821703674701 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9671406556917033397; - Value.Integer Integer.U64 11979463175419572496 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12089258196146291747; - Value.Integer Integer.U64 1139270913992301908 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15111572745182864683; - Value.Integer Integer.U64 15259146697772541097 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9444732965739290427; - Value.Integer Integer.U64 7231123676894144234 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11805916207174113034; - Value.Integer Integer.U64 4427218577690292388 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14757395258967641292; - Value.Integer Integer.U64 14757395258967641293 - ]; - Value.Tuple - [ Value.Integer Integer.U64 9223372036854775808; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 11529215046068469760; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 14411518807585587200; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 18014398509481984000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 11258999068426240000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 14073748835532800000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 17592186044416000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 10995116277760000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 13743895347200000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 17179869184000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 10737418240000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 13421772800000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 16777216000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 10485760000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 13107200000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 16384000000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 10240000000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 12800000000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 16000000000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 10000000000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 12500000000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 15625000000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 9765625000000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 12207031250000000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 15258789062500000000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 9536743164062500000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 11920928955078125000; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ Value.Integer Integer.U64 14901161193847656250; Value.Integer Integer.U64 0 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9313225746154785156; - Value.Integer Integer.U64 4611686018427387904 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11641532182693481445; - Value.Integer Integer.U64 5764607523034234880 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14551915228366851806; - Value.Integer Integer.U64 11817445422220181504 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18189894035458564758; - Value.Integer Integer.U64 5548434740920451072 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11368683772161602973; - Value.Integer Integer.U64 17302829768357445632 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14210854715202003717; - Value.Integer Integer.U64 7793479155164643328 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17763568394002504646; - Value.Integer Integer.U64 14353534962383192064 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11102230246251565404; - Value.Integer Integer.U64 4359273333062107136 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13877787807814456755; - Value.Integer Integer.U64 5449091666327633920 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17347234759768070944; - Value.Integer Integer.U64 2199678564482154496 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10842021724855044340; - Value.Integer Integer.U64 1374799102801346560 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13552527156068805425; - Value.Integer Integer.U64 1718498878501683200 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16940658945086006781; - Value.Integer Integer.U64 6759809616554491904 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10587911840678754238; - Value.Integer Integer.U64 6530724019560251392 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13234889800848442797; - Value.Integer Integer.U64 17386777061305090048 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16543612251060553497; - Value.Integer Integer.U64 7898413271349198848 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10339757656912845935; - Value.Integer Integer.U64 16465723340661719040 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12924697071141057419; - Value.Integer Integer.U64 15970468157399760896 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16155871338926321774; - Value.Integer Integer.U64 15351399178322313216 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10097419586828951109; - Value.Integer Integer.U64 4982938468024057856 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12621774483536188886; - Value.Integer Integer.U64 10840359103457460224 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15777218104420236108; - Value.Integer Integer.U64 4327076842467049472 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9860761315262647567; - Value.Integer Integer.U64 11927795063396681728 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12325951644078309459; - Value.Integer Integer.U64 10298057810818464256 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15407439555097886824; - Value.Integer Integer.U64 8260886245095692416 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9629649721936179265; - Value.Integer Integer.U64 5163053903184807760 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12037062152420224081; - Value.Integer Integer.U64 11065503397408397604 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15046327690525280101; - Value.Integer Integer.U64 18443565265187884909 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9403954806578300063; - Value.Integer Integer.U64 13833071299956122020 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11754943508222875079; - Value.Integer Integer.U64 12679653106517764621 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14693679385278593849; - Value.Integer Integer.U64 11237880364719817872 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18367099231598242312; - Value.Integer Integer.U64 212292400617608628 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11479437019748901445; - Value.Integer Integer.U64 132682750386005392 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14349296274686126806; - Value.Integer Integer.U64 4777539456409894645 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17936620343357658507; - Value.Integer Integer.U64 15195296357367144114 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11210387714598536567; - Value.Integer Integer.U64 7191217214140771119 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14012984643248170709; - Value.Integer Integer.U64 4377335499248575995 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17516230804060213386; - Value.Integer Integer.U64 10083355392488107898 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10947644252537633366; - Value.Integer Integer.U64 10913783138732455340 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13684555315672041708; - Value.Integer Integer.U64 4418856886560793367 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17105694144590052135; - Value.Integer Integer.U64 5523571108200991709 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10691058840368782584; - Value.Integer Integer.U64 10369760970266701674 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13363823550460978230; - Value.Integer Integer.U64 12962201212833377092 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16704779438076222788; - Value.Integer Integer.U64 6979379479186945558 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10440487148797639242; - Value.Integer Integer.U64 13585484211346616781 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13050608935997049053; - Value.Integer Integer.U64 7758483227328495169 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16313261169996311316; - Value.Integer Integer.U64 14309790052588006865 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10195788231247694572; - Value.Integer Integer.U64 18166990819722280098 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12744735289059618216; - Value.Integer Integer.U64 4261994450943298507 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15930919111324522770; - Value.Integer Integer.U64 5327493063679123134 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9956824444577826731; - Value.Integer Integer.U64 7941369183226839863 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12446030555722283414; - Value.Integer Integer.U64 5315025460606161924 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15557538194652854267; - Value.Integer Integer.U64 15867153862612478214 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9723461371658033917; - Value.Integer Integer.U64 7611128154919104931 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12154326714572542396; - Value.Integer Integer.U64 14125596212076269068 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15192908393215677995; - Value.Integer Integer.U64 17656995265095336336 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9495567745759798747; - Value.Integer Integer.U64 8729779031470891258 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11869459682199748434; - Value.Integer Integer.U64 6300537770911226168 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14836824602749685542; - Value.Integer Integer.U64 17099044250493808518 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9273015376718553464; - Value.Integer Integer.U64 6075216638131242420 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11591269220898191830; - Value.Integer Integer.U64 7594020797664053025 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14489086526122739788; - Value.Integer Integer.U64 269153960225290473 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18111358157653424735; - Value.Integer Integer.U64 336442450281613091 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11319598848533390459; - Value.Integer Integer.U64 7127805559067090038 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14149498560666738074; - Value.Integer Integer.U64 4298070930406474644 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17686873200833422592; - Value.Integer Integer.U64 14595960699862869113 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11054295750520889120; - Value.Integer Integer.U64 9122475437414293195 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13817869688151111400; - Value.Integer Integer.U64 11403094296767866494 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17272337110188889250; - Value.Integer Integer.U64 14253867870959833118 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10795210693868055781; - Value.Integer Integer.U64 13520353437777283602 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13494013367335069727; - Value.Integer Integer.U64 3065383741939440791 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16867516709168837158; - Value.Integer Integer.U64 17666787732706464701 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10542197943230523224; - Value.Integer Integer.U64 6430056314514152534 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13177747429038154030; - Value.Integer Integer.U64 8037570393142690668 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16472184286297692538; - Value.Integer Integer.U64 823590954573587527 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10295115178936057836; - Value.Integer Integer.U64 5126430365035880108 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12868893973670072295; - Value.Integer Integer.U64 6408037956294850135 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16086117467087590369; - Value.Integer Integer.U64 3398361426941174765 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10053823416929743980; - Value.Integer Integer.U64 13653190937906703988 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12567279271162179975; - Value.Integer Integer.U64 17066488672383379985 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15709099088952724969; - Value.Integer Integer.U64 16721424822051837077 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9818186930595453106; - Value.Integer Integer.U64 3533361486141316317 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12272733663244316382; - Value.Integer Integer.U64 13640073894531421205 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15340917079055395478; - Value.Integer Integer.U64 7826720331309500698 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9588073174409622174; - Value.Integer Integer.U64 280014188641050032 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11985091468012027717; - Value.Integer Integer.U64 9573389772656088348 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14981364335015034646; - Value.Integer Integer.U64 16578423234247498339 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9363352709384396654; - Value.Integer Integer.U64 5749828502977298558 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11704190886730495817; - Value.Integer Integer.U64 16410657665576399005 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14630238608413119772; - Value.Integer Integer.U64 6678264026688335045 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18287798260516399715; - Value.Integer Integer.U64 8347830033360418806 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11429873912822749822; - Value.Integer Integer.U64 2911550761636567802 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14287342391028437277; - Value.Integer Integer.U64 12862810488900485560 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17859177988785546597; - Value.Integer Integer.U64 2243455055843443238 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11161986242990966623; - Value.Integer Integer.U64 3708002419115845976 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13952482803738708279; - Value.Integer Integer.U64 23317005467419566 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17440603504673385348; - Value.Integer Integer.U64 13864204312116438170 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10900377190420865842; - Value.Integer Integer.U64 17888499731927549664 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13625471488026082303; - Value.Integer Integer.U64 13137252628054661272 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17031839360032602879; - Value.Integer Integer.U64 11809879766640938686 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10644899600020376799; - Value.Integer Integer.U64 14298703881791668535 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13306124500025470999; - Value.Integer Integer.U64 13261693833812197764 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16632655625031838749; - Value.Integer Integer.U64 11965431273837859301 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10395409765644899218; - Value.Integer Integer.U64 9784237555362356015 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12994262207056124023; - Value.Integer Integer.U64 3006924907348169211 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16242827758820155028; - Value.Integer Integer.U64 17593714189467375226 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10151767349262596893; - Value.Integer Integer.U64 1772699331562333708 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12689709186578246116; - Value.Integer Integer.U64 6827560182880305039 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15862136483222807645; - Value.Integer Integer.U64 8534450228600381299 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9913835302014254778; - Value.Integer Integer.U64 7639874402088932264 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12392294127517818473; - Value.Integer Integer.U64 326470965756389522 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15490367659397273091; - Value.Integer Integer.U64 5019774725622874806 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9681479787123295682; - Value.Integer Integer.U64 831516194300602802 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12101849733904119602; - Value.Integer Integer.U64 10262767279730529310 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15127312167380149503; - Value.Integer Integer.U64 3605087062808385830 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9454570104612593439; - Value.Integer Integer.U64 9170708441896323000 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11818212630765741799; - Value.Integer Integer.U64 6851699533943015846 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14772765788457177249; - Value.Integer Integer.U64 3952938399001381903 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9232978617785735780; - Value.Integer Integer.U64 13999801545444333449 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11541223272232169725; - Value.Integer Integer.U64 17499751931805416812 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14426529090290212157; - Value.Integer Integer.U64 8039631859474607303 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18033161362862765196; - Value.Integer Integer.U64 14661225842770647033 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11270725851789228247; - Value.Integer Integer.U64 18386638188586430203 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14088407314736535309; - Value.Integer Integer.U64 18371611717305649850 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17610509143420669137; - Value.Integer Integer.U64 9129456591349898601 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11006568214637918210; - Value.Integer Integer.U64 17235125415662156385 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13758210268297397763; - Value.Integer Integer.U64 12320534732722919674 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17197762835371747204; - Value.Integer Integer.U64 10788982397476261688 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10748601772107342002; - Value.Integer Integer.U64 15966486035277439363 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13435752215134177503; - Value.Integer Integer.U64 10734735507242023396 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16794690268917721879; - Value.Integer Integer.U64 8806733365625141341 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10496681418073576174; - Value.Integer Integer.U64 12421737381156795194 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13120851772591970218; - Value.Integer Integer.U64 6303799689591218185 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16401064715739962772; - Value.Integer Integer.U64 17103121648843798539 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10250665447337476733; - Value.Integer Integer.U64 1466078993672598279 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12813331809171845916; - Value.Integer Integer.U64 6444284760518135752 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16016664761464807395; - Value.Integer Integer.U64 8055355950647669691 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10010415475915504622; - Value.Integer Integer.U64 2728754459941099604 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12513019344894380777; - Value.Integer Integer.U64 12634315111781150314 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15641274181117975972; - Value.Integer Integer.U64 1957835834444274180 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9775796363198734982; - Value.Integer Integer.U64 10447019433382447170 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12219745453998418728; - Value.Integer Integer.U64 3835402254873283155 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15274681817498023410; - Value.Integer Integer.U64 4794252818591603944 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9546676135936264631; - Value.Integer Integer.U64 7608094030047140369 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11933345169920330789; - Value.Integer Integer.U64 4898431519131537557 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14916681462400413486; - Value.Integer Integer.U64 10734725417341809851 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9322925914000258429; - Value.Integer Integer.U64 2097517367411243253 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11653657392500323036; - Value.Integer Integer.U64 7233582727691441970 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14567071740625403795; - Value.Integer Integer.U64 9041978409614302462 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18208839675781754744; - Value.Integer Integer.U64 6690786993590490174 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11380524797363596715; - Value.Integer Integer.U64 4181741870994056359 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14225655996704495894; - Value.Integer Integer.U64 615491320315182544 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17782069995880619867; - Value.Integer Integer.U64 9992736187248753989 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11113793747425387417; - Value.Integer Integer.U64 3939617107816777291 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13892242184281734271; - Value.Integer Integer.U64 9536207403198359517 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17365302730352167839; - Value.Integer Integer.U64 7308573235570561493 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10853314206470104899; - Value.Integer Integer.U64 11485387299872682789 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13566642758087631124; - Value.Integer Integer.U64 9745048106413465582 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16958303447609538905; - Value.Integer Integer.U64 12181310133016831978 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10598939654755961816; - Value.Integer Integer.U64 695789805494438130 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13248674568444952270; - Value.Integer Integer.U64 869737256868047663 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16560843210556190337; - Value.Integer Integer.U64 10310543607939835386 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10350527006597618960; - Value.Integer Integer.U64 17973304801030866876 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12938158758247023701; - Value.Integer Integer.U64 4019886927579031980 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16172698447808779626; - Value.Integer Integer.U64 9636544677901177879 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10107936529880487266; - Value.Integer Integer.U64 10634526442115624078 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12634920662350609083; - Value.Integer Integer.U64 4069786015789754290 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15793650827938261354; - Value.Integer Integer.U64 475546501309804958 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9871031767461413346; - Value.Integer Integer.U64 4908902581746016003 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12338789709326766682; - Value.Integer Integer.U64 15359500264037295811 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15423487136658458353; - Value.Integer Integer.U64 9976003293191843956 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9639679460411536470; - Value.Integer Integer.U64 17764217104313372233 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12049599325514420588; - Value.Integer Integer.U64 12981899343536939483 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15061999156893025735; - Value.Integer Integer.U64 16227374179421174354 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9413749473058141084; - Value.Integer Integer.U64 17059637889779315827 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11767186841322676356; - Value.Integer Integer.U64 2877803288514593168 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14708983551653345445; - Value.Integer Integer.U64 3597254110643241460 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18386229439566681806; - Value.Integer Integer.U64 9108253656731439729 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11491393399729176129; - Value.Integer Integer.U64 1080972517029761926 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14364241749661470161; - Value.Integer Integer.U64 5962901664714590312 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17955302187076837701; - Value.Integer Integer.U64 12065313099320625794 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11222063866923023563; - Value.Integer Integer.U64 9846663696289085073 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14027579833653779454; - Value.Integer Integer.U64 7696643601933968437 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17534474792067224318; - Value.Integer Integer.U64 397432465562684739 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10959046745042015198; - Value.Integer Integer.U64 14083453346258841674 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13698808431302518998; - Value.Integer Integer.U64 8380944645968776284 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17123510539128148748; - Value.Integer Integer.U64 1252808770606194547 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10702194086955092967; - Value.Integer Integer.U64 10006377518483647400 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13377742608693866209; - Value.Integer Integer.U64 7896285879677171346 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16722178260867332761; - Value.Integer Integer.U64 14482043368023852087 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10451361413042082976; - Value.Integer Integer.U64 2133748077373825698 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13064201766302603720; - Value.Integer Integer.U64 2667185096717282123 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16330252207878254650; - Value.Integer Integer.U64 3333981370896602653 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10206407629923909156; - Value.Integer Integer.U64 6695424375237764562 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12758009537404886445; - Value.Integer Integer.U64 8369280469047205703 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15947511921756108056; - Value.Integer Integer.U64 15073286604736395033 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9967194951097567535; - Value.Integer Integer.U64 9420804127960246895 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12458993688871959419; - Value.Integer Integer.U64 7164319141522920715 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15573742111089949274; - Value.Integer Integer.U64 4343712908476262990 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9733588819431218296; - Value.Integer Integer.U64 7326506586225052273 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12166986024289022870; - Value.Integer Integer.U64 9158133232781315341 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15208732530361278588; - Value.Integer Integer.U64 2224294504121868368 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9505457831475799117; - Value.Integer Integer.U64 10613556101930943538 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11881822289344748896; - Value.Integer Integer.U64 17878631145841067327 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14852277861680936121; - Value.Integer Integer.U64 3901544858591782542 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9282673663550585075; - Value.Integer Integer.U64 13967680582688333849 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11603342079438231344; - Value.Integer Integer.U64 12847914709933029407 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14504177599297789180; - Value.Integer Integer.U64 16059893387416286759 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18130221999122236476; - Value.Integer Integer.U64 1628122660560806833 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11331388749451397797; - Value.Integer Integer.U64 10240948699705280078 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14164235936814247246; - Value.Integer Integer.U64 17412871893058988002 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17705294921017809058; - Value.Integer Integer.U64 12542717829468959195 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11065809325636130661; - Value.Integer Integer.U64 12450884661845487401 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13832261657045163327; - Value.Integer Integer.U64 1728547772024695539 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17290327071306454158; - Value.Integer Integer.U64 15995742770313033136 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10806454419566533849; - Value.Integer Integer.U64 5385653213018257806 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13508068024458167311; - Value.Integer Integer.U64 11343752534700210161 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16885085030572709139; - Value.Integer Integer.U64 9568004649947874797 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10553178144107943212; - Value.Integer Integer.U64 3674159897003727796 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13191472680134929015; - Value.Integer Integer.U64 4592699871254659745 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16489340850168661269; - Value.Integer Integer.U64 1129188820640936778 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10305838031355413293; - Value.Integer Integer.U64 3011586022114279438 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12882297539194266616; - Value.Integer Integer.U64 8376168546070237202 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16102871923992833270; - Value.Integer Integer.U64 10470210682587796502 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10064294952495520794; - Value.Integer Integer.U64 1932195658189984910 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12580368690619400992; - Value.Integer Integer.U64 11638616609592256945 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15725460863274251240; - Value.Integer Integer.U64 14548270761990321182 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9828413039546407025; - Value.Integer Integer.U64 9092669226243950738 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12285516299433008781; - Value.Integer Integer.U64 15977522551232326327 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15356895374291260977; - Value.Integer Integer.U64 6136845133758244197 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9598059608932038110; - Value.Integer Integer.U64 15364743254667372383 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11997574511165047638; - Value.Integer Integer.U64 9982557031479439671 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14996968138956309548; - Value.Integer Integer.U64 3254824252494523781 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9373105086847693467; - Value.Integer Integer.U64 11257637194663853171 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11716381358559616834; - Value.Integer Integer.U64 9460360474902428559 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14645476698199521043; - Value.Integer Integer.U64 2602078556773259891 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18306845872749401303; - Value.Integer Integer.U64 17087656251248738576 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11441778670468375814; - Value.Integer Integer.U64 17597314184671543466 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14302223338085469768; - Value.Integer Integer.U64 12773270693984653525 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17877779172606837210; - Value.Integer Integer.U64 15966588367480816906 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11173611982879273256; - Value.Integer Integer.U64 14590803748102898470 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13967014978599091570; - Value.Integer Integer.U64 18238504685128623088 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17458768723248864463; - Value.Integer Integer.U64 13574758819556003052 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10911730452030540289; - Value.Integer Integer.U64 15401753289863583763 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13639663065038175362; - Value.Integer Integer.U64 5417133557047315992 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17049578831297719202; - Value.Integer Integer.U64 15994788983163920798 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10655986769561074501; - Value.Integer Integer.U64 14608429132904838403 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13319983461951343127; - Value.Integer Integer.U64 4425478360848884291 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16649979327439178909; - Value.Integer Integer.U64 920161932633717460 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10406237079649486818; - Value.Integer Integer.U64 2880944217109767365 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13007796349561858522; - Value.Integer Integer.U64 12824552308241985014 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16259745436952323153; - Value.Integer Integer.U64 6807318348447705459 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10162340898095201970; - Value.Integer Integer.U64 15783789013848285672 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12702926122619002463; - Value.Integer Integer.U64 10506364230455581282 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15878657653273753079; - Value.Integer Integer.U64 8521269269642088699 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9924161033296095674; - Value.Integer Integer.U64 12243322321167387293 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12405201291620119593; - Value.Integer Integer.U64 6080780864604458308 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15506501614525149491; - Value.Integer Integer.U64 12212662099182960789 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9691563509078218432; - Value.Integer Integer.U64 5327070802775656541 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12114454386347773040; - Value.Integer Integer.U64 6658838503469570676 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15143067982934716300; - Value.Integer Integer.U64 8323548129336963345 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9464417489334197687; - Value.Integer Integer.U64 14425589617690377899 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11830521861667747109; - Value.Integer Integer.U64 13420301003685584469 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14788152327084683887; - Value.Integer Integer.U64 2940318199324816875 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9242595204427927429; - Value.Integer Integer.U64 8755227902219092403 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11553244005534909286; - Value.Integer Integer.U64 15555720896201253407 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14441555006918636608; - Value.Integer Integer.U64 10221279083396790951 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18051943758648295760; - Value.Integer Integer.U64 12776598854245988689 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11282464849155184850; - Value.Integer Integer.U64 7985374283903742931 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14103081061443981063; - Value.Integer Integer.U64 758345818024902856 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17628851326804976328; - Value.Integer Integer.U64 14782990327813292282 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11018032079253110205; - Value.Integer Integer.U64 9239368954883307676 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13772540099066387756; - Value.Integer Integer.U64 16160897212031522499 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17215675123832984696; - Value.Integer Integer.U64 1754377441329851508 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10759796952395615435; - Value.Integer Integer.U64 1096485900831157192 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13449746190494519293; - Value.Integer Integer.U64 15205665431321110202 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16812182738118149117; - Value.Integer Integer.U64 5172023733869224041 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10507614211323843198; - Value.Integer Integer.U64 5538357842881958977 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13134517764154803997; - Value.Integer Integer.U64 16146319340457224530 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16418147205193504997; - Value.Integer Integer.U64 6347841120289366950 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10261342003245940623; - Value.Integer Integer.U64 6273243709394548296 - ] - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17218479456385750618 |)); + A.to_value (M.of_value (| Value.Integer 1242899115359157055 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10761549660241094136 |)); + A.to_value (M.of_value (| Value.Integer 5388497965526861063 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13451937075301367670 |)); + A.to_value (M.of_value (| Value.Integer 6735622456908576329 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16814921344126709587 |)); + A.to_value (M.of_value (| Value.Integer 17642900107990496220 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10509325840079193492 |)); + A.to_value (M.of_value (| Value.Integer 8720969558280366185 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13136657300098991865 |)); + A.to_value (M.of_value (| Value.Integer 10901211947850457732 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16420821625123739831 |)); + A.to_value (M.of_value (| Value.Integer 18238200953240460069 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10263013515702337394 |)); + A.to_value (M.of_value (| Value.Integer 18316404623416369399 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12828766894627921743 |)); + A.to_value (M.of_value (| Value.Integer 13672133742415685941 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16035958618284902179 |)); + A.to_value (M.of_value (| Value.Integer 12478481159592219522 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10022474136428063862 |)); + A.to_value (M.of_value (| Value.Integer 5493207715531443249 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12528092670535079827 |)); + A.to_value (M.of_value (| Value.Integer 16089881681269079869 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15660115838168849784 |)); + A.to_value (M.of_value (| Value.Integer 15500666083158961933 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9787572398855531115 |)); + A.to_value (M.of_value (| Value.Integer 9687916301974351208 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12234465498569413894 |)); + A.to_value (M.of_value (| Value.Integer 7498209359040551106 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15293081873211767368 |)); + A.to_value (M.of_value (| Value.Integer 149389661945913074 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9558176170757354605 |)); + A.to_value (M.of_value (| Value.Integer 93368538716195671 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11947720213446693256 |)); + A.to_value (M.of_value (| Value.Integer 4728396691822632493 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14934650266808366570 |)); + A.to_value (M.of_value (| Value.Integer 5910495864778290617 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9334156416755229106 |)); + A.to_value (M.of_value (| Value.Integer 8305745933913819539 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11667695520944036383 |)); + A.to_value (M.of_value (| Value.Integer 1158810380537498616 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14584619401180045478 |)); + A.to_value (M.of_value (| Value.Integer 15283571030954036982 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18230774251475056848 |)); + A.to_value (M.of_value (| Value.Integer 9881091751837770420 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11394233907171910530 |)); + A.to_value (M.of_value (| Value.Integer 6175682344898606512 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14242792383964888162 |)); + A.to_value (M.of_value (| Value.Integer 16942974967978033949 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17803490479956110203 |)); + A.to_value (M.of_value (| Value.Integer 11955346673117766628 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11127181549972568877 |)); + A.to_value (M.of_value (| Value.Integer 5166248661484910190 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13908976937465711096 |)); + A.to_value (M.of_value (| Value.Integer 11069496845283525642 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17386221171832138870 |)); + A.to_value (M.of_value (| Value.Integer 13836871056604407053 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10866388232395086794 |)); + A.to_value (M.of_value (| Value.Integer 4036358391950366504 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13582985290493858492 |)); + A.to_value (M.of_value (| Value.Integer 14268820026792733938 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16978731613117323115 |)); + A.to_value (M.of_value (| Value.Integer 17836025033490917422 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10611707258198326947 |)); + A.to_value (M.of_value (| Value.Integer 8841672636718129437 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13264634072747908684 |)); + A.to_value (M.of_value (| Value.Integer 6440404777470273892 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16580792590934885855 |)); + A.to_value (M.of_value (| Value.Integer 8050505971837842365 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10362995369334303659 |)); + A.to_value (M.of_value (| Value.Integer 11949095260039733334 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12953744211667879574 |)); + A.to_value (M.of_value (| Value.Integer 10324683056622278764 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16192180264584849468 |)); + A.to_value (M.of_value (| Value.Integer 3682481783923072647 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10120112665365530917 |)); + A.to_value (M.of_value (| Value.Integer 11524923151806696212 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12650140831706913647 |)); + A.to_value (M.of_value (| Value.Integer 571095884476206553 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15812676039633642058 |)); + A.to_value (M.of_value (| Value.Integer 14548927910877421904 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9882922524771026286 |)); + A.to_value (M.of_value (| Value.Integer 13704765962725776594 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12353653155963782858 |)); + A.to_value (M.of_value (| Value.Integer 7907585416552444934 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15442066444954728573 |)); + A.to_value (M.of_value (| Value.Integer 661109733835780360 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9651291528096705358 |)); + A.to_value (M.of_value (| Value.Integer 2719036592861056677 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12064114410120881697 |)); + A.to_value (M.of_value (| Value.Integer 12622167777931096654 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15080143012651102122 |)); + A.to_value (M.of_value (| Value.Integer 1942651667131707105 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9425089382906938826 |)); + A.to_value (M.of_value (| Value.Integer 5825843310384704845 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11781361728633673532 |)); + A.to_value (M.of_value (| Value.Integer 16505676174835656864 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14726702160792091916 |)); + A.to_value (M.of_value (| Value.Integer 2185351144835019464 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18408377700990114895 |)); + A.to_value (M.of_value (| Value.Integer 2731688931043774330 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11505236063118821809 |)); + A.to_value (M.of_value (| Value.Integer 8624834609543440812 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14381545078898527261 |)); + A.to_value (M.of_value (| Value.Integer 15392729280356688919 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17976931348623159077 |)); + A.to_value (M.of_value (| Value.Integer 5405853545163697437 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11235582092889474423 |)); + A.to_value (M.of_value (| Value.Integer 5684501474941004850 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14044477616111843029 |)); + A.to_value (M.of_value (| Value.Integer 2493940825248868159 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17555597020139803786 |)); + A.to_value (M.of_value (| Value.Integer 7729112049988473103 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10972248137587377366 |)); + A.to_value (M.of_value (| Value.Integer 9442381049670183593 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13715310171984221708 |)); + A.to_value (M.of_value (| Value.Integer 2579604275232953683 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17144137714980277135 |)); + A.to_value (M.of_value (| Value.Integer 3224505344041192104 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10715086071862673209 |)); + A.to_value (M.of_value (| Value.Integer 8932844867666826921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13393857589828341511 |)); + A.to_value (M.of_value (| Value.Integer 15777742103010921555 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16742321987285426889 |)); + A.to_value (M.of_value (| Value.Integer 15110491610336264040 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10463951242053391806 |)); + A.to_value (M.of_value (| Value.Integer 2526528228819083169 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13079939052566739757 |)); + A.to_value (M.of_value (| Value.Integer 12381532322878629770 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16349923815708424697 |)); + A.to_value (M.of_value (| Value.Integer 1641857348316123500 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10218702384817765435 |)); + A.to_value (M.of_value (| Value.Integer 12555375888766046947 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12773377981022206794 |)); + A.to_value (M.of_value (| Value.Integer 11082533842530170780 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15966722476277758493 |)); + A.to_value (M.of_value (| Value.Integer 4629795266307937667 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9979201547673599058 |)); + A.to_value (M.of_value (| Value.Integer 5199465050656154994 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12474001934591998822 |)); + A.to_value (M.of_value (| Value.Integer 15722703350174969551 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15592502418239998528 |)); + A.to_value (M.of_value (| Value.Integer 10430007150863936130 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9745314011399999080 |)); + A.to_value (M.of_value (| Value.Integer 6518754469289960081 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12181642514249998850 |)); + A.to_value (M.of_value (| Value.Integer 8148443086612450102 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15227053142812498563 |)); + A.to_value (M.of_value (| Value.Integer 962181821410786819 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9516908214257811601 |)); + A.to_value (M.of_value (| Value.Integer 16742264702877599426 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11896135267822264502 |)); + A.to_value (M.of_value (| Value.Integer 7092772823314835570 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14870169084777830627 |)); + A.to_value (M.of_value (| Value.Integer 18089338065998320271 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9293855677986144142 |)); + A.to_value (M.of_value (| Value.Integer 8999993282035256217 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11617319597482680178 |)); + A.to_value (M.of_value (| Value.Integer 2026619565689294464 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14521649496853350222 |)); + A.to_value (M.of_value (| Value.Integer 11756646493966393888 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18152061871066687778 |)); + A.to_value (M.of_value (| Value.Integer 5472436080603216552 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11345038669416679861 |)); + A.to_value (M.of_value (| Value.Integer 8031958568804398249 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14181298336770849826 |)); + A.to_value (M.of_value (| Value.Integer 14651634229432885715 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17726622920963562283 |)); + A.to_value (M.of_value (| Value.Integer 9091170749936331336 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11079139325602226427 |)); + A.to_value (M.of_value (| Value.Integer 3376138709496513133 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13848924157002783033 |)); + A.to_value (M.of_value (| Value.Integer 18055231442152805128 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17311155196253478792 |)); + A.to_value (M.of_value (| Value.Integer 8733981247408842698 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10819471997658424245 |)); + A.to_value (M.of_value (| Value.Integer 5458738279630526686 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13524339997073030306 |)); + A.to_value (M.of_value (| Value.Integer 11435108867965546262 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16905424996341287883 |)); + A.to_value (M.of_value (| Value.Integer 5070514048102157020 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10565890622713304927 |)); + A.to_value (M.of_value (| Value.Integer 863228270850154185 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13207363278391631158 |)); + A.to_value (M.of_value (| Value.Integer 14914093393844856443 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16509204097989538948 |)); + A.to_value (M.of_value (| Value.Integer 9419244705451294746 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10318252561243461842 |)); + A.to_value (M.of_value (| Value.Integer 15110399977761835024 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12897815701554327303 |)); + A.to_value (M.of_value (| Value.Integer 9664627935347517973 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16122269626942909129 |)); + A.to_value (M.of_value (| Value.Integer 7469098900757009562 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10076418516839318205 |)); + A.to_value (M.of_value (| Value.Integer 16197401859041600736 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12595523146049147757 |)); + A.to_value (M.of_value (| Value.Integer 6411694268519837208 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15744403932561434696 |)); + A.to_value (M.of_value (| Value.Integer 12626303854077184414 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9840252457850896685 |)); + A.to_value (M.of_value (| Value.Integer 7891439908798240259 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12300315572313620856 |)); + A.to_value (M.of_value (| Value.Integer 14475985904425188227 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15375394465392026070 |)); + A.to_value (M.of_value (| Value.Integer 18094982380531485284 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9609621540870016294 |)); + A.to_value (M.of_value (| Value.Integer 6697677969404790399 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12012026926087520367 |)); + A.to_value (M.of_value (| Value.Integer 17595469498610763806 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15015033657609400459 |)); + A.to_value (M.of_value (| Value.Integer 17382650854836066854 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9384396036005875287 |)); + A.to_value (M.of_value (| Value.Integer 8558313775058847832 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11730495045007344109 |)); + A.to_value (M.of_value (| Value.Integer 6086206200396171886 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14663118806259180136 |)); + A.to_value (M.of_value (| Value.Integer 12219443768922602761 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18328898507823975170 |)); + A.to_value (M.of_value (| Value.Integer 15274304711153253452 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11455561567389984481 |)); + A.to_value (M.of_value (| Value.Integer 14158126462898171311 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14319451959237480602 |)); + A.to_value (M.of_value (| Value.Integer 3862600023340550427 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17899314949046850752 |)); + A.to_value (M.of_value (| Value.Integer 14051622066030463842 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11187071843154281720 |)); + A.to_value (M.of_value (| Value.Integer 8782263791269039901 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13983839803942852150 |)); + A.to_value (M.of_value (| Value.Integer 10977829739086299876 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17479799754928565188 |)); + A.to_value (M.of_value (| Value.Integer 4498915137003099037 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10924874846830353242 |)); + A.to_value (M.of_value (| Value.Integer 12035193997481712706 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13656093558537941553 |)); + A.to_value (M.of_value (| Value.Integer 5820620459997365075 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17070116948172426941 |)); + A.to_value (M.of_value (| Value.Integer 11887461593424094248 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10668823092607766838 |)); + A.to_value (M.of_value (| Value.Integer 9735506505103752857 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13336028865759708548 |)); + A.to_value (M.of_value (| Value.Integer 2946011094524915263 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16670036082199635685 |)); + A.to_value (M.of_value (| Value.Integer 3682513868156144079 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10418772551374772303 |)); + A.to_value (M.of_value (| Value.Integer 4607414176811284001 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13023465689218465379 |)); + A.to_value (M.of_value (| Value.Integer 1147581702586717097 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16279332111523081723 |)); + A.to_value (M.of_value (| Value.Integer 15269535183515560084 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10174582569701926077 |)); + A.to_value (M.of_value (| Value.Integer 7237616480483531100 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12718228212127407596 |)); + A.to_value (M.of_value (| Value.Integer 13658706619031801779 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15897785265159259495 |)); + A.to_value (M.of_value (| Value.Integer 17073383273789752224 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9936115790724537184 |)); + A.to_value (M.of_value (| Value.Integer 17588393573759676996 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12420144738405671481 |)); + A.to_value (M.of_value (| Value.Integer 3538747893490044629 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15525180923007089351 |)); + A.to_value (M.of_value (| Value.Integer 9035120885289943691 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9703238076879430844 |)); + A.to_value (M.of_value (| Value.Integer 12564479580947296663 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12129047596099288555 |)); + A.to_value (M.of_value (| Value.Integer 15705599476184120828 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15161309495124110694 |)); + A.to_value (M.of_value (| Value.Integer 15020313326802763131 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9475818434452569184 |)); + A.to_value (M.of_value (| Value.Integer 4776009810824339053 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11844773043065711480 |)); + A.to_value (M.of_value (| Value.Integer 5970012263530423816 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14805966303832139350 |)); + A.to_value (M.of_value (| Value.Integer 7462515329413029771 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9253728939895087094 |)); + A.to_value (M.of_value (| Value.Integer 52386062455755702 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11567161174868858867 |)); + A.to_value (M.of_value (| Value.Integer 9288854614924470436 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14458951468586073584 |)); + A.to_value (M.of_value (| Value.Integer 6999382250228200141 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18073689335732591980 |)); + A.to_value (M.of_value (| Value.Integer 8749227812785250177 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11296055834832869987 |)); + A.to_value (M.of_value (| Value.Integer 14691639419845557168 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14120069793541087484 |)); + A.to_value (M.of_value (| Value.Integer 13752863256379558556 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17650087241926359355 |)); + A.to_value (M.of_value (| Value.Integer 17191079070474448196 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11031304526203974597 |)); + A.to_value (M.of_value (| Value.Integer 8438581409832836170 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13789130657754968246 |)); + A.to_value (M.of_value (| Value.Integer 15159912780718433117 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17236413322193710308 |)); + A.to_value (M.of_value (| Value.Integer 9726518939043265588 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10772758326371068942 |)); + A.to_value (M.of_value (| Value.Integer 15302446373756816800 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13465947907963836178 |)); + A.to_value (M.of_value (| Value.Integer 9904685930341245193 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16832434884954795223 |)); + A.to_value (M.of_value (| Value.Integer 3157485376071780683 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10520271803096747014 |)); + A.to_value (M.of_value (| Value.Integer 8890957387685944783 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13150339753870933768 |)); + A.to_value (M.of_value (| Value.Integer 1890324697752655170 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16437924692338667210 |)); + A.to_value (M.of_value (| Value.Integer 2362905872190818963 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10273702932711667006 |)); + A.to_value (M.of_value (| Value.Integer 6088502188546649756 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12842128665889583757 |)); + A.to_value (M.of_value (| Value.Integer 16833999772538088003 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16052660832361979697 |)); + A.to_value (M.of_value (| Value.Integer 7207441660390446292 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10032913020226237310 |)); + A.to_value (M.of_value (| Value.Integer 16033866083812498692 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12541141275282796638 |)); + A.to_value (M.of_value (| Value.Integer 10818960567910847557 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15676426594103495798 |)); + A.to_value (M.of_value (| Value.Integer 4300328673033783639 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9797766621314684873 |)); + A.to_value (M.of_value (| Value.Integer 16522763475928278486 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12247208276643356092 |)); + A.to_value (M.of_value (| Value.Integer 6818396289628184396 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15309010345804195115 |)); + A.to_value (M.of_value (| Value.Integer 8522995362035230495 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9568131466127621947 |)); + A.to_value (M.of_value (| Value.Integer 3021029092058325107 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11960164332659527433 |)); + A.to_value (M.of_value (| Value.Integer 17611344420355070096 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14950205415824409292 |)); + A.to_value (M.of_value (| Value.Integer 8179122470161673908 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9343878384890255807 |)); + A.to_value (M.of_value (| Value.Integer 14335323580705822000 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11679847981112819759 |)); + A.to_value (M.of_value (| Value.Integer 13307468457454889596 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14599809976391024699 |)); + A.to_value (M.of_value (| Value.Integer 12022649553391224092 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18249762470488780874 |)); + A.to_value (M.of_value (| Value.Integer 10416625923311642211 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11406101544055488046 |)); + A.to_value (M.of_value (| Value.Integer 11122077220497164286 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14257626930069360058 |)); + A.to_value (M.of_value (| Value.Integer 4679224488766679549 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17822033662586700072 |)); + A.to_value (M.of_value (| Value.Integer 15072402647813125244 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11138771039116687545 |)); + A.to_value (M.of_value (| Value.Integer 9420251654883203278 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13923463798895859431 |)); + A.to_value (M.of_value (| Value.Integer 16387000587031392001 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17404329748619824289 |)); + A.to_value (M.of_value (| Value.Integer 15872064715361852097 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10877706092887390181 |)); + A.to_value (M.of_value (| Value.Integer 3002511419460075705 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13597132616109237726 |)); + A.to_value (M.of_value (| Value.Integer 8364825292752482535 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16996415770136547158 |)); + A.to_value (M.of_value (| Value.Integer 1232659579085827361 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10622759856335341973 |)); + A.to_value (M.of_value (| Value.Integer 14605470292210805812 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13278449820419177467 |)); + A.to_value (M.of_value (| Value.Integer 4421779809981343554 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16598062275523971834 |)); + A.to_value (M.of_value (| Value.Integer 915538744049291538 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10373788922202482396 |)); + A.to_value (M.of_value (| Value.Integer 5183897733458195115 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12967236152753102995 |)); + A.to_value (M.of_value (| Value.Integer 6479872166822743894 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16209045190941378744 |)); + A.to_value (M.of_value (| Value.Integer 3488154190101041964 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10130653244338361715 |)); + A.to_value (M.of_value (| Value.Integer 2180096368813151227 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12663316555422952143 |)); + A.to_value (M.of_value (| Value.Integer 16560178516298602746 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15829145694278690179 |)); + A.to_value (M.of_value (| Value.Integer 16088537126945865529 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9893216058924181362 |)); + A.to_value (M.of_value (| Value.Integer 7749492695127472003 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12366520073655226703 |)); + A.to_value (M.of_value (| Value.Integer 463493832054564196 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15458150092069033378 |)); + A.to_value (M.of_value (| Value.Integer 14414425345350368957 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9661343807543145861 |)); + A.to_value (M.of_value (| Value.Integer 13620701859271368502 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12076679759428932327 |)); + A.to_value (M.of_value (| Value.Integer 3190819268807046916 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15095849699286165408 |)); + A.to_value (M.of_value (| Value.Integer 17823582141290972357 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9434906062053853380 |)); + A.to_value (M.of_value (| Value.Integer 11139738838306857723 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11793632577567316725 |)); + A.to_value (M.of_value (| Value.Integer 13924673547883572154 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14742040721959145907 |)); + A.to_value (M.of_value (| Value.Integer 3570783879572301480 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18427550902448932383 |)); + A.to_value (M.of_value (| Value.Integer 18298537904747540562 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11517219314030582739 |)); + A.to_value (M.of_value (| Value.Integer 18354115218108294707 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14396524142538228424 |)); + A.to_value (M.of_value (| Value.Integer 18330958004207980480 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17995655178172785531 |)); + A.to_value (M.of_value (| Value.Integer 4466953431550423984 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11247284486357990957 |)); + A.to_value (M.of_value (| Value.Integer 486002885505321038 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14059105607947488696 |)); + A.to_value (M.of_value (| Value.Integer 5219189625309039202 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17573882009934360870 |)); + A.to_value (M.of_value (| Value.Integer 6523987031636299002 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10983676256208975543 |)); + A.to_value (M.of_value (| Value.Integer 17912549950054850588 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13729595320261219429 |)); + A.to_value (M.of_value (| Value.Integer 17779001419141175331 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17161994150326524287 |)); + A.to_value (M.of_value (| Value.Integer 8388693718644305452 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10726246343954077679 |)); + A.to_value (M.of_value (| Value.Integer 12160462601793772764 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13407807929942597099 |)); + A.to_value (M.of_value (| Value.Integer 10588892233814828051 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16759759912428246374 |)); + A.to_value (M.of_value (| Value.Integer 8624429273841147159 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10474849945267653984 |)); + A.to_value (M.of_value (| Value.Integer 778582277723329070 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13093562431584567480 |)); + A.to_value (M.of_value (| Value.Integer 973227847154161338 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16366953039480709350 |)); + A.to_value (M.of_value (| Value.Integer 1216534808942701673 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10229345649675443343 |)); + A.to_value (M.of_value (| Value.Integer 14595392310871352257 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12786682062094304179 |)); + A.to_value (M.of_value (| Value.Integer 13632554370161802418 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15983352577617880224 |)); + A.to_value (M.of_value (| Value.Integer 12429006944274865118 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9989595361011175140 |)); + A.to_value (M.of_value (| Value.Integer 7768129340171790699 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12486994201263968925 |)); + A.to_value (M.of_value (| Value.Integer 9710161675214738374 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15608742751579961156 |)); + A.to_value (M.of_value (| Value.Integer 16749388112445810871 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9755464219737475723 |)); + A.to_value (M.of_value (| Value.Integer 1244995533423855986 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12194330274671844653 |)); + A.to_value (M.of_value (| Value.Integer 15391302472061983695 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15242912843339805817 |)); + A.to_value (M.of_value (| Value.Integer 5404070034795315907 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9526820527087378635 |)); + A.to_value (M.of_value (| Value.Integer 14906758817815542202 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11908525658859223294 |)); + A.to_value (M.of_value (| Value.Integer 14021762503842039848 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14885657073574029118 |)); + A.to_value (M.of_value (| Value.Integer 8303831092947774002 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9303535670983768199 |)); + A.to_value (M.of_value (| Value.Integer 578208414664970847 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11629419588729710248 |)); + A.to_value (M.of_value (| Value.Integer 14557818573613377271 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14536774485912137810 |)); + A.to_value (M.of_value (| Value.Integer 18197273217016721589 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18170968107390172263 |)); + A.to_value (M.of_value (| Value.Integer 13523219484416126178 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11356855067118857664 |)); + A.to_value (M.of_value (| Value.Integer 15369541205401160717 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14196068833898572081 |)); + A.to_value (M.of_value (| Value.Integer 765182433041899281 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17745086042373215101 |)); + A.to_value (M.of_value (| Value.Integer 5568164059729762005 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11090678776483259438 |)); + A.to_value (M.of_value (| Value.Integer 5785945546544795205 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13863348470604074297 |)); + A.to_value (M.of_value (| Value.Integer 16455803970035769814 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17329185588255092872 |)); + A.to_value (M.of_value (| Value.Integer 6734696907262548556 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10830740992659433045 |)); + A.to_value (M.of_value (| Value.Integer 4209185567039092847 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13538426240824291306 |)); + A.to_value (M.of_value (| Value.Integer 9873167977226253963 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16923032801030364133 |)); + A.to_value (M.of_value (| Value.Integer 3118087934678041646 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10576895500643977583 |)); + A.to_value (M.of_value (| Value.Integer 4254647968387469981 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13221119375804971979 |)); + A.to_value (M.of_value (| Value.Integer 706623942056949572 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16526399219756214973 |)); + A.to_value (M.of_value (| Value.Integer 14718337982853350677 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10328999512347634358 |)); + A.to_value (M.of_value (| Value.Integer 11504804248497038125 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12911249390434542948 |)); + A.to_value (M.of_value (| Value.Integer 5157633273766521849 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16139061738043178685 |)); + A.to_value (M.of_value (| Value.Integer 6447041592208152311 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10086913586276986678 |)); + A.to_value (M.of_value (| Value.Integer 6335244004343789146 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12608641982846233347 |)); + A.to_value (M.of_value (| Value.Integer 17142427042284512241 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15760802478557791684 |)); + A.to_value (M.of_value (| Value.Integer 16816347784428252397 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9850501549098619803 |)); + A.to_value (M.of_value (| Value.Integer 1286845328412881940 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12313126936373274753 |)); + A.to_value (M.of_value (| Value.Integer 15443614715798266137 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15391408670466593442 |)); + A.to_value (M.of_value (| Value.Integer 5469460339465668959 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9619630419041620901 |)); + A.to_value (M.of_value (| Value.Integer 8030098730593431003 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12024538023802026126 |)); + A.to_value (M.of_value (| Value.Integer 14649309431669176658 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15030672529752532658 |)); + A.to_value (M.of_value (| Value.Integer 9088264752731695015 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9394170331095332911 |)); + A.to_value (M.of_value (| Value.Integer 10291851488884697288 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11742712913869166139 |)); + A.to_value (M.of_value (| Value.Integer 8253128342678483706 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14678391142336457674 |)); + A.to_value (M.of_value (| Value.Integer 5704724409920716729 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18347988927920572092 |)); + A.to_value (M.of_value (| Value.Integer 16354277549255671720 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11467493079950357558 |)); + A.to_value (M.of_value (| Value.Integer 998051431430019017 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14334366349937946947 |)); + A.to_value (M.of_value (| Value.Integer 10470936326142299579 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17917957937422433684 |)); + A.to_value (M.of_value (| Value.Integer 8476984389250486570 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11198723710889021052 |)); + A.to_value (M.of_value (| Value.Integer 14521487280136329914 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13998404638611276315 |)); + A.to_value (M.of_value (| Value.Integer 18151859100170412392 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17498005798264095394 |)); + A.to_value (M.of_value (| Value.Integer 18078137856785627587 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10936253623915059621 |)); + A.to_value (M.of_value (| Value.Integer 15910522178918405146 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13670317029893824527 |)); + A.to_value (M.of_value (| Value.Integer 6053094668365842720 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17087896287367280659 |)); + A.to_value (M.of_value (| Value.Integer 2954682317029915496 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10679935179604550411 |)); + A.to_value (M.of_value (| Value.Integer 17987577512639554849 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13349918974505688014 |)); + A.to_value (M.of_value (| Value.Integer 17872785872372055657 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16687398718132110018 |)); + A.to_value (M.of_value (| Value.Integer 13117610303610293764 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10429624198832568761 |)); + A.to_value (M.of_value (| Value.Integer 12810192458183821506 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13037030248540710952 |)); + A.to_value (M.of_value (| Value.Integer 2177682517447613171 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16296287810675888690 |)); + A.to_value (M.of_value (| Value.Integer 2722103146809516464 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10185179881672430431 |)); + A.to_value (M.of_value (| Value.Integer 6313000485183335694 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12731474852090538039 |)); + A.to_value (M.of_value (| Value.Integer 3279564588051781713 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15914343565113172548 |)); + A.to_value (M.of_value (| Value.Integer 17934513790346890853 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9946464728195732843 |)); + A.to_value (M.of_value (| Value.Integer 1985699082112030975 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12433080910244666053 |)); + A.to_value (M.of_value (| Value.Integer 16317181907922202431 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15541351137805832567 |)); + A.to_value (M.of_value (| Value.Integer 6561419329620589327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9713344461128645354 |)); + A.to_value (M.of_value (| Value.Integer 11018416108653950185 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12141680576410806693 |)); + A.to_value (M.of_value (| Value.Integer 4549648098962661924 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15177100720513508366 |)); + A.to_value (M.of_value (| Value.Integer 10298746142130715309 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9485687950320942729 |)); + A.to_value (M.of_value (| Value.Integer 1825030320404309164 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11857109937901178411 |)); + A.to_value (M.of_value (| Value.Integer 6892973918932774359 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14821387422376473014 |)); + A.to_value (M.of_value (| Value.Integer 4004531380238580045 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9263367138985295633 |)); + A.to_value (M.of_value (| Value.Integer 16337890167931276240 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11579208923731619542 |)); + A.to_value (M.of_value (| Value.Integer 6587304654631931588 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14474011154664524427 |)); + A.to_value (M.of_value (| Value.Integer 17457502855144690293 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18092513943330655534 |)); + A.to_value (M.of_value (| Value.Integer 17210192550503474962 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11307821214581659709 |)); + A.to_value (M.of_value (| Value.Integer 6144684325637283947 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14134776518227074636 |)); + A.to_value (M.of_value (| Value.Integer 12292541425473992838 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17668470647783843295 |)); + A.to_value (M.of_value (| Value.Integer 15365676781842491048 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11042794154864902059 |)); + A.to_value (M.of_value (| Value.Integer 16521077016292638761 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13803492693581127574 |)); + A.to_value (M.of_value (| Value.Integer 16039660251938410547 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17254365866976409468 |)); + A.to_value (M.of_value (| Value.Integer 10826203278068237376 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10783978666860255917 |)); + A.to_value (M.of_value (| Value.Integer 15989749085647424168 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13479973333575319897 |)); + A.to_value (M.of_value (| Value.Integer 6152128301777116498 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16849966666969149871 |)); + A.to_value (M.of_value (| Value.Integer 12301846395648783526 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10531229166855718669 |)); + A.to_value (M.of_value (| Value.Integer 14606183024921571560 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13164036458569648337 |)); + A.to_value (M.of_value (| Value.Integer 4422670725869800738 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16455045573212060421 |)); + A.to_value (M.of_value (| Value.Integer 10140024425764638826 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10284403483257537763 |)); + A.to_value (M.of_value (| Value.Integer 8643358275316593218 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12855504354071922204 |)); + A.to_value (M.of_value (| Value.Integer 6192511825718353619 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16069380442589902755 |)); + A.to_value (M.of_value (| Value.Integer 7740639782147942024 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10043362776618689222 |)); + A.to_value (M.of_value (| Value.Integer 2532056854628769813 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12554203470773361527 |)); + A.to_value (M.of_value (| Value.Integer 12388443105140738074 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15692754338466701909 |)); + A.to_value (M.of_value (| Value.Integer 10873867862998534689 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9807971461541688693 |)); + A.to_value (M.of_value (| Value.Integer 9102010423587778132 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12259964326927110866 |)); + A.to_value (M.of_value (| Value.Integer 15989199047912110569 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15324955408658888583 |)); + A.to_value (M.of_value (| Value.Integer 10763126773035362404 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9578097130411805364 |)); + A.to_value (M.of_value (| Value.Integer 13644483260788183358 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11972621413014756705 |)); + A.to_value (M.of_value (| Value.Integer 17055604075985229198 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14965776766268445882 |)); + A.to_value (M.of_value (| Value.Integer 7484447039699372786 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9353610478917778676 |)); + A.to_value (M.of_value (| Value.Integer 9289465418239495895 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11692013098647223345 |)); + A.to_value (M.of_value (| Value.Integer 11611831772799369869 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14615016373309029182 |)); + A.to_value (M.of_value (| Value.Integer 679731660717048624 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18268770466636286477 |)); + A.to_value (M.of_value (| Value.Integer 10073036612751086588 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11417981541647679048 |)); + A.to_value (M.of_value (| Value.Integer 8601490892183123070 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14272476927059598810 |)); + A.to_value (M.of_value (| Value.Integer 10751863615228903838 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17840596158824498513 |)); + A.to_value (M.of_value (| Value.Integer 4216457482181353989 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11150372599265311570 |)); + A.to_value (M.of_value (| Value.Integer 14164500972431816003 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13937965749081639463 |)); + A.to_value (M.of_value (| Value.Integer 8482254178684994196 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17422457186352049329 |)); + A.to_value (M.of_value (| Value.Integer 5991131704928854841 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10889035741470030830 |)); + A.to_value (M.of_value (| Value.Integer 15273672361649004036 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13611294676837538538 |)); + A.to_value (M.of_value (| Value.Integer 9868718415206479237 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17014118346046923173 |)); + A.to_value (M.of_value (| Value.Integer 3112525982153323238 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10633823966279326983 |)); + A.to_value (M.of_value (| Value.Integer 4251171748059520976 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13292279957849158729 |)); + A.to_value (M.of_value (| Value.Integer 702278666647013315 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16615349947311448411 |)); + A.to_value (M.of_value (| Value.Integer 5489534351736154548 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10384593717069655257 |)); + A.to_value (M.of_value (| Value.Integer 1125115960621402641 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12980742146337069071 |)); + A.to_value (M.of_value (| Value.Integer 6018080969204141205 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16225927682921336339 |)); + A.to_value (M.of_value (| Value.Integer 2910915193077788602 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10141204801825835211 |)); + A.to_value (M.of_value (| Value.Integer 17960223060169475540 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12676506002282294014 |)); + A.to_value (M.of_value (| Value.Integer 17838592806784456521 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15845632502852867518 |)); + A.to_value (M.of_value (| Value.Integer 13074868971625794844 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9903520314283042199 |)); + A.to_value (M.of_value (| Value.Integer 3560107088838733873 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12379400392853802748 |)); + A.to_value (M.of_value (| Value.Integer 18285191916330581054 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15474250491067253436 |)); + A.to_value (M.of_value (| Value.Integer 4409745821703674701 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9671406556917033397 |)); + A.to_value (M.of_value (| Value.Integer 11979463175419572496 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12089258196146291747 |)); + A.to_value (M.of_value (| Value.Integer 1139270913992301908 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15111572745182864683 |)); + A.to_value (M.of_value (| Value.Integer 15259146697772541097 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9444732965739290427 |)); + A.to_value (M.of_value (| Value.Integer 7231123676894144234 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11805916207174113034 |)); + A.to_value (M.of_value (| Value.Integer 4427218577690292388 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14757395258967641292 |)); + A.to_value (M.of_value (| Value.Integer 14757395258967641293 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9223372036854775808 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11529215046068469760 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14411518807585587200 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18014398509481984000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11258999068426240000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14073748835532800000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17592186044416000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10995116277760000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13743895347200000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17179869184000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10737418240000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13421772800000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16777216000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10485760000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13107200000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16384000000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10240000000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12800000000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16000000000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10000000000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12500000000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15625000000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9765625000000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12207031250000000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15258789062500000000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9536743164062500000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11920928955078125000 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14901161193847656250 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9313225746154785156 |)); + A.to_value (M.of_value (| Value.Integer 4611686018427387904 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11641532182693481445 |)); + A.to_value (M.of_value (| Value.Integer 5764607523034234880 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14551915228366851806 |)); + A.to_value (M.of_value (| Value.Integer 11817445422220181504 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18189894035458564758 |)); + A.to_value (M.of_value (| Value.Integer 5548434740920451072 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11368683772161602973 |)); + A.to_value (M.of_value (| Value.Integer 17302829768357445632 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14210854715202003717 |)); + A.to_value (M.of_value (| Value.Integer 7793479155164643328 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17763568394002504646 |)); + A.to_value (M.of_value (| Value.Integer 14353534962383192064 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11102230246251565404 |)); + A.to_value (M.of_value (| Value.Integer 4359273333062107136 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13877787807814456755 |)); + A.to_value (M.of_value (| Value.Integer 5449091666327633920 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17347234759768070944 |)); + A.to_value (M.of_value (| Value.Integer 2199678564482154496 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10842021724855044340 |)); + A.to_value (M.of_value (| Value.Integer 1374799102801346560 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13552527156068805425 |)); + A.to_value (M.of_value (| Value.Integer 1718498878501683200 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16940658945086006781 |)); + A.to_value (M.of_value (| Value.Integer 6759809616554491904 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10587911840678754238 |)); + A.to_value (M.of_value (| Value.Integer 6530724019560251392 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13234889800848442797 |)); + A.to_value (M.of_value (| Value.Integer 17386777061305090048 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16543612251060553497 |)); + A.to_value (M.of_value (| Value.Integer 7898413271349198848 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10339757656912845935 |)); + A.to_value (M.of_value (| Value.Integer 16465723340661719040 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12924697071141057419 |)); + A.to_value (M.of_value (| Value.Integer 15970468157399760896 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16155871338926321774 |)); + A.to_value (M.of_value (| Value.Integer 15351399178322313216 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10097419586828951109 |)); + A.to_value (M.of_value (| Value.Integer 4982938468024057856 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12621774483536188886 |)); + A.to_value (M.of_value (| Value.Integer 10840359103457460224 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15777218104420236108 |)); + A.to_value (M.of_value (| Value.Integer 4327076842467049472 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9860761315262647567 |)); + A.to_value (M.of_value (| Value.Integer 11927795063396681728 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12325951644078309459 |)); + A.to_value (M.of_value (| Value.Integer 10298057810818464256 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15407439555097886824 |)); + A.to_value (M.of_value (| Value.Integer 8260886245095692416 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9629649721936179265 |)); + A.to_value (M.of_value (| Value.Integer 5163053903184807760 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12037062152420224081 |)); + A.to_value (M.of_value (| Value.Integer 11065503397408397604 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15046327690525280101 |)); + A.to_value (M.of_value (| Value.Integer 18443565265187884909 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9403954806578300063 |)); + A.to_value (M.of_value (| Value.Integer 13833071299956122020 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11754943508222875079 |)); + A.to_value (M.of_value (| Value.Integer 12679653106517764621 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14693679385278593849 |)); + A.to_value (M.of_value (| Value.Integer 11237880364719817872 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18367099231598242312 |)); + A.to_value (M.of_value (| Value.Integer 212292400617608628 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11479437019748901445 |)); + A.to_value (M.of_value (| Value.Integer 132682750386005392 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14349296274686126806 |)); + A.to_value (M.of_value (| Value.Integer 4777539456409894645 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17936620343357658507 |)); + A.to_value (M.of_value (| Value.Integer 15195296357367144114 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11210387714598536567 |)); + A.to_value (M.of_value (| Value.Integer 7191217214140771119 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14012984643248170709 |)); + A.to_value (M.of_value (| Value.Integer 4377335499248575995 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17516230804060213386 |)); + A.to_value (M.of_value (| Value.Integer 10083355392488107898 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10947644252537633366 |)); + A.to_value (M.of_value (| Value.Integer 10913783138732455340 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13684555315672041708 |)); + A.to_value (M.of_value (| Value.Integer 4418856886560793367 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17105694144590052135 |)); + A.to_value (M.of_value (| Value.Integer 5523571108200991709 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10691058840368782584 |)); + A.to_value (M.of_value (| Value.Integer 10369760970266701674 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13363823550460978230 |)); + A.to_value (M.of_value (| Value.Integer 12962201212833377092 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16704779438076222788 |)); + A.to_value (M.of_value (| Value.Integer 6979379479186945558 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10440487148797639242 |)); + A.to_value (M.of_value (| Value.Integer 13585484211346616781 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13050608935997049053 |)); + A.to_value (M.of_value (| Value.Integer 7758483227328495169 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16313261169996311316 |)); + A.to_value (M.of_value (| Value.Integer 14309790052588006865 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10195788231247694572 |)); + A.to_value (M.of_value (| Value.Integer 18166990819722280098 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12744735289059618216 |)); + A.to_value (M.of_value (| Value.Integer 4261994450943298507 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15930919111324522770 |)); + A.to_value (M.of_value (| Value.Integer 5327493063679123134 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9956824444577826731 |)); + A.to_value (M.of_value (| Value.Integer 7941369183226839863 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12446030555722283414 |)); + A.to_value (M.of_value (| Value.Integer 5315025460606161924 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15557538194652854267 |)); + A.to_value (M.of_value (| Value.Integer 15867153862612478214 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9723461371658033917 |)); + A.to_value (M.of_value (| Value.Integer 7611128154919104931 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12154326714572542396 |)); + A.to_value (M.of_value (| Value.Integer 14125596212076269068 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15192908393215677995 |)); + A.to_value (M.of_value (| Value.Integer 17656995265095336336 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9495567745759798747 |)); + A.to_value (M.of_value (| Value.Integer 8729779031470891258 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11869459682199748434 |)); + A.to_value (M.of_value (| Value.Integer 6300537770911226168 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14836824602749685542 |)); + A.to_value (M.of_value (| Value.Integer 17099044250493808518 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9273015376718553464 |)); + A.to_value (M.of_value (| Value.Integer 6075216638131242420 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11591269220898191830 |)); + A.to_value (M.of_value (| Value.Integer 7594020797664053025 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14489086526122739788 |)); + A.to_value (M.of_value (| Value.Integer 269153960225290473 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18111358157653424735 |)); + A.to_value (M.of_value (| Value.Integer 336442450281613091 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11319598848533390459 |)); + A.to_value (M.of_value (| Value.Integer 7127805559067090038 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14149498560666738074 |)); + A.to_value (M.of_value (| Value.Integer 4298070930406474644 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17686873200833422592 |)); + A.to_value (M.of_value (| Value.Integer 14595960699862869113 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11054295750520889120 |)); + A.to_value (M.of_value (| Value.Integer 9122475437414293195 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13817869688151111400 |)); + A.to_value (M.of_value (| Value.Integer 11403094296767866494 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17272337110188889250 |)); + A.to_value (M.of_value (| Value.Integer 14253867870959833118 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10795210693868055781 |)); + A.to_value (M.of_value (| Value.Integer 13520353437777283602 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13494013367335069727 |)); + A.to_value (M.of_value (| Value.Integer 3065383741939440791 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16867516709168837158 |)); + A.to_value (M.of_value (| Value.Integer 17666787732706464701 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10542197943230523224 |)); + A.to_value (M.of_value (| Value.Integer 6430056314514152534 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13177747429038154030 |)); + A.to_value (M.of_value (| Value.Integer 8037570393142690668 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16472184286297692538 |)); + A.to_value (M.of_value (| Value.Integer 823590954573587527 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10295115178936057836 |)); + A.to_value (M.of_value (| Value.Integer 5126430365035880108 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12868893973670072295 |)); + A.to_value (M.of_value (| Value.Integer 6408037956294850135 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16086117467087590369 |)); + A.to_value (M.of_value (| Value.Integer 3398361426941174765 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10053823416929743980 |)); + A.to_value (M.of_value (| Value.Integer 13653190937906703988 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12567279271162179975 |)); + A.to_value (M.of_value (| Value.Integer 17066488672383379985 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15709099088952724969 |)); + A.to_value (M.of_value (| Value.Integer 16721424822051837077 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9818186930595453106 |)); + A.to_value (M.of_value (| Value.Integer 3533361486141316317 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12272733663244316382 |)); + A.to_value (M.of_value (| Value.Integer 13640073894531421205 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15340917079055395478 |)); + A.to_value (M.of_value (| Value.Integer 7826720331309500698 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9588073174409622174 |)); + A.to_value (M.of_value (| Value.Integer 280014188641050032 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11985091468012027717 |)); + A.to_value (M.of_value (| Value.Integer 9573389772656088348 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14981364335015034646 |)); + A.to_value (M.of_value (| Value.Integer 16578423234247498339 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9363352709384396654 |)); + A.to_value (M.of_value (| Value.Integer 5749828502977298558 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11704190886730495817 |)); + A.to_value (M.of_value (| Value.Integer 16410657665576399005 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14630238608413119772 |)); + A.to_value (M.of_value (| Value.Integer 6678264026688335045 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18287798260516399715 |)); + A.to_value (M.of_value (| Value.Integer 8347830033360418806 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11429873912822749822 |)); + A.to_value (M.of_value (| Value.Integer 2911550761636567802 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14287342391028437277 |)); + A.to_value (M.of_value (| Value.Integer 12862810488900485560 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17859177988785546597 |)); + A.to_value (M.of_value (| Value.Integer 2243455055843443238 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11161986242990966623 |)); + A.to_value (M.of_value (| Value.Integer 3708002419115845976 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13952482803738708279 |)); + A.to_value (M.of_value (| Value.Integer 23317005467419566 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17440603504673385348 |)); + A.to_value (M.of_value (| Value.Integer 13864204312116438170 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10900377190420865842 |)); + A.to_value (M.of_value (| Value.Integer 17888499731927549664 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13625471488026082303 |)); + A.to_value (M.of_value (| Value.Integer 13137252628054661272 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17031839360032602879 |)); + A.to_value (M.of_value (| Value.Integer 11809879766640938686 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10644899600020376799 |)); + A.to_value (M.of_value (| Value.Integer 14298703881791668535 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13306124500025470999 |)); + A.to_value (M.of_value (| Value.Integer 13261693833812197764 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16632655625031838749 |)); + A.to_value (M.of_value (| Value.Integer 11965431273837859301 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10395409765644899218 |)); + A.to_value (M.of_value (| Value.Integer 9784237555362356015 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12994262207056124023 |)); + A.to_value (M.of_value (| Value.Integer 3006924907348169211 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16242827758820155028 |)); + A.to_value (M.of_value (| Value.Integer 17593714189467375226 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10151767349262596893 |)); + A.to_value (M.of_value (| Value.Integer 1772699331562333708 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12689709186578246116 |)); + A.to_value (M.of_value (| Value.Integer 6827560182880305039 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15862136483222807645 |)); + A.to_value (M.of_value (| Value.Integer 8534450228600381299 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9913835302014254778 |)); + A.to_value (M.of_value (| Value.Integer 7639874402088932264 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12392294127517818473 |)); + A.to_value (M.of_value (| Value.Integer 326470965756389522 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15490367659397273091 |)); + A.to_value (M.of_value (| Value.Integer 5019774725622874806 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9681479787123295682 |)); + A.to_value (M.of_value (| Value.Integer 831516194300602802 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12101849733904119602 |)); + A.to_value (M.of_value (| Value.Integer 10262767279730529310 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15127312167380149503 |)); + A.to_value (M.of_value (| Value.Integer 3605087062808385830 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9454570104612593439 |)); + A.to_value (M.of_value (| Value.Integer 9170708441896323000 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11818212630765741799 |)); + A.to_value (M.of_value (| Value.Integer 6851699533943015846 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14772765788457177249 |)); + A.to_value (M.of_value (| Value.Integer 3952938399001381903 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9232978617785735780 |)); + A.to_value (M.of_value (| Value.Integer 13999801545444333449 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11541223272232169725 |)); + A.to_value (M.of_value (| Value.Integer 17499751931805416812 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14426529090290212157 |)); + A.to_value (M.of_value (| Value.Integer 8039631859474607303 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18033161362862765196 |)); + A.to_value (M.of_value (| Value.Integer 14661225842770647033 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11270725851789228247 |)); + A.to_value (M.of_value (| Value.Integer 18386638188586430203 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14088407314736535309 |)); + A.to_value (M.of_value (| Value.Integer 18371611717305649850 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17610509143420669137 |)); + A.to_value (M.of_value (| Value.Integer 9129456591349898601 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11006568214637918210 |)); + A.to_value (M.of_value (| Value.Integer 17235125415662156385 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13758210268297397763 |)); + A.to_value (M.of_value (| Value.Integer 12320534732722919674 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17197762835371747204 |)); + A.to_value (M.of_value (| Value.Integer 10788982397476261688 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10748601772107342002 |)); + A.to_value (M.of_value (| Value.Integer 15966486035277439363 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13435752215134177503 |)); + A.to_value (M.of_value (| Value.Integer 10734735507242023396 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16794690268917721879 |)); + A.to_value (M.of_value (| Value.Integer 8806733365625141341 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10496681418073576174 |)); + A.to_value (M.of_value (| Value.Integer 12421737381156795194 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13120851772591970218 |)); + A.to_value (M.of_value (| Value.Integer 6303799689591218185 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16401064715739962772 |)); + A.to_value (M.of_value (| Value.Integer 17103121648843798539 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10250665447337476733 |)); + A.to_value (M.of_value (| Value.Integer 1466078993672598279 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12813331809171845916 |)); + A.to_value (M.of_value (| Value.Integer 6444284760518135752 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16016664761464807395 |)); + A.to_value (M.of_value (| Value.Integer 8055355950647669691 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10010415475915504622 |)); + A.to_value (M.of_value (| Value.Integer 2728754459941099604 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12513019344894380777 |)); + A.to_value (M.of_value (| Value.Integer 12634315111781150314 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15641274181117975972 |)); + A.to_value (M.of_value (| Value.Integer 1957835834444274180 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9775796363198734982 |)); + A.to_value (M.of_value (| Value.Integer 10447019433382447170 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12219745453998418728 |)); + A.to_value (M.of_value (| Value.Integer 3835402254873283155 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15274681817498023410 |)); + A.to_value (M.of_value (| Value.Integer 4794252818591603944 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9546676135936264631 |)); + A.to_value (M.of_value (| Value.Integer 7608094030047140369 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11933345169920330789 |)); + A.to_value (M.of_value (| Value.Integer 4898431519131537557 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14916681462400413486 |)); + A.to_value (M.of_value (| Value.Integer 10734725417341809851 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9322925914000258429 |)); + A.to_value (M.of_value (| Value.Integer 2097517367411243253 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11653657392500323036 |)); + A.to_value (M.of_value (| Value.Integer 7233582727691441970 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14567071740625403795 |)); + A.to_value (M.of_value (| Value.Integer 9041978409614302462 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18208839675781754744 |)); + A.to_value (M.of_value (| Value.Integer 6690786993590490174 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11380524797363596715 |)); + A.to_value (M.of_value (| Value.Integer 4181741870994056359 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14225655996704495894 |)); + A.to_value (M.of_value (| Value.Integer 615491320315182544 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17782069995880619867 |)); + A.to_value (M.of_value (| Value.Integer 9992736187248753989 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11113793747425387417 |)); + A.to_value (M.of_value (| Value.Integer 3939617107816777291 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13892242184281734271 |)); + A.to_value (M.of_value (| Value.Integer 9536207403198359517 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17365302730352167839 |)); + A.to_value (M.of_value (| Value.Integer 7308573235570561493 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10853314206470104899 |)); + A.to_value (M.of_value (| Value.Integer 11485387299872682789 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13566642758087631124 |)); + A.to_value (M.of_value (| Value.Integer 9745048106413465582 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16958303447609538905 |)); + A.to_value (M.of_value (| Value.Integer 12181310133016831978 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10598939654755961816 |)); + A.to_value (M.of_value (| Value.Integer 695789805494438130 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13248674568444952270 |)); + A.to_value (M.of_value (| Value.Integer 869737256868047663 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16560843210556190337 |)); + A.to_value (M.of_value (| Value.Integer 10310543607939835386 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10350527006597618960 |)); + A.to_value (M.of_value (| Value.Integer 17973304801030866876 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12938158758247023701 |)); + A.to_value (M.of_value (| Value.Integer 4019886927579031980 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16172698447808779626 |)); + A.to_value (M.of_value (| Value.Integer 9636544677901177879 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10107936529880487266 |)); + A.to_value (M.of_value (| Value.Integer 10634526442115624078 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12634920662350609083 |)); + A.to_value (M.of_value (| Value.Integer 4069786015789754290 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15793650827938261354 |)); + A.to_value (M.of_value (| Value.Integer 475546501309804958 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9871031767461413346 |)); + A.to_value (M.of_value (| Value.Integer 4908902581746016003 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12338789709326766682 |)); + A.to_value (M.of_value (| Value.Integer 15359500264037295811 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15423487136658458353 |)); + A.to_value (M.of_value (| Value.Integer 9976003293191843956 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9639679460411536470 |)); + A.to_value (M.of_value (| Value.Integer 17764217104313372233 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12049599325514420588 |)); + A.to_value (M.of_value (| Value.Integer 12981899343536939483 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15061999156893025735 |)); + A.to_value (M.of_value (| Value.Integer 16227374179421174354 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9413749473058141084 |)); + A.to_value (M.of_value (| Value.Integer 17059637889779315827 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11767186841322676356 |)); + A.to_value (M.of_value (| Value.Integer 2877803288514593168 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14708983551653345445 |)); + A.to_value (M.of_value (| Value.Integer 3597254110643241460 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18386229439566681806 |)); + A.to_value (M.of_value (| Value.Integer 9108253656731439729 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11491393399729176129 |)); + A.to_value (M.of_value (| Value.Integer 1080972517029761926 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14364241749661470161 |)); + A.to_value (M.of_value (| Value.Integer 5962901664714590312 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17955302187076837701 |)); + A.to_value (M.of_value (| Value.Integer 12065313099320625794 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11222063866923023563 |)); + A.to_value (M.of_value (| Value.Integer 9846663696289085073 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14027579833653779454 |)); + A.to_value (M.of_value (| Value.Integer 7696643601933968437 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17534474792067224318 |)); + A.to_value (M.of_value (| Value.Integer 397432465562684739 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10959046745042015198 |)); + A.to_value (M.of_value (| Value.Integer 14083453346258841674 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13698808431302518998 |)); + A.to_value (M.of_value (| Value.Integer 8380944645968776284 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17123510539128148748 |)); + A.to_value (M.of_value (| Value.Integer 1252808770606194547 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10702194086955092967 |)); + A.to_value (M.of_value (| Value.Integer 10006377518483647400 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13377742608693866209 |)); + A.to_value (M.of_value (| Value.Integer 7896285879677171346 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16722178260867332761 |)); + A.to_value (M.of_value (| Value.Integer 14482043368023852087 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10451361413042082976 |)); + A.to_value (M.of_value (| Value.Integer 2133748077373825698 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13064201766302603720 |)); + A.to_value (M.of_value (| Value.Integer 2667185096717282123 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16330252207878254650 |)); + A.to_value (M.of_value (| Value.Integer 3333981370896602653 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10206407629923909156 |)); + A.to_value (M.of_value (| Value.Integer 6695424375237764562 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12758009537404886445 |)); + A.to_value (M.of_value (| Value.Integer 8369280469047205703 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15947511921756108056 |)); + A.to_value (M.of_value (| Value.Integer 15073286604736395033 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9967194951097567535 |)); + A.to_value (M.of_value (| Value.Integer 9420804127960246895 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12458993688871959419 |)); + A.to_value (M.of_value (| Value.Integer 7164319141522920715 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15573742111089949274 |)); + A.to_value (M.of_value (| Value.Integer 4343712908476262990 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9733588819431218296 |)); + A.to_value (M.of_value (| Value.Integer 7326506586225052273 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12166986024289022870 |)); + A.to_value (M.of_value (| Value.Integer 9158133232781315341 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15208732530361278588 |)); + A.to_value (M.of_value (| Value.Integer 2224294504121868368 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9505457831475799117 |)); + A.to_value (M.of_value (| Value.Integer 10613556101930943538 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11881822289344748896 |)); + A.to_value (M.of_value (| Value.Integer 17878631145841067327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14852277861680936121 |)); + A.to_value (M.of_value (| Value.Integer 3901544858591782542 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9282673663550585075 |)); + A.to_value (M.of_value (| Value.Integer 13967680582688333849 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11603342079438231344 |)); + A.to_value (M.of_value (| Value.Integer 12847914709933029407 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14504177599297789180 |)); + A.to_value (M.of_value (| Value.Integer 16059893387416286759 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18130221999122236476 |)); + A.to_value (M.of_value (| Value.Integer 1628122660560806833 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11331388749451397797 |)); + A.to_value (M.of_value (| Value.Integer 10240948699705280078 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14164235936814247246 |)); + A.to_value (M.of_value (| Value.Integer 17412871893058988002 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17705294921017809058 |)); + A.to_value (M.of_value (| Value.Integer 12542717829468959195 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11065809325636130661 |)); + A.to_value (M.of_value (| Value.Integer 12450884661845487401 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13832261657045163327 |)); + A.to_value (M.of_value (| Value.Integer 1728547772024695539 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17290327071306454158 |)); + A.to_value (M.of_value (| Value.Integer 15995742770313033136 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10806454419566533849 |)); + A.to_value (M.of_value (| Value.Integer 5385653213018257806 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13508068024458167311 |)); + A.to_value (M.of_value (| Value.Integer 11343752534700210161 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16885085030572709139 |)); + A.to_value (M.of_value (| Value.Integer 9568004649947874797 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10553178144107943212 |)); + A.to_value (M.of_value (| Value.Integer 3674159897003727796 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13191472680134929015 |)); + A.to_value (M.of_value (| Value.Integer 4592699871254659745 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16489340850168661269 |)); + A.to_value (M.of_value (| Value.Integer 1129188820640936778 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10305838031355413293 |)); + A.to_value (M.of_value (| Value.Integer 3011586022114279438 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12882297539194266616 |)); + A.to_value (M.of_value (| Value.Integer 8376168546070237202 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16102871923992833270 |)); + A.to_value (M.of_value (| Value.Integer 10470210682587796502 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10064294952495520794 |)); + A.to_value (M.of_value (| Value.Integer 1932195658189984910 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12580368690619400992 |)); + A.to_value (M.of_value (| Value.Integer 11638616609592256945 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15725460863274251240 |)); + A.to_value (M.of_value (| Value.Integer 14548270761990321182 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9828413039546407025 |)); + A.to_value (M.of_value (| Value.Integer 9092669226243950738 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12285516299433008781 |)); + A.to_value (M.of_value (| Value.Integer 15977522551232326327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15356895374291260977 |)); + A.to_value (M.of_value (| Value.Integer 6136845133758244197 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9598059608932038110 |)); + A.to_value (M.of_value (| Value.Integer 15364743254667372383 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11997574511165047638 |)); + A.to_value (M.of_value (| Value.Integer 9982557031479439671 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14996968138956309548 |)); + A.to_value (M.of_value (| Value.Integer 3254824252494523781 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9373105086847693467 |)); + A.to_value (M.of_value (| Value.Integer 11257637194663853171 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11716381358559616834 |)); + A.to_value (M.of_value (| Value.Integer 9460360474902428559 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14645476698199521043 |)); + A.to_value (M.of_value (| Value.Integer 2602078556773259891 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18306845872749401303 |)); + A.to_value (M.of_value (| Value.Integer 17087656251248738576 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11441778670468375814 |)); + A.to_value (M.of_value (| Value.Integer 17597314184671543466 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14302223338085469768 |)); + A.to_value (M.of_value (| Value.Integer 12773270693984653525 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17877779172606837210 |)); + A.to_value (M.of_value (| Value.Integer 15966588367480816906 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11173611982879273256 |)); + A.to_value (M.of_value (| Value.Integer 14590803748102898470 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13967014978599091570 |)); + A.to_value (M.of_value (| Value.Integer 18238504685128623088 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17458768723248864463 |)); + A.to_value (M.of_value (| Value.Integer 13574758819556003052 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10911730452030540289 |)); + A.to_value (M.of_value (| Value.Integer 15401753289863583763 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13639663065038175362 |)); + A.to_value (M.of_value (| Value.Integer 5417133557047315992 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17049578831297719202 |)); + A.to_value (M.of_value (| Value.Integer 15994788983163920798 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10655986769561074501 |)); + A.to_value (M.of_value (| Value.Integer 14608429132904838403 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13319983461951343127 |)); + A.to_value (M.of_value (| Value.Integer 4425478360848884291 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16649979327439178909 |)); + A.to_value (M.of_value (| Value.Integer 920161932633717460 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10406237079649486818 |)); + A.to_value (M.of_value (| Value.Integer 2880944217109767365 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13007796349561858522 |)); + A.to_value (M.of_value (| Value.Integer 12824552308241985014 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16259745436952323153 |)); + A.to_value (M.of_value (| Value.Integer 6807318348447705459 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10162340898095201970 |)); + A.to_value (M.of_value (| Value.Integer 15783789013848285672 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12702926122619002463 |)); + A.to_value (M.of_value (| Value.Integer 10506364230455581282 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15878657653273753079 |)); + A.to_value (M.of_value (| Value.Integer 8521269269642088699 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9924161033296095674 |)); + A.to_value (M.of_value (| Value.Integer 12243322321167387293 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12405201291620119593 |)); + A.to_value (M.of_value (| Value.Integer 6080780864604458308 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15506501614525149491 |)); + A.to_value (M.of_value (| Value.Integer 12212662099182960789 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9691563509078218432 |)); + A.to_value (M.of_value (| Value.Integer 5327070802775656541 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12114454386347773040 |)); + A.to_value (M.of_value (| Value.Integer 6658838503469570676 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15143067982934716300 |)); + A.to_value (M.of_value (| Value.Integer 8323548129336963345 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9464417489334197687 |)); + A.to_value (M.of_value (| Value.Integer 14425589617690377899 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11830521861667747109 |)); + A.to_value (M.of_value (| Value.Integer 13420301003685584469 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14788152327084683887 |)); + A.to_value (M.of_value (| Value.Integer 2940318199324816875 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9242595204427927429 |)); + A.to_value (M.of_value (| Value.Integer 8755227902219092403 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11553244005534909286 |)); + A.to_value (M.of_value (| Value.Integer 15555720896201253407 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14441555006918636608 |)); + A.to_value (M.of_value (| Value.Integer 10221279083396790951 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18051943758648295760 |)); + A.to_value (M.of_value (| Value.Integer 12776598854245988689 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11282464849155184850 |)); + A.to_value (M.of_value (| Value.Integer 7985374283903742931 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14103081061443981063 |)); + A.to_value (M.of_value (| Value.Integer 758345818024902856 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17628851326804976328 |)); + A.to_value (M.of_value (| Value.Integer 14782990327813292282 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11018032079253110205 |)); + A.to_value (M.of_value (| Value.Integer 9239368954883307676 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13772540099066387756 |)); + A.to_value (M.of_value (| Value.Integer 16160897212031522499 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17215675123832984696 |)); + A.to_value (M.of_value (| Value.Integer 1754377441329851508 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10759796952395615435 |)); + A.to_value (M.of_value (| Value.Integer 1096485900831157192 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13449746190494519293 |)); + A.to_value (M.of_value (| Value.Integer 15205665431321110202 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16812182738118149117 |)); + A.to_value (M.of_value (| Value.Integer 5172023733869224041 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10507614211323843198 |)); + A.to_value (M.of_value (| Value.Integer 5538357842881958977 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13134517764154803997 |)); + A.to_value (M.of_value (| Value.Integer 16146319340457224530 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16418147205193504997 |)); + A.to_value (M.of_value (| Value.Integer 6347841120289366950 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10261342003245940623 |)); + A.to_value (M.of_value (| Value.Integer 6273243709394548296 |)) + ] + |)) + ] + |) |) |))). End table. diff --git a/CoqOfRust/core/num/diy_float.v b/CoqOfRust/core/num/diy_float.v index 5cdedef44..ffcef5ee3 100644 --- a/CoqOfRust/core/num/diy_float.v +++ b/CoqOfRust/core/num/diy_float.v @@ -25,19 +25,19 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::diy_float::Fp". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -58,7 +58,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::diy_float::Fp". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -72,25 +72,27 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "Fp" |); - M.read (| Value.String "f" |); + M.read (| M.of_value (| Value.String "Fp" |) |); + M.read (| M.of_value (| Value.String "f" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::diy_float::Fp", "f" - |)); - M.read (| Value.String "e" |); + |) + |); + M.read (| M.of_value (| Value.String "e" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::diy_float::Fp", "e" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -124,7 +126,7 @@ Module num. Fp { f, e } } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -141,20 +143,21 @@ Module num. "f" |) |), - Value.Integer Integer.I32 32 + M.of_value (| Value.Integer 32 |) |) |) in let b := M.alloc (| - BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::diy_float::Fp", "f" |) - |)) - (M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |)) + |), + M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |) + |) |) in let c := M.alloc (| @@ -166,59 +169,77 @@ Module num. "f" |) |), - Value.Integer Integer.I32 32 + M.of_value (| Value.Integer 32 |) |) |) in let d := M.alloc (| - BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::diy_float::Fp", "f" |) - |)) - (M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |)) + |), + M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |) + |) |) in - let ac := M.alloc (| BinOp.Panic.mul (| M.read (| a |), M.read (| c |) |) |) in - let bc := M.alloc (| BinOp.Panic.mul (| M.read (| b |), M.read (| c |) |) |) in - let ad := M.alloc (| BinOp.Panic.mul (| M.read (| a |), M.read (| d |) |) |) in - let bd := M.alloc (| BinOp.Panic.mul (| M.read (| b |), M.read (| d |) |) |) 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 := M.alloc (| BinOp.Panic.add (| + Integer.U64, BinOp.Panic.add (| + Integer.U64, BinOp.Panic.add (| - BinOp.Panic.shr (| M.read (| bd |), Value.Integer Integer.I32 32 |), - BinOp.Pure.bit_and - (M.read (| ad |)) - (M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |)) + Integer.U64, + BinOp.Panic.shr (| M.read (| bd |), M.of_value (| 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 (| bc |)) - (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 Integer.U64 1, Value.Integer Integer.I32 31 |) + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 31 |) + |) |) |) in 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 Integer.I32 32 |) + BinOp.Panic.shr (| M.read (| ad |), M.of_value (| Value.Integer 32 |) |) |), - BinOp.Panic.shr (| M.read (| bc |), Value.Integer Integer.I32 32 |) + BinOp.Panic.shr (| M.read (| bc |), M.of_value (| Value.Integer 32 |) |) |), - BinOp.Panic.shr (| M.read (| tmp |), Value.Integer Integer.I32 32 |) + BinOp.Panic.shr (| M.read (| tmp |), M.of_value (| Value.Integer 32 |) |) |) |) in let e := M.alloc (| BinOp.Panic.add (| + Integer.I16, BinOp.Panic.add (| + Integer.I16, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -234,13 +255,15 @@ Module num. |) |) |), - Value.Integer Integer.I16 64 + M.of_value (| Value.Integer 64 |) |) |) in M.alloc (| - Value.StructRecord - "core::num::diy_float::Fp" - [ ("f", M.read (| f |)); ("e", M.read (| e |)) ] + M.of_value (| + Value.StructRecord + "core::num::diy_float::Fp" + [ ("f", A.to_value (M.read (| f |))); ("e", A.to_value (M.read (| e |))) ] + |) |) |))) | _, _ => M.impossible @@ -280,7 +303,7 @@ Module num. Fp { f, e } } *) - Definition normalize (τ : list Ty.t) (α : list Value.t) : M := + Definition normalize (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -304,22 +327,24 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| f |), BinOp.Panic.sub (| - Value.Integer Integer.I32 64, - Value.Integer Integer.I32 32 + Integer.I32, + M.of_value (| Value.Integer 64 |), + M.of_value (| Value.Integer 32 |) |) - |)) - (Value.Integer Integer.U64 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -327,36 +352,42 @@ Module num. let β := f in M.write (| β, - BinOp.Panic.shl (| M.read (| β |), Value.Integer Integer.I32 32 |) + BinOp.Panic.shl (| M.read (| β |), M.of_value (| Value.Integer 32 |) |) |) in let _ := let β := e in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.I16 32 |) + BinOp.Panic.sub (| + Integer.I16, + M.read (| β |), + M.of_value (| Value.Integer 32 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| f |), BinOp.Panic.sub (| - Value.Integer Integer.I32 64, - Value.Integer Integer.I32 16 + Integer.I32, + M.of_value (| Value.Integer 64 |), + M.of_value (| Value.Integer 16 |) |) - |)) - (Value.Integer Integer.U64 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -364,36 +395,42 @@ Module num. let β := f in M.write (| β, - BinOp.Panic.shl (| M.read (| β |), Value.Integer Integer.I32 16 |) + BinOp.Panic.shl (| M.read (| β |), M.of_value (| Value.Integer 16 |) |) |) in let _ := let β := e in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.I16 16 |) + BinOp.Panic.sub (| + Integer.I16, + M.read (| β |), + M.of_value (| Value.Integer 16 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| f |), BinOp.Panic.sub (| - Value.Integer Integer.I32 64, - Value.Integer Integer.I32 8 + Integer.I32, + M.of_value (| Value.Integer 64 |), + M.of_value (| Value.Integer 8 |) |) - |)) - (Value.Integer Integer.U64 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -401,36 +438,42 @@ Module num. let β := f in M.write (| β, - BinOp.Panic.shl (| M.read (| β |), Value.Integer Integer.I32 8 |) + BinOp.Panic.shl (| M.read (| β |), M.of_value (| Value.Integer 8 |) |) |) in let _ := let β := e in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.I16 8 |) + BinOp.Panic.sub (| + Integer.I16, + M.read (| β |), + M.of_value (| Value.Integer 8 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| f |), BinOp.Panic.sub (| - Value.Integer Integer.I32 64, - Value.Integer Integer.I32 4 + Integer.I32, + M.of_value (| Value.Integer 64 |), + M.of_value (| Value.Integer 4 |) |) - |)) - (Value.Integer Integer.U64 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -438,36 +481,42 @@ Module num. let β := f in M.write (| β, - BinOp.Panic.shl (| M.read (| β |), Value.Integer Integer.I32 4 |) + BinOp.Panic.shl (| M.read (| β |), M.of_value (| Value.Integer 4 |) |) |) in let _ := let β := e in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.I16 4 |) + BinOp.Panic.sub (| + Integer.I16, + M.read (| β |), + M.of_value (| Value.Integer 4 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| f |), BinOp.Panic.sub (| - Value.Integer Integer.I32 64, - Value.Integer Integer.I32 2 + Integer.I32, + M.of_value (| Value.Integer 64 |), + M.of_value (| Value.Integer 2 |) |) - |)) - (Value.Integer Integer.U64 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -475,36 +524,42 @@ Module num. let β := f in M.write (| β, - BinOp.Panic.shl (| M.read (| β |), Value.Integer Integer.I32 2 |) + BinOp.Panic.shl (| M.read (| β |), M.of_value (| Value.Integer 2 |) |) |) in let _ := let β := e in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.I16 2 |) + BinOp.Panic.sub (| + Integer.I16, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.shr (| + BinOp.Pure.eq (| + BinOp.Panic.shr (| M.read (| f |), BinOp.Panic.sub (| - Value.Integer Integer.I32 64, - Value.Integer Integer.I32 1 + Integer.I32, + M.of_value (| Value.Integer 64 |), + M.of_value (| Value.Integer 1 |) |) - |)) - (Value.Integer Integer.U64 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -512,43 +567,49 @@ Module num. let β := f in M.write (| β, - BinOp.Panic.shl (| M.read (| β |), Value.Integer Integer.I32 1 |) + BinOp.Panic.shl (| M.read (| β |), M.of_value (| Value.Integer 1 |) |) |) in let _ := let β := e in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.I16 1 |) + BinOp.Panic.sub (| + Integer.I16, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.read (| f |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, - Value.Integer Integer.I32 63 - |))) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| f |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 63 |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -561,23 +622,28 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: f >= (1 << 63)" + M.of_value (| + Value.String "assertion failed: f >= (1 << 63)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::num::diy_float::Fp" - [ ("f", M.read (| f |)); ("e", M.read (| e |)) ] + M.of_value (| + Value.StructRecord + "core::num::diy_float::Fp" + [ ("f", A.to_value (M.read (| f |))); ("e", A.to_value (M.read (| e |))) ] + |) |) |))) | _, _ => M.impossible @@ -594,7 +660,7 @@ Module num. Fp { f: self.f << edelta, e } } *) - Definition normalize_to (τ : list Ty.t) (α : list Value.t) : M := + Definition normalize_to (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; e ] => ltac:(M.monadic @@ -604,6 +670,7 @@ Module num. let edelta := M.alloc (| BinOp.Panic.sub (| + Integer.I16, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -616,15 +683,19 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| edelta |)) (Value.Integer Integer.I16 0)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| edelta |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -632,40 +703,48 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: edelta >= 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: edelta >= 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let edelta := M.alloc (| M.rust_cast (M.read (| edelta |)) |) in + 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 (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::diy_float::Fp", - "f" - |) - |), - M.read (| edelta |) - |), - M.read (| edelta |) - |) - |); - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::diy_float::Fp", - "f" - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + BinOp.Panic.shr (| + BinOp.Panic.shl (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::diy_float::Fp", + "f" + |) + |), + M.read (| edelta |) + |), + M.read (| edelta |) + |) + |)); + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::diy_float::Fp", + "f" + |)) + ] + |) |), [ fun γ => @@ -675,17 +754,19 @@ Module num. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -697,7 +778,9 @@ Module num. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -709,35 +792,41 @@ Module num. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in M.alloc (| - Value.StructRecord - "core::num::diy_float::Fp" - [ - ("f", - BinOp.Panic.shl (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::diy_float::Fp", - "f" - |) - |), - M.read (| edelta |) - |)); - ("e", M.read (| e |)) - ] + M.of_value (| + Value.StructRecord + "core::num::diy_float::Fp" + [ + ("f", + A.to_value + (BinOp.Panic.shl (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::diy_float::Fp", + "f" + |) + |), + M.read (| edelta |) + |))); + ("e", A.to_value (M.read (| e |))) + ] + |) |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/num/error.v b/CoqOfRust/core/num/error.v index bcf816c69..d11859d8a 100644 --- a/CoqOfRust/core/num/error.v +++ b/CoqOfRust/core/num/error.v @@ -14,7 +14,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::TryFromIntError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -28,16 +28,17 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "TryFromIntError" |); + M.read (| M.of_value (| Value.String "TryFromIntError" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::error::TryFromIntError", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -66,14 +67,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::TryFromIntError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -103,7 +104,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::TryFromIntError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -156,15 +157,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::TryFromIntError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -188,7 +189,7 @@ Module num. self.description().fmt(fmt) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -229,12 +230,14 @@ Module num. "out of range integral type conversion attempted" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "out of range integral type conversion attempted" |))) + M.read (| + M.of_value (| Value.String "out of range integral type conversion attempted" |) + |))) | _, _ => M.impossible end. @@ -254,7 +257,7 @@ Module num. match x {} } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -282,7 +285,7 @@ Module num. match never {} } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ never ] => ltac:(M.monadic @@ -310,7 +313,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::ParseIntError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -324,17 +327,18 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "ParseIntError" |); - M.read (| Value.String "kind" |); + M.read (| M.of_value (| Value.String "ParseIntError" |) |); + M.read (| M.of_value (| Value.String "kind" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::error::ParseIntError", "kind" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -352,32 +356,35 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::ParseIntError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::num::error::IntErrorKind", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::error::ParseIntError", - "kind" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::num::error::IntErrorKind", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::error::ParseIntError", + "kind" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -404,7 +411,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::ParseIntError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -457,15 +464,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::ParseIntError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -519,7 +526,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::IntErrorKind". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -536,23 +543,23 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Empty" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Empty" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "InvalidDigit" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "InvalidDigit" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "PosOverflow" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "PosOverflow" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "NegOverflow" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "NegOverflow" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Zero" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Zero" |) |) |))) ] |) |) @@ -573,7 +580,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::IntErrorKind". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -585,29 +592,41 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::num::error::IntErrorKind::Empty" [] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Empty" [] + |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple "core::num::error::IntErrorKind::InvalidDigit" [] + M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::InvalidDigit" [] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple "core::num::error::IntErrorKind::PosOverflow" [] + M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::PosOverflow" [] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple "core::num::error::IntErrorKind::NegOverflow" [] + M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::NegOverflow" [] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::num::error::IntErrorKind::Zero" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::num::error::IntErrorKind::Zero" [] |) + |))) ] |) |))) @@ -637,7 +656,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::IntErrorKind". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -664,7 +683,7 @@ Module num. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -692,12 +711,12 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::error::IntErrorKind". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -718,7 +737,7 @@ Module num. &self.kind } *) - Definition kind (τ : list Ty.t) (α : list Value.t) : M := + Definition kind (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -743,7 +762,7 @@ Module num. self.description().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -790,7 +809,7 @@ Module num. } } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -806,25 +825,35 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "cannot parse integer from empty string" |) + M.read (| + M.of_value (| Value.String "cannot parse integer from empty string" |) + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid digit found in string" |) |))); + (M.alloc (| + M.read (| M.of_value (| Value.String "invalid digit found in string" |) |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "number too large to fit in target type" |) + M.read (| + M.of_value (| Value.String "number too large to fit in target type" |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "number too small to fit in target type" |) + M.read (| + M.of_value (| Value.String "number too small to fit in target type" |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "number would be zero for non-zero type" |) + M.read (| + M.of_value (| 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 808306d7d..f179502a9 100644 --- a/CoqOfRust/core/num/f32.v +++ b/CoqOfRust/core/num/f32.v @@ -2,93 +2,103 @@ Require Import CoqOfRust.CoqOfRust. Module f32. - Definition value_RADIX : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::f32::RADIX" |))). + Definition value_RADIX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::RADIX" |))). - Definition value_MANTISSA_DIGITS : Value.t := + Definition value_MANTISSA_DIGITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MANTISSA_DIGITS" |))). - Definition value_DIGITS : Value.t := + Definition value_DIGITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::DIGITS" |))). - Definition value_EPSILON : Value.t := + Definition value_EPSILON : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::EPSILON" |))). - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MIN" |))). - Definition value_MIN_POSITIVE : Value.t := + Definition value_MIN_POSITIVE : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MIN_POSITIVE" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MAX" |))). - Definition value_MIN_EXP : Value.t := + Definition value_MIN_EXP : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MIN_EXP" |))). - Definition value_MAX_EXP : Value.t := + Definition value_MAX_EXP : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MAX_EXP" |))). - Definition value_MIN_10_EXP : Value.t := + Definition value_MIN_10_EXP : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MIN_10_EXP" |))). - Definition value_MAX_10_EXP : Value.t := + Definition value_MAX_10_EXP : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::MAX_10_EXP" |))). - Definition value_NAN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::NAN" |))). + Definition value_NAN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::NAN" |))). - Definition value_INFINITY : Value.t := + Definition value_INFINITY : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::INFINITY" |))). - Definition value_NEG_INFINITY : Value.t := + Definition value_NEG_INFINITY : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f32::NEG_INFINITY" |))). Module consts. - Definition value_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_PI : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_TAU : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_TAU : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_PHI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_PHI : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_EGAMMA : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_EGAMMA : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_2 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_3 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_3 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_4 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_4 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_6 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_6 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_8 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_8 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_1_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_1_PI : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_1_SQRT_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_1_SQRT_PI : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_2_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_2_PI : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_2_SQRT_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_2_SQRT_PI : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_SQRT_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_SQRT_2 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_1_SQRT_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_1_SQRT_2 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_SQRT_3 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_SQRT_3 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_1_SQRT_3 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_1_SQRT_3 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_E : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_E : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LOG2_E : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LOG2_E : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LOG2_10 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LOG2_10 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LOG10_E : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LOG10_E : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LOG10_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LOG10_2 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LN_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LN_2 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LN_10 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LN_10 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). End consts. Module Impl_f32. @@ -96,102 +106,111 @@ Module f32. (* pub const RADIX: u32 = 2; *) (* Ty.path "u32" *) - Definition value_RADIX : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 2 |))). + Definition value_RADIX : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))). Axiom AssociatedConstant_value_RADIX : M.IsAssociatedConstant Self "value_RADIX" value_RADIX. (* pub const MANTISSA_DIGITS: u32 = 24; *) (* Ty.path "u32" *) - Definition value_MANTISSA_DIGITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 24 |))). + Definition value_MANTISSA_DIGITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 24 |) |))). Axiom AssociatedConstant_value_MANTISSA_DIGITS : M.IsAssociatedConstant Self "value_MANTISSA_DIGITS" value_MANTISSA_DIGITS. (* pub const DIGITS: u32 = 6; *) (* Ty.path "u32" *) - Definition value_DIGITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 6 |))). + Definition value_DIGITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 6 |) |))). Axiom AssociatedConstant_value_DIGITS : M.IsAssociatedConstant Self "value_DIGITS" value_DIGITS. (* pub const EPSILON: f32 = 1.19209290e-07_f32; *) (* Ty.path "f32" *) - Definition value_EPSILON : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_EPSILON : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). Axiom AssociatedConstant_value_EPSILON : M.IsAssociatedConstant Self "value_EPSILON" value_EPSILON. (* pub const MIN: f32 = -3.40282347e+38_f32; *) (* Ty.path "f32" *) - Definition value_MIN : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MIN_POSITIVE: f32 = 1.17549435e-38_f32; *) (* Ty.path "f32" *) - Definition value_MIN_POSITIVE : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_MIN_POSITIVE : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). Axiom AssociatedConstant_value_MIN_POSITIVE : M.IsAssociatedConstant Self "value_MIN_POSITIVE" value_MIN_POSITIVE. (* pub const MAX: f32 = 3.40282347e+38_f32; *) (* Ty.path "f32" *) - Definition value_MAX : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const MIN_EXP: i32 = -125; *) (* Ty.path "i32" *) - Definition value_MIN_EXP : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-125) |))). + Definition value_MIN_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-125) |) |))). Axiom AssociatedConstant_value_MIN_EXP : M.IsAssociatedConstant Self "value_MIN_EXP" value_MIN_EXP. (* pub const MAX_EXP: i32 = 128; *) (* Ty.path "i32" *) - Definition value_MAX_EXP : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 128 |))). + Definition value_MAX_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 128 |) |))). Axiom AssociatedConstant_value_MAX_EXP : M.IsAssociatedConstant Self "value_MAX_EXP" value_MAX_EXP. (* pub const MIN_10_EXP: i32 = -37; *) (* Ty.path "i32" *) - Definition value_MIN_10_EXP : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-37) |))). + Definition value_MIN_10_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-37) |) |))). Axiom AssociatedConstant_value_MIN_10_EXP : M.IsAssociatedConstant Self "value_MIN_10_EXP" value_MIN_10_EXP. (* pub const MAX_10_EXP: i32 = 38; *) (* Ty.path "i32" *) - Definition value_MAX_10_EXP : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 38 |))). + Definition value_MAX_10_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 38 |) |))). Axiom AssociatedConstant_value_MAX_10_EXP : M.IsAssociatedConstant Self "value_MAX_10_EXP" value_MAX_10_EXP. (* pub const NAN: f32 = 0.0_f32 / 0.0_f32; *) (* Ty.path "f32" *) - Definition value_NAN : Value.t := + Definition value_NAN : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| M.read (| UnsupportedLiteral |), M.read (| UnsupportedLiteral |) |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |))). Axiom AssociatedConstant_value_NAN : M.IsAssociatedConstant Self "value_NAN" value_NAN. (* pub const INFINITY: f32 = 1.0_f32 / 0.0_f32; *) (* Ty.path "f32" *) - Definition value_INFINITY : Value.t := + Definition value_INFINITY : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| M.read (| UnsupportedLiteral |), M.read (| UnsupportedLiteral |) |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |))). Axiom AssociatedConstant_value_INFINITY : @@ -199,11 +218,15 @@ Module f32. (* pub const NEG_INFINITY: f32 = -1.0_f32 / 0.0_f32; *) (* Ty.path "f32" *) - Definition value_NEG_INFINITY : Value.t := + Definition value_NEG_INFINITY : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| M.read (| UnsupportedLiteral |), M.read (| UnsupportedLiteral |) |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |))). Axiom AssociatedConstant_value_NEG_INFINITY : @@ -214,12 +237,12 @@ Module f32. self != self } *) - Definition is_nan (τ : list Ty.t) (α : list Value.t) : M := + Definition is_nan (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne (M.read (| self |)) (M.read (| self |)))) + BinOp.Pure.ne (| M.read (| self |), M.read (| self |) |))) | _, _ => M.impossible end. @@ -231,7 +254,7 @@ Module f32. unsafe { mem::transmute::(mem::transmute::(self) & 0x7fff_ffff) } } *) - Definition abs_private (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_private (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -239,15 +262,16 @@ Module f32. M.call_closure (| M.get_function (| "core::intrinsics::transmute", [ Ty.path "u32"; Ty.path "f32" ] |), [ - BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_function (| "core::intrinsics::transmute", [ Ty.path "f32"; Ty.path "u32" ] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U32 2147483647) + |), + M.of_value (| Value.Integer 2147483647 |) + |) ] |))) | _, _ => M.impossible @@ -263,18 +287,21 @@ Module f32. (self == f32::INFINITY) | (self == f32::NEG_INFINITY) } *) - Definition is_infinite (τ : list Ty.t) (α : list Value.t) : M := + Definition is_infinite (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_or - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::f32::INFINITY" |) |))) - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::f32::NEG_INFINITY" |) |))))) + BinOp.Pure.bit_or (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::f32::INFINITY" |) |) + |), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::f32::NEG_INFINITY" |) |) + |) + |))) | _, _ => M.impossible end. @@ -287,17 +314,18 @@ Module f32. self.abs_private() < Self::INFINITY } *) - Definition is_finite (τ : list Ty.t) (α : list Value.t) : M := + Definition is_finite (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.path "f32", "abs_private", [] |), [ M.read (| self |) ] - |)) - (M.read (| M.get_constant (| "core::f32::INFINITY" |) |)))) + |), + M.read (| M.get_constant (| "core::f32::INFINITY" |) |) + |))) | _, _ => M.impossible end. @@ -308,7 +336,7 @@ Module f32. matches!(self.classify(), FpCategory::Subnormal) } *) - Definition is_subnormal (τ : list Ty.t) (α : list Value.t) : M := + Definition is_subnormal (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -322,8 +350,8 @@ Module f32. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -337,7 +365,7 @@ Module f32. matches!(self.classify(), FpCategory::Normal) } *) - Definition is_normal (τ : list Ty.t) (α : list Value.t) : M := + Definition is_normal (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -351,8 +379,8 @@ Module f32. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -394,14 +422,14 @@ Module f32. } } *) - Definition classify (τ : list Ty.t) (α : list Value.t) : M := + Definition classify (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -414,11 +442,13 @@ Module f32. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Infinite" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Infinite" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -432,7 +462,9 @@ Module f32. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Nan" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Nan" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -469,7 +501,7 @@ Module f32. } } *) - Definition partial_classify (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_classify (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -487,15 +519,21 @@ Module f32. |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - BinOp.Pure.bit_and - (M.read (| b |)) - (M.read (| M.get_constant (| "core::f32::partial_classify::MAN_MASK" |) |)); - BinOp.Pure.bit_and - (M.read (| b |)) - (M.read (| M.get_constant (| "core::f32::partial_classify::EXP_MASK" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| b |), + M.read (| M.get_constant (| "core::f32::partial_classify::MAN_MASK" |) |) + |)); + A.to_value + (BinOp.Pure.bit_and (| + M.read (| b |), + M.read (| M.get_constant (| "core::f32::partial_classify::EXP_MASK" |) |) + |)) + ] + |) |), [ fun γ => @@ -503,29 +541,26 @@ Module f32. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U32 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U32 0 - |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Zero" [] |))); + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Zero" [] |) + |))); 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_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U32 0 - |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Subnormal" [] |))); + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Subnormal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::num::FpCategory::Normal" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Normal" [] |) + |))) ] |) |))) @@ -549,7 +584,7 @@ Module f32. } } *) - Definition classify_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition classify_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic @@ -557,15 +592,21 @@ Module f32. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - BinOp.Pure.bit_and - (M.read (| b |)) - (M.read (| M.get_constant (| "core::f32::classify_bits::MAN_MASK" |) |)); - BinOp.Pure.bit_and - (M.read (| b |)) - (M.read (| M.get_constant (| "core::f32::classify_bits::EXP_MASK" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| b |), + M.read (| M.get_constant (| "core::f32::classify_bits::MAN_MASK" |) |) + |)); + A.to_value + (BinOp.Pure.bit_and (| + M.read (| b |), + M.read (| M.get_constant (| "core::f32::classify_bits::EXP_MASK" |) |) + |)) + ] + |) |), [ fun γ => @@ -573,16 +614,15 @@ Module f32. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U32 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U32 2139095040 + Value.Integer 2139095040 |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Infinite" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Infinite" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -590,37 +630,36 @@ Module f32. let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U32 2139095040 + Value.Integer 2139095040 |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Nan" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Nan" [] |) + |))); 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_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U32 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U32 0 - |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Zero" [] |))); + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Zero" [] |) + |))); 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_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U32 0 - |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Subnormal" [] |))); + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Subnormal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::num::FpCategory::Normal" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Normal" [] |) + |))) ] |) |))) @@ -635,16 +674,17 @@ Module f32. !self.is_sign_negative() } *) - Definition is_sign_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sign_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "f32", "is_sign_negative", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -659,22 +699,24 @@ Module f32. unsafe { mem::transmute::(self) & 0x8000_0000 != 0 } } *) - Definition is_sign_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sign_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_function (| "core::intrinsics::transmute", [ Ty.path "f32"; Ty.path "u32" ] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U32 2147483648)) - (Value.Integer Integer.U32 0))) + |), + M.of_value (| Value.Integer 2147483648 |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -704,7 +746,7 @@ Module f32. Self::from_bits(next_bits) } *) - Definition next_up (τ : list Ty.t) (α : list Value.t) : M := + Definition next_up (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -721,7 +763,7 @@ Module f32. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -734,16 +776,17 @@ Module f32. [ M.read (| self |) ] |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| bits |)) - (M.call_closure (| + (BinOp.Pure.eq (| + M.read (| bits |), + M.call_closure (| M.get_associated_function (| Ty.path "f32", "to_bits", [] |), [ M.read (| M.get_constant (| "core::f32::INFINITY" |) |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -751,26 +794,30 @@ Module f32. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let abs := M.alloc (| - BinOp.Pure.bit_and - (M.read (| bits |)) - (M.read (| M.get_constant (| "core::f32::next_up::CLEAR_SIGN_MASK" |) |)) + BinOp.Pure.bit_and (| + M.read (| bits |), + M.read (| M.get_constant (| "core::f32::next_up::CLEAR_SIGN_MASK" |) |) + |) |) in let next_bits := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| abs |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| abs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -778,14 +825,14 @@ Module f32. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| bits |)) (M.read (| abs |)) + BinOp.Pure.eq (| M.read (| bits |), M.read (| abs |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -794,16 +841,18 @@ Module f32. |) in M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| bits |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| + Integer.U32, M.read (| bits |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -847,7 +896,7 @@ Module f32. Self::from_bits(next_bits) } *) - Definition next_down (τ : list Ty.t) (α : list Value.t) : M := + Definition next_down (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -864,7 +913,7 @@ Module f32. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -877,9 +926,9 @@ Module f32. [ M.read (| self |) ] |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| bits |)) - (M.call_closure (| + (BinOp.Pure.eq (| + M.read (| bits |), + M.call_closure (| M.get_associated_function (| Ty.path "f32", "to_bits", @@ -890,7 +939,8 @@ Module f32. M.get_constant (| "core::f32::NEG_INFINITY" |) |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -898,26 +948,30 @@ Module f32. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let abs := M.alloc (| - BinOp.Pure.bit_and - (M.read (| bits |)) - (M.read (| M.get_constant (| "core::f32::next_down::CLEAR_SIGN_MASK" |) |)) + BinOp.Pure.bit_and (| + M.read (| bits |), + M.read (| M.get_constant (| "core::f32::next_down::CLEAR_SIGN_MASK" |) |) + |) |) in let next_bits := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| abs |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| abs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -925,14 +979,14 @@ Module f32. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| bits |)) (M.read (| abs |)) + BinOp.Pure.eq (| M.read (| bits |), M.read (| abs |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -941,16 +995,18 @@ Module f32. |) in M.alloc (| BinOp.Panic.sub (| + Integer.U32, M.read (| bits |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| bits |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -976,12 +1032,16 @@ Module f32. 1.0 / self } *) - Definition recip (τ : list Ty.t) (α : list Value.t) : M := + Definition recip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.div (| M.read (| UnsupportedLiteral |), M.read (| self |) |))) + BinOp.Panic.div (| + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| self |) + |))) | _, _ => M.impossible end. @@ -994,12 +1054,13 @@ Module f32. self * PIS_IN_180 } *) - Definition to_degrees (τ : list Ty.t) (α : list Value.t) : M := + Definition to_degrees (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ 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" |) |) |))) @@ -1014,7 +1075,7 @@ Module f32. self * (value / 180.0f32) } *) - Definition to_radians (τ : list Ty.t) (α : list Value.t) : M := + Definition to_radians (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1023,8 +1084,13 @@ Module f32. 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 (| M.read (| value |), M.read (| UnsupportedLiteral |) |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| value |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |) |) |))) @@ -1038,7 +1104,7 @@ Module f32. intrinsics::maxnumf32(self, other) } *) - Definition max (τ : list Ty.t) (α : list Value.t) : M := + Definition max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1058,7 +1124,7 @@ Module f32. intrinsics::minnumf32(self, other) } *) - Definition min (τ : list Ty.t) (α : list Value.t) : M := + Definition min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1086,7 +1152,7 @@ Module f32. } } *) - Definition maximum (τ : list Ty.t) (α : list Value.t) : M := + Definition maximum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1094,26 +1160,26 @@ Module f32. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.gt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in self)); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| other |)) (M.read (| self |)) + BinOp.Pure.gt (| M.read (| other |), M.read (| self |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1121,14 +1187,14 @@ Module f32. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.eq (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1136,7 +1202,7 @@ Module f32. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1175,7 +1241,11 @@ Module f32. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -1203,7 +1273,7 @@ Module f32. } } *) - Definition minimum (τ : list Ty.t) (α : list Value.t) : M := + Definition minimum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1211,26 +1281,26 @@ Module f32. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in self)); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| other |)) (M.read (| self |)) + BinOp.Pure.lt (| M.read (| other |), M.read (| self |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1238,14 +1308,14 @@ Module f32. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.eq (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1253,7 +1323,7 @@ Module f32. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1292,7 +1362,11 @@ Module f32. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -1330,7 +1404,7 @@ Module f32. } } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1338,7 +1412,11 @@ Module f32. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -1361,7 +1439,7 @@ Module f32. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1369,40 +1447,42 @@ Module f32. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (M.read (| abs_a |)) - (M.read (| M.get_constant (| "core::f32::midpoint::HI" |) |)), + BinOp.Pure.le (| + M.read (| abs_a |), + M.read (| M.get_constant (| "core::f32::midpoint::HI" |) |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| abs_b |)) - (M.read (| - M.get_constant (| "core::f32::midpoint::HI" |) - |)))) + (BinOp.Pure.le (| + M.read (| abs_b |), + M.read (| M.get_constant (| "core::f32::midpoint::HI" |) |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| BinOp.Panic.div (| - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |), - M.read (| UnsupportedLiteral |) + Integer.Usize, + BinOp.Panic.add (| Integer.Usize, M.read (| a |), M.read (| b |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| abs_a |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| abs_a |), + M.read (| M.get_constant (| "core::f32::midpoint::LO" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1411,28 +1491,31 @@ Module f32. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| a |), BinOp.Panic.div (| + Integer.Usize, M.read (| b |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| abs_b |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| abs_b |), + M.read (| M.get_constant (| "core::f32::midpoint::LO" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1441,9 +1524,11 @@ Module f32. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.div (| + Integer.Usize, M.read (| a |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |), M.read (| b |) |) @@ -1452,13 +1537,16 @@ Module f32. ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.div (| + Integer.Usize, M.read (| a |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |), BinOp.Panic.div (| + Integer.Usize, M.read (| b |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |))) @@ -1486,7 +1574,7 @@ Module f32. unsafe { FloatToInt::::to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Int ], [ self ] => ltac:(M.monadic @@ -1558,7 +1646,7 @@ Module f32. unsafe { intrinsics::const_eval_select((self,), ct_f32_to_u32, rt_f32_to_u32) } } *) - Definition to_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition to_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1574,7 +1662,7 @@ Module f32. ] |), [ - Value.Tuple [ M.read (| self |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |); M.get_associated_function (| Self, "ct_f32_to_u32.to_bits", [] |); M.get_associated_function (| Self, "rt_f32_to_u32.to_bits", [] |) ] @@ -1637,7 +1725,7 @@ Module f32. unsafe { intrinsics::const_eval_select((v,), ct_u32_to_f32, rt_u32_to_f32) } } *) - Definition from_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition from_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -1653,7 +1741,7 @@ Module f32. ] |), [ - Value.Tuple [ M.read (| v |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| v |)) ] |); M.get_associated_function (| Self, "ct_u32_to_f32.from_bits", [] |); M.get_associated_function (| Self, "rt_u32_to_f32.from_bits", [] |) ] @@ -1668,7 +1756,7 @@ Module f32. self.to_bits().to_be_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1692,7 +1780,7 @@ Module f32. self.to_bits().to_le_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1716,7 +1804,7 @@ Module f32. self.to_bits().to_ne_bytes() } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1740,7 +1828,7 @@ Module f32. Self::from_bits(u32::from_be_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1765,7 +1853,7 @@ Module f32. Self::from_bits(u32::from_le_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1790,7 +1878,7 @@ Module f32. Self::from_bits(u32::from_ne_bytes(bytes)) } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1843,7 +1931,7 @@ Module f32. left.cmp(&right) } *) - Definition total_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition total_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1852,45 +1940,53 @@ Module f32. M.read (| let left := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "f32", "to_bits", [] |), [ M.read (| M.read (| self |) |) ] - |)) + |) + |) |) in let right := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "f32", "to_bits", [] |), [ M.read (| M.read (| other |) |) ] - |)) + |) + |) |) in 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 Integer.I32 31 |)), - Value.Integer Integer.I32 1 - |))) + BinOp.Pure.bit_xor (| + M.read (| β |), + M.rust_cast (| + BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| left |), M.of_value (| Value.Integer 31 |) |) + |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) |) in 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 Integer.I32 31 |)), - Value.Integer Integer.I32 1 - |))) + BinOp.Pure.bit_xor (| + M.read (| β |), + M.rust_cast (| + BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| right |), M.of_value (| Value.Integer 31 |) |) + |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1916,7 +2012,7 @@ Module f32. self } *) - Definition clamp (τ : list Ty.t) (α : list Value.t) : M := + Definition clamp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; min; max ] => ltac:(M.monadic @@ -1926,14 +2022,16 @@ Module f32. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (BinOp.Pure.le (M.read (| min |)) (M.read (| max |))) + UnOp.Pure.not (| + BinOp.Pure.le (| M.read (| min |), M.read (| max |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1949,76 +2047,91 @@ Module f32. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "min > max, or either was NaN. min = " - |); - M.read (| Value.String ", max = " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "min > max, or either was NaN. min = " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", max = " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f32" ] - |), - [ min ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f32" ] - |), - [ max ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f32" ] + |), + [ min ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f32" ] + |), + [ max ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| min |)) |)) in + (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 - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| self |)) (M.read (| max |)) |)) in + (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 - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in self diff --git a/CoqOfRust/core/num/f64.v b/CoqOfRust/core/num/f64.v index 379e817e3..f9c76d5d2 100644 --- a/CoqOfRust/core/num/f64.v +++ b/CoqOfRust/core/num/f64.v @@ -2,93 +2,103 @@ Require Import CoqOfRust.CoqOfRust. Module f64. - Definition value_RADIX : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::f64::RADIX" |))). + Definition value_RADIX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::RADIX" |))). - Definition value_MANTISSA_DIGITS : Value.t := + Definition value_MANTISSA_DIGITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MANTISSA_DIGITS" |))). - Definition value_DIGITS : Value.t := + Definition value_DIGITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::DIGITS" |))). - Definition value_EPSILON : Value.t := + Definition value_EPSILON : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::EPSILON" |))). - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MIN" |))). - Definition value_MIN_POSITIVE : Value.t := + Definition value_MIN_POSITIVE : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MIN_POSITIVE" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MAX" |))). - Definition value_MIN_EXP : Value.t := + Definition value_MIN_EXP : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MIN_EXP" |))). - Definition value_MAX_EXP : Value.t := + Definition value_MAX_EXP : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MAX_EXP" |))). - Definition value_MIN_10_EXP : Value.t := + Definition value_MIN_10_EXP : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MIN_10_EXP" |))). - Definition value_MAX_10_EXP : Value.t := + Definition value_MAX_10_EXP : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::MAX_10_EXP" |))). - Definition value_NAN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::NAN" |))). + Definition value_NAN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::NAN" |))). - Definition value_INFINITY : Value.t := + Definition value_INFINITY : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::INFINITY" |))). - Definition value_NEG_INFINITY : Value.t := + Definition value_NEG_INFINITY : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::f64::NEG_INFINITY" |))). Module consts. - Definition value_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_PI : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_TAU : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_TAU : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_PHI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_PHI : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_EGAMMA : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_EGAMMA : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_2 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_3 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_3 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_4 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_4 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_6 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_6 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_PI_8 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_PI_8 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_1_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_1_PI : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_1_SQRT_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_1_SQRT_PI : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_2_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_2_PI : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_2_SQRT_PI : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_2_SQRT_PI : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_SQRT_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_SQRT_2 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_1_SQRT_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_1_SQRT_2 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_SQRT_3 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_SQRT_3 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_FRAC_1_SQRT_3 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_FRAC_1_SQRT_3 : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_E : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_E : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LOG2_10 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LOG2_10 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LOG2_E : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LOG2_E : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LOG10_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LOG10_2 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LOG10_E : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LOG10_E : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LN_2 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LN_2 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). - Definition value_LN_10 : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_LN_10 : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). End consts. Module Impl_f64. @@ -96,102 +106,111 @@ Module f64. (* pub const RADIX: u32 = 2; *) (* Ty.path "u32" *) - Definition value_RADIX : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 2 |))). + Definition value_RADIX : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))). Axiom AssociatedConstant_value_RADIX : M.IsAssociatedConstant Self "value_RADIX" value_RADIX. (* pub const MANTISSA_DIGITS: u32 = 53; *) (* Ty.path "u32" *) - Definition value_MANTISSA_DIGITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 53 |))). + Definition value_MANTISSA_DIGITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 53 |) |))). Axiom AssociatedConstant_value_MANTISSA_DIGITS : M.IsAssociatedConstant Self "value_MANTISSA_DIGITS" value_MANTISSA_DIGITS. (* pub const DIGITS: u32 = 15; *) (* Ty.path "u32" *) - Definition value_DIGITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 15 |))). + Definition value_DIGITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 15 |) |))). Axiom AssociatedConstant_value_DIGITS : M.IsAssociatedConstant Self "value_DIGITS" value_DIGITS. (* pub const EPSILON: f64 = 2.2204460492503131e-16_f64; *) (* Ty.path "f64" *) - Definition value_EPSILON : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_EPSILON : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). Axiom AssociatedConstant_value_EPSILON : M.IsAssociatedConstant Self "value_EPSILON" value_EPSILON. (* pub const MIN: f64 = -1.7976931348623157e+308_f64; *) (* Ty.path "f64" *) - Definition value_MIN : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MIN_POSITIVE: f64 = 2.2250738585072014e-308_f64; *) (* Ty.path "f64" *) - Definition value_MIN_POSITIVE : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_MIN_POSITIVE : A.t := + M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). Axiom AssociatedConstant_value_MIN_POSITIVE : M.IsAssociatedConstant Self "value_MIN_POSITIVE" value_MIN_POSITIVE. (* pub const MAX: f64 = 1.7976931348623157e+308_f64; *) (* Ty.path "f64" *) - Definition value_MAX : Value.t := M.run ltac:(M.monadic UnsupportedLiteral). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.of_value (| UnsupportedLiteral |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const MIN_EXP: i32 = -1021; *) (* Ty.path "i32" *) - Definition value_MIN_EXP : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-1021) |))). + Definition value_MIN_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-1021) |) |))). Axiom AssociatedConstant_value_MIN_EXP : M.IsAssociatedConstant Self "value_MIN_EXP" value_MIN_EXP. (* pub const MAX_EXP: i32 = 1024; *) (* Ty.path "i32" *) - Definition value_MAX_EXP : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 1024 |))). + Definition value_MAX_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1024 |) |))). Axiom AssociatedConstant_value_MAX_EXP : M.IsAssociatedConstant Self "value_MAX_EXP" value_MAX_EXP. (* pub const MIN_10_EXP: i32 = -307; *) (* Ty.path "i32" *) - Definition value_MIN_10_EXP : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 (-307) |))). + Definition value_MIN_10_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-307) |) |))). Axiom AssociatedConstant_value_MIN_10_EXP : M.IsAssociatedConstant Self "value_MIN_10_EXP" value_MIN_10_EXP. (* pub const MAX_10_EXP: i32 = 308; *) (* Ty.path "i32" *) - Definition value_MAX_10_EXP : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 308 |))). + Definition value_MAX_10_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 308 |) |))). Axiom AssociatedConstant_value_MAX_10_EXP : M.IsAssociatedConstant Self "value_MAX_10_EXP" value_MAX_10_EXP. (* pub const NAN: f64 = 0.0_f64 / 0.0_f64; *) (* Ty.path "f64" *) - Definition value_NAN : Value.t := + Definition value_NAN : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| M.read (| UnsupportedLiteral |), M.read (| UnsupportedLiteral |) |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |))). Axiom AssociatedConstant_value_NAN : M.IsAssociatedConstant Self "value_NAN" value_NAN. (* pub const INFINITY: f64 = 1.0_f64 / 0.0_f64; *) (* Ty.path "f64" *) - Definition value_INFINITY : Value.t := + Definition value_INFINITY : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| M.read (| UnsupportedLiteral |), M.read (| UnsupportedLiteral |) |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |))). Axiom AssociatedConstant_value_INFINITY : @@ -199,11 +218,15 @@ Module f64. (* pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64; *) (* Ty.path "f64" *) - Definition value_NEG_INFINITY : Value.t := + Definition value_NEG_INFINITY : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| M.read (| UnsupportedLiteral |), M.read (| UnsupportedLiteral |) |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |))). Axiom AssociatedConstant_value_NEG_INFINITY : @@ -214,12 +237,12 @@ Module f64. self != self } *) - Definition is_nan (τ : list Ty.t) (α : list Value.t) : M := + Definition is_nan (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne (M.read (| self |)) (M.read (| self |)))) + BinOp.Pure.ne (| M.read (| self |), M.read (| self |) |))) | _, _ => M.impossible end. @@ -233,7 +256,7 @@ Module f64. } } *) - Definition abs_private (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_private (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -241,15 +264,16 @@ Module f64. M.call_closure (| M.get_function (| "core::intrinsics::transmute", [ Ty.path "u64"; Ty.path "f64" ] |), [ - BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_function (| "core::intrinsics::transmute", [ Ty.path "f64"; Ty.path "u64" ] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U64 9223372036854775807) + |), + M.of_value (| Value.Integer 9223372036854775807 |) + |) ] |))) | _, _ => M.impossible @@ -265,18 +289,21 @@ Module f64. (self == f64::INFINITY) | (self == f64::NEG_INFINITY) } *) - Definition is_infinite (τ : list Ty.t) (α : list Value.t) : M := + Definition is_infinite (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_or - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::f64::INFINITY" |) |))) - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::f64::NEG_INFINITY" |) |))))) + BinOp.Pure.bit_or (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::f64::INFINITY" |) |) + |), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::f64::NEG_INFINITY" |) |) + |) + |))) | _, _ => M.impossible end. @@ -289,17 +316,18 @@ Module f64. self.abs_private() < Self::INFINITY } *) - Definition is_finite (τ : list Ty.t) (α : list Value.t) : M := + Definition is_finite (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.path "f64", "abs_private", [] |), [ M.read (| self |) ] - |)) - (M.read (| M.get_constant (| "core::f64::INFINITY" |) |)))) + |), + M.read (| M.get_constant (| "core::f64::INFINITY" |) |) + |))) | _, _ => M.impossible end. @@ -310,7 +338,7 @@ Module f64. matches!(self.classify(), FpCategory::Subnormal) } *) - Definition is_subnormal (τ : list Ty.t) (α : list Value.t) : M := + Definition is_subnormal (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -324,8 +352,8 @@ Module f64. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -339,7 +367,7 @@ Module f64. matches!(self.classify(), FpCategory::Normal) } *) - Definition is_normal (τ : list Ty.t) (α : list Value.t) : M := + Definition is_normal (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -353,8 +381,8 @@ Module f64. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -395,14 +423,14 @@ Module f64. } } *) - Definition classify (τ : list Ty.t) (α : list Value.t) : M := + Definition classify (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -415,7 +443,9 @@ Module f64. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Nan" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Nan" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -447,7 +477,7 @@ Module f64. } } *) - Definition partial_classify (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_classify (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -465,15 +495,21 @@ Module f64. |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - BinOp.Pure.bit_and - (M.read (| b |)) - (M.read (| M.get_constant (| "core::f64::partial_classify::MAN_MASK" |) |)); - BinOp.Pure.bit_and - (M.read (| b |)) - (M.read (| M.get_constant (| "core::f64::partial_classify::EXP_MASK" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| b |), + M.read (| M.get_constant (| "core::f64::partial_classify::MAN_MASK" |) |) + |)); + A.to_value + (BinOp.Pure.bit_and (| + M.read (| b |), + M.read (| M.get_constant (| "core::f64::partial_classify::EXP_MASK" |) |) + |)) + ] + |) |), [ fun γ => @@ -481,44 +517,40 @@ Module f64. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U64 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U64 9218868437227405312 + Value.Integer 9218868437227405312 |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Infinite" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Infinite" [] |) + |))); 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_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U64 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U64 0 - |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Zero" [] |))); + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Zero" [] |) + |))); 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_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U64 0 - |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Subnormal" [] |))); + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Subnormal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::num::FpCategory::Normal" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Normal" [] |) + |))) ] |) |))) @@ -542,7 +574,7 @@ Module f64. } } *) - Definition classify_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition classify_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic @@ -550,15 +582,21 @@ Module f64. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - BinOp.Pure.bit_and - (M.read (| b |)) - (M.read (| M.get_constant (| "core::f64::classify_bits::MAN_MASK" |) |)); - BinOp.Pure.bit_and - (M.read (| b |)) - (M.read (| M.get_constant (| "core::f64::classify_bits::EXP_MASK" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| b |), + M.read (| M.get_constant (| "core::f64::classify_bits::MAN_MASK" |) |) + |)); + A.to_value + (BinOp.Pure.bit_and (| + M.read (| b |), + M.read (| M.get_constant (| "core::f64::classify_bits::EXP_MASK" |) |) + |)) + ] + |) |), [ fun γ => @@ -566,16 +604,15 @@ Module f64. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U64 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U64 9218868437227405312 + Value.Integer 9218868437227405312 |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Infinite" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Infinite" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in @@ -583,37 +620,36 @@ Module f64. let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), - Value.Integer Integer.U64 9218868437227405312 + Value.Integer 9218868437227405312 |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Nan" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Nan" [] |) + |))); 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_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U64 0 - |) in + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U64 0 - |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Zero" [] |))); + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Zero" [] |) + |))); 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_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.U64 0 - |) in - M.alloc (| Value.StructTuple "core::num::FpCategory::Subnormal" [] |))); + M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Subnormal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::num::FpCategory::Normal" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::num::FpCategory::Normal" [] |) + |))) ] |) |))) @@ -628,16 +664,17 @@ Module f64. !self.is_sign_negative() } *) - Definition is_sign_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sign_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "f64", "is_sign_negative", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -649,7 +686,7 @@ Module f64. self.is_sign_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -671,22 +708,24 @@ Module f64. unsafe { mem::transmute::(self) & 0x8000_0000_0000_0000 != 0 } } *) - Definition is_sign_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sign_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_function (| "core::intrinsics::transmute", [ Ty.path "f64"; Ty.path "u64" ] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U64 9223372036854775808)) - (Value.Integer Integer.U64 0))) + |), + M.of_value (| Value.Integer 9223372036854775808 |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -698,7 +737,7 @@ Module f64. self.is_sign_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -735,7 +774,7 @@ Module f64. Self::from_bits(next_bits) } *) - Definition next_up (τ : list Ty.t) (α : list Value.t) : M := + Definition next_up (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -752,7 +791,7 @@ Module f64. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -765,16 +804,17 @@ Module f64. [ M.read (| self |) ] |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| bits |)) - (M.call_closure (| + (BinOp.Pure.eq (| + M.read (| bits |), + M.call_closure (| M.get_associated_function (| Ty.path "f64", "to_bits", [] |), [ M.read (| M.get_constant (| "core::f64::INFINITY" |) |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -782,26 +822,30 @@ Module f64. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let abs := M.alloc (| - BinOp.Pure.bit_and - (M.read (| bits |)) - (M.read (| M.get_constant (| "core::f64::next_up::CLEAR_SIGN_MASK" |) |)) + BinOp.Pure.bit_and (| + M.read (| bits |), + M.read (| M.get_constant (| "core::f64::next_up::CLEAR_SIGN_MASK" |) |) + |) |) in let next_bits := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| abs |)) (Value.Integer Integer.U64 0) + BinOp.Pure.eq (| + M.read (| abs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -809,14 +853,14 @@ Module f64. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| bits |)) (M.read (| abs |)) + BinOp.Pure.eq (| M.read (| bits |), M.read (| abs |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -825,16 +869,18 @@ Module f64. |) in M.alloc (| BinOp.Panic.add (| + Integer.U64, M.read (| bits |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| + Integer.U64, M.read (| bits |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -878,7 +924,7 @@ Module f64. Self::from_bits(next_bits) } *) - Definition next_down (τ : list Ty.t) (α : list Value.t) : M := + Definition next_down (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -895,7 +941,7 @@ Module f64. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -908,9 +954,9 @@ Module f64. [ M.read (| self |) ] |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| bits |)) - (M.call_closure (| + (BinOp.Pure.eq (| + M.read (| bits |), + M.call_closure (| M.get_associated_function (| Ty.path "f64", "to_bits", @@ -921,7 +967,8 @@ Module f64. M.get_constant (| "core::f64::NEG_INFINITY" |) |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -929,26 +976,30 @@ Module f64. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let abs := M.alloc (| - BinOp.Pure.bit_and - (M.read (| bits |)) - (M.read (| M.get_constant (| "core::f64::next_down::CLEAR_SIGN_MASK" |) |)) + BinOp.Pure.bit_and (| + M.read (| bits |), + M.read (| M.get_constant (| "core::f64::next_down::CLEAR_SIGN_MASK" |) |) + |) |) in let next_bits := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| abs |)) (Value.Integer Integer.U64 0) + BinOp.Pure.eq (| + M.read (| abs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -956,14 +1007,14 @@ Module f64. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| bits |)) (M.read (| abs |)) + BinOp.Pure.eq (| M.read (| bits |), M.read (| abs |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -972,16 +1023,18 @@ Module f64. |) in M.alloc (| BinOp.Panic.sub (| + Integer.U64, M.read (| bits |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.U64, M.read (| bits |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -1007,12 +1060,16 @@ Module f64. 1.0 / self } *) - Definition recip (τ : list Ty.t) (α : list Value.t) : M := + Definition recip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.div (| M.read (| UnsupportedLiteral |), M.read (| self |) |))) + BinOp.Panic.div (| + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), + M.read (| self |) + |))) | _, _ => M.impossible end. @@ -1026,15 +1083,17 @@ Module f64. self * (180.0f64 / consts::PI) } *) - Definition to_degrees (τ : list Ty.t) (α : list Value.t) : M := + Definition to_degrees (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.mul (| + Integer.Usize, M.read (| self |), BinOp.Panic.div (| - M.read (| UnsupportedLiteral |), + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), M.read (| M.get_constant (| "core::f64::consts::PI" |) |) |) |))) @@ -1049,7 +1108,7 @@ Module f64. self * (value / 180.0) } *) - Definition to_radians (τ : list Ty.t) (α : list Value.t) : M := + Definition to_radians (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1058,8 +1117,13 @@ Module f64. 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 (| M.read (| value |), M.read (| UnsupportedLiteral |) |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| value |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |) |) |))) @@ -1073,7 +1137,7 @@ Module f64. intrinsics::maxnumf64(self, other) } *) - Definition max (τ : list Ty.t) (α : list Value.t) : M := + Definition max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1093,7 +1157,7 @@ Module f64. intrinsics::minnumf64(self, other) } *) - Definition min (τ : list Ty.t) (α : list Value.t) : M := + Definition min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1121,7 +1185,7 @@ Module f64. } } *) - Definition maximum (τ : list Ty.t) (α : list Value.t) : M := + Definition maximum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1129,26 +1193,26 @@ Module f64. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.gt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in self)); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| other |)) (M.read (| self |)) + BinOp.Pure.gt (| M.read (| other |), M.read (| self |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1156,14 +1220,14 @@ Module f64. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.eq (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1171,7 +1235,7 @@ Module f64. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1210,7 +1274,11 @@ Module f64. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -1238,7 +1306,7 @@ Module f64. } } *) - Definition minimum (τ : list Ty.t) (α : list Value.t) : M := + Definition minimum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1246,26 +1314,26 @@ Module f64. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in self)); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| other |)) (M.read (| self |)) + BinOp.Pure.lt (| M.read (| other |), M.read (| self |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1273,14 +1341,14 @@ Module f64. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.eq (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1288,7 +1356,7 @@ Module f64. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1327,7 +1395,11 @@ Module f64. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -1365,7 +1437,7 @@ Module f64. } } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1373,7 +1445,11 @@ Module f64. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -1396,7 +1472,7 @@ Module f64. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1404,40 +1480,42 @@ Module f64. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (M.read (| abs_a |)) - (M.read (| M.get_constant (| "core::f64::midpoint::HI" |) |)), + BinOp.Pure.le (| + M.read (| abs_a |), + M.read (| M.get_constant (| "core::f64::midpoint::HI" |) |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| abs_b |)) - (M.read (| - M.get_constant (| "core::f64::midpoint::HI" |) - |)))) + (BinOp.Pure.le (| + M.read (| abs_b |), + M.read (| M.get_constant (| "core::f64::midpoint::HI" |) |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| BinOp.Panic.div (| - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |), - M.read (| UnsupportedLiteral |) + Integer.Usize, + BinOp.Panic.add (| Integer.Usize, M.read (| a |), M.read (| b |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| abs_a |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| abs_a |), + M.read (| M.get_constant (| "core::f64::midpoint::LO" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1446,28 +1524,31 @@ Module f64. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| a |), BinOp.Panic.div (| + Integer.Usize, M.read (| b |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| abs_b |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| abs_b |), + M.read (| M.get_constant (| "core::f64::midpoint::LO" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1476,9 +1557,11 @@ Module f64. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.div (| + Integer.Usize, M.read (| a |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |), M.read (| b |) |) @@ -1487,13 +1570,16 @@ Module f64. ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.div (| + Integer.Usize, M.read (| a |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |), BinOp.Panic.div (| + Integer.Usize, M.read (| b |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) |) |))) @@ -1521,7 +1607,7 @@ Module f64. unsafe { FloatToInt::::to_int_unchecked(self) } } *) - Definition to_int_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition to_int_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Int ], [ self ] => ltac:(M.monadic @@ -1575,7 +1661,7 @@ Module f64. unsafe { intrinsics::const_eval_select((self,), ct_f64_to_u64, rt_f64_to_u64) } } *) - Definition to_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition to_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1591,7 +1677,7 @@ Module f64. ] |), [ - Value.Tuple [ M.read (| self |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |); M.get_associated_function (| Self, "ct_f64_to_u64.to_bits", [] |); M.get_associated_function (| Self, "rt_f64_to_u64.to_bits", [] |) ] @@ -1659,7 +1745,7 @@ Module f64. unsafe { intrinsics::const_eval_select((v,), ct_u64_to_f64, rt_u64_to_f64) } } *) - Definition from_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition from_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -1675,7 +1761,7 @@ Module f64. ] |), [ - Value.Tuple [ M.read (| v |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| v |)) ] |); M.get_associated_function (| Self, "ct_u64_to_f64.from_bits", [] |); M.get_associated_function (| Self, "rt_u64_to_f64.from_bits", [] |) ] @@ -1690,7 +1776,7 @@ Module f64. self.to_bits().to_be_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1714,7 +1800,7 @@ Module f64. self.to_bits().to_le_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1738,7 +1824,7 @@ Module f64. self.to_bits().to_ne_bytes() } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1762,7 +1848,7 @@ Module f64. Self::from_bits(u64::from_be_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1787,7 +1873,7 @@ Module f64. Self::from_bits(u64::from_le_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1812,7 +1898,7 @@ Module f64. Self::from_bits(u64::from_ne_bytes(bytes)) } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1865,7 +1951,7 @@ Module f64. left.cmp(&right) } *) - Definition total_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition total_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1874,45 +1960,53 @@ Module f64. M.read (| let left := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "f64", "to_bits", [] |), [ M.read (| M.read (| self |) |) ] - |)) + |) + |) |) in let right := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "f64", "to_bits", [] |), [ M.read (| M.read (| other |) |) ] - |)) + |) + |) |) in 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 Integer.I32 63 |)), - Value.Integer Integer.I32 1 - |))) + BinOp.Pure.bit_xor (| + M.read (| β |), + M.rust_cast (| + BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| left |), M.of_value (| Value.Integer 63 |) |) + |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) |) in 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 Integer.I32 63 |)), - Value.Integer Integer.I32 1 - |))) + BinOp.Pure.bit_xor (| + M.read (| β |), + M.rust_cast (| + BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| right |), M.of_value (| Value.Integer 63 |) |) + |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1938,7 +2032,7 @@ Module f64. self } *) - Definition clamp (τ : list Ty.t) (α : list Value.t) : M := + Definition clamp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; min; max ] => ltac:(M.monadic @@ -1948,14 +2042,16 @@ Module f64. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (BinOp.Pure.le (M.read (| min |)) (M.read (| max |))) + UnOp.Pure.not (| + BinOp.Pure.le (| M.read (| min |), M.read (| max |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1971,76 +2067,91 @@ Module f64. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "min > max, or either was NaN. min = " - |); - M.read (| Value.String ", max = " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "min > max, or either was NaN. min = " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", max = " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f64" ] - |), - [ min ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f64" ] - |), - [ max ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f64" ] + |), + [ min ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f64" ] + |), + [ max ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| min |)) |)) in + (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 - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| self |)) (M.read (| max |)) |)) in + (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 - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in self diff --git a/CoqOfRust/core/num/flt2dec/decoder.v b/CoqOfRust/core/num/flt2dec/decoder.v index 321069de5..13334bf59 100644 --- a/CoqOfRust/core/num/flt2dec/decoder.v +++ b/CoqOfRust/core/num/flt2dec/decoder.v @@ -33,24 +33,24 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::decoder::Decoded". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -73,7 +73,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::decoder::Decoded". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -87,49 +87,54 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "Decoded" |); - M.read (| Value.String "mant" |); + M.read (| M.of_value (| Value.String "Decoded" |) |); + M.read (| M.of_value (| Value.String "mant" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "mant" - |)); - M.read (| Value.String "minus" |); + |) + |); + M.read (| M.of_value (| Value.String "minus" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "minus" - |)); - M.read (| Value.String "plus" |); + |) + |); + M.read (| M.of_value (| Value.String "plus" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "plus" - |)); - M.read (| Value.String "exp" |); + |) + |); + M.read (| M.of_value (| Value.String "exp" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "exp" - |)); - M.read (| Value.String "inclusive" |); + |) + |); + M.read (| M.of_value (| Value.String "inclusive" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "inclusive" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -158,7 +163,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::decoder::Decoded". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -168,88 +173,93 @@ Module num. LogicalOp.and (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "minus" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::flt2dec::decoder::Decoded", "minus" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "plus" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::flt2dec::decoder::Decoded", "plus" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "exp" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::flt2dec::decoder::Decoded", "exp" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::flt2dec::decoder::Decoded", "inclusive" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::flt2dec::decoder::Decoded", "inclusive" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -277,25 +287,29 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::decoder::Decoded". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |))) @@ -359,14 +373,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::decoder::FullDecoded". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -385,7 +399,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::decoder::FullDecoded". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -405,7 +419,7 @@ Module num. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Nan" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Nan" |) |) ] |) |))); fun γ => @@ -418,7 +432,8 @@ Module num. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Infinite" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Infinite" |) |) + ] |) |))); fun γ => @@ -431,7 +446,7 @@ Module num. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Zero" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Zero" |) |) ] |) |))); fun γ => @@ -453,8 +468,8 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "Finite" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Finite" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -487,7 +502,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::decoder::FullDecoded". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -516,11 +531,16 @@ Module num. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -554,7 +574,8 @@ Module num. [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -587,15 +608,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::decoder::FullDecoded". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -621,7 +642,7 @@ Module num. f32::MIN_POSITIVE } *) - Definition min_pos_norm_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_pos_norm_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::f32::MIN_POSITIVE" |) |))) | _, _ => M.impossible @@ -643,7 +664,7 @@ Module num. f64::MIN_POSITIVE } *) - Definition min_pos_norm_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_pos_norm_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::f64::MIN_POSITIVE" |) |))) | _, _ => M.impossible @@ -698,7 +719,7 @@ Module num. (sign < 0, decoded) } *) - Definition decode (τ : list Ty.t) (α : list Value.t) : M := + Definition decode (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ v ] => ltac:(M.monadic @@ -728,9 +749,13 @@ Module num. let sign := M.copy (| γ0_2 |) in let even := M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and (M.read (| mant |)) (Value.Integer Integer.U64 1)) - (Value.Integer Integer.U64 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| mant |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let decoded := M.copy (| @@ -751,40 +776,53 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::flt2dec::decoder::FullDecoded::Nan" - [] + M.of_value (| + Value.StructTuple + "core::num::flt2dec::decoder::FullDecoded::Nan" + [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::flt2dec::decoder::FullDecoded::Infinite" - [] + M.of_value (| + Value.StructTuple + "core::num::flt2dec::decoder::FullDecoded::Infinite" + [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::flt2dec::decoder::FullDecoded::Zero" - [] + M.of_value (| + Value.StructTuple + "core::num::flt2dec::decoder::FullDecoded::Zero" + [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::flt2dec::decoder::FullDecoded::Finite" - [ - Value.StructRecord - "core::num::flt2dec::decoder::Decoded" - [ - ("mant", M.read (| mant |)); - ("minus", Value.Integer Integer.U64 1); - ("plus", Value.Integer Integer.U64 1); - ("exp", M.read (| exp |)); - ("inclusive", M.read (| even |)) - ] - ] + M.of_value (| + Value.StructTuple + "core::num::flt2dec::decoder::FullDecoded::Finite" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::num::flt2dec::decoder::Decoded" + [ + ("mant", A.to_value (M.read (| mant |))); + ("minus", + A.to_value (M.of_value (| Value.Integer 1 |))); + ("plus", + A.to_value (M.of_value (| Value.Integer 1 |))); + ("exp", A.to_value (M.read (| exp |))); + ("inclusive", A.to_value (M.read (| even |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -813,18 +851,19 @@ Module num. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| mant |)) - (M.read (| + BinOp.Pure.eq (| + M.read (| mant |), + M.read (| M.SubPointer.get_tuple_field (| minnorm, 0 |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -832,52 +871,78 @@ Module num. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::num::flt2dec::decoder::FullDecoded::Finite" - [ - Value.StructRecord - "core::num::flt2dec::decoder::Decoded" - [ - ("mant", - BinOp.Panic.shl (| - M.read (| mant |), - Value.Integer Integer.I32 2 - |)); - ("minus", Value.Integer Integer.U64 1); - ("plus", Value.Integer Integer.U64 2); - ("exp", - BinOp.Panic.sub (| - M.read (| exp |), - Value.Integer Integer.I16 2 - |)); - ("inclusive", M.read (| even |)) - ] - ] + M.of_value (| + Value.StructTuple + "core::num::flt2dec::decoder::FullDecoded::Finite" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::num::flt2dec::decoder::Decoded" + [ + ("mant", + A.to_value + (BinOp.Panic.shl (| + M.read (| mant |), + M.of_value (| Value.Integer 2 |) + |))); + ("minus", + A.to_value + (M.of_value (| Value.Integer 1 |))); + ("plus", + A.to_value + (M.of_value (| Value.Integer 2 |))); + ("exp", + A.to_value + (BinOp.Panic.sub (| + Integer.I16, + M.read (| exp |), + M.of_value (| Value.Integer 2 |) + |))); + ("inclusive", + A.to_value (M.read (| even |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::flt2dec::decoder::FullDecoded::Finite" - [ - Value.StructRecord - "core::num::flt2dec::decoder::Decoded" - [ - ("mant", - BinOp.Panic.shl (| - M.read (| mant |), - Value.Integer Integer.I32 1 - |)); - ("minus", Value.Integer Integer.U64 1); - ("plus", Value.Integer Integer.U64 1); - ("exp", - BinOp.Panic.sub (| - M.read (| exp |), - Value.Integer Integer.I16 1 - |)); - ("inclusive", M.read (| even |)) - ] - ] + M.of_value (| + Value.StructTuple + "core::num::flt2dec::decoder::FullDecoded::Finite" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::num::flt2dec::decoder::Decoded" + [ + ("mant", + A.to_value + (BinOp.Panic.shl (| + M.read (| mant |), + M.of_value (| Value.Integer 1 |) + |))); + ("minus", + A.to_value + (M.of_value (| Value.Integer 1 |))); + ("plus", + A.to_value + (M.of_value (| Value.Integer 1 |))); + ("exp", + A.to_value + (BinOp.Panic.sub (| + Integer.I16, + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |))); + ("inclusive", + A.to_value (M.read (| even |))) + ] + |)) + ] + |) |))) ] |))) @@ -885,11 +950,17 @@ Module num. |) |) in M.alloc (| - Value.Tuple - [ - BinOp.Pure.lt (M.read (| sign |)) (Value.Integer Integer.I8 0); - M.read (| decoded |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Pure.lt (| + M.read (| sign |), + M.of_value (| Value.Integer 0 |) + |)); + A.to_value (M.read (| decoded |)) + ] + |) |))) ] |) diff --git a/CoqOfRust/core/num/flt2dec/estimator.v b/CoqOfRust/core/num/flt2dec/estimator.v index 69c673ad5..b1ccf2844 100644 --- a/CoqOfRust/core/num/flt2dec/estimator.v +++ b/CoqOfRust/core/num/flt2dec/estimator.v @@ -13,7 +13,7 @@ Module num. (((nbits + exp as i64) * 1292913986) >> 32) as i16 } *) - Definition estimate_scaling_factor (τ : list Ty.t) (α : list Value.t) : M := + Definition estimate_scaling_factor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ mant; exp ] => ltac:(M.monadic @@ -23,23 +23,37 @@ Module num. let nbits := M.alloc (| BinOp.Panic.sub (| - Value.Integer Integer.I64 64, - M.rust_cast - (M.call_closure (| + Integer.I64, + M.of_value (| Value.Integer 64 |), + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u64", "leading_zeros", [] |), - [ BinOp.Panic.sub (| M.read (| mant |), Value.Integer Integer.U64 1 |) ] - |)) + [ + BinOp.Panic.sub (| + Integer.U64, + M.read (| mant |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + |) |) |) in M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| BinOp.Panic.mul (| - BinOp.Panic.add (| M.read (| nbits |), M.rust_cast (M.read (| exp |)) |), - Value.Integer Integer.I64 1292913986 + Integer.I64, + BinOp.Panic.add (| + Integer.I64, + M.read (| nbits |), + M.rust_cast (| M.read (| exp |) |) + |), + M.of_value (| Value.Integer 1292913986 |) |), - Value.Integer Integer.I32 32 - |)) + M.of_value (| Value.Integer 32 |) + |) + |) |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/num/flt2dec/mod.v b/CoqOfRust/core/num/flt2dec/mod.v index 407cf1222..481033728 100644 --- a/CoqOfRust/core/num/flt2dec/mod.v +++ b/CoqOfRust/core/num/flt2dec/mod.v @@ -3,8 +3,8 @@ Require Import CoqOfRust.CoqOfRust. Module num. Module flt2dec. - Definition value_MAX_SIG_DIGITS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 17 |))). + Definition value_MAX_SIG_DIGITS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 17 |) |))). (* pub fn round_up(d: &mut [u8]) -> Option { @@ -32,7 +32,7 @@ Module num. } } *) - Definition round_up (τ : list Ty.t) (α : list Value.t) : M := + Definition round_up (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d ] => ltac:(M.monadic @@ -63,8 +63,8 @@ Module num. [ M.read (| d |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -75,13 +75,15 @@ Module num. ltac:(M.monadic (let γ := M.read (| γ |) in let c := M.copy (| γ |) in - BinOp.Pure.ne - (M.read (| c |)) - (M.read (| UnsupportedLiteral |)))) + BinOp.Pure.ne (| + M.read (| c |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -99,7 +101,11 @@ Module num. let β := M.SubPointer.get_array_field (| M.read (| d |), i |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U8 1 |) + BinOp.Panic.add (| + Integer.U8, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.use @@ -114,24 +120,29 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.add (| - M.read (| i |), - Value.Integer Integer.Usize 1 - |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| d |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| d |) ] + |))) + ] + |) ] |) |), @@ -178,39 +189,42 @@ Module num. M.read (| d |), j |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| d |) ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.write (| M.SubPointer.get_array_field (| M.read (| d |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) in let _ := M.use @@ -225,20 +239,23 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 1); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| d |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| d |) ] + |))) + ] + |) ] |) |), @@ -285,26 +302,30 @@ Module num. M.read (| d |), j |), - M.read (| UnsupportedLiteral |) + M.read (| M.of_value (| UnsupportedLiteral |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| UnsupportedLiteral |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| UnsupportedLiteral |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)) ] + |) |))) ] |) @@ -382,7 +403,7 @@ Module num. } } *) - Definition digits_to_dec_str (τ : list Ty.t) (α : list Value.t) : M := + Definition digits_to_dec_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ buf; exp; frac_digits; parts ] => ltac:(M.monadic @@ -393,79 +414,91 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "is_empty", [] |), [ M.read (| buf |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: !buf.is_empty()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: !buf.is_empty()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_array_field (| M.read (| buf |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (M.read (| UnsupportedLiteral |))) + |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: buf[0] > b'0'" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: buf[0] > b'0'" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -478,41 +511,49 @@ Module num. [] |), [ M.read (| parts |) ] - |)) - (Value.Integer Integer.Usize 4)) + |), + M.of_value (| Value.Integer 4 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: parts.len() >= 4" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: parts.len() >= 4" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| exp |)) (Value.Integer Integer.I16 0) + BinOp.Pure.le (| M.read (| exp |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let minus_exp := M.alloc (| - M.rust_cast (UnOp.Panic.neg (| M.rust_cast (M.read (| exp |)) |)) + M.rust_cast (| + UnOp.Panic.neg (| Integer.I32, M.rust_cast (| M.read (| exp |) |) |) + |) |) in let _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -523,9 +564,17 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ (* Unsize *) M.pointer_coercion (M.read (| UnsupportedLiteral |)) ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in @@ -533,7 +582,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |), M.call_closure (| M.get_associated_function (| @@ -544,9 +593,11 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ M.read (| minus_exp |) ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ A.to_value (M.read (| minus_exp |)) ] + |) ] |) |) in @@ -554,7 +605,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 2 |) + M.alloc (| M.of_value (| Value.Integer 2 |) |) |), M.call_closure (| M.get_associated_function (| @@ -564,11 +615,17 @@ Module num. "new", [] |), - [ Value.StructTuple "core::num::fmt::Part::Copy" [ M.read (| buf |) ] ] + [ + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ A.to_value (M.read (| buf |)) ] + |) + ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -576,19 +633,21 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| frac_digits |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| frac_digits |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (BinOp.Panic.sub (| + (BinOp.Pure.gt (| + BinOp.Panic.sub (| + Integer.Usize, M.read (| frac_digits |), M.call_closure (| M.get_associated_function (| @@ -598,8 +657,9 @@ Module num. |), [ M.read (| buf |) ] |) - |)) - (M.read (| minus_exp |)))) + |), + M.read (| minus_exp |) + |))) |) |)) in let _ := @@ -608,7 +668,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 3 |) + M.alloc (| M.of_value (| Value.Integer 3 |) |) |), M.call_closure (| M.get_associated_function (| @@ -619,24 +679,29 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ - BinOp.Panic.sub (| - BinOp.Panic.sub (| - M.read (| frac_digits |), - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + BinOp.Panic.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 (| buf |) ] - |) - |), - M.read (| minus_exp |) - |) - ] + M.read (| minus_exp |) + |)) + ] + |) ] |) |) in @@ -670,9 +735,12 @@ Module num. |), [ M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 4) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.of_value (| Value.Integer 4 |))) + ] + |) ] |) ] @@ -710,9 +778,12 @@ Module num. |), [ M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 3) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.of_value (| Value.Integer 3 |))) + ] + |) ] |) ] @@ -722,25 +793,26 @@ 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 [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exp |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| exp |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -748,7 +820,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -759,29 +831,34 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| exp |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| exp |))) ] + |) + ] + |)) + ] + |) ] |) |) in @@ -789,7 +866,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |), M.call_closure (| M.get_associated_function (| @@ -800,12 +877,17 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in @@ -813,7 +895,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 2 |) + M.alloc (| M.of_value (| Value.Integer 2 |) |) |), M.call_closure (| M.get_associated_function (| @@ -824,43 +906,49 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| exp |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| exp |))) ] + |) + ] + |)) + ] + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| frac_digits |)) - (BinOp.Panic.sub (| + BinOp.Pure.gt (| + M.read (| frac_digits |), + BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -870,7 +958,8 @@ Module num. [ M.read (| buf |) ] |), M.read (| exp |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -881,7 +970,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 3 |) + M.alloc (| M.of_value (| Value.Integer 3 |) |) |), M.call_closure (| M.get_associated_function (| @@ -892,24 +981,31 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ - BinOp.Panic.sub (| - M.read (| frac_digits |), - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| buf |) ] - |), - M.read (| exp |) - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| frac_digits |), + BinOp.Panic.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 |) + |) + |)) + ] + |) ] |) |) in @@ -943,9 +1039,14 @@ Module num. |), [ M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 4) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value (M.of_value (| Value.Integer 4 |))) + ] + |) ] |) ] @@ -983,9 +1084,14 @@ Module num. |), [ M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 3) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value (M.of_value (| Value.Integer 3 |))) + ] + |) ] |) ] @@ -999,7 +1105,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -1010,9 +1116,11 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ M.read (| buf |) ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ A.to_value (M.read (| buf |)) ] + |) ] |) |) in @@ -1020,7 +1128,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |), M.call_closure (| M.get_associated_function (| @@ -1031,35 +1139,40 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ - BinOp.Panic.sub (| - M.read (| exp |), - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| buf |) ] - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ + A.to_value + (BinOp.Panic.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 |) ] + |) + |)) + ] + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| frac_digits |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| frac_digits |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1070,7 +1183,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 2 |) + M.alloc (| M.of_value (| Value.Integer 2 |) |) |), M.call_closure (| M.get_associated_function (| @@ -1081,12 +1194,19 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.of_value (| UnsupportedLiteral |) + |) + |)) + ] + |) ] |) |) in @@ -1094,7 +1214,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 3 |) + M.alloc (| M.of_value (| Value.Integer 3 |) |) |), M.call_closure (| M.get_associated_function (| @@ -1105,9 +1225,11 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ M.read (| frac_digits |) ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ A.to_value (M.read (| frac_digits |)) ] + |) ] |) |) in @@ -1141,9 +1263,14 @@ Module num. |), [ M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 4) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value (M.of_value (| Value.Integer 4 |))) + ] + |) ] |) ] @@ -1181,9 +1308,14 @@ Module num. |), [ M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 2) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value (M.of_value (| Value.Integer 2 |))) + ] + |) ] |) ] @@ -1239,7 +1371,7 @@ Module num. unsafe { MaybeUninit::slice_assume_init_ref(&parts[..n + 2]) } } *) - Definition digits_to_exp_str (τ : list Ty.t) (α : list Value.t) : M := + Definition digits_to_exp_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ buf; exp; min_ndigits; upper; parts ] => ltac:(M.monadic @@ -1251,79 +1383,91 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "is_empty", [] |), [ M.read (| buf |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: !buf.is_empty()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: !buf.is_empty()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_array_field (| M.read (| buf |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) - |)) - (M.read (| UnsupportedLiteral |))) + |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: buf[0] > b'0'" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: buf[0] > b'0'" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1336,22 +1480,28 @@ Module num. [] |), [ M.read (| parts |) ] - |)) - (Value.Integer Integer.Usize 6)) + |), + M.of_value (| Value.Integer 6 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: parts.len() >= 6" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: parts.len() >= 6" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let n := M.alloc (| Value.Integer Integer.Usize 0 |) in + let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), n |), @@ -1364,25 +1514,31 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] ], - "index", - [] - |), - [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.of_value (| Value.Integer 1 |))) ] + |) + ] + |)) + ] + |) ] |) |) in @@ -1390,11 +1546,15 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1402,20 +1562,22 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |)) - (Value.Integer Integer.Usize 1), + |), + M.of_value (| Value.Integer 1 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| min_ndigits |)) - (Value.Integer Integer.Usize 1))) + (BinOp.Pure.gt (| + M.read (| min_ndigits |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1431,10 +1593,17 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ (* Unsize *) M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in @@ -1443,7 +1612,11 @@ Module num. M.SubPointer.get_array_field (| M.read (| parts |), M.alloc (| - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) |) |), M.call_closure (| @@ -1455,29 +1628,37 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |)) + ] + |) ] |) |) in @@ -1485,26 +1666,31 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 2 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| min_ndigits |)) - (M.call_closure (| + BinOp.Pure.gt (| + 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 _ := M.is_constant_or_break_match (| @@ -1523,21 +1709,25 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ - BinOp.Panic.sub (| - M.read (| min_ndigits |), - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| buf |) ] - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ + A.to_value + (BinOp.Panic.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 @@ -1546,31 +1736,36 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let exp := M.alloc (| - BinOp.Panic.sub (| M.rust_cast (M.read (| exp |)), Value.Integer Integer.I32 1 |) + BinOp.Panic.sub (| + Integer.I32, + M.rust_cast (| M.read (| exp |) |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| exp |)) (Value.Integer Integer.I32 0) + BinOp.Pure.lt (| M.read (| exp |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -1585,35 +1780,42 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use upper in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - |))) - ] - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use upper in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) + |))) + ] + |) + |)) + ] + |) ] |) |) in @@ -1622,7 +1824,11 @@ Module num. M.SubPointer.get_array_field (| M.read (| parts |), M.alloc (| - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) |) |), M.call_closure (| @@ -1634,13 +1840,20 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Num" - [ M.rust_cast (UnOp.Panic.neg (| M.read (| exp |) |)) ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Num" + [ + A.to_value + (M.rust_cast (| + UnOp.Panic.neg (| Integer.I32, M.read (| exp |) |) + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1655,35 +1868,42 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use upper in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - |))) - ] - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use upper in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) + |))) + ] + |) + |)) + ] + |) ] |) |) in @@ -1692,7 +1912,11 @@ Module num. M.SubPointer.get_array_field (| M.read (| parts |), M.alloc (| - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) |) |), M.call_closure (| @@ -1704,13 +1928,15 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Num" - [ M.rust_cast (M.read (| exp |)) ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Num" + [ A.to_value (M.rust_cast (| M.read (| exp |) |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1739,12 +1965,19 @@ Module num. |), [ M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 2 |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) ] |) ] @@ -1789,7 +2022,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::Sign". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1821,7 +2054,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::Sign". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1848,7 +2081,7 @@ Module num. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -1876,12 +2109,12 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::Sign". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -1898,7 +2131,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::flt2dec::Sign". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1915,11 +2148,11 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Minus" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Minus" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "MinusPlus" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "MinusPlus" |) |) |))) ] |) |) @@ -1957,7 +2190,7 @@ Module num. } } *) - Definition determine_sign (τ : list Ty.t) (α : list Value.t) : M := + Definition determine_sign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ sign; decoded; negative ] => ltac:(M.monadic @@ -1966,27 +2199,33 @@ Module num. let negative := M.alloc (| negative |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| M.read (| decoded |) |); M.read (| sign |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.read (| decoded |) |)); A.to_value (M.read (| sign |)) + ] + |) + |), [ fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in - Value.String "")); + M.of_value (| 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use negative in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "-")); - fun γ => ltac:(M.monadic (Value.String "")) + M.of_value (| Value.String "-" |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.String "" |))) ] |))); fun γ => @@ -1994,15 +2233,15 @@ Module num. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use negative in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "-")); - fun γ => ltac:(M.monadic (Value.String "+")) + M.of_value (| Value.String "-" |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.String "+" |))) ] |))) ] @@ -2066,7 +2305,7 @@ Module num. } } *) - Definition to_shortest_str (τ : list Ty.t) (α : list Value.t) : M := + Definition to_shortest_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ format_shortest; v; sign; frac_digits; buf; parts ] => ltac:(M.monadic @@ -2079,16 +2318,16 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -2101,33 +2340,39 @@ Module num. [] |), [ M.read (| parts |) ] - |)) - (Value.Integer Integer.Usize 4)) + |), + M.of_value (| Value.Integer 4 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: parts.len() >= 4" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: parts.len() >= 4" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -2140,10 +2385,12 @@ Module num. [] |), [ M.read (| buf |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::flt2dec::MAX_SIG_DIGITS" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2152,13 +2399,15 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: buf.len() >= MAX_SIG_DIGITS" + M.of_value (| + Value.String "assertion failed: buf.len() >= MAX_SIG_DIGITS" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -2191,7 +2440,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -2202,58 +2451,73 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2261,7 +2525,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -2272,72 +2536,88 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| frac_digits |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| frac_digits |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2348,7 +2628,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -2359,12 +2639,19 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.of_value (| UnsupportedLiteral |) + |) + |)) + ] + |) ] |) |) in @@ -2372,7 +2659,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |), M.call_closure (| M.get_associated_function (| @@ -2383,56 +2670,70 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ M.read (| frac_digits |) ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ A.to_value (M.read (| frac_digits |)) ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 2) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| + Value.Integer 2 + |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2440,7 +2741,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -2451,59 +2752,78 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.of_value (| UnsupportedLiteral |) + |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| + Value.Integer 1 + |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))) ] |))); @@ -2546,7 +2866,13 @@ Module num. |), [ format_shortest; - Value.Tuple [ M.read (| decoded |); M.read (| buf |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| decoded |)); + A.to_value (M.read (| buf |)) + ] + |) ] |) |), @@ -2558,24 +2884,27 @@ Module num. let buf := M.copy (| γ0_0 |) in let exp := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_function (| - "core::num::flt2dec::digits_to_dec_str", - [] - |), - [ - M.read (| buf |); - M.read (| exp |); - M.read (| frac_digits |); - M.read (| parts |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_function (| + "core::num::flt2dec::digits_to_dec_str", + [] + |), + [ + M.read (| buf |); + M.read (| exp |); + M.read (| frac_digits |); + M.read (| parts |) + ] + |))) + ] + |) |))) ] |))) @@ -2640,7 +2969,7 @@ Module num. } } *) - Definition to_shortest_exp_str (τ : list Ty.t) (α : list Value.t) : M := + Definition to_shortest_exp_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ format_shortest; v; sign; dec_bounds; upper; buf; parts ] => ltac:(M.monadic @@ -2654,16 +2983,16 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -2676,33 +3005,39 @@ Module num. [] |), [ M.read (| parts |) ] - |)) - (Value.Integer Integer.Usize 6)) + |), + M.of_value (| Value.Integer 6 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: parts.len() >= 6" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: parts.len() >= 6" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -2715,10 +3050,12 @@ Module num. [] |), [ M.read (| buf |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::flt2dec::MAX_SIG_DIGITS" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2727,28 +3064,32 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: buf.len() >= MAX_SIG_DIGITS" + M.of_value (| + Value.String "assertion failed: buf.len() >= MAX_SIG_DIGITS" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| M.SubPointer.get_tuple_field (| dec_bounds, 0 |) |)) - (M.read (| M.SubPointer.get_tuple_field (| dec_bounds, 1 |) |))) + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_tuple_field (| dec_bounds, 0 |) |), + M.read (| M.SubPointer.get_tuple_field (| dec_bounds, 1 |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2757,13 +3098,15 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: dec_bounds.0 <= dec_bounds.1" + M.of_value (| + Value.String "assertion failed: dec_bounds.0 <= dec_bounds.1" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -2796,7 +3139,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -2807,58 +3150,73 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2866,7 +3224,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -2877,58 +3235,73 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2936,11 +3309,11 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2948,23 +3321,25 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_tuple_field (| dec_bounds, 0 |) - |)) - (Value.Integer Integer.I16 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (Value.Integer Integer.I16 0) - (M.read (| + (BinOp.Pure.lt (| + M.of_value (| Value.Integer 0 |), + M.read (| M.SubPointer.get_tuple_field (| dec_bounds, 1 |) - |)))) + |) + |))) |) |)) in let _ := @@ -2982,13 +3357,19 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion - (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.of_value (| UnsupportedLiteral |) + |) + |)) + ] + |) ] |) |))); @@ -3004,37 +3385,52 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use upper in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - (* Unsize *) - M.pointer_coercion - (M.read (| UnsupportedLiteral |)) - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - (* Unsize *) - M.pointer_coercion - (M.read (| UnsupportedLiteral |)) - |))) - ] - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use upper in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |) + |))) + ] + |) + |)) + ] + |) ] |) |))) @@ -3043,48 +3439,58 @@ Module num. |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3125,7 +3531,13 @@ Module num. |), [ format_shortest; - Value.Tuple [ M.read (| decoded |); M.read (| buf |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| decoded |)); + A.to_value (M.read (| buf |)) + ] + |) ] |) |), @@ -3139,14 +3551,15 @@ Module num. let vis_exp := M.alloc (| BinOp.Panic.sub (| - M.rust_cast (M.read (| exp |)), - Value.Integer Integer.I32 1 + Integer.I32, + M.rust_cast (| M.read (| exp |) |), + M.of_value (| Value.Integer 1 |) |) |) in let parts := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3154,25 +3567,29 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (M.rust_cast - (M.read (| + BinOp.Pure.le (| + M.rust_cast (| + M.read (| M.SubPointer.get_tuple_field (| dec_bounds, 0 |) - |))) - (M.read (| vis_exp |)), + |) + |), + M.read (| vis_exp |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| vis_exp |)) - (M.rust_cast - (M.read (| + (BinOp.Pure.lt (| + M.read (| vis_exp |), + M.rust_cast (| + M.read (| M.SubPointer.get_tuple_field (| dec_bounds, 1 |) - |))))) + |) + |) + |))) |) |)) in let _ := @@ -3189,7 +3606,7 @@ Module num. [ M.read (| buf |); M.read (| exp |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| parts |) ] |) @@ -3205,7 +3622,7 @@ Module num. [ M.read (| buf |); M.read (| exp |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| upper |); M.read (| parts |) ] @@ -3215,10 +3632,14 @@ Module num. |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ ("sign", M.read (| sign |)); ("parts", M.read (| parts |)) - ] + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", A.to_value (M.read (| parts |))) + ] + |) |))) ] |))) @@ -3235,37 +3656,43 @@ Module num. 21 + ((if exp < 0 { -12 } else { 5 } * exp as i32) as usize >> 4) } *) - Definition estimate_max_buf_len (τ : list Ty.t) (α : list Value.t) : M := + Definition estimate_max_buf_len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ exp ] => ltac:(M.monadic (let exp := M.alloc (| exp |) in BinOp.Panic.add (| - Value.Integer Integer.Usize 21, + Integer.Usize, + M.of_value (| Value.Integer 21 |), BinOp.Panic.shr (| - M.rust_cast - (BinOp.Panic.mul (| + M.rust_cast (| + BinOp.Panic.mul (| + Integer.I32, M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| exp |)) (Value.Integer Integer.I16 0) + BinOp.Pure.lt (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I32 (-12) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 5 |))) + M.alloc (| M.of_value (| Value.Integer (-12) |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 5 |) |))) ] |) |), - M.rust_cast (M.read (| exp |)) - |)), - Value.Integer Integer.I32 4 + M.rust_cast (| M.read (| exp |) |) + |) + |), + M.of_value (| Value.Integer 4 |) |) |))) | _, _ => M.impossible @@ -3332,7 +3759,7 @@ Module num. } } *) - Definition to_exact_exp_str (τ : list Ty.t) (α : list Value.t) : M := + Definition to_exact_exp_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ format_exact; v; sign; ndigits; upper; buf; parts ] => ltac:(M.monadic @@ -3346,16 +3773,16 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -3368,43 +3795,57 @@ Module num. [] |), [ M.read (| parts |) ] - |)) - (Value.Integer Integer.Usize 6)) + |), + M.of_value (| Value.Integer 6 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: parts.len() >= 6" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: parts.len() >= 6" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt (M.read (| ndigits |)) (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| ndigits |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: ndigits > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: ndigits > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -3437,7 +3878,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -3448,58 +3889,73 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3507,7 +3963,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -3518,72 +3974,88 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] - ] - |) - |) in - M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| ndigits |)) - (Value.Integer Integer.Usize 1) + BinOp.Pure.gt (| + M.read (| ndigits |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3594,7 +4066,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -3605,12 +4077,19 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.of_value (| UnsupportedLiteral |) + |) + |)) + ] + |) ] |) |) in @@ -3618,7 +4097,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |), M.call_closure (| M.get_associated_function (| @@ -3629,14 +4108,18 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ - BinOp.Panic.sub (| - M.read (| ndigits |), - Value.Integer Integer.Usize 1 - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| ndigits |), + M.of_value (| Value.Integer 1 |) + |)) + ] + |) ] |) |) in @@ -3644,7 +4127,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 2 |) + M.alloc (| M.of_value (| Value.Integer 2 |) |) |), M.call_closure (| M.get_associated_function (| @@ -3655,84 +4138,111 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use upper in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - (* Unsize *) - M.pointer_coercion - (M.read (| UnsupportedLiteral |)) - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - (* Unsize *) - M.pointer_coercion - (M.read (| UnsupportedLiteral |)) - |))) - ] - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use upper in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |) + |))) + ] + |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 3) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| + Value.Integer 3 + |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3740,7 +4250,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -3751,84 +4261,111 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use upper in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - (* Unsize *) - M.pointer_coercion - (M.read (| UnsupportedLiteral |)) - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - (* Unsize *) - M.pointer_coercion - (M.read (| UnsupportedLiteral |)) - |))) - ] - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use upper in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |) + |))) + ] + |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| + Value.Integer 1 + |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))) ] |))); @@ -3861,17 +4398,17 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| - BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -3885,11 +4422,12 @@ Module num. [] |), [ M.read (| buf |) ] - |)) - (M.read (| ndigits |)), + |), + M.read (| ndigits |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (M.call_closure (| + (BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -3903,9 +4441,11 @@ Module num. [] |), [ M.read (| buf |) ] - |)) - (M.read (| maxlen |)))) - |)) + |), + M.read (| maxlen |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3918,29 +4458,33 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: buf.len() >= ndigits || buf.len() >= maxlen" + M.of_value (| + Value.String + "assertion failed: buf.len() >= ndigits || buf.len() >= maxlen" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let trunc := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| ndigits |)) - (M.read (| maxlen |)) + BinOp.Pure.lt (| + M.read (| ndigits |), + M.read (| maxlen |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3983,36 +4527,43 @@ Module num. |), [ format_exact; - Value.Tuple - [ - M.read (| decoded |); - M.call_closure (| - M.get_trait_method (| - "core::ops::index::IndexMut", - Ty.apply - (Ty.path "slice") - [ + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| decoded |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index_mut", - [] - |), - [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| trunc |)) ] - ] - |); - M.read (| M.get_constant (| "core::num::MIN" |) |) - ] + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index_mut", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| trunc |))) ] + |) + ] + |)); + A.to_value + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + ] + |) ] |) |), @@ -4024,25 +4575,28 @@ Module num. let buf := M.copy (| γ0_0 |) in let exp := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_function (| - "core::num::flt2dec::digits_to_exp_str", - [] - |), - [ - M.read (| buf |); - M.read (| exp |); - M.read (| ndigits |); - M.read (| upper |); - M.read (| parts |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_function (| + "core::num::flt2dec::digits_to_exp_str", + [] + |), + [ + M.read (| buf |); + M.read (| exp |); + M.read (| ndigits |); + M.read (| upper |); + M.read (| parts |) + ] + |))) + ] + |) |))) ] |))) @@ -4139,7 +4693,7 @@ Module num. } } *) - Definition to_exact_fixed_str (τ : list Ty.t) (α : list Value.t) : M := + Definition to_exact_fixed_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ format_exact; v; sign; frac_digits; buf; parts ] => ltac:(M.monadic @@ -4152,16 +4706,16 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -4174,19 +4728,25 @@ Module num. [] |), [ M.read (| parts |) ] - |)) - (Value.Integer Integer.Usize 4)) + |), + M.of_value (| Value.Integer 4 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: parts.len() >= 4" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: parts.len() >= 4" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -4219,7 +4779,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -4230,58 +4790,73 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] - ] - |) - ] - |)) - ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) + ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -4289,7 +4864,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -4300,72 +4875,88 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| frac_digits |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| frac_digits |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4376,7 +4967,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -4387,12 +4978,19 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.of_value (| UnsupportedLiteral |) + |) + |)) + ] + |) ] |) |) in @@ -4400,7 +4998,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 1 |) + M.alloc (| M.of_value (| Value.Integer 1 |) |) |), M.call_closure (| M.get_associated_function (| @@ -4411,56 +5009,70 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ M.read (| frac_digits |) ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ A.to_value (M.read (| frac_digits |)) ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 2) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| + Value.Integer 2 + |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -4468,7 +5080,7 @@ Module num. M.write (| M.SubPointer.get_array_field (| M.read (| parts |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| M.get_associated_function (| @@ -4479,59 +5091,78 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.of_value (| UnsupportedLiteral |) + |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ], + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", Value.Integer Integer.Usize 1) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "core::num::fmt::Part" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| + Value.Integer 1 + |))) + ] + |) + ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))) ] |))); @@ -4564,16 +5195,16 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -4587,8 +5218,10 @@ Module num. [] |), [ M.read (| buf |) ] - |)) - (M.read (| maxlen |))) + |), + M.read (| maxlen |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4601,28 +5234,33 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: buf.len() >= maxlen" + M.of_value (| + Value.String + "assertion failed: buf.len() >= maxlen" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let limit := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| frac_digits |)) - (Value.Integer Integer.Usize 32768) + BinOp.Pure.lt (| + M.read (| frac_digits |), + M.of_value (| Value.Integer 32768 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4631,7 +5269,8 @@ Module num. |) in M.alloc (| UnOp.Panic.neg (| - M.rust_cast (M.read (| frac_digits |)) + Integer.I16, + M.rust_cast (| M.read (| frac_digits |) |) |) |))); fun γ => @@ -4670,36 +5309,42 @@ Module num. |), [ format_exact; - Value.Tuple - [ - M.read (| decoded |); - M.call_closure (| - M.get_trait_method (| - "core::ops::index::IndexMut", - Ty.apply - (Ty.path "slice") - [ + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| decoded |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index_mut", - [] - |), - [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| maxlen |)) ] - ] - |); - M.read (| limit |) - ] + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index_mut", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| maxlen |))) ] + |) + ] + |)); + A.to_value (M.read (| limit |)) + ] + |) ] |) |), @@ -4711,16 +5356,17 @@ Module num. let buf := M.copy (| γ0_0 |) in let exp := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| exp |)) - (M.read (| limit |)) + BinOp.Pure.le (| + M.read (| exp |), + M.read (| limit |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4729,12 +5375,15 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| Value.Bool true |)) in + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -4743,24 +5392,30 @@ Module num. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| buf |) ] - |) - |); - M.alloc (| - Value.Integer Integer.Usize 0 - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| buf |) ] + |) + |)); + A.to_value + (M.alloc (| + M.of_value (| + Value.Integer 0 + |) + |)) + ] + |) |), [ fun γ => @@ -4779,25 +5434,29 @@ Module num. let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4809,9 +5468,11 @@ Module num. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -4834,9 +5495,11 @@ Module num. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -4846,28 +5509,36 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| frac_digits |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| frac_digits |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4879,7 +5550,7 @@ Module num. M.SubPointer.get_array_field (| M.read (| parts |), M.alloc (| - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| @@ -4892,13 +5563,21 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion - (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |)) + ] + |) ] |) |) in @@ -4907,7 +5586,7 @@ Module num. M.SubPointer.get_array_field (| M.read (| parts |), M.alloc (| - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |), M.call_closure (| @@ -4920,67 +5599,81 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Zero" - [ M.read (| frac_digits |) ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Zero" + [ + A.to_value + (M.read (| frac_digits |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" - ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", + A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ - Ty.path - "core::num::fmt::Part" - ] + Ty.path + "core::num::fmt::Part" ], - [ - Ty.apply - (Ty.path - "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ + Ty.path + "core::num::fmt::Part" + ] + ], + [ + Ty.apply + (Ty.path + "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), [ - ("end_", - Value.Integer - Integer.Usize - 2) + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| + Value.Integer 2 + |))) + ] + |) ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))); fun γ => ltac:(M.monadic @@ -4989,7 +5682,7 @@ Module num. M.SubPointer.get_array_field (| M.read (| parts |), M.alloc (| - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) |), M.call_closure (| @@ -5002,95 +5695,115 @@ Module num. [] |), [ - Value.StructTuple - "core::num::fmt::Part::Copy" - [ - (* Unsize *) - M.pointer_coercion - (M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructTuple + "core::num::fmt::Part::Copy" + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "core::num::fmt::Part" - ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", + A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ - Ty.path - "core::num::fmt::Part" - ] + Ty.path + "core::num::fmt::Part" ], - [ - Ty.apply - (Ty.path - "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + "slice_assume_init_ref", [] |), [ - M.read (| parts |); - Value.StructRecord - "core::ops::range::RangeTo" + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ + Ty.path + "core::num::fmt::Part" + ] + ], + [ + Ty.apply + (Ty.path + "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), [ - ("end_", - Value.Integer - Integer.Usize - 1) + M.read (| parts |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.of_value (| + Value.Integer 1 + |))) + ] + |) ] + |) ] - |) - ] - |)) - ] + |))) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", M.read (| sign |)); - ("parts", - M.call_closure (| - M.get_function (| - "core::num::flt2dec::digits_to_dec_str", - [] - |), - [ - M.read (| buf |); - M.read (| exp |); - M.read (| frac_digits |); - M.read (| parts |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", A.to_value (M.read (| sign |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_function (| + "core::num::flt2dec::digits_to_dec_str", + [] + |), + [ + M.read (| buf |); + M.read (| exp |); + M.read (| frac_digits |); + M.read (| parts |) + ] + |))) + ] + |) |))) ] |))) diff --git a/CoqOfRust/core/num/flt2dec/strategy/dragon.v b/CoqOfRust/core/num/flt2dec/strategy/dragon.v index b93eb29cf..58c989454 100644 --- a/CoqOfRust/core/num/flt2dec/strategy/dragon.v +++ b/CoqOfRust/core/num/flt2dec/strategy/dragon.v @@ -5,151 +5,168 @@ Module num. Module flt2dec. Module strategy. Module dragon. - Definition value_POW10 : Value.t := + Definition value_POW10 : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 1; - Value.Integer Integer.U32 10; - Value.Integer Integer.U32 100; - Value.Integer Integer.U32 1000; - Value.Integer Integer.U32 10000; - Value.Integer Integer.U32 100000; - Value.Integer Integer.U32 1000000; - Value.Integer Integer.U32 10000000; - Value.Integer Integer.U32 100000000; - Value.Integer Integer.U32 1000000000 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 1000 |)); + A.to_value (M.of_value (| Value.Integer 10000 |)); + A.to_value (M.of_value (| Value.Integer 100000 |)); + A.to_value (M.of_value (| Value.Integer 1000000 |)); + A.to_value (M.of_value (| Value.Integer 10000000 |)); + A.to_value (M.of_value (| Value.Integer 100000000 |)); + A.to_value (M.of_value (| Value.Integer 1000000000 |)) + ] + |) |) |))). - Definition value_TWOPOW10 : Value.t := + Definition value_TWOPOW10 : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 2; - Value.Integer Integer.U32 20; - Value.Integer Integer.U32 200; - Value.Integer Integer.U32 2000; - Value.Integer Integer.U32 20000; - Value.Integer Integer.U32 200000; - Value.Integer Integer.U32 2000000; - Value.Integer Integer.U32 20000000; - Value.Integer Integer.U32 200000000; - Value.Integer Integer.U32 2000000000 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 200 |)); + A.to_value (M.of_value (| Value.Integer 2000 |)); + A.to_value (M.of_value (| Value.Integer 20000 |)); + A.to_value (M.of_value (| Value.Integer 200000 |)); + A.to_value (M.of_value (| Value.Integer 2000000 |)); + A.to_value (M.of_value (| Value.Integer 20000000 |)); + A.to_value (M.of_value (| Value.Integer 200000000 |)); + A.to_value (M.of_value (| Value.Integer 2000000000 |)) + ] + |) |) |))). - Definition value_POW10TO16 : Value.t := + Definition value_POW10TO16 : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ Value.Integer Integer.U32 1874919424; Value.Integer Integer.U32 2328306 ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1874919424 |)); + A.to_value (M.of_value (| Value.Integer 2328306 |)) + ] + |) |) |))). - Definition value_POW10TO32 : Value.t := + Definition value_POW10TO32 : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 2242703233; - Value.Integer Integer.U32 762134875; - Value.Integer Integer.U32 1262 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2242703233 |)); + A.to_value (M.of_value (| Value.Integer 762134875 |)); + A.to_value (M.of_value (| Value.Integer 1262 |)) + ] + |) |) |))). - Definition value_POW10TO64 : Value.t := + Definition value_POW10TO64 : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 3211403009; - Value.Integer Integer.U32 1849224548; - Value.Integer Integer.U32 3668416493; - Value.Integer Integer.U32 3913284084; - Value.Integer Integer.U32 1593091 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3211403009 |)); + A.to_value (M.of_value (| Value.Integer 1849224548 |)); + A.to_value (M.of_value (| Value.Integer 3668416493 |)); + A.to_value (M.of_value (| Value.Integer 3913284084 |)); + A.to_value (M.of_value (| Value.Integer 1593091 |)) + ] + |) |) |))). - Definition value_POW10TO128 : Value.t := + Definition value_POW10TO128 : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 781532673; - Value.Integer Integer.U32 64985353; - Value.Integer Integer.U32 253049085; - Value.Integer Integer.U32 594863151; - Value.Integer Integer.U32 3553621484; - Value.Integer Integer.U32 3288652808; - Value.Integer Integer.U32 3167596762; - Value.Integer Integer.U32 2788392729; - Value.Integer Integer.U32 3911132675; - Value.Integer Integer.U32 590 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 781532673 |)); + A.to_value (M.of_value (| Value.Integer 64985353 |)); + A.to_value (M.of_value (| Value.Integer 253049085 |)); + A.to_value (M.of_value (| Value.Integer 594863151 |)); + A.to_value (M.of_value (| Value.Integer 3553621484 |)); + A.to_value (M.of_value (| Value.Integer 3288652808 |)); + A.to_value (M.of_value (| Value.Integer 3167596762 |)); + A.to_value (M.of_value (| Value.Integer 2788392729 |)); + A.to_value (M.of_value (| Value.Integer 3911132675 |)); + A.to_value (M.of_value (| Value.Integer 590 |)) + ] + |) |) |))). - Definition value_POW10TO256 : Value.t := + Definition value_POW10TO256 : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 2553183233; - Value.Integer Integer.U32 3201533787; - Value.Integer Integer.U32 3638140786; - Value.Integer Integer.U32 303378311; - Value.Integer Integer.U32 1809731782; - Value.Integer Integer.U32 3477761648; - Value.Integer Integer.U32 3583367183; - Value.Integer Integer.U32 649228654; - Value.Integer Integer.U32 2915460784; - Value.Integer Integer.U32 487929380; - Value.Integer Integer.U32 1011012442; - Value.Integer Integer.U32 1677677582; - Value.Integer Integer.U32 3428152256; - Value.Integer Integer.U32 1710878487; - Value.Integer Integer.U32 1438394610; - Value.Integer Integer.U32 2161952759; - Value.Integer Integer.U32 4100910556; - Value.Integer Integer.U32 1608314830; - Value.Integer Integer.U32 349175 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2553183233 |)); + A.to_value (M.of_value (| Value.Integer 3201533787 |)); + A.to_value (M.of_value (| Value.Integer 3638140786 |)); + A.to_value (M.of_value (| Value.Integer 303378311 |)); + A.to_value (M.of_value (| Value.Integer 1809731782 |)); + A.to_value (M.of_value (| Value.Integer 3477761648 |)); + A.to_value (M.of_value (| Value.Integer 3583367183 |)); + A.to_value (M.of_value (| Value.Integer 649228654 |)); + A.to_value (M.of_value (| Value.Integer 2915460784 |)); + A.to_value (M.of_value (| Value.Integer 487929380 |)); + A.to_value (M.of_value (| Value.Integer 1011012442 |)); + A.to_value (M.of_value (| Value.Integer 1677677582 |)); + A.to_value (M.of_value (| Value.Integer 3428152256 |)); + A.to_value (M.of_value (| Value.Integer 1710878487 |)); + A.to_value (M.of_value (| Value.Integer 1438394610 |)); + A.to_value (M.of_value (| Value.Integer 2161952759 |)); + A.to_value (M.of_value (| Value.Integer 4100910556 |)); + A.to_value (M.of_value (| Value.Integer 1608314830 |)); + A.to_value (M.of_value (| Value.Integer 349175 |)) + ] + |) |) |))). @@ -180,7 +197,7 @@ Module num. x } *) - Definition mul_pow10 (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_pow10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; n ] => ltac:(M.monadic @@ -189,26 +206,28 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| n |)) - (Value.Integer Integer.Usize 512)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| n |), + M.of_value (| Value.Integer 512 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -219,31 +238,40 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: n < 512" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: n < 512" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| n |)) - (Value.Integer Integer.Usize 7)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| n |), + M.of_value (| Value.Integer 7 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -265,33 +293,36 @@ Module num. |) |), M.alloc (| - BinOp.Pure.bit_and - (M.read (| n |)) - (Value.Integer Integer.Usize 7) + BinOp.Pure.bit_and (| + M.read (| n |), + M.of_value (| Value.Integer 7 |) + |) |) |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| n |)) - (Value.Integer Integer.Usize 8)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| n |), + M.of_value (| Value.Integer 8 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -312,30 +343,32 @@ Module num. "core::num::flt2dec::strategy::dragon::POW10" |) |), - M.alloc (| Value.Integer Integer.Usize 8 |) + M.alloc (| M.of_value (| Value.Integer 8 |) |) |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| n |)) - (Value.Integer Integer.Usize 16)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| n |), + M.of_value (| Value.Integer 16 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -350,33 +383,36 @@ Module num. [ M.read (| x |); (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.get_constant (| "core::num::flt2dec::strategy::dragon::POW10TO16" |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| n |)) - (Value.Integer Integer.Usize 32)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| n |), + M.of_value (| Value.Integer 32 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -391,33 +427,36 @@ Module num. [ M.read (| x |); (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.get_constant (| "core::num::flt2dec::strategy::dragon::POW10TO32" |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| n |)) - (Value.Integer Integer.Usize 64)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| n |), + M.of_value (| Value.Integer 64 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -432,33 +471,36 @@ Module num. [ M.read (| x |); (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.get_constant (| "core::num::flt2dec::strategy::dragon::POW10TO64" |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| n |)) - (Value.Integer Integer.Usize 128)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| n |), + M.of_value (| Value.Integer 128 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -473,33 +515,36 @@ Module num. [ M.read (| x |); (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.get_constant (| "core::num::flt2dec::strategy::dragon::POW10TO128" |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| n |)) - (Value.Integer Integer.Usize 256)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| n |), + M.of_value (| Value.Integer 256 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -514,17 +559,18 @@ Module num. [ M.read (| x |); (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.get_constant (| "core::num::flt2dec::strategy::dragon::POW10TO256" |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.read (| x |) |) @@ -543,7 +589,7 @@ Module num. x } *) - Definition div_2pow10 (τ : list Ty.t) (α : list Value.t) : M := + Definition div_2pow10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; n ] => ltac:(M.monadic @@ -553,6 +599,7 @@ Module num. let largest := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u32" ], @@ -561,27 +608,28 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.get_constant (| "core::num::flt2dec::strategy::dragon::POW10" |) - |)) + |) + |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| n |)) (M.read (| largest |)) + BinOp.Pure.gt (| M.read (| n |), M.read (| largest |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -615,9 +663,13 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), M.read (| largest |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.read (| largest |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -627,7 +679,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -689,7 +741,7 @@ Module num. (d, x) } *) - Definition div_rem_upto_16 (τ : list Ty.t) (α : list Value.t) : M := + Definition div_rem_upto_16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; scale; scale2; scale4; scale8 ] => ltac:(M.monadic @@ -699,10 +751,10 @@ Module num. let scale4 := M.alloc (| scale4 |) in let scale8 := M.alloc (| scale8 |) in M.read (| - let d := M.alloc (| Value.Integer Integer.U8 0 |) in + let d := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -737,15 +789,19 @@ Module num. let β := d in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U8 8 |) + BinOp.Panic.add (| + Integer.U8, + M.read (| β |), + M.of_value (| Value.Integer 8 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -780,15 +836,19 @@ Module num. let β := d in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U8 4 |) + BinOp.Panic.add (| + Integer.U8, + M.read (| β |), + M.of_value (| Value.Integer 4 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -823,15 +883,19 @@ Module num. let β := d in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U8 2 |) + BinOp.Panic.add (| + Integer.U8, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -866,32 +930,36 @@ Module num. let β := d in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U8 1 |) + BinOp.Panic.add (| + Integer.U8, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Ty.path "core::num::bignum::Big32x40", @@ -900,7 +968,8 @@ Module num. [] |), [ M.read (| x |); M.read (| scale |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -913,20 +982,27 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: *x < *scale" + M.of_value (| + Value.String "assertion failed: *x < *scale" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [ M.read (| d |); M.read (| x |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| d |)); A.to_value (M.read (| x |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -1091,7 +1167,7 @@ Module num. (unsafe { MaybeUninit::slice_assume_init_ref(&buf[..i]) }, k) } *) - Definition format_shortest (τ : list Ty.t) (α : list Value.t) : M := + Definition format_shortest (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d; buf ] => ltac:(M.monadic @@ -1100,23 +1176,25 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1124,32 +1202,38 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.mant > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: d.mant > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "minus" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1157,32 +1241,38 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.minus > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: d.minus > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "plus" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1190,24 +1280,28 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.plus > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: d.plus > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u64" ], "is_some", @@ -1240,7 +1334,8 @@ Module num. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1250,27 +1345,29 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: d.mant.checked_add(d.plus).is_some()" + M.of_value (| + Value.String + "assertion failed: d.mant.checked_add(d.plus).is_some()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u64" ], "is_some", @@ -1303,7 +1400,8 @@ Module num. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1313,28 +1411,30 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: d.mant.checked_sub(d.minus).is_some()" + M.of_value (| + Value.String + "assertion failed: d.mant.checked_sub(d.minus).is_some()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1347,10 +1447,12 @@ Module num. [] |), [ M.read (| buf |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::flt2dec::MAX_SIG_DIGITS" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1360,19 +1462,21 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: buf.len() >= MAX_SIG_DIGITS" + M.of_value (| + Value.String "assertion failed: buf.len() >= MAX_SIG_DIGITS" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let rounding := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1385,10 +1489,14 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))) ] |) |) in @@ -1401,6 +1509,7 @@ Module num. |), [ BinOp.Panic.add (| + Integer.U64, M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), @@ -1491,27 +1600,28 @@ Module num. "from_small", [] |), - [ Value.Integer Integer.U32 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "exp" |) - |)) - (Value.Integer Integer.I16 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1525,8 +1635,9 @@ Module num. |), [ scale; - M.rust_cast - (UnOp.Panic.neg (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I16, M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), @@ -1534,11 +1645,12 @@ Module num. "exp" |) |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1551,14 +1663,15 @@ Module num. |), [ mant; - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "exp" |) - |)) + |) + |) ] |) |) in @@ -1572,14 +1685,15 @@ Module num. |), [ minus; - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "exp" |) - |)) + |) + |) ] |) |) in @@ -1593,30 +1707,31 @@ Module num. |), [ plus; - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "exp" |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| k |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| M.read (| k |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1627,10 +1742,10 @@ Module num. "core::num::flt2dec::strategy::dragon::mul_pow10", [] |), - [ scale; M.rust_cast (M.read (| k |)) ] + [ scale; M.rust_cast (| M.read (| k |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1640,7 +1755,10 @@ Module num. "core::num::flt2dec::strategy::dragon::mul_pow10", [] |), - [ mant; M.rust_cast (UnOp.Panic.neg (| M.read (| k |) |)) ] + [ + mant; + M.rust_cast (| UnOp.Panic.neg (| Integer.I16, M.read (| k |) |) |) + ] |) |) in let _ := @@ -1650,7 +1768,10 @@ Module num. "core::num::flt2dec::strategy::dragon::mul_pow10", [] |), - [ minus; M.rust_cast (UnOp.Panic.neg (| M.read (| k |) |)) ] + [ + minus; + M.rust_cast (| UnOp.Panic.neg (| Integer.I16, M.read (| k |) |) |) + ] |) |) in let _ := @@ -1660,15 +1781,18 @@ Module num. "core::num::flt2dec::strategy::dragon::mul_pow10", [] |), - [ plus; M.rust_cast (UnOp.Panic.neg (| M.read (| k |) |)) ] + [ + plus; + M.rust_cast (| UnOp.Panic.neg (| Integer.I16, M.read (| k |) |) |) + ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1730,9 +1854,13 @@ Module num. let β := k in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I16 1 |) + BinOp.Panic.add (| + Integer.I16, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1743,7 +1871,7 @@ Module num. "mul_small", [] |), - [ mant; Value.Integer Integer.U32 10 ] + [ mant; M.of_value (| Value.Integer 10 |) ] |) |) in let _ := @@ -1754,7 +1882,7 @@ Module num. "mul_small", [] |), - [ minus; Value.Integer Integer.U32 10 ] + [ minus; M.of_value (| Value.Integer 10 |) ] |) |) in let _ := @@ -1765,10 +1893,10 @@ Module num. "mul_small", [] |), - [ plus; Value.Integer Integer.U32 10 ] + [ plus; M.of_value (| Value.Integer 10 |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let scale2 := @@ -1792,7 +1920,7 @@ Module num. "mul_pow2", [] |), - [ scale2; Value.Integer Integer.Usize 1 ] + [ scale2; M.of_value (| Value.Integer 1 |) ] |) |) in let scale4 := @@ -1816,7 +1944,7 @@ Module num. "mul_pow2", [] |), - [ scale4; Value.Integer Integer.Usize 2 ] + [ scale4; M.of_value (| Value.Integer 2 |) ] |) |) in let scale8 := @@ -1840,12 +1968,12 @@ Module num. "mul_pow2", [] |), - [ scale8; Value.Integer Integer.Usize 3 ] + [ scale8; M.of_value (| Value.Integer 3 |) ] |) |) in - let down := M.copy (| Value.DeclaredButUndefined |) in - let up := M.copy (| Value.DeclaredButUndefined |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let down := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in + let up := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic @@ -1867,11 +1995,12 @@ Module num. let d := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1879,17 +2008,19 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| d |)) - (Value.Integer Integer.U8 10)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| d |), + M.of_value (| Value.Integer 10 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1905,18 +2036,24 @@ Module num. |), [ M.read (| - Value.String "assertion failed: d < 10" + M.of_value (| + Value.String + "assertion failed: d < 10" + |) |) ] |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1932,7 +2069,8 @@ Module num. |), [ BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), + Integer.U8, + M.read (| M.of_value (| UnsupportedLiteral |) |), M.read (| d |) |) ] @@ -1943,8 +2081,9 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -2029,7 +2168,7 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2049,7 +2188,9 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2060,7 +2201,7 @@ Module num. "mul_small", [] |), - [ mant; Value.Integer Integer.U32 10 ] + [ mant; M.of_value (| Value.Integer 10 |) ] |) |) in let _ := @@ -2071,7 +2212,7 @@ Module num. "mul_small", [] |), - [ minus; Value.Integer Integer.U32 10 ] + [ minus; M.of_value (| Value.Integer 10 |) ] |) |) in let _ := @@ -2082,16 +2223,16 @@ Module num. "mul_small", [] |), - [ plus; Value.Integer Integer.U32 10 ] + [ plus; M.of_value (| Value.Integer 10 |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2102,7 +2243,7 @@ Module num. M.read (| up |), ltac:(M.monadic (LogicalOp.or (| - UnOp.Pure.not (M.read (| down |)), + UnOp.Pure.not (| M.read (| down |) |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -2119,7 +2260,7 @@ Module num. "mul_pow2", [] |), - [ mant; Value.Integer Integer.Usize 1 ] + [ mant; M.of_value (| Value.Integer 1 |) ] |); scale ] @@ -2130,7 +2271,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2169,9 +2310,11 @@ Module num. |), [ M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| i |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| i |))) ] + |) ] |) ] @@ -2205,8 +2348,9 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -2214,55 +2358,65 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I16, M.read (| β |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ] - ], - [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ], + "slice_assume_init_ref", [] |), [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| i |)) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| i |))) ] + |) + ] + |) ] - |) - ] - |); - M.read (| k |) - ] + |)); + A.to_value (M.read (| k |)) + ] + |) |) |))) | _, _ => M.impossible @@ -2398,7 +2552,7 @@ Module num. (unsafe { MaybeUninit::slice_assume_init_ref(&buf[..len]) }, k) } *) - Definition format_exact (τ : list Ty.t) (α : list Value.t) : M := + Definition format_exact (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d; buf; limit ] => ltac:(M.monadic @@ -2410,23 +2564,25 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2437,32 +2593,38 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.mant > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: d.mant > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "minus" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2473,32 +2635,40 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.minus > 0" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: d.minus > 0" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "plus" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2509,24 +2679,28 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.plus > 0" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: d.plus > 0" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -2561,7 +2735,8 @@ Module num. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2574,27 +2749,29 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: d.mant.checked_add(d.plus).is_some()" + M.of_value (| + Value.String + "assertion failed: d.mant.checked_add(d.plus).is_some()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -2629,7 +2806,8 @@ Module num. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2642,14 +2820,16 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: d.mant.checked_sub(d.minus).is_some()" + M.of_value (| + Value.String + "assertion failed: d.mant.checked_sub(d.minus).is_some()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let k := @@ -2704,27 +2884,28 @@ Module num. "from_small", [] |), - [ Value.Integer Integer.U32 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "exp" |) - |)) - (Value.Integer Integer.I16 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2741,8 +2922,9 @@ Module num. |), [ scale; - M.rust_cast - (UnOp.Panic.neg (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I16, M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), @@ -2750,11 +2932,12 @@ Module num. "exp" |) |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -2767,30 +2950,34 @@ Module num. |), [ mant; - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "exp" |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| k |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ge (| + M.read (| k |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2804,10 +2991,10 @@ Module num. "core::num::flt2dec::strategy::dragon::mul_pow10", [] |), - [ scale; M.rust_cast (M.read (| k |)) ] + [ scale; M.rust_cast (| M.read (| k |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -2817,15 +3004,20 @@ Module num. "core::num::flt2dec::strategy::dragon::mul_pow10", [] |), - [ mant; M.rust_cast (UnOp.Panic.neg (| M.read (| k |) |)) ] + [ + mant; + M.rust_cast (| + UnOp.Panic.neg (| Integer.I16, M.read (| k |) |) + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2899,9 +3091,13 @@ Module num. let β := k in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I16 1 |) + BinOp.Panic.add (| + Integer.I16, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -2912,47 +3108,49 @@ Module num. "mul_small", [] |), - [ mant; Value.Integer Integer.U32 10 ] + [ mant; M.of_value (| Value.Integer 10 |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| k |)) (M.read (| limit |)) + BinOp.Pure.lt (| M.read (| k |), M.read (| limit |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.rust_cast - (BinOp.Panic.sub (| - M.rust_cast (M.read (| k |)), - M.rust_cast (M.read (| limit |)) - |))) - (M.call_closure (| + BinOp.Pure.lt (| + M.rust_cast (| + BinOp.Panic.sub (| + Integer.I32, + M.rust_cast (| M.read (| k |) |), + M.rust_cast (| M.read (| limit |) |) + |) + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -2966,7 +3164,8 @@ Module num. [] |), [ M.read (| buf |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2974,11 +3173,13 @@ Module num. Value.Bool true |) in M.alloc (| - M.rust_cast - (BinOp.Panic.sub (| + M.rust_cast (| + BinOp.Panic.sub (| + Integer.I16, M.read (| k |), M.read (| limit |) - |)) + |) + |) |))); fun γ => ltac:(M.monadic @@ -3005,14 +3206,17 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| len |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3040,7 +3244,7 @@ Module num. "mul_pow2", [] |), - [ scale2; Value.Integer Integer.Usize 1 ] + [ scale2; M.of_value (| Value.Integer 1 |) ] |) |) in let scale4 := @@ -3064,7 +3268,7 @@ Module num. "mul_pow2", [] |), - [ scale4; Value.Integer Integer.Usize 2 ] + [ scale4; M.of_value (| Value.Integer 2 |) ] |) |) in let scale8 := @@ -3088,7 +3292,7 @@ Module num. "mul_pow2", [] |), - [ scale8; Value.Integer Integer.Usize 3 ] + [ scale8; M.of_value (| Value.Integer 3 |) ] |) |) in M.use @@ -3105,12 +3309,15 @@ Module num. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) ] |) |), @@ -3155,7 +3362,9 @@ Module num. let i := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic @@ -3239,18 +3448,22 @@ Module num. M.read (| buf |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - i - |)); - ("end_", - M.read (| - len - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + i + |))); + ("end_", + A.to_value + (M.read (| + len + |))) + ] + |) ] |) ] @@ -3335,96 +3548,116 @@ Module num. |), [ M.read (| - UnsupportedLiteral + M.of_value (| + UnsupportedLiteral + |) |) ] |) |) in M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |) in M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) |))) ] |)) in M.return_ (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path - "slice") - [ - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ - Ty.path - "u8" - ] + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ], - [ - Ty.apply - (Ty.path - "core::ops::range::RangeTo") - [ - Ty.path - "usize" - ] - ], - "index", + "slice_assume_init_ref", [] |), [ - M.read (| - buf - |); - Value.StructRecord - "core::ops::range::RangeTo" + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path + "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ + Ty.path + "u8" + ] + ], + [ + Ty.apply + (Ty.path + "core::ops::range::RangeTo") + [ + Ty.path + "usize" + ] + ], + "index", + [] + |), [ - ("end_", - M.read (| - len - |)) + M.read (| + buf + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + len + |))) + ] + |) ] + |) ] - |) - ] - |); - M.read (| k |) - ] + |)); + A.to_value + (M.read (| k |)) + ] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let d := - M.alloc (| Value.Integer Integer.U8 0 |) in + M.alloc (| + M.of_value (| Value.Integer 0 |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic @@ -3468,19 +3701,28 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U8, M.read (| β |), - Value.Integer Integer.U8 8 + M.of_value (| + Value.Integer 8 + |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic @@ -3524,19 +3766,28 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U8, M.read (| β |), - Value.Integer Integer.U8 4 + M.of_value (| + Value.Integer 4 + |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic @@ -3580,19 +3831,28 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U8, M.read (| β |), - Value.Integer Integer.U8 2 + M.of_value (| + Value.Integer 2 + |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic @@ -3636,26 +3896,37 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U8, M.read (| β |), - Value.Integer Integer.U8 1 + M.of_value (| + Value.Integer 1 + |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3664,15 +3935,19 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Ty.path @@ -3685,7 +3960,8 @@ Module num. [] |), [ mant; scale ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3701,8 +3977,10 @@ Module num. |), [ M.read (| - Value.String - "assertion failed: mant < scale" + M.of_value (| + Value.String + "assertion failed: mant < scale" + |) |) ] |) @@ -3711,26 +3989,36 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3739,19 +4027,26 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| d |)) - (Value.Integer - Integer.U8 - 10)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| d |), + M.of_value (| + Value.Integer + 10 + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3767,8 +4062,10 @@ Module num. |), [ M.read (| - Value.String - "assertion failed: d < 10" + M.of_value (| + Value.String + "assertion failed: d < 10" + |) |) ] |) @@ -3777,14 +4074,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -3804,7 +4107,12 @@ Module num. |), [ BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), + Integer.U8, + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |), M.read (| d |) |) ] @@ -3818,17 +4126,22 @@ Module num. "mul_small", [] |), - [ mant; Value.Integer Integer.U32 10 ] + [ + mant; + M.of_value (| Value.Integer 10 |) + ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let order := @@ -3849,14 +4162,14 @@ Module num. "mul_small", [] |), - [ scale; Value.Integer Integer.U32 5 ] + [ scale; M.of_value (| Value.Integer 5 |) ] |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3875,7 +4188,9 @@ Module num. [ order; M.alloc (| - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) |) ] |), @@ -3893,19 +4208,24 @@ Module num. [ order; M.alloc (| - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) |) ] |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| len |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.gt (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.call_closure (| + (BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -3920,16 +4240,19 @@ Module num. M.read (| buf |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) |) ] - |)) - (Value.Integer Integer.U8 1)) - (Value.Integer Integer.U8 1))) + |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |))) |))) |) |)) in @@ -3939,7 +4262,7 @@ Module num. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3978,9 +4301,12 @@ Module num. |), [ M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| len |))) + ] + |) ] |) ] @@ -4000,12 +4326,13 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I16, M.read (| β |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4013,13 +4340,14 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| k |)) - (M.read (| limit |)), + BinOp.Pure.gt (| + M.read (| k |), + M.read (| limit |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| len |)) - (M.call_closure (| + (BinOp.Pure.lt (| + M.read (| len |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -4033,7 +4361,8 @@ Module num. [] |), [ M.read (| buf |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -4064,61 +4393,70 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply - (Ty.path "slice") - [ - Ty.apply - (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ], + "slice_assume_init_ref", [] |), [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| len |)) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ] + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| len |))) ] + |) + ] + |) ] - |) - ] - |); - M.read (| k |) - ] + |)); + A.to_value (M.read (| k |)) + ] + |) |) |))) |))) diff --git a/CoqOfRust/core/num/flt2dec/strategy/grisu.v b/CoqOfRust/core/num/flt2dec/strategy/grisu.v index 0e5aa8801..7ada65375 100644 --- a/CoqOfRust/core/num/flt2dec/strategy/grisu.v +++ b/CoqOfRust/core/num/flt2dec/strategy/grisu.v @@ -5,514 +5,759 @@ Module num. Module flt2dec. Module strategy. Module grisu. - Definition value_ALPHA : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I16 (-60) |))). + Definition value_ALPHA : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-60) |) |))). - Definition value_GAMMA : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I16 (-32) |))). + Definition value_GAMMA : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-32) |) |))). - Definition value_CACHED_POW10 : Value.t := + Definition value_CACHED_POW10 : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Tuple - [ - Value.Integer Integer.U64 16580792590934885855; - Value.Integer Integer.I16 (-1087); - Value.Integer Integer.I16 (-308) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12353653155963782858; - Value.Integer Integer.I16 (-1060); - Value.Integer Integer.I16 (-300) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18408377700990114895; - Value.Integer Integer.I16 (-1034); - Value.Integer Integer.I16 (-292) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13715310171984221708; - Value.Integer Integer.I16 (-1007); - Value.Integer Integer.I16 (-284) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10218702384817765436; - Value.Integer Integer.I16 (-980); - Value.Integer Integer.I16 (-276) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15227053142812498563; - Value.Integer Integer.I16 (-954); - Value.Integer Integer.I16 (-268) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11345038669416679861; - Value.Integer Integer.I16 (-927); - Value.Integer Integer.I16 (-260) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16905424996341287883; - Value.Integer Integer.I16 (-901); - Value.Integer Integer.I16 (-252) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12595523146049147757; - Value.Integer Integer.I16 (-874); - Value.Integer Integer.I16 (-244) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9384396036005875287; - Value.Integer Integer.I16 (-847); - Value.Integer Integer.I16 (-236) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13983839803942852151; - Value.Integer Integer.I16 (-821); - Value.Integer Integer.I16 (-228) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10418772551374772303; - Value.Integer Integer.I16 (-794); - Value.Integer Integer.I16 (-220) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15525180923007089351; - Value.Integer Integer.I16 (-768); - Value.Integer Integer.I16 (-212) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11567161174868858868; - Value.Integer Integer.I16 (-741); - Value.Integer Integer.I16 (-204) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17236413322193710309; - Value.Integer Integer.I16 (-715); - Value.Integer Integer.I16 (-196) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12842128665889583758; - Value.Integer Integer.I16 (-688); - Value.Integer Integer.I16 (-188) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9568131466127621947; - Value.Integer Integer.I16 (-661); - Value.Integer Integer.I16 (-180) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14257626930069360058; - Value.Integer Integer.I16 (-635); - Value.Integer Integer.I16 (-172) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10622759856335341974; - Value.Integer Integer.I16 (-608); - Value.Integer Integer.I16 (-164) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15829145694278690180; - Value.Integer Integer.I16 (-582); - Value.Integer Integer.I16 (-156) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11793632577567316726; - Value.Integer Integer.I16 (-555); - Value.Integer Integer.I16 (-148) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17573882009934360870; - Value.Integer Integer.I16 (-529); - Value.Integer Integer.I16 (-140) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13093562431584567480; - Value.Integer Integer.I16 (-502); - Value.Integer Integer.I16 (-132) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9755464219737475723; - Value.Integer Integer.I16 (-475); - Value.Integer Integer.I16 (-124) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14536774485912137811; - Value.Integer Integer.I16 (-449); - Value.Integer Integer.I16 (-116) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10830740992659433045; - Value.Integer Integer.I16 (-422); - Value.Integer Integer.I16 (-108) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16139061738043178685; - Value.Integer Integer.I16 (-396); - Value.Integer Integer.I16 (-100) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12024538023802026127; - Value.Integer Integer.I16 (-369); - Value.Integer Integer.I16 (-92) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17917957937422433684; - Value.Integer Integer.I16 (-343); - Value.Integer Integer.I16 (-84) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13349918974505688015; - Value.Integer Integer.I16 (-316); - Value.Integer Integer.I16 (-76) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9946464728195732843; - Value.Integer Integer.I16 (-289); - Value.Integer Integer.I16 (-68) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14821387422376473014; - Value.Integer Integer.I16 (-263); - Value.Integer Integer.I16 (-60) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11042794154864902060; - Value.Integer Integer.I16 (-236); - Value.Integer Integer.I16 (-52) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16455045573212060422; - Value.Integer Integer.I16 (-210); - Value.Integer Integer.I16 (-44) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12259964326927110867; - Value.Integer Integer.I16 (-183); - Value.Integer Integer.I16 (-36) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18268770466636286478; - Value.Integer Integer.I16 (-157); - Value.Integer Integer.I16 (-28) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13611294676837538539; - Value.Integer Integer.I16 (-130); - Value.Integer Integer.I16 (-20) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10141204801825835212; - Value.Integer Integer.I16 (-103); - Value.Integer Integer.I16 (-12) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15111572745182864684; - Value.Integer Integer.I16 (-77); - Value.Integer Integer.I16 (-4) - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11258999068426240000; - Value.Integer Integer.I16 (-50); - Value.Integer Integer.I16 4 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16777216000000000000; - Value.Integer Integer.I16 (-24); - Value.Integer Integer.I16 12 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12500000000000000000; - Value.Integer Integer.I16 3; - Value.Integer Integer.I16 20 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9313225746154785156; - Value.Integer Integer.I16 30; - Value.Integer Integer.I16 28 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13877787807814456755; - Value.Integer Integer.I16 56; - Value.Integer Integer.I16 36 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10339757656912845936; - Value.Integer Integer.I16 83; - Value.Integer Integer.I16 44 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15407439555097886824; - Value.Integer Integer.I16 109; - Value.Integer Integer.I16 52 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11479437019748901445; - Value.Integer Integer.I16 136; - Value.Integer Integer.I16 60 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17105694144590052135; - Value.Integer Integer.I16 162; - Value.Integer Integer.I16 68 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12744735289059618216; - Value.Integer Integer.I16 189; - Value.Integer Integer.I16 76 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9495567745759798747; - Value.Integer Integer.I16 216; - Value.Integer Integer.I16 84 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14149498560666738074; - Value.Integer Integer.I16 242; - Value.Integer Integer.I16 92 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10542197943230523224; - Value.Integer Integer.I16 269; - Value.Integer Integer.I16 100 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15709099088952724970; - Value.Integer Integer.I16 295; - Value.Integer Integer.I16 108 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11704190886730495818; - Value.Integer Integer.I16 322; - Value.Integer Integer.I16 116 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17440603504673385349; - Value.Integer Integer.I16 348; - Value.Integer Integer.I16 124 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12994262207056124023; - Value.Integer Integer.I16 375; - Value.Integer Integer.I16 132 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9681479787123295682; - Value.Integer Integer.I16 402; - Value.Integer Integer.I16 140 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14426529090290212157; - Value.Integer Integer.I16 428; - Value.Integer Integer.I16 148 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10748601772107342003; - Value.Integer Integer.I16 455; - Value.Integer Integer.I16 156 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16016664761464807395; - Value.Integer Integer.I16 481; - Value.Integer Integer.I16 164 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11933345169920330789; - Value.Integer Integer.I16 508; - Value.Integer Integer.I16 172 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 17782069995880619868; - Value.Integer Integer.I16 534; - Value.Integer Integer.I16 180 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13248674568444952270; - Value.Integer Integer.I16 561; - Value.Integer Integer.I16 188 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9871031767461413346; - Value.Integer Integer.I16 588; - Value.Integer Integer.I16 196 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14708983551653345445; - Value.Integer Integer.I16 614; - Value.Integer Integer.I16 204 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10959046745042015199; - Value.Integer Integer.I16 641; - Value.Integer Integer.I16 212 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16330252207878254650; - Value.Integer Integer.I16 667; - Value.Integer Integer.I16 220 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12166986024289022870; - Value.Integer Integer.I16 694; - Value.Integer Integer.I16 228 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 18130221999122236476; - Value.Integer Integer.I16 720; - Value.Integer Integer.I16 236 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13508068024458167312; - Value.Integer Integer.I16 747; - Value.Integer Integer.I16 244 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10064294952495520794; - Value.Integer Integer.I16 774; - Value.Integer Integer.I16 252 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 14996968138956309548; - Value.Integer Integer.I16 800; - Value.Integer Integer.I16 260 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11173611982879273257; - Value.Integer Integer.I16 827; - Value.Integer Integer.I16 268 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16649979327439178909; - Value.Integer Integer.I16 853; - Value.Integer Integer.I16 276 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 12405201291620119593; - Value.Integer Integer.I16 880; - Value.Integer Integer.I16 284 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 9242595204427927429; - Value.Integer Integer.I16 907; - Value.Integer Integer.I16 292 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 13772540099066387757; - Value.Integer Integer.I16 933; - Value.Integer Integer.I16 300 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 10261342003245940623; - Value.Integer Integer.I16 960; - Value.Integer Integer.I16 308 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 15290591125556738113; - Value.Integer Integer.I16 986; - Value.Integer Integer.I16 316 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 11392378155556871081; - Value.Integer Integer.I16 1013; - Value.Integer Integer.I16 324 - ]; - Value.Tuple - [ - Value.Integer Integer.U64 16975966327722178521; - Value.Integer Integer.I16 1039; - Value.Integer Integer.I16 332 - ] - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16580792590934885855 |)); + A.to_value (M.of_value (| Value.Integer (-1087) |)); + A.to_value (M.of_value (| Value.Integer (-308) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12353653155963782858 |)); + A.to_value (M.of_value (| Value.Integer (-1060) |)); + A.to_value (M.of_value (| Value.Integer (-300) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18408377700990114895 |)); + A.to_value (M.of_value (| Value.Integer (-1034) |)); + A.to_value (M.of_value (| Value.Integer (-292) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13715310171984221708 |)); + A.to_value (M.of_value (| Value.Integer (-1007) |)); + A.to_value (M.of_value (| Value.Integer (-284) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10218702384817765436 |)); + A.to_value (M.of_value (| Value.Integer (-980) |)); + A.to_value (M.of_value (| Value.Integer (-276) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15227053142812498563 |)); + A.to_value (M.of_value (| Value.Integer (-954) |)); + A.to_value (M.of_value (| Value.Integer (-268) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11345038669416679861 |)); + A.to_value (M.of_value (| Value.Integer (-927) |)); + A.to_value (M.of_value (| Value.Integer (-260) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16905424996341287883 |)); + A.to_value (M.of_value (| Value.Integer (-901) |)); + A.to_value (M.of_value (| Value.Integer (-252) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12595523146049147757 |)); + A.to_value (M.of_value (| Value.Integer (-874) |)); + A.to_value (M.of_value (| Value.Integer (-244) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9384396036005875287 |)); + A.to_value (M.of_value (| Value.Integer (-847) |)); + A.to_value (M.of_value (| Value.Integer (-236) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13983839803942852151 |)); + A.to_value (M.of_value (| Value.Integer (-821) |)); + A.to_value (M.of_value (| Value.Integer (-228) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10418772551374772303 |)); + A.to_value (M.of_value (| Value.Integer (-794) |)); + A.to_value (M.of_value (| Value.Integer (-220) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15525180923007089351 |)); + A.to_value (M.of_value (| Value.Integer (-768) |)); + A.to_value (M.of_value (| Value.Integer (-212) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11567161174868858868 |)); + A.to_value (M.of_value (| Value.Integer (-741) |)); + A.to_value (M.of_value (| Value.Integer (-204) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17236413322193710309 |)); + A.to_value (M.of_value (| Value.Integer (-715) |)); + A.to_value (M.of_value (| Value.Integer (-196) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12842128665889583758 |)); + A.to_value (M.of_value (| Value.Integer (-688) |)); + A.to_value (M.of_value (| Value.Integer (-188) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9568131466127621947 |)); + A.to_value (M.of_value (| Value.Integer (-661) |)); + A.to_value (M.of_value (| Value.Integer (-180) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14257626930069360058 |)); + A.to_value (M.of_value (| Value.Integer (-635) |)); + A.to_value (M.of_value (| Value.Integer (-172) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10622759856335341974 |)); + A.to_value (M.of_value (| Value.Integer (-608) |)); + A.to_value (M.of_value (| Value.Integer (-164) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15829145694278690180 |)); + A.to_value (M.of_value (| Value.Integer (-582) |)); + A.to_value (M.of_value (| Value.Integer (-156) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11793632577567316726 |)); + A.to_value (M.of_value (| Value.Integer (-555) |)); + A.to_value (M.of_value (| Value.Integer (-148) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17573882009934360870 |)); + A.to_value (M.of_value (| Value.Integer (-529) |)); + A.to_value (M.of_value (| Value.Integer (-140) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13093562431584567480 |)); + A.to_value (M.of_value (| Value.Integer (-502) |)); + A.to_value (M.of_value (| Value.Integer (-132) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9755464219737475723 |)); + A.to_value (M.of_value (| Value.Integer (-475) |)); + A.to_value (M.of_value (| Value.Integer (-124) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14536774485912137811 |)); + A.to_value (M.of_value (| Value.Integer (-449) |)); + A.to_value (M.of_value (| Value.Integer (-116) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10830740992659433045 |)); + A.to_value (M.of_value (| Value.Integer (-422) |)); + A.to_value (M.of_value (| Value.Integer (-108) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16139061738043178685 |)); + A.to_value (M.of_value (| Value.Integer (-396) |)); + A.to_value (M.of_value (| Value.Integer (-100) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12024538023802026127 |)); + A.to_value (M.of_value (| Value.Integer (-369) |)); + A.to_value (M.of_value (| Value.Integer (-92) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17917957937422433684 |)); + A.to_value (M.of_value (| Value.Integer (-343) |)); + A.to_value (M.of_value (| Value.Integer (-84) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13349918974505688015 |)); + A.to_value (M.of_value (| Value.Integer (-316) |)); + A.to_value (M.of_value (| Value.Integer (-76) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9946464728195732843 |)); + A.to_value (M.of_value (| Value.Integer (-289) |)); + A.to_value (M.of_value (| Value.Integer (-68) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14821387422376473014 |)); + A.to_value (M.of_value (| Value.Integer (-263) |)); + A.to_value (M.of_value (| Value.Integer (-60) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11042794154864902060 |)); + A.to_value (M.of_value (| Value.Integer (-236) |)); + A.to_value (M.of_value (| Value.Integer (-52) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16455045573212060422 |)); + A.to_value (M.of_value (| Value.Integer (-210) |)); + A.to_value (M.of_value (| Value.Integer (-44) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12259964326927110867 |)); + A.to_value (M.of_value (| Value.Integer (-183) |)); + A.to_value (M.of_value (| Value.Integer (-36) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18268770466636286478 |)); + A.to_value (M.of_value (| Value.Integer (-157) |)); + A.to_value (M.of_value (| Value.Integer (-28) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13611294676837538539 |)); + A.to_value (M.of_value (| Value.Integer (-130) |)); + A.to_value (M.of_value (| Value.Integer (-20) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10141204801825835212 |)); + A.to_value (M.of_value (| Value.Integer (-103) |)); + A.to_value (M.of_value (| Value.Integer (-12) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15111572745182864684 |)); + A.to_value (M.of_value (| Value.Integer (-77) |)); + A.to_value (M.of_value (| Value.Integer (-4) |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11258999068426240000 |)); + A.to_value (M.of_value (| Value.Integer (-50) |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16777216000000000000 |)); + A.to_value (M.of_value (| Value.Integer (-24) |)); + A.to_value (M.of_value (| Value.Integer 12 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12500000000000000000 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 20 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9313225746154785156 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 28 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13877787807814456755 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 36 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10339757656912845936 |)); + A.to_value (M.of_value (| Value.Integer 83 |)); + A.to_value (M.of_value (| Value.Integer 44 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15407439555097886824 |)); + A.to_value (M.of_value (| Value.Integer 109 |)); + A.to_value (M.of_value (| Value.Integer 52 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11479437019748901445 |)); + A.to_value (M.of_value (| Value.Integer 136 |)); + A.to_value (M.of_value (| Value.Integer 60 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17105694144590052135 |)); + A.to_value (M.of_value (| Value.Integer 162 |)); + A.to_value (M.of_value (| Value.Integer 68 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12744735289059618216 |)); + A.to_value (M.of_value (| Value.Integer 189 |)); + A.to_value (M.of_value (| Value.Integer 76 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9495567745759798747 |)); + A.to_value (M.of_value (| Value.Integer 216 |)); + A.to_value (M.of_value (| Value.Integer 84 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14149498560666738074 |)); + A.to_value (M.of_value (| Value.Integer 242 |)); + A.to_value (M.of_value (| Value.Integer 92 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10542197943230523224 |)); + A.to_value (M.of_value (| Value.Integer 269 |)); + A.to_value (M.of_value (| Value.Integer 100 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15709099088952724970 |)); + A.to_value (M.of_value (| Value.Integer 295 |)); + A.to_value (M.of_value (| Value.Integer 108 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11704190886730495818 |)); + A.to_value (M.of_value (| Value.Integer 322 |)); + A.to_value (M.of_value (| Value.Integer 116 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17440603504673385349 |)); + A.to_value (M.of_value (| Value.Integer 348 |)); + A.to_value (M.of_value (| Value.Integer 124 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12994262207056124023 |)); + A.to_value (M.of_value (| Value.Integer 375 |)); + A.to_value (M.of_value (| Value.Integer 132 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9681479787123295682 |)); + A.to_value (M.of_value (| Value.Integer 402 |)); + A.to_value (M.of_value (| Value.Integer 140 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14426529090290212157 |)); + A.to_value (M.of_value (| Value.Integer 428 |)); + A.to_value (M.of_value (| Value.Integer 148 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10748601772107342003 |)); + A.to_value (M.of_value (| Value.Integer 455 |)); + A.to_value (M.of_value (| Value.Integer 156 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16016664761464807395 |)); + A.to_value (M.of_value (| Value.Integer 481 |)); + A.to_value (M.of_value (| Value.Integer 164 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11933345169920330789 |)); + A.to_value (M.of_value (| Value.Integer 508 |)); + A.to_value (M.of_value (| Value.Integer 172 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17782069995880619868 |)); + A.to_value (M.of_value (| Value.Integer 534 |)); + A.to_value (M.of_value (| Value.Integer 180 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13248674568444952270 |)); + A.to_value (M.of_value (| Value.Integer 561 |)); + A.to_value (M.of_value (| Value.Integer 188 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9871031767461413346 |)); + A.to_value (M.of_value (| Value.Integer 588 |)); + A.to_value (M.of_value (| Value.Integer 196 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14708983551653345445 |)); + A.to_value (M.of_value (| Value.Integer 614 |)); + A.to_value (M.of_value (| Value.Integer 204 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10959046745042015199 |)); + A.to_value (M.of_value (| Value.Integer 641 |)); + A.to_value (M.of_value (| Value.Integer 212 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16330252207878254650 |)); + A.to_value (M.of_value (| Value.Integer 667 |)); + A.to_value (M.of_value (| Value.Integer 220 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12166986024289022870 |)); + A.to_value (M.of_value (| Value.Integer 694 |)); + A.to_value (M.of_value (| Value.Integer 228 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18130221999122236476 |)); + A.to_value (M.of_value (| Value.Integer 720 |)); + A.to_value (M.of_value (| Value.Integer 236 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13508068024458167312 |)); + A.to_value (M.of_value (| Value.Integer 747 |)); + A.to_value (M.of_value (| Value.Integer 244 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10064294952495520794 |)); + A.to_value (M.of_value (| Value.Integer 774 |)); + A.to_value (M.of_value (| Value.Integer 252 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14996968138956309548 |)); + A.to_value (M.of_value (| Value.Integer 800 |)); + A.to_value (M.of_value (| Value.Integer 260 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11173611982879273257 |)); + A.to_value (M.of_value (| Value.Integer 827 |)); + A.to_value (M.of_value (| Value.Integer 268 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16649979327439178909 |)); + A.to_value (M.of_value (| Value.Integer 853 |)); + A.to_value (M.of_value (| Value.Integer 276 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12405201291620119593 |)); + A.to_value (M.of_value (| Value.Integer 880 |)); + A.to_value (M.of_value (| Value.Integer 284 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9242595204427927429 |)); + A.to_value (M.of_value (| Value.Integer 907 |)); + A.to_value (M.of_value (| Value.Integer 292 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13772540099066387757 |)); + A.to_value (M.of_value (| Value.Integer 933 |)); + A.to_value (M.of_value (| Value.Integer 300 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10261342003245940623 |)); + A.to_value (M.of_value (| Value.Integer 960 |)); + A.to_value (M.of_value (| Value.Integer 308 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15290591125556738113 |)); + A.to_value (M.of_value (| Value.Integer 986 |)); + A.to_value (M.of_value (| Value.Integer 316 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11392378155556871081 |)); + A.to_value (M.of_value (| Value.Integer 1013 |)); + A.to_value (M.of_value (| Value.Integer 324 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16975966327722178521 |)); + A.to_value (M.of_value (| Value.Integer 1039 |)); + A.to_value (M.of_value (| Value.Integer 332 |)) + ] + |)) + ] + |) |) |))). - Definition value_CACHED_POW10_FIRST_E : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I16 (-1087) |))). + Definition value_CACHED_POW10_FIRST_E : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer (-1087) |) |))). - Definition value_CACHED_POW10_LAST_E : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I16 1039 |))). + Definition value_CACHED_POW10_LAST_E : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1039 |) |))). (* pub fn cached_power(alpha: i16, gamma: i16) -> (i16, Fp) { @@ -525,7 +770,7 @@ Module num. (k, Fp { f, e }) } *) - Definition cached_power (τ : list Ty.t) (α : list Value.t) : M := + Definition cached_power (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ alpha; gamma ] => ltac:(M.monadic @@ -534,18 +779,20 @@ Module num. M.read (| let offset := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::CACHED_POW10_FIRST_E" |) - |)) + |) + |) |) in let range := M.alloc (| BinOp.Panic.sub (| - M.rust_cast - (M.call_closure (| + Integer.I32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -555,21 +802,24 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::CACHED_POW10" |) - |)) + |) + |) ] - |)), - Value.Integer Integer.I32 1 + |) + |), + M.of_value (| Value.Integer 1 |) |) |) in let domain := M.alloc (| - M.rust_cast - (BinOp.Panic.sub (| + M.rust_cast (| + BinOp.Panic.sub (| + Integer.I16, M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::CACHED_POW10_LAST_E" @@ -580,13 +830,20 @@ Module num. "core::num::flt2dec::strategy::grisu::CACHED_POW10_FIRST_E" |) |) - |)) + |) + |) |) in let idx := M.alloc (| BinOp.Panic.div (| + Integer.I32, BinOp.Panic.mul (| - BinOp.Panic.sub (| M.rust_cast (M.read (| gamma |)), M.read (| offset |) |), + Integer.I32, + BinOp.Panic.sub (| + Integer.I32, + M.rust_cast (| M.read (| gamma |) |), + M.read (| offset |) + |), M.read (| range |) |), M.read (| domain |) @@ -597,7 +854,7 @@ Module num. M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::CACHED_POW10" |) |), - M.alloc (| M.rust_cast (M.read (| idx |)) |) + M.alloc (| M.rust_cast (| M.read (| idx |) |) |) |), [ fun γ => @@ -610,11 +867,12 @@ Module num. let k := M.copy (| γ0_2 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -622,23 +880,26 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.le - (M.read (| alpha |)) - (M.read (| e |)), + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.le (| + M.read (| alpha |), + M.read (| e |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| e |)) - (M.read (| gamma |)))) - |)) + (BinOp.Pure.le (| + M.read (| e |), + M.read (| gamma |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -651,28 +912,41 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: alpha <= e && e <= gamma" + M.of_value (| + Value.String + "assertion failed: alpha <= e && e <= gamma" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.Tuple - [ - M.read (| k |); - Value.StructRecord - "core::num::diy_float::Fp" - [ ("f", M.read (| f |)); ("e", M.read (| e |)) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| k |)); + A.to_value + (M.of_value (| + Value.StructRecord + "core::num::diy_float::Fp" + [ + ("f", A.to_value (M.read (| f |))); + ("e", A.to_value (M.read (| e |))) + ] + |)) + ] + |) |))) ] |) @@ -711,7 +985,7 @@ Module num. } } *) - Definition max_pow10_no_more_than (τ : list Ty.t) (α : list Value.t) : M := + Definition max_pow10_no_more_than (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -719,26 +993,28 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| x |)) - (Value.Integer Integer.U32 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -749,50 +1025,59 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: x > 0" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: x > 0" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X4" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X2" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -800,20 +1085,21 @@ Module num. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X1" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -821,44 +1107,50 @@ Module num. Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U32 1 - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 1; - M.read (| - M.get_constant (| - "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X1" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.read (| + M.get_constant (| + "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X1" + |) + |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X3" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -866,28 +1158,34 @@ Module num. Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 2; - M.read (| - M.get_constant (| - "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X2" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value + (M.read (| + M.get_constant (| + "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X2" + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 3; - M.read (| - M.get_constant (| - "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X3" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value + (M.read (| + M.get_constant (| + "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X3" + |) + |)) + ] + |) |))) ] |))) @@ -896,20 +1194,21 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X6" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -917,20 +1216,21 @@ Module num. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X5" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -938,48 +1238,55 @@ Module num. Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 4; - M.read (| - M.get_constant (| - "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X4" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value + (M.read (| + M.get_constant (| + "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X4" + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 5; - M.read (| - M.get_constant (| - "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X5" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value + (M.read (| + M.get_constant (| + "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X5" + |) + |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X8" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -987,69 +1294,79 @@ Module num. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X7" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 6; - M.read (| - M.get_constant (| - "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X6" - |) - |) - ] + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| Value.Integer 6 |)); + A.to_value + (M.read (| + M.get_constant (| + "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X6" + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 7; - M.read (| - M.get_constant (| - "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X7" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| Value.Integer 7 |)); + A.to_value + (M.read (| + M.get_constant (| + "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X7" + |) + |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X9" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1057,28 +1374,36 @@ Module num. Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 8; - M.read (| - M.get_constant (| - "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X8" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| Value.Integer 8 |)); + A.to_value + (M.read (| + M.get_constant (| + "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X8" + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 9; - M.read (| - M.get_constant (| - "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X9" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| Value.Integer 9 |)); + A.to_value + (M.read (| + M.get_constant (| + "core::num::flt2dec::strategy::grisu::max_pow10_no_more_than::X9" + |) + |)) + ] + |) |))) ] |))) @@ -1093,32 +1418,32 @@ Module num. end. Module max_pow10_no_more_than. - Definition value_X9 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 1000000000 |))). + Definition value_X9 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1000000000 |) |))). - Definition value_X8 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 100000000 |))). + Definition value_X8 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 100000000 |) |))). - Definition value_X7 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 10000000 |))). + Definition value_X7 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10000000 |) |))). - Definition value_X6 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 1000000 |))). + Definition value_X6 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1000000 |) |))). - Definition value_X5 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 100000 |))). + Definition value_X5 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 100000 |) |))). - Definition value_X4 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 10000 |))). + Definition value_X4 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10000 |) |))). - Definition value_X3 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 1000 |))). + Definition value_X3 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1000 |) |))). - Definition value_X2 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 100 |))). + Definition value_X2 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 100 |) |))). - Definition value_X1 : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 10 |))). + Definition value_X1 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). End max_pow10_no_more_than. (* @@ -1408,7 +1733,7 @@ Module num. } } *) - Definition format_shortest_opt (τ : list Ty.t) (α : list Value.t) : M := + Definition format_shortest_opt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d; buf ] => ltac:(M.monadic @@ -1420,23 +1745,25 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1447,32 +1774,41 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.mant > 0" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: d.mant > 0" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "minus" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1483,32 +1819,41 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.minus > 0" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: d.minus > 0" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "plus" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1519,24 +1864,31 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.plus > 0" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: d.plus > 0" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -1571,7 +1923,8 @@ Module num. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1584,27 +1937,30 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: d.mant.checked_add(d.plus).is_some()" + M.of_value (| + Value.String + "assertion failed: d.mant.checked_add(d.plus).is_some()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -1639,7 +1995,8 @@ Module num. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1652,28 +2009,31 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: d.mant.checked_sub(d.minus).is_some()" + M.of_value (| + Value.String + "assertion failed: d.mant.checked_sub(d.minus).is_some()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1686,12 +2046,14 @@ Module num. [] |), [ M.read (| buf |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::num::flt2dec::MAX_SIG_DIGITS" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1704,28 +2066,32 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: buf.len() >= MAX_SIG_DIGITS" + M.of_value (| + Value.String + "assertion failed: buf.len() >= MAX_SIG_DIGITS" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + BinOp.Panic.add (| + Integer.U64, M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), @@ -1740,11 +2106,13 @@ Module num. "plus" |) |) - |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, - Value.Integer Integer.I32 61 - |))) + |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 61 |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1757,14 +2125,17 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: d.mant + d.plus < (1 << 61)" + M.of_value (| + Value.String + "assertion failed: d.mant + d.plus < (1 << 61)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let plus := @@ -1777,35 +2148,40 @@ Module num. |), [ M.alloc (| - Value.StructRecord - "core::num::diy_float::Fp" - [ - ("f", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| d |), - "core::num::flt2dec::decoder::Decoded", - "mant" - |) - |), - 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 (| - M.read (| d |), - "core::num::flt2dec::decoder::Decoded", - "exp" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::num::diy_float::Fp" + [ + ("f", + A.to_value + (BinOp.Panic.add (| + Integer.U64, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "mant" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "plus" + |) + |) + |))); + ("e", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "exp" + |) + |))) + ] + |) |) ] |) @@ -1820,35 +2196,40 @@ Module num. |), [ M.alloc (| - Value.StructRecord - "core::num::diy_float::Fp" - [ - ("f", - BinOp.Panic.sub (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| d |), - "core::num::flt2dec::decoder::Decoded", - "mant" - |) - |), - 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 (| - M.read (| d |), - "core::num::flt2dec::decoder::Decoded", - "exp" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::num::diy_float::Fp" + [ + ("f", + A.to_value + (BinOp.Panic.sub (| + Integer.U64, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "mant" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "minus" + |) + |) + |))); + ("e", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "exp" + |) + |))) + ] + |) |); M.read (| M.SubPointer.get_struct_record_field (| @@ -1870,26 +2251,30 @@ Module num. |), [ M.alloc (| - Value.StructRecord - "core::num::diy_float::Fp" - [ - ("f", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| d |), - "core::num::flt2dec::decoder::Decoded", - "mant" - |) - |)); - ("e", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| d |), - "core::num::flt2dec::decoder::Decoded", - "exp" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::num::diy_float::Fp" + [ + ("f", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "mant" + |) + |))); + ("e", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "exp" + |) + |))) + ] + |) |); M.read (| M.SubPointer.get_struct_record_field (| @@ -1910,7 +2295,9 @@ Module num. |), [ BinOp.Panic.sub (| + Integer.I16, BinOp.Panic.sub (| + Integer.I16, M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::ALPHA" @@ -1924,10 +2311,12 @@ Module num. |) |) |), - Value.Integer Integer.I16 64 + M.of_value (| Value.Integer 64 |) |); BinOp.Panic.sub (| + Integer.I16, BinOp.Panic.sub (| + Integer.I16, M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::GAMMA" @@ -1941,7 +2330,7 @@ Module num. |) |) |), - Value.Integer Integer.I16 64 + M.of_value (| Value.Integer 64 |) |) ] |) @@ -1988,11 +2377,12 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2001,19 +2391,23 @@ Module num. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.SubPointer.get_struct_record_field (| - plus, - "core::num::diy_float::Fp", - "e" - |); - M.SubPointer.get_struct_record_field (| - minus, - "core::num::diy_float::Fp", - "e" - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + plus, + "core::num::diy_float::Fp", + "e" + |)); + A.to_value + (M.SubPointer.get_struct_record_field (| + minus, + "core::num::diy_float::Fp", + "e" + |)) + ] + |) |), [ fun γ => @@ -2025,21 +2419,23 @@ Module num. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2051,9 +2447,11 @@ Module num. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -2066,9 +2464,11 @@ Module num. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -2077,22 +2477,27 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2101,19 +2506,23 @@ Module num. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.SubPointer.get_struct_record_field (| - plus, - "core::num::diy_float::Fp", - "e" - |); - M.SubPointer.get_struct_record_field (| - v, - "core::num::diy_float::Fp", - "e" - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + plus, + "core::num::diy_float::Fp", + "e" + |)); + A.to_value + (M.SubPointer.get_struct_record_field (| + v, + "core::num::diy_float::Fp", + "e" + |)) + ] + |) |), [ fun γ => @@ -2125,21 +2534,23 @@ Module num. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2151,9 +2562,11 @@ Module num. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -2166,9 +2579,11 @@ Module num. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -2177,18 +2592,23 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let plus1 := M.alloc (| BinOp.Panic.add (| + Integer.U64, M.read (| M.SubPointer.get_struct_record_field (| plus, @@ -2196,12 +2616,13 @@ Module num. "f" |) |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |) in let minus1 := M.alloc (| BinOp.Panic.sub (| + Integer.U64, M.read (| M.SubPointer.get_struct_record_field (| minus, @@ -2209,13 +2630,14 @@ Module num. "f" |) |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |) in let e := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I16, M.read (| M.SubPointer.get_struct_record_field (| plus, @@ -2223,24 +2645,28 @@ Module num. "e" |) |) - |)) + |) + |) |) in let plus1int := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| M.read (| plus1 |), M.read (| e |) |)) + M.rust_cast (| + BinOp.Panic.shr (| M.read (| plus1 |), M.read (| e |) |) + |) |) in let plus1frac := M.alloc (| - BinOp.Pure.bit_and - (M.read (| plus1 |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| plus1 |), + BinOp.Panic.sub (| + Integer.U64, BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), M.read (| e |) |), - Value.Integer Integer.U64 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in M.match_operator (| M.alloc (| @@ -2259,35 +2685,40 @@ 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 Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let exp := M.alloc (| BinOp.Panic.add (| + Integer.I16, BinOp.Panic.sub (| - M.rust_cast (M.read (| max_kappa |)), + Integer.I16, + M.rust_cast (| M.read (| max_kappa |) |), M.read (| minusk |) |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |) in let delta1 := M.alloc (| BinOp.Panic.sub (| + Integer.U64, M.read (| plus1 |), M.read (| minus1 |) |) |) in let delta1frac := M.alloc (| - BinOp.Pure.bit_and - (M.read (| delta1 |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| delta1 |), + BinOp.Panic.sub (| + Integer.U64, BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), M.read (| e |) |), - Value.Integer Integer.U64 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let ten_kappa := M.copy (| max_ten_kappa |) in let remainder := M.copy (| plus1int |) in @@ -2297,6 +2728,7 @@ Module num. (let q := M.alloc (| BinOp.Panic.div (| + Integer.U32, M.read (| remainder |), M.read (| ten_kappa |) |) @@ -2304,18 +2736,22 @@ Module num. let r := M.alloc (| BinOp.Panic.rem (| + Integer.U32, M.read (| remainder |), M.read (| ten_kappa |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| Value.Bool true |)) in + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2323,19 +2759,23 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| q |)) - (Value.Integer - Integer.U32 - 10)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| q |), + M.of_value (| + Value.Integer 10 + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2351,8 +2791,10 @@ Module num. |), [ M.read (| - Value.String - "assertion failed: q < 10" + M.of_value (| + Value.String + "assertion failed: q < 10" + |) |) ] |) @@ -2360,12 +2802,19 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -2385,8 +2834,11 @@ Module num. |), [ BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - M.rust_cast (M.read (| q |)) + Integer.U8, + M.read (| + M.of_value (| UnsupportedLiteral |) + |), + M.rust_cast (| M.read (| q |) |) |) ] |) @@ -2396,15 +2848,17 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let plus1rem := M.alloc (| BinOp.Panic.add (| + Integer.U64, BinOp.Panic.shl (| - M.rust_cast (M.read (| r |)), + M.rust_cast (| M.read (| r |) |), M.read (| e |) |), M.read (| plus1frac |) @@ -2412,16 +2866,17 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| plus1rem |)) - (M.read (| delta1 |)) + BinOp.Pure.lt (| + M.read (| plus1rem |), + M.read (| delta1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2434,8 +2889,9 @@ Module num. let ten_kappa := M.alloc (| BinOp.Panic.shl (| - M.rust_cast - (M.read (| ten_kappa |)), + M.rust_cast (| + M.read (| ten_kappa |) + |), M.read (| e |) |) |) in @@ -2478,12 +2934,17 @@ Module num. |), [ M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| i |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + i + |))) + ] + |) ] |) ] @@ -2492,6 +2953,7 @@ Module num. M.read (| plus1rem |); M.read (| delta1 |); BinOp.Panic.sub (| + Integer.U64, M.read (| plus1 |), M.read (| M.SubPointer.get_struct_record_field (| @@ -2502,7 +2964,7 @@ Module num. |) |); M.read (| ten_kappa |); - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) ] |) |) @@ -2510,21 +2972,27 @@ Module num. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| i |)) - (M.rust_cast (M.read (| max_kappa |))) + BinOp.Pure.gt (| + M.read (| i |), + M.rust_cast (| + M.read (| max_kappa |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2536,14 +3004,18 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2553,15 +3025,20 @@ Module num. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - ten_kappa; - M.alloc (| - Value.Integer - Integer.U32 - 1 - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + ten_kappa; + A.to_value + (M.alloc (| + M.of_value (| + Value.Integer + 1 + |) + |)) + ] + |) |), [ fun γ => @@ -2586,7 +3063,9 @@ Module num. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -2594,18 +3073,20 @@ Module num. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2621,9 +3102,11 @@ Module num. let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -2646,9 +3129,11 @@ Module num. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -2658,20 +3143,26 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -2680,7 +3171,10 @@ Module num. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -2688,16 +3182,17 @@ Module num. M.write (| β, BinOp.Panic.div (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := M.write (| remainder, M.read (| r |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) in let remainder := M.copy (| plus1frac |) in let threshold := M.copy (| delta1frac |) in - let ulp := M.alloc (| Value.Integer Integer.U64 1 |) in + let ulp := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.alloc (| M.never_to_any (| @@ -2709,8 +3204,9 @@ Module num. M.write (| β, BinOp.Panic.mul (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -2718,8 +3214,9 @@ Module num. M.write (| β, BinOp.Panic.mul (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -2727,8 +3224,9 @@ Module num. M.write (| β, BinOp.Panic.mul (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let q := @@ -2740,25 +3238,29 @@ Module num. |) in let r := M.alloc (| - BinOp.Pure.bit_and - (M.read (| remainder |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| remainder |), + BinOp.Panic.sub (| + Integer.U64, BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), M.read (| e |) |), - Value.Integer Integer.U64 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| Value.Bool true |)) in + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2766,19 +3268,23 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| q |)) - (Value.Integer - Integer.U64 - 10)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| q |), + M.of_value (| + Value.Integer 10 + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2794,8 +3300,10 @@ Module num. |), [ M.read (| - Value.String - "assertion failed: q < 10" + M.of_value (| + Value.String + "assertion failed: q < 10" + |) |) ] |) @@ -2804,14 +3312,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -2831,8 +3345,11 @@ Module num. |), [ BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - M.rust_cast (M.read (| q |)) + Integer.U8, + M.read (| + M.of_value (| UnsupportedLiteral |) + |), + M.rust_cast (| M.read (| q |) |) |) ] |) @@ -2842,22 +3359,24 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| r |)) - (M.read (| threshold |)) + BinOp.Pure.lt (| + M.read (| r |), + M.read (| threshold |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2870,7 +3389,9 @@ Module num. let ten_kappa := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| + Value.Integer 1 + |), M.read (| e |) |) |) in @@ -2917,14 +3438,17 @@ Module num. |), [ M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.read (| - i - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| + i + |))) + ] + |) ] |) ] @@ -2933,7 +3457,9 @@ Module num. M.read (| r |); M.read (| threshold |); BinOp.Panic.mul (| + Integer.U64, BinOp.Panic.sub (| + Integer.U64, M.read (| plus1 |), M.read (| M.SubPointer.get_struct_record_field (| @@ -2955,17 +3481,19 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.write (| remainder, M.read (| r |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -3071,7 +3599,7 @@ Module num. if 2 * ulp <= plus1w && plus1w <= threshold - 4 * ulp { Some((buf, exp)) } else { None } } *) - Definition round_and_weed (τ : list Ty.t) (α : list Value.t) : M := + Definition round_and_weed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ buf; exp; remainder; threshold; plus1v; ten_kappa; ulp ] => ltac:(M.monadic @@ -3087,23 +3615,25 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "is_empty", [] |), [ M.read (| buf |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3116,19 +3646,26 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: !buf.is_empty()" + M.of_value (| + Value.String "assertion failed: !buf.is_empty()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let plus1v_down := - M.alloc (| BinOp.Panic.add (| M.read (| plus1v |), M.read (| ulp |) |) |) in + M.alloc (| + BinOp.Panic.add (| Integer.U64, M.read (| plus1v |), M.read (| ulp |) |) + |) in let plus1v_up := - M.alloc (| BinOp.Panic.sub (| M.read (| plus1v |), M.read (| ulp |) |) |) in + M.alloc (| + BinOp.Panic.sub (| Integer.U64, M.read (| plus1v |), M.read (| ulp |) |) + |) in let plus1w := M.copy (| remainder |) in let _ := let last := @@ -3156,7 +3693,7 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3165,38 +3702,47 @@ Module num. (M.alloc (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| plus1w |)) - (M.read (| plus1v_up |)), + BinOp.Pure.lt (| + M.read (| plus1w |), + M.read (| plus1v_up |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (BinOp.Panic.sub (| + (BinOp.Pure.ge (| + BinOp.Panic.sub (| + Integer.U64, M.read (| threshold |), M.read (| plus1w |) - |)) - (M.read (| ten_kappa |)))) + |), + M.read (| ten_kappa |) + |))) |), ltac:(M.monadic (LogicalOp.or (| - BinOp.Pure.lt - (BinOp.Panic.add (| + BinOp.Pure.lt (| + BinOp.Panic.add (| + Integer.U64, M.read (| plus1w |), M.read (| ten_kappa |) - |)) - (M.read (| plus1v_up |)), + |), + M.read (| plus1v_up |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (BinOp.Panic.sub (| + (BinOp.Pure.ge (| + BinOp.Panic.sub (| + Integer.U64, M.read (| plus1v_up |), M.read (| plus1w |) - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.U64, BinOp.Panic.add (| + Integer.U64, M.read (| plus1w |), M.read (| ten_kappa |) |), M.read (| plus1v_up |) - |)))) + |) + |))) |))) |) |)) in @@ -3210,17 +3756,22 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.U8, M.read (| β |), - Value.Integer Integer.U8 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -3228,17 +3779,23 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| M.read (| last |) |)) - (M.read (| UnsupportedLiteral |))) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.read (| last |) |), + M.read (| + M.of_value (| + UnsupportedLiteral + |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3254,8 +3811,10 @@ Module num. |), [ M.read (| - Value.String - "assertion failed: *last > b'0'" + M.of_value (| + Value.String + "assertion failed: *last > b'0'" + |) |) ] |) @@ -3263,20 +3822,28 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := plus1w in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| ten_kappa |) |) + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.read (| ten_kappa |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3286,7 +3853,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -3295,7 +3862,7 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3304,38 +3871,47 @@ Module num. (M.alloc (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| plus1w |)) - (M.read (| plus1v_down |)), + BinOp.Pure.lt (| + M.read (| plus1w |), + M.read (| plus1v_down |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (BinOp.Panic.sub (| + (BinOp.Pure.ge (| + BinOp.Panic.sub (| + Integer.U64, M.read (| threshold |), M.read (| plus1w |) - |)) - (M.read (| ten_kappa |)))) + |), + M.read (| ten_kappa |) + |))) |), ltac:(M.monadic (LogicalOp.or (| - BinOp.Pure.lt - (BinOp.Panic.add (| + BinOp.Pure.lt (| + BinOp.Panic.add (| + Integer.U64, M.read (| plus1w |), M.read (| ten_kappa |) - |)) - (M.read (| plus1v_down |)), + |), + M.read (| plus1v_down |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (BinOp.Panic.sub (| + (BinOp.Pure.ge (| + BinOp.Panic.sub (| + Integer.U64, M.read (| plus1v_down |), M.read (| plus1w |) - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.U64, BinOp.Panic.add (| + Integer.U64, M.read (| plus1w |), M.read (| ten_kappa |) |), M.read (| plus1v_down |) - |)))) + |) + |))) |))) |) |)) in @@ -3348,16 +3924,19 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3365,22 +3944,27 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (BinOp.Panic.mul (| - Value.Integer Integer.U64 2, + BinOp.Pure.le (| + BinOp.Panic.mul (| + Integer.U64, + M.of_value (| Value.Integer 2 |), M.read (| ulp |) - |)) - (M.read (| plus1w |)), + |), + M.read (| plus1w |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| plus1w |)) - (BinOp.Panic.sub (| + (BinOp.Pure.le (| + M.read (| plus1w |), + BinOp.Panic.sub (| + Integer.U64, M.read (| threshold |), BinOp.Panic.mul (| - Value.Integer Integer.U64 4, + Integer.U64, + M.of_value (| Value.Integer 4 |), M.read (| ulp |) |) - |)))) + |) + |))) |) |)) in let _ := @@ -3389,13 +3973,26 @@ Module num. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| buf |); M.read (| exp |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| buf |)); + A.to_value (M.read (| exp |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3419,7 +4016,7 @@ Module num. } } *) - Definition format_shortest (τ : list Ty.t) (α : list Value.t) : M := + Definition format_shortest (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d; buf ] => ltac:(M.monadic @@ -3754,7 +4351,7 @@ Module num. } } *) - Definition format_exact_opt (τ : list Ty.t) (α : list Value.t) : M := + Definition format_exact_opt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d; buf; limit ] => ltac:(M.monadic @@ -3767,23 +4364,25 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |)) - (Value.Integer Integer.U64 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3794,35 +4393,44 @@ Module num. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: d.mant > 0" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: d.mant > 0" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, - Value.Integer Integer.I32 61 - |))) + |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 61 |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3835,27 +4443,30 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: d.mant < (1 << 61)" + M.of_value (| + Value.String "assertion failed: d.mant < (1 << 61)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -3868,7 +4479,9 @@ Module num. [] |), [ M.read (| buf |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3881,13 +4494,16 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: !buf.is_empty()" + M.of_value (| + Value.String "assertion failed: !buf.is_empty()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let v := @@ -3900,26 +4516,30 @@ Module num. |), [ M.alloc (| - Value.StructRecord - "core::num::diy_float::Fp" - [ - ("f", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| d |), - "core::num::flt2dec::decoder::Decoded", - "mant" - |) - |)); - ("e", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| d |), - "core::num::flt2dec::decoder::Decoded", - "exp" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::num::diy_float::Fp" + [ + ("f", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "mant" + |) + |))); + ("e", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| d |), + "core::num::flt2dec::decoder::Decoded", + "exp" + |) + |))) + ] + |) |) ] |) @@ -3933,7 +4553,9 @@ Module num. |), [ BinOp.Panic.sub (| + Integer.I16, BinOp.Panic.sub (| + Integer.I16, M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::ALPHA" @@ -3947,10 +4569,12 @@ Module num. |) |) |), - Value.Integer Integer.I16 64 + M.of_value (| Value.Integer 64 |) |); BinOp.Panic.sub (| + Integer.I16, BinOp.Panic.sub (| + Integer.I16, M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::GAMMA" @@ -3964,7 +4588,7 @@ Module num. |) |) |), - Value.Integer Integer.I16 64 + M.of_value (| Value.Integer 64 |) |) ] |) @@ -3989,8 +4613,9 @@ Module num. |) in let e := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I16, M.read (| M.SubPointer.get_struct_record_field (| v, @@ -3998,12 +4623,13 @@ Module num. "e" |) |) - |)) + |) + |) |) in let vint := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| M.SubPointer.get_struct_record_field (| v, @@ -4012,25 +4638,28 @@ Module num. |) |), M.read (| e |) - |)) + |) + |) |) in let vfrac := M.alloc (| - BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_record_field (| v, "core::num::diy_float::Fp", "f" |) - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.U64, BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), M.read (| e |) |), - Value.Integer Integer.U64 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let requested_digits := M.alloc (| @@ -4051,7 +4680,7 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4059,30 +4688,34 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| vfrac |)) - (Value.Integer Integer.U64 0), + BinOp.Pure.eq (| + M.read (| vfrac |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.or (| - BinOp.Pure.ge - (M.read (| requested_digits |)) - (Value.Integer Integer.Usize 11), + BinOp.Pure.ge (| + M.read (| requested_digits |), + M.of_value (| Value.Integer 11 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| vint |)) - (M.read (| + (BinOp.Pure.lt (| + M.read (| vint |), + M.read (| M.SubPointer.get_array_field (| M.get_constant (| "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 Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) - |)))) + |) + |))) |))) |) |)) in @@ -4095,15 +4728,19 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let err := M.alloc (| Value.Integer Integer.U64 1 |) in + let err := M.alloc (| M.of_value (| Value.Integer 1 |) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -4121,30 +4758,33 @@ 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 Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let exp := M.alloc (| BinOp.Panic.add (| + Integer.I16, BinOp.Panic.sub (| - M.rust_cast (M.read (| max_kappa |)), + Integer.I16, + M.rust_cast (| M.read (| max_kappa |) |), M.read (| minusk |) |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |) in let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| exp |)) - (M.read (| limit |)) + BinOp.Pure.le (| + M.read (| exp |), + M.read (| limit |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4162,10 +4802,11 @@ Module num. |), [ M.read (| buf |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| exp |); M.read (| limit |); BinOp.Panic.div (| + Integer.U64, M.read (| M.SubPointer.get_struct_record_field (| v, @@ -4173,11 +4814,12 @@ Module num. "f" |) |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |); BinOp.Panic.shl (| - M.rust_cast - (M.read (| max_ten_kappa |)), + M.rust_cast (| + M.read (| max_ten_kappa |) + |), M.read (| e |) |); BinOp.Panic.shl (| @@ -4193,22 +4835,26 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.rust_cast - (BinOp.Panic.sub (| - M.rust_cast - (M.read (| exp |)), - M.rust_cast - (M.read (| limit |)) - |))) - (M.call_closure (| + BinOp.Pure.lt (| + M.rust_cast (| + BinOp.Panic.sub (| + Integer.I32, + M.rust_cast (| + M.read (| exp |) + |), + M.rust_cast (| + M.read (| limit |) + |) + |) + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -4222,7 +4868,8 @@ Module num. [] |), [ M.read (| buf |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4230,11 +4877,13 @@ Module num. Value.Bool true |) in M.alloc (| - M.rust_cast - (BinOp.Panic.sub (| + M.rust_cast (| + BinOp.Panic.sub (| + Integer.I16, M.read (| exp |), M.read (| limit |) - |)) + |) + |) |))); fun γ => ltac:(M.monadic @@ -4262,11 +4911,15 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -4274,17 +4927,19 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.read (| len |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4300,8 +4955,10 @@ Module num. |), [ M.read (| - Value.String - "assertion failed: len > 0" + M.of_value (| + Value.String + "assertion failed: len > 0" + |) |) ] |) @@ -4309,15 +4966,19 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let kappa := - M.alloc (| M.rust_cast (M.read (| max_kappa |)) |) in + 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 _ := @@ -4326,6 +4987,7 @@ Module num. (let q := M.alloc (| BinOp.Panic.div (| + Integer.U32, M.read (| remainder |), M.read (| ten_kappa |) |) @@ -4333,18 +4995,22 @@ Module num. let r := M.alloc (| BinOp.Panic.rem (| + Integer.U32, M.read (| remainder |), M.read (| ten_kappa |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| Value.Bool true |)) in + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -4352,19 +5018,23 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| q |)) - (Value.Integer - Integer.U32 - 10)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| q |), + M.of_value (| + Value.Integer 10 + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4380,8 +5050,10 @@ Module num. |), [ M.read (| - Value.String - "assertion failed: q < 10" + M.of_value (| + Value.String + "assertion failed: q < 10" + |) |) ] |) @@ -4389,12 +5061,19 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -4414,8 +5093,11 @@ Module num. |), [ BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - M.rust_cast (M.read (| q |)) + Integer.U8, + M.read (| + M.of_value (| UnsupportedLiteral |) + |), + M.rust_cast (| M.read (| q |) |) |) ] |) @@ -4425,22 +5107,24 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| i |)) - (M.read (| len |)) + BinOp.Pure.eq (| + M.read (| i |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4453,8 +5137,11 @@ Module num. let vrem := M.alloc (| BinOp.Panic.add (| + Integer.U64, BinOp.Panic.shl (| - M.rust_cast (M.read (| r |)), + M.rust_cast (| + M.read (| r |) + |), M.read (| e |) |), M.read (| vfrac |) @@ -4473,8 +5160,9 @@ Module num. M.read (| limit |); M.read (| vrem |); BinOp.Panic.shl (| - M.rust_cast - (M.read (| ten_kappa |)), + M.rust_cast (| + M.read (| ten_kappa |) + |), M.read (| e |) |); BinOp.Panic.shl (| @@ -4488,21 +5176,27 @@ Module num. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| i |)) - (M.rust_cast (M.read (| max_kappa |))) + BinOp.Pure.gt (| + M.read (| i |), + M.rust_cast (| + M.read (| max_kappa |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4514,14 +5208,18 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4531,15 +5229,20 @@ Module num. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - ten_kappa; - M.alloc (| - Value.Integer - Integer.U32 - 1 - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + ten_kappa; + A.to_value + (M.alloc (| + M.of_value (| + Value.Integer + 1 + |) + |)) + ] + |) |), [ fun γ => @@ -4564,7 +5267,9 @@ Module num. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -4572,18 +5277,20 @@ Module num. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4599,9 +5306,11 @@ Module num. let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -4624,9 +5333,11 @@ Module num. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -4636,33 +5347,43 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4672,15 +5393,19 @@ Module num. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - kappa; - M.alloc (| - Value.Integer - Integer.I16 - 0 - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value kappa; + A.to_value + (M.alloc (| + M.of_value (| + Value.Integer + 0 + |) + |)) + ] + |) |), [ fun γ => @@ -4705,7 +5430,9 @@ Module num. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -4713,18 +5440,20 @@ Module num. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4740,9 +5469,11 @@ Module num. let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -4765,9 +5496,11 @@ Module num. M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -4777,20 +5510,26 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -4799,7 +5538,10 @@ Module num. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -4807,8 +5549,9 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.I16, M.read (| β |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -4816,21 +5559,23 @@ Module num. M.write (| β, BinOp.Panic.div (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := M.write (| remainder, M.read (| r |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) in let remainder := M.copy (| vfrac |) in let maxerr := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), BinOp.Panic.sub (| + Integer.Usize, M.read (| e |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -4838,16 +5583,17 @@ Module num. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| err |)) - (M.read (| maxerr |)) + BinOp.Pure.lt (| + M.read (| err |), + M.read (| maxerr |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4859,8 +5605,9 @@ Module num. M.write (| β, BinOp.Panic.mul (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let _ := @@ -4868,8 +5615,9 @@ Module num. M.write (| β, BinOp.Panic.mul (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10 + M.of_value (| Value.Integer 10 |) |) |) in let q := @@ -4881,25 +5629,31 @@ Module num. |) in let r := M.alloc (| - BinOp.Pure.bit_and - (M.read (| remainder |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| remainder |), + BinOp.Panic.sub (| + Integer.U64, BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), M.read (| e |) |), - Value.Integer Integer.U64 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| Value.Bool true |)) in + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -4907,19 +5661,23 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| q |)) - (Value.Integer - Integer.U64 - 10)) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| q |), + M.of_value (| + Value.Integer 10 + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4935,8 +5693,10 @@ Module num. |), [ M.read (| - Value.String - "assertion failed: q < 10" + M.of_value (| + Value.String + "assertion failed: q < 10" + |) |) ] |) @@ -4945,14 +5705,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -4972,8 +5738,11 @@ Module num. |), [ BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - M.rust_cast (M.read (| q |)) + Integer.U8, + M.read (| + M.of_value (| UnsupportedLiteral |) + |), + M.rust_cast (| M.read (| q |) |) |) ] |) @@ -4983,22 +5752,26 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| i |)) - (M.read (| len |)) + BinOp.Pure.eq (| + M.read (| i |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5021,9 +5794,9 @@ Module num. M.read (| limit |); M.read (| r |); BinOp.Panic.shl (| - Value.Integer - Integer.U64 - 1, + M.of_value (| + Value.Integer 1 + |), M.read (| e |) |); M.read (| err |) @@ -5035,12 +5808,14 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.write (| remainder, M.read (| r |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5052,7 +5827,9 @@ Module num. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |) |) |))) @@ -5060,7 +5837,9 @@ Module num. |))) |) in M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |))) ] |))) @@ -5073,23 +5852,25 @@ Module num. end. Module format_exact_opt. - Definition value_POW10_UP_TO_9 : Value.t := + Definition value_POW10_UP_TO_9 : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 1; - Value.Integer Integer.U32 10; - Value.Integer Integer.U32 100; - Value.Integer Integer.U32 1000; - Value.Integer Integer.U32 10000; - Value.Integer Integer.U32 100000; - Value.Integer Integer.U32 1000000; - Value.Integer Integer.U32 10000000; - Value.Integer Integer.U32 100000000; - Value.Integer Integer.U32 1000000000 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 1000 |)); + A.to_value (M.of_value (| Value.Integer 10000 |)); + A.to_value (M.of_value (| Value.Integer 100000 |)); + A.to_value (M.of_value (| Value.Integer 1000000 |)); + A.to_value (M.of_value (| Value.Integer 10000000 |)); + A.to_value (M.of_value (| Value.Integer 100000000 |)); + A.to_value (M.of_value (| Value.Integer 1000000000 |)) + ] + |) |))). (* @@ -5204,7 +5985,7 @@ Module num. None } *) - Definition possibly_round (τ : list Ty.t) (α : list Value.t) : M := + Definition possibly_round (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ buf; len; exp; limit; remainder; ten_kappa; ulp ] => ltac:(M.monadic @@ -5220,11 +6001,11 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -5232,17 +6013,19 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| remainder |)) - (M.read (| ten_kappa |))) + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| remainder |), + M.read (| ten_kappa |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5255,30 +6038,35 @@ Module num. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: remainder < ten_kappa" + M.of_value (| + Value.String + "assertion failed: remainder < ten_kappa" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| ulp |)) (M.read (| ten_kappa |)) + BinOp.Pure.ge (| M.read (| ulp |), M.read (| ten_kappa |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -5289,29 +6077,34 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (BinOp.Panic.sub (| + BinOp.Pure.le (| + BinOp.Panic.sub (| + Integer.U64, M.read (| ten_kappa |), M.read (| ulp |) - |)) - (M.read (| ulp |)) + |), + M.read (| ulp |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5322,17 +6115,20 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5340,25 +6136,31 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (BinOp.Panic.sub (| + BinOp.Pure.gt (| + BinOp.Panic.sub (| + Integer.U64, M.read (| ten_kappa |), M.read (| remainder |) - |)) - (M.read (| remainder |)), + |), + M.read (| remainder |) + |), ltac:(M.monadic - (BinOp.Pure.ge - (BinOp.Panic.sub (| + (BinOp.Pure.ge (| + BinOp.Panic.sub (| + Integer.U64, M.read (| ten_kappa |), BinOp.Panic.mul (| - Value.Integer Integer.U64 2, + Integer.U64, + M.of_value (| Value.Integer 2 |), M.read (| remainder |) |) - |)) - (BinOp.Panic.mul (| - Value.Integer Integer.U64 2, + |), + BinOp.Panic.mul (| + Integer.U64, + M.of_value (| Value.Integer 2 |), M.read (| ulp |) - |)))) + |) + |))) |) |)) in let _ := @@ -5370,62 +6172,76 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply - (Ty.path "slice") - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| len |)) ] - ] - |) - ] - |); - M.read (| exp |) - ] - ] + [ Ty.path "u8" ], + "slice_assume_init_ref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ] + ], + [ + Ty.apply + (Ty.path + "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| len |))) + ] + |) + ] + |) + ] + |)); + A.to_value (M.read (| exp |)) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5433,20 +6249,27 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| remainder |)) (M.read (| ulp |)), + BinOp.Pure.gt (| + M.read (| remainder |), + M.read (| ulp |) + |), ltac:(M.monadic - (BinOp.Pure.le - (BinOp.Panic.sub (| + (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 (| + |), + BinOp.Panic.sub (| + Integer.U64, M.read (| remainder |), M.read (| ulp |) - |)))) + |) + |))) |) |)) in let _ := @@ -5459,7 +6282,7 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5503,9 +6326,15 @@ Module num. |), [ M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| len |))) + ] + |) ] |) ] @@ -5525,12 +6354,13 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.I16, M.read (| β |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5538,13 +6368,14 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| exp |)) - (M.read (| limit |)), + BinOp.Pure.gt (| + M.read (| exp |), + M.read (| limit |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| len |)) - (M.call_closure (| + (BinOp.Pure.lt (| + M.read (| len |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -5558,7 +6389,8 @@ Module num. [] |), [ M.read (| buf |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -5589,74 +6421,97 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ], - "slice_assume_init_ref", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply - (Ty.path "slice") - [ + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") - [ Ty.path "u8" ] - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| buf |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| len |)) ] - ] - |) - ] - |); - M.read (| exp |) - ] - ] + [ Ty.path "u8" ], + "slice_assume_init_ref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path + "core::mem::maybe_uninit::MaybeUninit") + [ Ty.path "u8" ] + ], + [ + Ty.apply + (Ty.path + "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| buf |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| len |))) + ] + |) + ] + |) + ] + |)); + A.to_value (M.read (| exp |)) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) |))) |))) | _, _ => M.impossible @@ -5679,7 +6534,7 @@ Module num. } } *) - Definition format_exact (τ : list Ty.t) (α : list Value.t) : M := + Definition format_exact (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ d; buf; limit ] => ltac:(M.monadic diff --git a/CoqOfRust/core/num/fmt.v b/CoqOfRust/core/num/fmt.v index 635becf01..8cca3a6aa 100644 --- a/CoqOfRust/core/num/fmt.v +++ b/CoqOfRust/core/num/fmt.v @@ -45,24 +45,24 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::fmt::Part". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -96,7 +96,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::fmt::Part". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -125,11 +125,16 @@ Module num. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -152,9 +157,10 @@ Module num. |) in let __arg1_0 := M.alloc (| γ2_0 |) in M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| __self_0 |) |)) - (M.read (| M.read (| __arg1_0 |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| __self_0 |) |), + M.read (| M.read (| __arg1_0 |) |) + |) |))); fun γ => ltac:(M.monadic @@ -177,9 +183,10 @@ Module num. |) in let __arg1_0 := M.alloc (| γ2_0 |) in M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| __self_0 |) |)) - (M.read (| M.read (| __arg1_0 |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| __self_0 |) |), + M.read (| M.read (| __arg1_0 |) |) + |) |))); fun γ => ltac:(M.monadic @@ -261,25 +268,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::fmt::Part". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |))) @@ -302,7 +312,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::fmt::Part". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -331,8 +341,8 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "Zero" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Zero" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -355,8 +365,8 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "Num" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Num" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -379,8 +389,8 @@ Module num. |), [ M.read (| f |); - M.read (| Value.String "Copy" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Copy" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -422,7 +432,7 @@ Module num. } } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -451,14 +461,17 @@ Module num. |) in let v := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| v |)) (Value.Integer Integer.U16 1000) + BinOp.Pure.lt (| + M.read (| v |), + M.of_value (| Value.Integer 1000 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -466,46 +479,48 @@ Module num. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| v |)) - (Value.Integer Integer.U16 10) + BinOp.Pure.lt (| + M.read (| v |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); + M.alloc (| M.of_value (| Value.Integer 1 |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| v |)) - (Value.Integer Integer.U16 100) + BinOp.Pure.lt (| + M.read (| v |), + M.of_value (| Value.Integer 100 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 2 |))); + M.alloc (| M.of_value (| Value.Integer 2 |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Integer Integer.Usize 3 |))) + (M.alloc (| M.of_value (| Value.Integer 3 |) |))) ] |))) ] @@ -513,25 +528,27 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| v |)) - (Value.Integer Integer.U16 10000) + BinOp.Pure.lt (| + M.read (| v |), + M.of_value (| Value.Integer 10000 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 4 |))); + M.alloc (| M.of_value (| Value.Integer 4 |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 5 |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Integer 5 |) |))) ] |))) ] @@ -589,7 +606,7 @@ Module num. } } *) - Definition write (τ : list Ty.t) (α : list Value.t) : M := + Definition write (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; out ] => ltac:(M.monadic @@ -604,23 +621,24 @@ Module num. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| out |) ] - |)) - (M.read (| len |)) + |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -664,9 +682,11 @@ Module num. |), [ M.read (| out |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| nzeroes |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| nzeroes |))) ] + |) ] |) ] @@ -714,12 +734,16 @@ Module num. let _ := M.write (| M.read (| c |), - M.read (| UnsupportedLiteral |) + M.read (| + M.of_value (| UnsupportedLiteral |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -782,9 +806,12 @@ Module num. |), [ M.read (| out |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| len |))) + ] + |) ] |) ] @@ -841,12 +868,17 @@ Module num. M.write (| M.read (| c |), BinOp.Panic.add (| - M.read (| UnsupportedLiteral |), - M.rust_cast - (BinOp.Panic.rem (| + Integer.U8, + M.read (| + M.of_value (| UnsupportedLiteral |) + |), + M.rust_cast (| + BinOp.Panic.rem (| + Integer.U16, M.read (| v |), - Value.Integer Integer.U16 10 - |)) + M.of_value (| Value.Integer 10 |) + |) + |) |) |) in let _ := @@ -854,14 +886,17 @@ Module num. M.write (| β, BinOp.Panic.div (| + Integer.U16, M.read (| β |), - Value.Integer Integer.U16 10 + M.of_value (| Value.Integer 10 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); @@ -897,34 +932,45 @@ Module num. |), [ M.read (| out |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| buf |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| buf |) ] + |))) + ] + |) ] |); M.read (| buf |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -952,51 +998,55 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::fmt::Formatted". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::num::fmt::Formatted" - [ - ("sign", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "&") [ Ty.path "str" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::fmt::Formatted", - "sign" - |) - ] - |)); - ("parts", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "slice") [ Ty.path "core::num::fmt::Part" ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::fmt::Formatted", - "parts" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::num::fmt::Formatted" + [ + ("sign", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "&") [ Ty.path "str" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::fmt::Formatted", + "sign" + |) + ] + |))); + ("parts", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "slice") [ Ty.path "core::num::fmt::Part" ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::fmt::Formatted", + "parts" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1020,7 +1070,7 @@ Module num. len } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1108,6 +1158,7 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -1119,10 +1170,10 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -1148,7 +1199,7 @@ Module num. Some(written) } *) - Definition write (τ : list Ty.t) (α : list Value.t) : M := + Definition write (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; out ] => ltac:(M.monadic @@ -1159,23 +1210,23 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| out |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| @@ -1186,18 +1237,23 @@ Module num. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1220,23 +1276,26 @@ Module num. |), [ M.read (| out |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::num::fmt::Formatted", - "sign" - |) - |) - ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::num::fmt::Formatted", + "sign" + |) + |) + ] + |))) + ] + |) ] |); M.call_closure (| @@ -1371,10 +1430,15 @@ Module num. |), [ M.read (| out |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| written |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| written |))) + ] + |) ] |) ] @@ -1439,19 +1503,24 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| len |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| written |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| written |)) ] + |) |) |))) |))) diff --git a/CoqOfRust/core/num/int_log10.v b/CoqOfRust/core/num/int_log10.v index 32e2aa432..4374df7c8 100644 --- a/CoqOfRust/core/num/int_log10.v +++ b/CoqOfRust/core/num/int_log10.v @@ -23,25 +23,28 @@ Module num. ((val + C1) & (val + C2)) >> 8 } *) - Definition u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => 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 (| + 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 (| + |), + BinOp.Panic.add (| + Integer.U32, M.read (| val |), M.read (| M.get_constant (| "core::num::int_log10::u8::C2" |) |) - |)), - Value.Integer Integer.I32 8 + |) + |), + M.of_value (| Value.Integer 8 |) |) |) |))) @@ -49,18 +52,26 @@ Module num. end. Module u8. - Definition value_C1 : Value.t := + Definition value_C1 : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| Value.Integer Integer.U32 768, Value.Integer Integer.U32 10 |) + BinOp.Panic.sub (| + Integer.U32, + M.of_value (| Value.Integer 768 |), + M.of_value (| Value.Integer 10 |) + |) |))). - Definition value_C2 : Value.t := + Definition value_C2 : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| Value.Integer Integer.U32 512, Value.Integer Integer.U32 100 |) + BinOp.Panic.sub (| + Integer.U32, + M.of_value (| Value.Integer 512 |), + M.of_value (| Value.Integer 100 |) + |) |))). End u8. @@ -84,65 +95,85 @@ Module num. (((val + C1) & (val + C2)) ^ ((val + C3) & (val + C4))) >> 17 } *) - Definition less_than_5 (τ : list Ty.t) (α : list Value.t) : M := + Definition less_than_5 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in BinOp.Panic.shr (| - BinOp.Pure.bit_xor - (BinOp.Pure.bit_and - (BinOp.Panic.add (| + 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 (| + |), + BinOp.Panic.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 (| + |) + |), + 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 (| + |), + BinOp.Panic.add (| + Integer.U32, M.read (| val |), M.read (| M.get_constant (| "core::num::int_log10::less_than_5::C4" |) |) - |))), - Value.Integer Integer.I32 17 + |) + |) + |), + M.of_value (| Value.Integer 17 |) |))) | _, _ => M.impossible end. Module less_than_5. - Definition value_C1 : Value.t := + Definition value_C1 : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| Value.Integer Integer.U32 393216, Value.Integer Integer.U32 10 |) + BinOp.Panic.sub (| + Integer.U32, + M.of_value (| Value.Integer 393216 |), + M.of_value (| Value.Integer 10 |) + |) |))). - Definition value_C2 : Value.t := + Definition value_C2 : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| Value.Integer Integer.U32 524288, Value.Integer Integer.U32 100 |) + BinOp.Panic.sub (| + Integer.U32, + M.of_value (| Value.Integer 524288 |), + M.of_value (| Value.Integer 100 |) + |) |))). - Definition value_C3 : Value.t := + Definition value_C3 : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| Value.Integer Integer.U32 917504, Value.Integer Integer.U32 1000 |) + BinOp.Panic.sub (| + Integer.U32, + M.of_value (| Value.Integer 917504 |), + M.of_value (| Value.Integer 1000 |) + |) |))). - Definition value_C4 : Value.t := + Definition value_C4 : A.t := M.run ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| - Value.Integer Integer.U32 524288, - Value.Integer Integer.U32 10000 + Integer.U32, + M.of_value (| Value.Integer 524288 |), + M.of_value (| Value.Integer 10000 |) |) |))). End less_than_5. @@ -152,14 +183,14 @@ Module num. less_than_5(val as u32) } *) - Definition u16 (τ : list Ty.t) (α : list Value.t) : M := + Definition u16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in M.call_closure (| M.get_function (| "core::num::int_log10::less_than_5", [] |), - [ M.rust_cast (M.read (| val |)) ] + [ M.rust_cast (| M.read (| val |) |) ] |))) | _, _ => M.impossible end. @@ -174,43 +205,55 @@ Module num. log + less_than_5(val) } *) - Definition u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in M.read (| - let log := M.alloc (| Value.Integer Integer.U32 0 |) in + let log := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| val |)) (Value.Integer Integer.U32 100000) + BinOp.Pure.ge (| + M.read (| val |), + M.of_value (| Value.Integer 100000 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := let β := val in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 100000 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 100000 |) + |) |) in let _ := let β := log in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U32 5 |) + BinOp.Panic.add (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 5 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| log |), M.call_closure (| M.get_function (| "core::num::int_log10::less_than_5", [] |), @@ -236,23 +279,26 @@ Module num. log + less_than_5(val as u32) } *) - Definition u64 (τ : list Ty.t) (α : list Value.t) : M := + Definition u64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in M.read (| - let log := M.alloc (| Value.Integer Integer.U32 0 |) in + let log := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| val |)) (Value.Integer Integer.U64 10000000000) + BinOp.Pure.ge (| + M.read (| val |), + M.of_value (| Value.Integer 10000000000 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -260,54 +306,71 @@ Module num. M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), - Value.Integer Integer.U64 10000000000 + M.of_value (| Value.Integer 10000000000 |) |) |) in let _ := let β := log in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U32 10 |) + BinOp.Panic.add (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 10 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| val |)) (Value.Integer Integer.U64 100000) + BinOp.Pure.ge (| + M.read (| val |), + M.of_value (| Value.Integer 100000 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := let β := val in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U64 100000 |) + BinOp.Panic.div (| + Integer.U64, + M.read (| β |), + M.of_value (| Value.Integer 100000 |) + |) |) in let _ := let β := log in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U32 5 |) + BinOp.Panic.add (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 5 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| BinOp.Panic.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.rust_cast (| M.read (| val |) |) ] |) |) |) @@ -330,7 +393,7 @@ Module num. log + u64(val as u64) } *) - Definition u128 (τ : list Ty.t) (α : list Value.t) : M := + Definition u128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic @@ -338,19 +401,20 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let log := M.alloc (| Value.Integer Integer.U32 0 |) in + let log := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| val |)) - (Value.Integer Integer.U128 100000000000000000000000000000000) + BinOp.Pure.ge (| + M.read (| val |), + M.of_value (| Value.Integer 100000000000000000000000000000000 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -362,8 +426,11 @@ Module num. M.write (| β, BinOp.Panic.div (| + Integer.U128, M.read (| β |), - Value.Integer Integer.U128 100000000000000000000000000000000 + M.of_value (| + Value.Integer 100000000000000000000000000000000 + |) |) |) in let _ := @@ -371,37 +438,40 @@ Module num. M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 32 + M.of_value (| Value.Integer 32 |) |) |) in M.return_ (| BinOp.Panic.add (| + Integer.U32, M.read (| log |), M.call_closure (| M.get_function (| "core::num::int_log10::u32", [] |), - [ M.rust_cast (M.read (| val |)) ] + [ M.rust_cast (| M.read (| val |) |) ] |) |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| val |)) - (Value.Integer Integer.U128 10000000000000000) + BinOp.Pure.ge (| + M.read (| val |), + M.of_value (| Value.Integer 10000000000000000 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -410,26 +480,32 @@ Module num. M.write (| β, BinOp.Panic.div (| + Integer.U128, M.read (| β |), - Value.Integer Integer.U128 10000000000000000 + M.of_value (| Value.Integer 10000000000000000 |) |) |) in let _ := let β := log in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U32 16 |) + BinOp.Panic.add (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 16 |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| log |), M.call_closure (| M.get_function (| "core::num::int_log10::u64", [] |), - [ M.rust_cast (M.read (| val |)) ] + [ M.rust_cast (| M.read (| val |) |) ] |) |) |) @@ -443,14 +519,14 @@ Module num. u64(val as _) } *) - Definition usize (τ : list Ty.t) (α : list Value.t) : M := + Definition usize (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in M.call_closure (| M.get_function (| "core::num::int_log10::u64", [] |), - [ M.rust_cast (M.read (| val |)) ] + [ M.rust_cast (| M.read (| val |) |) ] |))) | _, _ => M.impossible end. @@ -460,14 +536,14 @@ Module num. u8(val as u8) } *) - Definition i8 (τ : list Ty.t) (α : list Value.t) : M := + Definition i8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in M.call_closure (| M.get_function (| "core::num::int_log10::u8", [] |), - [ M.rust_cast (M.read (| val |)) ] + [ M.rust_cast (| M.read (| val |) |) ] |))) | _, _ => M.impossible end. @@ -477,14 +553,14 @@ Module num. u16(val as u16) } *) - Definition i16 (τ : list Ty.t) (α : list Value.t) : M := + Definition i16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in M.call_closure (| M.get_function (| "core::num::int_log10::u16", [] |), - [ M.rust_cast (M.read (| val |)) ] + [ M.rust_cast (| M.read (| val |) |) ] |))) | _, _ => M.impossible end. @@ -494,14 +570,14 @@ Module num. u32(val as u32) } *) - Definition i32 (τ : list Ty.t) (α : list Value.t) : M := + Definition i32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in M.call_closure (| M.get_function (| "core::num::int_log10::u32", [] |), - [ M.rust_cast (M.read (| val |)) ] + [ M.rust_cast (| M.read (| val |) |) ] |))) | _, _ => M.impossible end. @@ -511,14 +587,14 @@ Module num. u64(val as u64) } *) - Definition i64 (τ : list Ty.t) (α : list Value.t) : M := + Definition i64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in M.call_closure (| M.get_function (| "core::num::int_log10::u64", [] |), - [ M.rust_cast (M.read (| val |)) ] + [ M.rust_cast (| M.read (| val |) |) ] |))) | _, _ => M.impossible end. @@ -528,14 +604,14 @@ Module num. u128(val as u128) } *) - Definition i128 (τ : list Ty.t) (α : list Value.t) : M := + Definition i128 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in M.call_closure (| M.get_function (| "core::num::int_log10::u128", [] |), - [ M.rust_cast (M.read (| val |)) ] + [ M.rust_cast (| M.read (| val |) |) ] |))) | _, _ => M.impossible end. @@ -545,7 +621,7 @@ Module num. panic!("argument of integer logarithm must be positive") } *) - Definition panic_for_nonpositive_argument (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_for_nonpositive_argument (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -556,12 +632,21 @@ Module num. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "argument of integer logarithm must be positive" |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "argument of integer logarithm must be positive" + |) + |)) + ] + |) + |) + |) ] |) ] diff --git a/CoqOfRust/core/num/mod.v b/CoqOfRust/core/num/mod.v index d5d86362b..b866a0048 100644 --- a/CoqOfRust/core/num/mod.v +++ b/CoqOfRust/core/num/mod.v @@ -7,32 +7,32 @@ Module num. (* pub const MIN: Self = !Self::MAX; *) (* Ty.path "i8" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic - (M.alloc (| UnOp.Pure.not (M.read (| M.get_constant (| "core::num::MAX" |) |)) |))). + (M.alloc (| UnOp.Pure.not (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = (<$UnsignedT>::MAX >> 1) as Self; *) (* Ty.path "i8" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$UnsignedT>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -41,7 +41,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -58,14 +58,14 @@ Module num. M.IsAssociatedFunction Self "from_str_radix" from_str_radix. (* pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "count_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -77,14 +77,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i8", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -96,14 +96,14 @@ Module num. (self as $UnsignedT).leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "leading_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -116,14 +116,14 @@ Module num. (self as $UnsignedT).trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "trailing_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -136,14 +136,14 @@ Module num. (self as $UnsignedT).leading_ones() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "leading_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -155,14 +155,14 @@ Module num. (self as $UnsignedT).trailing_ones() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "trailing_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -175,17 +175,18 @@ Module num. (self as $UnsignedT).rotate_left(n) as Self } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "rotate_left", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -196,17 +197,18 @@ Module num. (self as $UnsignedT).rotate_right(n) as Self } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "rotate_right", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -217,16 +219,17 @@ Module num. (self as $UnsignedT).swap_bytes() as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "swap_bytes", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -237,16 +240,17 @@ Module num. (self as $UnsignedT).reverse_bits() as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "reverse_bits", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -264,7 +268,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -290,7 +294,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -313,7 +317,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -339,7 +343,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -356,7 +360,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -378,7 +382,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -392,11 +396,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -415,7 +425,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -437,7 +447,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -459,7 +469,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -473,11 +483,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -496,7 +512,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -518,7 +534,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -532,11 +548,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -555,7 +577,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -577,7 +599,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -599,7 +621,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -613,11 +635,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -636,7 +664,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -658,7 +686,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -672,11 +700,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -695,7 +729,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -721,7 +755,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -729,7 +763,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -740,37 +774,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I8 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "i8" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "i8" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -790,7 +834,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -798,7 +842,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -809,32 +853,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I8 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -855,7 +910,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -863,7 +918,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -874,37 +929,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I8 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "i8" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "i8" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -924,7 +989,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -932,7 +997,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -943,32 +1008,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I8 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -985,7 +1061,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1006,7 +1082,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1020,11 +1096,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -1043,14 +1125,14 @@ Module num. unsafe { intrinsics::unchecked_sub(0, self) } } *) - Definition unchecked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "i8" ] |), - [ Value.Integer Integer.I8 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -1064,7 +1146,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1086,7 +1168,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1100,11 +1182,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -1124,7 +1212,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1137,16 +1225,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1155,18 +1244,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -1182,7 +1273,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1204,7 +1295,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1218,11 +1309,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -1242,7 +1339,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1255,16 +1352,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1273,18 +1371,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -1303,14 +1403,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1332,7 +1432,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -1364,7 +1468,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -1375,14 +1479,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1390,30 +1497,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.I8 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I8 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1422,18 +1534,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1472,9 +1586,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -1483,15 +1599,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -1525,9 +1647,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -1536,7 +1660,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1546,7 +1670,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1575,36 +1699,42 @@ Module num. } } *) - Definition checked_isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I8 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "u8", "isqrt", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| Ty.path "u8", "isqrt", [] |), + [ M.rust_cast (| M.read (| self |) |) ] + |) + |)) + ] + |) |))) ] |) @@ -1620,7 +1750,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1646,7 +1776,7 @@ Module num. } } *) - Definition saturating_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1686,7 +1816,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1712,7 +1842,7 @@ Module num. } } *) - Definition saturating_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1752,14 +1882,14 @@ Module num. intrinsics::saturating_sub(0, self) } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::saturating_sub", [ Ty.path "i8" ] |), - [ Value.Integer Integer.I8 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -1776,14 +1906,14 @@ Module num. } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1824,7 +1954,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1852,16 +1982,23 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I8 0)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I8 0)) + BinOp.Pure.eq (| + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1886,7 +2023,7 @@ Module num. } } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1935,7 +2072,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -1964,14 +2101,19 @@ Module num. ltac:(M.monadic (let γ := M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I8 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| 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 (| M.read (| exp |), Value.Integer Integer.U32 2 |)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.U32, + M.read (| exp |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); @@ -1990,7 +2132,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2010,7 +2152,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2018,7 +2160,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -2031,7 +2173,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2051,7 +2193,7 @@ Module num. self.wrapping_sub(rhs as Self) } *) - Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2059,7 +2201,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_sub", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -2072,7 +2214,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2092,7 +2234,7 @@ Module num. self.overflowing_div(rhs).0 } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2119,7 +2261,7 @@ Module num. self.overflowing_div_euclid(rhs).0 } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2147,7 +2289,7 @@ Module num. self.overflowing_rem(rhs).0 } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2174,7 +2316,7 @@ Module num. self.overflowing_rem_euclid(rhs).0 } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2202,14 +2344,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.I8 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -2225,7 +2368,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2235,12 +2378,14 @@ Module num. M.get_associated_function (| Ty.path "i8", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -2257,7 +2402,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2267,12 +2412,14 @@ Module num. M.get_associated_function (| Ty.path "i8", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -2289,14 +2436,14 @@ Module num. } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2329,16 +2476,17 @@ Module num. self.wrapping_abs() as $UnsignedT } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_abs", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -2367,7 +2515,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -2378,39 +2526,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I8 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I8 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2419,18 +2573,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2449,15 +2605,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -2471,7 +2633,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2481,7 +2643,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2507,7 +2669,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2528,7 +2690,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -2547,7 +2714,7 @@ Module num. (c, b != d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -2573,7 +2740,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -2584,8 +2751,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -2604,14 +2776,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -2627,13 +2799,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I8 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -2650,7 +2829,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2671,7 +2850,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -2690,7 +2874,7 @@ Module num. (c, b != d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -2716,7 +2900,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -2727,8 +2911,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -2748,14 +2937,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -2771,13 +2960,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I8 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -2794,7 +2990,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2815,7 +3011,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -2835,7 +3036,7 @@ Module num. } } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2843,7 +3044,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2853,24 +3054,44 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.I8, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -2891,7 +3112,7 @@ Module num. } } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2899,7 +3120,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2909,27 +3130,43 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -2949,7 +3186,7 @@ Module num. } } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2957,7 +3194,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2966,27 +3203,43 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I8 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| + Integer.I8, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -3006,7 +3259,7 @@ Module num. } } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -3014,7 +3267,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3023,30 +3276,42 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I8 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -3066,14 +3331,14 @@ Module num. } } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3083,21 +3348,33 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ M.read (| M.get_constant (| "core::num::MIN" |) |); Value.Bool true ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [ UnOp.Panic.neg (| M.read (| self |) |); Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (UnOp.Panic.neg (| Integer.I8, M.read (| self |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -3113,20 +3390,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3138,20 +3422,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3163,19 +3454,26 @@ Module num. (self.wrapping_abs(), self == Self::MIN) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_abs", [] |), - [ M.read (| self |) ] - |); - BinOp.Pure.eq (M.read (| self |)) (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_abs", [] |), + [ M.read (| self |) ] + |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3214,7 +3512,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -3225,14 +3523,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3240,30 +3541,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.I8 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I8 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3272,18 +3582,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3311,19 +3623,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -3346,11 +3665,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3360,7 +3680,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -3377,7 +3697,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -3410,7 +3730,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -3421,39 +3741,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I8 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I8 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3462,18 +3788,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3484,26 +3812,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.I8, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.I8, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3513,14 +3852,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Panic.mul (| Integer.I8, M.read (| acc |), M.read (| base |) |) |) |))) |))) | _, _ => M.impossible @@ -3541,7 +3880,7 @@ Module num. } } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3580,16 +3919,22 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "argument of integer square root must be non-negative" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "argument of integer square root must be non-negative" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -3613,7 +3958,7 @@ Module num. q } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -3622,19 +3967,27 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in + let q := + M.alloc (| + BinOp.Panic.div (| Integer.I8, M.read (| self |), M.read (| rhs |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |)) - (Value.Integer Integer.I8 0) + BinOp.Pure.lt (| + BinOp.Panic.rem (| + Integer.I8, + M.read (| self |), + M.read (| rhs |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3644,16 +3997,17 @@ Module num. M.return_ (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I8 0) + BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3662,16 +4016,18 @@ Module num. |) in M.alloc (| BinOp.Panic.sub (| + Integer.I8, M.read (| q |), - Value.Integer Integer.I8 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I8, M.read (| q |), - Value.Integer Integer.I8 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -3681,7 +4037,7 @@ Module num. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in q @@ -3710,23 +4066,24 @@ Module num. } } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| BinOp.Panic.rem (| Integer.I8, M.read (| self |), M.read (| rhs |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I8 0) + BinOp.Pure.lt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3761,17 +4118,19 @@ Module num. } } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3780,21 +4139,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I8 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I8 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I8 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I8 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| d |), Value.Integer Integer.I8 1 |) + BinOp.Panic.sub (| + Integer.I8, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -3816,17 +4188,19 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3835,21 +4209,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I8 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I8 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I8 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I8 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.I8 1 |) + BinOp.Panic.add (| + Integer.I8, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -3881,7 +4268,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -3892,28 +4279,34 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.I8, M.read (| self |), M.read (| rhs |) |) + |) in let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3922,38 +4315,48 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I8 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I8 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I8 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I8 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I8, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I8 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3962,8 +4365,9 @@ Module num. ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I8, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I8, M.read (| rhs |), M.read (| m |) |) |) |))) ] @@ -3999,7 +4403,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4010,14 +4414,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I8 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4025,14 +4432,16 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let r := @@ -4060,7 +4469,11 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))) @@ -4070,7 +4483,7 @@ Module num. let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4079,43 +4492,57 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I8 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I8 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I8 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I8 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I8, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I8 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -4124,7 +4551,7 @@ Module num. M.get_associated_function (| Ty.path "i8", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I8, M.read (| rhs |), M.read (| m |) |) ] |) |))) @@ -4157,7 +4584,7 @@ Module num. demap(<$UnsignedT>::midpoint(map(self), map(rhs))) } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4196,7 +4623,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -4205,15 +4632,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.I8 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -4229,27 +4660,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4298,14 +4735,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4354,14 +4791,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4424,7 +4861,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -4432,7 +4869,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4440,29 +4877,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I8 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.I8 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4472,16 +4915,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "i8", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -4489,13 +4934,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.I8, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "i8", "pow", [] |), @@ -4503,22 +4949,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -4529,18 +4975,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.I8, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4550,7 +5001,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4558,7 +5009,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -4579,45 +5034,54 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I8 0) + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let log := M.alloc (| BinOp.Panic.sub (| + Integer.U32, BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), - M.rust_cast - (M.call_closure (| + 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 |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| log |)) ] + |) |))) ] |) @@ -4637,35 +5101,41 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I8 0) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::num::int_log10::i8", [] |), - [ M.read (| M.use self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::num::int_log10::i8", [] |), + [ M.read (| M.use self |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4687,14 +5157,14 @@ Module num. } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4707,7 +5177,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| UnOp.Panic.neg (| M.read (| self |) |) |))); + M.alloc (| UnOp.Panic.neg (| Integer.I8, M.read (| self |) |) |))); fun γ => ltac:(M.monadic self) ] |) @@ -4739,7 +5209,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4747,18 +5217,19 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| other |)); M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| other |) |); M.rust_cast (| M.read (| self |) |) + ] |) |))); fun γ => @@ -4766,7 +5237,8 @@ Module num. (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) + ] |) |))) ] @@ -4790,40 +5262,43 @@ Module num. else { 1 } } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I8 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I8 (-1) |))); + M.alloc (| M.of_value (| Value.Integer (-1) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (Value.Integer Integer.I8 0) + BinOp.Pure.eq (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I8 0 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I8 1 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |))) ] @@ -4835,24 +5310,24 @@ Module num. Axiom AssociatedFunction_signum : M.IsAssociatedFunction Self "signum" signum. (* pub const fn is_positive(self) -> bool { self > 0 } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I8 0))) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. Axiom AssociatedFunction_is_positive : M.IsAssociatedFunction Self "is_positive" is_positive. (* pub const fn is_negative(self) -> bool { self < 0 } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I8 0))) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. @@ -4863,7 +5338,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4887,7 +5362,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4913,7 +5388,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4935,7 +5410,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -4960,7 +5435,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -4986,7 +5461,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -5009,7 +5484,7 @@ Module num. Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -5022,7 +5497,7 @@ Module num. Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -5036,32 +5511,32 @@ Module num. (* pub const MIN: Self = !Self::MAX; *) (* Ty.path "i16" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic - (M.alloc (| UnOp.Pure.not (M.read (| M.get_constant (| "core::num::MAX" |) |)) |))). + (M.alloc (| UnOp.Pure.not (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = (<$UnsignedT>::MAX >> 1) as Self; *) (* Ty.path "i16" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$UnsignedT>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -5070,7 +5545,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -5087,14 +5562,14 @@ Module num. M.IsAssociatedFunction Self "from_str_radix" from_str_radix. (* pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "count_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -5106,14 +5581,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i16", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -5125,14 +5600,14 @@ Module num. (self as $UnsignedT).leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "leading_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -5145,14 +5620,14 @@ Module num. (self as $UnsignedT).trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "trailing_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -5165,14 +5640,14 @@ Module num. (self as $UnsignedT).leading_ones() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "leading_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -5184,14 +5659,14 @@ Module num. (self as $UnsignedT).trailing_ones() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "trailing_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -5204,17 +5679,18 @@ Module num. (self as $UnsignedT).rotate_left(n) as Self } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u16", "rotate_left", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -5225,17 +5701,18 @@ Module num. (self as $UnsignedT).rotate_right(n) as Self } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u16", "rotate_right", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -5246,16 +5723,17 @@ Module num. (self as $UnsignedT).swap_bytes() as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u16", "swap_bytes", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -5266,16 +5744,17 @@ Module num. (self as $UnsignedT).reverse_bits() as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u16", "reverse_bits", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -5293,7 +5772,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -5319,7 +5798,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -5342,7 +5821,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5368,7 +5847,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5385,7 +5864,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5407,7 +5886,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5421,11 +5900,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -5444,7 +5929,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5466,7 +5951,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5488,7 +5973,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5502,11 +5987,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -5525,7 +6016,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5547,7 +6038,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5561,11 +6052,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -5584,7 +6081,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5606,7 +6103,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5628,7 +6125,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5642,11 +6139,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -5665,7 +6168,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5687,7 +6190,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5701,11 +6204,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -5724,7 +6233,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5750,7 +6259,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5758,7 +6267,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5769,37 +6278,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I16 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "i16" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "i16" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -5819,7 +6338,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5827,7 +6346,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5838,32 +6357,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I16 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -5884,7 +6414,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5892,7 +6422,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5903,37 +6433,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I16 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "i16" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "i16" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -5953,7 +6493,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -5961,7 +6501,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5972,32 +6512,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I16 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -6014,7 +6565,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6035,7 +6586,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6049,11 +6600,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -6072,14 +6629,14 @@ Module num. unsafe { intrinsics::unchecked_sub(0, self) } } *) - Definition unchecked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "i16" ] |), - [ Value.Integer Integer.I16 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -6093,7 +6650,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6115,7 +6672,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6129,11 +6686,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -6153,7 +6716,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6166,16 +6729,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6184,18 +6748,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -6211,7 +6777,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6233,7 +6799,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6247,11 +6813,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -6271,7 +6843,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6284,16 +6856,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6302,18 +6875,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -6332,14 +6907,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6361,7 +6936,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -6393,7 +6972,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -6404,14 +6983,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6419,30 +7001,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.I16 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I16 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6451,18 +7038,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6501,9 +7090,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -6512,15 +7103,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -6554,9 +7151,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -6565,7 +7164,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -6575,7 +7174,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -6604,36 +7203,42 @@ Module num. } } *) - Definition checked_isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I16 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "u16", "isqrt", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| Ty.path "u16", "isqrt", [] |), + [ M.rust_cast (| M.read (| self |) |) ] + |) + |)) + ] + |) |))) ] |) @@ -6649,7 +7254,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6675,7 +7280,7 @@ Module num. } } *) - Definition saturating_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6715,7 +7320,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6741,7 +7346,7 @@ Module num. } } *) - Definition saturating_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6781,14 +7386,14 @@ Module num. intrinsics::saturating_sub(0, self) } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::saturating_sub", [ Ty.path "i16" ] |), - [ Value.Integer Integer.I16 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -6805,14 +7410,14 @@ Module num. } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6853,7 +7458,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6881,18 +7486,23 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.lt - (M.read (| self |)) - (Value.Integer Integer.I16 0)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I16 0)) + BinOp.Pure.eq (| + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6917,7 +7527,7 @@ Module num. } } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6966,7 +7576,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -6995,14 +7605,19 @@ Module num. ltac:(M.monadic (let γ := M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I16 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| 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 (| M.read (| exp |), Value.Integer Integer.U32 2 |)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.U32, + M.read (| exp |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); @@ -7021,7 +7636,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7041,7 +7656,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7049,7 +7664,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -7062,7 +7677,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7082,7 +7697,7 @@ Module num. self.wrapping_sub(rhs as Self) } *) - Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7090,7 +7705,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_sub", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -7103,7 +7718,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7123,7 +7738,7 @@ Module num. self.overflowing_div(rhs).0 } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7150,7 +7765,7 @@ Module num. self.overflowing_div_euclid(rhs).0 } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7178,7 +7793,7 @@ Module num. self.overflowing_rem(rhs).0 } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7205,7 +7820,7 @@ Module num. self.overflowing_rem_euclid(rhs).0 } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7233,14 +7848,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.I16 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -7256,7 +7872,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7266,12 +7882,14 @@ Module num. M.get_associated_function (| Ty.path "i16", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -7288,7 +7906,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7298,12 +7916,14 @@ Module num. M.get_associated_function (| Ty.path "i16", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -7320,14 +7940,14 @@ Module num. } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7360,16 +7980,17 @@ Module num. self.wrapping_abs() as $UnsignedT } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_abs", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -7398,7 +8019,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -7409,39 +8030,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I16 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I16 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7450,18 +8077,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7480,15 +8109,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -7502,7 +8137,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7512,7 +8147,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7538,7 +8173,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7559,7 +8194,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -7578,7 +8218,7 @@ Module num. (c, b != d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -7604,7 +8244,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i16", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -7615,8 +8255,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -7635,14 +8280,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -7658,13 +8303,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I16 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -7681,7 +8333,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7702,7 +8354,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -7721,7 +8378,7 @@ Module num. (c, b != d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -7747,7 +8404,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i16", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -7758,8 +8415,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -7779,14 +8441,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -7802,13 +8464,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I16 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -7825,7 +8494,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7846,7 +8515,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -7866,7 +8540,7 @@ Module num. } } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7874,7 +8548,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7884,24 +8558,44 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.I16, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -7922,7 +8616,7 @@ Module num. } } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7930,7 +8624,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7940,27 +8634,43 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -7980,7 +8690,7 @@ Module num. } } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7988,7 +8698,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7997,27 +8707,43 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I16 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| + Integer.I16, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -8037,7 +8763,7 @@ Module num. } } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8045,7 +8771,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8054,30 +8780,42 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I16 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -8097,14 +8835,14 @@ Module num. } } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8114,21 +8852,33 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ M.read (| M.get_constant (| "core::num::MIN" |) |); Value.Bool true ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [ UnOp.Panic.neg (| M.read (| self |) |); Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (UnOp.Panic.neg (| Integer.I16, M.read (| self |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -8144,20 +8894,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8169,20 +8926,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8194,19 +8958,26 @@ Module num. (self.wrapping_abs(), self == Self::MIN) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_abs", [] |), - [ M.read (| self |) ] - |); - BinOp.Pure.eq (M.read (| self |)) (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_abs", [] |), + [ M.read (| self |) ] + |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8245,7 +9016,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -8256,14 +9027,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -8271,30 +9045,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.I16 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I16 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8303,18 +9086,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8342,19 +9127,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -8377,11 +9169,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -8391,7 +9184,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -8408,7 +9201,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -8441,7 +9234,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -8452,39 +9245,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I16 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I16 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8493,18 +9292,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8515,26 +9316,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.I16, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.I16, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -8544,14 +9356,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Panic.mul (| Integer.I16, M.read (| acc |), M.read (| base |) |) |) |))) |))) | _, _ => M.impossible @@ -8572,7 +9384,7 @@ Module num. } } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8611,16 +9423,22 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "argument of integer square root must be non-negative" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "argument of integer square root must be non-negative" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -8644,7 +9462,7 @@ Module num. q } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8653,19 +9471,27 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in + let q := + M.alloc (| + BinOp.Panic.div (| Integer.I16, M.read (| self |), M.read (| rhs |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |)) - (Value.Integer Integer.I16 0) + BinOp.Pure.lt (| + BinOp.Panic.rem (| + Integer.I16, + M.read (| self |), + M.read (| rhs |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -8675,16 +9501,17 @@ Module num. M.return_ (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I16 0) + BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8693,16 +9520,18 @@ Module num. |) in M.alloc (| BinOp.Panic.sub (| + Integer.I16, M.read (| q |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I16, M.read (| q |), - Value.Integer Integer.I16 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -8712,7 +9541,7 @@ Module num. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in q @@ -8741,23 +9570,26 @@ Module num. } } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.I16, M.read (| self |), M.read (| rhs |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I16 0) + BinOp.Pure.lt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -8792,17 +9624,23 @@ Module num. } } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8811,21 +9649,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I16 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I16 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I16 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I16 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| d |), Value.Integer Integer.I16 1 |) + BinOp.Panic.sub (| + Integer.I16, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -8847,17 +9698,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8866,21 +9723,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I16 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I16 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I16 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I16 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.I16 1 |) + BinOp.Panic.add (| + Integer.I16, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -8912,7 +9782,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8923,28 +9793,34 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.I16, M.read (| self |), M.read (| rhs |) |) + |) in let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8953,40 +9829,48 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I16 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I16 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.I16 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I16 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I16, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I16 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -8995,8 +9879,9 @@ Module num. ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I16, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I16, M.read (| rhs |), M.read (| m |) |) |) |))) ] @@ -9032,7 +9917,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -9043,14 +9928,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I16 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -9058,14 +9946,16 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let r := @@ -9093,7 +9983,11 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))) @@ -9103,7 +9997,7 @@ Module num. let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9112,45 +10006,57 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I16 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I16 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.I16 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I16 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I16, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I16 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -9159,7 +10065,7 @@ Module num. M.get_associated_function (| Ty.path "i16", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I16, M.read (| rhs |), M.read (| m |) |) ] |) |))) @@ -9192,7 +10098,7 @@ Module num. demap(<$UnsignedT>::midpoint(map(self), map(rhs))) } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -9231,7 +10137,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -9240,15 +10146,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.I16 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -9264,27 +10174,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9333,14 +10249,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9389,14 +10305,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9459,7 +10375,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -9467,7 +10383,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9475,29 +10391,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I16 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.I16 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9507,16 +10429,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "i16", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -9524,13 +10448,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.I16, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "i16", "pow", [] |), @@ -9538,22 +10463,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -9564,18 +10489,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.I16, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -9585,7 +10515,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -9593,7 +10523,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -9614,45 +10548,54 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I16 0) + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let log := M.alloc (| BinOp.Panic.sub (| + Integer.U32, BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), - M.rust_cast - (M.call_closure (| + 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 |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| log |)) ] + |) |))) ] |) @@ -9672,35 +10615,41 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I16 0) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::num::int_log10::i16", [] |), - [ M.read (| M.use self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::num::int_log10::i16", [] |), + [ M.read (| M.use self |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -9722,14 +10671,14 @@ Module num. } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9742,7 +10691,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| UnOp.Panic.neg (| M.read (| self |) |) |))); + M.alloc (| UnOp.Panic.neg (| Integer.I16, M.read (| self |) |) |))); fun γ => ltac:(M.monadic self) ] |) @@ -9774,7 +10723,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9782,18 +10731,19 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| other |)); M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| other |) |); M.rust_cast (| M.read (| self |) |) + ] |) |))); fun γ => @@ -9801,7 +10751,8 @@ Module num. (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) + ] |) |))) ] @@ -9825,40 +10776,43 @@ Module num. else { 1 } } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I16 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I16 (-1) |))); + M.alloc (| M.of_value (| Value.Integer (-1) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (Value.Integer Integer.I16 0) + BinOp.Pure.eq (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I16 0 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I16 1 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |))) ] @@ -9870,24 +10824,24 @@ Module num. Axiom AssociatedFunction_signum : M.IsAssociatedFunction Self "signum" signum. (* pub const fn is_positive(self) -> bool { self > 0 } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I16 0))) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. Axiom AssociatedFunction_is_positive : M.IsAssociatedFunction Self "is_positive" is_positive. (* pub const fn is_negative(self) -> bool { self < 0 } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I16 0))) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. @@ -9898,7 +10852,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9922,7 +10876,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9948,7 +10902,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9970,7 +10924,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -9995,7 +10949,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -10021,7 +10975,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -10044,7 +10998,7 @@ Module num. Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -10057,7 +11011,7 @@ Module num. Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -10071,32 +11025,32 @@ Module num. (* pub const MIN: Self = !Self::MAX; *) (* Ty.path "i32" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic - (M.alloc (| UnOp.Pure.not (M.read (| M.get_constant (| "core::num::MAX" |) |)) |))). + (M.alloc (| UnOp.Pure.not (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = (<$UnsignedT>::MAX >> 1) as Self; *) (* Ty.path "i32" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$UnsignedT>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -10105,7 +11059,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -10122,14 +11076,14 @@ Module num. M.IsAssociatedFunction Self "from_str_radix" from_str_radix. (* pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "count_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -10141,14 +11095,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i32", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -10160,14 +11114,14 @@ Module num. (self as $UnsignedT).leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "leading_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -10180,14 +11134,14 @@ Module num. (self as $UnsignedT).trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "trailing_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -10200,14 +11154,14 @@ Module num. (self as $UnsignedT).leading_ones() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "leading_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -10219,14 +11173,14 @@ Module num. (self as $UnsignedT).trailing_ones() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "trailing_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -10239,17 +11193,18 @@ Module num. (self as $UnsignedT).rotate_left(n) as Self } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u32", "rotate_left", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -10260,17 +11215,18 @@ Module num. (self as $UnsignedT).rotate_right(n) as Self } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u32", "rotate_right", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -10281,16 +11237,17 @@ Module num. (self as $UnsignedT).swap_bytes() as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u32", "swap_bytes", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -10301,16 +11258,17 @@ Module num. (self as $UnsignedT).reverse_bits() as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u32", "reverse_bits", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -10328,7 +11286,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -10354,7 +11312,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -10377,7 +11335,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10403,7 +11361,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10420,7 +11378,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10442,7 +11400,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10456,11 +11414,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -10479,7 +11443,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10501,7 +11465,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10523,7 +11487,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10537,11 +11501,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -10560,7 +11530,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10582,7 +11552,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10596,11 +11566,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -10619,7 +11595,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10641,7 +11617,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10663,7 +11639,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10677,11 +11653,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -10700,7 +11682,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10722,7 +11704,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10736,11 +11718,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -10759,7 +11747,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10785,7 +11773,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10793,7 +11781,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10804,37 +11792,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I32 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "i32" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "i32" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -10854,7 +11852,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10862,7 +11860,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10873,32 +11871,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I32 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -10919,7 +11928,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10927,7 +11936,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10938,37 +11947,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I32 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "i32" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "i32" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -10988,7 +12007,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10996,7 +12015,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11007,32 +12026,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I32 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -11049,7 +12079,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11070,7 +12100,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11084,11 +12114,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -11107,14 +12143,14 @@ Module num. unsafe { intrinsics::unchecked_sub(0, self) } } *) - Definition unchecked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "i32" ] |), - [ Value.Integer Integer.I32 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -11128,7 +12164,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11150,7 +12186,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11164,11 +12200,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -11188,7 +12230,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11201,16 +12243,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -11219,18 +12262,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -11246,7 +12291,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11268,7 +12313,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11282,11 +12327,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -11306,7 +12357,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11319,16 +12370,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -11337,18 +12389,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -11367,14 +12421,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11396,7 +12450,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -11428,7 +12486,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -11439,14 +12497,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -11454,30 +12515,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.I32 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I32 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11486,18 +12552,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11536,9 +12604,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -11547,15 +12617,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -11589,9 +12665,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -11600,7 +12678,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -11610,7 +12688,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -11639,36 +12717,42 @@ Module num. } } *) - Definition checked_isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I32 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "u32", "isqrt", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| Ty.path "u32", "isqrt", [] |), + [ M.rust_cast (| M.read (| self |) |) ] + |) + |)) + ] + |) |))) ] |) @@ -11684,7 +12768,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11710,7 +12794,7 @@ Module num. } } *) - Definition saturating_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11750,7 +12834,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11776,7 +12860,7 @@ Module num. } } *) - Definition saturating_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11816,14 +12900,14 @@ Module num. intrinsics::saturating_sub(0, self) } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::saturating_sub", [ Ty.path "i32" ] |), - [ Value.Integer Integer.I32 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -11840,14 +12924,14 @@ Module num. } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11888,7 +12972,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11916,18 +13000,23 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.lt - (M.read (| self |)) - (Value.Integer Integer.I32 0)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I32 0)) + BinOp.Pure.eq (| + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -11952,7 +13041,7 @@ Module num. } } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12001,7 +13090,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -12030,14 +13119,19 @@ Module num. ltac:(M.monadic (let γ := M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I32 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| 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 (| M.read (| exp |), Value.Integer Integer.U32 2 |)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.U32, + M.read (| exp |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); @@ -12056,7 +13150,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12076,7 +13170,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12084,7 +13178,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -12097,7 +13191,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12117,7 +13211,7 @@ Module num. self.wrapping_sub(rhs as Self) } *) - Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12125,7 +13219,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -12138,7 +13232,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12158,7 +13252,7 @@ Module num. self.overflowing_div(rhs).0 } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12185,7 +13279,7 @@ Module num. self.overflowing_div_euclid(rhs).0 } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12213,7 +13307,7 @@ Module num. self.overflowing_rem(rhs).0 } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12240,7 +13334,7 @@ Module num. self.overflowing_rem_euclid(rhs).0 } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12268,14 +13362,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.I32 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -12291,7 +13386,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12301,12 +13396,14 @@ Module num. M.get_associated_function (| Ty.path "i32", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -12323,7 +13420,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12333,12 +13430,14 @@ Module num. M.get_associated_function (| Ty.path "i32", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -12355,14 +13454,14 @@ Module num. } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12395,16 +13494,17 @@ Module num. self.wrapping_abs() as $UnsignedT } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_abs", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -12433,7 +13533,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -12444,39 +13544,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I32 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I32 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12485,18 +13591,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12515,15 +13623,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -12537,7 +13651,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -12547,7 +13661,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -12573,7 +13687,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12594,7 +13708,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -12613,7 +13732,7 @@ Module num. (c, b != d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -12639,7 +13758,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -12650,8 +13769,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -12670,14 +13794,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -12693,13 +13817,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I32 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -12716,7 +13847,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12737,7 +13868,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -12756,7 +13892,7 @@ Module num. (c, b != d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -12782,7 +13918,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -12793,8 +13929,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -12814,14 +13955,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -12837,13 +13978,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I32 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -12860,7 +14008,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12881,7 +14029,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -12901,7 +14054,7 @@ Module num. } } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12909,7 +14062,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12919,24 +14072,44 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.I32, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -12957,7 +14130,7 @@ Module num. } } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12965,7 +14138,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12975,27 +14148,43 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -13015,7 +14204,7 @@ Module num. } } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -13023,7 +14212,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13032,27 +14221,43 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I32 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| + Integer.I32, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -13072,7 +14277,7 @@ Module num. } } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -13080,7 +14285,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13089,30 +14294,42 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I32 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -13132,14 +14349,14 @@ Module num. } } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13149,21 +14366,33 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ M.read (| M.get_constant (| "core::num::MIN" |) |); Value.Bool true ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [ UnOp.Panic.neg (| M.read (| self |) |); Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (UnOp.Panic.neg (| Integer.I32, M.read (| self |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -13179,20 +14408,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13204,20 +14440,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13229,19 +14472,26 @@ Module num. (self.wrapping_abs(), self == Self::MIN) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_abs", [] |), - [ M.read (| self |) ] - |); - BinOp.Pure.eq (M.read (| self |)) (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_abs", [] |), + [ M.read (| self |) ] + |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13280,7 +14530,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -13291,14 +14541,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13306,30 +14559,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.I32 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I32 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13338,18 +14600,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13377,19 +14641,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -13412,11 +14683,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -13426,7 +14698,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -13443,7 +14715,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -13476,7 +14748,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -13487,39 +14759,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I32 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I32 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13528,18 +14806,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13550,26 +14830,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.I32, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.I32, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -13579,14 +14870,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Panic.mul (| Integer.I32, M.read (| acc |), M.read (| base |) |) |) |))) |))) | _, _ => M.impossible @@ -13607,7 +14898,7 @@ Module num. } } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13646,16 +14937,22 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "argument of integer square root must be non-negative" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "argument of integer square root must be non-negative" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -13679,7 +14976,7 @@ Module num. q } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -13688,19 +14985,27 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in + let q := + M.alloc (| + BinOp.Panic.div (| Integer.I32, M.read (| self |), M.read (| rhs |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |)) - (Value.Integer Integer.I32 0) + BinOp.Pure.lt (| + BinOp.Panic.rem (| + Integer.I32, + M.read (| self |), + M.read (| rhs |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13710,16 +15015,17 @@ Module num. M.return_ (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I32 0) + BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13728,16 +15034,18 @@ Module num. |) in M.alloc (| BinOp.Panic.sub (| + Integer.I32, M.read (| q |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I32, M.read (| q |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -13747,7 +15055,7 @@ Module num. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in q @@ -13776,23 +15084,26 @@ Module num. } } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.I32, M.read (| self |), M.read (| rhs |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I32 0) + BinOp.Pure.lt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -13827,17 +15138,23 @@ Module num. } } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13846,21 +15163,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I32 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I32 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I32 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I32 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| d |), Value.Integer Integer.I32 1 |) + BinOp.Panic.sub (| + Integer.I32, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -13882,17 +15212,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13901,21 +15237,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I32 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I32 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I32 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I32 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.I32 1 |) + BinOp.Panic.add (| + Integer.I32, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -13947,7 +15296,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -13958,28 +15307,34 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.I32, M.read (| self |), M.read (| rhs |) |) + |) in let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13988,40 +15343,48 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I32 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I32 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.I32 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I32 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I32, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I32 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14030,8 +15393,9 @@ Module num. ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I32, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I32, M.read (| rhs |), M.read (| m |) |) |) |))) ] @@ -14067,7 +15431,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -14078,14 +15442,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I32 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14093,14 +15460,16 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let r := @@ -14128,7 +15497,11 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))) @@ -14138,7 +15511,7 @@ Module num. let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14147,45 +15520,57 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I32 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I32 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.I32 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I32 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I32, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I32 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -14194,7 +15579,7 @@ Module num. M.get_associated_function (| Ty.path "i32", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I32, M.read (| rhs |), M.read (| m |) |) ] |) |))) @@ -14227,7 +15612,7 @@ Module num. demap(<$UnsignedT>::midpoint(map(self), map(rhs))) } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -14266,7 +15651,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -14275,15 +15660,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.I32 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -14299,27 +15688,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14368,14 +15763,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14424,14 +15819,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14494,7 +15889,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -14502,7 +15897,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14510,29 +15905,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I32 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.I32 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14542,16 +15943,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "i32", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -14559,13 +15962,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.I32, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "i32", "pow", [] |), @@ -14573,22 +15977,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -14599,18 +16003,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.I32, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -14620,7 +16029,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -14628,7 +16037,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -14649,45 +16062,54 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I32 0) + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let log := M.alloc (| BinOp.Panic.sub (| + Integer.U32, BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), - M.rust_cast - (M.call_closure (| + 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 |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| log |)) ] + |) |))) ] |) @@ -14707,35 +16129,41 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I32 0) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::num::int_log10::i32", [] |), - [ M.read (| M.use self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::num::int_log10::i32", [] |), + [ M.read (| M.use self |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -14757,14 +16185,14 @@ Module num. } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14777,7 +16205,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| UnOp.Panic.neg (| M.read (| self |) |) |))); + M.alloc (| UnOp.Panic.neg (| Integer.I32, M.read (| self |) |) |))); fun γ => ltac:(M.monadic self) ] |) @@ -14809,7 +16237,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14817,18 +16245,19 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| other |)); M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| other |) |); M.rust_cast (| M.read (| self |) |) + ] |) |))); fun γ => @@ -14836,7 +16265,8 @@ Module num. (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) + ] |) |))) ] @@ -14860,40 +16290,43 @@ Module num. else { 1 } } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I32 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I32 (-1) |))); + M.alloc (| M.of_value (| Value.Integer (-1) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (Value.Integer Integer.I32 0) + BinOp.Pure.eq (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I32 0 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 1 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |))) ] @@ -14905,24 +16338,24 @@ Module num. Axiom AssociatedFunction_signum : M.IsAssociatedFunction Self "signum" signum. (* pub const fn is_positive(self) -> bool { self > 0 } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I32 0))) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. Axiom AssociatedFunction_is_positive : M.IsAssociatedFunction Self "is_positive" is_positive. (* pub const fn is_negative(self) -> bool { self < 0 } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I32 0))) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. @@ -14933,7 +16366,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14957,7 +16390,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14983,7 +16416,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15005,7 +16438,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -15030,7 +16463,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -15056,7 +16489,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -15079,7 +16512,7 @@ Module num. Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -15092,7 +16525,7 @@ Module num. Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -15106,32 +16539,32 @@ Module num. (* pub const MIN: Self = !Self::MAX; *) (* Ty.path "i64" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic - (M.alloc (| UnOp.Pure.not (M.read (| M.get_constant (| "core::num::MAX" |) |)) |))). + (M.alloc (| UnOp.Pure.not (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = (<$UnsignedT>::MAX >> 1) as Self; *) (* Ty.path "i64" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$UnsignedT>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -15140,7 +16573,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -15157,14 +16590,14 @@ Module num. M.IsAssociatedFunction Self "from_str_radix" from_str_radix. (* pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "count_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -15176,14 +16609,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i64", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -15195,14 +16628,14 @@ Module num. (self as $UnsignedT).leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "leading_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -15215,14 +16648,14 @@ Module num. (self as $UnsignedT).trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "trailing_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -15235,14 +16668,14 @@ Module num. (self as $UnsignedT).leading_ones() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "leading_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -15254,14 +16687,14 @@ Module num. (self as $UnsignedT).trailing_ones() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "trailing_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -15274,17 +16707,18 @@ Module num. (self as $UnsignedT).rotate_left(n) as Self } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u64", "rotate_left", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -15295,17 +16729,18 @@ Module num. (self as $UnsignedT).rotate_right(n) as Self } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u64", "rotate_right", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -15316,16 +16751,17 @@ Module num. (self as $UnsignedT).swap_bytes() as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u64", "swap_bytes", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -15336,16 +16772,17 @@ Module num. (self as $UnsignedT).reverse_bits() as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u64", "reverse_bits", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -15363,7 +16800,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -15389,7 +16826,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -15412,7 +16849,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15438,7 +16875,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15455,7 +16892,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15477,7 +16914,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15491,11 +16928,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -15514,7 +16957,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15536,7 +16979,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15558,7 +17001,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15572,11 +17015,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -15595,7 +17044,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15617,7 +17066,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15631,11 +17080,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -15654,7 +17109,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15676,7 +17131,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15698,7 +17153,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15712,11 +17167,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -15735,7 +17196,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15757,7 +17218,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15771,11 +17232,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -15794,7 +17261,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15820,7 +17287,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15828,7 +17295,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15839,37 +17306,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I64 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "i64" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "i64" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -15889,7 +17366,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15897,7 +17374,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15908,32 +17385,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I64 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -15954,7 +17442,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15962,7 +17450,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15973,37 +17461,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I64 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "i64" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "i64" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -16023,7 +17521,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16031,7 +17529,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16042,32 +17540,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I64 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -16084,7 +17593,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16105,7 +17614,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16119,11 +17628,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -16142,14 +17657,14 @@ Module num. unsafe { intrinsics::unchecked_sub(0, self) } } *) - Definition unchecked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "i64" ] |), - [ Value.Integer Integer.I64 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -16163,7 +17678,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16185,7 +17700,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16199,11 +17714,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -16223,7 +17744,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16236,16 +17757,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -16254,18 +17776,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -16281,7 +17805,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16303,7 +17827,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16317,11 +17841,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -16341,7 +17871,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16354,16 +17884,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -16372,18 +17903,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -16402,14 +17935,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16431,7 +17964,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -16463,7 +18000,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -16474,14 +18011,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -16489,30 +18029,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.I64 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I64 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16521,18 +18066,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16571,9 +18118,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -16582,15 +18131,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -16624,9 +18179,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -16635,7 +18192,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -16645,7 +18202,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -16674,36 +18231,42 @@ Module num. } } *) - Definition checked_isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I64 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "u64", "isqrt", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "isqrt", [] |), + [ M.rust_cast (| M.read (| self |) |) ] + |) + |)) + ] + |) |))) ] |) @@ -16719,7 +18282,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16745,7 +18308,7 @@ Module num. } } *) - Definition saturating_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16785,7 +18348,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16811,7 +18374,7 @@ Module num. } } *) - Definition saturating_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16851,14 +18414,14 @@ Module num. intrinsics::saturating_sub(0, self) } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::saturating_sub", [ Ty.path "i64" ] |), - [ Value.Integer Integer.I64 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -16875,14 +18438,14 @@ Module num. } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16923,7 +18486,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -16951,18 +18514,23 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.lt - (M.read (| self |)) - (Value.Integer Integer.I64 0)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I64 0)) + BinOp.Pure.eq (| + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -16987,7 +18555,7 @@ Module num. } } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17036,7 +18604,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -17065,14 +18633,19 @@ Module num. ltac:(M.monadic (let γ := M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I64 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| 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 (| M.read (| exp |), Value.Integer Integer.U32 2 |)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.U32, + M.read (| exp |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); @@ -17091,7 +18664,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17111,7 +18684,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17119,7 +18692,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -17132,7 +18705,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17152,7 +18725,7 @@ Module num. self.wrapping_sub(rhs as Self) } *) - Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17160,7 +18733,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_sub", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -17173,7 +18746,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17193,7 +18766,7 @@ Module num. self.overflowing_div(rhs).0 } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17220,7 +18793,7 @@ Module num. self.overflowing_div_euclid(rhs).0 } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17248,7 +18821,7 @@ Module num. self.overflowing_rem(rhs).0 } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17275,7 +18848,7 @@ Module num. self.overflowing_rem_euclid(rhs).0 } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17303,14 +18876,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.I64 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -17326,7 +18900,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17336,12 +18910,14 @@ Module num. M.get_associated_function (| Ty.path "i64", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -17358,7 +18934,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17368,12 +18944,14 @@ Module num. M.get_associated_function (| Ty.path "i64", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -17390,14 +18968,14 @@ Module num. } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -17430,16 +19008,17 @@ Module num. self.wrapping_abs() as $UnsignedT } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_abs", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -17468,7 +19047,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -17479,39 +19058,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I64 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I64 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17520,18 +19105,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17550,15 +19137,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -17572,7 +19165,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -17582,7 +19175,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -17608,7 +19201,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17629,7 +19222,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -17648,7 +19246,7 @@ Module num. (c, b != d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -17674,7 +19272,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i64", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -17685,8 +19283,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -17705,14 +19308,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -17728,13 +19331,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I64 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -17751,7 +19361,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17772,7 +19382,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -17791,7 +19406,7 @@ Module num. (c, b != d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -17817,7 +19432,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i64", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -17828,8 +19443,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -17849,14 +19469,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -17872,13 +19492,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I64 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -17895,7 +19522,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17916,7 +19543,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -17936,7 +19568,7 @@ Module num. } } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17944,7 +19576,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -17954,24 +19586,44 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.I64, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -17992,7 +19644,7 @@ Module num. } } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -18000,7 +19652,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -18010,27 +19662,43 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -18050,7 +19718,7 @@ Module num. } } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -18058,7 +19726,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -18067,27 +19735,43 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I64 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| + Integer.I64, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -18107,7 +19791,7 @@ Module num. } } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -18115,7 +19799,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -18124,30 +19808,42 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I64 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -18167,14 +19863,14 @@ Module num. } } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -18184,21 +19880,33 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ M.read (| M.get_constant (| "core::num::MIN" |) |); Value.Bool true ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [ UnOp.Panic.neg (| M.read (| self |) |); Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (UnOp.Panic.neg (| Integer.I64, M.read (| self |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -18214,20 +19922,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -18239,20 +19954,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -18264,19 +19986,26 @@ Module num. (self.wrapping_abs(), self == Self::MIN) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_abs", [] |), - [ M.read (| self |) ] - |); - BinOp.Pure.eq (M.read (| self |)) (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_abs", [] |), + [ M.read (| self |) ] + |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -18315,7 +20044,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -18326,14 +20055,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -18341,30 +20073,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.I64 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I64 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -18373,18 +20114,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -18412,19 +20155,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -18447,11 +20197,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -18461,7 +20212,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -18478,7 +20229,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -18511,7 +20262,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -18522,39 +20273,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I64 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I64 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -18563,18 +20320,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -18585,26 +20344,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.I64, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.I64, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -18614,14 +20384,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Panic.mul (| Integer.I64, M.read (| acc |), M.read (| base |) |) |) |))) |))) | _, _ => M.impossible @@ -18642,7 +20412,7 @@ Module num. } } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18681,16 +20451,22 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "argument of integer square root must be non-negative" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "argument of integer square root must be non-negative" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -18714,7 +20490,7 @@ Module num. q } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -18723,19 +20499,27 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in + let q := + M.alloc (| + BinOp.Panic.div (| Integer.I64, M.read (| self |), M.read (| rhs |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |)) - (Value.Integer Integer.I64 0) + BinOp.Pure.lt (| + BinOp.Panic.rem (| + Integer.I64, + M.read (| self |), + M.read (| rhs |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -18745,16 +20529,17 @@ Module num. M.return_ (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I64 0) + BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -18763,16 +20548,18 @@ Module num. |) in M.alloc (| BinOp.Panic.sub (| + Integer.I64, M.read (| q |), - Value.Integer Integer.I64 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I64, M.read (| q |), - Value.Integer Integer.I64 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -18782,7 +20569,7 @@ Module num. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in q @@ -18811,23 +20598,26 @@ Module num. } } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.I64, M.read (| self |), M.read (| rhs |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I64 0) + BinOp.Pure.lt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -18862,17 +20652,23 @@ Module num. } } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -18881,21 +20677,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I64 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I64 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I64 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I64 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| d |), Value.Integer Integer.I64 1 |) + BinOp.Panic.sub (| + Integer.I64, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -18917,17 +20726,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -18936,21 +20751,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I64 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I64 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I64 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I64 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.I64 1 |) + BinOp.Panic.add (| + Integer.I64, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -18982,7 +20810,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -18993,28 +20821,34 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.I64, M.read (| self |), M.read (| rhs |) |) + |) in let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19023,40 +20857,48 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I64 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I64 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.I64 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I64 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I64, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I64 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -19065,8 +20907,9 @@ Module num. ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I64, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I64, M.read (| rhs |), M.read (| m |) |) |) |))) ] @@ -19102,7 +20945,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -19113,14 +20956,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I64 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -19128,14 +20974,16 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let r := @@ -19163,7 +21011,11 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))) @@ -19173,7 +21025,7 @@ Module num. let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19182,45 +21034,57 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I64 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I64 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.I64 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I64 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I64, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I64 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -19229,7 +21093,7 @@ Module num. M.get_associated_function (| Ty.path "i64", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I64, M.read (| rhs |), M.read (| m |) |) ] |) |))) @@ -19262,7 +21126,7 @@ Module num. demap(<$UnsignedT>::midpoint(map(self), map(rhs))) } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -19301,7 +21165,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -19310,15 +21174,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.I64 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -19334,27 +21202,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19403,14 +21277,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19459,14 +21333,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19529,7 +21403,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -19537,7 +21411,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19545,29 +21419,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I64 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.I64 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -19577,16 +21457,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "i64", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -19594,13 +21476,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.I64, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "i64", "pow", [] |), @@ -19608,22 +21491,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -19634,18 +21517,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.I64, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -19655,7 +21543,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -19663,7 +21551,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -19684,45 +21576,54 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I64 0) + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let log := M.alloc (| BinOp.Panic.sub (| + Integer.U32, BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), - M.rust_cast - (M.call_closure (| + 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 |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| log |)) ] + |) |))) ] |) @@ -19742,35 +21643,41 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I64 0) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::num::int_log10::i64", [] |), - [ M.read (| M.use self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::num::int_log10::i64", [] |), + [ M.read (| M.use self |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -19792,14 +21699,14 @@ Module num. } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19812,7 +21719,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| UnOp.Panic.neg (| M.read (| self |) |) |))); + M.alloc (| UnOp.Panic.neg (| Integer.I64, M.read (| self |) |) |))); fun γ => ltac:(M.monadic self) ] |) @@ -19844,7 +21751,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19852,18 +21759,19 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| other |)); M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| other |) |); M.rust_cast (| M.read (| self |) |) + ] |) |))); fun γ => @@ -19871,7 +21779,8 @@ Module num. (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) + ] |) |))) ] @@ -19895,40 +21804,43 @@ Module num. else { 1 } } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I64 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I64 (-1) |))); + M.alloc (| M.of_value (| Value.Integer (-1) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (Value.Integer Integer.I64 0) + BinOp.Pure.eq (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I64 0 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I64 1 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |))) ] @@ -19940,24 +21852,24 @@ Module num. Axiom AssociatedFunction_signum : M.IsAssociatedFunction Self "signum" signum. (* pub const fn is_positive(self) -> bool { self > 0 } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I64 0))) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. Axiom AssociatedFunction_is_positive : M.IsAssociatedFunction Self "is_positive" is_positive. (* pub const fn is_negative(self) -> bool { self < 0 } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I64 0))) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. @@ -19968,7 +21880,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19992,7 +21904,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20018,7 +21930,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20040,7 +21952,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -20065,7 +21977,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -20091,7 +22003,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -20114,7 +22026,7 @@ Module num. Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -20127,7 +22039,7 @@ Module num. Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -20141,32 +22053,32 @@ Module num. (* pub const MIN: Self = !Self::MAX; *) (* Ty.path "i128" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic - (M.alloc (| UnOp.Pure.not (M.read (| M.get_constant (| "core::num::MAX" |) |)) |))). + (M.alloc (| UnOp.Pure.not (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = (<$UnsignedT>::MAX >> 1) as Self; *) (* Ty.path "i128" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$UnsignedT>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -20175,7 +22087,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -20192,14 +22104,14 @@ Module num. M.IsAssociatedFunction Self "from_str_radix" from_str_radix. (* pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "count_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -20211,14 +22123,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -20230,14 +22142,14 @@ Module num. (self as $UnsignedT).leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "leading_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -20250,14 +22162,14 @@ Module num. (self as $UnsignedT).trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "trailing_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -20270,14 +22182,14 @@ Module num. (self as $UnsignedT).leading_ones() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "leading_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -20289,14 +22201,14 @@ Module num. (self as $UnsignedT).trailing_ones() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "trailing_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -20309,17 +22221,18 @@ Module num. (self as $UnsignedT).rotate_left(n) as Self } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "rotate_left", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -20330,17 +22243,18 @@ Module num. (self as $UnsignedT).rotate_right(n) as Self } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "rotate_right", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -20351,16 +22265,17 @@ Module num. (self as $UnsignedT).swap_bytes() as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "swap_bytes", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -20371,16 +22286,17 @@ Module num. (self as $UnsignedT).reverse_bits() as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "reverse_bits", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -20398,7 +22314,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -20424,7 +22340,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -20447,7 +22363,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20473,7 +22389,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20490,7 +22406,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20512,7 +22428,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20526,11 +22442,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -20549,7 +22471,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20571,7 +22493,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20593,7 +22515,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20607,11 +22529,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -20630,7 +22558,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20652,7 +22580,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20666,11 +22594,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -20689,7 +22623,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20711,7 +22645,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20733,7 +22667,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20747,11 +22681,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -20770,7 +22710,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20792,7 +22732,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20806,11 +22746,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -20829,7 +22775,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20855,7 +22801,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20863,7 +22809,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20874,37 +22820,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I128 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "i128" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "i128" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -20924,7 +22880,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20932,7 +22888,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20943,32 +22899,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I128 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -20989,7 +22956,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -20997,7 +22964,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -21008,37 +22975,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I128 (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "i128" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "i128" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -21058,7 +23035,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21066,7 +23043,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -21077,32 +23054,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.I128 (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -21119,7 +23107,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21140,7 +23128,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -21154,11 +23142,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -21177,14 +23171,14 @@ Module num. unsafe { intrinsics::unchecked_sub(0, self) } } *) - Definition unchecked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "i128" ] |), - [ Value.Integer Integer.I128 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -21198,7 +23192,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21220,7 +23214,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -21234,11 +23228,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -21258,7 +23258,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21271,16 +23271,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -21289,18 +23290,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -21316,7 +23319,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21338,7 +23341,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -21352,11 +23355,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -21376,7 +23385,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21389,16 +23398,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -21407,18 +23417,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -21437,14 +23449,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -21466,7 +23478,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -21498,7 +23514,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -21509,14 +23525,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -21524,30 +23543,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.I128 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I128 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21556,18 +23580,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21606,9 +23632,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -21617,15 +23645,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -21659,9 +23693,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -21670,7 +23706,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -21680,7 +23716,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -21709,36 +23745,42 @@ Module num. } } *) - Definition checked_isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I128 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "u128", "isqrt", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| Ty.path "u128", "isqrt", [] |), + [ M.rust_cast (| M.read (| self |) |) ] + |) + |)) + ] + |) |))) ] |) @@ -21754,7 +23796,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21780,7 +23822,7 @@ Module num. } } *) - Definition saturating_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21820,7 +23862,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21846,7 +23888,7 @@ Module num. } } *) - Definition saturating_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21886,14 +23928,14 @@ Module num. intrinsics::saturating_sub(0, self) } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::saturating_sub", [ Ty.path "i128" ] |), - [ Value.Integer Integer.I128 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -21910,14 +23952,14 @@ Module num. } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -21958,7 +24000,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21986,20 +24028,23 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.lt - (M.read (| self |)) - (Value.Integer Integer.I128 0)) - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I128 0)) + BinOp.Pure.eq (| + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -22024,7 +24069,7 @@ Module num. } } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22073,7 +24118,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -22102,14 +24147,19 @@ Module num. ltac:(M.monadic (let γ := M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I128 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| 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 (| M.read (| exp |), Value.Integer Integer.U32 2 |)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.U32, + M.read (| exp |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); @@ -22128,7 +24178,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22148,7 +24198,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22156,7 +24206,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -22169,7 +24219,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22189,7 +24239,7 @@ Module num. self.wrapping_sub(rhs as Self) } *) - Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22197,7 +24247,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "wrapping_sub", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -22210,7 +24260,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22230,7 +24280,7 @@ Module num. self.overflowing_div(rhs).0 } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22257,7 +24307,7 @@ Module num. self.overflowing_div_euclid(rhs).0 } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22285,7 +24335,7 @@ Module num. self.overflowing_rem(rhs).0 } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22312,7 +24362,7 @@ Module num. self.overflowing_rem_euclid(rhs).0 } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22340,14 +24390,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.I128 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -22363,7 +24414,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22373,12 +24424,14 @@ Module num. M.get_associated_function (| Ty.path "i128", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -22395,7 +24448,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22405,12 +24458,14 @@ Module num. M.get_associated_function (| Ty.path "i128", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -22427,14 +24482,14 @@ Module num. } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22467,16 +24522,17 @@ Module num. self.wrapping_abs() as $UnsignedT } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i128", "wrapping_abs", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -22505,7 +24561,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -22516,39 +24572,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I128 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I128 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -22557,18 +24619,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -22587,15 +24651,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -22609,7 +24679,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -22619,7 +24689,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -22645,7 +24715,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22666,7 +24736,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -22685,7 +24760,7 @@ Module num. (c, b != d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -22711,7 +24786,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i128", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -22722,8 +24797,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -22742,14 +24822,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -22765,13 +24845,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I128 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -22788,7 +24875,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22809,7 +24896,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -22828,7 +24920,7 @@ Module num. (c, b != d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -22854,7 +24946,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i128", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -22865,8 +24957,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -22886,14 +24983,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -22909,13 +25006,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I128 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -22932,7 +25036,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22953,7 +25057,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -22973,7 +25082,7 @@ Module num. } } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -22981,7 +25090,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -22991,24 +25100,44 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.I128, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -23029,7 +25158,7 @@ Module num. } } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -23037,7 +25166,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -23047,27 +25176,43 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -23087,7 +25232,7 @@ Module num. } } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -23095,7 +25240,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -23104,27 +25249,43 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I128 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| + Integer.I128, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -23144,7 +25305,7 @@ Module num. } } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -23152,7 +25313,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -23161,30 +25322,42 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I128 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -23204,14 +25377,14 @@ Module num. } } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -23221,21 +25394,33 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ M.read (| M.get_constant (| "core::num::MIN" |) |); Value.Bool true ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [ UnOp.Panic.neg (| M.read (| self |) |); Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (UnOp.Panic.neg (| Integer.I128, M.read (| self |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -23251,20 +25436,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -23276,20 +25468,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -23301,19 +25500,26 @@ Module num. (self.wrapping_abs(), self == Self::MIN) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_abs", [] |), - [ M.read (| self |) ] - |); - BinOp.Pure.eq (M.read (| self |)) (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_abs", [] |), + [ M.read (| self |) ] + |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -23352,7 +25558,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -23363,14 +25569,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -23378,30 +25587,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.I128 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I128 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23410,18 +25628,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23449,19 +25669,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -23484,11 +25711,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -23498,7 +25726,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -23515,7 +25743,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -23548,7 +25776,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -23559,39 +25787,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.I128 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.I128 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23600,18 +25834,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23622,26 +25858,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.I128, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.I128, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -23651,14 +25898,16 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| + BinOp.Panic.mul (| Integer.I128, M.read (| acc |), M.read (| base |) |) + |) |))) |))) | _, _ => M.impossible @@ -23679,7 +25928,7 @@ Module num. } } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -23718,16 +25967,22 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "argument of integer square root must be non-negative" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "argument of integer square root must be non-negative" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -23751,7 +26006,7 @@ Module num. q } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -23760,19 +26015,27 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in + let q := + M.alloc (| + BinOp.Panic.div (| Integer.I128, M.read (| self |), M.read (| rhs |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |)) - (Value.Integer Integer.I128 0) + BinOp.Pure.lt (| + BinOp.Panic.rem (| + Integer.I128, + M.read (| self |), + M.read (| rhs |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -23782,16 +26045,17 @@ Module num. M.return_ (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I128 0) + BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23800,16 +26064,18 @@ Module num. |) in M.alloc (| BinOp.Panic.sub (| + Integer.I128, M.read (| q |), - Value.Integer Integer.I128 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I128, M.read (| q |), - Value.Integer Integer.I128 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -23819,7 +26085,7 @@ Module num. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in q @@ -23848,23 +26114,26 @@ Module num. } } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.I128, M.read (| self |), M.read (| rhs |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I128 0) + BinOp.Pure.lt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -23899,17 +26168,23 @@ Module num. } } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -23918,21 +26193,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I128 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I128 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I128 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I128 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| d |), Value.Integer Integer.I128 1 |) + BinOp.Panic.sub (| + Integer.I128, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -23954,17 +26242,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -23973,21 +26267,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I128 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.I128 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.I128 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I128 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.I128 1 |) + BinOp.Panic.add (| + Integer.I128, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -24019,7 +26326,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -24030,28 +26337,34 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.I128, M.read (| self |), M.read (| rhs |) |) + |) in let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -24060,40 +26373,48 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I128 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I128 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.I128 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I128 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I128, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I128 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -24102,8 +26423,9 @@ Module num. ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.I128, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I128, M.read (| rhs |), M.read (| m |) |) |) |))) ] @@ -24139,7 +26461,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -24150,14 +26472,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.I128 (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -24165,14 +26490,16 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let r := @@ -24200,7 +26527,11 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))) @@ -24210,7 +26541,7 @@ Module num. let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -24219,45 +26550,57 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.I128 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I128 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.I128 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.I128 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.I128, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.I128 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -24266,7 +26609,7 @@ Module num. M.get_associated_function (| Ty.path "i128", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.I128, M.read (| rhs |), M.read (| m |) |) ] |) |))) @@ -24299,7 +26642,7 @@ Module num. demap(<$UnsignedT>::midpoint(map(self), map(rhs))) } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -24338,7 +26681,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -24347,15 +26690,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.I128 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -24371,27 +26718,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -24440,14 +26793,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -24496,14 +26849,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -24566,7 +26919,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -24574,7 +26927,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -24582,29 +26935,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I128 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.I128 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24614,16 +26973,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "i128", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -24631,13 +26992,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.I128, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "i128", "pow", [] |), @@ -24645,22 +27007,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -24671,18 +27033,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.I128, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -24692,7 +27059,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -24700,7 +27067,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -24721,45 +27092,54 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.I128 0) + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let log := M.alloc (| BinOp.Panic.sub (| + Integer.U32, BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), - M.rust_cast - (M.call_closure (| + 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 |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| log |)) ] + |) |))) ] |) @@ -24779,35 +27159,41 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I128 0) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::num::int_log10::i128", [] |), - [ M.read (| M.use self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::num::int_log10::i128", [] |), + [ M.read (| M.use self |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -24829,14 +27215,14 @@ Module num. } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -24849,7 +27235,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| UnOp.Panic.neg (| M.read (| self |) |) |))); + M.alloc (| UnOp.Panic.neg (| Integer.I128, M.read (| self |) |) |))); fun γ => ltac:(M.monadic self) ] |) @@ -24881,7 +27267,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24889,18 +27275,19 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| other |)); M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| other |) |); M.rust_cast (| M.read (| self |) |) + ] |) |))); fun γ => @@ -24908,7 +27295,8 @@ Module num. (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) + ] |) |))) ] @@ -24932,40 +27320,43 @@ Module num. else { 1 } } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I128 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I128 (-1) |))); + M.alloc (| M.of_value (| Value.Integer (-1) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (Value.Integer Integer.I128 0) + BinOp.Pure.eq (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I128 0 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I128 1 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |))) ] @@ -24977,24 +27368,24 @@ Module num. Axiom AssociatedFunction_signum : M.IsAssociatedFunction Self "signum" signum. (* pub const fn is_positive(self) -> bool { self > 0 } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.I128 0))) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. Axiom AssociatedFunction_is_positive : M.IsAssociatedFunction Self "is_positive" is_positive. (* pub const fn is_negative(self) -> bool { self < 0 } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.I128 0))) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. @@ -25005,7 +27396,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -25029,7 +27420,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -25055,7 +27446,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -25077,7 +27468,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -25102,7 +27493,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -25128,7 +27519,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -25151,7 +27542,7 @@ Module num. Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -25164,7 +27555,7 @@ Module num. Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -25178,32 +27569,32 @@ Module num. (* pub const MIN: Self = !Self::MAX; *) (* Ty.path "isize" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic - (M.alloc (| UnOp.Pure.not (M.read (| M.get_constant (| "core::num::MAX" |) |)) |))). + (M.alloc (| UnOp.Pure.not (| M.read (| M.get_constant (| "core::num::MAX" |) |) |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = (<$UnsignedT>::MAX >> 1) as Self; *) (* Ty.path "isize" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer Integer.I32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$UnsignedT>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -25212,7 +27603,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -25229,14 +27620,14 @@ Module num. M.IsAssociatedFunction Self "from_str_radix" from_str_radix. (* pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "count_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -25248,14 +27639,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "isize", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -25267,14 +27658,14 @@ Module num. (self as $UnsignedT).leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "leading_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -25287,14 +27678,14 @@ Module num. (self as $UnsignedT).trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "trailing_zeros", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -25307,14 +27698,14 @@ Module num. (self as $UnsignedT).leading_ones() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "leading_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -25326,14 +27717,14 @@ Module num. (self as $UnsignedT).trailing_ones() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "trailing_ones", [] |), - [ M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -25346,17 +27737,18 @@ Module num. (self as $UnsignedT).rotate_left(n) as Self } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "rotate_left", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -25367,17 +27759,18 @@ Module num. (self as $UnsignedT).rotate_right(n) as Self } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "rotate_right", [] |), - [ M.rust_cast (M.read (| self |)); M.read (| n |) ] - |)))) + [ M.rust_cast (| M.read (| self |) |); M.read (| n |) ] + |) + |))) | _, _ => M.impossible end. @@ -25388,16 +27781,17 @@ Module num. (self as $UnsignedT).swap_bytes() as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "swap_bytes", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -25408,16 +27802,17 @@ Module num. (self as $UnsignedT).reverse_bits() as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "reverse_bits", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -25435,7 +27830,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -25461,7 +27856,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -25484,7 +27879,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -25510,7 +27905,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -25527,7 +27922,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25549,7 +27944,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -25563,11 +27958,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -25586,7 +27987,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25608,7 +28009,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25630,7 +28031,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -25644,11 +28045,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -25667,7 +28074,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25689,7 +28096,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -25703,11 +28110,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -25726,7 +28139,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25748,7 +28161,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25770,7 +28183,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -25784,11 +28197,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -25807,7 +28226,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25829,7 +28248,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -25843,11 +28262,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -25866,7 +28291,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25892,7 +28317,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25900,7 +28325,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -25911,37 +28336,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Isize 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.Isize (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "isize" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "isize" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -25961,7 +28396,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -25969,7 +28404,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -25980,32 +28415,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Isize 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.Isize (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -26026,7 +28472,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26034,7 +28480,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -26045,37 +28491,47 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Isize 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)), + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.Isize (-1)))) + (BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |))) |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "isize" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "isize" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -26095,7 +28551,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26103,7 +28559,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -26114,32 +28570,43 @@ Module num. M.get_function (| "core::intrinsics::unlikely", [] |), [ LogicalOp.or (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Isize 0), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.Isize (-1))))) + (BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |))) |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -26156,7 +28623,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -26177,7 +28644,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -26191,11 +28658,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -26214,14 +28687,14 @@ Module num. unsafe { intrinsics::unchecked_sub(0, self) } } *) - Definition unchecked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "isize" ] |), - [ Value.Integer Integer.Isize 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -26235,7 +28708,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26257,7 +28730,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -26271,11 +28744,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -26295,7 +28774,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26308,16 +28787,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -26326,18 +28806,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -26353,7 +28835,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26375,7 +28857,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -26389,11 +28871,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -26413,7 +28901,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26426,16 +28914,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -26444,18 +28933,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -26474,14 +28965,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -26503,7 +28994,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -26535,7 +29030,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -26546,14 +29041,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -26561,30 +29059,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Isize 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.Isize 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -26593,18 +29096,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -26643,9 +29148,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -26654,15 +29161,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -26696,9 +29209,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -26707,7 +29222,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -26717,7 +29232,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -26746,36 +29261,42 @@ Module num. } } *) - Definition checked_isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| Ty.path "usize", "isqrt", [] |), - [ M.rust_cast (M.read (| self |)) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| Ty.path "usize", "isqrt", [] |), + [ M.rust_cast (| M.read (| self |) |) ] + |) + |)) + ] + |) |))) ] |) @@ -26791,7 +29312,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26817,7 +29338,7 @@ Module num. } } *) - Definition saturating_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26857,7 +29378,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26883,7 +29404,7 @@ Module num. } } *) - Definition saturating_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -26923,14 +29444,14 @@ Module num. intrinsics::saturating_sub(0, self) } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::intrinsics::saturating_sub", [ Ty.path "isize" ] |), - [ Value.Integer Integer.Isize 0; M.read (| self |) ] + [ M.of_value (| Value.Integer 0 |); M.read (| self |) ] |))) | _, _ => M.impossible end. @@ -26947,14 +29468,14 @@ Module num. } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -26995,7 +29516,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27023,20 +29544,23 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.lt - (M.read (| self |)) - (Value.Integer Integer.Isize 0)) - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.Isize 0)) + BinOp.Pure.eq (| + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -27061,7 +29585,7 @@ Module num. } } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27110,7 +29634,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -27139,14 +29663,19 @@ Module num. ltac:(M.monadic (let γ := M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| 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 (| M.read (| exp |), Value.Integer Integer.U32 2 |)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.U32, + M.read (| exp |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); @@ -27165,7 +29694,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27185,7 +29714,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27193,7 +29722,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -27206,7 +29735,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27226,7 +29755,7 @@ Module num. self.wrapping_sub(rhs as Self) } *) - Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27234,7 +29763,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -27247,7 +29776,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27267,7 +29796,7 @@ Module num. self.overflowing_div(rhs).0 } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27294,7 +29823,7 @@ Module num. self.overflowing_div_euclid(rhs).0 } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27322,7 +29851,7 @@ Module num. self.overflowing_rem(rhs).0 } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27349,7 +29878,7 @@ Module num. self.overflowing_rem_euclid(rhs).0 } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27377,14 +29906,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.Isize 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -27400,7 +29930,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27410,12 +29940,14 @@ Module num. M.get_associated_function (| Ty.path "isize", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -27432,7 +29964,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27442,12 +29974,14 @@ Module num. M.get_associated_function (| Ty.path "isize", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -27464,14 +29998,14 @@ Module num. } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -27504,16 +30038,17 @@ Module num. self.wrapping_abs() as $UnsignedT } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_abs", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -27542,7 +30077,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -27553,39 +30088,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.Isize 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.Isize 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -27594,18 +30135,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -27624,15 +30167,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -27646,7 +30195,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -27656,7 +30205,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -27682,7 +30231,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27693,7 +30242,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::add_with_overflow", [ Ty.path "i64" ] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -27703,7 +30252,15 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.rust_cast (M.read (| a |)); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| a |) |)); + A.to_value (M.read (| b |)) + ] + |) + |))) ] |) |))) @@ -27722,7 +30279,7 @@ Module num. (c, b != d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -27748,7 +30305,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -27759,8 +30316,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -27779,14 +30341,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -27802,13 +30364,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.Isize 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -27825,7 +30394,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27836,7 +30405,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::sub_with_overflow", [ Ty.path "i64" ] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -27846,7 +30415,15 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.rust_cast (M.read (| a |)); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| a |) |)); + A.to_value (M.read (| b |)) + ] + |) + |))) ] |) |))) @@ -27865,7 +30442,7 @@ Module num. (c, b != d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -27891,7 +30468,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -27902,8 +30479,13 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ M.read (| c |); BinOp.Pure.ne (M.read (| b |)) (M.read (| d |)) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value (BinOp.Pure.ne (| M.read (| b |), M.read (| d |) |)) + ] + |) |))) ] |))) @@ -27923,14 +30505,14 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub_unsigned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (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 (| @@ -27946,13 +30528,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.Isize 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -27969,7 +30558,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -27980,7 +30569,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::mul_with_overflow", [ Ty.path "i64" ] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -27990,7 +30579,15 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.rust_cast (M.read (| a |)); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| a |) |)); + A.to_value (M.read (| b |)) + ] + |) + |))) ] |) |))) @@ -28010,7 +30607,7 @@ Module num. } } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -28018,7 +30615,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -28028,26 +30625,44 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.Isize (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.Isize, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -28068,7 +30683,7 @@ Module num. } } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -28076,7 +30691,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -28086,29 +30701,43 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.bit_and - (BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |))) - (BinOp.Pure.eq - (M.read (| rhs |)) - (Value.Integer Integer.Isize (-1))) + BinOp.Pure.bit_and (| + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |), + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [ M.read (| self |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -28128,7 +30757,7 @@ Module num. } } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -28136,7 +30765,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -28145,27 +30774,43 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Isize (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Isize 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| + Integer.Isize, + M.read (| self |), + M.read (| rhs |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -28185,7 +30830,7 @@ Module num. } } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -28193,7 +30838,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -28202,30 +30847,42 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Isize (-1)) ] + [ + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Isize 0; - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - Value.Bool false - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -28245,14 +30902,14 @@ Module num. } } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -28262,21 +30919,33 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), [ - BinOp.Pure.eq - (M.read (| self |)) - (M.read (| M.get_constant (| "core::num::MIN" |) |)) + BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ M.read (| M.get_constant (| "core::num::MIN" |) |); Value.Bool true ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [ UnOp.Panic.neg (| M.read (| self |) |); Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (UnOp.Panic.neg (| Integer.Isize, M.read (| self |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |))) ] |) @@ -28292,20 +30961,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -28317,20 +30993,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -28342,19 +31025,26 @@ Module num. (self.wrapping_abs(), self == Self::MIN) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_abs", [] |), - [ M.read (| self |) ] - |); - BinOp.Pure.eq (M.read (| self |)) (M.read (| M.get_constant (| "core::num::MIN" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_abs", [] |), + [ M.read (| self |) ] + |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| self |), + M.read (| M.get_constant (| "core::num::MIN" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -28393,7 +31083,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -28404,14 +31094,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -28419,30 +31112,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.Isize 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.Isize 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -28451,18 +31153,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -28490,19 +31194,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -28525,11 +31236,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -28539,7 +31251,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -28556,7 +31268,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -28589,7 +31301,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -28600,39 +31312,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.Isize 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.Isize 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -28641,18 +31359,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -28663,26 +31383,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.Isize, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.Isize, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -28692,14 +31423,16 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| + BinOp.Panic.mul (| Integer.Isize, M.read (| acc |), M.read (| base |) |) + |) |))) |))) | _, _ => M.impossible @@ -28720,7 +31453,7 @@ Module num. } } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -28759,16 +31492,22 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "argument of integer square root must be non-negative" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "argument of integer square root must be non-negative" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -28792,7 +31531,7 @@ Module num. q } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -28801,19 +31540,27 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in + let q := + M.alloc (| + BinOp.Panic.div (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |)) - (Value.Integer Integer.Isize 0) + BinOp.Pure.lt (| + BinOp.Panic.rem (| + Integer.Isize, + M.read (| self |), + M.read (| rhs |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -28823,16 +31570,17 @@ Module num. M.return_ (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.Isize 0) + BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -28841,16 +31589,18 @@ Module num. |) in M.alloc (| BinOp.Panic.sub (| + Integer.Isize, M.read (| q |), - Value.Integer Integer.Isize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.Isize, M.read (| q |), - Value.Integer Integer.Isize 1 + M.of_value (| Value.Integer 1 |) |) |))) ] @@ -28860,7 +31610,7 @@ Module num. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in q @@ -28889,23 +31639,26 @@ Module num. } } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) + |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.lt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -28940,17 +31693,23 @@ Module num. } } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -28959,23 +31718,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.Isize 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.Isize 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.Isize 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.Isize 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| d |), Value.Integer Integer.Isize 1 |) + BinOp.Panic.sub (| + Integer.Isize, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -28997,17 +31767,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -29016,23 +31792,34 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.Isize 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.Isize 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt (M.read (| r |)) (Value.Integer Integer.Isize 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.Isize 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.Isize 1 |) + BinOp.Panic.add (| + Integer.Isize, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -29064,7 +31851,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -29075,28 +31862,34 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Isize (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + let r := + M.alloc (| + BinOp.Panic.rem (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) + |) in let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -29105,42 +31898,48 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| r |)) - (Value.Integer Integer.Isize 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.Isize 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.Isize 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.Isize 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.Isize, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -29149,8 +31948,9 @@ Module num. ltac:(M.monadic (M.alloc (| BinOp.Panic.add (| + Integer.Isize, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.Isize, M.read (| rhs |), M.read (| m |) |) |) |))) ] @@ -29186,7 +31986,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -29197,14 +31997,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Isize (-1)) + BinOp.Pure.eq (| + M.read (| rhs |), + M.of_value (| Value.Integer (-1) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -29212,14 +32015,16 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let r := @@ -29247,7 +32052,11 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))) @@ -29257,7 +32066,7 @@ Module num. let m := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -29266,47 +32075,57 @@ Module num. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| r |)) - (Value.Integer Integer.Isize 0), + BinOp.Pure.gt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.Isize 0))) + (BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| r |)) - (Value.Integer Integer.Isize 0), + BinOp.Pure.lt (| + M.read (| r |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| rhs |)) - (Value.Integer Integer.Isize 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| BinOp.Panic.add (| M.read (| r |), M.read (| rhs |) |) |))); + M.alloc (| + BinOp.Panic.add (| Integer.Isize, M.read (| r |), M.read (| rhs |) |) + |))); fun γ => ltac:(M.monadic r) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| m |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.eq (| M.read (| m |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -29315,7 +32134,7 @@ Module num. M.get_associated_function (| Ty.path "isize", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| m |) |) + BinOp.Panic.sub (| Integer.Isize, M.read (| rhs |), M.read (| m |) |) ] |) |))) @@ -29348,7 +32167,7 @@ Module num. demap(<$UnsignedT>::midpoint(map(self), map(rhs))) } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -29387,7 +32206,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -29396,15 +32215,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.Isize 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -29420,27 +32243,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -29489,14 +32318,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -29545,14 +32374,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -29615,7 +32444,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -29623,7 +32452,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -29631,29 +32460,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.Isize 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.Isize 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -29663,11 +32498,13 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "isize", @@ -29676,7 +32513,7 @@ Module num. |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -29684,13 +32521,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.Isize, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "isize", "pow", [] |), @@ -29698,22 +32536,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -29724,18 +32562,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.Isize, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -29745,7 +32588,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -29753,7 +32596,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -29774,45 +32621,54 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let log := M.alloc (| BinOp.Panic.sub (| + Integer.U32, BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), - M.rust_cast - (M.call_closure (| + 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 |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| log |)) ] + |) |))) ] |) @@ -29832,35 +32688,41 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::num::int_log10::i64", [] |), - [ M.rust_cast (M.read (| self |)) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::num::int_log10::i64", [] |), + [ M.rust_cast (| M.read (| self |) |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -29882,14 +32744,14 @@ Module num. } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -29902,7 +32764,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| UnOp.Panic.neg (| M.read (| self |) |) |))); + M.alloc (| UnOp.Panic.neg (| Integer.Isize, M.read (| self |) |) |))); fun γ => ltac:(M.monadic self) ] |) @@ -29934,7 +32796,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -29942,18 +32804,19 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) |)) in + (M.alloc (| BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| other |)); M.rust_cast (M.read (| self |)) ] + [ M.rust_cast (| M.read (| other |) |); M.rust_cast (| M.read (| self |) |) + ] |) |))); fun γ => @@ -29961,7 +32824,8 @@ Module num. (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) + ] |) |))) ] @@ -29985,40 +32849,43 @@ Module num. else { 1 } } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Isize (-1) |))); + M.alloc (| M.of_value (| Value.Integer (-1) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| self |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.eq (| + M.read (| self |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Isize 0 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Isize 1 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |))) ] @@ -30030,24 +32897,24 @@ Module num. Axiom AssociatedFunction_signum : M.IsAssociatedFunction Self "signum" signum. (* pub const fn is_positive(self) -> bool { self > 0 } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.gt (M.read (| self |)) (Value.Integer Integer.Isize 0))) + BinOp.Pure.gt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. Axiom AssociatedFunction_is_positive : M.IsAssociatedFunction Self "is_positive" is_positive. (* pub const fn is_negative(self) -> bool { self < 0 } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.Isize 0))) + BinOp.Pure.lt (| M.read (| self |), M.of_value (| Value.Integer 0 |) |))) | _, _ => M.impossible end. @@ -30058,7 +32925,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30082,7 +32949,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30108,7 +32975,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30130,7 +32997,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -30155,7 +33022,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -30181,7 +33048,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -30204,7 +33071,7 @@ Module num. Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -30217,7 +33084,7 @@ Module num. Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -30226,29 +33093,29 @@ Module num. Axiom AssociatedFunction_max_value : M.IsAssociatedFunction Self "max_value" max_value. End Impl_isize. - Definition value_ASCII_CASE_MASK : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 32 |))). + Definition value_ASCII_CASE_MASK : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 32 |) |))). Module Impl_u8. Definition Self : Ty.t := Ty.path "u8". (* pub const MIN: Self = 0; *) (* Ty.path "u8" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 0 |))). + Definition value_MIN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = !0; *) (* Ty.path "u8" *) - Definition value_MAX : Value.t := - M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (Value.Integer Integer.U8 0) |))). + Definition value_MAX : A.t := + M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (| M.of_value (| Value.Integer 0 |) |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = Self::MAX.count_ones(); *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -30265,7 +33132,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -30286,16 +33153,17 @@ Module num. intrinsics::ctpop(self as $ActualT) as u32 } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u8" ] |), [ M.read (| M.use self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -30306,14 +33174,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -30325,16 +33193,17 @@ Module num. intrinsics::ctlz(self as $ActualT) as u32 } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz", [ Ty.path "u8" ] |), [ M.read (| M.use self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -30346,16 +33215,17 @@ Module num. intrinsics::cttz(self) as u32 } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz", [ Ty.path "u8" ] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -30367,14 +33237,14 @@ Module num. (!self).leading_zeros() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "leading_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -30386,14 +33256,14 @@ Module num. (!self).trailing_zeros() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "trailing_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -30406,7 +33276,7 @@ Module num. intrinsics::rotate_left(self, n as $SelfT) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -30414,7 +33284,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_left", [ Ty.path "u8" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -30426,7 +33296,7 @@ Module num. intrinsics::rotate_right(self, n as $SelfT) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -30434,7 +33304,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_right", [ Ty.path "u8" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -30446,7 +33316,7 @@ Module num. intrinsics::bswap(self as $ActualT) as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30470,7 +33340,7 @@ Module num. intrinsics::bitreverse(self as $ActualT) as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30501,7 +33371,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -30527,7 +33397,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -30550,7 +33420,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30576,7 +33446,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -30593,7 +33463,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -30615,7 +33485,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -30629,11 +33499,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -30652,7 +33528,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -30674,7 +33550,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -30696,7 +33572,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -30710,11 +33586,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -30733,7 +33615,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -30755,7 +33637,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -30769,11 +33651,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -30792,7 +33680,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -30814,7 +33702,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -30836,7 +33724,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -30850,11 +33738,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -30873,7 +33767,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -30900,7 +33794,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -30908,7 +33802,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -30917,25 +33811,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U8 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "u8" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "u8" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -30954,7 +33854,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -30962,7 +33862,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -30971,22 +33871,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U8 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -31008,7 +33914,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -31016,7 +33922,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31025,25 +33931,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U8 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "u8" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "u8" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -31062,7 +33974,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -31070,7 +33982,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31079,22 +33991,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U8 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -31115,7 +34033,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -31124,15 +34042,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.U8 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -31148,27 +34070,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31217,14 +34145,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31273,14 +34201,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31343,7 +34271,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -31351,7 +34279,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31359,29 +34287,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U8 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.U8 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -31391,16 +34325,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "u8", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -31408,13 +34344,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.U8, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "u8", "pow", [] |), @@ -31422,22 +34359,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -31448,18 +34385,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.U8, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -31469,7 +34411,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -31477,7 +34419,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -31496,14 +34442,14 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31526,21 +34472,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU8", - "ilog2", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU8", + "ilog2", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -31559,14 +34511,14 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31589,21 +34541,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU8", - "ilog10", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU8", + "ilog10", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -31619,7 +34577,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -31640,7 +34598,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31654,11 +34612,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -31676,7 +34640,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -31698,7 +34662,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31712,11 +34676,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -31736,7 +34706,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -31749,16 +34719,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -31767,18 +34738,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -31794,7 +34767,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -31816,7 +34789,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -31830,11 +34803,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -31854,7 +34833,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -31867,16 +34846,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -31885,18 +34865,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -31930,7 +34912,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -31941,14 +34923,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -31956,30 +34941,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.U8 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U8 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -31988,18 +34978,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -32038,9 +35030,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -32049,15 +35043,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -32091,9 +35091,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -32102,7 +35104,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -32112,7 +35114,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -32137,7 +35139,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32165,7 +35167,7 @@ Module num. } } *) - Definition saturating_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32176,7 +35178,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -32187,16 +35189,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| overflow |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I8 0)) + BinOp.Pure.eq (| + M.read (| overflow |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -32204,7 +35210,7 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -32215,7 +35221,8 @@ Module num. Value.Bool true |) in M.get_constant (| "core::num::MAX" |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 0 |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |))) ] @@ -32234,7 +35241,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32258,7 +35265,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32299,7 +35306,7 @@ Module num. self.wrapping_div(rhs) } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32323,7 +35330,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -32363,7 +35370,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32383,7 +35390,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32391,7 +35398,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -32404,7 +35411,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32424,7 +35431,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32444,13 +35451,13 @@ Module num. self / rhs } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -32461,13 +35468,13 @@ Module num. self / rhs } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -32479,13 +35486,13 @@ Module num. self % rhs } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -32496,13 +35503,13 @@ Module num. self % rhs } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -32514,14 +35521,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.U8 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -32537,7 +35545,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32547,12 +35555,14 @@ Module num. M.get_associated_function (| Ty.path "u8", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -32569,7 +35579,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32579,12 +35589,14 @@ Module num. M.get_associated_function (| Ty.path "u8", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -32615,7 +35627,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -32626,39 +35638,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U8 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U8 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -32667,18 +35685,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -32697,15 +35717,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -32719,7 +35745,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -32729,7 +35755,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -32755,7 +35781,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32776,7 +35802,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -32795,7 +35826,7 @@ Module num. (c, b || d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -32821,7 +35852,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -32832,14 +35863,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -32857,7 +35891,7 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32868,7 +35902,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -32879,13 +35913,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I8 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -32902,7 +35943,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -32923,7 +35964,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -32942,7 +35988,7 @@ Module num. (c, b || d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -32968,7 +36014,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -32979,14 +36025,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -33014,7 +36063,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -33022,54 +36071,67 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u8" ] |), [] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i32", "abs", [] |), [ M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ + M.rust_cast (| M.read (| self |) |); + M.rust_cast (| M.read (| other |) |) + ] |) ] - |)) + |) + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| other |), M.read (| self |) |) + BinOp.Panic.sub (| + Integer.U8, + M.read (| other |), + M.read (| self |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.sub (| + Integer.U8, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -33087,7 +36149,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -33108,7 +36170,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -33123,14 +36190,19 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -33142,14 +36214,19 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -33161,14 +36238,19 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -33180,14 +36262,19 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -33199,19 +36286,22 @@ Module num. ((!self).wrapping_add(1), self != 0) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_add", [] |), - [ UnOp.Pure.not (M.read (| self |)); Value.Integer Integer.U8 1 ] - |); - BinOp.Pure.ne (M.read (| self |)) (Value.Integer Integer.U8 0) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_add", [] |), + [ UnOp.Pure.not (| M.read (| self |) |); M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value (BinOp.Pure.ne (| M.read (| self |), M.of_value (| Value.Integer 0 |) |)) + ] + |))) | _, _ => M.impossible end. @@ -33223,20 +36313,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -33248,20 +36345,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -33301,7 +36405,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -33312,14 +36416,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -33327,30 +36434,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.U8 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U8 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -33359,18 +36475,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -33398,19 +36516,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -33433,11 +36558,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -33447,7 +36573,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -33464,7 +36590,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -33497,7 +36623,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -33508,39 +36634,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U8 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U8 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -33549,18 +36681,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -33571,26 +36705,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.U8, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.U8, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -33600,14 +36745,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Panic.mul (| Integer.U8, M.read (| acc |), M.read (| base |) |) |) |))) |))) | _, _ => M.impossible @@ -33650,7 +36795,7 @@ Module num. res } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -33660,49 +36805,56 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.U8 2) + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer Integer.U8 0 |) in + let res := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let one := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U8 1, - BinOp.Pure.bit_and - (M.call_closure (| + M.of_value (| 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 Integer.U32 1)) + |), + UnOp.Pure.not (| M.of_value (| Value.Integer 1 |) |) + |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| one |)) (Value.Integer Integer.U8 0) + BinOp.Pure.ne (| + M.read (| one |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -33711,19 +36863,21 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| op |)) - (BinOp.Panic.add (| + BinOp.Pure.ge (| + M.read (| op |), + BinOp.Panic.add (| + Integer.U8, M.read (| res |), M.read (| one |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -33735,8 +36889,10 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.U8, M.read (| β |), BinOp.Panic.add (| + Integer.U8, M.read (| res |), M.read (| one |) |) @@ -33746,14 +36902,15 @@ Module num. M.write (| res, BinOp.Panic.add (| + Integer.U8, BinOp.Panic.shr (| M.read (| res |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |), M.read (| one |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -33762,19 +36919,22 @@ Module num. β, BinOp.Panic.shr (| M.read (| β |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer Integer.I32 2 |) + BinOp.Panic.shr (| + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -33784,7 +36944,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -33796,7 +36956,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), - [ BinOp.Pure.lt (Value.Integer Integer.U8 0) (M.read (| res |)) ] + [ BinOp.Pure.lt (| M.of_value (| Value.Integer 0 |), M.read (| res |) |) ] |) |) in let _ := @@ -33804,19 +36964,21 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.lt - (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U8 1, + BinOp.Pure.lt (| + M.read (| res |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), BinOp.Panic.div (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 2 + M.of_value (| Value.Integer 2 |) |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in res |))) |))) @@ -33830,13 +36992,13 @@ Module num. self / rhs } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -33847,13 +37009,13 @@ Module num. self % rhs } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -33864,13 +37026,13 @@ Module num. self / rhs } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -33887,17 +37049,19 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -33905,14 +37069,21 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.U8 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.U8 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.U8 1 |) + BinOp.Panic.add (| + Integer.U8, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -33931,7 +37102,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -33939,23 +37110,20 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |) |), [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 0 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in self)); fun γ => ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| BinOp.Panic.add (| + Integer.U8, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U8, M.read (| rhs |), M.read (| r |) |) |) |))) ] @@ -33976,7 +37144,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -34009,7 +37177,9 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) |) |) |))) @@ -34019,12 +37189,13 @@ Module num. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -34034,7 +37205,7 @@ Module num. M.get_associated_function (| Ty.path "u8", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U8, M.read (| rhs |), M.read (| r |) |) ] |) |))) @@ -34053,17 +37224,18 @@ Module num. self.count_ones() == 1 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "count_ones", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U32 1))) + |), + M.of_value (| Value.Integer 1 |) + |))) | _, _ => M.impossible end. @@ -34083,7 +37255,7 @@ Module num. <$SelfT>::MAX >> z } *) - Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34093,28 +37265,35 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U8 1) + BinOp.Pure.le (| + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U8 0 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 0 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let p := M.alloc (| - BinOp.Panic.sub (| M.read (| self |), Value.Integer Integer.U8 1 |) + BinOp.Panic.sub (| + Integer.U8, + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |) in let z := M.alloc (| @@ -34142,17 +37321,18 @@ Module num. self.one_less_than_next_power_of_two() + 1 } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.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 Integer.U8 1 + M.of_value (| Value.Integer 1 |) |))) | _, _ => M.impossible end. @@ -34165,7 +37345,7 @@ Module num. self.one_less_than_next_power_of_two().checked_add(1) } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34177,7 +37357,7 @@ Module num. M.get_associated_function (| Ty.path "u8", "one_less_than_next_power_of_two", [] |), [ M.read (| self |) ] |); - Value.Integer Integer.U8 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -34191,7 +37371,7 @@ Module num. self.one_less_than_next_power_of_two().wrapping_add(1) } *) - Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34203,7 +37383,7 @@ Module num. M.get_associated_function (| Ty.path "u8", "one_less_than_next_power_of_two", [] |), [ M.read (| self |) ] |); - Value.Integer Integer.U8 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -34217,7 +37397,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34241,7 +37421,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34267,7 +37447,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34289,7 +37469,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -34314,7 +37494,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -34340,7 +37520,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -34359,7 +37539,7 @@ Module num. M.IsAssociatedFunction Self "from_ne_bytes" from_ne_bytes. (* pub const fn min_value() -> Self { Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -34368,7 +37548,7 @@ Module num. Axiom AssociatedFunction_min_value : M.IsAssociatedFunction Self "min_value" min_value. (* pub const fn max_value() -> Self { Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -34385,7 +37565,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition widening_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition widening_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -34396,15 +37576,20 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 8 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 8 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -34423,7 +37608,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition carrying_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -34438,18 +37623,23 @@ Module num. [ M.call_closure (| M.get_associated_function (| Ty.path "u16", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |); - M.rust_cast (M.read (| carry |)) + M.rust_cast (| M.read (| carry |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 8 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 8 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -34462,17 +37652,23 @@ Module num. ((self as $WideT + rhs as $WideT) / 2) as $SelfT } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - M.rust_cast - (BinOp.Panic.div (| - BinOp.Panic.add (| M.rust_cast (M.read (| self |)), M.rust_cast (M.read (| rhs |)) |), - Value.Integer Integer.U16 2 - |)))) + 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 |) |) + |), + M.of_value (| Value.Integer 2 |) + |) + |))) | _, _ => M.impossible end. @@ -34483,12 +37679,12 @@ Module num. *self <= 127 } *) - Definition is_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (Value.Integer Integer.U8 127))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.of_value (| Value.Integer 127 |) |))) | _, _ => M.impossible end. @@ -34499,7 +37695,7 @@ Module num. ascii::Char::from_u8( *self) } *) - Definition as_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34523,21 +37719,24 @@ Module num. *self ^ ((self.is_ascii_lowercase() as u8) * ASCII_CASE_MASK) } *) - Definition to_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (BinOp.Panic.mul (| - M.rust_cast - (M.call_closure (| + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + BinOp.Panic.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.impossible end. @@ -34550,21 +37749,24 @@ Module num. *self | (self.is_ascii_uppercase() as u8 * ASCII_CASE_MASK) } *) - Definition to_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_or - (M.read (| M.read (| self |) |)) - (BinOp.Panic.mul (| - M.rust_cast - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| M.read (| self |) |), + BinOp.Panic.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.impossible end. @@ -34576,14 +37778,15 @@ Module num. *self ^ ASCII_CASE_MASK } *) - Definition ascii_change_case_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition ascii_change_case_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (M.read (| M.get_constant (| "core::num::ASCII_CASE_MASK" |) |)))) + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + M.read (| M.get_constant (| "core::num::ASCII_CASE_MASK" |) |) + |))) | _, _ => M.impossible end. @@ -34595,21 +37798,22 @@ Module num. self.to_ascii_lowercase() == other.to_ascii_lowercase() } *) - Definition eq_ignore_ascii_case (τ : list Ty.t) (α : list Value.t) : M := + Definition eq_ignore_ascii_case (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "to_ascii_lowercase", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "u8", "to_ascii_lowercase", [] |), [ M.read (| other |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -34621,7 +37825,7 @@ Module num. *self = self.to_ascii_uppercase(); } *) - Definition make_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition make_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34635,7 +37839,7 @@ Module num. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34648,7 +37852,7 @@ Module num. *self = self.to_ascii_lowercase(); } *) - Definition make_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition make_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34662,7 +37866,7 @@ Module num. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -34675,7 +37879,7 @@ Module num. matches!( *self, b'A'..=b'Z' | b'a'..=b'z') } *) - Definition is_ascii_alphabetic (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_alphabetic (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34689,18 +37893,19 @@ Module num. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -34715,7 +37920,7 @@ Module num. matches!( *self, b'A'..=b'Z') } *) - Definition is_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34724,8 +37929,8 @@ Module num. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -34740,7 +37945,7 @@ Module num. matches!( *self, b'a'..=b'z') } *) - Definition is_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34749,8 +37954,8 @@ Module num. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -34765,40 +37970,42 @@ Module num. matches!( *self, b'0'..=b'9') | matches!( *self, b'A'..=b'Z') | matches!( *self, b'a'..=b'z') } *) - Definition is_ascii_alphanumeric (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_alphanumeric (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_or - (BinOp.Pure.bit_or - (M.read (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_or (| + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)) - (M.read (| + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |))) - (M.read (| + |) + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -34810,7 +38017,7 @@ Module num. matches!( *self, b'0'..=b'9') } *) - Definition is_ascii_digit (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_digit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34819,8 +38026,8 @@ Module num. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -34835,7 +38042,7 @@ Module num. matches!( *self, b'0'..=b'7') } *) - Definition is_ascii_octdigit (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_octdigit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34844,8 +38051,8 @@ Module num. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -34860,40 +38067,42 @@ Module num. matches!( *self, b'0'..=b'9') | matches!( *self, b'A'..=b'F') | matches!( *self, b'a'..=b'f') } *) - Definition is_ascii_hexdigit (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_hexdigit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_or - (BinOp.Pure.bit_or - (M.read (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_or (| + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)) - (M.read (| + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |))) - (M.read (| + |) + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -34908,50 +38117,53 @@ Module num. | matches!( *self, b'{'..=b'~') } *) - Definition is_ascii_punctuation (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_punctuation (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.bit_or - (BinOp.Pure.bit_or - (BinOp.Pure.bit_or - (M.read (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_or (| + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)) - (M.read (| + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |))) - (M.read (| + |) + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |))) - (M.read (| + |) + |), + M.read (| M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -34963,7 +38175,7 @@ Module num. matches!( *self, b'!'..=b'~') } *) - Definition is_ascii_graphic (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_graphic (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -34972,8 +38184,8 @@ Module num. M.match_operator (| M.read (| self |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -34988,7 +38200,7 @@ Module num. matches!( *self, b'\t' | b'\n' | b'\x0C' | b'\r' | b' ') } *) - Definition is_ascii_whitespace (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_whitespace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35005,53 +38217,39 @@ Module num. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 9 - |) in - Value.Tuple [])); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 9 |) in + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 10 - |) in - Value.Tuple [])); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 10 |) in + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 12 - |) in - Value.Tuple [])); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 12 |) in + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 13 - |) in - Value.Tuple [])); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 13 |) in + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 32 - |) in - Value.Tuple [])) + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 32 |) in + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -35066,7 +38264,7 @@ Module num. matches!( *self, b'\0'..=b'\x1F' | b'\x7F') } *) - Definition is_ascii_control (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_control (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35080,25 +38278,26 @@ Module num. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U8 127 + Value.Integer 127 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with - | [] => M.alloc (| Value.Bool true |) + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) | _ => M.impossible (||) - end)) + end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -35113,7 +38312,7 @@ Module num. ascii::escape_default(self) } *) - Definition escape_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35133,12 +38332,15 @@ Module num. (self as i8) >= -0x40 } *) - Definition is_utf8_char_boundary (τ : list Ty.t) (α : list Value.t) : M := + Definition is_utf8_char_boundary (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ge (M.rust_cast (M.read (| self |))) (Value.Integer Integer.I8 (-64)))) + BinOp.Pure.ge (| + M.rust_cast (| M.read (| self |) |), + M.of_value (| Value.Integer (-64) |) + |))) | _, _ => M.impossible end. @@ -35151,21 +38353,21 @@ Module num. (* pub const MIN: Self = 0; *) (* Ty.path "u16" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U16 0 |))). + Definition value_MIN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = !0; *) (* Ty.path "u16" *) - Definition value_MAX : Value.t := - M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (Value.Integer Integer.U16 0) |))). + Definition value_MAX : A.t := + M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (| M.of_value (| Value.Integer 0 |) |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = Self::MAX.count_ones(); *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -35182,7 +38384,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -35203,16 +38405,17 @@ Module num. intrinsics::ctpop(self as $ActualT) as u32 } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u16" ] |), [ M.read (| M.use self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -35223,14 +38426,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -35242,16 +38445,17 @@ Module num. intrinsics::ctlz(self as $ActualT) as u32 } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz", [ Ty.path "u16" ] |), [ M.read (| M.use self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -35263,16 +38467,17 @@ Module num. intrinsics::cttz(self) as u32 } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz", [ Ty.path "u16" ] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -35284,14 +38489,14 @@ Module num. (!self).leading_zeros() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "leading_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -35303,14 +38508,14 @@ Module num. (!self).trailing_zeros() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "trailing_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -35323,7 +38528,7 @@ Module num. intrinsics::rotate_left(self, n as $SelfT) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -35331,7 +38536,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_left", [ Ty.path "u16" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -35343,7 +38548,7 @@ Module num. intrinsics::rotate_right(self, n as $SelfT) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -35351,7 +38556,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_right", [ Ty.path "u16" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -35363,7 +38568,7 @@ Module num. intrinsics::bswap(self as $ActualT) as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35387,7 +38592,7 @@ Module num. intrinsics::bitreverse(self as $ActualT) as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35418,7 +38623,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -35444,7 +38649,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -35467,7 +38672,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35493,7 +38698,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35510,7 +38715,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35532,7 +38737,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -35546,11 +38751,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -35569,7 +38780,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35591,7 +38802,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35613,7 +38824,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -35627,11 +38838,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -35650,7 +38867,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35672,7 +38889,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -35686,11 +38903,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -35709,7 +38932,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35731,7 +38954,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35753,7 +38976,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -35767,11 +38990,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -35790,7 +39019,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35817,7 +39046,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35825,7 +39054,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -35834,25 +39063,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U16 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "u16" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "u16" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -35871,7 +39106,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35879,7 +39114,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -35888,22 +39123,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U16 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -35925,7 +39166,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35933,7 +39174,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -35942,25 +39183,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U16 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "u16" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "u16" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -35979,7 +39226,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -35987,7 +39234,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -35996,22 +39243,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U16 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -36032,7 +39285,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -36041,15 +39294,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.U16 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -36065,27 +39322,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36134,14 +39397,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36190,14 +39453,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36260,7 +39523,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -36268,7 +39531,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36276,29 +39539,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U16 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.U16 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -36308,16 +39577,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "u16", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -36325,13 +39596,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.U16, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "u16", "pow", [] |), @@ -36339,22 +39611,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -36365,18 +39637,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.U16, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -36386,7 +39663,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -36394,7 +39671,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -36413,14 +39694,14 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36443,21 +39724,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU16", - "ilog2", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU16", + "ilog2", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -36476,14 +39763,14 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36506,21 +39793,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU16", - "ilog10", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU16", + "ilog10", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -36536,7 +39829,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -36557,7 +39850,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36571,11 +39864,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -36593,7 +39892,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -36615,7 +39914,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36629,11 +39928,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -36653,7 +39958,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -36666,16 +39971,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -36684,18 +39990,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -36711,7 +40019,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -36733,7 +40041,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -36747,11 +40055,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -36771,7 +40085,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -36784,16 +40098,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -36802,18 +40117,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -36847,7 +40164,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -36858,14 +40175,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -36873,30 +40193,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.U16 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U16 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -36905,18 +40230,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -36955,9 +40282,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -36966,15 +40295,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -37008,9 +40343,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -37019,7 +40356,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -37029,7 +40366,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -37054,7 +40391,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37082,7 +40419,7 @@ Module num. } } *) - Definition saturating_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37093,7 +40430,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -37104,16 +40441,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| overflow |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I16 0)) + BinOp.Pure.eq (| + M.read (| overflow |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -37121,7 +40462,7 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -37133,7 +40474,7 @@ Module num. |) in M.get_constant (| "core::num::MAX" |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer Integer.U16 0 |))) + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |))) ] @@ -37152,7 +40493,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37176,7 +40517,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37217,7 +40558,7 @@ Module num. self.wrapping_div(rhs) } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37241,7 +40582,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -37281,7 +40622,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37301,7 +40642,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37309,7 +40650,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -37322,7 +40663,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37342,7 +40683,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37362,13 +40703,13 @@ Module num. self / rhs } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -37379,13 +40720,13 @@ Module num. self / rhs } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -37397,13 +40738,13 @@ Module num. self % rhs } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -37414,13 +40755,13 @@ Module num. self % rhs } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -37432,14 +40773,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.U16 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -37455,7 +40797,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37465,12 +40807,14 @@ Module num. M.get_associated_function (| Ty.path "u16", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -37487,7 +40831,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37497,12 +40841,14 @@ Module num. M.get_associated_function (| Ty.path "u16", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -37533,7 +40879,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -37544,39 +40890,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U16 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U16 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -37585,18 +40937,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -37615,15 +40969,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -37637,7 +40997,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -37647,7 +41007,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -37673,7 +41033,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37694,7 +41054,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -37713,7 +41078,7 @@ Module num. (c, b || d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -37739,7 +41104,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -37750,14 +41115,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -37775,7 +41143,7 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37786,7 +41154,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -37797,13 +41165,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I16 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -37820,7 +41195,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -37841,7 +41216,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -37860,7 +41240,7 @@ Module num. (c, b || d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -37886,7 +41266,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -37897,14 +41277,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -37932,7 +41315,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -37940,54 +41323,67 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u16" ] |), [] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i32", "abs", [] |), [ M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ + M.rust_cast (| M.read (| self |) |); + M.rust_cast (| M.read (| other |) |) + ] |) ] - |)) + |) + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| other |), M.read (| self |) |) + BinOp.Panic.sub (| + Integer.U16, + M.read (| other |), + M.read (| self |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.sub (| + Integer.U16, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -38005,7 +41401,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -38026,7 +41422,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -38041,14 +41442,19 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -38060,14 +41466,19 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -38079,14 +41490,19 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -38098,14 +41514,19 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -38117,19 +41538,22 @@ Module num. ((!self).wrapping_add(1), self != 0) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_add", [] |), - [ UnOp.Pure.not (M.read (| self |)); Value.Integer Integer.U16 1 ] - |); - BinOp.Pure.ne (M.read (| self |)) (Value.Integer Integer.U16 0) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_add", [] |), + [ UnOp.Pure.not (| M.read (| self |) |); M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value (BinOp.Pure.ne (| M.read (| self |), M.of_value (| Value.Integer 0 |) |)) + ] + |))) | _, _ => M.impossible end. @@ -38141,20 +41565,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -38166,20 +41597,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -38219,7 +41657,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -38230,14 +41668,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -38245,30 +41686,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.U16 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U16 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -38277,18 +41727,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -38316,19 +41768,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -38351,11 +41810,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -38365,7 +41825,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -38382,7 +41842,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -38415,7 +41875,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -38426,39 +41886,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U16 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U16 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -38467,18 +41933,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -38489,26 +41957,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.U16, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.U16, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -38518,14 +41997,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Panic.mul (| Integer.U16, M.read (| acc |), M.read (| base |) |) |) |))) |))) | _, _ => M.impossible @@ -38568,7 +42047,7 @@ Module num. res } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -38578,49 +42057,56 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.U16 2) + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer Integer.U16 0 |) in + let res := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let one := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U16 1, - BinOp.Pure.bit_and - (M.call_closure (| + M.of_value (| 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 Integer.U32 1)) + |), + UnOp.Pure.not (| M.of_value (| Value.Integer 1 |) |) + |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| one |)) (Value.Integer Integer.U16 0) + BinOp.Pure.ne (| + M.read (| one |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -38629,19 +42115,21 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| op |)) - (BinOp.Panic.add (| + BinOp.Pure.ge (| + M.read (| op |), + BinOp.Panic.add (| + Integer.U16, M.read (| res |), M.read (| one |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -38653,8 +42141,10 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.U16, M.read (| β |), BinOp.Panic.add (| + Integer.U16, M.read (| res |), M.read (| one |) |) @@ -38664,14 +42154,15 @@ Module num. M.write (| res, BinOp.Panic.add (| + Integer.U16, BinOp.Panic.shr (| M.read (| res |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |), M.read (| one |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -38680,19 +42171,22 @@ Module num. β, BinOp.Panic.shr (| M.read (| β |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer Integer.I32 2 |) + BinOp.Panic.shr (| + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -38702,7 +42196,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -38714,7 +42208,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), - [ BinOp.Pure.lt (Value.Integer Integer.U16 0) (M.read (| res |)) ] + [ BinOp.Pure.lt (| M.of_value (| Value.Integer 0 |), M.read (| res |) |) ] |) |) in let _ := @@ -38722,19 +42216,21 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.lt - (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U16 1, + BinOp.Pure.lt (| + M.read (| res |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), BinOp.Panic.div (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 2 + M.of_value (| Value.Integer 2 |) |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in res |))) |))) @@ -38748,13 +42244,13 @@ Module num. self / rhs } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -38765,13 +42261,13 @@ Module num. self % rhs } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -38782,13 +42278,13 @@ Module num. self / rhs } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -38805,17 +42301,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -38823,14 +42325,21 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.U16 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.U16 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.U16 1 |) + BinOp.Panic.add (| + Integer.U16, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -38849,7 +42358,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -38857,23 +42366,20 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |) |), [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U16 0 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in self)); fun γ => ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| BinOp.Panic.add (| + Integer.U16, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U16, M.read (| rhs |), M.read (| r |) |) |) |))) ] @@ -38894,7 +42400,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -38927,7 +42433,9 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) |) |) |))) @@ -38937,12 +42445,13 @@ Module num. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U16 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -38952,7 +42461,7 @@ Module num. M.get_associated_function (| Ty.path "u16", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U16, M.read (| rhs |), M.read (| r |) |) ] |) |))) @@ -38971,17 +42480,18 @@ Module num. self.count_ones() == 1 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u16", "count_ones", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U32 1))) + |), + M.of_value (| Value.Integer 1 |) + |))) | _, _ => M.impossible end. @@ -39001,7 +42511,7 @@ Module num. <$SelfT>::MAX >> z } *) - Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39011,28 +42521,35 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U16 1) + BinOp.Pure.le (| + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U16 0 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 0 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let p := M.alloc (| - BinOp.Panic.sub (| M.read (| self |), Value.Integer Integer.U16 1 |) + BinOp.Panic.sub (| + Integer.U16, + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |) in let z := M.alloc (| @@ -39060,17 +42577,18 @@ Module num. self.one_less_than_next_power_of_two() + 1 } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.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 Integer.U16 1 + M.of_value (| Value.Integer 1 |) |))) | _, _ => M.impossible end. @@ -39083,7 +42601,7 @@ Module num. self.one_less_than_next_power_of_two().checked_add(1) } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39099,7 +42617,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.U16 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -39113,7 +42631,7 @@ Module num. self.one_less_than_next_power_of_two().wrapping_add(1) } *) - Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39129,7 +42647,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.U16 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -39143,7 +42661,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39167,7 +42685,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39193,7 +42711,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39215,7 +42733,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -39240,7 +42758,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -39266,7 +42784,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -39285,7 +42803,7 @@ Module num. M.IsAssociatedFunction Self "from_ne_bytes" from_ne_bytes. (* pub const fn min_value() -> Self { Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -39294,7 +42812,7 @@ Module num. Axiom AssociatedFunction_min_value : M.IsAssociatedFunction Self "min_value" min_value. (* pub const fn max_value() -> Self { Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -39311,7 +42829,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition widening_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition widening_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -39322,16 +42840,20 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast - (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 16 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 16 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -39350,7 +42872,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition carrying_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -39365,19 +42887,23 @@ Module num. [ M.call_closure (| M.get_associated_function (| Ty.path "u32", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |); - M.rust_cast (M.read (| carry |)) + M.rust_cast (| M.read (| carry |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast - (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 16 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 16 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -39390,17 +42916,23 @@ Module num. ((self as $WideT + rhs as $WideT) / 2) as $SelfT } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - M.rust_cast - (BinOp.Panic.div (| - BinOp.Panic.add (| M.rust_cast (M.read (| self |)), M.rust_cast (M.read (| rhs |)) |), - Value.Integer Integer.U32 2 - |)))) + 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 |) |) + |), + M.of_value (| Value.Integer 2 |) + |) + |))) | _, _ => M.impossible end. @@ -39411,7 +42943,7 @@ Module num. matches!(self, 0xD800..=0xDFFF) } *) - Definition is_utf16_surrogate (τ : list Ty.t) (α : list Value.t) : M := + Definition is_utf16_surrogate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39420,8 +42952,8 @@ Module num. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -39437,21 +42969,21 @@ Module num. (* pub const MIN: Self = 0; *) (* Ty.path "u32" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 0 |))). + Definition value_MIN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = !0; *) (* Ty.path "u32" *) - Definition value_MAX : Value.t := - M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (Value.Integer Integer.U32 0) |))). + Definition value_MAX : A.t := + M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (| M.of_value (| Value.Integer 0 |) |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = Self::MAX.count_ones(); *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -39468,7 +43000,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -39489,7 +43021,7 @@ Module num. intrinsics::ctpop(self as $ActualT) as u32 } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39513,14 +43045,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -39532,7 +43064,7 @@ Module num. intrinsics::ctlz(self as $ActualT) as u32 } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39557,7 +43089,7 @@ Module num. intrinsics::cttz(self) as u32 } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39582,14 +43114,14 @@ Module num. (!self).leading_zeros() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "leading_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -39601,14 +43133,14 @@ Module num. (!self).trailing_zeros() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "trailing_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -39621,7 +43153,7 @@ Module num. intrinsics::rotate_left(self, n as $SelfT) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -39641,7 +43173,7 @@ Module num. intrinsics::rotate_right(self, n as $SelfT) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -39661,7 +43193,7 @@ Module num. intrinsics::bswap(self as $ActualT) as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39685,7 +43217,7 @@ Module num. intrinsics::bitreverse(self as $ActualT) as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39716,7 +43248,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -39742,7 +43274,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -39765,7 +43297,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39791,7 +43323,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -39808,7 +43340,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -39830,7 +43362,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -39844,11 +43376,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -39867,7 +43405,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -39889,7 +43427,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -39911,7 +43449,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -39925,11 +43463,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -39948,7 +43492,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -39970,7 +43514,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -39984,11 +43528,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -40007,7 +43557,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -40029,7 +43579,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -40051,7 +43601,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40065,11 +43615,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -40088,7 +43644,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -40115,7 +43671,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -40123,7 +43679,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40132,25 +43688,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U32 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "u32" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "u32" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -40169,7 +43731,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -40177,7 +43739,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40186,22 +43748,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U32 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -40223,7 +43791,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -40231,7 +43799,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40240,25 +43808,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U32 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "u32" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "u32" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -40277,7 +43851,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -40285,7 +43859,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40294,22 +43868,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U32 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -40330,7 +43910,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -40339,15 +43919,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.U32 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -40363,27 +43947,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40432,14 +44022,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40488,14 +44078,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40558,7 +44148,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -40566,7 +44156,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40574,29 +44164,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U32 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.U32 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -40606,16 +44202,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "u32", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -40623,13 +44221,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.U32, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "u32", "pow", [] |), @@ -40637,22 +44236,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -40663,18 +44262,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -40684,7 +44288,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -40692,7 +44296,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -40711,14 +44319,14 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40741,21 +44349,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU32", - "ilog2", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU32", + "ilog2", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -40774,14 +44388,14 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40804,21 +44418,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU32", - "ilog10", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU32", + "ilog10", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -40834,7 +44454,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -40855,7 +44475,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40869,11 +44489,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -40891,7 +44517,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -40913,7 +44539,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -40927,11 +44553,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -40951,7 +44583,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -40964,16 +44596,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -40982,14 +44615,15 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.read (| M.use (M.get_constant (| "core::num::MAX" |)) |)) + BinOp.Pure.le (| + M.read (| rhs |), + M.read (| M.use (M.get_constant (| "core::num::MAX" |)) |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.use rhs @@ -41008,7 +44642,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41030,7 +44664,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -41044,11 +44678,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -41068,7 +44708,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41081,16 +44721,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -41099,14 +44740,15 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.read (| M.use (M.get_constant (| "core::num::MAX" |)) |)) + BinOp.Pure.le (| + M.read (| rhs |), + M.read (| M.use (M.get_constant (| "core::num::MAX" |)) |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.use rhs @@ -41143,7 +44785,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -41154,14 +44796,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -41169,30 +44814,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.U32 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U32 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -41201,18 +44851,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -41251,9 +44903,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -41262,15 +44916,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -41304,9 +44964,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -41315,7 +44977,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -41325,7 +44987,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -41350,7 +45012,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41378,7 +45040,7 @@ Module num. } } *) - Definition saturating_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41389,7 +45051,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -41400,16 +45062,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| overflow |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I32 0)) + BinOp.Pure.eq (| + M.read (| overflow |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -41417,7 +45083,7 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -41429,7 +45095,7 @@ Module num. |) in M.get_constant (| "core::num::MAX" |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 0 |))) + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |))) ] @@ -41448,7 +45114,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41472,7 +45138,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41513,7 +45179,7 @@ Module num. self.wrapping_div(rhs) } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41537,7 +45203,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -41577,7 +45243,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41597,7 +45263,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41605,7 +45271,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -41618,7 +45284,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41638,7 +45304,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41658,13 +45324,13 @@ Module num. self / rhs } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -41675,13 +45341,13 @@ Module num. self / rhs } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -41693,13 +45359,13 @@ Module num. self % rhs } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -41710,13 +45376,13 @@ Module num. self % rhs } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -41728,14 +45394,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u32", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.U32 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -41751,7 +45418,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41761,12 +45428,14 @@ Module num. M.get_associated_function (| Ty.path "u32", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -41783,7 +45452,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41793,12 +45462,14 @@ Module num. M.get_associated_function (| Ty.path "u32", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -41829,7 +45500,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -41840,39 +45511,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U32 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U32 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -41881,18 +45558,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -41911,15 +45590,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -41933,7 +45618,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -41943,7 +45628,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -41969,7 +45654,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -41990,7 +45675,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -42009,7 +45699,7 @@ Module num. (c, b || d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -42035,7 +45725,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -42046,14 +45736,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -42071,7 +45764,7 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -42082,7 +45775,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -42093,13 +45786,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I32 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -42116,7 +45816,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -42137,7 +45837,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -42156,7 +45861,7 @@ Module num. (c, b || d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -42182,7 +45887,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -42193,14 +45898,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -42228,7 +45936,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -42236,54 +45944,67 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u32" ] |), [] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i32", "abs", [] |), [ M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ + M.rust_cast (| M.read (| self |) |); + M.rust_cast (| M.read (| other |) |) + ] |) ] - |)) + |) + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| other |), M.read (| self |) |) + BinOp.Panic.sub (| + Integer.U32, + M.read (| other |), + M.read (| self |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.sub (| + Integer.U32, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -42301,7 +46022,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -42322,7 +46043,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -42337,14 +46063,19 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -42356,14 +46087,19 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -42375,14 +46111,19 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -42394,14 +46135,19 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -42413,19 +46159,22 @@ Module num. ((!self).wrapping_add(1), self != 0) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_add", [] |), - [ UnOp.Pure.not (M.read (| self |)); Value.Integer Integer.U32 1 ] - |); - BinOp.Pure.ne (M.read (| self |)) (Value.Integer Integer.U32 0) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_add", [] |), + [ UnOp.Pure.not (| M.read (| self |) |); M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value (BinOp.Pure.ne (| M.read (| self |), M.of_value (| Value.Integer 0 |) |)) + ] + |))) | _, _ => M.impossible end. @@ -42437,20 +46186,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -42462,20 +46218,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -42515,7 +46278,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -42526,14 +46289,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -42541,30 +46307,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.U32 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U32 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -42573,18 +46348,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -42612,19 +46389,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -42647,11 +46431,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -42661,7 +46446,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -42678,7 +46463,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -42711,7 +46496,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -42722,39 +46507,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U32 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U32 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -42763,18 +46554,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -42785,26 +46578,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.U32, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.U32, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -42814,14 +46618,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Panic.mul (| Integer.U32, M.read (| acc |), M.read (| base |) |) |) |))) |))) | _, _ => M.impossible @@ -42864,7 +46668,7 @@ Module num. res } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -42874,49 +46678,56 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.U32 2) + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer Integer.U32 0 |) in + let res := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let one := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - BinOp.Pure.bit_and - (M.call_closure (| + M.of_value (| 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 Integer.U32 1)) + |), + UnOp.Pure.not (| M.of_value (| Value.Integer 1 |) |) + |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| one |)) (Value.Integer Integer.U32 0) + BinOp.Pure.ne (| + M.read (| one |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -42925,19 +46736,21 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| op |)) - (BinOp.Panic.add (| + BinOp.Pure.ge (| + M.read (| op |), + BinOp.Panic.add (| + Integer.U32, M.read (| res |), M.read (| one |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -42949,8 +46762,10 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.U32, M.read (| β |), BinOp.Panic.add (| + Integer.U32, M.read (| res |), M.read (| one |) |) @@ -42960,14 +46775,15 @@ Module num. M.write (| res, BinOp.Panic.add (| + Integer.U32, BinOp.Panic.shr (| M.read (| res |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |), M.read (| one |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -42976,19 +46792,22 @@ Module num. β, BinOp.Panic.shr (| M.read (| β |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer Integer.I32 2 |) + BinOp.Panic.shr (| + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -42998,7 +46817,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -43010,7 +46829,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), - [ BinOp.Pure.lt (Value.Integer Integer.U32 0) (M.read (| res |)) ] + [ BinOp.Pure.lt (| M.of_value (| Value.Integer 0 |), M.read (| res |) |) ] |) |) in let _ := @@ -43018,19 +46837,21 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.lt - (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U32 1, + BinOp.Pure.lt (| + M.read (| res |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), BinOp.Panic.div (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 2 + M.of_value (| Value.Integer 2 |) |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in res |))) |))) @@ -43044,13 +46865,13 @@ Module num. self / rhs } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -43061,13 +46882,13 @@ Module num. self % rhs } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -43078,13 +46899,13 @@ Module num. self / rhs } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -43101,17 +46922,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -43119,14 +46946,21 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.U32 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.U32 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.U32 1 |) + BinOp.Panic.add (| + Integer.U32, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -43145,7 +46979,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -43153,23 +46987,20 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |) |), [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U32 0 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in self)); fun γ => ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U32, M.read (| rhs |), M.read (| r |) |) |) |))) ] @@ -43190,7 +47021,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -43223,7 +47054,9 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) |) |) |))) @@ -43233,12 +47066,13 @@ Module num. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U32 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -43248,7 +47082,7 @@ Module num. M.get_associated_function (| Ty.path "u32", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U32, M.read (| rhs |), M.read (| r |) |) ] |) |))) @@ -43267,17 +47101,18 @@ Module num. self.count_ones() == 1 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u32", "count_ones", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U32 1))) + |), + M.of_value (| Value.Integer 1 |) + |))) | _, _ => M.impossible end. @@ -43297,7 +47132,7 @@ Module num. <$SelfT>::MAX >> z } *) - Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43307,28 +47142,35 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U32 1) + BinOp.Pure.le (| + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U32 0 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 0 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let p := M.alloc (| - BinOp.Panic.sub (| M.read (| self |), Value.Integer Integer.U32 1 |) + BinOp.Panic.sub (| + Integer.U32, + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |) in let z := M.alloc (| @@ -43356,17 +47198,18 @@ Module num. self.one_less_than_next_power_of_two() + 1 } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.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 Integer.U32 1 + M.of_value (| Value.Integer 1 |) |))) | _, _ => M.impossible end. @@ -43379,7 +47222,7 @@ Module num. self.one_less_than_next_power_of_two().checked_add(1) } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43395,7 +47238,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -43409,7 +47252,7 @@ Module num. self.one_less_than_next_power_of_two().wrapping_add(1) } *) - Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43425,7 +47268,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -43439,7 +47282,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43463,7 +47306,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43489,7 +47332,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43511,7 +47354,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -43536,7 +47379,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -43562,7 +47405,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -43581,7 +47424,7 @@ Module num. M.IsAssociatedFunction Self "from_ne_bytes" from_ne_bytes. (* pub const fn min_value() -> Self { Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -43590,7 +47433,7 @@ Module num. Axiom AssociatedFunction_min_value : M.IsAssociatedFunction Self "min_value" min_value. (* pub const fn max_value() -> Self { Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -43607,7 +47450,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition widening_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition widening_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -43618,16 +47461,20 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast - (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 32 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 32 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -43646,7 +47493,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition carrying_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -43661,19 +47508,23 @@ Module num. [ M.call_closure (| M.get_associated_function (| Ty.path "u64", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |); - M.rust_cast (M.read (| carry |)) + M.rust_cast (| M.read (| carry |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast - (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 32 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 32 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -43686,17 +47537,23 @@ Module num. ((self as $WideT + rhs as $WideT) / 2) as $SelfT } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - M.rust_cast - (BinOp.Panic.div (| - BinOp.Panic.add (| M.rust_cast (M.read (| self |)), M.rust_cast (M.read (| rhs |)) |), - Value.Integer Integer.U64 2 - |)))) + 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 |) |) + |), + M.of_value (| Value.Integer 2 |) + |) + |))) | _, _ => M.impossible end. @@ -43708,21 +47565,21 @@ Module num. (* pub const MIN: Self = 0; *) (* Ty.path "u64" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 0 |))). + Definition value_MIN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = !0; *) (* Ty.path "u64" *) - Definition value_MAX : Value.t := - M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (Value.Integer Integer.U64 0) |))). + Definition value_MAX : A.t := + M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (| M.of_value (| Value.Integer 0 |) |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = Self::MAX.count_ones(); *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -43739,7 +47596,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -43760,16 +47617,17 @@ Module num. intrinsics::ctpop(self as $ActualT) as u32 } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u64" ] |), [ M.read (| M.use self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -43780,14 +47638,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -43799,16 +47657,17 @@ Module num. intrinsics::ctlz(self as $ActualT) as u32 } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz", [ Ty.path "u64" ] |), [ M.read (| M.use self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -43820,16 +47679,17 @@ Module num. intrinsics::cttz(self) as u32 } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz", [ Ty.path "u64" ] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -43841,14 +47701,14 @@ Module num. (!self).leading_zeros() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "leading_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -43860,14 +47720,14 @@ Module num. (!self).trailing_zeros() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "trailing_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -43880,7 +47740,7 @@ Module num. intrinsics::rotate_left(self, n as $SelfT) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -43888,7 +47748,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_left", [ Ty.path "u64" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -43900,7 +47760,7 @@ Module num. intrinsics::rotate_right(self, n as $SelfT) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -43908,7 +47768,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_right", [ Ty.path "u64" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -43920,7 +47780,7 @@ Module num. intrinsics::bswap(self as $ActualT) as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43944,7 +47804,7 @@ Module num. intrinsics::bitreverse(self as $ActualT) as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -43975,7 +47835,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -44001,7 +47861,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -44024,7 +47884,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -44050,7 +47910,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -44067,7 +47927,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44089,7 +47949,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44103,11 +47963,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -44126,7 +47992,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44148,7 +48014,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44170,7 +48036,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44184,11 +48050,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -44207,7 +48079,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44229,7 +48101,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44243,11 +48115,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -44266,7 +48144,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44288,7 +48166,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44310,7 +48188,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44324,11 +48202,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -44347,7 +48231,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44374,7 +48258,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44382,7 +48266,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44391,25 +48275,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U64 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "u64" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "u64" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -44428,7 +48318,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44436,7 +48326,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44445,22 +48335,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U64 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -44482,7 +48378,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44490,7 +48386,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44499,25 +48395,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U64 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "u64" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "u64" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -44536,7 +48438,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -44544,7 +48446,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44553,22 +48455,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U64 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -44589,7 +48497,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -44598,15 +48506,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.U64 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -44622,27 +48534,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44691,14 +48609,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44747,14 +48665,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44817,7 +48735,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -44825,7 +48743,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -44833,29 +48751,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U64 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.U64 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -44865,16 +48789,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "u64", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -44882,13 +48808,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.U64, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "u64", "pow", [] |), @@ -44896,22 +48823,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -44922,18 +48849,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.U64, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -44943,7 +48875,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -44951,7 +48883,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -44970,14 +48906,14 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -45000,21 +48936,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU64", - "ilog2", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU64", + "ilog2", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -45033,14 +48975,14 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -45063,21 +49005,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU64", - "ilog10", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU64", + "ilog10", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -45093,7 +49041,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -45114,7 +49062,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -45128,11 +49076,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -45150,7 +49104,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45172,7 +49126,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -45186,11 +49140,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -45210,7 +49170,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45223,16 +49183,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -45241,18 +49202,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -45268,7 +49231,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45290,7 +49253,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -45304,11 +49267,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -45328,7 +49297,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45341,16 +49310,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -45359,18 +49329,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -45404,7 +49376,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -45415,14 +49387,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -45430,30 +49405,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.U64 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U64 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -45462,18 +49442,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -45512,9 +49494,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -45523,15 +49507,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -45565,9 +49555,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -45576,7 +49568,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -45586,7 +49578,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -45611,7 +49603,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45639,7 +49631,7 @@ Module num. } } *) - Definition saturating_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45650,7 +49642,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -45661,16 +49653,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| overflow |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I64 0)) + BinOp.Pure.eq (| + M.read (| overflow |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -45678,7 +49674,7 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -45690,7 +49686,7 @@ Module num. |) in M.get_constant (| "core::num::MAX" |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 0 |))) + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |))) ] @@ -45709,7 +49705,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45733,7 +49729,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45774,7 +49770,7 @@ Module num. self.wrapping_div(rhs) } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45798,7 +49794,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -45838,7 +49834,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45858,7 +49854,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45866,7 +49862,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -45879,7 +49875,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45899,7 +49895,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -45919,13 +49915,13 @@ Module num. self / rhs } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -45936,13 +49932,13 @@ Module num. self / rhs } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -45954,13 +49950,13 @@ Module num. self % rhs } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -45971,13 +49967,13 @@ Module num. self % rhs } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -45989,14 +49985,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.U64 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -46012,7 +50009,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -46022,12 +50019,14 @@ Module num. M.get_associated_function (| Ty.path "u64", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -46044,7 +50043,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -46054,12 +50053,14 @@ Module num. M.get_associated_function (| Ty.path "u64", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -46090,7 +50091,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -46101,39 +50102,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U64 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U64 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -46142,18 +50149,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -46172,15 +50181,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -46194,7 +50209,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -46204,7 +50219,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -46230,7 +50245,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -46251,7 +50266,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -46270,7 +50290,7 @@ Module num. (c, b || d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -46296,7 +50316,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -46307,14 +50327,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -46332,7 +50355,7 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -46343,7 +50366,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -46354,13 +50377,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I64 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -46377,7 +50407,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -46398,7 +50428,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -46417,7 +50452,7 @@ Module num. (c, b || d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -46443,7 +50478,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -46454,14 +50489,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -46489,7 +50527,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -46497,54 +50535,67 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u64" ] |), [] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i32", "abs", [] |), [ M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ + M.rust_cast (| M.read (| self |) |); + M.rust_cast (| M.read (| other |) |) + ] |) ] - |)) + |) + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| other |), M.read (| self |) |) + BinOp.Panic.sub (| + Integer.U64, + M.read (| other |), + M.read (| self |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.sub (| + Integer.U64, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -46562,7 +50613,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -46583,7 +50634,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -46598,14 +50654,19 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -46617,14 +50678,19 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -46636,14 +50702,19 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -46655,14 +50726,19 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value (BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -46674,19 +50750,22 @@ Module num. ((!self).wrapping_add(1), self != 0) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), - [ UnOp.Pure.not (M.read (| self |)); Value.Integer Integer.U64 1 ] - |); - BinOp.Pure.ne (M.read (| self |)) (Value.Integer Integer.U64 0) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), + [ UnOp.Pure.not (| M.read (| self |) |); M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value (BinOp.Pure.ne (| M.read (| self |), M.of_value (| Value.Integer 0 |) |)) + ] + |))) | _, _ => M.impossible end. @@ -46698,20 +50777,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -46723,20 +50809,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -46776,7 +50869,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -46787,14 +50880,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -46802,30 +50898,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.U64 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U64 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -46834,18 +50939,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -46873,19 +50980,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -46908,11 +51022,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -46922,7 +51037,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -46939,7 +51054,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -46972,7 +51087,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -46983,39 +51098,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U64 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U64 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -47024,18 +51145,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -47046,26 +51169,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.U64, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.U64, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -47075,14 +51209,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Panic.mul (| Integer.U64, M.read (| acc |), M.read (| base |) |) |) |))) |))) | _, _ => M.impossible @@ -47125,7 +51259,7 @@ Module num. res } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47135,49 +51269,56 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.U64 2) + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer Integer.U64 0 |) in + let res := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let one := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U64 1, - BinOp.Pure.bit_and - (M.call_closure (| + M.of_value (| 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 Integer.U32 1)) + |), + UnOp.Pure.not (| M.of_value (| Value.Integer 1 |) |) + |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| one |)) (Value.Integer Integer.U64 0) + BinOp.Pure.ne (| + M.read (| one |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -47186,19 +51327,21 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| op |)) - (BinOp.Panic.add (| + BinOp.Pure.ge (| + M.read (| op |), + BinOp.Panic.add (| + Integer.U64, M.read (| res |), M.read (| one |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -47210,8 +51353,10 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.U64, M.read (| β |), BinOp.Panic.add (| + Integer.U64, M.read (| res |), M.read (| one |) |) @@ -47221,14 +51366,15 @@ Module num. M.write (| res, BinOp.Panic.add (| + Integer.U64, BinOp.Panic.shr (| M.read (| res |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |), M.read (| one |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -47237,19 +51383,22 @@ Module num. β, BinOp.Panic.shr (| M.read (| β |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer Integer.I32 2 |) + BinOp.Panic.shr (| + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -47259,7 +51408,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -47271,7 +51420,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), - [ BinOp.Pure.lt (Value.Integer Integer.U64 0) (M.read (| res |)) ] + [ BinOp.Pure.lt (| M.of_value (| Value.Integer 0 |), M.read (| res |) |) ] |) |) in let _ := @@ -47279,19 +51428,21 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.lt - (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + BinOp.Pure.lt (| + M.read (| res |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), BinOp.Panic.div (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 2 + M.of_value (| Value.Integer 2 |) |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in res |))) |))) @@ -47305,13 +51456,13 @@ Module num. self / rhs } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -47322,13 +51473,13 @@ Module num. self % rhs } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -47339,13 +51490,13 @@ Module num. self / rhs } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -47362,17 +51513,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -47380,14 +51537,21 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.U64 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.U64 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.U64 1 |) + BinOp.Panic.add (| + Integer.U64, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -47406,7 +51570,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -47414,23 +51578,20 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |) |), [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U64 0 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in self)); fun γ => ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| BinOp.Panic.add (| + Integer.U64, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U64, M.read (| rhs |), M.read (| r |) |) |) |))) ] @@ -47451,7 +51612,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -47484,7 +51645,9 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) |) |) |))) @@ -47494,12 +51657,13 @@ Module num. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U64 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -47509,7 +51673,7 @@ Module num. M.get_associated_function (| Ty.path "u64", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U64, M.read (| rhs |), M.read (| r |) |) ] |) |))) @@ -47528,17 +51692,18 @@ Module num. self.count_ones() == 1 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u64", "count_ones", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U32 1))) + |), + M.of_value (| Value.Integer 1 |) + |))) | _, _ => M.impossible end. @@ -47558,7 +51723,7 @@ Module num. <$SelfT>::MAX >> z } *) - Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47568,28 +51733,35 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U64 1) + BinOp.Pure.le (| + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U64 0 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 0 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let p := M.alloc (| - BinOp.Panic.sub (| M.read (| self |), Value.Integer Integer.U64 1 |) + BinOp.Panic.sub (| + Integer.U64, + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |) in let z := M.alloc (| @@ -47617,17 +51789,18 @@ Module num. self.one_less_than_next_power_of_two() + 1 } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.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 Integer.U64 1 + M.of_value (| Value.Integer 1 |) |))) | _, _ => M.impossible end. @@ -47640,7 +51813,7 @@ Module num. self.one_less_than_next_power_of_two().checked_add(1) } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47656,7 +51829,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -47670,7 +51843,7 @@ Module num. self.one_less_than_next_power_of_two().wrapping_add(1) } *) - Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47686,7 +51859,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -47700,7 +51873,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47724,7 +51897,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47750,7 +51923,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47772,7 +51945,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -47797,7 +51970,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -47823,7 +51996,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -47842,7 +52015,7 @@ Module num. M.IsAssociatedFunction Self "from_ne_bytes" from_ne_bytes. (* pub const fn min_value() -> Self { Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -47851,7 +52024,7 @@ Module num. Axiom AssociatedFunction_min_value : M.IsAssociatedFunction Self "min_value" min_value. (* pub const fn max_value() -> Self { Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -47868,7 +52041,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition widening_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition widening_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -47879,16 +52052,20 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast - (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 64 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 64 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -47907,7 +52084,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition carrying_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -47922,19 +52099,23 @@ Module num. [ M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |); - M.rust_cast (M.read (| carry |)) + M.rust_cast (| M.read (| carry |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast - (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 64 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 64 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -47947,17 +52128,23 @@ Module num. ((self as $WideT + rhs as $WideT) / 2) as $SelfT } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - M.rust_cast - (BinOp.Panic.div (| - BinOp.Panic.add (| M.rust_cast (M.read (| self |)), M.rust_cast (M.read (| rhs |)) |), - Value.Integer Integer.U128 2 - |)))) + 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 |) |) + |), + M.of_value (| Value.Integer 2 |) + |) + |))) | _, _ => M.impossible end. @@ -47969,21 +52156,21 @@ Module num. (* pub const MIN: Self = 0; *) (* Ty.path "u128" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U128 0 |))). + Definition value_MIN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = !0; *) (* Ty.path "u128" *) - Definition value_MAX : Value.t := - M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (Value.Integer Integer.U128 0) |))). + Definition value_MAX : A.t := + M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (| M.of_value (| Value.Integer 0 |) |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = Self::MAX.count_ones(); *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -48000,7 +52187,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -48021,16 +52208,17 @@ Module num. intrinsics::ctpop(self as $ActualT) as u32 } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u128" ] |), [ M.read (| M.use self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -48041,14 +52229,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -48060,16 +52248,17 @@ Module num. intrinsics::ctlz(self as $ActualT) as u32 } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz", [ Ty.path "u128" ] |), [ M.read (| M.use self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -48081,16 +52270,17 @@ Module num. intrinsics::cttz(self) as u32 } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz", [ Ty.path "u128" ] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -48102,14 +52292,14 @@ Module num. (!self).leading_zeros() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "leading_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -48121,14 +52311,14 @@ Module num. (!self).trailing_zeros() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "trailing_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -48141,7 +52331,7 @@ Module num. intrinsics::rotate_left(self, n as $SelfT) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -48149,7 +52339,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_left", [ Ty.path "u128" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -48161,7 +52351,7 @@ Module num. intrinsics::rotate_right(self, n as $SelfT) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -48169,7 +52359,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_right", [ Ty.path "u128" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -48181,7 +52371,7 @@ Module num. intrinsics::bswap(self as $ActualT) as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -48205,7 +52395,7 @@ Module num. intrinsics::bitreverse(self as $ActualT) as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -48236,7 +52426,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -48262,7 +52452,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -48285,7 +52475,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -48311,7 +52501,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -48328,7 +52518,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48350,7 +52540,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48364,11 +52554,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -48387,7 +52583,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48409,7 +52605,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48431,7 +52627,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48445,11 +52641,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -48468,7 +52670,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48490,7 +52692,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48504,11 +52706,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -48527,7 +52735,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48549,7 +52757,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48571,7 +52779,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48585,11 +52793,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -48608,7 +52822,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48635,7 +52849,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48643,7 +52857,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48652,25 +52866,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U128 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "u128" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "u128" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -48689,7 +52909,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48697,7 +52917,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48706,22 +52926,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U128 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -48743,7 +52969,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48751,7 +52977,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48760,25 +52986,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U128 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "u128" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "u128" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -48797,7 +53029,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -48805,7 +53037,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48814,22 +53046,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U128 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -48850,7 +53088,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -48859,15 +53097,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.U128 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -48883,27 +53125,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48952,14 +53200,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49008,14 +53256,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49078,7 +53326,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -49086,7 +53334,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49094,29 +53342,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U128 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.U128 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -49126,16 +53380,18 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "u128", "ilog2", [] |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -49143,13 +53399,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.U128, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "u128", "pow", [] |), @@ -49157,22 +53414,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -49183,18 +53440,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.U128, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -49204,7 +53466,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -49212,7 +53474,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -49231,14 +53497,14 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49261,21 +53527,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU128", - "ilog2", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU128", + "ilog2", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -49294,14 +53566,14 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49324,21 +53596,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU128", - "ilog10", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU128", + "ilog10", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -49354,7 +53632,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -49375,7 +53653,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49389,11 +53667,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -49411,7 +53695,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -49433,7 +53717,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49447,11 +53731,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -49471,7 +53761,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -49484,16 +53774,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -49502,18 +53793,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -49529,7 +53822,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -49551,7 +53844,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49565,11 +53858,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -49589,7 +53888,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -49602,16 +53901,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -49620,18 +53920,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -49665,7 +53967,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -49676,14 +53978,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -49691,30 +53996,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.U128 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U128 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -49723,18 +54033,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -49773,9 +54085,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -49784,15 +54098,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -49826,9 +54146,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -49837,7 +54159,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -49847,7 +54169,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -49872,7 +54194,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -49900,7 +54222,7 @@ Module num. } } *) - Definition saturating_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -49911,7 +54233,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -49922,18 +54244,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| overflow |)) - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.I128 0)) + BinOp.Pure.eq (| + M.read (| overflow |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -49941,7 +54265,7 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -49953,7 +54277,7 @@ Module num. |) in M.get_constant (| "core::num::MAX" |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer Integer.U128 0 |))) + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |))) ] @@ -49972,7 +54296,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -49996,7 +54320,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50037,7 +54361,7 @@ Module num. self.wrapping_div(rhs) } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50061,7 +54385,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -50101,7 +54425,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50121,7 +54445,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50129,7 +54453,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -50142,7 +54466,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50162,7 +54486,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50182,13 +54506,13 @@ Module num. self / rhs } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -50199,13 +54523,13 @@ Module num. self / rhs } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -50217,13 +54541,13 @@ Module num. self % rhs } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -50234,13 +54558,13 @@ Module num. self % rhs } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -50252,14 +54576,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.U128 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -50275,7 +54600,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50285,12 +54610,14 @@ Module num. M.get_associated_function (| Ty.path "u128", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -50307,7 +54634,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50317,12 +54644,14 @@ Module num. M.get_associated_function (| Ty.path "u128", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -50353,7 +54682,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -50364,39 +54693,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U128 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U128 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -50405,18 +54740,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -50435,15 +54772,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -50457,7 +54800,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -50467,7 +54810,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -50493,7 +54836,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50514,7 +54857,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -50533,7 +54881,7 @@ Module num. (c, b || d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -50559,7 +54907,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -50570,14 +54918,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -50595,7 +54946,7 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50606,7 +54957,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -50617,13 +54968,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.I128 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -50640,7 +54998,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50661,7 +55019,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -50680,7 +55043,7 @@ Module num. (c, b || d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -50706,7 +55069,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -50717,14 +55080,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -50752,7 +55118,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -50760,54 +55126,67 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u128" ] |), [] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i32", "abs", [] |), [ M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ + M.rust_cast (| M.read (| self |) |); + M.rust_cast (| M.read (| other |) |) + ] |) ] - |)) + |) + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| other |), M.read (| self |) |) + BinOp.Panic.sub (| + Integer.U128, + M.read (| other |), + M.read (| self |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.sub (| + Integer.U128, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -50825,7 +55204,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -50846,7 +55225,12 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| M.use a |); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| M.use a |)); A.to_value (M.read (| b |)) ] + |) + |))) ] |) |))) @@ -50861,14 +55245,20 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -50880,14 +55270,20 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -50899,14 +55295,20 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -50918,14 +55320,20 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -50937,19 +55345,22 @@ Module num. ((!self).wrapping_add(1), self != 0) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), - [ UnOp.Pure.not (M.read (| self |)); Value.Integer Integer.U128 1 ] - |); - BinOp.Pure.ne (M.read (| self |)) (Value.Integer Integer.U128 0) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), + [ UnOp.Pure.not (| M.read (| self |) |); M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value (BinOp.Pure.ne (| M.read (| self |), M.of_value (| Value.Integer 0 |) |)) + ] + |))) | _, _ => M.impossible end. @@ -50961,20 +55372,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -50986,20 +55404,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -51039,7 +55464,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -51050,14 +55475,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -51065,30 +55493,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.U128 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U128 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -51097,18 +55534,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -51136,19 +55575,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -51171,11 +55617,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -51185,7 +55632,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -51202,7 +55649,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -51235,7 +55682,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -51246,39 +55693,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U128 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.U128 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -51287,18 +55740,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -51309,26 +55764,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.U128, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.U128, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -51338,14 +55804,16 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| + BinOp.Panic.mul (| Integer.U128, M.read (| acc |), M.read (| base |) |) + |) |))) |))) | _, _ => M.impossible @@ -51388,7 +55856,7 @@ Module num. res } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -51398,49 +55866,56 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.U128 2) + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer Integer.U128 0 |) in + let res := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let one := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U128 1, - BinOp.Pure.bit_and - (M.call_closure (| + M.of_value (| 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 Integer.U32 1)) + |), + UnOp.Pure.not (| M.of_value (| Value.Integer 1 |) |) + |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| one |)) (Value.Integer Integer.U128 0) + BinOp.Pure.ne (| + M.read (| one |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -51449,19 +55924,21 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| op |)) - (BinOp.Panic.add (| + BinOp.Pure.ge (| + M.read (| op |), + BinOp.Panic.add (| + Integer.U128, M.read (| res |), M.read (| one |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -51473,8 +55950,10 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.U128, M.read (| β |), BinOp.Panic.add (| + Integer.U128, M.read (| res |), M.read (| one |) |) @@ -51484,14 +55963,15 @@ Module num. M.write (| res, BinOp.Panic.add (| + Integer.U128, BinOp.Panic.shr (| M.read (| res |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |), M.read (| one |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -51500,19 +55980,22 @@ Module num. β, BinOp.Panic.shr (| M.read (| β |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer Integer.I32 2 |) + BinOp.Panic.shr (| + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -51522,7 +56005,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -51534,7 +56017,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), - [ BinOp.Pure.lt (Value.Integer Integer.U128 0) (M.read (| res |)) ] + [ BinOp.Pure.lt (| M.of_value (| Value.Integer 0 |), M.read (| res |) |) ] |) |) in let _ := @@ -51542,19 +56025,21 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.lt - (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U128 1, + BinOp.Pure.lt (| + M.read (| res |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), BinOp.Panic.div (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 2 + M.of_value (| Value.Integer 2 |) |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in res |))) |))) @@ -51568,13 +56053,13 @@ Module num. self / rhs } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -51585,13 +56070,13 @@ Module num. self % rhs } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -51602,13 +56087,13 @@ Module num. self / rhs } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -51625,17 +56110,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -51643,14 +56134,21 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.U128 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.U128 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.U128 1 |) + BinOp.Panic.add (| + Integer.U128, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -51669,7 +56167,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -51677,23 +56175,20 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |) |), [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U128 0 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in self)); fun γ => ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| BinOp.Panic.add (| + Integer.U128, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U128, M.read (| rhs |), M.read (| r |) |) |) |))) ] @@ -51714,7 +56209,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -51747,7 +56242,9 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) |) |) |))) @@ -51757,12 +56254,13 @@ Module num. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U128 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -51772,7 +56270,7 @@ Module num. M.get_associated_function (| Ty.path "u128", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.U128, M.read (| rhs |), M.read (| r |) |) ] |) |))) @@ -51791,17 +56289,18 @@ Module num. self.count_ones() == 1 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "u128", "count_ones", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U32 1))) + |), + M.of_value (| Value.Integer 1 |) + |))) | _, _ => M.impossible end. @@ -51821,7 +56320,7 @@ Module num. <$SelfT>::MAX >> z } *) - Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -51831,28 +56330,35 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.U128 1) + BinOp.Pure.le (| + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.U128 0 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 0 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let p := M.alloc (| - BinOp.Panic.sub (| M.read (| self |), Value.Integer Integer.U128 1 |) + BinOp.Panic.sub (| + Integer.U128, + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |) in let z := M.alloc (| @@ -51880,17 +56386,18 @@ Module num. self.one_less_than_next_power_of_two() + 1 } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.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 Integer.U128 1 + M.of_value (| Value.Integer 1 |) |))) | _, _ => M.impossible end. @@ -51903,7 +56410,7 @@ Module num. self.one_less_than_next_power_of_two().checked_add(1) } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -51919,7 +56426,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.U128 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -51933,7 +56440,7 @@ Module num. self.one_less_than_next_power_of_two().wrapping_add(1) } *) - Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -51949,7 +56456,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.U128 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -51963,7 +56470,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -51987,7 +56494,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -52013,7 +56520,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -52035,7 +56542,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -52060,7 +56567,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -52086,7 +56593,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -52105,7 +56612,7 @@ Module num. M.IsAssociatedFunction Self "from_ne_bytes" from_ne_bytes. (* pub const fn min_value() -> Self { Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -52114,7 +56621,7 @@ Module num. Axiom AssociatedFunction_min_value : M.IsAssociatedFunction Self "min_value" min_value. (* pub const fn max_value() -> Self { Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -52129,18 +56636,19 @@ Module num. ((self ^ rhs) >> 1) + (self & rhs) } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => 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 Integer.I32 1 + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| rhs |) |), + M.of_value (| Value.Integer 1 |) |), - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |) |))) | _, _ => M.impossible end. @@ -52153,21 +56661,21 @@ Module num. (* pub const MIN: Self = 0; *) (* Ty.path "usize" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))). + Definition value_MIN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = !0; *) (* Ty.path "usize" *) - Definition value_MAX : Value.t := - M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (Value.Integer Integer.Usize 0) |))). + Definition value_MAX : A.t := + M.run ltac:(M.monadic (M.alloc (| UnOp.Pure.not (| M.of_value (| Value.Integer 0 |) |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = Self::MAX.count_ones(); *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -52184,7 +56692,7 @@ Module num. from_str_radix(src, radix) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src; radix ] => ltac:(M.monadic @@ -52205,16 +56713,17 @@ Module num. intrinsics::ctpop(self as $ActualT) as u32 } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u64" ] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -52225,14 +56734,14 @@ Module num. (!self).count_ones() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "count_ones", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -52244,16 +56753,17 @@ Module num. intrinsics::ctlz(self as $ActualT) as u32 } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz", [ Ty.path "u64" ] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -52265,16 +56775,17 @@ Module num. intrinsics::cttz(self) as u32 } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz", [ Ty.path "usize" ] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -52286,14 +56797,14 @@ Module num. (!self).leading_zeros() } *) - Definition leading_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "leading_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -52305,14 +56816,14 @@ Module num. (!self).trailing_zeros() } *) - Definition trailing_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "trailing_zeros", [] |), - [ UnOp.Pure.not (M.read (| self |)) ] + [ UnOp.Pure.not (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -52325,7 +56836,7 @@ Module num. intrinsics::rotate_left(self, n as $SelfT) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -52333,7 +56844,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_left", [ Ty.path "usize" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -52345,7 +56856,7 @@ Module num. intrinsics::rotate_right(self, n as $SelfT) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -52353,7 +56864,7 @@ Module num. let n := M.alloc (| n |) in M.call_closure (| M.get_function (| "core::intrinsics::rotate_right", [ Ty.path "usize" ] |), - [ M.read (| self |); M.rust_cast (M.read (| n |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| n |) |) ] |))) | _, _ => M.impossible end. @@ -52365,16 +56876,17 @@ Module num. intrinsics::bswap(self as $ActualT) as Self } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::bswap", [ Ty.path "u64" ] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -52385,16 +56897,17 @@ Module num. intrinsics::bitreverse(self as $ActualT) as Self } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::bitreverse", [ Ty.path "u64" ] |), - [ M.rust_cast (M.read (| self |)) ] - |)))) + [ M.rust_cast (| M.read (| self |) |) ] + |) + |))) | _, _ => M.impossible end. @@ -52412,7 +56925,7 @@ Module num. } } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -52438,7 +56951,7 @@ Module num. } } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -52461,7 +56974,7 @@ Module num. } } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -52487,7 +57000,7 @@ Module num. } } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -52504,7 +57017,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52526,7 +57039,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -52540,11 +57053,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -52563,7 +57082,7 @@ Module num. unsafe { intrinsics::unchecked_add(self, rhs) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52585,7 +57104,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52607,7 +57126,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -52621,11 +57140,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -52644,7 +57169,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52666,7 +57191,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -52680,11 +57205,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -52703,7 +57234,7 @@ Module num. unsafe { intrinsics::unchecked_sub(self, rhs) } } *) - Definition unchecked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52725,7 +57256,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52747,7 +57278,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -52761,11 +57292,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -52784,7 +57321,7 @@ Module num. unsafe { intrinsics::unchecked_mul(self, rhs) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52811,7 +57348,7 @@ Module num. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52819,7 +57356,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -52828,25 +57365,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Usize 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_div", - [ Ty.path "usize" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_div", + [ Ty.path "usize" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -52865,7 +57408,7 @@ Module num. } } *) - Definition checked_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52873,7 +57416,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -52882,22 +57425,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Usize 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "div_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "div_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -52919,7 +57468,7 @@ Module num. } } *) - Definition checked_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52927,7 +57476,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -52936,25 +57485,31 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Usize 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::intrinsics::unchecked_rem", - [ Ty.path "usize" ] - |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::unchecked_rem", + [ Ty.path "usize" ] + |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -52973,7 +57528,7 @@ Module num. } } *) - Definition checked_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -52981,7 +57536,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -52990,22 +57545,28 @@ Module num. (M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unlikely", [] |), - [ BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.Usize 0) ] + [ BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) + ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "rem_euclid", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "rem_euclid", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)) + ] + |) |))) ] |) @@ -53026,7 +57587,7 @@ Module num. } } *) - Definition ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -53035,15 +57596,19 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| base |)) (Value.Integer Integer.Usize 2)) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| base |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -53059,27 +57624,33 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "base of integer logarithm must be at least 2" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "base of integer logarithm must be at least 2" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53128,14 +57699,14 @@ Module num. } } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53184,14 +57755,14 @@ Module num. } } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53254,7 +57825,7 @@ Module num. } } *) - Definition checked_ilog (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; base ] => ltac:(M.monadic @@ -53262,7 +57833,7 @@ Module num. let base := M.alloc (| base |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53270,29 +57841,35 @@ Module num. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.Usize 0), + BinOp.Pure.le (| M.read (| self |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| base |)) (Value.Integer Integer.Usize 1))) + (BinOp.Pure.le (| + M.read (| base |), + M.of_value (| Value.Integer 1 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer Integer.U32 0 |) in + (let n := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 128) + BinOp.Pure.eq (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -53302,11 +57879,13 @@ Module num. let b := M.alloc (| BinOp.Panic.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 (| M.get_associated_function (| Ty.path "usize", @@ -53315,7 +57894,7 @@ Module num. |), [ M.read (| base |) ] |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -53323,13 +57902,14 @@ Module num. let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| b |) |) + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) |) in let _ := let β := r in M.write (| β, BinOp.Panic.div (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| Ty.path "usize", "pow", [] |), @@ -53337,22 +57917,22 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| r |)) (M.read (| base |)) + BinOp.Pure.ge (| M.read (| r |), M.read (| base |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -53363,18 +57943,23 @@ Module num. let β := r in M.write (| β, - BinOp.Panic.div (| M.read (| β |), M.read (| base |) |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| β |), + M.read (| base |) + |) |) in let _ := let β := n in M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -53384,7 +57969,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -53392,7 +57977,11 @@ Module num. |))) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |) |))) ] |) @@ -53411,14 +58000,14 @@ Module num. } } *) - Definition checked_ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53441,21 +58030,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "ilog2", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "ilog2", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -53474,14 +58069,14 @@ Module num. } } *) - Definition checked_ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53504,21 +58099,27 @@ Module num. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "ilog10", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "ilog10", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -53534,7 +58135,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -53555,7 +58156,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53569,11 +58170,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -53591,7 +58198,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -53613,7 +58220,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53627,11 +58234,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -53651,7 +58264,7 @@ Module num. unsafe { intrinsics::unchecked_shl(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -53664,16 +58277,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -53682,18 +58296,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -53709,7 +58325,7 @@ Module num. if unlikely!(b) {None} else {Some(a)} } *) - Definition checked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -53731,7 +58347,7 @@ Module num. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53745,11 +58361,17 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |) |))) ] |))) @@ -53769,7 +58391,7 @@ Module num. unsafe { intrinsics::unchecked_shr(self, conv_rhs_for_unchecked_shift!($SelfT, rhs)) } } *) - Definition unchecked_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -53782,16 +58404,17 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| M.get_constant (| "core::num::BITS" |) |)) - (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::num::BITS" |) |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -53800,18 +58423,20 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| rhs |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))) + BinOp.Pure.le (| + M.read (| rhs |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| M.rust_cast (M.read (| rhs |)) |) + M.alloc (| M.rust_cast (| M.read (| rhs |) |) |) |) ] |))) @@ -53845,7 +58470,7 @@ Module num. acc.checked_mul(base) } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -53856,14 +58481,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -53871,30 +58499,35 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 1 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.Usize 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -53903,18 +58536,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -53953,9 +58588,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -53964,15 +58601,21 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -54006,9 +58649,11 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -54017,7 +58662,7 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -54027,7 +58672,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -54052,7 +58697,7 @@ Module num. intrinsics::saturating_add(self, rhs) } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54080,7 +58725,7 @@ Module num. } } *) - Definition saturating_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54091,7 +58736,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -54102,18 +58747,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| overflow |)) - (BinOp.Pure.lt - (M.read (| rhs |)) - (Value.Integer Integer.Isize 0)) + BinOp.Pure.eq (| + M.read (| overflow |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -54121,7 +58768,7 @@ Module num. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -54133,7 +58780,7 @@ Module num. |) in M.get_constant (| "core::num::MAX" |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |))) ] @@ -54152,7 +58799,7 @@ Module num. intrinsics::saturating_sub(self, rhs) } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54176,7 +58823,7 @@ Module num. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54217,7 +58864,7 @@ Module num. self.wrapping_div(rhs) } *) - Definition saturating_div (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54241,7 +58888,7 @@ Module num. } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -54281,7 +58928,7 @@ Module num. intrinsics::wrapping_add(self, rhs) } *) - Definition wrapping_add (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54301,7 +58948,7 @@ Module num. self.wrapping_add(rhs as Self) } *) - Definition wrapping_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54309,7 +58956,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |))) | _, _ => M.impossible end. @@ -54322,7 +58969,7 @@ Module num. intrinsics::wrapping_sub(self, rhs) } *) - Definition wrapping_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54342,7 +58989,7 @@ Module num. intrinsics::wrapping_mul(self, rhs) } *) - Definition wrapping_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54362,13 +59009,13 @@ Module num. self / rhs } *) - Definition wrapping_div (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -54379,13 +59026,13 @@ Module num. self / rhs } *) - Definition wrapping_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -54397,13 +59044,13 @@ Module num. self % rhs } *) - Definition wrapping_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -54414,13 +59061,13 @@ Module num. self % rhs } *) - Definition wrapping_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -54432,14 +59079,15 @@ Module num. (0 as $SelfT).wrapping_sub(self) } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_sub", [] |), - [ M.read (| M.use (M.alloc (| Value.Integer Integer.Usize 0 |)) |); M.read (| self |) ] + [ M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |); M.read (| self |) + ] |))) | _, _ => M.impossible end. @@ -54455,7 +59103,7 @@ Module num. } } *) - Definition wrapping_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54465,12 +59113,14 @@ Module num. M.get_associated_function (| Ty.path "usize", "unchecked_shl", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -54487,7 +59137,7 @@ Module num. } } *) - Definition wrapping_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54497,12 +59147,14 @@ Module num. M.get_associated_function (| Ty.path "usize", "unchecked_shr", [] |), [ M.read (| self |); - BinOp.Pure.bit_and - (M.read (| rhs |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| rhs |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) ] |))) | _, _ => M.impossible @@ -54533,7 +59185,7 @@ Module num. acc.wrapping_mul(base) } *) - Definition wrapping_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -54544,39 +59196,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.Usize 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.Usize 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -54585,18 +59243,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -54615,15 +59275,21 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -54637,7 +59303,7 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -54647,7 +59313,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -54673,7 +59339,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_add (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54684,7 +59350,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::add_with_overflow", [ Ty.path "u64" ] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -54694,7 +59360,15 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.rust_cast (M.read (| a |)); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| a |) |)); + A.to_value (M.read (| b |)) + ] + |) + |))) ] |) |))) @@ -54713,7 +59387,7 @@ Module num. (c, b || d) } *) - Definition carrying_add (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -54739,7 +59413,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "overflowing_add", [] |), - [ M.read (| a |); M.rust_cast (M.read (| carry |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| carry |) |) ] |) |), [ @@ -54750,14 +59424,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -54775,7 +59452,7 @@ Module num. (res, overflowed ^ (rhs < 0)) } *) - Definition overflowing_add_signed (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_add_signed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54786,7 +59463,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "overflowing_add", [] |), - [ M.read (| self |); M.rust_cast (M.read (| rhs |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -54797,13 +59474,20 @@ Module num. let res := M.copy (| γ0_0 |) in let overflowed := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| res |); - BinOp.Pure.bit_xor - (M.read (| overflowed |)) - (BinOp.Pure.lt (M.read (| rhs |)) (Value.Integer Integer.Isize 0)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| res |)); + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| overflowed |), + BinOp.Pure.lt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |) + |)) + ] + |) |))) ] |) @@ -54820,7 +59504,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -54831,7 +59515,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::sub_with_overflow", [ Ty.path "u64" ] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -54841,7 +59525,15 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.rust_cast (M.read (| a |)); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| a |) |)); + A.to_value (M.read (| b |)) + ] + |) + |))) ] |) |))) @@ -54860,7 +59552,7 @@ Module num. (c, b || d) } *) - Definition borrowing_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition borrowing_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; borrow ] => ltac:(M.monadic @@ -54886,7 +59578,7 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "overflowing_sub", [] |), - [ M.read (| a |); M.rust_cast (M.read (| borrow |)) ] + [ M.read (| a |); M.rust_cast (| M.read (| borrow |) |) ] |) |), [ @@ -54897,14 +59589,17 @@ Module num. let c := M.copy (| γ0_0 |) in let d := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| c |); - LogicalOp.or (| - M.read (| b |), - ltac:(M.monadic (M.read (| d |))) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| c |)); + A.to_value + (LogicalOp.or (| + M.read (| b |), + ltac:(M.monadic (M.read (| d |))) + |)) + ] + |) |))) ] |))) @@ -54932,7 +59627,7 @@ Module num. } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -54940,54 +59635,67 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "i32", "abs", [] |), [ M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| other |)) ] + [ + M.rust_cast (| M.read (| self |) |); + M.rust_cast (| M.read (| other |) |) + ] |) ] - |)) + |) + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (M.read (| other |)) + BinOp.Pure.lt (| M.read (| self |), M.read (| other |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| M.read (| other |), M.read (| self |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| other |), + M.read (| self |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| self |), + M.read (| other |) + |) |))) ] |))) @@ -55005,7 +59713,7 @@ Module num. (a as Self, b) } *) - Definition overflowing_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -55016,7 +59724,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::mul_with_overflow", [ Ty.path "u64" ] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |), [ @@ -55026,7 +59734,15 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.rust_cast (M.read (| a |)); M.read (| b |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| a |) |)); + A.to_value (M.read (| b |)) + ] + |) + |))) ] |) |))) @@ -55041,14 +59757,20 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -55060,14 +59782,20 @@ Module num. (self / rhs, false) } *) - Definition overflowing_div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -55079,14 +59807,20 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -55098,14 +59832,20 @@ Module num. (self % rhs, false) } *) - Definition overflowing_rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |); Value.Bool false ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |))) | _, _ => M.impossible end. @@ -55117,19 +59857,22 @@ Module num. ((!self).wrapping_add(1), self != 0) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), - [ UnOp.Pure.not (M.read (| self |)); Value.Integer Integer.Usize 1 ] - |); - BinOp.Pure.ne (M.read (| self |)) (Value.Integer Integer.Usize 0) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), + [ UnOp.Pure.not (| M.read (| self |) |); M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value (BinOp.Pure.ne (| M.read (| self |), M.of_value (| Value.Integer 0 |) |)) + ] + |))) | _, _ => M.impossible end. @@ -55141,20 +59884,27 @@ Module num. (self.wrapping_shl(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shl (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_shl", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_shl", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -55166,20 +59916,27 @@ Module num. (self.wrapping_shr(rhs), rhs >= Self::BITS) } *) - Definition overflowing_shr (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_shr", [] |), - [ M.read (| self |); M.read (| rhs |) ] - |); - BinOp.Pure.ge (M.read (| rhs |)) (M.read (| M.get_constant (| "core::num::BITS" |) |)) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_shr", [] |), + [ M.read (| self |); M.read (| rhs |) ] + |)); + A.to_value + (BinOp.Pure.ge (| + M.read (| rhs |), + M.read (| M.get_constant (| "core::num::BITS" |) |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -55219,7 +59976,7 @@ Module num. r } *) - Definition overflowing_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -55230,14 +59987,17 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -55245,30 +60005,39 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [ Value.Integer Integer.Usize 1; Value.Bool false ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.Usize 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let overflown := M.alloc (| M.of_value (| Value.Bool false |) |) in + let r := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -55277,18 +60046,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -55316,19 +60087,26 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| @@ -55351,11 +60129,12 @@ Module num. let β := overflown in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + M.read (| M.SubPointer.get_tuple_field (| r, 1 |) |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -55365,7 +60144,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -55382,7 +60161,7 @@ Module num. |) in let _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| overflown |) |) |) in r |))) |))) @@ -55415,7 +60194,7 @@ Module num. acc * base } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic @@ -55426,39 +60205,45 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| exp |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.Usize 1 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 1 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer Integer.Usize 1 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| exp |)) (Value.Integer Integer.U32 1) + BinOp.Pure.gt (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -55467,18 +60252,20 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| exp |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 1) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| exp |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -55489,26 +60276,37 @@ Module num. M.write (| acc, BinOp.Panic.mul (| + Integer.Usize, M.read (| acc |), M.read (| base |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := exp in M.write (| β, - BinOp.Panic.div (| M.read (| β |), Value.Integer Integer.U32 2 |) + BinOp.Panic.div (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := M.write (| base, - BinOp.Panic.mul (| M.read (| base |), M.read (| base |) |) + BinOp.Panic.mul (| + Integer.Usize, + M.read (| base |), + M.read (| base |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -55518,14 +60316,16 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| BinOp.Panic.mul (| M.read (| acc |), M.read (| base |) |) |) + M.alloc (| + BinOp.Panic.mul (| Integer.Usize, M.read (| acc |), M.read (| base |) |) + |) |))) |))) | _, _ => M.impossible @@ -55568,7 +60368,7 @@ Module num. res } *) - Definition isqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition isqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -55578,49 +60378,56 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| self |)) (Value.Integer Integer.Usize 2) + BinOp.Pure.lt (| + M.read (| self |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| self |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer Integer.Usize 0 |) in + let res := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let one := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.Usize 1, - BinOp.Pure.bit_and - (M.call_closure (| + M.of_value (| 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 Integer.U32 1)) + |), + UnOp.Pure.not (| M.of_value (| Value.Integer 1 |) |) + |) |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| one |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + M.read (| one |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -55629,19 +60436,21 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| op |)) - (BinOp.Panic.add (| + BinOp.Pure.ge (| + M.read (| op |), + BinOp.Panic.add (| + Integer.Usize, M.read (| res |), M.read (| one |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -55653,8 +60462,10 @@ Module num. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), BinOp.Panic.add (| + Integer.Usize, M.read (| res |), M.read (| one |) |) @@ -55664,14 +60475,15 @@ Module num. M.write (| res, BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.shr (| M.read (| res |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |), M.read (| one |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -55680,19 +60492,22 @@ Module num. β, BinOp.Panic.shr (| M.read (| β |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer Integer.I32 2 |) + BinOp.Panic.shr (| + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -55702,7 +60517,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -55714,7 +60529,7 @@ Module num. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), - [ BinOp.Pure.lt (Value.Integer Integer.Usize 0) (M.read (| res |)) ] + [ BinOp.Pure.lt (| M.of_value (| Value.Integer 0 |), M.read (| res |) |) ] |) |) in let _ := @@ -55722,19 +60537,21 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.lt - (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer Integer.Usize 1, + BinOp.Pure.lt (| + M.read (| res |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), BinOp.Panic.div (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer Integer.U32 2 + M.of_value (| Value.Integer 2 |) |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in res |))) |))) @@ -55748,13 +60565,13 @@ Module num. self / rhs } *) - Definition div_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition div_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -55765,13 +60582,13 @@ Module num. self % rhs } *) - Definition rem_euclid (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_euclid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -55782,13 +60599,13 @@ Module num. self / rhs } *) - Definition div_floor (τ : list Ty.t) (α : list Value.t) : M := + Definition div_floor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |))) + BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -55805,17 +60622,23 @@ Module num. } } *) - Definition div_ceil (τ : list Ty.t) (α : list Value.t) : M := + Definition div_ceil (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := M.alloc (| BinOp.Panic.div (| M.read (| self |), M.read (| rhs |) |) |) in - let r := M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |) in + 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -55823,14 +60646,21 @@ Module num. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt (M.read (| r |)) (Value.Integer Integer.Usize 0), + BinOp.Pure.gt (| M.read (| r |), M.of_value (| Value.Integer 0 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| rhs |)) (Value.Integer Integer.Usize 0))) + (BinOp.Pure.gt (| + M.read (| rhs |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| M.read (| d |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| d |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic d) ] @@ -55849,7 +60679,7 @@ Module num. } } *) - Definition next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -55857,23 +60687,22 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| + BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |) + |), [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 0 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in self)); fun γ => ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| self |), - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| rhs |), M.read (| r |) |) |) |))) ] @@ -55894,7 +60723,7 @@ Module num. } } *) - Definition checked_next_multiple_of (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_multiple_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -55927,7 +60756,9 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) |) |) |))) @@ -55937,12 +60768,13 @@ Module num. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -55952,7 +60784,7 @@ Module num. M.get_associated_function (| Ty.path "usize", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| rhs |), M.read (| r |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| rhs |), M.read (| r |) |) ] |) |))) @@ -55971,17 +60803,18 @@ Module num. self.count_ones() == 1 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "count_ones", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.U32 1))) + |), + M.of_value (| Value.Integer 1 |) + |))) | _, _ => M.impossible end. @@ -56001,7 +60834,7 @@ Module num. <$SelfT>::MAX >> z } *) - Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition one_less_than_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -56011,28 +60844,35 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| self |)) (Value.Integer Integer.Usize 1) + BinOp.Pure.le (| + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.Usize 0 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 0 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let p := M.alloc (| - BinOp.Panic.sub (| M.read (| self |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| self |), + M.of_value (| Value.Integer 1 |) + |) |) in let z := M.alloc (| @@ -56060,12 +60900,13 @@ Module num. self.one_less_than_next_power_of_two() + 1 } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "usize", @@ -56074,7 +60915,7 @@ Module num. |), [ M.read (| self |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |))) | _, _ => M.impossible end. @@ -56087,7 +60928,7 @@ Module num. self.one_less_than_next_power_of_two().checked_add(1) } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -56103,7 +60944,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -56117,7 +60958,7 @@ Module num. self.one_less_than_next_power_of_two().wrapping_add(1) } *) - Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -56133,7 +60974,7 @@ Module num. |), [ M.read (| self |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible @@ -56147,7 +60988,7 @@ Module num. self.to_be().to_ne_bytes() } *) - Definition to_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -56171,7 +61012,7 @@ Module num. self.to_le().to_ne_bytes() } *) - Definition to_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -56197,7 +61038,7 @@ Module num. unsafe { mem::transmute(self) } } *) - Definition to_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition to_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -56219,7 +61060,7 @@ Module num. Self::from_be(Self::from_ne_bytes(bytes)) } *) - Definition from_be_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -56244,7 +61085,7 @@ Module num. Self::from_le(Self::from_ne_bytes(bytes)) } *) - Definition from_le_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -56270,7 +61111,7 @@ Module num. unsafe { mem::transmute(bytes) } } *) - Definition from_ne_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ne_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -56289,7 +61130,7 @@ Module num. M.IsAssociatedFunction Self "from_ne_bytes" from_ne_bytes. (* pub const fn min_value() -> Self { Self::MIN } *) - Definition min_value (τ : list Ty.t) (α : list Value.t) : M := + Definition min_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MIN" |) |))) | _, _ => M.impossible @@ -56298,7 +61139,7 @@ Module num. Axiom AssociatedFunction_min_value : M.IsAssociatedFunction Self "min_value" min_value. (* pub const fn max_value() -> Self { Self::MAX } *) - Definition max_value (τ : list Ty.t) (α : list Value.t) : M := + Definition max_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::num::MAX" |) |))) | _, _ => M.impossible @@ -56315,7 +61156,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition widening_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition widening_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -56326,16 +61167,20 @@ Module num. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast - (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 64 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 64 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -56354,7 +61199,7 @@ Module num. (wide as $SelfT, (wide >> $BITS) as $SelfT) } *) - Definition carrying_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition carrying_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs; carry ] => ltac:(M.monadic @@ -56369,19 +61214,23 @@ Module num. [ M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_mul", [] |), - [ M.rust_cast (M.read (| self |)); M.rust_cast (M.read (| rhs |)) ] + [ M.rust_cast (| M.read (| self |) |); M.rust_cast (| M.read (| rhs |) |) ] |); - M.rust_cast (M.read (| carry |)) + M.rust_cast (| M.read (| carry |) |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.rust_cast (M.read (| wide |)); - M.rust_cast - (BinOp.Panic.shr (| M.read (| wide |), Value.Integer Integer.I32 64 |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.rust_cast (| M.read (| wide |) |)); + A.to_value + (M.rust_cast (| + BinOp.Panic.shr (| M.read (| wide |), M.of_value (| Value.Integer 64 |) |) + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -56394,17 +61243,23 @@ Module num. ((self as $WideT + rhs as $WideT) / 2) as $SelfT } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - M.rust_cast - (BinOp.Panic.div (| - BinOp.Panic.add (| M.rust_cast (M.read (| self |)), M.rust_cast (M.read (| rhs |)) |), - Value.Integer Integer.U128 2 - |)))) + 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 |) |) + |), + M.of_value (| Value.Integer 2 |) + |) + |))) | _, _ => M.impossible end. @@ -56414,14 +61269,14 @@ Module num. usize::from_ne_bytes([x; mem::size_of::()]) } *) - Definition repeat_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition repeat_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "from_ne_bytes", [] |), - [ repeat (M.read (| x |)) 8 ] + [ repeat (| M.read (| x |), 8 |) ] |))) | _, _ => M.impossible end. @@ -56440,55 +61295,61 @@ Module num. r } *) - Definition repeat_u16 (τ : list Ty.t) (α : list Value.t) : M := + Definition repeat_u16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| - let r := M.alloc (| Value.Integer Integer.Usize 0 |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let r := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| i |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| i |), + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.write (| r, - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_shl", [] |), - [ M.read (| r |); Value.Integer Integer.U32 16 ] - |)) - (M.rust_cast (M.read (| x |))) + [ M.read (| r |); M.of_value (| Value.Integer 16 |) ] + |), + M.rust_cast (| M.read (| x |) |) + |) |) in let _ := let β := i in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 2 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 2 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -56496,7 +61357,7 @@ Module num. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -56562,7 +61423,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::FpCategory". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -56594,7 +61455,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::FpCategory". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -56621,7 +61482,7 @@ Module num. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -56649,12 +61510,12 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::FpCategory". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -56671,7 +61532,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::FpCategory". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -56688,23 +61549,23 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Nan" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Nan" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Infinite" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Infinite" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Zero" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Zero" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Subnormal" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Subnormal" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Normal" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Normal" |) |) |))) ] |) |) @@ -56735,14 +61596,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "isize" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -56767,14 +61628,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "i8" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -56799,14 +61660,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "i16" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -56831,14 +61692,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "i32" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -56863,14 +61724,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "i64" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -56895,14 +61756,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "i128" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -56927,14 +61788,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "usize" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -56959,14 +61820,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "u8" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -56991,14 +61852,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "u16" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -57023,14 +61884,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "u32" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -57055,14 +61916,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "u64" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -57087,14 +61948,14 @@ Module num. from_str_radix(src, 10) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic (let src := M.alloc (| src |) in M.call_closure (| M.get_function (| "core::num::from_str_radix", [ Ty.path "u128" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |))) | _, _ => M.impossible end. @@ -57113,16 +61974,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "i8" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -57131,7 +61991,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57139,7 +61999,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i8", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57149,7 +62009,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57157,7 +62017,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i8", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57167,7 +62027,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57175,7 +62035,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i8", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57200,16 +62060,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "i16" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -57218,7 +62077,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57226,7 +62085,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i16", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57236,7 +62095,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57244,7 +62103,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i16", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57254,7 +62113,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57262,7 +62121,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i16", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57287,16 +62146,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "i32" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -57305,7 +62163,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57313,7 +62171,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i32", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57323,7 +62181,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57331,7 +62189,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i32", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57341,7 +62199,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57349,7 +62207,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i32", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57374,16 +62232,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "i64" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -57392,7 +62249,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57400,7 +62257,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i64", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57410,7 +62267,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57418,7 +62275,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i64", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57428,7 +62285,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57436,7 +62293,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i64", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57461,16 +62318,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "i128" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -57479,7 +62335,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57487,7 +62343,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57497,7 +62353,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57505,7 +62361,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57515,7 +62371,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57523,7 +62379,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "i128", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57548,16 +62404,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "isize" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -57566,7 +62421,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57574,7 +62429,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "isize", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57584,7 +62439,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57592,7 +62447,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "isize", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57602,7 +62457,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57610,7 +62465,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "isize", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57635,16 +62490,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "u8" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -57653,7 +62507,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57661,7 +62515,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57671,7 +62525,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57679,7 +62533,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57689,7 +62543,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57697,7 +62551,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u8", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57722,16 +62576,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "u16" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -57740,7 +62593,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57748,7 +62601,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57758,7 +62611,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57766,7 +62619,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57776,7 +62629,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57784,7 +62637,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u16", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57809,11 +62662,10 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "u32" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic @@ -57827,7 +62679,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57845,7 +62697,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57863,7 +62715,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57896,16 +62748,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "u64" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -57914,7 +62765,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57922,7 +62773,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57932,7 +62783,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57940,7 +62791,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57950,7 +62801,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -57958,7 +62809,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u64", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -57983,16 +62834,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "u128" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -58001,7 +62851,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58009,7 +62859,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -58019,7 +62869,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58027,7 +62877,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -58037,7 +62887,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58045,7 +62895,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "u128", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -58070,16 +62920,15 @@ Module num. (* const MIN: Self = Self::MIN; *) (* Ty.path "usize" *) - Definition value_MIN : Value.t := - M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). (* fn from_u32(u: u32) -> Self { u as Self } *) - Definition from_u32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_u32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u ] => ltac:(M.monadic (let u := M.alloc (| u |) in - M.rust_cast (M.read (| u |)))) + M.rust_cast (| M.read (| u |) |))) | _, _ => M.impossible end. @@ -58088,7 +62937,7 @@ Module num. Self::checked_mul( *self, other as Self) } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58096,7 +62945,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "checked_mul", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -58106,7 +62955,7 @@ Module num. Self::checked_sub( *self, other as Self) } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58114,7 +62963,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "checked_sub", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -58124,7 +62973,7 @@ Module num. Self::checked_add( *self, other as Self) } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -58132,7 +62981,7 @@ Module num. let other := M.alloc (| other |) in M.call_closure (| M.get_associated_function (| Ty.path "usize", "checked_add", [] |), - [ M.read (| M.read (| self |) |); M.rust_cast (M.read (| other |)) ] + [ M.read (| M.read (| self |) |); M.rust_cast (| M.read (| other |) |) ] |))) | _, _ => M.impossible end. @@ -58157,7 +63006,7 @@ Module num. radix <= 16 && digits.len() <= mem::size_of::() * 2 - is_signed_ty as usize } *) - Definition can_not_overflow (τ : list Ty.t) (α : list Value.t) : M := + Definition can_not_overflow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ radix; is_signed_ty; digits ] => ltac:(M.monadic @@ -58165,24 +63014,27 @@ Module num. let is_signed_ty := M.alloc (| is_signed_ty |) in let digits := M.alloc (| digits |) in LogicalOp.and (| - BinOp.Pure.le (M.read (| radix |)) (Value.Integer Integer.U32 16), + BinOp.Pure.le (| M.read (| radix |), M.of_value (| Value.Integer 16 |) |), ltac:(M.monadic - (BinOp.Pure.le - (M.call_closure (| + (BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| digits |) ] - |)) - (BinOp.Panic.sub (| + |), + BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.mul (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |), - M.rust_cast (M.read (| is_signed_ty |)) - |)))) + M.rust_cast (| M.read (| is_signed_ty |) |) + |) + |))) |))) | _, _ => M.impossible end. @@ -58274,7 +63126,7 @@ Module num. Ok(result) } *) - Definition from_str_radix (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str_radix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src; radix ] => ltac:(M.monadic @@ -58285,15 +63137,15 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ops::range::RangeInclusive") @@ -58311,13 +63163,16 @@ Module num. "new", [] |), - [ Value.Integer Integer.U32 2; Value.Integer Integer.U32 36 + [ + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 36 |) ] |) |); radix ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -58334,43 +63189,53 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "from_str_radix_int: must lie in the range `[2, 36]` - found " - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "from_str_radix_int: must lie in the range `[2, 36]` - found " + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ radix ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ radix ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -58388,23 +63253,31 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::Empty" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::IntErrorKind::Empty" + [] + |))) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let is_signed_ty := @@ -58421,7 +63294,7 @@ Module num. "from_u32", [] |), - [ Value.Integer Integer.U32 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |); M.get_constant (| "core::num::FromStrRadixHelper::MIN" |) @@ -58439,7 +63312,7 @@ Module num. M.match_operator (| M.SubPointer.get_array_field (| M.read (| src |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |), [ fun γ => @@ -58452,20 +63325,20 @@ Module num. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U8 43 + Value.Integer 43 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.U8 45 + Value.Integer 45 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => @@ -58492,9 +63365,14 @@ Module num. |), [ M.read (| src |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 1 |))) + ] + |) ] |) ] @@ -58509,95 +63387,118 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::InvalidDigit" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::IntErrorKind::InvalidDigit" + [] + |))) + ] + |)) + ] + |) |) |) |) |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 43 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 43 |) in M.alloc (| - Value.Tuple - [ - Value.Bool true; - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| src |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Bool true |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| src |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 45 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 45 |) in let γ := is_signed_ty in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Bool false; - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| src |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Bool false |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| src |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [ Value.Bool true; M.read (| src |) ] |))) + (M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Bool true |)); + A.to_value (M.read (| src |)) + ] + |) + |))) ] |), [ @@ -58617,12 +63518,12 @@ Module num. "from_u32", [] |), - [ Value.Integer Integer.U32 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -58645,7 +63546,7 @@ Module num. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -58781,23 +63682,29 @@ Module num. [] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| c - |)); + |) + |); M.read (| radix |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::InvalidDigit" - []) - ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::IntErrorKind::InvalidDigit" + [] + |))) + ] + |) ] |) ] @@ -58893,10 +63800,14 @@ Module num. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)))); @@ -59028,273 +63939,289 @@ Module num. [] |), [ - 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.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 mul := - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::num::FromStrRadixHelper", - T, - [], - "checked_mul", - [] - |), - [ result; 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 (| + M.rust_cast (| + M.read (| c - |)); + |) + |); M.read (| radix |) ] |); - Value.StructRecord + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + 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 (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + |))) + ] + |)))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| M.of_value (| 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.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 mul := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::num::FromStrRadixHelper", + T, + [], + "checked_mul", + [] + |), + [ result; 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", + [] + |), [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::InvalidDigit" - []) + M.rust_cast (| + M.read (| + c + |) + |); + M.read (| + radix + |) ] + |); + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::IntErrorKind::InvalidDigit" + [] + |))) + ] + |) ] |) ] @@ -59409,8 +64336,8 @@ Module num. M.read (| mul |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with @@ -59424,19 +64351,25 @@ Module num. fun γ => ltac:(M.monadic - (Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::PosOverflow" - []) - ])) + (M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::IntErrorKind::PosOverflow" + [] + |))) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -59568,8 +64501,8 @@ Module num. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with @@ -59583,19 +64516,25 @@ Module num. fun γ => ltac:(M.monadic - (Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::PosOverflow" - []) - ])) + (M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::IntErrorKind::PosOverflow" + [] + |))) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -59670,10 +64609,14 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)))); @@ -59793,23 +64736,29 @@ Module num. [] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| c - |)); + |) + |); M.read (| radix |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::InvalidDigit" - []) - ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::IntErrorKind::InvalidDigit" + [] + |))) + ] + |) ] |) ] @@ -59924,8 +64873,8 @@ Module num. M.read (| mul |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with @@ -59939,19 +64888,25 @@ Module num. fun γ => ltac:(M.monadic - (Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::NegOverflow" - []) - ])) + (M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::IntErrorKind::NegOverflow" + [] + |))) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -60083,8 +65038,8 @@ Module num. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with @@ -60098,19 +65053,25 @@ Module num. fun γ => ltac:(M.monadic - (Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::NegOverflow" - []) - ])) + (M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::error::IntErrorKind::NegOverflow" + [] + |))) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -60185,20 +65146,28 @@ Module num. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| result |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| result |)) ] + |) |))) ] |) diff --git a/CoqOfRust/core/num/nonzero.v b/CoqOfRust/core/num/nonzero.v index feadc86ce..06a669749 100644 --- a/CoqOfRust/core/num/nonzero.v +++ b/CoqOfRust/core/num/nonzero.v @@ -25,14 +25,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU8". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -62,15 +62,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU8". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -100,27 +100,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU8". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroU8", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroU8", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -136,7 +137,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU8". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -172,7 +173,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU8". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -214,7 +215,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU8". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -257,7 +258,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -265,25 +266,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.U8 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -306,30 +309,41 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroU8::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroU8::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroU8" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::nonzero::NonZeroU8" [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -347,31 +361,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.U8 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroU8" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroU8" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -385,7 +410,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -403,13 +428,13 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u8" ] |), [ M.read (| @@ -421,7 +446,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -434,13 +460,13 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "u8" ] |), [ M.read (| @@ -452,7 +478,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -474,7 +501,7 @@ Module num. } } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -482,7 +509,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -511,22 +538,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU8", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU8", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -547,7 +579,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_add(other)) } } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -588,7 +620,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_add(other)) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -634,14 +666,14 @@ Module num. } } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -673,22 +705,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU8", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU8", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -703,15 +740,17 @@ Module num. Self::BITS - 1 - self.leading_zeros() } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ 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 Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), M.call_closure (| M.get_associated_function (| @@ -732,7 +771,7 @@ Module num. super::int_log10::$Int(self.0) } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -759,7 +798,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().midpoint(rhs.get())) } } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -815,7 +854,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -823,7 +862,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -859,22 +898,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU8", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU8", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -896,7 +940,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -944,7 +988,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1002,7 +1046,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1010,7 +1054,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1039,22 +1083,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU8", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU8", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1076,7 +1125,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1120,13 +1169,13 @@ Module num. intrinsics::ctpop(self.get()) < 2 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u8" ] |), [ M.call_closure (| @@ -1138,8 +1187,9 @@ Module num. [ M.read (| self |) ] |) ] - |)) - (Value.Integer Integer.U8 2))) + |), + M.of_value (| Value.Integer 2 |) + |))) | _, _ => M.impossible end. @@ -1147,7 +1197,7 @@ Module num. M.IsAssociatedFunction Self "is_power_of_two" is_power_of_two. (* pub const MIN: Self = Self::new(1).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU8" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -1166,7 +1216,7 @@ Module num. "new", [] |), - [ Value.Integer Integer.U8 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -1176,7 +1226,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU8" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -1204,7 +1254,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -1218,7 +1268,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -1250,7 +1300,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1263,23 +1313,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU8", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU8", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1308,7 +1359,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1321,16 +1372,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU8", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -1359,7 +1411,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1372,16 +1424,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU8", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1404,7 +1457,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1425,7 +1478,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1446,7 +1499,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1467,7 +1520,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1488,7 +1541,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1529,7 +1582,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1570,7 +1623,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1611,7 +1664,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1652,7 +1705,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1693,7 +1746,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1748,14 +1801,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU16". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -1785,15 +1838,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU16". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -1823,27 +1876,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU16". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroU16", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroU16", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -1859,7 +1913,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU16". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1895,7 +1949,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU16". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1937,7 +1991,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU16". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -1980,7 +2034,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -1988,25 +2042,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.U16 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2029,30 +2085,41 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroU16::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroU16::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroU16" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::nonzero::NonZeroU16" [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -2070,31 +2137,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.U16 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroU16" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroU16" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2108,7 +2186,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2126,13 +2204,13 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u16" ] |), [ M.read (| @@ -2144,7 +2222,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -2157,13 +2236,13 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "u16" ] |), [ M.read (| @@ -2175,7 +2254,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -2197,7 +2277,7 @@ Module num. } } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2205,7 +2285,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2234,22 +2314,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU16", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU16", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2270,7 +2355,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_add(other)) } } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2311,7 +2396,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_add(other)) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2357,14 +2442,14 @@ Module num. } } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2396,22 +2481,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU16", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU16", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2426,15 +2516,17 @@ Module num. Self::BITS - 1 - self.leading_zeros() } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ 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 Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), M.call_closure (| M.get_associated_function (| @@ -2455,7 +2547,7 @@ Module num. super::int_log10::$Int(self.0) } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2486,7 +2578,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().midpoint(rhs.get())) } } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2542,7 +2634,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2550,7 +2642,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2586,22 +2678,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU16", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU16", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2623,7 +2720,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2671,7 +2768,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2729,7 +2826,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2737,7 +2834,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2766,22 +2863,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU16", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU16", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2803,7 +2905,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2847,13 +2949,13 @@ Module num. intrinsics::ctpop(self.get()) < 2 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u16" ] |), [ M.call_closure (| @@ -2865,8 +2967,9 @@ Module num. [ M.read (| self |) ] |) ] - |)) - (Value.Integer Integer.U16 2))) + |), + M.of_value (| Value.Integer 2 |) + |))) | _, _ => M.impossible end. @@ -2874,7 +2977,7 @@ Module num. M.IsAssociatedFunction Self "is_power_of_two" is_power_of_two. (* pub const MIN: Self = Self::new(1).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU16" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -2893,7 +2996,7 @@ Module num. "new", [] |), - [ Value.Integer Integer.U16 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -2903,7 +3006,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU16" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -2931,7 +3034,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -2945,7 +3048,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -2977,7 +3080,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2990,23 +3093,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU16", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU16", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -3035,7 +3139,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -3048,16 +3152,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU16", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -3086,7 +3191,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -3099,16 +3204,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU16", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -3131,7 +3237,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -3152,7 +3258,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3173,7 +3279,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -3194,7 +3300,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3215,7 +3321,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3256,7 +3362,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3297,7 +3403,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3338,7 +3444,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3379,7 +3485,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3420,7 +3526,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3475,14 +3581,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU32". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -3512,15 +3618,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU32". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -3550,27 +3656,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU32". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroU32", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroU32", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -3586,7 +3693,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU32". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3622,7 +3729,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU32". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3664,7 +3771,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU32". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -3707,7 +3814,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -3715,25 +3822,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.U32 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3756,30 +3865,41 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroU32::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroU32::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroU32" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::nonzero::NonZeroU32" [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -3797,31 +3917,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.U32 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroU32" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroU32" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3835,7 +3966,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3853,7 +3984,7 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3888,7 +4019,7 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3932,7 +4063,7 @@ Module num. } } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3940,7 +4071,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3969,22 +4100,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU32", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU32", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4005,7 +4141,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_add(other)) } } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4046,7 +4182,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_add(other)) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4092,14 +4228,14 @@ Module num. } } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4131,22 +4267,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU32", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU32", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4161,15 +4302,17 @@ Module num. Self::BITS - 1 - self.leading_zeros() } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ 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 Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), M.call_closure (| M.get_associated_function (| @@ -4190,7 +4333,7 @@ Module num. super::int_log10::$Int(self.0) } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4221,7 +4364,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().midpoint(rhs.get())) } } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4277,7 +4420,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4285,7 +4428,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4321,22 +4464,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU32", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU32", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4358,7 +4506,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4406,7 +4554,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4464,7 +4612,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4472,7 +4620,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4501,22 +4649,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU32", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU32", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -4538,7 +4691,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4582,13 +4735,13 @@ Module num. intrinsics::ctpop(self.get()) < 2 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u32" ] |), [ M.call_closure (| @@ -4600,8 +4753,9 @@ Module num. [ M.read (| self |) ] |) ] - |)) - (Value.Integer Integer.U32 2))) + |), + M.of_value (| Value.Integer 2 |) + |))) | _, _ => M.impossible end. @@ -4609,7 +4763,7 @@ Module num. M.IsAssociatedFunction Self "is_power_of_two" is_power_of_two. (* pub const MIN: Self = Self::new(1).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU32" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -4628,7 +4782,7 @@ Module num. "new", [] |), - [ Value.Integer Integer.U32 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -4638,7 +4792,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU32" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -4666,7 +4820,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -4680,7 +4834,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -4712,7 +4866,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4725,23 +4879,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU32", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU32", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -4770,7 +4925,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4783,16 +4938,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU32", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -4821,7 +4977,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4834,16 +4990,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU32", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -4866,7 +5023,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4887,7 +5044,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4908,7 +5065,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4929,7 +5086,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4950,7 +5107,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4991,7 +5148,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5032,7 +5189,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5073,7 +5230,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5114,7 +5271,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5155,7 +5312,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5210,14 +5367,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU64". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -5247,15 +5404,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU64". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -5285,27 +5442,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU64". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroU64", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroU64", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -5321,7 +5479,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU64". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5357,7 +5515,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU64". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5399,7 +5557,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU64". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -5442,7 +5600,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -5450,25 +5608,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.U64 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5491,30 +5651,41 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroU64::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroU64::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroU64" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::nonzero::NonZeroU64" [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -5532,31 +5703,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.U64 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroU64" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroU64" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5570,7 +5752,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5588,13 +5770,13 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u64" ] |), [ M.read (| @@ -5606,7 +5788,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -5619,13 +5802,13 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "u64" ] |), [ M.read (| @@ -5637,7 +5820,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -5659,7 +5843,7 @@ Module num. } } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5667,7 +5851,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5696,22 +5880,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU64", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU64", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5732,7 +5921,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_add(other)) } } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5773,7 +5962,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_add(other)) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5819,14 +6008,14 @@ Module num. } } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5858,22 +6047,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU64", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU64", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5888,15 +6082,17 @@ Module num. Self::BITS - 1 - self.leading_zeros() } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ 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 Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), M.call_closure (| M.get_associated_function (| @@ -5917,7 +6113,7 @@ Module num. super::int_log10::$Int(self.0) } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5948,7 +6144,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().midpoint(rhs.get())) } } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6004,7 +6200,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6012,7 +6208,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6048,24 +6244,29 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU64", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) - ] - |) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU64", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) + ] + |) |))) | _, _ => M.impossible end. @@ -6085,7 +6286,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6133,7 +6334,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6191,7 +6392,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6199,7 +6400,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6228,22 +6429,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU64", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU64", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -6265,7 +6471,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6309,13 +6515,13 @@ Module num. intrinsics::ctpop(self.get()) < 2 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u64" ] |), [ M.call_closure (| @@ -6327,8 +6533,9 @@ Module num. [ M.read (| self |) ] |) ] - |)) - (Value.Integer Integer.U64 2))) + |), + M.of_value (| Value.Integer 2 |) + |))) | _, _ => M.impossible end. @@ -6336,7 +6543,7 @@ Module num. M.IsAssociatedFunction Self "is_power_of_two" is_power_of_two. (* pub const MIN: Self = Self::new(1).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU64" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -6355,7 +6562,7 @@ Module num. "new", [] |), - [ Value.Integer Integer.U64 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -6365,7 +6572,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU64" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -6393,7 +6600,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -6407,7 +6614,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -6439,7 +6646,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6452,23 +6659,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU64", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU64", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -6497,7 +6705,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6510,16 +6718,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU64", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -6548,7 +6757,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6561,16 +6770,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU64", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -6593,7 +6803,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6614,7 +6824,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6635,7 +6845,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -6656,7 +6866,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6677,7 +6887,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6718,7 +6928,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6759,7 +6969,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6800,7 +7010,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6841,7 +7051,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6882,7 +7092,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6937,14 +7147,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU128". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -6974,15 +7184,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU128". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -7012,27 +7222,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU128". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroU128", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroU128", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -7048,7 +7259,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU128". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7084,7 +7295,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU128". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7126,7 +7337,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroU128". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -7169,7 +7380,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -7177,25 +7388,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.U128 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7218,30 +7431,43 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroU128::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroU128::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroU128" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroU128" + [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -7259,31 +7485,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.U128 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroU128" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroU128" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7297,7 +7534,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7315,13 +7552,13 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u128" ] |), [ M.read (| @@ -7333,7 +7570,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -7346,13 +7584,13 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "u128" ] |), [ M.read (| @@ -7364,7 +7602,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -7386,7 +7625,7 @@ Module num. } } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7394,7 +7633,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7423,22 +7662,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU128", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU128", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7459,7 +7703,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_add(other)) } } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7500,7 +7744,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_add(other)) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7546,14 +7790,14 @@ Module num. } } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7585,22 +7829,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU128", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU128", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7615,15 +7864,17 @@ Module num. Self::BITS - 1 - self.leading_zeros() } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ 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 Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), M.call_closure (| M.get_associated_function (| @@ -7644,7 +7895,7 @@ Module num. super::int_log10::$Int(self.0) } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7675,7 +7926,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().midpoint(rhs.get())) } } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -7731,7 +7982,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7739,7 +7990,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7775,22 +8026,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU128", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU128", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7812,7 +8068,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7860,7 +8116,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7918,7 +8174,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7926,7 +8182,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7955,22 +8211,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroU128", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroU128", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7992,7 +8253,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8036,13 +8297,13 @@ Module num. intrinsics::ctpop(self.get()) < 2 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "u128" ] |), [ M.call_closure (| @@ -8054,8 +8315,9 @@ Module num. [ M.read (| self |) ] |) ] - |)) - (Value.Integer Integer.U128 2))) + |), + M.of_value (| Value.Integer 2 |) + |))) | _, _ => M.impossible end. @@ -8063,7 +8325,7 @@ Module num. M.IsAssociatedFunction Self "is_power_of_two" is_power_of_two. (* pub const MIN: Self = Self::new(1).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU128" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -8082,7 +8344,7 @@ Module num. "new", [] |), - [ Value.Integer Integer.U128 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -8092,7 +8354,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroU128" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -8120,7 +8382,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -8134,7 +8396,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -8170,7 +8432,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8183,23 +8445,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU128", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU128", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -8228,7 +8491,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8241,16 +8504,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU128", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -8279,7 +8543,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8292,16 +8556,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU128", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -8324,7 +8589,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8345,7 +8610,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8366,7 +8631,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -8387,7 +8652,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8408,7 +8673,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8449,7 +8714,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8490,7 +8755,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8531,7 +8796,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8572,7 +8837,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8613,7 +8878,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8668,14 +8933,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroUsize". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -8705,15 +8970,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroUsize". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -8743,27 +9008,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroUsize". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroUsize", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroUsize", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -8779,7 +9045,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroUsize". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8815,7 +9081,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroUsize". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8857,7 +9123,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroUsize". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -8900,7 +9166,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -8908,25 +9174,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8949,30 +9217,43 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroUsize::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroUsize::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroUsize" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroUsize" + [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -8990,32 +9271,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroUsize" [ M.read (| n |) ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroUsize" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -9029,7 +9320,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9047,13 +9338,13 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "usize" ] |), [ M.read (| @@ -9065,7 +9356,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -9078,13 +9370,13 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "usize" ] |), [ M.read (| @@ -9096,7 +9388,8 @@ Module num. |)) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -9118,7 +9411,7 @@ Module num. } } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9126,7 +9419,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9155,22 +9448,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -9191,7 +9489,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_add(other)) } } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9232,7 +9530,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_add(other)) } } *) - Definition unchecked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9278,14 +9576,14 @@ Module num. } } *) - Definition checked_next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9317,22 +9615,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -9347,15 +9650,17 @@ Module num. Self::BITS - 1 - self.leading_zeros() } *) - Definition ilog2 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ 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 Integer.U32 1 + M.of_value (| Value.Integer 1 |) |), M.call_closure (| M.get_associated_function (| @@ -9376,7 +9681,7 @@ Module num. super::int_log10::$Int(self.0) } *) - Definition ilog10 (τ : list Ty.t) (α : list Value.t) : M := + Definition ilog10 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9407,7 +9712,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().midpoint(rhs.get())) } } *) - Definition midpoint (τ : list Ty.t) (α : list Value.t) : M := + Definition midpoint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -9463,7 +9768,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9471,7 +9776,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9507,22 +9812,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -9544,7 +9854,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9592,7 +9902,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9650,7 +9960,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9658,7 +9968,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9687,22 +9997,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -9724,7 +10039,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9768,13 +10083,13 @@ Module num. intrinsics::ctpop(self.get()) < 2 } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_function (| "core::intrinsics::ctpop", [ Ty.path "usize" ] |), [ M.call_closure (| @@ -9786,8 +10101,9 @@ Module num. [ M.read (| self |) ] |) ] - |)) - (Value.Integer Integer.Usize 2))) + |), + M.of_value (| Value.Integer 2 |) + |))) | _, _ => M.impossible end. @@ -9795,7 +10111,7 @@ Module num. M.IsAssociatedFunction Self "is_power_of_two" is_power_of_two. (* pub const MIN: Self = Self::new(1).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroUsize" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -9814,7 +10130,7 @@ Module num. "new", [] |), - [ Value.Integer Integer.Usize 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -9824,7 +10140,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroUsize" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -9852,7 +10168,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -9866,7 +10182,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -9902,7 +10218,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -9915,23 +10231,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -9960,7 +10277,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -9973,16 +10290,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -10011,7 +10329,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10024,16 +10342,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -10056,7 +10375,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10077,7 +10396,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10098,7 +10417,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -10119,7 +10438,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10140,7 +10459,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10181,7 +10500,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10222,7 +10541,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10263,7 +10582,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10304,7 +10623,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10345,7 +10664,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10400,14 +10719,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI8". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -10437,15 +10756,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI8". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -10475,27 +10794,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI8". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroI8", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroI8", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -10511,7 +10831,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI8". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10547,7 +10867,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI8". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10589,7 +10909,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI8". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -10632,7 +10952,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -10640,25 +10960,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.I8 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10681,30 +11003,41 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroI8::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroI8::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroI8" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::nonzero::NonZeroI8" [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -10722,31 +11055,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.I8 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroI8" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroI8" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -10760,7 +11104,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10778,25 +11122,27 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u8" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI8", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -10809,25 +11155,27 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "u8" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI8", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -10839,7 +11187,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().abs()) } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10881,14 +11229,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10916,22 +11264,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI8", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI8", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -10950,7 +11303,7 @@ Module num. ) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10980,18 +11333,21 @@ Module num. let nz := M.copy (| γ0_0 |) in let flag := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI8", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |); - M.read (| flag |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI8", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)); + A.to_value (M.read (| flag |)) + ] + |) |))) ] |) @@ -11008,7 +11364,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_abs()) } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11047,7 +11403,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().wrapping_abs()) } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11086,7 +11442,7 @@ Module num. unsafe { $Uty::new_unchecked(self.get().unsigned_abs()) } } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11124,7 +11480,7 @@ Module num. self.get().is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11152,7 +11508,7 @@ Module num. self.get().is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11184,7 +11540,7 @@ Module num. None } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11194,7 +11550,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11225,26 +11581,29 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI8", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI8", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -11259,7 +11618,7 @@ Module num. ((unsafe { $Ty::new_unchecked(result) }), overflow) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11289,18 +11648,21 @@ Module num. let result := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI8", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |); - M.read (| overflow |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI8", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)); + A.to_value (M.read (| overflow |)) + ] + |) |))) ] |) @@ -11319,7 +11681,7 @@ Module num. $Ty::MAX } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11329,7 +11691,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11354,7 +11716,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| result |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.get_constant (| "core::num::nonzero::MAX" |) @@ -11373,7 +11735,7 @@ Module num. unsafe { $Ty::new_unchecked(result) } } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11427,7 +11789,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11435,7 +11797,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11471,22 +11833,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI8", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI8", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -11508,7 +11875,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11556,7 +11923,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11614,7 +11981,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11622,7 +11989,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11651,22 +12018,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI8", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI8", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -11688,7 +12060,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11724,7 +12096,7 @@ Module num. M.IsAssociatedFunction Self "saturating_pow" saturating_pow. (* pub const MIN: Self = Self::new(<$Int>::MIN).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI8" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -11753,7 +12125,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI8" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -11781,7 +12153,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -11795,7 +12167,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -11827,7 +12199,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11840,23 +12212,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI8", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI8", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -11885,7 +12258,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11898,16 +12271,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI8", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -11936,7 +12310,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -11949,16 +12323,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI8", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -11981,7 +12356,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12002,7 +12377,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12023,7 +12398,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -12044,7 +12419,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12065,7 +12440,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12106,7 +12481,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12147,7 +12522,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12188,7 +12563,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12229,7 +12604,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12270,7 +12645,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12325,14 +12700,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI16". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -12362,15 +12737,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI16". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -12400,27 +12775,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI16". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroI16", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroI16", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -12436,7 +12812,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI16". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12472,7 +12848,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI16". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12514,7 +12890,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI16". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -12557,7 +12933,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -12565,25 +12941,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.I16 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12606,30 +12984,41 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroI16::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroI16::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroI16" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::nonzero::NonZeroI16" [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -12647,31 +13036,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.I16 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroI16" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroI16" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -12685,7 +13085,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -12703,25 +13103,27 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u16" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI16", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -12734,25 +13136,27 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "u16" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI16", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -12764,7 +13168,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().abs()) } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -12806,14 +13210,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12841,22 +13245,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI16", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI16", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -12875,7 +13284,7 @@ Module num. ) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -12905,18 +13314,21 @@ Module num. let nz := M.copy (| γ0_0 |) in let flag := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI16", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |); - M.read (| flag |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI16", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)); + A.to_value (M.read (| flag |)) + ] + |) |))) ] |) @@ -12933,7 +13345,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_abs()) } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -12972,7 +13384,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().wrapping_abs()) } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13011,7 +13423,7 @@ Module num. unsafe { $Uty::new_unchecked(self.get().unsigned_abs()) } } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13049,7 +13461,7 @@ Module num. self.get().is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13077,7 +13489,7 @@ Module num. self.get().is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13109,7 +13521,7 @@ Module num. None } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13119,7 +13531,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13150,26 +13562,29 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI16", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI16", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -13184,7 +13599,7 @@ Module num. ((unsafe { $Ty::new_unchecked(result) }), overflow) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13214,18 +13629,21 @@ Module num. let result := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI16", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |); - M.read (| overflow |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI16", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)); + A.to_value (M.read (| overflow |)) + ] + |) |))) ] |) @@ -13244,7 +13662,7 @@ Module num. $Ty::MAX } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13254,7 +13672,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13279,7 +13697,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| result |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.get_constant (| "core::num::nonzero::MAX" |) @@ -13298,7 +13716,7 @@ Module num. unsafe { $Ty::new_unchecked(result) } } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13352,7 +13770,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13360,7 +13778,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13396,22 +13814,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI16", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI16", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -13433,7 +13856,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13481,7 +13904,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13539,7 +13962,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13547,7 +13970,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13576,22 +13999,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI16", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI16", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -13613,7 +14041,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13649,7 +14077,7 @@ Module num. M.IsAssociatedFunction Self "saturating_pow" saturating_pow. (* pub const MIN: Self = Self::new(<$Int>::MIN).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI16" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -13678,7 +14106,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI16" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -13706,7 +14134,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -13720,7 +14148,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -13752,7 +14180,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -13765,23 +14193,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI16", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI16", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -13810,7 +14239,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -13823,16 +14252,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI16", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -13861,7 +14291,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -13874,16 +14304,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI16", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -13906,7 +14337,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -13927,7 +14358,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13948,7 +14379,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -13969,7 +14400,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13990,7 +14421,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -14031,7 +14462,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -14072,7 +14503,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -14113,7 +14544,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -14154,7 +14585,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -14195,7 +14626,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -14250,14 +14681,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI32". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -14287,15 +14718,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI32". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -14325,27 +14756,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI32". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroI32", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroI32", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -14361,7 +14793,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI32". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14397,7 +14829,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI32". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14439,7 +14871,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI32". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -14482,7 +14914,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -14490,25 +14922,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.I32 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14531,30 +14965,41 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroI32::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroI32::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroI32" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::nonzero::NonZeroI32" [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -14572,31 +15017,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.I32 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroI32" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroI32" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -14610,7 +15066,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14628,7 +15084,7 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14639,14 +15095,15 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u32" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI32", 0 |) - |)) + |) + |) ] |) |)) @@ -14663,7 +15120,7 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14674,14 +15131,15 @@ Module num. M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "u32" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI32", 0 |) - |)) + |) + |) ] |) |)) @@ -14697,7 +15155,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().abs()) } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14739,14 +15197,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14774,22 +15232,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI32", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI32", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -14808,7 +15271,7 @@ Module num. ) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14838,18 +15301,21 @@ Module num. let nz := M.copy (| γ0_0 |) in let flag := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI32", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |); - M.read (| flag |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI32", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)); + A.to_value (M.read (| flag |)) + ] + |) |))) ] |) @@ -14866,7 +15332,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_abs()) } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14905,7 +15371,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().wrapping_abs()) } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14944,7 +15410,7 @@ Module num. unsafe { $Uty::new_unchecked(self.get().unsigned_abs()) } } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14982,7 +15448,7 @@ Module num. self.get().is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15010,7 +15476,7 @@ Module num. self.get().is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15042,7 +15508,7 @@ Module num. None } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15052,7 +15518,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15083,26 +15549,29 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI32", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI32", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -15117,7 +15586,7 @@ Module num. ((unsafe { $Ty::new_unchecked(result) }), overflow) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15147,18 +15616,21 @@ Module num. let result := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI32", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |); - M.read (| overflow |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI32", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)); + A.to_value (M.read (| overflow |)) + ] + |) |))) ] |) @@ -15177,7 +15649,7 @@ Module num. $Ty::MAX } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15187,7 +15659,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15212,7 +15684,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| result |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.get_constant (| "core::num::nonzero::MAX" |) @@ -15231,7 +15703,7 @@ Module num. unsafe { $Ty::new_unchecked(result) } } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15285,7 +15757,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15293,7 +15765,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15329,22 +15801,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI32", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI32", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -15366,7 +15843,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15414,7 +15891,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15472,7 +15949,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15480,7 +15957,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15509,22 +15986,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI32", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI32", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -15546,7 +16028,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15582,7 +16064,7 @@ Module num. M.IsAssociatedFunction Self "saturating_pow" saturating_pow. (* pub const MIN: Self = Self::new(<$Int>::MIN).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI32" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -15611,7 +16093,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI32" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -15639,7 +16121,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -15653,7 +16135,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -15685,7 +16167,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15698,23 +16180,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI32", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI32", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -15743,7 +16226,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15756,16 +16239,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI32", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -15794,7 +16278,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15807,16 +16291,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI32", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -15839,7 +16324,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15860,7 +16345,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15881,7 +16366,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -15902,7 +16387,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15923,7 +16408,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -15964,7 +16449,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -16005,7 +16490,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -16046,7 +16531,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -16087,7 +16572,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -16128,7 +16613,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -16183,14 +16668,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI64". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -16220,15 +16705,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI64". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -16258,27 +16743,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI64". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroI64", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroI64", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -16294,7 +16780,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI64". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16330,7 +16816,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI64". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16372,7 +16858,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI64". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -16415,7 +16901,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -16423,25 +16909,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.I64 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16464,30 +16952,41 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroI64::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroI64::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroI64" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::num::nonzero::NonZeroI64" [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -16505,31 +17004,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.I64 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroI64" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroI64" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -16543,7 +17053,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16561,25 +17071,27 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u64" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI64", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -16592,25 +17104,27 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "u64" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI64", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -16622,7 +17136,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().abs()) } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16664,14 +17178,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16699,22 +17213,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI64", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI64", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -16733,7 +17252,7 @@ Module num. ) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16762,19 +17281,22 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let nz := M.copy (| γ0_0 |) in let flag := M.copy (| γ0_1 |) in - M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI64", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |); - M.read (| flag |) - ] + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI64", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)); + A.to_value (M.read (| flag |)) + ] + |) |))) ] |) @@ -16791,7 +17313,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_abs()) } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16830,7 +17352,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().wrapping_abs()) } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16869,7 +17391,7 @@ Module num. unsafe { $Uty::new_unchecked(self.get().unsigned_abs()) } } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16907,7 +17429,7 @@ Module num. self.get().is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16935,7 +17457,7 @@ Module num. self.get().is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16967,7 +17489,7 @@ Module num. None } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16977,7 +17499,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -17008,26 +17530,29 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI64", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI64", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -17042,7 +17567,7 @@ Module num. ((unsafe { $Ty::new_unchecked(result) }), overflow) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17072,18 +17597,21 @@ Module num. let result := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI64", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |); - M.read (| overflow |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI64", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)); + A.to_value (M.read (| overflow |)) + ] + |) |))) ] |) @@ -17102,7 +17630,7 @@ Module num. $Ty::MAX } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17112,7 +17640,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -17137,7 +17665,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| result |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.get_constant (| "core::num::nonzero::MAX" |) @@ -17156,7 +17684,7 @@ Module num. unsafe { $Ty::new_unchecked(result) } } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17210,7 +17738,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17218,7 +17746,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -17254,22 +17782,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI64", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI64", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -17291,7 +17824,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17339,7 +17872,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17397,7 +17930,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17405,7 +17938,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -17434,22 +17967,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI64", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI64", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -17471,7 +18009,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17507,7 +18045,7 @@ Module num. M.IsAssociatedFunction Self "saturating_pow" saturating_pow. (* pub const MIN: Self = Self::new(<$Int>::MIN).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI64" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -17536,7 +18074,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI64" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -17564,7 +18102,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -17578,7 +18116,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -17610,7 +18148,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17623,23 +18161,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI64", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI64", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -17668,7 +18207,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17681,16 +18220,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI64", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -17719,7 +18259,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17732,16 +18272,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI64", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -17764,7 +18305,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17785,7 +18326,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17806,7 +18347,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -17827,7 +18368,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17848,7 +18389,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -17889,7 +18430,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -17930,7 +18471,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -17971,7 +18512,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -18012,7 +18553,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -18053,7 +18594,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -18108,14 +18649,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI128". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -18145,15 +18686,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI128". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -18183,27 +18724,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI128". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroI128", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroI128", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -18219,7 +18761,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI128". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18255,7 +18797,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI128". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18297,7 +18839,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroI128". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -18340,7 +18882,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -18348,25 +18890,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.I128 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -18389,30 +18933,43 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroI128::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroI128::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroI128" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroI128" + [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -18430,31 +18987,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.I128 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroI128" [ M.read (| n |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroI128" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -18468,7 +19036,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18486,25 +19054,27 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u128" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI128", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -18517,25 +19087,27 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "u128" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroI128", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -18547,7 +19119,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().abs()) } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18589,14 +19161,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -18624,22 +19196,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI128", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI128", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -18658,7 +19235,7 @@ Module num. ) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18688,18 +19265,21 @@ Module num. let nz := M.copy (| γ0_0 |) in let flag := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI128", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |); - M.read (| flag |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI128", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)); + A.to_value (M.read (| flag |)) + ] + |) |))) ] |) @@ -18716,7 +19296,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_abs()) } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18755,7 +19335,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().wrapping_abs()) } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18794,7 +19374,7 @@ Module num. unsafe { $Uty::new_unchecked(self.get().unsigned_abs()) } } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18832,7 +19412,7 @@ Module num. self.get().is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18860,7 +19440,7 @@ Module num. self.get().is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18892,7 +19472,7 @@ Module num. None } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18902,7 +19482,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -18933,26 +19513,29 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI128", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI128", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -18967,7 +19550,7 @@ Module num. ((unsafe { $Ty::new_unchecked(result) }), overflow) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18997,18 +19580,21 @@ Module num. let result := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI128", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |); - M.read (| overflow |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI128", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)); + A.to_value (M.read (| overflow |)) + ] + |) |))) ] |) @@ -19027,7 +19613,7 @@ Module num. $Ty::MAX } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19037,7 +19623,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19062,7 +19648,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| result |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.get_constant (| "core::num::nonzero::MAX" |) @@ -19081,7 +19667,7 @@ Module num. unsafe { $Ty::new_unchecked(result) } } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19135,7 +19721,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19143,7 +19729,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19179,22 +19765,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI128", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI128", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -19216,7 +19807,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19264,7 +19855,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19322,7 +19913,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19330,7 +19921,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19359,22 +19950,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroI128", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroI128", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -19396,7 +19992,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19432,7 +20028,7 @@ Module num. M.IsAssociatedFunction Self "saturating_pow" saturating_pow. (* pub const MIN: Self = Self::new(<$Int>::MIN).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI128" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -19461,7 +20057,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroI128" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -19489,7 +20085,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -19503,7 +20099,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -19539,7 +20135,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -19552,23 +20148,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI128", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI128", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -19597,7 +20194,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -19610,16 +20207,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI128", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -19648,7 +20246,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -19661,16 +20259,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroI128", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -19693,7 +20292,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -19714,7 +20313,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19735,7 +20334,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -19756,7 +20355,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -19777,7 +20376,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -19818,7 +20417,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -19859,7 +20458,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -19900,7 +20499,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -19941,7 +20540,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -19982,7 +20581,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -20037,14 +20636,14 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroIsize". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -20074,15 +20673,15 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroIsize". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -20112,27 +20711,28 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroIsize". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::num::nonzero::NonZeroIsize", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::num::nonzero::NonZeroIsize", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -20148,7 +20748,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroIsize". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20184,7 +20784,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroIsize". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -20226,7 +20826,7 @@ Module num. Definition Self : Ty.t := Ty.path "core::num::nonzero::NonZeroIsize". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -20269,7 +20869,7 @@ Module num. } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -20277,25 +20877,27 @@ Module num. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| n |)) - (Value.Integer Integer.Isize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| n |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20318,30 +20920,43 @@ Module num. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "NonZeroIsize::new_unchecked requires a non-zero argument" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "NonZeroIsize::new_unchecked requires a non-zero argument" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::num::nonzero::NonZeroIsize" [ M.read (| n |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroIsize" + [ A.to_value (M.read (| n |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -20359,32 +20974,42 @@ Module num. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| n |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.ne (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::num::nonzero::NonZeroIsize" [ M.read (| n |) ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::num::nonzero::NonZeroIsize" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -20398,7 +21023,7 @@ Module num. self.0 } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20416,25 +21041,27 @@ Module num. unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 } } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "usize" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroIsize", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -20447,25 +21074,27 @@ Module num. unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 } } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "usize" ] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::num::nonzero::NonZeroIsize", 0 |) - |)) + |) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -20477,7 +21106,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().abs()) } } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20519,14 +21148,14 @@ Module num. } } *) - Definition checked_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20554,22 +21183,27 @@ Module num. |) in let nz := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroIsize", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroIsize", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -20588,7 +21222,7 @@ Module num. ) } *) - Definition overflowing_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20618,18 +21252,21 @@ Module num. let nz := M.copy (| γ0_0 |) in let flag := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroIsize", - "new_unchecked", - [] - |), - [ M.read (| nz |) ] - |); - M.read (| flag |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroIsize", + "new_unchecked", + [] + |), + [ M.read (| nz |) ] + |)); + A.to_value (M.read (| flag |)) + ] + |) |))) ] |) @@ -20646,7 +21283,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_abs()) } } *) - Definition saturating_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20685,7 +21322,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().wrapping_abs()) } } *) - Definition wrapping_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20724,7 +21361,7 @@ Module num. unsafe { $Uty::new_unchecked(self.get().unsigned_abs()) } } *) - Definition unsigned_abs (τ : list Ty.t) (α : list Value.t) : M := + Definition unsigned_abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20762,7 +21399,7 @@ Module num. self.get().is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20790,7 +21427,7 @@ Module num. self.get().is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20822,7 +21459,7 @@ Module num. None } *) - Definition checked_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20832,7 +21469,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20867,26 +21504,29 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroIsize", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroIsize", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -20901,7 +21541,7 @@ Module num. ((unsafe { $Ty::new_unchecked(result) }), overflow) } *) - Definition overflowing_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition overflowing_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20931,18 +21571,21 @@ Module num. let result := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroIsize", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |); - M.read (| overflow |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroIsize", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)); + A.to_value (M.read (| overflow |)) + ] + |) |))) ] |) @@ -20961,7 +21604,7 @@ Module num. $Ty::MAX } *) - Definition saturating_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20971,7 +21614,7 @@ Module num. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20996,7 +21639,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| result |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.get_constant (| "core::num::nonzero::MAX" |) @@ -21015,7 +21658,7 @@ Module num. unsafe { $Ty::new_unchecked(result) } } *) - Definition wrapping_neg (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21069,7 +21712,7 @@ Module num. } } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21077,7 +21720,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -21113,22 +21756,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroIsize", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroIsize", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -21150,7 +21798,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_mul(other.get())) } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21198,7 +21846,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().unchecked_mul(other.get())) } } *) - Definition unchecked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition unchecked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21256,7 +21904,7 @@ Module num. } } *) - Definition checked_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21264,7 +21912,7 @@ Module num. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -21293,22 +21941,27 @@ Module num. |) in let result := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroIsize", - "new_unchecked", - [] - |), - [ M.read (| result |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroIsize", + "new_unchecked", + [] + |), + [ M.read (| result |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -21330,7 +21983,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().saturating_pow(other)) } } *) - Definition saturating_pow (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -21366,7 +22019,7 @@ Module num. M.IsAssociatedFunction Self "saturating_pow" saturating_pow. (* pub const MIN: Self = Self::new(<$Int>::MIN).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroIsize" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -21395,7 +22048,7 @@ Module num. (* pub const MAX: Self = Self::new(<$Int>::MAX).unwrap(); *) (* Ty.path "core::num::nonzero::NonZeroIsize" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -21423,7 +22076,7 @@ Module num. Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$Int>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -21437,7 +22090,7 @@ Module num. nonzero.0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nonzero ] => ltac:(M.monadic @@ -21473,7 +22126,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21486,23 +22139,24 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroIsize", "get", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroIsize", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -21531,7 +22185,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get() | rhs) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21544,16 +22198,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.call_closure (| + BinOp.Pure.bit_or (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroIsize", "get", [] |), [ M.read (| self |) ] - |)) - (M.read (| rhs |)) + |), + M.read (| rhs |) + |) ] |))) | _, _ => M.impossible @@ -21582,7 +22237,7 @@ Module num. unsafe { $Ty::new_unchecked(self | rhs.get()) } } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21595,16 +22250,17 @@ Module num. [] |), [ - BinOp.Pure.bit_or - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroIsize", "get", [] |), [ M.read (| rhs |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -21627,7 +22283,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21648,7 +22304,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21669,7 +22325,7 @@ Module num. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -21690,7 +22346,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -21711,7 +22367,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -21752,7 +22408,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -21793,7 +22449,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -21834,7 +22490,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -21875,7 +22531,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -21916,7 +22572,7 @@ Module num. self.get().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -21963,7 +22619,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -22005,7 +22661,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "u8" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -22065,9 +22721,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -22097,7 +22761,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -22139,7 +22803,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "u16" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -22199,9 +22863,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -22231,7 +22903,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -22273,7 +22945,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "u32" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -22333,9 +23005,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -22365,7 +23045,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -22407,7 +23087,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "u64" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -22467,9 +23147,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -22499,7 +23187,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -22541,7 +23229,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "u128" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -22601,9 +23289,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -22633,7 +23329,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -22675,7 +23371,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "usize" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -22735,9 +23431,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -22767,7 +23471,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -22809,7 +23513,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "i8" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -22869,9 +23573,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -22901,7 +23613,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -22943,7 +23655,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "i16" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -23003,9 +23715,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -23035,7 +23755,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -23077,7 +23797,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "i32" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -23137,9 +23857,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -23169,7 +23897,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -23211,7 +23939,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "i64" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -23271,9 +23999,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -23303,7 +24039,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -23345,7 +24081,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "i128" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -23405,9 +24141,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -23437,7 +24181,7 @@ Module num. }) } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ src ] => ltac:(M.monadic @@ -23479,7 +24223,7 @@ Module num. "core::num::from_str_radix", [ Ty.path "isize" ] |), - [ M.read (| src |); Value.Integer Integer.U32 10 ] + [ M.read (| src |); M.of_value (| Value.Integer 10 |) ] |) ] |) @@ -23539,9 +24283,17 @@ Module num. |) ] |); - Value.StructRecord - "core::num::error::ParseIntError" - [ ("kind", Value.StructTuple "core::num::error::IntErrorKind::Zero" []) ] + M.of_value (| + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple "core::num::error::IntErrorKind::Zero" [] + |))) + ] + |) ] |))) |))) @@ -23582,7 +24334,7 @@ Module num. unsafe { crate::intrinsics::unchecked_div(self, other.get()) } } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23627,7 +24379,7 @@ Module num. unsafe { crate::intrinsics::unchecked_rem(self, other.get()) } } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23672,7 +24424,7 @@ Module num. unsafe { crate::intrinsics::unchecked_div(self, other.get()) } } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23717,7 +24469,7 @@ Module num. unsafe { crate::intrinsics::unchecked_rem(self, other.get()) } } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23762,7 +24514,7 @@ Module num. unsafe { crate::intrinsics::unchecked_div(self, other.get()) } } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23807,7 +24559,7 @@ Module num. unsafe { crate::intrinsics::unchecked_rem(self, other.get()) } } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23852,7 +24604,7 @@ Module num. unsafe { crate::intrinsics::unchecked_div(self, other.get()) } } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23897,7 +24649,7 @@ Module num. unsafe { crate::intrinsics::unchecked_rem(self, other.get()) } } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23942,7 +24694,7 @@ Module num. unsafe { crate::intrinsics::unchecked_div(self, other.get()) } } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -23987,7 +24739,7 @@ Module num. unsafe { crate::intrinsics::unchecked_rem(self, other.get()) } } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24032,7 +24784,7 @@ Module num. unsafe { crate::intrinsics::unchecked_div(self, other.get()) } } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24077,7 +24829,7 @@ Module num. unsafe { crate::intrinsics::unchecked_rem(self, other.get()) } } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -24128,7 +24880,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().neg()) } } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -24180,7 +24932,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().neg()) } } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -24232,7 +24984,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().neg()) } } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -24284,7 +25036,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().neg()) } } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -24336,7 +25088,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().neg()) } } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -24388,7 +25140,7 @@ Module num. unsafe { $Ty::new_unchecked(self.get().neg()) } } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/core/num/saturating.v b/CoqOfRust/core/num/saturating.v index 5ea73b9b6..9e0a2df04 100644 --- a/CoqOfRust/core/num/saturating.v +++ b/CoqOfRust/core/num/saturating.v @@ -28,7 +28,7 @@ Module num. Ty.apply (Ty.path "core::num::saturating::Saturating") [ T ]. (* PartialEq *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -80,7 +80,7 @@ Module num. Ty.apply (Ty.path "core::num::saturating::Saturating") [ T ]. (* Eq *) - Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -88,8 +88,8 @@ Module num. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -110,7 +110,7 @@ Module num. Ty.apply (Ty.path "core::num::saturating::Saturating") [ T ]. (* PartialOrd *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -149,7 +149,7 @@ Module num. Ty.apply (Ty.path "core::num::saturating::Saturating") [ T ]. (* Ord *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -188,26 +188,29 @@ Module num. Ty.apply (Ty.path "core::num::saturating::Saturating") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::num::saturating::Saturating", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::num::saturating::Saturating", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -238,19 +241,22 @@ Module num. Ty.apply (Ty.path "core::num::saturating::Saturating") [ T ]. (* Default *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -268,7 +274,7 @@ Module num. Ty.apply (Ty.path "core::num::saturating::Saturating") [ T ]. (* Hash *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ __H ], [ self; state ] => @@ -307,7 +313,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -346,7 +352,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -385,7 +391,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -424,7 +430,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -463,7 +469,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -502,7 +508,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -545,35 +551,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -595,7 +604,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -617,7 +626,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -639,7 +648,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -660,11 +669,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -690,35 +703,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -740,7 +756,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -762,7 +778,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -784,7 +800,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -805,11 +821,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -835,35 +855,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -885,7 +908,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -907,7 +930,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -929,7 +952,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -950,11 +973,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -980,35 +1007,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1030,7 +1060,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1052,7 +1082,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1074,7 +1104,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1095,11 +1125,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1125,41 +1159,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "usize", - [ Ty.path "usize" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "usize", + [ Ty.path "usize" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1181,7 +1218,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1203,7 +1240,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1225,7 +1262,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1246,11 +1283,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1276,23 +1317,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -1318,31 +1363,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -1364,7 +1413,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1386,7 +1435,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1408,7 +1457,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1429,11 +1478,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1459,31 +1512,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -1505,7 +1562,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1527,7 +1584,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1549,7 +1606,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1570,11 +1627,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1600,31 +1661,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -1646,7 +1711,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1668,7 +1733,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1690,7 +1755,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1711,11 +1776,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1741,35 +1810,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1791,7 +1863,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1812,7 +1884,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1834,7 +1906,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1854,11 +1926,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1884,35 +1960,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1934,7 +2013,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1955,7 +2034,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1977,7 +2056,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1997,11 +2076,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2027,35 +2110,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2077,7 +2163,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2098,7 +2184,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2120,7 +2206,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2140,11 +2226,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2170,35 +2260,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2220,7 +2313,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2241,7 +2334,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2263,7 +2356,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2283,11 +2376,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2313,41 +2410,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "u8", - [ Ty.path "u8" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "u8", + [ Ty.path "u8" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2369,7 +2469,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2390,7 +2490,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2412,7 +2512,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2432,11 +2532,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2462,23 +2566,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2504,31 +2612,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2550,7 +2662,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2571,7 +2683,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2593,7 +2705,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2613,11 +2725,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2643,31 +2759,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2689,7 +2809,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2710,7 +2830,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2732,7 +2852,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2752,11 +2872,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2782,31 +2906,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2828,7 +2956,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2849,7 +2977,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2871,7 +2999,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2891,11 +3019,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2921,35 +3053,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2971,7 +3106,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2992,7 +3127,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3014,7 +3149,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3034,11 +3169,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3064,35 +3203,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3114,7 +3256,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3135,7 +3277,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3157,7 +3299,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3177,11 +3319,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3207,35 +3353,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3257,7 +3406,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3278,7 +3427,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3300,7 +3449,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3320,11 +3469,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3350,35 +3503,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3400,7 +3556,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3421,7 +3577,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3443,7 +3599,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3463,11 +3619,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3493,41 +3653,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "u16", - [ Ty.path "u16" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "u16", + [ Ty.path "u16" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3549,7 +3712,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3570,7 +3733,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3592,7 +3755,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3612,11 +3775,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3642,23 +3809,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3684,31 +3855,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3730,7 +3905,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3751,7 +3926,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3773,7 +3948,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3793,11 +3968,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3823,31 +4002,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3869,7 +4052,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3890,7 +4073,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3912,7 +4095,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3932,11 +4115,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3962,31 +4149,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4008,7 +4199,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4029,7 +4220,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4051,7 +4242,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4071,11 +4262,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4101,35 +4296,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4151,7 +4349,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4172,7 +4370,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4194,7 +4392,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4214,11 +4412,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4244,35 +4446,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4294,7 +4499,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4315,7 +4520,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4337,7 +4542,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4357,11 +4562,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4387,35 +4596,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4437,7 +4649,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4458,7 +4670,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4480,7 +4692,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4500,11 +4712,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4530,35 +4746,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4580,7 +4799,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4601,7 +4820,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4623,7 +4842,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4643,11 +4862,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4673,41 +4896,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "u32", - [ Ty.path "u32" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "u32", + [ Ty.path "u32" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4729,7 +4955,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4750,7 +4976,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4772,7 +4998,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4792,11 +5018,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4822,23 +5052,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4864,31 +5098,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4910,7 +5148,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4931,7 +5169,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4953,7 +5191,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4973,11 +5211,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5003,31 +5245,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -5049,7 +5295,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5070,7 +5316,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5092,7 +5338,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5112,11 +5358,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5142,31 +5392,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -5188,7 +5442,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5209,7 +5463,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5231,7 +5485,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5251,11 +5505,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5281,35 +5539,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5331,7 +5592,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5352,7 +5613,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5374,7 +5635,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5394,11 +5655,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5424,35 +5689,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5474,7 +5742,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5495,7 +5763,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5517,7 +5785,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5537,11 +5805,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5567,35 +5839,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5617,7 +5892,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5638,7 +5913,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5660,7 +5935,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5680,11 +5955,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5710,35 +5989,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5760,7 +6042,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5781,7 +6063,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5803,7 +6085,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5823,11 +6105,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5853,41 +6139,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "u64", - [ Ty.path "u64" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "u64", + [ Ty.path "u64" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5909,7 +6198,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5930,7 +6219,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5952,7 +6241,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5972,11 +6261,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6002,23 +6295,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -6044,31 +6341,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -6090,7 +6391,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6111,7 +6412,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6133,7 +6434,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6153,11 +6454,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6183,31 +6488,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -6229,7 +6538,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6250,7 +6559,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6272,7 +6581,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6292,11 +6601,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6322,31 +6635,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -6368,7 +6685,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6389,7 +6706,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6411,7 +6728,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6431,11 +6748,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6461,35 +6782,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6511,7 +6835,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6532,7 +6856,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6554,7 +6878,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6574,11 +6898,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6604,35 +6932,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6654,7 +6985,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6675,7 +7006,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6697,7 +7028,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6717,11 +7048,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6747,35 +7082,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6797,7 +7135,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6818,7 +7156,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6840,7 +7178,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6860,11 +7198,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6890,35 +7232,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6940,7 +7285,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6961,7 +7306,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6983,7 +7328,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7003,11 +7348,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7033,41 +7382,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "u128", - [ Ty.path "u128" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "u128", + [ Ty.path "u128" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7089,7 +7441,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7110,7 +7462,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7132,7 +7484,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7152,11 +7504,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7182,23 +7538,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -7224,31 +7584,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -7270,7 +7634,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7291,7 +7655,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7313,7 +7677,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7333,11 +7697,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7363,31 +7731,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -7409,7 +7781,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7430,7 +7802,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7452,7 +7824,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7472,11 +7844,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7502,31 +7878,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -7548,7 +7928,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7569,7 +7949,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7591,7 +7971,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7611,11 +7991,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7641,35 +8025,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7691,7 +8078,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7713,7 +8100,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7735,7 +8122,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7756,11 +8143,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7786,35 +8177,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7836,7 +8230,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7858,7 +8252,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7880,7 +8274,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7901,11 +8295,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7931,35 +8329,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7981,7 +8382,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8003,7 +8404,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8025,7 +8426,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8046,11 +8447,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8076,35 +8481,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8126,7 +8534,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8148,7 +8556,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8170,7 +8578,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8191,11 +8599,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8221,41 +8633,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "isize", - [ Ty.path "isize" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "isize", + [ Ty.path "isize" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8277,7 +8692,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8299,7 +8714,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8321,7 +8736,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8342,11 +8757,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8372,23 +8791,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8414,31 +8837,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8460,7 +8887,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8482,7 +8909,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8504,7 +8931,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8525,11 +8952,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8555,31 +8986,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8601,7 +9036,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8623,7 +9058,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8645,7 +9080,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8666,11 +9101,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8696,31 +9135,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8742,7 +9185,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8764,7 +9207,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8786,7 +9229,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8807,11 +9250,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8837,35 +9284,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8887,7 +9337,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8908,7 +9358,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8930,7 +9380,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8950,11 +9400,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8980,35 +9434,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9030,7 +9487,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9051,7 +9508,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9073,7 +9530,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9093,11 +9550,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9123,35 +9584,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9173,7 +9637,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9194,7 +9658,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9216,7 +9680,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9236,11 +9700,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9266,35 +9734,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9316,7 +9787,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9337,7 +9808,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9359,7 +9830,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9379,11 +9850,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9409,41 +9884,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "i8", - [ Ty.path "i8" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "i8", + [ Ty.path "i8" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9465,7 +9943,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9486,7 +9964,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9508,7 +9986,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9528,11 +10006,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9558,23 +10040,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -9600,31 +10086,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -9646,7 +10136,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9667,7 +10157,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9689,7 +10179,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9709,11 +10199,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9739,31 +10233,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -9785,7 +10283,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9806,7 +10304,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9828,7 +10326,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9848,11 +10346,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9878,33 +10380,37 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) - | _, _ => M.impossible - end. + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -9924,7 +10430,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9945,7 +10451,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9967,7 +10473,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9987,11 +10493,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10017,35 +10527,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10067,7 +10580,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10088,7 +10601,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10110,7 +10623,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10130,11 +10643,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10160,35 +10677,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10210,7 +10730,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10231,7 +10751,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10253,7 +10773,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10273,11 +10793,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10303,35 +10827,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10353,7 +10880,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10374,7 +10901,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10396,7 +10923,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10416,11 +10943,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10446,35 +10977,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10496,7 +11030,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10517,7 +11051,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10539,7 +11073,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10559,11 +11093,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10589,41 +11127,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "i16", - [ Ty.path "i16" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "i16", + [ Ty.path "i16" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10645,7 +11186,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10666,7 +11207,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10688,7 +11229,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10708,11 +11249,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10738,23 +11283,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -10780,31 +11329,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -10826,7 +11379,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10847,7 +11400,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10869,7 +11422,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10889,11 +11442,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10919,31 +11476,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -10965,7 +11526,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10986,7 +11547,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11008,7 +11569,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11028,11 +11589,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11058,31 +11623,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -11104,7 +11673,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11125,7 +11694,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11147,7 +11716,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11167,11 +11736,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11197,35 +11770,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11247,7 +11823,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11268,7 +11844,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11290,7 +11866,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11310,11 +11886,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11340,35 +11920,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11390,7 +11973,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11411,7 +11994,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11433,7 +12016,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11453,11 +12036,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11483,35 +12070,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11533,7 +12123,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11554,7 +12144,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11576,7 +12166,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11596,11 +12186,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11626,35 +12220,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11676,7 +12273,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11697,7 +12294,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11719,7 +12316,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11739,11 +12336,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11769,41 +12370,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "i32", - [ Ty.path "i32" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "i32", + [ Ty.path "i32" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11825,7 +12429,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11846,7 +12450,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11868,7 +12472,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11888,11 +12492,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11918,23 +12526,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -11960,31 +12572,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -12006,7 +12622,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12027,7 +12643,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12049,7 +12665,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12069,11 +12685,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12099,31 +12719,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -12145,7 +12769,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12166,7 +12790,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12188,7 +12812,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12208,11 +12832,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12238,31 +12866,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -12284,7 +12916,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12305,7 +12937,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12327,7 +12959,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12347,11 +12979,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12377,35 +13013,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12427,7 +13066,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12448,7 +13087,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12470,7 +13109,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12490,11 +13129,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12520,35 +13163,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12570,7 +13216,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12591,7 +13237,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12613,7 +13259,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12633,11 +13279,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12663,35 +13313,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12713,7 +13366,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12734,7 +13387,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12756,7 +13409,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12776,11 +13429,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12806,35 +13463,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12856,7 +13516,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12877,7 +13537,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12899,7 +13559,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12919,11 +13579,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12949,41 +13613,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "i64", - [ Ty.path "i64" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "i64", + [ Ty.path "i64" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -13005,7 +13672,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13026,7 +13693,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13048,7 +13715,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13068,11 +13735,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13098,23 +13769,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13140,31 +13815,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13186,7 +13865,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13207,7 +13886,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13229,7 +13908,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13249,11 +13928,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13279,31 +13962,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13325,7 +14012,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13346,7 +14033,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13368,7 +14055,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13388,11 +14075,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13418,31 +14109,35 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13464,7 +14159,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13485,7 +14180,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13507,7 +14202,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13527,11 +14222,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13557,35 +14256,38 @@ Module num. Saturating(self.0.saturating_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "saturating_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "saturating_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -13607,7 +14309,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13628,7 +14330,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13650,7 +14352,7 @@ Module num. *self = *self + Saturating(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13670,11 +14372,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13700,35 +14406,38 @@ Module num. Saturating(self.0.saturating_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "saturating_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "saturating_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -13750,7 +14459,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13771,7 +14480,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13793,7 +14502,7 @@ Module num. *self = *self - Saturating(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13813,11 +14522,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13843,35 +14556,38 @@ Module num. Saturating(self.0.saturating_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "saturating_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "saturating_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -13893,7 +14609,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13914,7 +14630,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13936,7 +14652,7 @@ Module num. *self = *self * Saturating(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13956,11 +14672,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13986,35 +14706,38 @@ Module num. Saturating(self.0.saturating_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "saturating_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "saturating_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -14036,7 +14759,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14057,7 +14780,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14079,7 +14802,7 @@ Module num. *self = *self / Saturating(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14099,11 +14822,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14129,41 +14856,44 @@ Module num. Saturating(self.0.rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Rem", - Ty.path "i128", - [ Ty.path "i128" ], - "rem", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "i128", + [ Ty.path "i128" ], + "rem", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -14185,7 +14915,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14206,7 +14936,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14228,7 +14958,7 @@ Module num. *self = *self % Saturating(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14248,11 +14978,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14278,23 +15012,27 @@ Module num. Saturating(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -14320,31 +15058,35 @@ Module num. Saturating(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -14366,7 +15108,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14387,7 +15129,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14409,7 +15151,7 @@ Module num. *self = *self ^ Saturating(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14429,11 +15171,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14459,31 +15205,35 @@ Module num. Saturating(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -14505,7 +15255,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14526,7 +15276,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14548,7 +15298,7 @@ Module num. *self = *self | Saturating(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14568,11 +15318,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14598,33 +15352,37 @@ Module num. Saturating(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::saturating::Saturating", - 0 - |) - |)) - ])) - | _, _ => M.impossible - end. + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::saturating::Saturating", + 0 + |) + |) + |)) + ] + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -14644,7 +15402,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14665,7 +15423,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14687,7 +15445,7 @@ Module num. *self = *self & Saturating(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14707,11 +15465,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::saturating::Saturating" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14730,33 +15492,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "usize" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "usize" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -14766,7 +15532,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14793,7 +15559,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14820,7 +15586,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14848,29 +15614,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -14881,29 +15650,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -14915,27 +15687,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -14946,27 +15721,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -14978,27 +15756,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15009,27 +15790,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15040,27 +15824,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15071,27 +15858,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15102,29 +15892,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15134,7 +15927,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15162,7 +15955,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15192,33 +15985,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u8" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u8" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -15228,7 +16025,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15255,7 +16052,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15282,7 +16079,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15310,29 +16107,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15343,29 +16143,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15377,27 +16180,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15408,27 +16214,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15440,27 +16249,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15471,27 +16283,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15502,27 +16317,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15533,27 +16351,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15564,29 +16385,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15596,7 +16420,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15624,7 +16448,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15654,33 +16478,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u16" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u16" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -15690,7 +16518,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15717,7 +16545,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15744,7 +16572,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -15772,29 +16600,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15805,29 +16636,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15839,27 +16673,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15870,27 +16707,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15902,27 +16742,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15933,27 +16776,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15964,27 +16810,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15995,27 +16844,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16026,29 +16878,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16058,7 +16913,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16086,7 +16941,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16116,33 +16971,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u32" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u32" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -16152,7 +17011,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16179,7 +17038,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16206,7 +17065,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16234,29 +17093,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16267,29 +17129,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16301,27 +17166,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16332,27 +17200,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16364,27 +17235,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16395,27 +17269,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16426,27 +17303,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16457,27 +17337,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16488,29 +17371,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16520,7 +17406,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16548,7 +17434,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16578,33 +17464,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u64" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u64" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -16614,7 +17504,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16641,7 +17531,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16668,7 +17558,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16696,29 +17586,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16729,29 +17622,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16763,27 +17659,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16794,27 +17693,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16826,27 +17728,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16857,27 +17762,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16888,27 +17796,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16919,27 +17830,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16950,29 +17864,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16982,7 +17899,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17010,7 +17927,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17040,33 +17957,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u128" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "u128" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -17076,7 +17997,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17103,7 +18024,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17130,7 +18051,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17158,29 +18079,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17191,29 +18115,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17225,27 +18152,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17256,27 +18186,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17288,27 +18221,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17319,27 +18255,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17350,27 +18289,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17381,27 +18323,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17412,29 +18357,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17444,7 +18392,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17472,7 +18420,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17502,33 +18450,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "isize" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "isize" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -17538,7 +18490,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17565,7 +18517,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17592,7 +18544,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17620,29 +18572,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17653,29 +18608,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17687,27 +18645,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17718,27 +18679,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17750,27 +18714,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17781,27 +18748,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17812,27 +18782,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17843,27 +18816,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17874,29 +18850,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17906,7 +18885,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17934,27 +18913,30 @@ Module num. Saturating(self.0.saturating_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "saturating_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "saturating_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17965,27 +18947,30 @@ Module num. Saturating(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17996,7 +18981,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18023,7 +19008,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18052,33 +19037,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i8" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i8" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -18088,7 +19077,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18115,7 +19104,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18142,7 +19131,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18170,29 +19159,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18203,29 +19195,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18237,27 +19232,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18268,27 +19266,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18300,27 +19301,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18331,27 +19335,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18362,27 +19369,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18393,27 +19403,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18424,29 +19437,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18456,7 +19472,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18484,27 +19500,30 @@ Module num. Saturating(self.0.saturating_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "saturating_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "saturating_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18515,27 +19534,30 @@ Module num. Saturating(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18546,7 +19568,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18573,7 +19595,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18602,33 +19624,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i16" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i16" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -18638,7 +19664,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18665,7 +19691,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18692,7 +19718,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18720,29 +19746,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18753,29 +19782,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18787,27 +19819,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18818,27 +19853,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18850,27 +19888,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18881,27 +19922,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18912,27 +19956,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18943,27 +19990,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18974,29 +20024,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19006,7 +20059,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19034,27 +20087,30 @@ Module num. Saturating(self.0.saturating_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "saturating_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "saturating_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19065,27 +20121,30 @@ Module num. Saturating(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic - (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19096,7 +20155,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19123,7 +20182,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19152,33 +20211,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i32" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i32" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -19188,7 +20251,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19215,7 +20278,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19242,7 +20305,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19270,29 +20333,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19303,29 +20369,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19337,27 +20406,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19368,27 +20440,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19400,27 +20475,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19431,27 +20509,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19462,27 +20543,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19493,27 +20577,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19524,29 +20611,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19556,7 +20646,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19584,27 +20674,30 @@ Module num. Saturating(self.0.saturating_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "saturating_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "saturating_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19615,27 +20708,30 @@ Module num. Saturating(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19646,7 +20742,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19673,7 +20769,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19702,33 +20798,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i64" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i64" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -19738,7 +20838,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19765,7 +20865,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19792,7 +20892,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19820,29 +20920,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19853,29 +20956,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19887,27 +20993,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19918,27 +21027,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19950,27 +21062,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19981,27 +21096,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20012,27 +21130,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20043,27 +21164,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20074,29 +21198,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20106,7 +21233,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20134,27 +21261,30 @@ Module num. Saturating(self.0.saturating_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "saturating_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "saturating_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20165,27 +21295,30 @@ Module num. Saturating(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20196,7 +21329,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20223,7 +21356,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20252,33 +21385,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i128" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::saturating::Saturating") [ Ty.path "i128" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::saturating::Saturating" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -20288,7 +21425,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20315,7 +21452,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20342,7 +21479,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20370,29 +21507,32 @@ Module num. Saturating(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20403,29 +21543,32 @@ Module num. Saturating(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20437,27 +21580,30 @@ Module num. Saturating(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20468,27 +21614,30 @@ Module num. Saturating(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20500,27 +21649,30 @@ Module num. Saturating(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20531,27 +21683,30 @@ Module num. Saturating(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20562,27 +21717,30 @@ Module num. Saturating(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20593,27 +21751,30 @@ Module num. Saturating(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20624,29 +21785,32 @@ Module num. Saturating(self.0.saturating_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "saturating_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "saturating_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20656,7 +21820,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20684,27 +21848,30 @@ Module num. Saturating(self.0.saturating_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "saturating_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "saturating_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20715,27 +21882,30 @@ Module num. Saturating(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20746,7 +21916,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20773,7 +21943,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20810,27 +21980,30 @@ Module num. Saturating(self.0.saturating_neg()) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "saturating_neg", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "saturating_neg", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20857,27 +22030,30 @@ Module num. Saturating(self.0.saturating_neg()) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "saturating_neg", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "saturating_neg", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20904,27 +22080,30 @@ Module num. Saturating(self.0.saturating_neg()) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "saturating_neg", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "saturating_neg", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20951,27 +22130,30 @@ Module num. Saturating(self.0.saturating_neg()) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "saturating_neg", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "saturating_neg", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20998,27 +22180,30 @@ Module num. Saturating(self.0.saturating_neg()) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "saturating_neg", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "saturating_neg", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21045,27 +22230,30 @@ Module num. Saturating(self.0.saturating_neg()) } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::saturating::Saturating" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "saturating_neg", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::saturating::Saturating", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::saturating::Saturating" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "saturating_neg", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::saturating::Saturating", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/num/shells/int_macros.v b/CoqOfRust/core/num/shells/int_macros.v index 8e3198e09..5562ca584 100644 --- a/CoqOfRust/core/num/shells/int_macros.v +++ b/CoqOfRust/core/num/shells/int_macros.v @@ -2,73 +2,73 @@ Require Import CoqOfRust.CoqOfRust. Module i128. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End i128. Module i16. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End i16. Module i32. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End i32. Module i64. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End i64. Module i8. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End i8. Module isize. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End isize. Module u128. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End u128. Module u16. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End u16. Module u32. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End u32. Module u64. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End u64. Module u8. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End u8. Module usize. - Definition value_MIN : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))). - Definition value_MAX : Value.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))). End usize. diff --git a/CoqOfRust/core/num/wrapping.v b/CoqOfRust/core/num/wrapping.v index aeb734f6c..4a4266055 100644 --- a/CoqOfRust/core/num/wrapping.v +++ b/CoqOfRust/core/num/wrapping.v @@ -26,7 +26,7 @@ Module num. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ T ]. (* PartialEq *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -76,7 +76,7 @@ Module num. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ T ]. (* Eq *) - Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -84,8 +84,8 @@ Module num. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -105,7 +105,7 @@ Module num. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ T ]. (* PartialOrd *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -143,7 +143,7 @@ Module num. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ T ]. (* Ord *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -181,26 +181,29 @@ Module num. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::num::wrapping::Wrapping", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::num::wrapping::Wrapping", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -229,19 +232,22 @@ Module num. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ T ]. (* Default *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -258,7 +264,7 @@ Module num. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ T ]. (* Hash *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ __H ], [ self; state ] => @@ -296,7 +302,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -334,7 +340,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -372,7 +378,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -410,7 +416,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -448,7 +454,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -486,7 +492,7 @@ Module num. self.0.fmt(f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -528,33 +534,39 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::wrapping::shift_max::u8" |) |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::wrapping::shift_max::u8" |) |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -575,7 +587,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -596,7 +608,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -621,33 +633,39 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::wrapping::shift_max::u8" |) |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::wrapping::shift_max::u8" |) |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -668,7 +686,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -689,7 +707,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -715,35 +733,41 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::u16" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::u16" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -765,7 +789,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -786,7 +810,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -812,35 +836,41 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::u16" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::u16" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -862,7 +892,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -883,7 +913,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -909,35 +939,41 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::u32" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::u32" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -959,7 +995,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -980,7 +1016,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1006,35 +1042,41 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::u32" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::u32" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1056,7 +1098,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1077,7 +1119,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1103,35 +1145,41 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::u64" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::u64" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1153,7 +1201,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1174,7 +1222,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1200,35 +1248,41 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::u64" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::u64" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1250,7 +1304,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1271,7 +1325,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1297,35 +1351,41 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::u128" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::u128" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1347,7 +1407,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1368,7 +1428,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1394,35 +1454,41 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::u128" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::u128" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1444,7 +1510,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1465,7 +1531,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1491,35 +1557,43 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::platform::usize" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| + "core::num::wrapping::shift_max::platform::usize" + |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1541,7 +1615,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1562,7 +1636,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1588,35 +1662,43 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::platform::usize" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| + "core::num::wrapping::shift_max::platform::usize" + |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1638,7 +1720,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1659,7 +1741,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1684,33 +1766,39 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::wrapping::shift_max::i8" |) |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::wrapping::shift_max::i8" |) |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1731,7 +1819,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1752,7 +1840,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1777,33 +1865,39 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::wrapping::shift_max::i8" |) |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::wrapping::shift_max::i8" |) |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1824,7 +1918,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1845,7 +1939,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1871,35 +1965,41 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::i16" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::i16" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1921,7 +2021,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1942,7 +2042,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1968,35 +2068,41 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::i16" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::i16" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2018,7 +2124,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2039,7 +2145,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2065,35 +2171,41 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::i32" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::i32" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2115,7 +2227,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2136,7 +2248,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2162,35 +2274,41 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::i32" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::i32" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2212,7 +2330,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2233,7 +2351,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2259,35 +2377,41 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::i64" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::i64" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2309,7 +2433,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2330,7 +2454,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2356,35 +2480,41 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::i64" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::i64" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2406,7 +2536,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2427,7 +2557,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2453,35 +2583,41 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::i128" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::i128" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2503,7 +2639,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2524,7 +2660,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2550,35 +2686,41 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::i128" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| "core::num::wrapping::shift_max::i128" |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2600,7 +2742,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2621,7 +2763,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2647,35 +2789,43 @@ Module num. Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32)) } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_shl", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::platform::isize" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_shl", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| + "core::num::wrapping::shift_max::platform::isize" + |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2697,7 +2847,7 @@ Module num. *self = *self << other; } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2718,7 +2868,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2744,35 +2894,43 @@ Module num. Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32)) } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_shr", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| other |)) - (M.rust_cast - (M.read (| - M.get_constant (| "core::num::wrapping::shift_max::platform::isize" |) - |)))) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_shr", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| other |), + M.rust_cast (| + M.read (| + M.get_constant (| + "core::num::wrapping::shift_max::platform::isize" + |) + |) + |) + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2794,7 +2952,7 @@ Module num. *self = *self >> other; } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2815,7 +2973,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2841,35 +2999,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2891,7 +3052,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2912,7 +3073,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2934,7 +3095,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2954,11 +3115,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2984,35 +3149,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3034,7 +3202,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3055,7 +3223,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3077,7 +3245,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3097,11 +3265,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3127,35 +3299,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3177,7 +3352,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3198,7 +3373,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3220,7 +3395,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3240,11 +3415,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3270,35 +3449,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3320,7 +3502,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3341,7 +3523,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3363,7 +3545,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3383,11 +3565,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3413,35 +3599,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -3463,7 +3652,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3484,7 +3673,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3506,7 +3695,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3526,11 +3715,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3556,23 +3749,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3598,31 +3795,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3644,7 +3845,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3665,7 +3866,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3687,7 +3888,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3707,11 +3908,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3737,31 +3942,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3783,7 +3992,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3804,7 +4013,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3826,7 +4035,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3846,11 +4055,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3876,31 +4089,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -3922,7 +4139,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3943,7 +4160,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3965,7 +4182,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3985,11 +4202,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4015,7 +4236,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4029,7 +4250,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.Usize 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -4057,35 +4282,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4106,7 +4334,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4127,7 +4355,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4148,7 +4376,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4168,11 +4396,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4197,35 +4429,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4246,7 +4481,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4267,7 +4502,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4288,7 +4523,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4308,11 +4543,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4337,35 +4576,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4386,7 +4628,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4407,7 +4649,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4428,7 +4670,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4448,11 +4690,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4477,35 +4723,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4526,7 +4775,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4547,7 +4796,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4568,7 +4817,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4588,11 +4837,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4617,36 +4870,39 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) - | _, _ => M.impossible + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) + | _, _ => M.impossible end. Axiom Implements : @@ -4666,7 +4922,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4687,7 +4943,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4708,7 +4964,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4728,11 +4984,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4757,23 +5017,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4798,31 +5062,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4843,7 +5111,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4864,7 +5132,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4885,7 +5153,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4905,11 +5173,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4934,31 +5206,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4979,7 +5255,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5000,7 +5276,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5021,7 +5297,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5041,11 +5317,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5070,31 +5350,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -5115,7 +5399,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5136,7 +5420,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5157,7 +5441,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5177,11 +5461,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5206,7 +5494,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5220,7 +5508,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U8 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -5249,35 +5541,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5299,7 +5594,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5320,7 +5615,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5342,7 +5637,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5362,11 +5657,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5392,35 +5691,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5442,7 +5744,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5463,7 +5765,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5485,7 +5787,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5505,11 +5807,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5535,35 +5841,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5585,7 +5894,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5606,7 +5915,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5628,7 +5937,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5648,11 +5957,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5678,35 +5991,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5728,7 +6044,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5749,7 +6065,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5771,7 +6087,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5791,11 +6107,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5821,35 +6141,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5871,7 +6194,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5892,7 +6215,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5914,7 +6237,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5934,11 +6257,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5964,23 +6291,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -6006,31 +6337,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -6052,7 +6387,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6073,7 +6408,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6095,7 +6430,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6115,11 +6450,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6145,31 +6484,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -6191,7 +6534,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6212,7 +6555,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6234,7 +6577,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6254,11 +6597,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6284,31 +6631,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -6330,7 +6681,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6351,7 +6702,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6373,7 +6724,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6393,11 +6744,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6423,7 +6778,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6437,7 +6792,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U16 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -6466,35 +6825,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6516,7 +6878,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6537,7 +6899,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6559,7 +6921,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6579,11 +6941,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6609,35 +6975,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6659,7 +7028,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6680,7 +7049,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6702,7 +7071,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6722,11 +7091,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6752,35 +7125,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6802,7 +7178,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6823,7 +7199,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6845,7 +7221,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6865,11 +7241,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6895,35 +7275,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6945,7 +7328,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6966,7 +7349,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6988,7 +7371,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7008,11 +7391,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7038,35 +7425,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7088,7 +7478,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7109,7 +7499,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7131,7 +7521,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7151,11 +7541,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7181,23 +7575,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -7223,31 +7621,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -7269,7 +7671,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7290,7 +7692,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7312,7 +7714,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7332,11 +7734,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7362,31 +7768,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -7408,7 +7818,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7429,7 +7839,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7451,7 +7861,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7471,11 +7881,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7501,31 +7915,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -7547,7 +7965,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7568,7 +7986,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7590,7 +8008,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7610,11 +8028,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7640,7 +8062,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7654,7 +8076,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U32 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -7683,35 +8109,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7733,7 +8162,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7754,7 +8183,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7776,7 +8205,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7796,11 +8225,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7826,35 +8259,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7876,7 +8312,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7897,7 +8333,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7919,7 +8355,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7939,11 +8375,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7969,35 +8409,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8019,7 +8462,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8040,7 +8483,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8062,7 +8505,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8082,11 +8525,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8112,35 +8559,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8162,7 +8612,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8183,7 +8633,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8205,7 +8655,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8225,11 +8675,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8255,35 +8709,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8305,7 +8762,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8326,7 +8783,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8348,7 +8805,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8368,11 +8825,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8398,23 +8859,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8440,31 +8905,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8486,7 +8955,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8507,7 +8976,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8529,7 +8998,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8549,11 +9018,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8579,31 +9052,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8625,7 +9102,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8646,7 +9123,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8668,7 +9145,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8688,11 +9165,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8718,31 +9199,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -8764,7 +9249,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8785,7 +9270,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8807,7 +9292,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8827,11 +9312,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8857,7 +9346,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8871,7 +9360,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U64 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -8900,35 +9393,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8950,7 +9446,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8971,7 +9467,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8993,7 +9489,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9013,11 +9509,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9043,35 +9543,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9093,7 +9596,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9114,7 +9617,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9136,7 +9639,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9156,11 +9659,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9186,35 +9693,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9236,7 +9746,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9257,7 +9767,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9279,7 +9789,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9299,11 +9809,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9329,35 +9843,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9379,7 +9896,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9400,7 +9917,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9422,7 +9939,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9442,11 +9959,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9472,35 +9993,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -9522,7 +10046,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9543,7 +10067,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9565,7 +10089,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9585,11 +10109,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9615,23 +10143,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -9657,31 +10189,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -9703,7 +10239,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9724,7 +10260,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9746,7 +10282,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9766,11 +10302,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9796,31 +10336,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -9842,7 +10386,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9863,7 +10407,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9885,7 +10429,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9905,11 +10449,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9935,31 +10483,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -9981,7 +10533,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10002,7 +10554,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10024,7 +10576,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10044,11 +10596,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10074,7 +10630,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10088,7 +10644,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.U128 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -10117,35 +10677,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10167,7 +10730,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10188,7 +10751,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10210,7 +10773,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10230,11 +10793,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10260,35 +10827,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10310,7 +10880,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10331,7 +10901,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10353,7 +10923,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10373,11 +10943,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10403,35 +10977,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10453,7 +11030,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10474,7 +11051,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10496,7 +11073,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10516,11 +11093,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10546,35 +11127,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10596,7 +11180,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10617,7 +11201,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10639,7 +11223,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10659,11 +11243,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10689,35 +11277,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -10739,7 +11330,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10760,7 +11351,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10782,7 +11373,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10802,11 +11393,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10832,23 +11427,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -10874,31 +11473,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -10920,7 +11523,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10941,7 +11544,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10963,7 +11566,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10983,11 +11586,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11013,31 +11620,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -11059,7 +11670,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11080,7 +11691,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11102,7 +11713,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11122,11 +11733,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11152,31 +11767,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -11198,7 +11817,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11219,7 +11838,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11241,7 +11860,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11261,11 +11880,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11291,7 +11914,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11305,7 +11928,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.Isize 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -11333,35 +11960,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11382,7 +12012,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11403,7 +12033,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11424,7 +12054,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11444,11 +12074,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11473,35 +12107,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11522,7 +12159,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11543,7 +12180,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11564,7 +12201,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11584,11 +12221,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11613,35 +12254,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11662,7 +12306,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11683,7 +12327,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11704,7 +12348,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11724,11 +12368,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11753,35 +12401,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11802,7 +12453,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11823,7 +12474,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11844,7 +12495,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11864,11 +12515,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11893,35 +12548,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -11942,7 +12600,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11963,7 +12621,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11984,7 +12642,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12004,11 +12662,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12033,23 +12695,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -12074,31 +12740,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -12119,7 +12789,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12140,7 +12810,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12161,7 +12831,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12181,11 +12851,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12210,31 +12884,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -12255,7 +12933,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12276,7 +12954,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12297,7 +12975,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12317,11 +12995,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12346,31 +13028,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -12391,7 +13077,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12412,7 +13098,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12433,7 +13119,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12453,11 +13139,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12482,7 +13172,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -12496,7 +13186,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I8 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -12525,35 +13219,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12575,7 +13272,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12596,7 +13293,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12618,7 +13315,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12638,11 +13335,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12668,35 +13369,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12718,7 +13422,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12739,7 +13443,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12761,7 +13465,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12781,11 +13485,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12811,35 +13519,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12861,7 +13572,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12882,7 +13593,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12904,7 +13615,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12924,11 +13635,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -12954,35 +13669,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -13004,7 +13722,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13025,7 +13743,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13047,7 +13765,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13067,11 +13785,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13097,35 +13819,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -13147,7 +13872,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13168,7 +13893,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13190,7 +13915,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13210,11 +13935,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13240,23 +13969,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13282,31 +14015,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13328,7 +14065,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13349,7 +14086,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13371,7 +14108,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13391,11 +14128,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13421,31 +14162,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13467,7 +14212,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13488,7 +14233,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13510,7 +14255,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13530,11 +14275,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13560,31 +14309,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -13606,7 +14359,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13627,7 +14380,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13649,7 +14402,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13669,11 +14422,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13699,7 +14456,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13713,7 +14470,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I16 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -13742,35 +14503,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -13792,7 +14556,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13813,7 +14577,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13835,7 +14599,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13855,11 +14619,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13885,35 +14653,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -13935,7 +14706,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13956,7 +14727,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13978,7 +14749,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13998,11 +14769,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14028,35 +14803,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -14078,7 +14856,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14099,7 +14877,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14121,7 +14899,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14141,11 +14919,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14171,35 +14953,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -14221,7 +15006,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14242,7 +15027,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14264,7 +15049,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14284,11 +15069,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14314,35 +15103,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -14364,7 +15156,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14385,7 +15177,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14407,7 +15199,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14427,11 +15219,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14457,23 +15253,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -14499,31 +15299,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -14545,7 +15349,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14566,7 +15370,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14588,7 +15392,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14608,11 +15412,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14638,31 +15446,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -14684,7 +15496,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14705,7 +15517,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14727,7 +15539,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14747,11 +15559,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14777,31 +15593,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -14823,7 +15643,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14844,7 +15664,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14866,7 +15686,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14886,11 +15706,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -14916,7 +15740,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -14930,7 +15754,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I32 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -14959,35 +15787,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15009,7 +15840,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15030,7 +15861,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15052,7 +15883,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15072,11 +15903,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15102,35 +15937,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15152,7 +15990,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15173,7 +16011,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15195,7 +16033,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15215,11 +16053,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15245,35 +16087,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15295,7 +16140,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15316,7 +16161,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15338,7 +16183,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15358,11 +16203,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15388,35 +16237,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15438,7 +16290,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15459,7 +16311,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15481,7 +16333,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15501,11 +16353,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15531,35 +16387,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -15581,7 +16440,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15602,7 +16461,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15624,7 +16483,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15644,11 +16503,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15674,23 +16537,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -15716,31 +16583,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -15762,7 +16633,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15783,7 +16654,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15805,7 +16676,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15825,11 +16696,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15855,31 +16730,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -15901,7 +16780,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15922,7 +16801,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15944,7 +16823,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15964,11 +16843,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -15994,31 +16877,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -16040,7 +16927,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16061,7 +16948,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16083,7 +16970,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16103,11 +16990,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16133,7 +17024,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -16147,7 +17038,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I64 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -16176,35 +17071,38 @@ Module num. Wrapping(self.0.wrapping_add(other.0)) } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_add", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_add", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16226,7 +17124,7 @@ Module num. *self = *self + other; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16247,7 +17145,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16269,7 +17167,7 @@ Module num. *self = *self + Wrapping(other); } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16289,11 +17187,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16319,35 +17221,38 @@ Module num. Wrapping(self.0.wrapping_sub(other.0)) } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_sub", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16369,7 +17274,7 @@ Module num. *self = *self - other; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16390,7 +17295,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16412,7 +17317,7 @@ Module num. *self = *self - Wrapping(other); } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16432,11 +17337,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16462,35 +17371,38 @@ Module num. Wrapping(self.0.wrapping_mul(other.0)) } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_mul", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_mul", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16512,7 +17424,7 @@ Module num. *self = *self * other; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16533,7 +17445,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16555,7 +17467,7 @@ Module num. *self = *self * Wrapping(other); } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16575,11 +17487,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16605,35 +17521,38 @@ Module num. Wrapping(self.0.wrapping_div(other.0)) } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_div", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_div", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16655,7 +17574,7 @@ Module num. *self = *self / other; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16676,7 +17595,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16698,7 +17617,7 @@ Module num. *self = *self / Wrapping(other); } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16718,11 +17637,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16748,35 +17671,38 @@ Module num. Wrapping(self.0.wrapping_rem(other.0)) } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_rem", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_rem", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -16798,7 +17724,7 @@ Module num. *self = *self % other; } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16819,7 +17745,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16841,7 +17767,7 @@ Module num. *self = *self % Wrapping(other); } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16861,11 +17787,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -16891,23 +17821,27 @@ Module num. Wrapping(!self.0) } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - UnOp.Pure.not - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -16933,31 +17867,35 @@ Module num. Wrapping(self.0 ^ other.0) } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_xor - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_xor (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -16979,7 +17917,7 @@ Module num. *self = *self ^ other; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17000,7 +17938,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17022,7 +17960,7 @@ Module num. *self = *self ^ Wrapping(other); } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17042,11 +17980,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17072,31 +18014,35 @@ Module num. Wrapping(self.0 | other.0) } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_or - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_or (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -17118,7 +18064,7 @@ Module num. *self = *self | other; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17139,7 +18085,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17161,7 +18107,7 @@ Module num. *self = *self | Wrapping(other); } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17181,11 +18127,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17211,31 +18161,35 @@ Module num. Wrapping(self.0 & other.0) } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - BinOp.Pure.bit_and - (M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - (M.read (| - M.SubPointer.get_struct_tuple_field (| - other, - "core::num::wrapping::Wrapping", - 0 - |) - |)) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (BinOp.Pure.bit_and (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + other, + "core::num::wrapping::Wrapping", + 0 + |) + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -17257,7 +18211,7 @@ Module num. *self = *self & other; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17278,7 +18232,7 @@ Module num. [ M.read (| M.read (| self |) |); M.read (| other |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17300,7 +18254,7 @@ Module num. *self = *self & Wrapping(other); } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17320,11 +18274,15 @@ Module num. |), [ M.read (| M.read (| self |) |); - Value.StructTuple "core::num::wrapping::Wrapping" [ M.read (| other |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| other |)) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -17350,7 +18308,7 @@ Module num. Wrapping(0) - self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17364,7 +18322,11 @@ Module num. [] |), [ - Value.StructTuple "core::num::wrapping::Wrapping" [ Value.Integer Integer.I128 0 ]; + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |); M.read (| self |) ] |))) @@ -17386,33 +18348,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "usize" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "usize" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -17422,7 +18388,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17445,7 +18411,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17468,7 +18434,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17492,29 +18458,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17525,29 +18494,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17559,27 +18531,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17590,27 +18565,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17622,27 +18600,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17653,27 +18634,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17684,27 +18668,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17715,27 +18702,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17746,29 +18736,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "usize", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17778,7 +18771,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17802,7 +18795,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17826,27 +18819,34 @@ Module num. Wrapping(self.0.wrapping_next_power_of_two()) } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "usize", "wrapping_next_power_of_two", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "wrapping_next_power_of_two", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17859,33 +18859,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u8" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u8" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -17895,7 +18899,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17918,7 +18922,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17941,7 +18945,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -17965,29 +18969,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -17998,29 +19005,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18032,27 +19042,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18063,27 +19076,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18095,27 +19111,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18126,27 +19145,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18157,27 +19179,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18188,27 +19213,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18219,29 +19247,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u8", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18251,7 +19282,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18275,7 +19306,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18299,27 +19330,34 @@ Module num. Wrapping(self.0.wrapping_next_power_of_two()) } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u8", "wrapping_next_power_of_two", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "u8", + "wrapping_next_power_of_two", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18333,33 +19371,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u16" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u16" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -18369,7 +19411,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18392,7 +19434,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18415,7 +19457,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18439,29 +19481,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18472,29 +19517,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18506,27 +19554,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18537,27 +19588,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18569,27 +19623,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18600,27 +19657,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18631,27 +19691,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18662,27 +19725,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18693,29 +19759,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u16", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18725,7 +19794,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18749,7 +19818,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18773,27 +19842,34 @@ Module num. Wrapping(self.0.wrapping_next_power_of_two()) } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u16", "wrapping_next_power_of_two", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "u16", + "wrapping_next_power_of_two", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18807,33 +19883,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u32" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u32" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -18843,7 +19923,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18866,7 +19946,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18889,7 +19969,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -18913,29 +19993,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18946,29 +20029,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -18980,27 +20066,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19011,27 +20100,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19043,27 +20135,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19074,27 +20169,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19105,27 +20203,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19136,27 +20237,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19167,29 +20271,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u32", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19199,7 +20306,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19223,7 +20330,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19247,27 +20354,34 @@ Module num. Wrapping(self.0.wrapping_next_power_of_two()) } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u32", "wrapping_next_power_of_two", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "u32", + "wrapping_next_power_of_two", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19281,33 +20395,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u64" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u64" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -19317,7 +20435,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19340,7 +20458,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19363,7 +20481,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19387,29 +20505,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19420,29 +20541,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19454,27 +20578,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19485,27 +20612,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19517,27 +20647,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19548,27 +20681,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19579,27 +20715,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19610,27 +20749,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19641,29 +20783,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19673,7 +20818,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19697,7 +20842,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19721,27 +20866,34 @@ Module num. Wrapping(self.0.wrapping_next_power_of_two()) } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u64", "wrapping_next_power_of_two", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "u64", + "wrapping_next_power_of_two", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19755,33 +20907,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u128" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "u128" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -19791,7 +20947,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19814,7 +20970,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19837,7 +20993,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -19861,29 +21017,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19894,29 +21053,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19928,27 +21090,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19959,27 +21124,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -19991,27 +21159,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20022,27 +21193,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20053,27 +21227,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20084,27 +21261,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20115,29 +21295,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "u128", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20147,7 +21330,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20171,7 +21354,7 @@ Module num. self.0.is_power_of_two() } *) - Definition is_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition is_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20195,27 +21378,34 @@ Module num. Wrapping(self.0.wrapping_next_power_of_two()) } *) - Definition next_power_of_two (τ : list Ty.t) (α : list Value.t) : M := + Definition next_power_of_two (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "u128", "wrapping_next_power_of_two", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "u128", + "wrapping_next_power_of_two", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20229,33 +21419,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "isize" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "isize" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -20265,7 +21459,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20288,7 +21482,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20311,7 +21505,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20335,29 +21529,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20368,29 +21565,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20402,27 +21602,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20433,27 +21636,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20465,27 +21671,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20496,27 +21705,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20527,27 +21739,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20558,27 +21773,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20589,29 +21807,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20621,7 +21842,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20645,27 +21866,30 @@ Module num. Wrapping(self.0.wrapping_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "wrapping_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "wrapping_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20676,27 +21900,30 @@ Module num. Wrapping(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "isize", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "isize", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20707,7 +21934,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20730,7 +21957,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20754,33 +21981,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i8" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i8" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -20790,7 +22021,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20813,7 +22044,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20836,7 +22067,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -20860,29 +22091,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20893,29 +22127,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20927,27 +22164,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20958,27 +22198,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -20990,27 +22233,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21021,27 +22267,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21052,27 +22301,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21083,27 +22335,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21114,29 +22369,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21146,7 +22404,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21170,27 +22428,30 @@ Module num. Wrapping(self.0.wrapping_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "wrapping_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "wrapping_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21201,27 +22462,30 @@ Module num. Wrapping(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i8", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i8", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21232,7 +22496,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21255,7 +22519,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21280,33 +22544,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i16" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i16" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -21316,7 +22584,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21339,7 +22607,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21362,7 +22630,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21386,29 +22654,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21419,29 +22690,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21453,27 +22727,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21484,27 +22761,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21516,27 +22796,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21547,27 +22830,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21578,27 +22864,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21609,27 +22898,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21640,29 +22932,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21672,7 +22967,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21696,27 +22991,30 @@ Module num. Wrapping(self.0.wrapping_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "wrapping_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "wrapping_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21727,27 +23025,30 @@ Module num. Wrapping(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i16", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i16", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21758,7 +23059,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21781,7 +23082,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21806,33 +23107,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i32" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i32" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -21842,7 +23147,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21865,7 +23170,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21888,7 +23193,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -21912,29 +23217,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21945,29 +23253,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -21979,27 +23290,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22010,27 +23324,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22042,27 +23359,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22073,27 +23393,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22104,27 +23427,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22135,27 +23461,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22166,29 +23495,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22198,7 +23530,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22222,27 +23554,30 @@ Module num. Wrapping(self.0.wrapping_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "wrapping_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "wrapping_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22253,27 +23588,30 @@ Module num. Wrapping(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i32", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i32", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22284,7 +23622,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22307,7 +23645,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22332,33 +23670,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i64" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i64" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -22368,7 +23710,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22391,7 +23733,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22414,7 +23756,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22438,29 +23780,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22471,29 +23816,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22505,27 +23853,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22536,27 +23887,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22568,27 +23922,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22599,27 +23956,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22630,27 +23990,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22661,27 +24024,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22692,29 +24058,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22724,7 +24093,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22748,27 +24117,30 @@ Module num. Wrapping(self.0.wrapping_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "wrapping_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "wrapping_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22779,27 +24151,30 @@ Module num. Wrapping(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i64", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i64", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22810,7 +24185,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22833,7 +24208,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22858,33 +24233,37 @@ Module num. (* pub const MIN: Self = Self(<$t>::MIN); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i128" ] *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MIN" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. (* pub const MAX: Self = Self(<$t>::MAX); *) (* Ty.apply (Ty.path "core::num::wrapping::Wrapping") [ Ty.path "i128" ] *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::num::wrapping::Wrapping" - [ M.read (| M.get_constant (| "core::num::MAX" |) |) ] + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |)) ] + |) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. (* pub const BITS: u32 = <$t>::BITS; *) (* Ty.path "u32" *) - Definition value_BITS : Value.t := + Definition value_BITS : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::BITS" |))). Axiom AssociatedConstant_value_BITS : M.IsAssociatedConstant Self "value_BITS" value_BITS. @@ -22894,7 +24273,7 @@ Module num. self.0.count_ones() } *) - Definition count_ones (τ : list Ty.t) (α : list Value.t) : M := + Definition count_ones (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22917,7 +24296,7 @@ Module num. self.0.count_zeros() } *) - Definition count_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition count_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22940,7 +24319,7 @@ Module num. self.0.trailing_zeros() } *) - Definition trailing_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition trailing_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -22964,29 +24343,32 @@ Module num. Wrapping(self.0.rotate_left(n)) } *) - Definition rotate_left (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "rotate_left", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "rotate_left", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -22997,29 +24379,32 @@ Module num. Wrapping(self.0.rotate_right(n)) } *) - Definition rotate_right (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "rotate_right", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| n |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "rotate_right", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| n |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23031,27 +24416,30 @@ Module num. Wrapping(self.0.swap_bytes()) } *) - Definition swap_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "swap_bytes", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "swap_bytes", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23062,27 +24450,30 @@ Module num. Wrapping(self.0.reverse_bits()) } *) - Definition reverse_bits (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_bits (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "reverse_bits", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "reverse_bits", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23094,27 +24485,30 @@ Module num. Wrapping(<$t>::from_be(x.0)) } *) - Definition from_be (τ : list Ty.t) (α : list Value.t) : M := + Definition from_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "from_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "from_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23125,27 +24519,30 @@ Module num. Wrapping(<$t>::from_le(x.0)) } *) - Definition from_le (τ : list Ty.t) (α : list Value.t) : M := + Definition from_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "from_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - x, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "from_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + x, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23156,27 +24553,30 @@ Module num. Wrapping(self.0.to_be()) } *) - Definition to_be (τ : list Ty.t) (α : list Value.t) : M := + Definition to_be (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "to_be", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "to_be", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23187,27 +24587,30 @@ Module num. Wrapping(self.0.to_le()) } *) - Definition to_le (τ : list Ty.t) (α : list Value.t) : M := + Definition to_le (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "to_le", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "to_le", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23218,29 +24621,32 @@ Module num. Wrapping(self.0.wrapping_pow(exp)) } *) - Definition pow (τ : list Ty.t) (α : list Value.t) : M := + Definition pow (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; exp ] => ltac:(M.monadic (let self := M.alloc (| self |) in let exp := M.alloc (| exp |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_pow", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |); - M.read (| exp |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_pow", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |); + M.read (| exp |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23250,7 +24656,7 @@ Module num. self.0.leading_zeros() } *) - Definition leading_zeros (τ : list Ty.t) (α : list Value.t) : M := + Definition leading_zeros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -23274,27 +24680,30 @@ Module num. Wrapping(self.0.wrapping_abs()) } *) - Definition abs (τ : list Ty.t) (α : list Value.t) : M := + Definition abs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "wrapping_abs", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "wrapping_abs", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23305,27 +24714,30 @@ Module num. Wrapping(self.0.signum()) } *) - Definition signum (τ : list Ty.t) (α : list Value.t) : M := + Definition signum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::num::wrapping::Wrapping" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "i128", "signum", [] |), - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::num::wrapping::Wrapping", - 0 - |) - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::num::wrapping::Wrapping" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "i128", "signum", [] |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::num::wrapping::Wrapping", + 0 + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -23336,7 +24748,7 @@ Module num. self.0.is_positive() } *) - Definition is_positive (τ : list Ty.t) (α : list Value.t) : M := + Definition is_positive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -23359,7 +24771,7 @@ Module num. self.0.is_negative() } *) - Definition is_negative (τ : list Ty.t) (α : list Value.t) : M := + Definition is_negative (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -23392,76 +24804,96 @@ Module num. Module shift_max. Module platform. - Definition usize : Value.t := + Definition usize : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::wrapping::shift_max::u64" |))). - Definition isize : Value.t := + Definition isize : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::wrapping::shift_max::i64" |))). End platform. - Definition i8 : Value.t := + Definition i8 : A.t := M.run ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| - BinOp.Panic.shl (| Value.Integer Integer.U32 1, Value.Integer Integer.I32 3 |), - Value.Integer Integer.U32 1 + Integer.U32, + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 3 |) + |), + M.of_value (| Value.Integer 1 |) |) |))). - Definition i16 : Value.t := + Definition i16 : A.t := M.run ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| - BinOp.Panic.shl (| Value.Integer Integer.U32 1, Value.Integer Integer.I32 4 |), - Value.Integer Integer.U32 1 + Integer.U32, + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 4 |) + |), + M.of_value (| Value.Integer 1 |) |) |))). - Definition i32 : Value.t := + Definition i32 : A.t := M.run ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| - BinOp.Panic.shl (| Value.Integer Integer.U32 1, Value.Integer Integer.I32 5 |), - Value.Integer Integer.U32 1 + Integer.U32, + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 5 |) + |), + M.of_value (| Value.Integer 1 |) |) |))). - Definition i64 : Value.t := + Definition i64 : A.t := M.run ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| - BinOp.Panic.shl (| Value.Integer Integer.U32 1, Value.Integer Integer.I32 6 |), - Value.Integer Integer.U32 1 + Integer.U32, + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 6 |) + |), + M.of_value (| Value.Integer 1 |) |) |))). - Definition i128 : Value.t := + Definition i128 : A.t := M.run ltac:(M.monadic (M.alloc (| BinOp.Panic.sub (| - BinOp.Panic.shl (| Value.Integer Integer.U32 1, Value.Integer Integer.I32 7 |), - Value.Integer Integer.U32 1 + Integer.U32, + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 7 |) + |), + M.of_value (| Value.Integer 1 |) |) |))). - Definition u8 : Value.t := + Definition u8 : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::wrapping::shift_max::i8" |))). - Definition u16 : Value.t := + Definition u16 : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::wrapping::shift_max::i16" |))). - Definition u32 : Value.t := + Definition u32 : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::wrapping::shift_max::i32" |))). - Definition u64 : Value.t := + Definition u64 : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::wrapping::shift_max::i64" |))). - Definition u128 : Value.t := + Definition u128 : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::num::wrapping::shift_max::i128" |))). End shift_max. End wrapping. diff --git a/CoqOfRust/core/ops/arith.v b/CoqOfRust/core/ops/arith.v index 76165722b..d4deda2f6 100644 --- a/CoqOfRust/core/ops/arith.v +++ b/CoqOfRust/core/ops/arith.v @@ -13,13 +13,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "usize". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -39,13 +39,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u8". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.U8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -65,13 +65,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u16". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.U16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -91,13 +91,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u32". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.U32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -117,13 +117,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u64". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.U64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -143,13 +143,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u128". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.U128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -169,13 +169,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.Isize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -195,13 +195,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.I8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -221,13 +221,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.I16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -247,13 +247,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.I32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -273,13 +273,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.I64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -299,13 +299,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.I128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -325,13 +325,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f32". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -351,13 +351,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f64". (* fn add(self, other: $t) -> $t { self + other } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.add (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -380,13 +380,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "usize". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -406,13 +406,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u8". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.U8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -432,13 +432,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u16". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.U16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -458,13 +458,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u32". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.U32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -484,13 +484,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u64". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.U64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -510,13 +510,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u128". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.U128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -536,13 +536,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.Isize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -562,13 +562,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.I8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -588,13 +588,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.I16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -614,13 +614,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.I32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -640,13 +640,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.I64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -666,13 +666,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.I128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -692,13 +692,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f32". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -718,13 +718,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f64". (* fn sub(self, other: $t) -> $t { self - other } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.sub (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -747,13 +747,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "usize". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -773,13 +773,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u8". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.U8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -799,13 +799,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u16". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.U16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -825,13 +825,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u32". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.U32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -851,13 +851,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u64". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.U64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -877,13 +877,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u128". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.U128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -903,13 +903,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.Isize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -929,13 +929,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.I8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -955,13 +955,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.I16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -981,13 +981,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.I32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1007,13 +1007,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.I64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1033,13 +1033,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.I128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1059,13 +1059,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f32". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1085,13 +1085,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f64". (* fn mul(self, other: $t) -> $t { self * other } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.mul (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1114,13 +1114,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "usize". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1140,13 +1140,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u8". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1166,13 +1166,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u16". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1192,13 +1192,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u32". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1218,13 +1218,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u64". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1244,13 +1244,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u128". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1270,13 +1270,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.Isize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1296,13 +1296,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.I8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1322,13 +1322,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.I16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1348,13 +1348,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.I32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1374,13 +1374,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.I64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1400,13 +1400,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.I128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1426,13 +1426,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f32". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1452,13 +1452,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f64". (* fn div(self, other: $t) -> $t { self / other } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1481,13 +1481,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "usize". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1507,13 +1507,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u8". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1533,13 +1533,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u16". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1559,13 +1559,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u32". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1585,13 +1585,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u64". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1611,13 +1611,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u128". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1637,13 +1637,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.Isize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1663,13 +1663,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.I8, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1689,13 +1689,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.I16, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1715,13 +1715,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.I32, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1741,13 +1741,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.I64, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1767,13 +1767,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.I128, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1793,13 +1793,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f32". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1819,13 +1819,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "f64". (* fn rem(self, other: $t) -> $t { self % other } *) - Definition rem (τ : list Ty.t) (α : list Value.t) : M := + Definition rem (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| M.read (| self |), M.read (| other |) |))) + BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1848,12 +1848,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn neg(self) -> $t { -self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Panic.neg (| M.read (| self |) |))) + UnOp.Panic.neg (| Integer.Isize, M.read (| self |) |))) | _, _ => M.impossible end. @@ -1873,12 +1873,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn neg(self) -> $t { -self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Panic.neg (| M.read (| self |) |))) + UnOp.Panic.neg (| Integer.I8, M.read (| self |) |))) | _, _ => M.impossible end. @@ -1898,12 +1898,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn neg(self) -> $t { -self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Panic.neg (| M.read (| self |) |))) + UnOp.Panic.neg (| Integer.I16, M.read (| self |) |))) | _, _ => M.impossible end. @@ -1923,12 +1923,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn neg(self) -> $t { -self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Panic.neg (| M.read (| self |) |))) + UnOp.Panic.neg (| Integer.I32, M.read (| self |) |))) | _, _ => M.impossible end. @@ -1948,12 +1948,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn neg(self) -> $t { -self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Panic.neg (| M.read (| self |) |))) + UnOp.Panic.neg (| Integer.I64, M.read (| self |) |))) | _, _ => M.impossible end. @@ -1973,12 +1973,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn neg(self) -> $t { -self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Panic.neg (| M.read (| self |) |))) + UnOp.Panic.neg (| Integer.I128, M.read (| self |) |))) | _, _ => M.impossible end. @@ -1998,12 +1998,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "f32". (* fn neg(self) -> $t { -self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Panic.neg (| M.read (| self |) |))) + UnOp.Panic.neg (| Integer.Usize, M.read (| self |) |))) | _, _ => M.impossible end. @@ -2023,12 +2023,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "f64". (* fn neg(self) -> $t { -self } *) - Definition neg (τ : list Ty.t) (α : list Value.t) : M := + Definition neg (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Panic.neg (| M.read (| self |) |))) + UnOp.Panic.neg (| Integer.Usize, M.read (| self |) |))) | _, _ => M.impossible end. @@ -2048,7 +2048,7 @@ Module ops. Definition Self : Ty.t := Ty.path "usize". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2056,7 +2056,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2073,7 +2076,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u8". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2081,7 +2084,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.add (| Integer.U8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2098,7 +2101,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u16". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2106,7 +2109,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.add (| Integer.U16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2123,7 +2126,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u32". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2131,7 +2134,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2148,7 +2151,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u64". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2156,7 +2159,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.add (| Integer.U64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2173,7 +2176,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u128". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2181,7 +2184,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.add (| Integer.U128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2198,7 +2204,7 @@ Module ops. Definition Self : Ty.t := Ty.path "isize". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2206,7 +2212,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.add (| Integer.Isize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2223,7 +2232,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i8". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2231,7 +2240,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.add (| Integer.I8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2248,7 +2257,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i16". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2256,7 +2265,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.add (| Integer.I16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2273,7 +2282,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i32". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2281,7 +2290,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2298,7 +2307,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i64". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2306,7 +2315,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.add (| Integer.I64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2323,7 +2332,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i128". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2331,7 +2340,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.add (| Integer.I128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2348,7 +2360,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f32". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2356,7 +2368,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2373,7 +2388,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f64". (* fn add_assign(&mut self, other: $t) { *self += other } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2381,7 +2396,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2401,7 +2419,7 @@ Module ops. Definition Self : Ty.t := Ty.path "usize". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2409,7 +2427,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2426,7 +2447,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u8". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2434,7 +2455,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.sub (| Integer.U8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2451,7 +2472,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u16". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2459,7 +2480,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.sub (| Integer.U16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2476,7 +2497,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u32". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2484,7 +2505,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.sub (| Integer.U32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2501,7 +2522,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u64". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2509,7 +2530,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.sub (| Integer.U64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2526,7 +2547,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u128". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2534,7 +2555,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.sub (| Integer.U128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2551,7 +2575,7 @@ Module ops. Definition Self : Ty.t := Ty.path "isize". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2559,7 +2583,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.sub (| Integer.Isize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2576,7 +2603,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i8". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2584,7 +2611,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.sub (| Integer.I8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2601,7 +2628,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i16". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2609,7 +2636,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.sub (| Integer.I16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2626,7 +2653,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i32". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2634,7 +2661,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.sub (| Integer.I32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2651,7 +2678,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i64". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2659,7 +2686,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.sub (| Integer.I64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2676,7 +2703,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i128". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2684,7 +2711,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.sub (| Integer.I128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2701,7 +2731,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f32". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2709,7 +2739,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2726,7 +2759,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f64". (* fn sub_assign(&mut self, other: $t) { *self -= other } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2734,7 +2767,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2754,7 +2790,7 @@ Module ops. Definition Self : Ty.t := Ty.path "usize". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2762,7 +2798,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.mul (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2779,7 +2818,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u8". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2787,7 +2826,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.mul (| Integer.U8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2804,7 +2843,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u16". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2812,7 +2851,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.mul (| Integer.U16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2829,7 +2868,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u32". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2837,7 +2876,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.mul (| Integer.U32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2854,7 +2893,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u64". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2862,7 +2901,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.mul (| Integer.U64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2879,7 +2918,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u128". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2887,7 +2926,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.mul (| Integer.U128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2904,7 +2946,7 @@ Module ops. Definition Self : Ty.t := Ty.path "isize". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2912,7 +2954,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.mul (| Integer.Isize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -2929,7 +2974,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i8". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2937,7 +2982,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.mul (| Integer.I8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2954,7 +2999,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i16". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2962,7 +3007,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.mul (| Integer.I16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -2979,7 +3024,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i32". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2987,7 +3032,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.mul (| Integer.I32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3004,7 +3049,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i64". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3012,7 +3057,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.mul (| Integer.I64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3029,7 +3074,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i128". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3037,7 +3082,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.mul (| Integer.I128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3054,7 +3102,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f32". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3062,7 +3110,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.mul (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3079,7 +3130,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f64". (* fn mul_assign(&mut self, other: $t) { *self *= other } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3087,7 +3138,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.mul (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3107,7 +3161,7 @@ Module ops. Definition Self : Ty.t := Ty.path "usize". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3115,7 +3169,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.div (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3132,7 +3189,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u8". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3140,7 +3197,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.div (| Integer.U8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3157,7 +3214,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u16". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3165,7 +3222,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.div (| Integer.U16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3182,7 +3239,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u32". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3190,7 +3247,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.div (| Integer.U32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3207,7 +3264,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u64". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3215,7 +3272,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.div (| Integer.U64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3232,7 +3289,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u128". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3240,7 +3297,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.div (| Integer.U128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3257,7 +3317,7 @@ Module ops. Definition Self : Ty.t := Ty.path "isize". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3265,7 +3325,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.div (| Integer.Isize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3282,7 +3345,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i8". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3290,7 +3353,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.div (| Integer.I8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3307,7 +3370,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i16". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3315,7 +3378,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.div (| Integer.I16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3332,7 +3395,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i32". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3340,7 +3403,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.div (| Integer.I32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3357,7 +3420,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i64". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3365,7 +3428,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.div (| Integer.I64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3382,7 +3445,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i128". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3390,7 +3453,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.div (| Integer.I128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3407,7 +3473,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f32". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3415,7 +3481,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.div (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3432,7 +3501,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f64". (* fn div_assign(&mut self, other: $t) { *self /= other } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3440,7 +3509,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.div (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3460,7 +3532,7 @@ Module ops. Definition Self : Ty.t := Ty.path "usize". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3468,7 +3540,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.rem (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3485,7 +3560,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u8". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3493,7 +3568,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.rem (| Integer.U8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3510,7 +3585,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u16". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3518,7 +3593,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.rem (| Integer.U16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3535,7 +3610,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u32". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3543,7 +3618,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.rem (| Integer.U32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3560,7 +3635,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u64". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3568,7 +3643,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.rem (| Integer.U64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3585,7 +3660,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u128". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3593,7 +3668,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.rem (| Integer.U128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3610,7 +3688,7 @@ Module ops. Definition Self : Ty.t := Ty.path "isize". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3618,7 +3696,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.rem (| Integer.Isize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3635,7 +3716,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i8". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3643,7 +3724,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.rem (| Integer.I8, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3660,7 +3741,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i16". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3668,7 +3749,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.rem (| Integer.I16, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3685,7 +3766,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i32". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3693,7 +3774,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.rem (| Integer.I32, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3710,7 +3791,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i64". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3718,7 +3799,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Panic.rem (| Integer.I64, M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -3735,7 +3816,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i128". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3743,7 +3824,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.rem (| Integer.I128, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3760,7 +3844,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f32". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3768,7 +3852,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.rem (| Integer.Usize, M.read (| β |), M.read (| other |) |) + |) |))) | _, _ => M.impossible end. @@ -3785,7 +3872,7 @@ Module ops. Definition Self : Ty.t := Ty.path "f64". (* fn rem_assign(&mut self, other: $t) { *self %= other } *) - Definition rem_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition rem_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3793,7 +3880,10 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| M.read (| β |), M.read (| other |) |) |) + M.write (| + β, + BinOp.Panic.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..d8b99878f 100644 --- a/CoqOfRust/core/ops/bit.v +++ b/CoqOfRust/core/ops/bit.v @@ -13,12 +13,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "bool". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -38,12 +38,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "usize". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -63,12 +63,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "u8". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -88,12 +88,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "u16". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -113,12 +113,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "u32". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -138,12 +138,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "u64". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -163,12 +163,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "u128". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -188,12 +188,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -213,12 +213,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -238,12 +238,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -263,12 +263,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -288,12 +288,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -313,12 +313,12 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn not(self) -> $t { !self } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not (M.read (| self |)))) + UnOp.Pure.not (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -342,7 +342,7 @@ Module ops. match self {} } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -370,13 +370,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "bool". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -396,13 +396,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "usize". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -422,13 +422,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u8". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -448,13 +448,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u16". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -474,13 +474,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u32". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -500,13 +500,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u64". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -526,13 +526,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u128". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -552,13 +552,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -578,13 +578,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -604,13 +604,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -630,13 +630,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -656,13 +656,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -682,13 +682,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn bitand(self, rhs: $t) -> $t { self & rhs } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_and (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -711,13 +711,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "bool". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -737,13 +737,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "usize". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -763,13 +763,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u8". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -789,13 +789,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u16". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -815,13 +815,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u32". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -841,13 +841,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u64". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -867,13 +867,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u128". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -893,13 +893,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -919,13 +919,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -945,13 +945,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -971,13 +971,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -997,13 +997,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -1023,13 +1023,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn bitor(self, rhs: $t) -> $t { self | rhs } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Pure.bit_or (M.read (| self |)) (M.read (| rhs |)))) + BinOp.Pure.bit_or (| M.read (| self |), M.read (| rhs |) |))) | _, _ => M.impossible end. @@ -1052,13 +1052,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "bool". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1078,13 +1078,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "usize". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1104,13 +1104,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u8". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1130,13 +1130,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u16". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1156,13 +1156,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u32". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1182,13 +1182,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u64". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1208,13 +1208,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "u128". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1234,13 +1234,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "isize". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1260,13 +1260,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i8". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1286,13 +1286,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i16". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1312,13 +1312,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i32". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1338,13 +1338,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i64". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1364,13 +1364,13 @@ Module ops. Definition _Output : Ty.t := Ty.path "i128". (* fn bitxor(self, other: $t) -> $t { self ^ other } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| other |)))) + BinOp.Pure.bit_xor (| M.read (| self |), M.read (| other |) |))) | _, _ => M.impossible end. @@ -1397,7 +1397,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1427,7 +1427,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1457,7 +1457,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1487,7 +1487,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1517,7 +1517,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1547,7 +1547,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1577,7 +1577,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1607,7 +1607,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1637,7 +1637,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1667,7 +1667,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1697,7 +1697,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1727,7 +1727,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1757,7 +1757,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1787,7 +1787,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1817,7 +1817,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1847,7 +1847,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1877,7 +1877,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1907,7 +1907,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1937,7 +1937,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1967,7 +1967,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1997,7 +1997,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2027,7 +2027,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2057,7 +2057,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2087,7 +2087,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2117,7 +2117,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2147,7 +2147,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2177,7 +2177,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2207,7 +2207,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2237,7 +2237,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2267,7 +2267,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2297,7 +2297,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2327,7 +2327,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2357,7 +2357,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2387,7 +2387,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2417,7 +2417,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2447,7 +2447,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2477,7 +2477,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2507,7 +2507,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2537,7 +2537,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2567,7 +2567,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2597,7 +2597,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2627,7 +2627,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2657,7 +2657,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2687,7 +2687,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2717,7 +2717,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2747,7 +2747,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2777,7 +2777,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2807,7 +2807,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2837,7 +2837,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2867,7 +2867,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2897,7 +2897,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2927,7 +2927,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2957,7 +2957,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -2987,7 +2987,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3017,7 +3017,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3047,7 +3047,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3077,7 +3077,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3107,7 +3107,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3137,7 +3137,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3167,7 +3167,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3197,7 +3197,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3227,7 +3227,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3257,7 +3257,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3287,7 +3287,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3317,7 +3317,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3347,7 +3347,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3377,7 +3377,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3407,7 +3407,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3437,7 +3437,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3467,7 +3467,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3497,7 +3497,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3527,7 +3527,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3557,7 +3557,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3587,7 +3587,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3617,7 +3617,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3647,7 +3647,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3677,7 +3677,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3707,7 +3707,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3737,7 +3737,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3767,7 +3767,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3797,7 +3797,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3827,7 +3827,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3857,7 +3857,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3887,7 +3887,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3917,7 +3917,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3947,7 +3947,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3977,7 +3977,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4007,7 +4007,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4037,7 +4037,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4067,7 +4067,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4097,7 +4097,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4127,7 +4127,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4157,7 +4157,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4187,7 +4187,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4217,7 +4217,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4247,7 +4247,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4277,7 +4277,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4307,7 +4307,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4337,7 +4337,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4367,7 +4367,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4397,7 +4397,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4427,7 +4427,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4457,7 +4457,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4487,7 +4487,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4517,7 +4517,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4547,7 +4547,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4577,7 +4577,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4607,7 +4607,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4637,7 +4637,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4667,7 +4667,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4697,7 +4697,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4727,7 +4727,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4757,7 +4757,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4787,7 +4787,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4817,7 +4817,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4847,7 +4847,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4877,7 +4877,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4907,7 +4907,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4937,7 +4937,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4967,7 +4967,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4997,7 +4997,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5027,7 +5027,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5057,7 +5057,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5087,7 +5087,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5117,7 +5117,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5147,7 +5147,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5177,7 +5177,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5207,7 +5207,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5237,7 +5237,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5267,7 +5267,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5297,7 +5297,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5327,7 +5327,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5357,7 +5357,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5387,7 +5387,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5417,7 +5417,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5447,7 +5447,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5477,7 +5477,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5507,7 +5507,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5537,7 +5537,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5567,7 +5567,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5597,7 +5597,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5627,7 +5627,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5657,7 +5657,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5687,7 +5687,7 @@ Module ops. self << other } *) - Definition shl (τ : list Ty.t) (α : list Value.t) : M := + Definition shl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5720,7 +5720,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5750,7 +5750,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5780,7 +5780,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5810,7 +5810,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5840,7 +5840,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5870,7 +5870,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5900,7 +5900,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5930,7 +5930,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5960,7 +5960,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5990,7 +5990,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6020,7 +6020,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6050,7 +6050,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6080,7 +6080,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6110,7 +6110,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6140,7 +6140,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6170,7 +6170,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6200,7 +6200,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6230,7 +6230,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6260,7 +6260,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6290,7 +6290,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6320,7 +6320,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6350,7 +6350,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6380,7 +6380,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6410,7 +6410,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6440,7 +6440,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6470,7 +6470,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6500,7 +6500,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6530,7 +6530,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6560,7 +6560,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6590,7 +6590,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6620,7 +6620,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6650,7 +6650,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6680,7 +6680,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6710,7 +6710,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6740,7 +6740,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6770,7 +6770,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6800,7 +6800,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6830,7 +6830,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6860,7 +6860,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6890,7 +6890,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6920,7 +6920,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6950,7 +6950,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -6980,7 +6980,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7010,7 +7010,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7040,7 +7040,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7070,7 +7070,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7100,7 +7100,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7130,7 +7130,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7160,7 +7160,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7190,7 +7190,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7220,7 +7220,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7250,7 +7250,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7280,7 +7280,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7310,7 +7310,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7340,7 +7340,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7370,7 +7370,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7400,7 +7400,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7430,7 +7430,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7460,7 +7460,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7490,7 +7490,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7520,7 +7520,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7550,7 +7550,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7580,7 +7580,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7610,7 +7610,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7640,7 +7640,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7670,7 +7670,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7700,7 +7700,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7730,7 +7730,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7760,7 +7760,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7790,7 +7790,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7820,7 +7820,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7850,7 +7850,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7880,7 +7880,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7910,7 +7910,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7940,7 +7940,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -7970,7 +7970,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8000,7 +8000,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8030,7 +8030,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8060,7 +8060,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8090,7 +8090,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8120,7 +8120,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8150,7 +8150,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8180,7 +8180,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8210,7 +8210,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8240,7 +8240,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8270,7 +8270,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8300,7 +8300,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8330,7 +8330,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8360,7 +8360,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8390,7 +8390,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8420,7 +8420,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8450,7 +8450,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8480,7 +8480,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8510,7 +8510,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8540,7 +8540,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8570,7 +8570,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8600,7 +8600,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8630,7 +8630,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8660,7 +8660,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8690,7 +8690,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8720,7 +8720,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8750,7 +8750,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8780,7 +8780,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8810,7 +8810,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8840,7 +8840,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8870,7 +8870,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8900,7 +8900,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8930,7 +8930,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8960,7 +8960,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -8990,7 +8990,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9020,7 +9020,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9050,7 +9050,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9080,7 +9080,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9110,7 +9110,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9140,7 +9140,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9170,7 +9170,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9200,7 +9200,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9230,7 +9230,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9260,7 +9260,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9290,7 +9290,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9320,7 +9320,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9350,7 +9350,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9380,7 +9380,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9410,7 +9410,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9440,7 +9440,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9470,7 +9470,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9500,7 +9500,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9530,7 +9530,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9560,7 +9560,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9590,7 +9590,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9620,7 +9620,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9650,7 +9650,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9680,7 +9680,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9710,7 +9710,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9740,7 +9740,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9770,7 +9770,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9800,7 +9800,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9830,7 +9830,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9860,7 +9860,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9890,7 +9890,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9920,7 +9920,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9950,7 +9950,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -9980,7 +9980,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10010,7 +10010,7 @@ Module ops. self >> other } *) - Definition shr (τ : list Ty.t) (α : list Value.t) : M := + Definition shr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10036,7 +10036,7 @@ Module ops. Definition Self : Ty.t := Ty.path "bool". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10044,7 +10044,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10061,7 +10061,7 @@ Module ops. Definition Self : Ty.t := Ty.path "usize". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10069,7 +10069,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10086,7 +10086,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u8". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10094,7 +10094,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10111,7 +10111,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u16". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10119,7 +10119,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10136,7 +10136,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u32". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10144,7 +10144,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10161,7 +10161,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u64". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10169,7 +10169,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10186,7 +10186,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u128". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10194,7 +10194,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10211,7 +10211,7 @@ Module ops. Definition Self : Ty.t := Ty.path "isize". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10219,7 +10219,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10236,7 +10236,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i8". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10244,7 +10244,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10261,7 +10261,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i16". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10269,7 +10269,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10286,7 +10286,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i32". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10294,7 +10294,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10311,7 +10311,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i64". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10319,7 +10319,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10336,7 +10336,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i128". (* fn bitand_assign(&mut self, other: $t) { *self &= other } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10344,7 +10344,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_and (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10364,7 +10364,7 @@ Module ops. Definition Self : Ty.t := Ty.path "bool". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10372,7 +10372,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10389,7 +10389,7 @@ Module ops. Definition Self : Ty.t := Ty.path "usize". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10397,7 +10397,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10414,7 +10414,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u8". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10422,7 +10422,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10439,7 +10439,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u16". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10447,7 +10447,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10464,7 +10464,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u32". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10472,7 +10472,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10489,7 +10489,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u64". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10497,7 +10497,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10514,7 +10514,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u128". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10522,7 +10522,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10539,7 +10539,7 @@ Module ops. Definition Self : Ty.t := Ty.path "isize". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10547,7 +10547,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10564,7 +10564,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i8". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10572,7 +10572,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10589,7 +10589,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i16". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10597,7 +10597,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10614,7 +10614,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i32". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10622,7 +10622,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10639,7 +10639,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i64". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10647,7 +10647,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10664,7 +10664,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i128". (* fn bitor_assign(&mut self, other: $t) { *self |= other } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10672,7 +10672,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_or (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10692,7 +10692,7 @@ Module ops. Definition Self : Ty.t := Ty.path "bool". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10700,7 +10700,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10717,7 +10717,7 @@ Module ops. Definition Self : Ty.t := Ty.path "usize". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10725,7 +10725,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10742,7 +10742,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u8". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10750,7 +10750,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10767,7 +10767,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u16". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10775,7 +10775,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10792,7 +10792,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u32". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10800,7 +10800,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10817,7 +10817,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u64". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10825,7 +10825,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10842,7 +10842,7 @@ Module ops. Definition Self : Ty.t := Ty.path "u128". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10850,7 +10850,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10867,7 +10867,7 @@ Module ops. Definition Self : Ty.t := Ty.path "isize". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10875,7 +10875,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10892,7 +10892,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i8". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10900,7 +10900,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10917,7 +10917,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i16". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10925,7 +10925,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10942,7 +10942,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i32". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10950,7 +10950,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10967,7 +10967,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i64". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -10975,7 +10975,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -10992,7 +10992,7 @@ Module ops. Definition Self : Ty.t := Ty.path "i128". (* fn bitxor_assign(&mut self, other: $t) { *self ^= other } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11000,7 +11000,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| other |)) |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| other |) |) |) |))) | _, _ => M.impossible end. @@ -11024,7 +11024,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11053,7 +11053,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11082,7 +11082,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11111,7 +11111,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11140,7 +11140,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11169,7 +11169,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11198,7 +11198,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11227,7 +11227,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11256,7 +11256,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11285,7 +11285,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11314,7 +11314,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11343,7 +11343,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11372,7 +11372,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11401,7 +11401,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11430,7 +11430,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11459,7 +11459,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11488,7 +11488,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11517,7 +11517,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11546,7 +11546,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11575,7 +11575,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11604,7 +11604,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11633,7 +11633,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11662,7 +11662,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11691,7 +11691,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11720,7 +11720,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11749,7 +11749,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11778,7 +11778,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11807,7 +11807,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11836,7 +11836,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11865,7 +11865,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11894,7 +11894,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11923,7 +11923,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11952,7 +11952,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -11981,7 +11981,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12010,7 +12010,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12039,7 +12039,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12068,7 +12068,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12097,7 +12097,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12126,7 +12126,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12155,7 +12155,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12184,7 +12184,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12213,7 +12213,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12242,7 +12242,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12271,7 +12271,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12300,7 +12300,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12329,7 +12329,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12358,7 +12358,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12387,7 +12387,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12416,7 +12416,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12445,7 +12445,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12474,7 +12474,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12503,7 +12503,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12532,7 +12532,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12561,7 +12561,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12590,7 +12590,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12619,7 +12619,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12648,7 +12648,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12677,7 +12677,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12706,7 +12706,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12735,7 +12735,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12764,7 +12764,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12793,7 +12793,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12822,7 +12822,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12851,7 +12851,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12880,7 +12880,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12909,7 +12909,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12938,7 +12938,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12967,7 +12967,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -12996,7 +12996,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13025,7 +13025,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13054,7 +13054,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13083,7 +13083,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13112,7 +13112,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13141,7 +13141,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13170,7 +13170,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13199,7 +13199,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13228,7 +13228,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13257,7 +13257,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13286,7 +13286,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13315,7 +13315,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13344,7 +13344,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13373,7 +13373,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13402,7 +13402,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13431,7 +13431,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13460,7 +13460,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13489,7 +13489,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13518,7 +13518,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13547,7 +13547,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13576,7 +13576,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13605,7 +13605,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13634,7 +13634,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13663,7 +13663,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13692,7 +13692,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13721,7 +13721,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13750,7 +13750,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13779,7 +13779,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13808,7 +13808,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13837,7 +13837,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13866,7 +13866,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13895,7 +13895,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13924,7 +13924,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13953,7 +13953,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -13982,7 +13982,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14011,7 +14011,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14040,7 +14040,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14069,7 +14069,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14098,7 +14098,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14127,7 +14127,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14156,7 +14156,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14185,7 +14185,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14214,7 +14214,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14243,7 +14243,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14272,7 +14272,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14301,7 +14301,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14330,7 +14330,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14359,7 +14359,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14388,7 +14388,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14417,7 +14417,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14446,7 +14446,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14475,7 +14475,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14504,7 +14504,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14533,7 +14533,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14562,7 +14562,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14591,7 +14591,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14620,7 +14620,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14649,7 +14649,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14678,7 +14678,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14707,7 +14707,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14736,7 +14736,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14765,7 +14765,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14794,7 +14794,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14823,7 +14823,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14852,7 +14852,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14881,7 +14881,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14910,7 +14910,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14939,7 +14939,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14968,7 +14968,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -14997,7 +14997,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15026,7 +15026,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15055,7 +15055,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15084,7 +15084,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15113,7 +15113,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15142,7 +15142,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15171,7 +15171,7 @@ Module ops. *self <<= other } *) - Definition shl_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shl_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15203,7 +15203,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15232,7 +15232,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15261,7 +15261,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15290,7 +15290,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15319,7 +15319,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15348,7 +15348,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15377,7 +15377,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15406,7 +15406,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15435,7 +15435,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15464,7 +15464,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15493,7 +15493,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15522,7 +15522,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15551,7 +15551,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15580,7 +15580,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15609,7 +15609,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15638,7 +15638,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15667,7 +15667,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15696,7 +15696,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15725,7 +15725,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15754,7 +15754,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15783,7 +15783,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15812,7 +15812,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15841,7 +15841,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15870,7 +15870,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15899,7 +15899,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15928,7 +15928,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15957,7 +15957,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -15986,7 +15986,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16015,7 +16015,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16044,7 +16044,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16073,7 +16073,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16102,7 +16102,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16131,7 +16131,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16160,7 +16160,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16189,7 +16189,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16218,7 +16218,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16247,7 +16247,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16276,7 +16276,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16305,7 +16305,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16334,7 +16334,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16363,7 +16363,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16392,7 +16392,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16421,7 +16421,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16450,7 +16450,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16479,7 +16479,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16508,7 +16508,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16537,7 +16537,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16566,7 +16566,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16595,7 +16595,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16624,7 +16624,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16653,7 +16653,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16682,7 +16682,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16711,7 +16711,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16740,7 +16740,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16769,7 +16769,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16798,7 +16798,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16827,7 +16827,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16856,7 +16856,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16885,7 +16885,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16914,7 +16914,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16943,7 +16943,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -16972,7 +16972,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17001,7 +17001,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17030,7 +17030,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17059,7 +17059,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17088,7 +17088,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17117,7 +17117,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17146,7 +17146,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17175,7 +17175,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17204,7 +17204,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17233,7 +17233,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17262,7 +17262,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17291,7 +17291,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17320,7 +17320,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17349,7 +17349,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17378,7 +17378,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17407,7 +17407,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17436,7 +17436,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17465,7 +17465,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17494,7 +17494,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17523,7 +17523,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17552,7 +17552,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17581,7 +17581,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17610,7 +17610,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17639,7 +17639,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17668,7 +17668,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17697,7 +17697,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17726,7 +17726,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17755,7 +17755,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17784,7 +17784,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17813,7 +17813,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17842,7 +17842,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17871,7 +17871,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17900,7 +17900,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17929,7 +17929,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17958,7 +17958,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -17987,7 +17987,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18016,7 +18016,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18045,7 +18045,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18074,7 +18074,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18103,7 +18103,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18132,7 +18132,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18161,7 +18161,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18190,7 +18190,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18219,7 +18219,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18248,7 +18248,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18277,7 +18277,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18306,7 +18306,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18335,7 +18335,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18364,7 +18364,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18393,7 +18393,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18422,7 +18422,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18451,7 +18451,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18480,7 +18480,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18509,7 +18509,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18538,7 +18538,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18567,7 +18567,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18596,7 +18596,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18625,7 +18625,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18654,7 +18654,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18683,7 +18683,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18712,7 +18712,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18741,7 +18741,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18770,7 +18770,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18799,7 +18799,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18828,7 +18828,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18857,7 +18857,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18886,7 +18886,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18915,7 +18915,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18944,7 +18944,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -18973,7 +18973,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19002,7 +19002,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19031,7 +19031,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19060,7 +19060,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19089,7 +19089,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19118,7 +19118,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19147,7 +19147,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19176,7 +19176,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19205,7 +19205,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19234,7 +19234,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19263,7 +19263,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19292,7 +19292,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19321,7 +19321,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -19350,7 +19350,7 @@ Module ops. *self >>= other } *) - Definition shr_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition shr_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic diff --git a/CoqOfRust/core/ops/control_flow.v b/CoqOfRust/core/ops/control_flow.v index ee4735de6..e78c33196 100644 --- a/CoqOfRust/core/ops/control_flow.v +++ b/CoqOfRust/core/ops/control_flow.v @@ -28,7 +28,7 @@ Module ops. Ty.apply (Ty.path "core::ops::control_flow::ControlFlow") [ B; C ]. (* Debug *) - Definition fmt (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self; f ] => @@ -58,8 +58,8 @@ Module ops. |), [ M.read (| f |); - M.read (| Value.String "Continue" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Continue" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -82,8 +82,8 @@ Module ops. |), [ M.read (| f |); - M.read (| Value.String "Break" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Break" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -107,7 +107,7 @@ Module ops. Ty.apply (Ty.path "core::ops::control_flow::ControlFlow") [ B; C ]. (* Clone *) - Definition clone (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self ] => @@ -128,14 +128,17 @@ Module ops. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", C, [], "clone", [] |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", C, [], "clone", [] |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -148,14 +151,17 @@ Module ops. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", B, [], "clone", [] |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", B, [], "clone", [] |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))) ] |) @@ -203,7 +209,7 @@ Module ops. Ty.apply (Ty.path "core::ops::control_flow::ControlFlow") [ B; C ]. (* PartialEq *) - Definition eq (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self; other ] => @@ -233,11 +239,16 @@ Module ops. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -349,7 +360,7 @@ Module ops. Ty.apply (Ty.path "core::ops::control_flow::ControlFlow") [ B; C ]. (* Eq *) - Definition assert_receiver_is_total_eq (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self ] => @@ -357,13 +368,14 @@ Module ops. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -387,7 +399,7 @@ Module ops. Ty.apply (Ty.path "core::ops::control_flow::ControlFlow") [ B; C ]. (* Hash *) - Definition hash (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [ __H ], [ self; state ] => @@ -486,15 +498,17 @@ Module ops. ControlFlow::Continue(output) } *) - Definition from_output (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_output (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ output ] => ltac:(M.monadic (let output := M.alloc (| output |) in - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ M.read (| output |) ])) + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ A.to_value (M.read (| output |)) ] + |))) | _, _ => M.impossible end. @@ -506,7 +520,7 @@ Module ops. } } *) - Definition branch (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition branch (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self ] => @@ -526,9 +540,11 @@ Module ops. |) in let c := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ M.read (| c |) ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ A.to_value (M.read (| c |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -540,13 +556,18 @@ Module ops. |) in let b := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ M.read (| b |) ] - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ A.to_value (M.read (| b |)) ] + |)) + ] + |) |))) ] |) @@ -580,7 +601,7 @@ Module ops. } } *) - Definition from_residual (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_residual (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ residual ] => @@ -600,9 +621,11 @@ Module ops. |) in let b := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ M.read (| b |) ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ A.to_value (M.read (| b |)) ] + |) |))) ] |) @@ -647,7 +670,7 @@ Module ops. matches!( *self, ControlFlow::Break(_)) } *) - Definition is_break (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_break (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self ] => @@ -665,8 +688,8 @@ Module ops. "core::ops::control_flow::ControlFlow::Break", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -682,7 +705,7 @@ Module ops. matches!( *self, ControlFlow::Continue(_)) } *) - Definition is_continue (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_continue (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self ] => @@ -700,8 +723,8 @@ Module ops. "core::ops::control_flow::ControlFlow::Continue", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -720,7 +743,7 @@ Module ops. } } *) - Definition break_value (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition break_value (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self ] => @@ -732,7 +755,9 @@ Module ops. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -743,7 +768,11 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))) ] |) @@ -766,7 +795,7 @@ Module ops. } } *) - Definition map_break (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_break (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [ T; F ], [ self; f ] => @@ -787,9 +816,11 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -801,20 +832,26 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ B ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| x |) ] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ B ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) + ] + |)) + ] + |) |))) ] |) @@ -834,7 +871,7 @@ Module ops. } } *) - Definition continue_value (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition continue_value (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [], [ self ] => @@ -854,11 +891,17 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -880,7 +923,7 @@ Module ops. } } *) - Definition map_continue (B C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_continue (B C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B C in match τ, α with | [ T; F ], [ self; f ] => @@ -901,20 +944,26 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ C ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| x |) ] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ C ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -926,9 +975,11 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ A.to_value (M.read (| x |)) ] + |) |))) ] |) @@ -953,7 +1004,7 @@ Module ops. } } *) - Definition from_try (R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_try (R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self R in match τ, α with | [], [ r ] => @@ -978,9 +1029,11 @@ Module ops. |) in let v := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ M.read (| v |) ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ A.to_value (M.read (| v |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -992,20 +1045,23 @@ Module ops. |) in let v := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::FromResidual", - R, - [ Ty.associated ], - "from_residual", - [] - |), - [ M.read (| v |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::FromResidual", + R, + [ Ty.associated ], + "from_residual", + [] + |), + [ M.read (| v |) ] + |)) + ] + |) |))) ] |) @@ -1025,7 +1081,7 @@ Module ops. } } *) - Definition into_try (R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_try (R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self R in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/ops/coroutine.v b/CoqOfRust/core/ops/coroutine.v index 11cdf6085..a583f8d61 100644 --- a/CoqOfRust/core/ops/coroutine.v +++ b/CoqOfRust/core/ops/coroutine.v @@ -28,7 +28,7 @@ Module ops. Ty.apply (Ty.path "core::ops::coroutine::CoroutineState") [ Y; R ]. (* Clone *) - Definition clone (Y R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (Y R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y R in match τ, α with | [], [ self ] => @@ -49,14 +49,17 @@ Module ops. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::ops::coroutine::CoroutineState::Yielded" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Y, [], "clone", [] |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::coroutine::CoroutineState::Yielded" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Y, [], "clone", [] |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -69,14 +72,17 @@ Module ops. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::ops::coroutine::CoroutineState::Complete" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", R, [], "clone", [] |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::coroutine::CoroutineState::Complete" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", R, [], "clone", [] |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))) ] |) @@ -124,7 +130,7 @@ Module ops. Ty.apply (Ty.path "core::ops::coroutine::CoroutineState") [ Y; R ]. (* PartialEq *) - Definition eq (Y R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Y R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y R in match τ, α with | [], [ self; other ] => @@ -154,11 +160,16 @@ Module ops. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -257,7 +268,7 @@ Module ops. Ty.apply (Ty.path "core::ops::coroutine::CoroutineState") [ Y; R ]. (* PartialOrd *) - Definition partial_cmp (Y R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (Y R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y R in match τ, α with | [], [ self; other ] => @@ -286,7 +297,11 @@ Module ops. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -399,7 +414,7 @@ Module ops. Ty.apply (Ty.path "core::ops::coroutine::CoroutineState") [ Y; R ]. (* Eq *) - Definition assert_receiver_is_total_eq (Y R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (Y R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y R in match τ, α with | [], [ self ] => @@ -407,13 +422,14 @@ Module ops. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -437,7 +453,7 @@ Module ops. Ty.apply (Ty.path "core::ops::coroutine::CoroutineState") [ Y; R ]. (* Ord *) - Definition cmp (Y R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (Y R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y R in match τ, α with | [], [ self; other ] => @@ -476,7 +492,12 @@ Module ops. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -566,7 +587,7 @@ Module ops. Ty.apply (Ty.path "core::ops::coroutine::CoroutineState") [ Y; R ]. (* Debug *) - Definition fmt (Y R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Y R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y R in match τ, α with | [], [ self; f ] => @@ -596,8 +617,8 @@ Module ops. |), [ M.read (| f |); - M.read (| Value.String "Yielded" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Yielded" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -620,8 +641,8 @@ Module ops. |), [ M.read (| f |); - M.read (| Value.String "Complete" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Complete" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -645,7 +666,7 @@ Module ops. Ty.apply (Ty.path "core::ops::coroutine::CoroutineState") [ Y; R ]. (* Hash *) - Definition hash (Y R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (Y R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y R in match τ, α with | [ __H ], [ self; state ] => @@ -744,7 +765,7 @@ Module ops. G::resume(( *self).as_mut(), arg) } *) - Definition resume (G R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition resume (G R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self G R in match τ, α with | [], [ self; arg ] => @@ -817,7 +838,7 @@ Module ops. G::resume(Pin::new(&mut *self), arg) } *) - Definition resume (G R : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition resume (G R : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self G R in match τ, α with | [], [ self; arg ] => diff --git a/CoqOfRust/core/ops/deref.v b/CoqOfRust/core/ops/deref.v index 9703b6870..4636b7a8d 100644 --- a/CoqOfRust/core/ops/deref.v +++ b/CoqOfRust/core/ops/deref.v @@ -17,7 +17,7 @@ Module ops. *self } *) - Definition deref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -60,7 +60,7 @@ Module ops. *self } *) - Definition deref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -91,7 +91,7 @@ Module ops. *self } *) - Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/ops/function.v b/CoqOfRust/core/ops/function.v index fb056e818..6010e9642 100644 --- a/CoqOfRust/core/ops/function.v +++ b/CoqOfRust/core/ops/function.v @@ -21,7 +21,7 @@ Module ops. ( **self).call(args) } *) - Definition call (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self; args ] => @@ -52,7 +52,7 @@ Module ops. ( **self).call(args) } *) - Definition call_mut (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self; args ] => @@ -86,7 +86,7 @@ Module ops. ( *self).call(args) } *) - Definition call_once (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self; args ] => @@ -121,7 +121,7 @@ Module ops. ( *self).call_mut(args) } *) - Definition call_mut (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self; args ] => @@ -155,7 +155,7 @@ Module ops. ( *self).call_mut(args) } *) - Definition call_once (A F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (A F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A F in match τ, α with | [], [ self; args ] => diff --git a/CoqOfRust/core/ops/index_range.v b/CoqOfRust/core/ops/index_range.v index d80b6dd9d..759628f26 100644 --- a/CoqOfRust/core/ops/index_range.v +++ b/CoqOfRust/core/ops/index_range.v @@ -14,37 +14,53 @@ Module ops. Definition Self : Ty.t := Ty.path "core::ops::index_range::IndexRange". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::ops::index_range::IndexRange" - [ - ("start", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::index_range::IndexRange", - "start" - |) - ] - |)); - ("end_", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::index_range::IndexRange", - "end" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ops::index_range::IndexRange" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::index_range::IndexRange", + "start" + |) + ] + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::index_range::IndexRange", + "end" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -60,7 +76,7 @@ Module ops. Definition Self : Ty.t := Ty.path "core::ops::index_range::IndexRange". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -74,25 +90,27 @@ Module ops. |), [ M.read (| f |); - M.read (| Value.String "IndexRange" |); - M.read (| Value.String "start" |); + M.read (| M.of_value (| Value.String "IndexRange" |) |); + M.read (| M.of_value (| Value.String "start" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ops::index_range::IndexRange", "start" - |)); - M.read (| Value.String "end" |); + |) + |); + M.read (| M.of_value (| Value.String "end" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ops::index_range::IndexRange", "end" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -121,44 +139,46 @@ Module ops. Definition Self : Ty.t := Ty.path "core::ops::index_range::IndexRange". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ops::index_range::IndexRange", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::ops::index_range::IndexRange", "start" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ops::index_range::IndexRange", "end" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::ops::index_range::IndexRange", "end" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -186,15 +206,15 @@ Module ops. Definition Self : Ty.t := Ty.path "core::ops::index_range::IndexRange". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -221,7 +241,7 @@ Module ops. IndexRange { start, end } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ start; end_ ] => ltac:(M.monadic @@ -230,23 +250,24 @@ Module ops. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le (M.read (| start |)) (M.read (| end_ |))) + UnOp.Pure.not (| + BinOp.Pure.le (| M.read (| start |), M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -269,33 +290,45 @@ Module ops. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "IndexRange::new_unchecked requires `start <= end`" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "IndexRange::new_unchecked requires `start <= end`" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::ops::index_range::IndexRange" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::index_range::IndexRange" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) |) |))) | _, _ => M.impossible @@ -309,14 +342,19 @@ Module ops. IndexRange { start: 0, end } } *) - Definition zero_to (τ : list Ty.t) (α : list Value.t) : M := + Definition zero_to (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ end_ ] => ltac:(M.monadic (let end_ := M.alloc (| end_ |) in - Value.StructRecord - "core::ops::index_range::IndexRange" - [ ("start", Value.Integer Integer.Usize 0); ("end_", M.read (| end_ |)) ])) + M.of_value (| + Value.StructRecord + "core::ops::index_range::IndexRange" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |))) | _, _ => M.impossible end. @@ -327,7 +365,7 @@ Module ops. self.start } *) - Definition start (τ : list Ty.t) (α : list Value.t) : M := + Definition start (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -349,7 +387,7 @@ Module ops. self.end } *) - Definition end_ (τ : list Ty.t) (α : list Value.t) : M := + Definition end_ (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -372,7 +410,7 @@ Module ops. unsafe { unchecked_sub(self.end, self.start) } } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -411,7 +449,7 @@ Module ops. value } *) - Definition next_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -419,38 +457,40 @@ Module ops. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ops::index_range::IndexRange", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ops::index_range::IndexRange", "end" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -463,17 +503,20 @@ Module ops. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.start < self.end" + M.of_value (| + Value.String "assertion failed: self.start < self.end" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let value := @@ -493,7 +536,7 @@ Module ops. |), M.call_closure (| M.get_function (| "core::intrinsics::unchecked_add", [ Ty.path "usize" ] |), - [ M.read (| value |); Value.Integer Integer.Usize 1 ] + [ M.read (| value |); M.of_value (| Value.Integer 1 |) ] |) |) in value @@ -514,7 +557,7 @@ Module ops. value } *) - Definition next_back_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -522,38 +565,40 @@ Module ops. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ops::index_range::IndexRange", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ops::index_range::IndexRange", "end" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -566,17 +611,20 @@ Module ops. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.start < self.end" + M.of_value (| + Value.String "assertion failed: self.start < self.end" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let value := @@ -591,7 +639,7 @@ Module ops. "end" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -626,7 +674,7 @@ Module ops. prefix } *) - Definition take_prefix (τ : list Ty.t) (α : list Value.t) : M := + Definition take_prefix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -636,16 +684,16 @@ Module ops. let mid := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| n |)) - (M.call_closure (| + BinOp.Pure.le (| + M.read (| n |), + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -656,7 +704,8 @@ Module ops. [] |), [ self ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -690,19 +739,22 @@ Module ops. |) in let prefix := M.alloc (| - Value.StructRecord - "core::ops::index_range::IndexRange" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::index_range::IndexRange", - "start" - |) - |)); - ("end_", M.read (| mid |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::index_range::IndexRange" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::index_range::IndexRange", + "start" + |) + |))); + ("end_", A.to_value (M.read (| mid |))) + ] + |) |) in let _ := M.write (| @@ -734,7 +786,7 @@ Module ops. suffix } *) - Definition take_suffix (τ : list Ty.t) (α : list Value.t) : M := + Definition take_suffix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -744,16 +796,16 @@ Module ops. let mid := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| n |)) - (M.call_closure (| + BinOp.Pure.le (| + M.read (| n |), + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -764,7 +816,8 @@ Module ops. [] |), [ self ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -798,19 +851,22 @@ Module ops. |) in let suffix := M.alloc (| - Value.StructRecord - "core::ops::index_range::IndexRange" - [ - ("start", M.read (| mid |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::index_range::IndexRange", - "end" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::index_range::IndexRange" + [ + ("start", A.to_value (M.read (| mid |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::index_range::IndexRange", + "end" + |) + |))) + ] + |) |) in let _ := M.write (| @@ -845,22 +901,22 @@ Module ops. } } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -871,27 +927,33 @@ Module ops. [] |), [ self ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ops::index_range::IndexRange", - "next_unchecked", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ops::index_range::IndexRange", + "next_unchecked", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -904,7 +966,7 @@ Module ops. (len, Some(len)) } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -922,11 +984,18 @@ Module ops. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| len |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -938,7 +1007,7 @@ Module ops. NonZeroUsize::new(n - taken.len()).map_or(Ok(()), Err) } *) - Definition advance_by (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -983,6 +1052,7 @@ Module ops. |), [ BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), M.call_closure (| M.get_associated_function (| @@ -995,8 +1065,12 @@ Module ops. |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -1031,22 +1105,22 @@ Module ops. } } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -1057,27 +1131,33 @@ Module ops. [] |), [ self ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ops::index_range::IndexRange", - "next_back_unchecked", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ops::index_range::IndexRange", + "next_back_unchecked", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1090,7 +1170,7 @@ Module ops. NonZeroUsize::new(n - taken.len()).map_or(Ok(()), Err) } *) - Definition advance_back_by (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -1135,6 +1215,7 @@ Module ops. |), [ BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), M.call_closure (| M.get_associated_function (| @@ -1147,8 +1228,12 @@ Module ops. |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -1176,7 +1261,7 @@ Module ops. self.len() } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/core/ops/range.v b/CoqOfRust/core/ops/range.v index 104a0a19a..5def69511 100644 --- a/CoqOfRust/core/ops/range.v +++ b/CoqOfRust/core/ops/range.v @@ -25,7 +25,7 @@ Module ops. Definition Self : Ty.t := Ty.path "core::ops::range::RangeFull". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -46,9 +46,10 @@ Module ops. Definition Self : Ty.t := Ty.path "core::ops::range::RangeFull". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "core::ops::range::RangeFull" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |))) | _, _ => M.impossible end. @@ -75,13 +76,13 @@ Module ops. Definition Self : Ty.t := Ty.path "core::ops::range::RangeFull". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -108,12 +109,12 @@ Module ops. Definition Self : Ty.t := Ty.path "core::ops::range::RangeFull". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -130,13 +131,13 @@ Module ops. Definition Self : Ty.t := Ty.path "core::ops::range::RangeFull". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic (let self := M.alloc (| self |) in let state := M.alloc (| state |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -156,7 +157,7 @@ Module ops. write!(fmt, "..") } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fmt ] => ltac:(M.monadic @@ -170,8 +171,14 @@ Module ops. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String ".." |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String ".." |) |)) ] + |) + |) + |) ] |) ] @@ -198,38 +205,42 @@ Module ops. Definition Self (Idx : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Range") [ Idx ]. (* Clone *) - Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "start" - |) - ] - |)); - ("end_", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "end" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "start" + |) + ] + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "end" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -246,25 +257,29 @@ Module ops. Definition Self (Idx : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Range") [ Idx ]. (* Default *) - Definition default (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.call_closure (| - M.get_trait_method (| "core::default::Default", Idx, [], "default", [] |), - [] - |)); - ("end_", - M.call_closure (| - M.get_trait_method (| "core::default::Default", Idx, [], "default", [] |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", Idx, [], "default", [] |), + [] + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", Idx, [], "default", [] |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -293,7 +308,7 @@ Module ops. Definition Self (Idx : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Range") [ Idx ]. (* PartialEq *) - Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; other ] => @@ -361,7 +376,7 @@ Module ops. Definition Self (Idx : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Range") [ Idx ]. (* Eq *) - Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => @@ -369,8 +384,8 @@ Module ops. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -391,7 +406,7 @@ Module ops. Definition Self (Idx : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Range") [ Idx ]. (* Hash *) - Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ __H ], [ self; state ] => @@ -450,7 +465,7 @@ Module ops. Ok(()) } *) - Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; fmt ] => @@ -567,8 +582,17 @@ Module ops. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String ".." |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String ".." |) |)) + ] + |) + |) + |) ] |) ] @@ -702,7 +726,13 @@ Module ops. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -729,7 +759,7 @@ Module ops. >::contains(self, item) } *) - Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ U ], [ self; item ] => @@ -758,14 +788,14 @@ Module ops. !(self.start < self.end) } *) - Definition is_empty (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Idx, [ Idx ], "lt", [] |), [ M.SubPointer.get_struct_record_field (| @@ -779,7 +809,8 @@ Module ops. "end" |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -800,27 +831,30 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeFrom") [ Idx ]. (* Clone *) - Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeFrom", - "start" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeFrom", + "start" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -851,7 +885,7 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeFrom") [ Idx ]. (* PartialEq *) - Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; other ] => @@ -903,7 +937,7 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeFrom") [ Idx ]. (* Eq *) - Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => @@ -911,8 +945,8 @@ Module ops. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -934,7 +968,7 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeFrom") [ Idx ]. (* Hash *) - Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ __H ], [ self; state ] => @@ -975,7 +1009,7 @@ Module ops. Ok(()) } *) - Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; fmt ] => @@ -1092,8 +1126,17 @@ Module ops. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String ".." |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String ".." |) |)) + ] + |) + |) + |) ] |) ] @@ -1150,7 +1193,13 @@ Module ops. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1178,7 +1227,7 @@ Module ops. >::contains(self, item) } *) - Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ U ], [ self; item ] => @@ -1226,27 +1275,30 @@ Module ops. Definition Self (Idx : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::RangeTo") [ Idx ]. (* Clone *) - Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeTo", - "end" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeTo", + "end" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1275,7 +1327,7 @@ Module ops. Definition Self (Idx : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::RangeTo") [ Idx ]. (* PartialEq *) - Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; other ] => @@ -1325,7 +1377,7 @@ Module ops. Definition Self (Idx : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::RangeTo") [ Idx ]. (* Eq *) - Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => @@ -1333,8 +1385,8 @@ Module ops. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -1355,7 +1407,7 @@ Module ops. Definition Self (Idx : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::RangeTo") [ Idx ]. (* Hash *) - Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ __H ], [ self; state ] => @@ -1395,7 +1447,7 @@ Module ops. Ok(()) } *) - Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; fmt ] => @@ -1435,8 +1487,17 @@ Module ops. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String ".." |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String ".." |) |)) + ] + |) + |) + |) ] |) ] @@ -1570,7 +1631,13 @@ Module ops. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1597,7 +1664,7 @@ Module ops. >::contains(self, item) } *) - Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ U ], [ self; item ] => @@ -1634,49 +1701,60 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeInclusive") [ Idx ]. (* Clone *) - Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::ops::range::RangeInclusive" - [ - ("start", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |) - ] - |)); - ("end_", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" - |) - ] - |)); - ("exhausted", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "bool", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "exhausted" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ops::range::RangeInclusive" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + ] + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |) + ] + |))); + ("exhausted", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "exhausted" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1707,7 +1785,7 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeInclusive") [ Idx ]. (* PartialEq *) - Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; other ] => @@ -1749,21 +1827,22 @@ Module ops. |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::ops::range::RangeInclusive", "exhausted" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::ops::range::RangeInclusive", "exhausted" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -1795,7 +1874,7 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeInclusive") [ Idx ]. (* Eq *) - Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => @@ -1803,13 +1882,14 @@ Module ops. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -1833,7 +1913,7 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeInclusive") [ Idx ]. (* Hash *) - Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ __H ], [ self; state ] => @@ -1904,20 +1984,22 @@ Module ops. Self { start, end, exhausted: false } } *) - Definition new (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ start; end_ ] => ltac:(M.monadic (let start := M.alloc (| start |) in let end_ := M.alloc (| end_ |) in - Value.StructRecord - "core::ops::range::RangeInclusive" - [ - ("start", M.read (| start |)); - ("end_", M.read (| end_ |)); - ("exhausted", Value.Bool false) - ])) + M.of_value (| + Value.StructRecord + "core::ops::range::RangeInclusive" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))); + ("exhausted", A.to_value (M.of_value (| Value.Bool false |))) + ] + |))) | _, _ => M.impossible end. @@ -1930,7 +2012,7 @@ Module ops. &self.start } *) - Definition start (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => @@ -1953,7 +2035,7 @@ Module ops. &self.end } *) - Definition end_ (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_ (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => @@ -1976,29 +2058,33 @@ Module ops. (self.start, self.end) } *) - Definition into_inner (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeInclusive", - "start" - |) - |); - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeInclusive", - "end" - |) - |) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeInclusive", + "start" + |) + |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeInclusive", + "end" + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2014,7 +2100,7 @@ Module ops. >::contains(self, item) } *) - Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ U ], [ self; item ] => @@ -2043,7 +2129,7 @@ Module ops. self.exhausted || !(self.start <= self.end) } *) - Definition is_empty (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => @@ -2058,8 +2144,8 @@ Module ops. |) |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Idx, [ Idx ], "le", [] |), [ M.SubPointer.get_struct_record_field (| @@ -2073,7 +2159,8 @@ Module ops. "end" |) ] - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -2097,7 +2184,7 @@ Module ops. start..exclusive_end } *) - Definition into_slice_range (τ : list Ty.t) (α : list Value.t) : M := + Definition into_slice_range (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2106,6 +2193,7 @@ Module ops. let exclusive_end := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -2113,13 +2201,13 @@ Module ops. "end" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let start := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2144,9 +2232,14 @@ Module ops. |) |) in M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| exclusive_end |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| exclusive_end |))) + ] + |) |) |))) | _, _ => M.impossible @@ -2171,7 +2264,7 @@ Module ops. Ok(()) } *) - Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; fmt ] => @@ -2288,10 +2381,17 @@ Module ops. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "..=" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "..=" |) |)) + ] + |) + |) + |) ] |) ] @@ -2427,7 +2527,7 @@ Module ops. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2470,11 +2570,21 @@ Module ops. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String " (exhausted)" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String " (exhausted)" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -2531,11 +2641,17 @@ Module ops. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2576,27 +2692,30 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeToInclusive") [ Idx ]. (* Clone *) - Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::ops::range::RangeToInclusive" - [ - ("end_", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeToInclusive", - "end" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ops::range::RangeToInclusive" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Idx, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeToInclusive", + "end" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -2627,7 +2746,7 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeToInclusive") [ Idx ]. (* PartialEq *) - Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; other ] => @@ -2679,7 +2798,7 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeToInclusive") [ Idx ]. (* Eq *) - Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self ] => @@ -2687,8 +2806,8 @@ Module ops. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -2710,7 +2829,7 @@ Module ops. Ty.apply (Ty.path "core::ops::range::RangeToInclusive") [ Idx ]. (* Hash *) - Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ __H ], [ self; state ] => @@ -2751,7 +2870,7 @@ Module ops. Ok(()) } *) - Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [], [ self; fmt ] => @@ -2791,10 +2910,17 @@ Module ops. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "..=" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "..=" |) |)) + ] + |) + |) + |) ] |) ] @@ -2928,7 +3054,13 @@ Module ops. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2956,7 +3088,7 @@ Module ops. >::contains(self, item) } *) - Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (Idx : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Idx in match τ, α with | [ U ], [ self; item ] => @@ -3010,7 +3142,7 @@ Module ops. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Bound") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3031,14 +3163,17 @@ Module ops. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3051,19 +3186,24 @@ Module ops. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::ops::range::Bound::Excluded" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |) + |))) ] |) |))) @@ -3095,7 +3235,7 @@ Module ops. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Bound") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -3125,8 +3265,8 @@ Module ops. |), [ M.read (| f |); - M.read (| Value.String "Included" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Included" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -3149,8 +3289,8 @@ Module ops. |), [ M.read (| f |); - M.read (| Value.String "Excluded" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Excluded" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -3164,7 +3304,7 @@ Module ops. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Unbounded" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Unbounded" |) |) ] |) |))) ] @@ -3186,7 +3326,7 @@ Module ops. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Bound") [ T ]. (* Hash *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ __H ], [ self; state ] => @@ -3252,7 +3392,7 @@ Module ops. [ M.read (| __self_0 |); M.read (| state |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3284,7 +3424,7 @@ Module ops. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Bound") [ T ]. (* PartialEq *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -3314,11 +3454,16 @@ Module ops. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -3384,7 +3529,7 @@ Module ops. [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -3419,7 +3564,7 @@ Module ops. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::range::Bound") [ T ]. (* Eq *) - Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3427,8 +3572,8 @@ Module ops. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -3456,7 +3601,7 @@ Module ops. } } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3476,7 +3621,11 @@ Module ops. |) in let x := M.alloc (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::ops::range::Bound::Included" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -3488,11 +3637,17 @@ Module ops. |) in let x := M.alloc (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::ops::range::Bound::Excluded" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |) + |))) ] |) |))) @@ -3512,7 +3667,7 @@ Module ops. } } *) - Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3532,7 +3687,11 @@ Module ops. |) in let x := M.alloc (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::ops::range::Bound::Included" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -3544,11 +3703,17 @@ Module ops. |) in let x := M.alloc (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::ops::range::Bound::Excluded" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |) + |))) ] |) |))) @@ -3568,7 +3733,7 @@ Module ops. } } *) - Definition map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ self; f ] => @@ -3581,7 +3746,9 @@ Module ops. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -3592,20 +3759,26 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ T ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| x |) ] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ T ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3617,20 +3790,26 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::range::Bound::Excluded" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ T ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| x |) ] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ T ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) + ] + |)) + ] + |) |))) ] |) @@ -3656,7 +3835,7 @@ Module ops. } } *) - Definition cloned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cloned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3668,7 +3847,9 @@ Module ops. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -3679,14 +3860,17 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3698,14 +3882,17 @@ Module ops. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::range::Bound::Excluded" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ M.read (| x |) ] + |)) + ] + |) |))) ] |) @@ -3720,7 +3907,7 @@ Module ops. (* Trait *) Module RangeBounds. - Definition contains (T Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (T Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ U ], [ self; item ] => ltac:(M.monadic @@ -3784,7 +3971,7 @@ Module ops. [ start; M.alloc (| M.read (| item |) |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |), @@ -3846,7 +4033,7 @@ Module ops. [ item; M.alloc (| M.read (| end_ |) |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -3867,13 +4054,13 @@ Module ops. Unbounded } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::ops::range::Bound::Unbounded" [])) + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) | _, _ => M.impossible end. @@ -3882,13 +4069,13 @@ Module ops. Unbounded } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::ops::range::Bound::Unbounded" [])) + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) | _, _ => M.impossible end. @@ -3913,21 +4100,24 @@ Module ops. Included(&self.start) } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeFrom", - "start" - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeFrom", + "start" + |)) + ] + |))) | _, _ => M.impossible end. @@ -3936,13 +4126,13 @@ Module ops. Unbounded } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::ops::range::Bound::Unbounded" [])) + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) | _, _ => M.impossible end. @@ -3967,13 +4157,13 @@ Module ops. Unbounded } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::ops::range::Bound::Unbounded" [])) + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) | _, _ => M.impossible end. @@ -3982,21 +4172,24 @@ Module ops. Excluded(&self.end) } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Excluded" - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeTo", - "end" - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeTo", + "end" + |)) + ] + |))) | _, _ => M.impossible end. @@ -4021,21 +4214,24 @@ Module ops. Included(&self.start) } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "start" - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "start" + |)) + ] + |))) | _, _ => M.impossible end. @@ -4044,21 +4240,24 @@ Module ops. Excluded(&self.end) } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Excluded" - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "end" - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "end" + |)) + ] + |))) | _, _ => M.impossible end. @@ -4084,21 +4283,24 @@ Module ops. Included(&self.start) } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |)) + ] + |))) | _, _ => M.impossible end. @@ -4113,7 +4315,7 @@ Module ops. } } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4121,7 +4323,7 @@ Module ops. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4134,28 +4336,34 @@ Module ops. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::ops::range::Bound::Excluded" - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" - |) - ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |)) + ] + |) |))) ] |) @@ -4185,13 +4393,13 @@ Module ops. Unbounded } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::ops::range::Bound::Unbounded" [])) + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) | _, _ => M.impossible end. @@ -4200,21 +4408,24 @@ Module ops. Included(&self.end) } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeToInclusive", - "end" - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeToInclusive", + "end" + |)) + ] + |))) | _, _ => M.impossible end. @@ -4248,7 +4459,7 @@ Module ops. } } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4270,7 +4481,11 @@ Module ops. |) in let start := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple "core::ops::range::Bound::Included" [ M.read (| start |) ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ A.to_value (M.read (| start |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -4284,13 +4499,19 @@ Module ops. |) in let start := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple "core::ops::range::Bound::Excluded" [ M.read (| start |) ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ A.to_value (M.read (| start |)) ] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in - M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |) + |))) ] |) |))) @@ -4306,7 +4527,7 @@ Module ops. } } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4328,7 +4549,11 @@ Module ops. |) in let end_ := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple "core::ops::range::Bound::Included" [ M.read (| end_ |) ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ A.to_value (M.read (| end_ |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -4342,13 +4567,19 @@ Module ops. |) in let end_ := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple "core::ops::range::Bound::Excluded" [ M.read (| end_ |) ] + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ A.to_value (M.read (| end_ |)) ] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in - M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |) + |))) ] |) |))) @@ -4381,7 +4612,7 @@ Module ops. self.0 } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4396,7 +4627,7 @@ Module ops. self.1 } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4428,23 +4659,26 @@ Module ops. Included(self.start) } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeFrom", - "start" - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeFrom", + "start" + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4453,13 +4687,13 @@ Module ops. Unbounded } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::ops::range::Bound::Unbounded" [])) + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) | _, _ => M.impossible end. @@ -4485,13 +4719,13 @@ Module ops. Unbounded } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::ops::range::Bound::Unbounded" [])) + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) | _, _ => M.impossible end. @@ -4500,23 +4734,26 @@ Module ops. Excluded(self.end) } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Excluded" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeTo", - "end" - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeTo", + "end" + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4542,23 +4779,26 @@ Module ops. Included(self.start) } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "start" - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "start" + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4567,23 +4807,26 @@ Module ops. Excluded(self.end) } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Excluded" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::Range", - "end" - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Excluded" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::Range", + "end" + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4609,23 +4852,26 @@ Module ops. Included(self.start) } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "start" - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "start" + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4634,23 +4880,26 @@ Module ops. Included(self.end) } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeInclusive", - "end" - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeInclusive", + "end" + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -4676,13 +4925,13 @@ Module ops. Unbounded } *) - Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition start_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::ops::range::Bound::Unbounded" [])) + M.of_value (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) | _, _ => M.impossible end. @@ -4691,23 +4940,26 @@ Module ops. Included(self.end) } *) - Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition end_bound (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::range::Bound::Included" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::ops::range::RangeToInclusive", - "end" - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::range::Bound::Included" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::ops::range::RangeToInclusive", + "end" + |) + |)) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/ops/try_trait.v b/CoqOfRust/core/ops/try_trait.v index 86316339e..d864afb1d 100644 --- a/CoqOfRust/core/ops/try_trait.v +++ b/CoqOfRust/core/ops/try_trait.v @@ -17,7 +17,7 @@ Module ops. FromResidual::from_residual(Yeet(yeeted)) } *) - Definition from_yeet (τ : list Ty.t) (α : list Value.t) : M := + Definition from_yeet (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; Y ], [ yeeted ] => ltac:(M.monadic @@ -30,7 +30,11 @@ Module ops. "from_residual", [] |), - [ Value.StructTuple "core::ops::try_trait::Yeet" [ M.read (| yeeted |) ] ] + [ + M.of_value (| + Value.StructTuple "core::ops::try_trait::Yeet" [ A.to_value (M.read (| yeeted |)) ] + |) + ] |))) | _, _ => M.impossible end. @@ -58,14 +62,14 @@ Module ops. move |a| NeverShortCircuit(f(a)) } *) - Definition wrap_mut_1 (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrap_mut_1 (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ A; impl_FnMut_A__arrow_T ], [ f ] => ltac:(M.monadic (let f := M.alloc (| f |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -75,24 +79,31 @@ Module ops. fun γ => ltac:(M.monadic (let a := M.copy (| γ |) in - Value.StructTuple - "core::ops::try_trait::NeverShortCircuit" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnMut", - impl_FnMut_A__arrow_T, - [ Ty.tuple [ A ] ], - "call_mut", - [] - |), - [ f; Value.Tuple [ M.read (| a |) ] ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::try_trait::NeverShortCircuit" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + impl_FnMut_A__arrow_T, + [ Ty.tuple [ A ] ], + "call_mut", + [] + |), + [ + f; + M.of_value (| Value.Tuple [ A.to_value (M.read (| a |)) ] |) + ] + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -105,14 +116,14 @@ Module ops. move |a, b| NeverShortCircuit(f(a, b)) } *) - Definition wrap_mut_2 (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrap_mut_2 (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ A; B; impl_FnMut_A__B__arrow_T ], [ f ] => ltac:(M.monadic (let f := M.alloc (| f |) in - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -128,26 +139,39 @@ Module ops. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - Value.StructTuple - "core::ops::try_trait::NeverShortCircuit" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnMut", - impl_FnMut_A__B__arrow_T, - [ Ty.tuple [ A; B ] ], - "call_mut", - [] - |), - [ f; Value.Tuple [ M.read (| a |); M.read (| b |) ] ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::try_trait::NeverShortCircuit" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + impl_FnMut_A__B__arrow_T, + [ Ty.tuple [ A; B ] ], + "call_mut", + [] + |), + [ + f; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |) + ] + |)) + ] + |))) ] |))) ] |) | _ => M.impossible (||) - end)))) + end) + |))) | _, _ => M.impossible end. @@ -180,23 +204,26 @@ Module ops. ControlFlow::Continue(self.0) } *) - Definition branch (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition branch (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::ops::try_trait::NeverShortCircuit", - 0 - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::ops::try_trait::NeverShortCircuit", + 0 + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -205,13 +232,17 @@ Module ops. NeverShortCircuit(x) } *) - Definition from_output (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_output (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - Value.StructTuple "core::ops::try_trait::NeverShortCircuit" [ M.read (| x |) ])) + M.of_value (| + Value.StructTuple + "core::ops::try_trait::NeverShortCircuit" + [ A.to_value (M.read (| x |)) ] + |))) | _, _ => M.impossible end. @@ -239,7 +270,7 @@ Module ops. match never {} } *) - Definition from_residual (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_residual (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ never ] => @@ -286,7 +317,7 @@ Module ops. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::ops::try_trait::Yeet") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -301,16 +332,17 @@ Module ops. |), [ M.read (| f |); - M.read (| Value.String "Yeet" |); + M.read (| M.of_value (| Value.String "Yeet" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::ops::try_trait::Yeet", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/option.v b/CoqOfRust/core/option.v index a57498e77..0d6759a63 100644 --- a/CoqOfRust/core/option.v +++ b/CoqOfRust/core/option.v @@ -38,7 +38,7 @@ Module option. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::Option") [ T ]. (* PartialOrd *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -67,7 +67,11 @@ Module option. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -146,7 +150,7 @@ Module option. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::Option") [ T ]. (* Eq *) - Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -154,8 +158,8 @@ Module option. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -175,7 +179,7 @@ Module option. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::Option") [ T ]. (* Ord *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -214,7 +218,12 @@ Module option. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -244,7 +253,9 @@ Module option. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))) ] |))); fun γ => @@ -270,7 +281,7 @@ Module option. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::Option") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -291,7 +302,7 @@ Module option. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "None" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "None" |) |) ] |) |))); fun γ => @@ -313,8 +324,8 @@ Module option. |), [ M.read (| f |); - M.read (| Value.String "Some" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Some" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -337,7 +348,7 @@ Module option. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::Option") [ T ]. (* Hash *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ __H ], [ self; state ] => @@ -381,7 +392,7 @@ Module option. [ M.read (| __self_0 |); M.read (| state |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -405,7 +416,7 @@ Module option. matches!( *self, Some(_)) } *) - Definition is_some (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_some (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -423,8 +434,8 @@ Module option. "core::option::Option::Some", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -443,7 +454,7 @@ Module option. } } *) - Definition is_some_and (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_some_and (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ impl_FnOnce_T__arrow_bool ], [ self; f ] => @@ -454,7 +465,7 @@ Module option. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -473,7 +484,10 @@ Module option. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| x |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) + ] |) |))) ] @@ -491,21 +505,22 @@ Module option. !self.is_some() } *) - Definition is_none (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_none (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ T ], "is_some", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -521,7 +536,7 @@ Module option. } } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -541,10 +556,17 @@ Module option. |) in let x := M.alloc (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -563,7 +585,7 @@ Module option. } } *) - Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -583,10 +605,17 @@ Module option. |) in let x := M.alloc (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -607,7 +636,7 @@ Module option. } } *) - Definition as_pin_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_pin_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -651,21 +680,29 @@ Module option. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::pin::Pin") [ Ty.apply (Ty.path "&") [ T ] ], - "new_unchecked", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::pin::Pin") + [ Ty.apply (Ty.path "&") [ T ] ], + "new_unchecked", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -688,7 +725,7 @@ Module option. } } *) - Definition as_pin_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_pin_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -732,23 +769,29 @@ Module option. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::pin::Pin") - [ Ty.apply (Ty.path "&mut") [ T ] ], - "new_unchecked", - [] - |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::pin::Pin") + [ Ty.apply (Ty.path "&mut") [ T ] ], + "new_unchecked", + [] + |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -779,7 +822,7 @@ Module option. } } *) - Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -810,7 +853,7 @@ Module option. [ M.read (| (* `OffsetOf` expression are not handled yet *) - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) ] |) @@ -868,7 +911,7 @@ Module option. } } *) - Definition as_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -897,7 +940,7 @@ Module option. [ M.read (| (* `OffsetOf` expression are not handled yet *) - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) ] |) @@ -941,7 +984,7 @@ Module option. } } *) - Definition expect (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition expect (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; msg ] => @@ -990,7 +1033,7 @@ Module option. } } *) - Definition unwrap (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1016,7 +1059,12 @@ Module option. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "called `Option::unwrap()` on a `None` value" |) + [ + M.read (| + M.of_value (| + Value.String "called `Option::unwrap()` on a `None` value" + |) + |) ] |) |) @@ -1039,7 +1087,7 @@ Module option. } } *) - Definition unwrap_or (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; default ] => @@ -1082,7 +1130,7 @@ Module option. } } *) - Definition unwrap_or_else (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or_else (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -1114,7 +1162,7 @@ Module option. "call_once", [] |), - [ M.read (| f |); Value.Tuple [] ] + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] |) |))) ] @@ -1138,7 +1186,7 @@ Module option. } } *) - Definition unwrap_or_default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or_default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1186,7 +1234,7 @@ Module option. } } *) - Definition unwrap_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1195,30 +1243,31 @@ Module option. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ T ], "is_some", [] |), [ self ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1229,16 +1278,22 @@ Module option. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: self.is_some()" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: self.is_some()" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -1285,7 +1340,7 @@ Module option. } } *) - Definition map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ self; f ] => @@ -1306,23 +1361,32 @@ Module option. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ T ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| x |) ] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ T ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) + ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1340,7 +1404,7 @@ Module option. self } *) - Definition inspect (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inspect (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -1350,7 +1414,7 @@ Module option. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1372,11 +1436,14 @@ Module option. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| x |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in self @@ -1399,7 +1466,7 @@ Module option. } } *) - Definition map_or (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_or (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ self; default; f ] => @@ -1429,7 +1496,10 @@ Module option. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| t |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| t |)) ] |) + ] |) |))); fun γ => ltac:(M.monadic default) @@ -1455,7 +1525,7 @@ Module option. } } *) - Definition map_or_else (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_or_else (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; D; F ], [ self; default; f ] => @@ -1485,7 +1555,10 @@ Module option. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| t |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| t |)) ] |) + ] |) |))); fun γ => @@ -1499,7 +1572,7 @@ Module option. "call_once", [] |), - [ M.read (| default |); Value.Tuple [] ] + [ M.read (| default |); M.of_value (| Value.Tuple [] |) ] |) |))) ] @@ -1520,7 +1593,7 @@ Module option. } } *) - Definition ok_or (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ok_or (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ E ], [ self; err ] => @@ -1540,11 +1613,19 @@ Module option. 0 |) in let v := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| v |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| v |)) ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| err |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| err |)) ] + |) |))) ] |) @@ -1567,7 +1648,7 @@ Module option. } } *) - Definition ok_or_else (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ok_or_else (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ E; F ], [ self; err ] => @@ -1587,24 +1668,31 @@ Module option. 0 |) in let v := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| v |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| v |)) ] + |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [] ], - "call_once", - [] - |), - [ M.read (| err |); Value.Tuple [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [] ], + "call_once", + [] + |), + [ M.read (| err |); M.of_value (| Value.Tuple [] |) ] + |)) + ] + |) |))) ] |) @@ -1627,7 +1715,7 @@ Module option. } } *) - Definition as_deref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_deref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1656,17 +1744,29 @@ Module option. |) in let t := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::ops::deref::Deref", T, [], "deref", [] |), - [ M.read (| t |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + T, + [], + "deref", + [] + |), + [ M.read (| t |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1688,7 +1788,7 @@ Module option. } } *) - Definition as_deref_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_deref_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1717,23 +1817,29 @@ Module option. |) in let t := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::DerefMut", - T, - [], - "deref_mut", - [] - |), - [ M.read (| t |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + T, + [], + "deref_mut", + [] + |), + [ M.read (| t |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1749,30 +1855,36 @@ Module option. Iter { inner: Item { opt: self.as_ref() } } } *) - Definition iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::option::Iter" - [ - ("inner", - Value.StructRecord - "core::option::Item" - [ - ("opt", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ T ], - "as_ref", - [] - |), - [ M.read (| self |) ] - |)) - ]) - ])) + M.of_value (| + Value.StructRecord + "core::option::Iter" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructRecord + "core::option::Item" + [ + ("opt", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ T ], + "as_ref", + [] + |), + [ M.read (| self |) ] + |))) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1785,30 +1897,36 @@ Module option. IterMut { inner: Item { opt: self.as_mut() } } } *) - Definition iter_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::option::IterMut" - [ - ("inner", - Value.StructRecord - "core::option::Item" - [ - ("opt", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ T ], - "as_mut", - [] - |), - [ M.read (| self |) ] - |)) - ]) - ])) + M.of_value (| + Value.StructRecord + "core::option::IterMut" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructRecord + "core::option::Item" + [ + ("opt", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ T ], + "as_mut", + [] + |), + [ M.read (| self |) ] + |))) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1824,7 +1942,7 @@ Module option. } } *) - Definition and (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition and (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self; optb ] => @@ -1845,7 +1963,10 @@ Module option. |) in optb)); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1865,7 +1986,7 @@ Module option. } } *) - Definition and_then (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition and_then (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ self; f ] => @@ -1894,11 +2015,17 @@ Module option. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| x |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) + ] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1922,7 +2049,7 @@ Module option. None } *) - Definition filter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition filter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; predicate ] => @@ -1934,7 +2061,7 @@ Module option. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1947,7 +2074,7 @@ Module option. |) in let x := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1962,7 +2089,10 @@ Module option. "call_once", [] |), - [ M.read (| predicate |); Value.Tuple [ x ] ] + [ + M.read (| predicate |); + M.of_value (| Value.Tuple [ A.to_value x ] |) + ] |) |)) in let _ := @@ -1974,20 +2104,23 @@ Module option. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -2005,7 +2138,7 @@ Module option. } } *) - Definition or (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition or (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; optb ] => @@ -2046,7 +2179,7 @@ Module option. } } *) - Definition or_else (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition or_else (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -2078,7 +2211,7 @@ Module option. "call_once", [] |), - [ M.read (| f |); Value.Tuple [] ] + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] |) |))) ] @@ -2100,7 +2233,7 @@ Module option. } } *) - Definition xor (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition xor (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; optb ] => @@ -2109,7 +2242,11 @@ Module option. let optb := M.alloc (| optb |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| optb |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| optb |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -2136,7 +2273,10 @@ Module option. |) in b)); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2153,7 +2293,7 @@ Module option. unsafe { self.as_mut().unwrap_unchecked() } } *) - Definition insert (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition insert (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; value ] => @@ -2164,7 +2304,9 @@ Module option. let _ := M.write (| M.read (| self |), - Value.StructTuple "core::option::Option::Some" [ M.read (| value |) ] + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| value |)) ] + |) |) in M.alloc (| M.call_closure (| @@ -2204,7 +2346,7 @@ Module option. unsafe { self.as_mut().unwrap_unchecked() } } *) - Definition get_or_insert (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_or_insert (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; value ] => @@ -2214,7 +2356,7 @@ Module option. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2222,10 +2364,14 @@ Module option. let _ := M.write (| M.read (| self |), - Value.StructTuple "core::option::Option::Some" [ M.read (| value |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| value |)) ] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2263,7 +2409,7 @@ Module option. self.get_or_insert_with(T::default) } *) - Definition get_or_insert_default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_or_insert_default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2301,7 +2447,7 @@ Module option. unsafe { self.as_mut().unwrap_unchecked() } } *) - Definition get_or_insert_with (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_or_insert_with (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -2311,7 +2457,7 @@ Module option. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2320,23 +2466,26 @@ Module option. let _ := M.write (| M.read (| self |), - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [] ], + "call_once", + [] + |), + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] + |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2372,7 +2521,7 @@ Module option. mem::replace(self, None) } *) - Definition take (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2383,7 +2532,8 @@ Module option. "core::mem::replace", [ Ty.apply (Ty.path "core::option::Option") [ T ] ] |), - [ M.read (| self |); Value.StructTuple "core::option::Option::None" [] ] + [ M.read (| self |); M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + ] |))) | _, _ => M.impossible end. @@ -2400,7 +2550,7 @@ Module option. if self.as_mut().map_or(false, predicate) { self.take() } else { None } } *) - Definition take_if (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_if (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; predicate ] => @@ -2409,7 +2559,7 @@ Module option. let predicate := M.alloc (| predicate |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2433,7 +2583,7 @@ Module option. |), [ M.read (| self |) ] |); - Value.Bool false; + M.of_value (| Value.Bool false |); M.read (| predicate |) ] |) @@ -2450,7 +2600,10 @@ Module option. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2466,7 +2619,7 @@ Module option. mem::replace(self, Some(value)) } *) - Definition replace (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; value ] => @@ -2480,7 +2633,9 @@ Module option. |), [ M.read (| self |); - Value.StructTuple "core::option::Option::Some" [ M.read (| value |) ] + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| value |)) ] + |) ] |))) | _, _ => M.impossible @@ -2498,7 +2653,7 @@ Module option. } } *) - Definition zip (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition zip (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self; other ] => @@ -2507,7 +2662,11 @@ Module option. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -2528,12 +2687,23 @@ Module option. |) in let b := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| a |); M.read (| b |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| a |)); A.to_value (M.read (| b |)) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2553,7 +2723,7 @@ Module option. } } *) - Definition zip_with (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition zip_with (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F; R ], [ self; other; f ] => @@ -2563,7 +2733,11 @@ Module option. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -2584,23 +2758,35 @@ Module option. |) in let b := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ T; U ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| a |); M.read (| b |) ] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ T; U ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| a |)); A.to_value (M.read (| b |)) ] + |) + ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2624,7 +2810,7 @@ Module option. } } *) - Definition unzip (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unzip (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self ] => @@ -2647,20 +2833,36 @@ Module option. let a := M.copy (| γ1_0 |) in let b := M.copy (| γ1_1 |) in M.alloc (| - Value.Tuple - [ - Value.StructTuple "core::option::Option::Some" [ M.read (| a |) ]; - Value.StructTuple "core::option::Option::Some" [ M.read (| b |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| a |)) ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| b |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.StructTuple "core::option::Option::None" []; - Value.StructTuple "core::option::Option::None" [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)); + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |) |))) ] |) @@ -2690,7 +2892,7 @@ Module option. } } *) - Definition copied (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copied (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2711,10 +2913,17 @@ Module option. let γ0_0 := M.read (| γ0_0 |) in let v := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| v |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| v |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2736,7 +2945,7 @@ Module option. } } *) - Definition cloned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cloned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2756,17 +2965,23 @@ Module option. |) in let t := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ M.read (| t |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ M.read (| t |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2793,7 +3008,7 @@ Module option. } } *) - Definition copied (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copied (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2814,10 +3029,17 @@ Module option. let γ0_0 := M.read (| γ0_0 |) in let t := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| t |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| t |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2839,7 +3061,7 @@ Module option. } } *) - Definition cloned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cloned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2859,17 +3081,23 @@ Module option. |) in let t := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ M.read (| t |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ M.read (| t |) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2896,7 +3124,7 @@ Module option. } } *) - Definition transpose (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition transpose (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2922,9 +3150,18 @@ Module option. |) in let x := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2942,14 +3179,23 @@ Module option. |) in let e := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |) |))) ] |) @@ -2967,7 +3213,7 @@ Module option. panic_str(msg) } *) - Definition expect_failed (τ : list Ty.t) (α : list Value.t) : M := + Definition expect_failed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ msg ] => ltac:(M.monadic @@ -2990,7 +3236,7 @@ Module option. } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3011,19 +3257,24 @@ Module option. |) in let x := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3038,7 +3289,7 @@ Module option. } } *) - Definition clone_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; source ] => @@ -3047,7 +3298,11 @@ Module option. let source := M.alloc (| source |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| source |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| source |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -3121,10 +3376,11 @@ Module option. None } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "core::option::Option::None" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) | _, _ => M.impossible end. @@ -3151,15 +3407,25 @@ Module option. IntoIter { inner: Item { opt: self } } } *) - Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::option::IntoIter" - [ ("inner", Value.StructRecord "core::option::Item" [ ("opt", M.read (| self |)) ]) ])) + M.of_value (| + Value.StructRecord + "core::option::IntoIter" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructRecord + "core::option::Item" + [ ("opt", A.to_value (M.read (| self |))) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3192,7 +3458,7 @@ Module option. self.iter() } *) - Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3238,7 +3504,7 @@ Module option. self.iter_mut() } *) - Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3277,13 +3543,15 @@ Module option. Some(val) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in - Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ])) + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| val |)) ] + |))) | _, _ => M.impossible end. @@ -3305,7 +3573,7 @@ Module option. o.as_ref() } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ o ] => @@ -3341,7 +3609,7 @@ Module option. o.as_mut() } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ o ] => @@ -3388,7 +3656,7 @@ Module option. SpecOptionPartialEq::eq(self, other) } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -3426,7 +3694,7 @@ Module option. } } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ l; r ] => @@ -3435,7 +3703,11 @@ Module option. let r := M.alloc (| r |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| l |); M.read (| r |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| l |)); A.to_value (M.read (| r |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -3469,8 +3741,8 @@ Module option. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let γ0_0 := M.read (| γ0_0 |) in let γ0_1 := M.read (| γ0_1 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -3494,14 +3766,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u8" ], "unwrap_or", @@ -3528,10 +3800,10 @@ Module option. |) ] |); - Value.Integer Integer.U8 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u8" ], "unwrap_or", @@ -3558,9 +3830,10 @@ Module option. |) ] |); - Value.Integer Integer.U8 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -3580,14 +3853,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u16" ], "unwrap_or", @@ -3614,10 +3887,10 @@ Module option. |) ] |); - Value.Integer Integer.U16 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u16" ], "unwrap_or", @@ -3644,9 +3917,10 @@ Module option. |) ] |); - Value.Integer Integer.U16 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -3666,14 +3940,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u32" ], "unwrap_or", @@ -3700,10 +3974,10 @@ Module option. |) ] |); - Value.Integer Integer.U32 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u32" ], "unwrap_or", @@ -3730,9 +4004,10 @@ Module option. |) ] |); - Value.Integer Integer.U32 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -3752,14 +4027,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u64" ], "unwrap_or", @@ -3786,10 +4061,10 @@ Module option. |) ] |); - Value.Integer Integer.U64 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u64" ], "unwrap_or", @@ -3816,9 +4091,10 @@ Module option. |) ] |); - Value.Integer Integer.U64 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -3838,14 +4114,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u128" ], "unwrap_or", @@ -3872,10 +4148,10 @@ Module option. |) ] |); - Value.Integer Integer.U128 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u128" ], "unwrap_or", @@ -3902,9 +4178,10 @@ Module option. |) ] |); - Value.Integer Integer.U128 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -3924,14 +4201,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], "unwrap_or", @@ -3958,10 +4235,10 @@ Module option. |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], "unwrap_or", @@ -3988,9 +4265,10 @@ Module option. |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4010,14 +4288,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i8" ], "unwrap_or", @@ -4044,10 +4322,10 @@ Module option. |) ] |); - Value.Integer Integer.I8 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i8" ], "unwrap_or", @@ -4074,9 +4352,10 @@ Module option. |) ] |); - Value.Integer Integer.I8 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4096,14 +4375,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i16" ], "unwrap_or", @@ -4130,10 +4409,10 @@ Module option. |) ] |); - Value.Integer Integer.I16 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i16" ], "unwrap_or", @@ -4160,9 +4439,10 @@ Module option. |) ] |); - Value.Integer Integer.I16 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4182,14 +4462,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ], "unwrap_or", @@ -4216,10 +4496,10 @@ Module option. |) ] |); - Value.Integer Integer.I32 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ], "unwrap_or", @@ -4246,9 +4526,10 @@ Module option. |) ] |); - Value.Integer Integer.I32 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4268,14 +4549,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i64" ], "unwrap_or", @@ -4302,10 +4583,10 @@ Module option. |) ] |); - Value.Integer Integer.I64 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i64" ], "unwrap_or", @@ -4332,9 +4613,10 @@ Module option. |) ] |); - Value.Integer Integer.I64 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4354,14 +4636,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i128" ], "unwrap_or", @@ -4388,10 +4670,10 @@ Module option. |) ] |); - Value.Integer Integer.I128 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "i128" ], "unwrap_or", @@ -4418,9 +4700,10 @@ Module option. |) ] |); - Value.Integer Integer.I128 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4440,14 +4723,14 @@ Module option. l.map(Self::get).unwrap_or(0) == r.map(Self::get).unwrap_or(0) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "isize" ], "unwrap_or", @@ -4474,10 +4757,10 @@ Module option. |) ] |); - Value.Integer Integer.Isize 0 + M.of_value (| Value.Integer 0 |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "isize" ], "unwrap_or", @@ -4504,9 +4787,10 @@ Module option. |) ] |); - Value.Integer Integer.Isize 0 + M.of_value (| Value.Integer 0 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4527,15 +4811,15 @@ Module option. == r.map(Self::as_ptr).unwrap_or_else(|| crate::ptr::null_mut()) } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.apply (Ty.path "*mut") [ T ] ], "unwrap_or_else", @@ -4564,8 +4848,8 @@ Module option. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4581,10 +4865,11 @@ Module option. ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.apply (Ty.path "*mut") [ T ] ], "unwrap_or_else", @@ -4613,8 +4898,8 @@ Module option. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4630,9 +4915,11 @@ Module option. ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4653,14 +4940,14 @@ Module option. l.map_or(2, |x| x as i8) == r.map_or(2, |x| x as i8) } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ l; r ] => ltac:(M.monadic (let l := M.alloc (| l |) in let r := M.alloc (| r |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::cmp::Ordering" ], "map_or", @@ -4671,9 +4958,9 @@ Module option. |), [ M.read (| M.read (| l |) |); - Value.Integer Integer.I8 2; - M.closure - (fun γ => + M.of_value (| Value.Integer 2 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4683,14 +4970,15 @@ Module option. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - M.rust_cast (M.read (| x |)))) + M.rust_cast (| M.read (| x |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "core::cmp::Ordering" ], "map_or", @@ -4701,9 +4989,9 @@ Module option. |), [ M.read (| M.read (| r |) |); - Value.Integer Integer.I8 2; - M.closure - (fun γ => + M.of_value (| Value.Integer 2 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4713,13 +5001,15 @@ Module option. fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - M.rust_cast (M.read (| x |)))) + M.rust_cast (| M.read (| x |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -4742,33 +5032,36 @@ Module option. Definition Self (A : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::Item") [ A ]. (* Clone *) - Definition clone (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::option::Item" - [ - ("opt", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::option::Item", - "opt" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::option::Item" + [ + ("opt", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::option::Item", + "opt" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4785,7 +5078,7 @@ Module option. Definition Self (A : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::Item") [ A ]. (* Debug *) - Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; f ] => @@ -4800,17 +5093,18 @@ Module option. |), [ M.read (| f |); - M.read (| Value.String "Item" |); - M.read (| Value.String "opt" |); + M.read (| M.of_value (| Value.String "Item" |) |); + M.read (| M.of_value (| Value.String "opt" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::option::Item", "opt" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -4836,7 +5130,7 @@ Module option. self.opt.take() } *) - Definition next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -4867,7 +5161,7 @@ Module option. } } *) - Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -4890,24 +5184,34 @@ Module option. 0 |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 1; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 1 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))) ] |) @@ -4937,7 +5241,7 @@ Module option. self.opt.take() } *) - Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5017,7 +5321,7 @@ Module option. Definition Self (A : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::Iter") [ A ]. (* Debug *) - Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; f ] => @@ -5032,17 +5336,18 @@ Module option. |), [ M.read (| f |); - M.read (| Value.String "Iter" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "Iter" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::option::Iter", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5068,7 +5373,7 @@ Module option. self.inner.next() } *) - Definition next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5098,7 +5403,7 @@ Module option. self.inner.size_hint() } *) - Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5145,7 +5450,7 @@ Module option. self.inner.next_back() } *) - Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5223,33 +5528,36 @@ Module option. Iter { inner: self.inner.clone() } } *) - Definition clone (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::option::Iter" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Item") [ Ty.apply (Ty.path "&") [ A ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::option::Iter", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::option::Iter" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Item") [ Ty.apply (Ty.path "&") [ A ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::option::Iter", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5274,7 +5582,7 @@ Module option. Definition Self (A : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::IterMut") [ A ]. (* Debug *) - Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; f ] => @@ -5289,17 +5597,18 @@ Module option. |), [ M.read (| f |); - M.read (| Value.String "IterMut" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "IterMut" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::option::IterMut", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5325,7 +5634,7 @@ Module option. self.inner.next() } *) - Definition next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5355,7 +5664,7 @@ Module option. self.inner.size_hint() } *) - Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5402,7 +5711,7 @@ Module option. self.inner.next_back() } *) - Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5483,33 +5792,36 @@ Module option. Definition Self (A : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::IntoIter") [ A ]. (* Clone *) - Definition clone (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::option::IntoIter" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Item") [ A ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::option::IntoIter", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::option::IntoIter" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Item") [ A ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::option::IntoIter", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5526,7 +5838,7 @@ Module option. Definition Self (A : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::IntoIter") [ A ]. (* Debug *) - Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self; f ] => @@ -5541,17 +5853,18 @@ Module option. |), [ M.read (| f |); - M.read (| Value.String "IntoIter" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "IntoIter" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::option::IntoIter", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5577,7 +5890,7 @@ Module option. self.inner.next() } *) - Definition next (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5607,7 +5920,7 @@ Module option. self.inner.size_hint() } *) - Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5654,7 +5967,7 @@ Module option. self.inner.next_back() } *) - Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ self ] => @@ -5735,7 +6048,7 @@ Module option. iter::try_process(iter.into_iter(), |i| i.collect()) } *) - Definition from_iter (A V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (A V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A V in match τ, α with | [ _ as I ], [ iter ] => @@ -5777,8 +6090,8 @@ Module option. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5808,7 +6121,8 @@ Module option. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5838,13 +6152,15 @@ Module option. Some(output) } *) - Definition from_output (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_output (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ output ] => ltac:(M.monadic (let output := M.alloc (| output |) in - Value.StructTuple "core::option::Option::Some" [ M.read (| output |) ])) + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| output |)) ] + |))) | _, _ => M.impossible end. @@ -5856,7 +6172,7 @@ Module option. } } *) - Definition branch (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition branch (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -5876,16 +6192,23 @@ Module option. |) in let v := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ M.read (| v |) ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ A.to_value (M.read (| v |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |) |))) ] |) @@ -5918,7 +6241,7 @@ Module option. } } *) - Definition from_residual (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_residual (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ residual ] => @@ -5929,7 +6252,10 @@ Module option. residual, [ fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5953,7 +6279,7 @@ Module option. None } *) - Definition from_residual (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_residual (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ β0 ] => @@ -5966,7 +6292,7 @@ Module option. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::ops::try_trait::Yeet", 0 |) in - Value.StructTuple "core::option::Option::None" [])) + M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) ] |))) | _, _ => M.impossible @@ -6010,7 +6336,7 @@ Module option. } } *) - Definition flatten (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition flatten (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6031,7 +6357,10 @@ 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 + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) diff --git a/CoqOfRust/core/panic.v b/CoqOfRust/core/panic.v index 0d78364f5..f48835359 100644 --- a/CoqOfRust/core/panic.v +++ b/CoqOfRust/core/panic.v @@ -9,7 +9,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -24,7 +24,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -39,7 +39,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -54,7 +54,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -69,7 +69,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -84,7 +84,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -99,7 +99,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -114,7 +114,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -129,7 +129,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -144,7 +144,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -159,7 +159,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -174,7 +174,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -189,7 +189,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -204,7 +204,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -219,7 +219,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -234,7 +234,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -249,7 +249,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -264,7 +264,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -279,7 +279,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -294,7 +294,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -309,7 +309,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -324,7 +324,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -339,7 +339,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -354,7 +354,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -369,7 +369,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -384,7 +384,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -399,7 +399,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -414,7 +414,7 @@ Module intrinsics. $crate::panicking::panic_explicit() } *) - Definition panic_cold_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cold_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic diff --git a/CoqOfRust/core/panic/location.v b/CoqOfRust/core/panic/location.v index 60a95feb4..fb350d275 100644 --- a/CoqOfRust/core/panic/location.v +++ b/CoqOfRust/core/panic/location.v @@ -30,19 +30,19 @@ Module panic. Definition Self : Ty.t := Ty.path "core::panic::location::Location". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -63,7 +63,7 @@ Module panic. Definition Self : Ty.t := Ty.path "core::panic::location::Location". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -77,33 +77,36 @@ Module panic. |), [ M.read (| f |); - M.read (| Value.String "Location" |); - M.read (| Value.String "file" |); + M.read (| M.of_value (| Value.String "Location" |) |); + M.read (| M.of_value (| Value.String "file" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::location::Location", "file" - |)); - M.read (| Value.String "line" |); + |) + |); + M.read (| M.of_value (| Value.String "line" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::location::Location", "line" - |)); - M.read (| Value.String "col" |); + |) + |); + M.read (| M.of_value (| Value.String "col" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::location::Location", "col" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -132,20 +135,21 @@ Module panic. Definition Self : Ty.t := Ty.path "core::panic::location::Location". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -166,7 +170,7 @@ Module panic. Definition Self : Ty.t := Ty.path "core::panic::location::Location". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -236,7 +240,7 @@ Module panic. Definition Self : Ty.t := Ty.path "core::panic::location::Location". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -353,7 +357,7 @@ Module panic. Definition Self : Ty.t := Ty.path "core::panic::location::Location". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -383,38 +387,40 @@ Module panic. ] |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::location::Location", "line" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::panic::location::Location", "line" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::location::Location", "col" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::panic::location::Location", "col" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -431,7 +437,7 @@ Module panic. Definition Self : Ty.t := Ty.path "core::panic::location::Location". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -559,7 +565,7 @@ Module panic. crate::intrinsics::caller_location() } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -574,7 +580,7 @@ Module panic. self.file } *) - Definition file (τ : list Ty.t) (α : list Value.t) : M := + Definition file (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -596,7 +602,7 @@ Module panic. self.line } *) - Definition line (τ : list Ty.t) (α : list Value.t) : M := + Definition line (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -618,7 +624,7 @@ Module panic. self.col } *) - Definition column (τ : list Ty.t) (α : list Value.t) : M := + Definition column (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -639,17 +645,22 @@ Module panic. Location { file, line, col } } *) - Definition internal_constructor (τ : list Ty.t) (α : list Value.t) : M := + Definition internal_constructor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ file; line; col ] => ltac:(M.monadic (let file := M.alloc (| file |) in let line := M.alloc (| line |) in let col := M.alloc (| col |) in - Value.StructRecord - "core::panic::location::Location" - [ ("file", M.read (| file |)); ("line", M.read (| line |)); ("col", M.read (| col |)) - ])) + M.of_value (| + Value.StructRecord + "core::panic::location::Location" + [ + ("file", A.to_value (M.read (| file |))); + ("line", A.to_value (M.read (| line |))); + ("col", A.to_value (M.read (| col |))) + ] + |))) | _, _ => M.impossible end. @@ -666,7 +677,7 @@ Module panic. write!(formatter, "{}:{}:{}", self.file, self.line, self.col) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; formatter ] => ltac:(M.monadic @@ -680,64 +691,73 @@ Module panic. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String ":" |); - M.read (| Value.String ":" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ":" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ":" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::panic::location::Location", - "file" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::panic::location::Location", - "line" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::panic::location::Location", - "col" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::panic::location::Location", + "file" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::panic::location::Location", + "line" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::panic::location::Location", + "col" + |) + ] + |)) + ] + |) + |) + |) ] |) ] diff --git a/CoqOfRust/core/panic/panic_info.v b/CoqOfRust/core/panic/panic_info.v index ca2093211..89900663e 100644 --- a/CoqOfRust/core/panic/panic_info.v +++ b/CoqOfRust/core/panic/panic_info.v @@ -24,7 +24,7 @@ Module panic. Definition Self : Ty.t := Ty.path "core::panic::panic_info::PanicInfo". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -38,49 +38,54 @@ Module panic. |), [ M.read (| f |); - M.read (| Value.String "PanicInfo" |); - M.read (| Value.String "payload" |); + M.read (| M.of_value (| Value.String "PanicInfo" |) |); + M.read (| M.of_value (| Value.String "payload" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::panic_info::PanicInfo", "payload" - |)); - M.read (| Value.String "message" |); + |) + |); + M.read (| M.of_value (| Value.String "message" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::panic_info::PanicInfo", "message" - |)); - M.read (| Value.String "location" |); + |) + |); + M.read (| M.of_value (| Value.String "location" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::panic_info::PanicInfo", "location" - |)); - M.read (| Value.String "can_unwind" |); + |) + |); + M.read (| M.of_value (| Value.String "can_unwind" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::panic_info::PanicInfo", "can_unwind" - |)); - M.read (| Value.String "force_no_backtrace" |); + |) + |); + M.read (| M.of_value (| Value.String "force_no_backtrace" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::panic_info::PanicInfo", "force_no_backtrace" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -108,7 +113,7 @@ Module panic. PanicInfo { location, message, payload: &NoPayload, can_unwind, force_no_backtrace } } *) - Definition internal_constructor (τ : list Ty.t) (α : list Value.t) : M := + Definition internal_constructor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ message; location; can_unwind; force_no_backtrace ] => ltac:(M.monadic @@ -116,22 +121,28 @@ Module panic. let location := M.alloc (| location |) in let can_unwind := M.alloc (| can_unwind |) in let force_no_backtrace := M.alloc (| force_no_backtrace |) in - Value.StructRecord - "core::panic::panic_info::PanicInfo" - [ - ("location", M.read (| location |)); - ("message", M.read (| message |)); - ("payload", - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.StructTuple - "core::panic::panic_info::internal_constructor::NoPayload" - [] - |))); - ("can_unwind", M.read (| can_unwind |)); - ("force_no_backtrace", M.read (| force_no_backtrace |)) - ])) + M.of_value (| + Value.StructRecord + "core::panic::panic_info::PanicInfo" + [ + ("location", A.to_value (M.read (| location |))); + ("message", A.to_value (M.read (| message |))); + ("payload", + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.StructTuple + "core::panic::panic_info::internal_constructor::NoPayload" + [] + |) + |) + |))); + ("can_unwind", A.to_value (M.read (| can_unwind |))); + ("force_no_backtrace", A.to_value (M.read (| force_no_backtrace |))) + ] + |))) | _, _ => M.impossible end. @@ -143,7 +154,7 @@ Module panic. self.payload = info; } *) - Definition set_payload (τ : list Ty.t) (α : list Value.t) : M := + Definition set_payload (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; info ] => ltac:(M.monadic @@ -157,9 +168,9 @@ Module panic. "core::panic::panic_info::PanicInfo", "payload" |), - (* Unsize *) M.pointer_coercion (M.read (| info |)) + (* Unsize *) M.pointer_coercion (| M.read (| info |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -171,22 +182,24 @@ Module panic. self.payload } *) - Definition payload (τ : list Ty.t) (α : list Value.t) : M := + Definition payload (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in (* Unsize *) - M.pointer_coercion + M.pointer_coercion (| (* Unsize *) - (M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::panic::panic_info::PanicInfo", "payload" |) - |))))) + |) + |) + |))) | _, _ => M.impossible end. @@ -197,7 +210,7 @@ Module panic. self.message } *) - Definition message (τ : list Ty.t) (α : list Value.t) : M := + Definition message (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -221,22 +234,25 @@ Module panic. Some(&self.location) } *) - Definition location (τ : list Ty.t) (α : list Value.t) : M := + Definition location (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::panic::panic_info::PanicInfo", - "location" - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::panic::panic_info::PanicInfo", + "location" + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -247,7 +263,7 @@ Module panic. self.can_unwind } *) - Definition can_unwind (τ : list Ty.t) (α : list Value.t) : M := + Definition can_unwind (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -269,7 +285,7 @@ Module panic. self.force_no_backtrace } *) - Definition force_no_backtrace (τ : list Ty.t) (α : list Value.t) : M := + Definition force_no_backtrace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -309,7 +325,7 @@ Module panic. Ok(()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; formatter ] => ltac:(M.monadic @@ -338,7 +354,10 @@ Module panic. "write_str", [] |), - [ M.read (| formatter |); M.read (| Value.String "panicked at " |) ] + [ + M.read (| formatter |); + M.read (| M.of_value (| Value.String "panicked at " |) |) + ] |) ] |) @@ -479,7 +498,7 @@ Module panic. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -516,8 +535,11 @@ Module panic. "write_str", [] |), - [ M.read (| formatter |); M.read (| Value.String ": -" |) ] + [ + M.read (| formatter |); + M.read (| M.of_value (| Value.String ": +" |) |) + ] |) ] |) @@ -646,11 +668,11 @@ Module panic. val)) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -702,8 +724,8 @@ Module panic. |), [ M.read (| formatter |); - M.read (| Value.String ": -" |) + M.read (| M.of_value (| Value.String ": +" |) |) ] |) ] @@ -841,13 +863,20 @@ Module panic. val)) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/panic/unwind_safe.v b/CoqOfRust/core/panic/unwind_safe.v index d366a3477..5304bbc71 100644 --- a/CoqOfRust/core/panic/unwind_safe.v +++ b/CoqOfRust/core/panic/unwind_safe.v @@ -271,7 +271,7 @@ Module panic. &self.0 } *) - Definition deref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -304,7 +304,7 @@ Module panic. &mut self.0 } *) - Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -339,7 +339,7 @@ Module panic. (self.0)() } *) - Definition call_once (R F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (R F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self R F in match τ, α with | [], [ self; _args ] => @@ -362,7 +362,7 @@ Module panic. 0 |) |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |))) | _, _ => M.impossible @@ -390,7 +390,7 @@ Module panic. f.debug_tuple("AssertUnwindSafe").field(&self.0).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -418,16 +418,20 @@ Module panic. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "AssertUnwindSafe" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "AssertUnwindSafe" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::panic::unwind_safe::AssertUnwindSafe", 0 - |)) + |) + |) ] |) ] @@ -453,19 +457,22 @@ Module panic. Self(Default::default()) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "core::panic::unwind_safe::AssertUnwindSafe" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "core::panic::unwind_safe::AssertUnwindSafe" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -492,7 +499,7 @@ Module panic. F::poll(pinned_field, cx) } *) - Definition poll (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; cx ] => @@ -533,8 +540,8 @@ Module panic. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -552,7 +559,8 @@ Module panic. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -589,7 +597,7 @@ Module panic. unsafe { self.map_unchecked_mut(|x| &mut x.0) }.poll_next(cx) } *) - Definition poll_next (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll_next (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self; cx ] => @@ -635,8 +643,8 @@ Module panic. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -654,7 +662,8 @@ Module panic. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.read (| cx |) @@ -668,7 +677,7 @@ Module panic. self.0.size_hint() } *) - Definition size_hint (S : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (S : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self S in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/panicking.v b/CoqOfRust/core/panicking.v index 2373741ed..410ca73b1 100644 --- a/CoqOfRust/core/panicking.v +++ b/CoqOfRust/core/panicking.v @@ -26,7 +26,7 @@ Module panicking. unsafe { panic_impl(&pi) } } *) - Definition panic_fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt ] => ltac:(M.monadic @@ -34,18 +34,18 @@ Module panicking. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool false |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool false |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::intrinsics::abort", [] |), [] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let pi := @@ -57,7 +57,9 @@ Module panicking. [] |), [ - Value.StructTuple "core::option::Option::Some" [ fmt ]; + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value fmt ] + |); M.call_closure (| M.get_associated_function (| Ty.path "core::panic::location::Location", @@ -66,8 +68,8 @@ Module panicking. |), [] |); - Value.Bool true; - Value.Bool false + M.of_value (| Value.Bool true |); + M.of_value (| Value.Bool false |) ] |) |) in @@ -126,7 +128,7 @@ Module panicking. } } *) - Definition panic_nounwind_fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_nounwind_fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt; force_no_backtrace ] => ltac:(M.monadic @@ -143,7 +145,10 @@ Module panicking. ] |), [ - Value.Tuple [ M.read (| fmt |); M.read (| force_no_backtrace |) ]; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| fmt |)); A.to_value (M.read (| force_no_backtrace |)) ] + |); M.get_function (| "core::panicking::panic_nounwind_fmt.comptime", [] |); M.get_function (| "core::panicking::panic_nounwind_fmt.runtime", [] |) ] @@ -177,7 +182,7 @@ Module panicking. unsafe { panic_impl(&pi) } } *) - Definition runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt; force_no_backtrace ] => ltac:(M.monadic @@ -186,11 +191,11 @@ Module panicking. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool false |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool false |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| @@ -200,7 +205,7 @@ Module panicking. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let pi := @@ -212,7 +217,9 @@ Module panicking. [] |), [ - Value.StructTuple "core::option::Option::Some" [ fmt ]; + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value fmt ] + |); M.call_closure (| M.get_associated_function (| Ty.path "core::panic::location::Location", @@ -221,7 +228,7 @@ Module panicking. |), [] |); - Value.Bool false; + M.of_value (| Value.Bool false |); M.read (| force_no_backtrace |) ] |) @@ -246,7 +253,7 @@ Module panicking. panic_fmt(fmt); } *) - Definition comptime (τ : list Ty.t) (α : list Value.t) : M := + Definition comptime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt; _force_no_backtrace ] => ltac:(M.monadic @@ -271,7 +278,7 @@ Module panicking. panic_fmt(fmt::Arguments::new_const(&[expr])); } *) - Definition panic (τ : list Ty.t) (α : list Value.t) : M := + Definition panic (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ expr ] => ltac:(M.monadic @@ -281,7 +288,12 @@ Module panicking. [ M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), - [ (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [ M.read (| expr |) ] |)) ] + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [ A.to_value (M.read (| expr |)) ] |) |) + |) + ] |) ] |))) @@ -293,7 +305,7 @@ Module panicking. panic_nounwind_fmt(fmt::Arguments::new_const(&[expr]), /* force_no_backtrace */ false); } *) - Definition panic_nounwind (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_nounwind (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ expr ] => ltac:(M.monadic @@ -303,9 +315,14 @@ Module panicking. [ M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), - [ (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [ M.read (| expr |) ] |)) ] + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [ A.to_value (M.read (| expr |)) ] |) |) + |) + ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |))) | _, _ => M.impossible @@ -316,7 +333,7 @@ Module panicking. panic_nounwind_fmt(fmt::Arguments::new_const(&[expr]), /* force_no_backtrace */ true); } *) - Definition panic_nounwind_nobacktrace (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_nounwind_nobacktrace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ expr ] => ltac:(M.monadic @@ -326,9 +343,14 @@ Module panicking. [ M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), - [ (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [ M.read (| expr |) ] |)) ] + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [ A.to_value (M.read (| expr |)) ] |) |) + |) + ] |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |))) | _, _ => M.impossible @@ -339,7 +361,7 @@ Module panicking. panic_display(&expr); } *) - Definition panic_str (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ expr ] => ltac:(M.monadic @@ -359,7 +381,7 @@ Module panicking. panic_display(&"explicit panic"); } *) - Definition panic_explicit (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_explicit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -368,7 +390,7 @@ Module panicking. "core::panicking::panic_display", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ Value.String "explicit panic" ] + [ M.of_value (| Value.String "explicit panic" |) ] |))) | _, _ => M.impossible end. @@ -378,7 +400,7 @@ Module panicking. panic_fmt(format_args!("internal error: entered unreachable code: {}", *x)); } *) - Definition unreachable_display (τ : list Ty.t) (α : list Value.t) : M := + Definition unreachable_display (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -390,26 +412,40 @@ Module panicking. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "internal error: entered unreachable code: " |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "internal error: entered unreachable code: " + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ T ] - |), - [ M.read (| x |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ T ] + |), + [ M.read (| x |) ] + |)) + ] + |) + |) + |) ] |) ] @@ -422,7 +458,7 @@ Module panicking. panic_fmt(format_args!("{}", *x)); } *) - Definition panic_display (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_display (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x ] => ltac:(M.monadic @@ -434,22 +470,32 @@ Module panicking. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion (M.alloc (| Value.Array [ M.read (| Value.String "" |) ] |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array [ A.to_value (M.read (| M.of_value (| Value.String "" |) |)) ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ T ] - |), - [ M.read (| x |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ T ] + |), + [ M.read (| x |) ] + |)) + ] + |) + |) + |) ] |) ] @@ -466,7 +512,7 @@ Module panicking. panic!("index out of bounds: the len is {len} but the index is {index}") } *) - Definition panic_bounds_check (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_bounds_check (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ index; len ] => ltac:(M.monadic @@ -475,18 +521,18 @@ Module panicking. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool false |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool false |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::intrinsics::abort", [] |), [] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -497,37 +543,49 @@ Module panicking. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "index out of bounds: the len is " |); - M.read (| Value.String " but the index is " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "index out of bounds: the len is " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " but the index is " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ len ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ index ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ len ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ index ] + |)) + ] + |) + |) + |) ] |) ] @@ -551,7 +609,7 @@ Module panicking. ) } *) - Definition panic_misaligned_pointer_dereference (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_misaligned_pointer_dereference (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ required; found ] => ltac:(M.monadic @@ -560,18 +618,18 @@ Module panicking. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool false |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool false |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::intrinsics::abort", [] |), [] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -586,84 +644,112 @@ Module panicking. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "misaligned pointer dereference: address must be a multiple of " - |); - M.read (| Value.String " but is " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "misaligned pointer dereference: address must be a multiple of " + |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " but is " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "usize" ] - |), - [ required ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "usize" ] - |), - [ found ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "usize" ] + |), + [ required ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "usize" ] + |), + [ found ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple "core::fmt::rt::Alignment::Unknown" []; - Value.Integer Integer.U32 4; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple "core::fmt::rt::Count::Implied" [] - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 1; - Value.UnicodeChar 32; - Value.StructTuple "core::fmt::rt::Alignment::Unknown" []; - Value.Integer Integer.U32 4; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple "core::fmt::rt::Count::Implied" [] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Unknown" [] + |); + M.of_value (| Value.Integer 4 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Unknown" [] + |); + M.of_value (| Value.Integer 4 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", "new", [] |), [] |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) @@ -677,13 +763,13 @@ Module panicking. panic_nounwind("panic in a function that cannot unwind") } *) - Definition panic_cannot_unwind (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_cannot_unwind (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.call_closure (| M.get_function (| "core::panicking::panic_nounwind", [] |), - [ M.read (| Value.String "panic in a function that cannot unwind" |) ] + [ M.read (| M.of_value (| Value.String "panic in a function that cannot unwind" |) |) ] |))) | _, _ => M.impossible end. @@ -694,13 +780,13 @@ Module panicking. panic_nounwind_nobacktrace("panic in a destructor during cleanup") } *) - Definition panic_in_cleanup (τ : list Ty.t) (α : list Value.t) : M := + Definition panic_in_cleanup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.call_closure (| M.get_function (| "core::panicking::panic_nounwind_nobacktrace", [] |), - [ M.read (| Value.String "panic in a destructor during cleanup" |) ] + [ M.read (| M.of_value (| Value.String "panic in a destructor during cleanup" |) |) ] |))) | _, _ => M.impossible end. @@ -718,14 +804,14 @@ Module panicking. } } *) - Definition const_panic_fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition const_panic_fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fmt ] => ltac:(M.monadic (let fmt := M.alloc (| fmt |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -763,7 +849,7 @@ Module panicking. |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -799,7 +885,7 @@ Module panicking. Definition Self : Ty.t := Ty.path "core::panicking::AssertKind". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -816,15 +902,15 @@ Module panicking. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Eq" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Eq" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Ne" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Ne" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Match" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Match" |) |) |))) ] |) |) @@ -855,7 +941,7 @@ Module panicking. assert_failed_inner(kind, &left, &right, args) } *) - Definition assert_failed (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_failed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; U ], [ kind; _ as left; _ as right; args ] => ltac:(M.monadic @@ -867,8 +953,8 @@ Module panicking. M.get_function (| "core::panicking::assert_failed_inner", [] |), [ M.read (| kind |); - (* Unsize *) M.pointer_coercion left; - (* Unsize *) M.pointer_coercion right; + (* Unsize *) M.pointer_coercion (| left |); + (* Unsize *) M.pointer_coercion (| right |); M.read (| args |) ] |))) @@ -891,7 +977,7 @@ Module panicking. assert_failed_inner(AssertKind::Match, &left, &Pattern(right), args); } *) - Definition assert_matches_failed (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_matches_failed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ _ as left; _ as right; args ] => ltac:(M.monadic @@ -901,15 +987,18 @@ Module panicking. M.call_closure (| M.get_function (| "core::panicking::assert_failed_inner", [] |), [ - Value.StructTuple "core::panicking::AssertKind::Match" []; - (* Unsize *) M.pointer_coercion left; + M.of_value (| Value.StructTuple "core::panicking::AssertKind::Match" [] |); + (* Unsize *) M.pointer_coercion (| left |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.StructTuple - "core::panicking::assert_matches_failed::Pattern" - [ M.read (| right |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.StructTuple + "core::panicking::assert_matches_failed::Pattern" + [ A.to_value (M.read (| right |)) ] + |) + |) + |); M.read (| args |) ] |))) @@ -932,7 +1021,7 @@ Module panicking. f.write_str(self.0) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -990,7 +1079,7 @@ Module panicking. } } *) - Definition assert_failed_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_failed_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ kind; _ as left; _ as right; args ] => ltac:(M.monadic @@ -1004,9 +1093,13 @@ Module panicking. 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 (M.of_value (| Value.String "==" |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.read (| M.of_value (| Value.String "!=" |) |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.read (| M.of_value (| Value.String "matches" |) |) |))) ] |) |) in @@ -1030,65 +1123,83 @@ Module panicking. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "assertion `left " |); - M.read (| Value.String " right` failed: " |); - M.read (| Value.String " - left: " |); - M.read (| Value.String " - right: " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "assertion `left " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " right` failed: " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " + left: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " + right: " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ op ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "core::fmt::Arguments" ] - |), - [ args ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&") - [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] - ] - |), - [ left ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&") - [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] - ] - |), - [ right ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ op ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "core::fmt::Arguments" ] + |), + [ args ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "&") + [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] + ] + |), + [ left ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "&") + [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] + ] + |), + [ right ] + |)) + ] + |) + |) + |) ] |) ] @@ -1108,56 +1219,72 @@ Module panicking. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "assertion `left " |); - M.read (| Value.String " right` failed - left: " |); - M.read (| Value.String " - right: " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "assertion `left " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " right` failed + left: " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " + right: " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ op ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&") - [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] - ] - |), - [ left ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&") - [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] - ] - |), - [ right ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ op ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "&") + [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] + ] + |), + [ left ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "&") + [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] + ] + |), + [ right ] + |)) + ] + |) + |) + |) ] |) ] diff --git a/CoqOfRust/core/pin.v b/CoqOfRust/core/pin.v index 063b99988..047ab4623 100644 --- a/CoqOfRust/core/pin.v +++ b/CoqOfRust/core/pin.v @@ -25,27 +25,30 @@ Module pin. Definition Self (P : Ty.t) : Ty.t := Ty.apply (Ty.path "core::pin::Pin") [ P ]. (* Clone *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::pin::Pin" - [ - ("pointer", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::pin::Pin", - "pointer" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::pin::Pin" + [ + ("pointer", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::pin::Pin", + "pointer" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -66,7 +69,7 @@ Module pin. P::Target::eq(self, other) } *) - Definition eq (P Q : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (P Q : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P Q in match τ, α with | [], [ self; other ] => @@ -112,7 +115,7 @@ Module pin. P::Target::ne(self, other) } *) - Definition ne (P Q : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (P Q : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P Q in match τ, α with | [], [ self; other ] => @@ -179,7 +182,7 @@ Module pin. P::Target::partial_cmp(self, other) } *) - Definition partial_cmp (P Q : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (P Q : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P Q in match τ, α with | [], [ self; other ] => @@ -225,7 +228,7 @@ Module pin. P::Target::lt(self, other) } *) - Definition lt (P Q : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (P Q : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P Q in match τ, α with | [], [ self; other ] => @@ -271,7 +274,7 @@ Module pin. P::Target::le(self, other) } *) - Definition le (P Q : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (P Q : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P Q in match τ, α with | [], [ self; other ] => @@ -317,7 +320,7 @@ Module pin. P::Target::gt(self, other) } *) - Definition gt (P Q : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (P Q : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P Q in match τ, α with | [], [ self; other ] => @@ -363,7 +366,7 @@ Module pin. P::Target::ge(self, other) } *) - Definition ge (P Q : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (P Q : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P Q in match τ, α with | [], [ self; other ] => @@ -428,7 +431,7 @@ Module pin. P::Target::cmp(self, other) } *) - Definition cmp (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; other ] => @@ -480,7 +483,7 @@ Module pin. P::Target::hash(self, state); } *) - Definition hash (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [ H ], [ self; state ] => @@ -507,7 +510,7 @@ Module pin. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -531,7 +534,7 @@ Module pin. unsafe { Pin::new_unchecked(pointer) } } *) - Definition new (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ pointer ] => @@ -555,7 +558,7 @@ Module pin. pin.pointer } *) - Definition into_inner (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ pin ] => @@ -573,13 +576,15 @@ Module pin. Pin { pointer } } *) - Definition new_unchecked (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ pointer ] => ltac:(M.monadic (let pointer := M.alloc (| pointer |) in - Value.StructRecord "core::pin::Pin" [ ("pointer", M.read (| pointer |)) ])) + M.of_value (| + Value.StructRecord "core::pin::Pin" [ ("pointer", A.to_value (M.read (| pointer |))) ] + |))) | _, _ => M.impossible end. @@ -593,7 +598,7 @@ Module pin. unsafe { Pin::new_unchecked(&*self.pointer) } } *) - Definition as_ref (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -630,7 +635,7 @@ Module pin. pin.pointer } *) - Definition into_inner_unchecked (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner_unchecked (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ pin ] => @@ -649,7 +654,7 @@ Module pin. unsafe { Pin::new_unchecked(&mut *self.pointer) } } *) - Definition as_mut (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -689,7 +694,7 @@ Module pin. *(self.pointer) = value; } *) - Definition set (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition set (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; value ] => @@ -711,7 +716,7 @@ Module pin. |), M.read (| value |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -739,7 +744,7 @@ Module pin. unsafe { Pin::new_unchecked(new_pointer) } } *) - Definition map_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ self; func ] => @@ -763,7 +768,10 @@ Module pin. "call_once", [] |), - [ M.read (| func |); Value.Tuple [ M.read (| pointer |) ] ] + [ + M.read (| func |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| pointer |)) ] |) + ] |) |) in M.alloc (| @@ -789,7 +797,7 @@ Module pin. self.pointer } *) - Definition get_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -811,7 +819,7 @@ Module pin. unsafe { Pin::new_unchecked(r) } } *) - Definition static_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition static_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ r ] => @@ -842,20 +850,23 @@ Module pin. Pin { pointer: self.pointer } } *) - Definition into_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::pin::Pin" - [ - ("pointer", - M.read (| - M.SubPointer.get_struct_record_field (| self, "core::pin::Pin", "pointer" |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::pin::Pin" + [ + ("pointer", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| self, "core::pin::Pin", "pointer" |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -871,7 +882,7 @@ Module pin. self.pointer } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -892,7 +903,7 @@ Module pin. self.pointer } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -923,7 +934,7 @@ Module pin. unsafe { Pin::new_unchecked(new_pointer) } } *) - Definition map_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ self; func ] => @@ -952,7 +963,10 @@ Module pin. "call_once", [] |), - [ M.read (| func |); Value.Tuple [ M.read (| pointer |) ] ] + [ + M.read (| func |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| pointer |)) ] |) + ] |) |) in M.alloc (| @@ -979,7 +993,7 @@ Module pin. unsafe { Pin::new_unchecked(r) } } *) - Definition static_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition static_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ r ] => @@ -1036,7 +1050,7 @@ Module pin. unsafe { self.get_unchecked_mut() }.as_mut() } *) - Definition as_deref_mut (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_deref_mut (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -1077,7 +1091,7 @@ Module pin. Pin::get_ref(Pin::as_ref(self)) } *) - Definition deref (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -1121,7 +1135,7 @@ Module pin. Pin::get_mut(Pin::as_mut(self)) } *) - Definition deref_mut (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition deref_mut (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -1176,7 +1190,7 @@ Module pin. fmt::Debug::fmt(&self.pointer, f) } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -1214,7 +1228,7 @@ Module pin. fmt::Display::fmt(&self.pointer, f) } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -1252,7 +1266,7 @@ Module pin. fmt::Pointer::fmt(&self.pointer, f) } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => diff --git a/CoqOfRust/core/proofs/default.v b/CoqOfRust/core/proofs/default.v index d5c53a46b..c8dcd6b20 100644 --- a/CoqOfRust/core/proofs/default.v +++ b/CoqOfRust/core/proofs/default.v @@ -6,15 +6,15 @@ Require core.simulations.default. Import Run. Module Default. - Record TraitHasRun (Self : Set) + Record TraitHasRun (Self : Set) (Self_ty : Ty.t) `{ToValue Self} `{core.simulations.default.Default.Trait Self} : Prop := { default : exists default, - IsTraitMethod "core::default::Default" (Φ Self) [] "default" default /\ + IsTraitMethod "core::default::Default" Self_ty [] "default" default /\ Run.pure (default [] []) - (inl (φ core.simulations.default.Default.default)); + (inl (A.make core.simulations.default.Default.default)); }. End Default. diff --git a/CoqOfRust/core/proofs/option.v b/CoqOfRust/core/proofs/option.v index 3750fcc94..ef3f2a1b1 100644 --- a/CoqOfRust/core/proofs/option.v +++ b/CoqOfRust/core/proofs/option.v @@ -8,19 +8,22 @@ Require CoqOfRust.core.simulations.option. Import Run. Module Impl_Option_T. - Lemma run_unwrap_or_default {T : Set} + Lemma run_unwrap_or_default {T : Set} {T_ty : Ty.t} {_ : ToValue T} {_ : core.simulations.default.Default.Trait T} (self : option T) : - core.proofs.default.Default.TraitHasRun T -> + core.proofs.default.Default.TraitHasRun T T_ty -> Run.pure - (core.option.option.Impl_core_option_Option_T.unwrap_or_default (Φ T) [] [φ self]) - (inl (φ (core.simulations.option.Impl_Option_T.unwrap_or_default self))). + (core.option.option.Impl_core_option_Option_T.unwrap_or_default T_ty [] [A.make self]) + (inl (A.make (core.simulations.option.Impl_Option_T.unwrap_or_default self))). Proof. intros H_Default. destruct H_Default as [[default [H_default H_run_default]]]. unfold Run.pure; intros. run_symbolic. + eapply Run.CallPrimitiveStateAllocImmediate. + apply Immediate.of_value. + run_symbolic. destruct self; cbn. { run_symbolic. } { eapply Run.CallPrimitiveGetTraitMethod. { diff --git a/CoqOfRust/core/ptr/alignment.v b/CoqOfRust/core/ptr/alignment.v index cec1c3635..541f44d79 100644 --- a/CoqOfRust/core/ptr/alignment.v +++ b/CoqOfRust/core/ptr/alignment.v @@ -25,14 +25,14 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::Alignment". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -62,7 +62,7 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::Alignment". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -115,15 +115,15 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::Alignment". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -143,7 +143,7 @@ Module ptr. matches!(a, Alignment::MIN) } *) - Definition _alignment_can_be_structurally_matched (τ : list Ty.t) (α : list Value.t) : M := + Definition _alignment_can_be_structurally_matched (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a ] => ltac:(M.monadic @@ -160,8 +160,8 @@ Module ptr. "core::ptr::alignment::Alignment", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -173,13 +173,20 @@ Module ptr. (* pub const MIN: Self = Self(AlignmentEnum::_Align1Shl0); *) (* Ty.path "core::ptr::alignment::Alignment" *) - Definition value_MIN : Value.t := + Definition value_MIN : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::ptr::alignment::Alignment" - [ Value.StructTuple "core::ptr::alignment::AlignmentEnum64::_Align1Shl0" [] ] + M.of_value (| + Value.StructTuple + "core::ptr::alignment::Alignment" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::ptr::alignment::AlignmentEnum64::_Align1Shl0" [] + |)) + ] + |) |))). Axiom AssociatedConstant_value_MIN : M.IsAssociatedConstant Self "value_MIN" value_MIN. @@ -190,7 +197,7 @@ Module ptr. unsafe { Alignment::new_unchecked(mem::align_of::()) } } *) - Definition of (τ : list Ty.t) (α : list Value.t) : M := + Definition of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -217,14 +224,14 @@ Module ptr. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ align ] => ltac:(M.monadic (let align := M.alloc (| align |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -242,22 +249,27 @@ Module ptr. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ptr::alignment::Alignment", - "new_unchecked", - [] - |), - [ M.read (| align |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::ptr::alignment::Alignment", + "new_unchecked", + [] + |), + [ M.read (| align |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -278,7 +290,7 @@ Module ptr. unsafe { mem::transmute::(align) } } *) - Definition new_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ align ] => ltac:(M.monadic @@ -286,30 +298,31 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "is_power_of_two", [] |), [ M.read (| align |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -332,27 +345,34 @@ Module ptr. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "Alignment::new_unchecked requires a power of two" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Alignment::new_unchecked requires a power of two" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -376,15 +396,16 @@ Module ptr. self.0 as usize } *) - Definition as_usize (τ : list Ty.t) (α : list Value.t) : M := + Definition as_usize (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "core::ptr::alignment::Alignment", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -396,7 +417,7 @@ Module ptr. unsafe { NonZeroUsize::new_unchecked(self.as_usize()) } } *) - Definition as_nonzero (τ : list Ty.t) (α : list Value.t) : M := + Definition as_nonzero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -428,7 +449,7 @@ Module ptr. self.as_nonzero().trailing_zeros() } *) - Definition log2 (τ : list Ty.t) (α : list Value.t) : M := + Definition log2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -461,13 +482,13 @@ Module ptr. !(unsafe { self.as_usize().unchecked_sub(1) }) } *) - Definition mask (τ : list Ty.t) (α : list Value.t) : M := + Definition mask (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "unchecked_sub", [] |), [ M.call_closure (| @@ -478,9 +499,10 @@ Module ptr. |), [ M.read (| self |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -495,7 +517,7 @@ Module ptr. write!(f, "{:?} (1 << {:?})", self.as_nonzero(), self.log2()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -509,60 +531,68 @@ Module ptr. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " (1 << " |); - M.read (| Value.String ")" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " (1 << " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ")" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "core::num::nonzero::NonZeroUsize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ptr::alignment::Alignment", - "as_nonzero", - [] - |), - [ M.read (| M.read (| self |) |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "core::ptr::alignment::Alignment", - "log2", - [] - |), - [ M.read (| M.read (| self |) |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "core::num::nonzero::NonZeroUsize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::ptr::alignment::Alignment", + "as_nonzero", + [] + |), + [ M.read (| M.read (| self |) |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::ptr::alignment::Alignment", + "log2", + [] + |), + [ M.read (| M.read (| self |) |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -589,7 +619,7 @@ Module ptr. align.get().try_into() } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ align ] => ltac:(M.monadic @@ -636,7 +666,7 @@ Module ptr. Self::new(align).ok_or(num::TryFromIntError(())) } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ align ] => ltac:(M.monadic @@ -658,7 +688,11 @@ Module ptr. |), [ M.read (| align |) ] |); - Value.StructTuple "core::num::error::TryFromIntError" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::num::error::TryFromIntError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) ] |))) | _, _ => M.impossible @@ -681,7 +715,7 @@ Module ptr. align.as_nonzero() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ align ] => ltac:(M.monadic @@ -713,7 +747,7 @@ Module ptr. align.as_usize() } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ align ] => ltac:(M.monadic @@ -745,7 +779,7 @@ Module ptr. self.as_nonzero().get().cmp(&other.as_nonzero().get()) } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -813,26 +847,29 @@ Module ptr. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - Ty.path "core::ptr::alignment::Alignment", - [], - "cmp", - [] - |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "core::ptr::alignment::Alignment", + [], + "cmp", + [] + |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -852,7 +889,7 @@ Module ptr. self.as_nonzero().hash(state) } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ H ], [ self; state ] => ltac:(M.monadic @@ -899,7 +936,7 @@ Module ptr. Alignment::MIN } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.get_constant (| "core::ptr::alignment::MIN" |) |))) | _, _ => M.impossible @@ -1022,7 +1059,7 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::AlignmentEnum16". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1054,7 +1091,7 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::AlignmentEnum16". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1081,7 +1118,7 @@ Module ptr. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -1109,12 +1146,12 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::AlignmentEnum16". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -1312,7 +1349,7 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::AlignmentEnum32". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1344,7 +1381,7 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::AlignmentEnum32". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1371,7 +1408,7 @@ Module ptr. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -1399,12 +1436,12 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::AlignmentEnum32". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -1762,7 +1799,7 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::AlignmentEnum64". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1794,7 +1831,7 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::AlignmentEnum64". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1821,7 +1858,7 @@ Module ptr. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -1849,12 +1886,12 @@ Module ptr. Definition Self : Ty.t := Ty.path "core::ptr::alignment::AlignmentEnum64". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/ptr/const_ptr.v b/CoqOfRust/core/ptr/const_ptr.v index d6050b91b..d961727df 100644 --- a/CoqOfRust/core/ptr/const_ptr.v +++ b/CoqOfRust/core/ptr/const_ptr.v @@ -27,7 +27,7 @@ Module ptr. unsafe { const_eval_select((self as *const u8,), const_impl, runtime_impl) } } *) - Definition is_null (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_null (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -44,7 +44,7 @@ Module ptr. ] |), [ - Value.Tuple [ M.rust_cast (M.read (| self |)) ]; + M.of_value (| Value.Tuple [ A.to_value (M.rust_cast (| M.read (| self |) |)) ] |); M.get_associated_function (| Self, "const_impl.is_null", [] |); M.get_associated_function (| Self, "runtime_impl.is_null", [] |) ] @@ -61,13 +61,13 @@ Module ptr. self as _ } *) - Definition cast (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cast (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| self |)))) + M.rust_cast (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -83,7 +83,7 @@ Module ptr. from_raw_parts::(self as *const (), metadata(meta)) } *) - Definition with_metadata_of (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_metadata_of (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self; meta ] => @@ -93,7 +93,7 @@ Module ptr. M.call_closure (| M.get_function (| "core::ptr::metadata::from_raw_parts", [ U ] |), [ - M.rust_cast (M.read (| self |)); + M.rust_cast (| M.read (| self |) |); M.call_closure (| M.get_function (| "core::ptr::metadata::metadata", [ U ] |), [ M.read (| meta |) ] @@ -112,13 +112,13 @@ Module ptr. self as _ } *) - Definition cast_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cast_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| self |)))) + M.rust_cast (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -134,13 +134,13 @@ Module ptr. self as usize } *) - Definition to_bits (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_bits (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| self |)))) + M.rust_cast (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -156,13 +156,13 @@ Module ptr. bits as Self } *) - Definition from_bits (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_bits (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ bits ] => ltac:(M.monadic (let bits := M.alloc (| bits |) in - M.rust_cast (M.read (| bits |)))) + M.rust_cast (| M.read (| bits |) |))) | _, _ => M.impossible end. @@ -178,7 +178,7 @@ Module ptr. unsafe { mem::transmute(self.cast::<()>()) } } *) - Definition addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -213,21 +213,22 @@ Module ptr. self.cast::<()>() as usize } *) - Definition expose_addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition expose_addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "cast", [ Ty.tuple [] ] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -250,7 +251,7 @@ Module ptr. self.wrapping_byte_offset(offset) } *) - Definition with_addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; addr ] => @@ -260,13 +261,14 @@ Module ptr. M.read (| let self_addr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "addr", [] |), [ M.read (| self |) ] - |)) + |) + |) |) in - let dest_addr := M.alloc (| M.rust_cast (M.read (| addr |)) |) in + let dest_addr := M.alloc (| M.rust_cast (| M.read (| addr |) |) |) in let offset := M.alloc (| M.call_closure (| @@ -297,7 +299,7 @@ Module ptr. self.with_addr(f(self.addr())) } *) - Definition map_addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ impl_FnOnce_usize__arrow_usize ], [ self; f ] => @@ -318,17 +320,20 @@ Module ptr. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "addr", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "addr", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) ] |) ] @@ -345,27 +350,31 @@ Module ptr. (self.cast(), metadata(self)) } *) - Definition to_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "cast", - [ Ty.tuple [] ] - |), - [ M.read (| self |) ] - |); - M.call_closure (| - M.get_function (| "core::ptr::metadata::metadata", [ T ] |), - [ M.read (| self |) ] - |) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "cast", + [ Ty.tuple [] ] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| "core::ptr::metadata::metadata", [ T ] |), + [ M.read (| self |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -380,7 +389,7 @@ Module ptr. if self.is_null() { None } else { unsafe { Some(&*self) } } } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -388,7 +397,7 @@ Module ptr. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -405,11 +414,17 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -431,7 +446,7 @@ Module ptr. if self.is_null() { None } else { Some(unsafe { &*(self as *const MaybeUninit) }) } } *) - Definition as_uninit_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -439,7 +454,7 @@ Module ptr. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -456,13 +471,17 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.rust_cast (M.read (| self |)) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.rust_cast (| M.read (| self |) |)) ] + |) |))) ] |) @@ -483,7 +502,7 @@ Module ptr. unsafe { intrinsics::offset(self, count) } } *) - Definition offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -510,7 +529,7 @@ Module ptr. unsafe { self.cast::().offset(count).with_metadata_of(self) } } *) - Definition byte_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -561,7 +580,7 @@ Module ptr. unsafe { intrinsics::arith_offset(self, count) } } *) - Definition wrapping_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -584,7 +603,7 @@ Module ptr. self.cast::().wrapping_offset(count).with_metadata_of(self) } *) - Definition wrapping_byte_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_byte_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -631,7 +650,7 @@ Module ptr. intrinsics::ptr_mask(self.cast::<()>(), mask).with_metadata_of(self) } *) - Definition mask (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition mask (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; mask ] => @@ -680,7 +699,7 @@ Module ptr. unsafe { intrinsics::ptr_offset_from(self, origin) } } *) - Definition offset_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition offset_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; origin ] => @@ -694,24 +713,28 @@ Module ptr. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.lt - (Value.Integer Integer.Usize 0) - (M.read (| pointee_size |)), + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.lt (| + M.of_value (| Value.Integer 0 |), + M.read (| pointee_size |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| pointee_size |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))))) - |)) + (BinOp.Pure.le (| + M.read (| pointee_size |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -721,14 +744,16 @@ Module ptr. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize" + M.of_value (| + Value.String + "assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -751,7 +776,7 @@ Module ptr. unsafe { self.cast::().offset_from(origin.cast::()) } } *) - Definition byte_offset_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_offset_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self; origin ] => @@ -811,7 +836,7 @@ Module ptr. unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) } } *) - Definition sub_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; origin ] => @@ -822,11 +847,11 @@ Module ptr. let this := M.copy (| self |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -856,14 +881,20 @@ Module ptr. ] |), [ - Value.Tuple [ M.read (| this |); M.read (| origin |) ]; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| this |)); + A.to_value (M.read (| origin |)) + ] + |); M.get_associated_function (| Self, "comptime.sub_ptr", [] |); M.get_associated_function (| Self, "runtime.sub_ptr", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let pointee_size := @@ -872,24 +903,28 @@ Module ptr. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.lt - (Value.Integer Integer.Usize 0) - (M.read (| pointee_size |)), + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.lt (| + M.of_value (| Value.Integer 0 |), + M.read (| pointee_size |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| pointee_size |)) - (M.rust_cast - (M.read (| M.get_constant (| "core::num::MAX" |) |))))) - |)) + (BinOp.Pure.le (| + M.read (| pointee_size |), + M.rust_cast (| + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -899,14 +934,16 @@ Module ptr. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize" + M.of_value (| + Value.String + "assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -934,7 +971,7 @@ Module ptr. } } *) - Definition guaranteed_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition guaranteed_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -953,18 +990,25 @@ Module ptr. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U8 2 - |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 2 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let other := M.copy (| γ |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ BinOp.Pure.eq (M.read (| other |)) (Value.Integer Integer.U8 1) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Pure.eq (| + M.read (| other |), + M.of_value (| Value.Integer 1 |) + |)) + ] + |) |))) ] |) @@ -987,7 +1031,7 @@ Module ptr. } } *) - Definition guaranteed_ne (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition guaranteed_ne (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -1009,7 +1053,9 @@ Module ptr. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1020,9 +1066,11 @@ Module ptr. |) in let eq := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ UnOp.Pure.not (M.read (| eq |)) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (UnOp.Pure.not (| M.read (| eq |) |)) ] + |) |))) ] |) @@ -1043,7 +1091,7 @@ Module ptr. unsafe { intrinsics::offset(self, count) } } *) - Definition add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1070,7 +1118,7 @@ Module ptr. unsafe { self.cast::().add(count).with_metadata_of(self) } } *) - Definition byte_add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1128,7 +1176,7 @@ Module ptr. } } *) - Definition sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1137,7 +1185,7 @@ Module ptr. let count := M.alloc (| count |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1161,7 +1209,10 @@ Module ptr. "core::intrinsics::unchecked_sub", [ Ty.path "isize" ] |), - [ Value.Integer Integer.Isize 0; M.rust_cast (M.read (| count |)) ] + [ + M.of_value (| Value.Integer 0 |); + M.rust_cast (| M.read (| count |) |) + ] |) ] |) @@ -1182,7 +1233,7 @@ Module ptr. unsafe { self.cast::().sub(count).with_metadata_of(self) } } *) - Definition byte_sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1232,7 +1283,7 @@ Module ptr. self.wrapping_offset(count as isize) } *) - Definition wrapping_add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1245,7 +1296,7 @@ Module ptr. "wrapping_offset", [] |), - [ M.read (| self |); M.rust_cast (M.read (| count |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| count |) |) ] |))) | _, _ => M.impossible end. @@ -1259,7 +1310,7 @@ Module ptr. self.cast::().wrapping_add(count).with_metadata_of(self) } *) - Definition wrapping_byte_add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_byte_add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1309,7 +1360,7 @@ Module ptr. self.wrapping_offset((count as isize).wrapping_neg()) } *) - Definition wrapping_sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1326,7 +1377,7 @@ Module ptr. M.read (| self |); M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_neg", [] |), - [ M.rust_cast (M.read (| count |)) ] + [ M.rust_cast (| M.read (| count |) |) ] |) ] |))) @@ -1342,7 +1393,7 @@ Module ptr. self.cast::().wrapping_sub(count).with_metadata_of(self) } *) - Definition wrapping_byte_sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_byte_sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1393,7 +1444,7 @@ Module ptr. unsafe { read(self) } } *) - Definition read (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition read (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1419,7 +1470,7 @@ Module ptr. unsafe { read_volatile(self) } } *) - Definition read_volatile (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition read_volatile (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1445,7 +1496,7 @@ Module ptr. unsafe { read_unaligned(self) } } *) - Definition read_unaligned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition read_unaligned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1471,7 +1522,7 @@ Module ptr. unsafe { copy(self, dest, count) } } *) - Definition copy_to (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_to (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; dest; count ] => @@ -1499,7 +1550,7 @@ Module ptr. unsafe { copy_nonoverlapping(self, dest, count) } } *) - Definition copy_to_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_to_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; dest; count ] => @@ -1539,7 +1590,7 @@ Module ptr. ret } *) - Definition align_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition align_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; align ] => @@ -1549,22 +1600,23 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "is_power_of_two", [] |), [ M.read (| align |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1581,23 +1633,29 @@ Module ptr. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "align_offset: align is not a power-of-two" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "align_offset: align is not a power-of-two" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ret := @@ -1624,7 +1682,7 @@ Module ptr. self.is_aligned_to(mem::align_of::()) } *) - Definition is_aligned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_aligned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1672,7 +1730,7 @@ Module ptr. unsafe { const_eval_select((self.cast::<()>(), align), const_impl, runtime_impl) } } *) - Definition is_aligned_to (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_aligned_to (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; align ] => @@ -1682,22 +1740,23 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "is_power_of_two", [] |), [ M.read (| align |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1714,23 +1773,29 @@ Module ptr. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "is_aligned_to: align is not a power-of-two" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "is_aligned_to: align is not a power-of-two" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1749,18 +1814,21 @@ Module ptr. ] |), [ - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "cast", - [ Ty.tuple [] ] - |), - [ M.read (| self |) ] - |); - M.read (| align |) - ]; + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "cast", + [ Ty.tuple [] ] + |), + [ M.read (| self |) ] + |)); + A.to_value (M.read (| align |)) + ] + |); M.get_associated_function (| Self, "const_impl.is_aligned_to", [] |); M.get_associated_function (| Self, "runtime_impl.is_aligned_to", [] |) ] @@ -1784,7 +1852,7 @@ Module ptr. metadata(self) } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1809,22 +1877,23 @@ Module ptr. self.len() == 0 } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.apply (Ty.path "slice") [ T ] ], "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -1837,13 +1906,13 @@ Module ptr. self as *const T } *) - Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| self |)))) + M.rust_cast (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -1860,7 +1929,7 @@ Module ptr. unsafe { index.get_unchecked(self) } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ self; index ] => @@ -1894,7 +1963,7 @@ Module ptr. } } *) - Definition as_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1902,7 +1971,7 @@ Module ptr. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1919,33 +1988,42 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::slice::raw::from_raw_parts", - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - |), - [ - M.rust_cast (M.read (| self |)); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "*const") - [ Ty.apply (Ty.path "slice") [ T ] ], - "len", - [] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts", + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] |), - [ M.read (| self |) ] - |) - ] - |) - ] + [ + M.rust_cast (| M.read (| self |) |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*const") + [ Ty.apply (Ty.path "slice") [ T ] ], + "len", + [] + |), + [ M.read (| self |) ] + |) + ] + |)) + ] + |) |))) ] |) @@ -1966,14 +2044,14 @@ Module ptr. *self == *other } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2012,7 +2090,7 @@ Module ptr. } } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2021,7 +2099,7 @@ Module ptr. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2040,11 +2118,13 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2073,10 +2153,14 @@ Module ptr. M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -2102,27 +2186,30 @@ Module ptr. Some(self.cmp(other)) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - Ty.apply (Ty.path "*const") [ T ], - [], - "cmp", - [] - |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.apply (Ty.path "*const") [ T ], + [], + "cmp", + [] + |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2131,14 +2218,14 @@ Module ptr. *self < *other } *) - Definition lt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2147,14 +2234,14 @@ Module ptr. *self <= *other } *) - Definition le (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2163,14 +2250,14 @@ Module ptr. *self > *other } *) - Definition gt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2179,14 +2266,14 @@ Module ptr. *self >= *other } *) - Definition ge (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/ptr/metadata.v b/CoqOfRust/core/ptr/metadata.v index a64876bd1..141f6ecd5 100644 --- a/CoqOfRust/core/ptr/metadata.v +++ b/CoqOfRust/core/ptr/metadata.v @@ -16,7 +16,7 @@ Module ptr. unsafe { PtrRepr { const_ptr: ptr }.components.metadata } } *) - Definition metadata (τ : list Ty.t) (α : list Value.t) : M := + Definition metadata (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ ptr ] => ltac:(M.monadic @@ -25,9 +25,11 @@ Module ptr. M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.alloc (| - Value.StructRecord - "core::ptr::metadata::PtrRepr" - [ ("const_ptr", M.read (| ptr |)) ] + M.of_value (| + Value.StructRecord + "core::ptr::metadata::PtrRepr" + [ ("const_ptr", A.to_value (M.read (| ptr |))) ] + |) |), "core::ptr::metadata::PtrRepr", "components" @@ -50,7 +52,7 @@ Module ptr. unsafe { PtrRepr { components: PtrComponents { data_address, metadata } }.const_ptr } } *) - Definition from_raw_parts (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_parts (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ data_address; metadata ] => ltac:(M.monadic @@ -59,17 +61,22 @@ Module ptr. M.read (| M.SubPointer.get_struct_record_field (| M.alloc (| - Value.StructRecord - "core::ptr::metadata::PtrRepr" - [ - ("components", - Value.StructRecord - "core::ptr::metadata::PtrComponents" - [ - ("data_address", M.read (| data_address |)); - ("metadata", M.read (| metadata |)) - ]) - ] + M.of_value (| + Value.StructRecord + "core::ptr::metadata::PtrRepr" + [ + ("components", + A.to_value + (M.of_value (| + Value.StructRecord + "core::ptr::metadata::PtrComponents" + [ + ("data_address", A.to_value (M.read (| data_address |))); + ("metadata", A.to_value (M.read (| metadata |))) + ] + |))) + ] + |) |), "core::ptr::metadata::PtrRepr", "const_ptr" @@ -89,7 +96,7 @@ Module ptr. unsafe { PtrRepr { components: PtrComponents { data_address, metadata } }.mut_ptr } } *) - Definition from_raw_parts_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_parts_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ data_address; metadata ] => ltac:(M.monadic @@ -98,18 +105,25 @@ Module ptr. M.read (| M.SubPointer.get_struct_record_field (| M.alloc (| - Value.StructRecord - "core::ptr::metadata::PtrRepr" - [ - ("components", - Value.StructRecord - "core::ptr::metadata::PtrComponents" - [ - ("data_address", - (* MutToConstPointer *) M.pointer_coercion (M.read (| data_address |))); - ("metadata", M.read (| metadata |)) - ]) - ] + M.of_value (| + Value.StructRecord + "core::ptr::metadata::PtrRepr" + [ + ("components", + A.to_value + (M.of_value (| + Value.StructRecord + "core::ptr::metadata::PtrComponents" + [ + ("data_address", + A.to_value + (* MutToConstPointer *) + (M.pointer_coercion (| M.read (| data_address |) |))); + ("metadata", A.to_value (M.read (| metadata |))) + ] + |))) + ] + |) |), "core::ptr::metadata::PtrRepr", "mut_ptr" @@ -153,7 +167,7 @@ Module ptr. *self } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -200,7 +214,7 @@ Module ptr. }; } *) - Definition size_of (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_of (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [], [ self ] => @@ -214,8 +228,8 @@ Module ptr. M.call_closure (| M.get_function (| "core::intrinsics::vtable_size", [] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.use (M.alloc (| M.read (| @@ -226,7 +240,8 @@ Module ptr. |) |) |)) - |)) + |) + |) ] |) |) @@ -248,7 +263,7 @@ Module ptr. }; } *) - Definition align_of (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition align_of (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [], [ self ] => @@ -262,8 +277,8 @@ Module ptr. M.call_closure (| M.get_function (| "core::intrinsics::vtable_align", [] |), [ - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.use (M.alloc (| M.read (| @@ -274,7 +289,8 @@ Module ptr. |) |) |)) - |)) + |) + |) ] |) |) @@ -295,7 +311,7 @@ Module ptr. unsafe { crate::alloc::Layout::from_size_align_unchecked(self.size_of(), self.align_of()) } } *) - Definition layout (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition layout (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [], [ self ] => @@ -369,7 +385,7 @@ Module ptr. f.debug_tuple("DynMetadata").field(&(self.vtable_ptr as *const VTable)).finish() } *) - Definition fmt (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [], [ self; f ] => @@ -397,12 +413,12 @@ Module ptr. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "DynMetadata" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "DynMetadata" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.use + M.pointer_coercion (| + M.use (M.alloc (| M.read (| M.SubPointer.get_struct_record_field (| @@ -411,7 +427,8 @@ Module ptr. "vtable_ptr" |) |) - |))) + |)) + |) ] |) ] @@ -463,7 +480,7 @@ Module ptr. *self } *) - Definition clone (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [], [ self ] => @@ -504,7 +521,7 @@ Module ptr. crate::ptr::eq::(self.vtable_ptr, other.vtable_ptr) } *) - Definition eq (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [], [ self; other ] => @@ -551,7 +568,7 @@ Module ptr. (self.vtable_ptr as *const VTable).cmp(&(other.vtable_ptr as *const VTable)) } *) - Definition cmp (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [], [ self; other ] => @@ -610,27 +627,30 @@ Module ptr. Some(self.cmp(other)) } *) - Definition partial_cmp (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - Ty.apply (Ty.path "core::ptr::metadata::DynMetadata") [ Dyn ], - [], - "cmp", - [] - |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.apply (Ty.path "core::ptr::metadata::DynMetadata") [ Dyn ], + [], + "cmp", + [] + |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -652,7 +672,7 @@ Module ptr. crate::ptr::hash::(self.vtable_ptr, hasher) } *) - Definition hash (Dyn : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (Dyn : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Dyn in match τ, α with | [ H ], [ self; hasher ] => diff --git a/CoqOfRust/core/ptr/mod.v b/CoqOfRust/core/ptr/mod.v index 587f91b39..21f57339a 100644 --- a/CoqOfRust/core/ptr/mod.v +++ b/CoqOfRust/core/ptr/mod.v @@ -11,7 +11,7 @@ Module ptr. unsafe { drop_in_place(to_drop) } } *) - Definition drop_in_place (τ : list Ty.t) (α : list Value.t) : M := + Definition drop_in_place (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ to_drop ] => ltac:(M.monadic @@ -28,7 +28,7 @@ Module ptr. from_raw_parts(invalid(0), ()) } *) - Definition null (τ : list Ty.t) (α : list Value.t) : M := + Definition null (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -37,9 +37,9 @@ Module ptr. [ M.call_closure (| M.get_function (| "core::ptr::invalid", [ Ty.tuple [] ] |), - [ Value.Integer Integer.Usize 0 ] + [ M.of_value (| Value.Integer 0 |) ] |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |))) | _, _ => M.impossible @@ -50,7 +50,7 @@ Module ptr. from_raw_parts_mut(invalid_mut(0), ()) } *) - Definition null_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition null_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [] => ltac:(M.monadic @@ -59,9 +59,9 @@ Module ptr. [ M.call_closure (| M.get_function (| "core::ptr::invalid_mut", [ Ty.tuple [] ] |), - [ Value.Integer Integer.Usize 0 ] + [ M.of_value (| Value.Integer 0 |) ] |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |))) | _, _ => M.impossible @@ -77,7 +77,7 @@ Module ptr. unsafe { mem::transmute(addr) } } *) - Definition invalid (τ : list Ty.t) (α : list Value.t) : M := + Definition invalid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ addr ] => ltac:(M.monadic @@ -102,7 +102,7 @@ Module ptr. unsafe { mem::transmute(addr) } } *) - Definition invalid_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition invalid_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ addr ] => ltac:(M.monadic @@ -126,12 +126,12 @@ Module ptr. addr as *const T } *) - Definition from_exposed_addr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_exposed_addr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ addr ] => ltac:(M.monadic (let addr := M.alloc (| addr |) in - M.rust_cast (M.read (| addr |)))) + M.rust_cast (| M.read (| addr |) |))) | _, _ => M.impossible end. @@ -144,12 +144,12 @@ Module ptr. addr as *mut T } *) - Definition from_exposed_addr_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_exposed_addr_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ addr ] => ltac:(M.monadic (let addr := M.alloc (| addr |) in - M.rust_cast (M.read (| addr |)))) + M.rust_cast (| M.read (| addr |) |))) | _, _ => M.impossible end. @@ -158,7 +158,7 @@ Module ptr. r } *) - Definition from_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ r ] => ltac:(M.monadic @@ -172,7 +172,7 @@ Module ptr. r } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ r ] => ltac:(M.monadic @@ -186,7 +186,7 @@ Module ptr. from_raw_parts(data.cast(), len) } *) - Definition slice_from_raw_parts (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_from_raw_parts (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ data; len ] => ltac:(M.monadic @@ -217,7 +217,7 @@ Module ptr. from_raw_parts_mut(data.cast(), len) } *) - Definition slice_from_raw_parts_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_from_raw_parts_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ data; len ] => ltac:(M.monadic @@ -261,7 +261,7 @@ Module ptr. } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x; y ] => ltac:(M.monadic @@ -284,7 +284,7 @@ Module ptr. M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| x |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| x |) |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], @@ -293,7 +293,7 @@ Module ptr. |), [ tmp ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -302,9 +302,9 @@ Module ptr. M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| y |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| y |) |); M.read (| x |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -322,11 +322,11 @@ Module ptr. [ tmp ] |); M.read (| y |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -380,7 +380,7 @@ Module ptr. unsafe { swap_nonoverlapping_simple_untyped(x, y, count) } } *) - Definition swap_nonoverlapping (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_nonoverlapping (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x; y; count ] => ltac:(M.monadic @@ -393,11 +393,11 @@ Module ptr. let _ := let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -430,8 +430,14 @@ Module ptr. ] |), [ - Value.Tuple - [ M.read (| x |); M.read (| y |); M.read (| count |) ]; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| x |)); + A.to_value (M.read (| y |)); + A.to_value (M.read (| count |)) + ] + |); M.get_function (| "core::ptr::swap_nonoverlapping.comptime", [] @@ -440,14 +446,14 @@ Module ptr. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -455,19 +461,20 @@ Module ptr. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_function (| "core::mem::align_of", [ T ] |), [] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] - |)), + |) + |), ltac:(M.monadic (LogicalOp.or (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "is_power_of_two", @@ -479,14 +486,16 @@ Module ptr. [] |) ] - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.call_closure (| + (BinOp.Pure.gt (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |)) - (BinOp.Panic.mul (| + |), + BinOp.Panic.mul (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", @@ -494,8 +503,9 @@ Module ptr. |), [] |), - Value.Integer Integer.Usize 2 - |)))) + M.of_value (| Value.Integer 2 |) + |) + |))) |))) |) |)) in @@ -503,7 +513,7 @@ Module ptr. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -511,21 +521,23 @@ Module ptr. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_function (| "core::mem::align_of", [ T ] |), [] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_function (| "core::mem::align_of", [ Ty.path "usize" ] |), [] - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.rem (| + (BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] @@ -537,8 +549,9 @@ Module ptr. |), [] |) - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -574,8 +587,10 @@ Module ptr. let count := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, M.read (| count |), BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] @@ -602,12 +617,13 @@ Module ptr. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -615,21 +631,23 @@ Module ptr. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_function (| "core::mem::align_of", [ T ] |), [] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_function (| "core::mem::align_of", [ Ty.path "u8" ] |), [] - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.rem (| + (BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] @@ -641,8 +659,9 @@ Module ptr. |), [] |) - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -678,8 +697,10 @@ Module ptr. let count := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, M.read (| count |), BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] @@ -706,11 +727,12 @@ Module ptr. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -741,7 +763,7 @@ Module ptr. } } *) - Definition swap_nonoverlapping_simple_untyped (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_nonoverlapping_simple_untyped (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ x; y; count ] => ltac:(M.monadic @@ -771,16 +793,17 @@ Module ptr. [ M.read (| y |) ] |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.lt (M.read (| i |)) (M.read (| count |)) |)) in + 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 := M.alloc (| @@ -822,16 +845,20 @@ Module ptr. let β := i in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -858,7 +885,7 @@ Module ptr. src } *) - Definition replace (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; src ] => ltac:(M.monadic @@ -868,11 +895,11 @@ Module ptr. let _ := let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -887,14 +914,14 @@ Module ptr. ] |), [ - Value.Tuple [ M.read (| dst |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| dst |)) ] |); M.get_function (| "core::ptr::replace.comptime", [] |); M.get_function (| "core::ptr::replace.runtime", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -904,7 +931,7 @@ Module ptr. [ M.read (| dst |); src ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in src |))) | _, _ => M.impossible @@ -948,7 +975,7 @@ Module ptr. } } *) - Definition read (τ : list Ty.t) (α : list Value.t) : M := + Definition read (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src ] => ltac:(M.monadic @@ -956,11 +983,11 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -975,14 +1002,14 @@ Module ptr. ] |), [ - Value.Tuple [ M.read (| src |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| src |)) ] |); M.get_function (| "core::ptr::read.comptime", [] |); M.get_function (| "core::ptr::read.runtime", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1010,7 +1037,7 @@ Module ptr. } } *) - Definition read_unaligned (τ : list Ty.t) (α : list Value.t) : M := + Definition read_unaligned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src ] => ltac:(M.monadic @@ -1032,16 +1059,17 @@ Module ptr. M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ Ty.path "u8" ] |), [ - M.rust_cast (M.read (| src |)); - M.rust_cast - (M.call_closure (| + M.rust_cast (| M.read (| src |) |); + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ], "as_mut_ptr", [] |), [ tmp ] - |)); + |) + |); M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |) ] |) @@ -1082,7 +1110,7 @@ Module ptr. } } *) - Definition write (τ : list Ty.t) (α : list Value.t) : M := + Definition write (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; src ] => ltac:(M.monadic @@ -1091,11 +1119,11 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -1110,14 +1138,14 @@ Module ptr. ] |), [ - Value.Tuple [ M.read (| dst |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| dst |)) ] |); M.get_function (| "core::ptr::write.comptime", [] |); M.get_function (| "core::ptr::write.runtime", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1142,7 +1170,7 @@ Module ptr. } } *) - Definition write_unaligned (τ : list Ty.t) (α : list Value.t) : M := + Definition write_unaligned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; src ] => ltac:(M.monadic @@ -1154,8 +1182,8 @@ Module ptr. M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ Ty.path "u8" ] |), [ - M.rust_cast (M.read (| M.use (M.alloc (| src |)) |)); - M.rust_cast (M.read (| dst |)); + M.rust_cast (| M.read (| M.use (M.alloc (| src |)) |) |); + M.rust_cast (| M.read (| dst |) |); M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |) ] |) @@ -1167,7 +1195,7 @@ Module ptr. [ M.read (| src |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1184,7 +1212,7 @@ Module ptr. } } *) - Definition read_volatile (τ : list Ty.t) (α : list Value.t) : M := + Definition read_volatile (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ src ] => ltac:(M.monadic @@ -1192,11 +1220,11 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -1211,14 +1239,14 @@ Module ptr. ] |), [ - Value.Tuple [ M.read (| src |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| src |)) ] |); M.get_function (| "core::ptr::read_volatile.comptime", [] |); M.get_function (| "core::ptr::read_volatile.runtime", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1243,7 +1271,7 @@ Module ptr. } } *) - Definition write_volatile (τ : list Ty.t) (α : list Value.t) : M := + Definition write_volatile (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; src ] => ltac:(M.monadic @@ -1252,11 +1280,11 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -1271,14 +1299,14 @@ Module ptr. ] |), [ - Value.Tuple [ M.read (| dst |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| dst |)) ] |); M.get_function (| "core::ptr::write_volatile.comptime", [] |); M.get_function (| "core::ptr::write_volatile.runtime", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1288,7 +1316,7 @@ Module ptr. [ M.read (| dst |); M.read (| src |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1470,7 +1498,7 @@ Module ptr. usize::MAX } *) - Definition align_offset (τ : list Ty.t) (α : list Value.t) : M := + Definition align_offset (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ p; a ] => ltac:(M.monadic @@ -1497,19 +1525,22 @@ Module ptr. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "usize" ] |), - [ M.read (| a |); Value.Integer Integer.Usize 1 ] + [ M.read (| a |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| stride |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| stride |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1518,28 +1549,32 @@ Module ptr. M.read (| let p_mod_a := M.alloc (| - BinOp.Pure.bit_and (M.read (| addr |)) (M.read (| a_minus_one |)) + BinOp.Pure.bit_and (| + M.read (| addr |), + M.read (| a_minus_one |) + |) |) in M.return_ (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| p_mod_a |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| p_mod_a |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) ] @@ -1549,7 +1584,7 @@ Module ptr. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let a_mod_stride := @@ -1561,16 +1596,17 @@ Module ptr. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| a_mod_stride |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| a_mod_stride |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1579,21 +1615,22 @@ Module ptr. M.read (| let aligned_address := M.alloc (| - BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_function (| "core::intrinsics::wrapping_add", [ Ty.path "usize" ] |), [ M.read (| addr |); M.read (| a_minus_one |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_function (| "core::intrinsics::wrapping_sub", [ Ty.path "usize" ] |), - [ Value.Integer Integer.Usize 0; M.read (| a |) ] - |)) + [ M.of_value (| Value.Integer 0 |); M.read (| a |) ] + |) + |) |) in let byte_offset := M.alloc (| @@ -1609,7 +1646,7 @@ Module ptr. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), - [ BinOp.Pure.lt (M.read (| byte_offset |)) (M.read (| a |)) ] + [ BinOp.Pure.lt (| M.read (| byte_offset |), M.read (| a |) |) ] |) |) in let addr_mod_stride := @@ -1625,16 +1662,17 @@ Module ptr. M.return_ (| M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| addr_mod_stride |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| addr_mod_stride |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1659,7 +1697,7 @@ Module ptr. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let gcdpow := @@ -1679,12 +1717,13 @@ Module ptr. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.lt (M.read (| x |)) (M.read (| y |)) |)) in + M.use + (M.alloc (| BinOp.Pure.lt (| M.read (| x |), M.read (| y |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in x)); @@ -1696,29 +1735,31 @@ Module ptr. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_shl", [ Ty.path "usize" ] |), - [ Value.Integer Integer.Usize 1; M.read (| gcdpow |) ] + [ M.of_value (| Value.Integer 1 |); M.read (| gcdpow |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| addr |)) - (M.call_closure (| + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| addr |), + M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "usize" ] |), - [ M.read (| gcd |); Value.Integer Integer.Usize 1 ] - |))) - (Value.Integer Integer.Usize 0) + [ M.read (| gcd |); M.of_value (| Value.Integer 1 |) ] + |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1742,7 +1783,7 @@ Module ptr. "core::intrinsics::unchecked_sub", [ Ty.path "usize" ] |), - [ M.read (| a2 |); Value.Integer Integer.Usize 1 ] + [ M.read (| a2 |); M.of_value (| Value.Integer 1 |) ] |) |) in let s2 := @@ -1753,9 +1794,10 @@ Module ptr. [ Ty.path "usize" ] |), [ - BinOp.Pure.bit_and - (M.read (| stride |)) - (M.read (| a_minus_one |)); + BinOp.Pure.bit_and (| + M.read (| stride |), + M.read (| a_minus_one |) + |); M.read (| gcdpow |) ] |) @@ -1775,9 +1817,10 @@ Module ptr. [ Ty.path "usize" ] |), [ - BinOp.Pure.bit_and - (M.read (| addr |)) - (M.read (| a_minus_one |)); + BinOp.Pure.bit_and (| + M.read (| addr |), + M.read (| a_minus_one |) + |); M.read (| gcdpow |) ] |) @@ -1785,8 +1828,8 @@ Module ptr. |) |) in M.return_ (| - BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_function (| "core::intrinsics::wrapping_mul", [ Ty.path "usize" ] @@ -1798,13 +1841,14 @@ Module ptr. [ M.read (| s2 |); M.read (| a2 |) ] |) ] - |)) - (M.read (| a2minus1 |)) + |), + M.read (| a2minus1 |) + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.get_constant (| "core::num::MAX" |) @@ -1857,7 +1901,7 @@ Module ptr. inverse & m_minus_one } *) - Definition mod_inv (τ : list Ty.t) (α : list Value.t) : M := + Definition mod_inv (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; m ] => ltac:(M.monadic @@ -1868,32 +1912,35 @@ Module ptr. M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "usize" ] |), - [ M.read (| m |); Value.Integer Integer.Usize 1 ] + [ M.read (| m |); M.of_value (| Value.Integer 1 |) ] |) |) in let inverse := M.alloc (| - M.rust_cast - (M.read (| + 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 - (M.read (| x |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| x |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "core::ptr::align_offset::mod_inv::INV_TABLE_MOD" |) |), - Value.Integer Integer.Usize 1 - |)), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) + |) + |), + M.of_value (| Value.Integer 1 |) |) |) |) - |)) + |) + |) |) in let mod_gate := M.copy (| M.get_constant (| "core::ptr::align_offset::mod_inv::INV_TABLE_MOD" |) |) in @@ -1902,19 +1949,19 @@ Module ptr. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| mod_gate |)) (M.read (| m |)) + BinOp.Pure.ge (| M.read (| mod_gate |), M.read (| m |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1930,7 +1977,7 @@ Module ptr. [ Ty.path "usize" ] |), [ - Value.Integer Integer.Usize 2; + M.of_value (| Value.Integer 2 |); M.call_closure (| M.get_function (| "core::intrinsics::wrapping_mul", @@ -1962,7 +2009,7 @@ Module ptr. let overflow := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1973,39 +2020,42 @@ Module ptr. Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.write (| mod_gate, M.read (| new_gate |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) in - M.alloc (| BinOp.Pure.bit_and (M.read (| inverse |)) (M.read (| m_minus_one |)) |) + M.alloc (| BinOp.Pure.bit_and (| M.read (| inverse |), M.read (| m_minus_one |) |) |) |))) | _, _ => M.impossible end. Module mod_inv. - Definition value_INV_TABLE_MOD_16 : Value.t := + Definition value_INV_TABLE_MOD_16 : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 15 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 15 |)) + ] + |) |))). - Definition value_INV_TABLE_MOD : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 16 |))). + Definition value_INV_TABLE_MOD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 16 |) |))). End mod_inv. End align_offset. @@ -2014,13 +2064,13 @@ Module ptr. a == b } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - BinOp.Pure.eq (M.read (| a |)) (M.read (| b |)))) + BinOp.Pure.eq (| M.read (| a |), M.read (| b |) |))) | _, _ => M.impossible end. @@ -2029,13 +2079,13 @@ Module ptr. (p as *const ()) == (q as *const ()) } *) - Definition addr_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition addr_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; U ], [ p; q ] => ltac:(M.monadic (let p := M.alloc (| p |) in let q := M.alloc (| q |) in - BinOp.Pure.eq (M.rust_cast (M.read (| p |))) (M.rust_cast (M.read (| q |))))) + BinOp.Pure.eq (| M.rust_cast (| M.read (| p |) |), M.rust_cast (| M.read (| q |) |) |))) | _, _ => M.impossible end. @@ -2045,7 +2095,7 @@ Module ptr. hashee.hash(into); } *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; _ as S ], [ hashee; into ] => ltac:(M.monadic @@ -2065,7 +2115,7 @@ Module ptr. [ hashee; M.read (| into |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2078,22 +2128,23 @@ Module ptr. self.addr() == other.addr() } *) - Definition eq (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_trait_method (| "core::marker::FnPtr", F, [], "addr", [] |), [ M.read (| M.read (| self |) |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_trait_method (| "core::marker::FnPtr", F, [], "addr", [] |), [ M.read (| M.read (| other |) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -2122,7 +2173,7 @@ Module ptr. self.addr().partial_cmp(&other.addr()) } *) - Definition partial_cmp (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; other ] => @@ -2172,7 +2223,7 @@ Module ptr. self.addr().cmp(&other.addr()) } *) - Definition cmp (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; other ] => @@ -2222,7 +2273,7 @@ Module ptr. state.write_usize(self.addr() as _) } *) - Definition hash (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [ HH ], [ self; state ] => @@ -2233,11 +2284,12 @@ Module ptr. M.get_trait_method (| "core::hash::Hasher", HH, [], "write_usize", [] |), [ M.read (| state |); - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::marker::FnPtr", F, [], "addr", [] |), [ M.read (| M.read (| self |) |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -2260,7 +2312,7 @@ Module ptr. fmt::pointer_fmt_inner(self.addr() as _, f) } *) - Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; f ] => @@ -2270,11 +2322,12 @@ Module ptr. M.call_closure (| M.get_function (| "core::fmt::pointer_fmt_inner", [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::marker::FnPtr", F, [], "addr", [] |), [ M.read (| M.read (| self |) |) ] - |)); + |) + |); M.read (| f |) ] |))) @@ -2298,7 +2351,7 @@ Module ptr. fmt::pointer_fmt_inner(self.addr() as _, f) } *) - Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; f ] => @@ -2308,11 +2361,12 @@ Module ptr. M.call_closure (| M.get_function (| "core::fmt::pointer_fmt_inner", [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::marker::FnPtr", F, [], "addr", [] |), [ M.read (| M.read (| self |) |) ] - |)); + |) + |); M.read (| f |) ] |))) diff --git a/CoqOfRust/core/ptr/mut_ptr.v b/CoqOfRust/core/ptr/mut_ptr.v index 14b53a12a..099d06133 100644 --- a/CoqOfRust/core/ptr/mut_ptr.v +++ b/CoqOfRust/core/ptr/mut_ptr.v @@ -27,7 +27,7 @@ Module ptr. unsafe { const_eval_select((self as *mut u8,), const_impl, runtime_impl) } } *) - Definition is_null (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_null (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -44,7 +44,7 @@ Module ptr. ] |), [ - Value.Tuple [ M.rust_cast (M.read (| self |)) ]; + M.of_value (| Value.Tuple [ A.to_value (M.rust_cast (| M.read (| self |) |)) ] |); M.get_associated_function (| Self, "const_impl.is_null", [] |); M.get_associated_function (| Self, "runtime_impl.is_null", [] |) ] @@ -61,13 +61,13 @@ Module ptr. self as _ } *) - Definition cast (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cast (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| self |)))) + M.rust_cast (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -83,7 +83,7 @@ Module ptr. from_raw_parts_mut::(self as *mut (), metadata(meta)) } *) - Definition with_metadata_of (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_metadata_of (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self; meta ] => @@ -93,7 +93,7 @@ Module ptr. M.call_closure (| M.get_function (| "core::ptr::metadata::from_raw_parts_mut", [ U ] |), [ - M.rust_cast (M.read (| self |)); + M.rust_cast (| M.read (| self |) |); M.call_closure (| M.get_function (| "core::ptr::metadata::metadata", [ U ] |), [ M.read (| meta |) ] @@ -112,13 +112,13 @@ Module ptr. self as _ } *) - Definition cast_const (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cast_const (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (* MutToConstPointer *) (M.pointer_coercion (M.read (| self |))))) + M.rust_cast (| (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -134,13 +134,13 @@ Module ptr. self as usize } *) - Definition to_bits (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_bits (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| self |)))) + M.rust_cast (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -156,13 +156,13 @@ Module ptr. bits as Self } *) - Definition from_bits (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_bits (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ bits ] => ltac:(M.monadic (let bits := M.alloc (| bits |) in - M.rust_cast (M.read (| bits |)))) + M.rust_cast (| M.read (| bits |) |))) | _, _ => M.impossible end. @@ -178,7 +178,7 @@ Module ptr. unsafe { mem::transmute(self.cast::<()>()) } } *) - Definition addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -213,21 +213,22 @@ Module ptr. self.cast::<()>() as usize } *) - Definition expose_addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition expose_addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "cast", [ Ty.tuple [] ] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -250,7 +251,7 @@ Module ptr. self.wrapping_byte_offset(offset) } *) - Definition with_addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; addr ] => @@ -260,13 +261,14 @@ Module ptr. M.read (| let self_addr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "addr", [] |), [ M.read (| self |) ] - |)) + |) + |) |) in - let dest_addr := M.alloc (| M.rust_cast (M.read (| addr |)) |) in + let dest_addr := M.alloc (| M.rust_cast (| M.read (| addr |) |) |) in let offset := M.alloc (| M.call_closure (| @@ -297,7 +299,7 @@ Module ptr. self.with_addr(f(self.addr())) } *) - Definition map_addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ impl_FnOnce_usize__arrow_usize ], [ self; f ] => @@ -318,17 +320,20 @@ Module ptr. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "addr", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "addr", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) ] |) ] @@ -345,27 +350,31 @@ Module ptr. (self.cast(), super::metadata(self)) } *) - Definition to_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "cast", - [ Ty.tuple [] ] - |), - [ M.read (| self |) ] - |); - M.call_closure (| - M.get_function (| "core::ptr::metadata::metadata", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) ] - |) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "cast", + [ Ty.tuple [] ] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| "core::ptr::metadata::metadata", [ T ] |), + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -380,7 +389,7 @@ Module ptr. if self.is_null() { None } else { unsafe { Some(&*self) } } } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -388,7 +397,7 @@ Module ptr. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -405,11 +414,17 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -431,7 +446,7 @@ Module ptr. if self.is_null() { None } else { Some(unsafe { &*(self as *const MaybeUninit) }) } } *) - Definition as_uninit_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -439,7 +454,7 @@ Module ptr. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -456,13 +471,17 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.rust_cast (M.read (| self |)) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.rust_cast (| M.read (| self |) |)) ] + |) |))) ] |) @@ -485,7 +504,7 @@ Module ptr. unsafe { intrinsics::offset(self, count) } } *) - Definition offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -512,7 +531,7 @@ Module ptr. unsafe { self.cast::().offset(count).with_metadata_of(self) } } *) - Definition byte_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -544,7 +563,7 @@ Module ptr. M.read (| count |) ] |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible @@ -563,19 +582,22 @@ Module ptr. unsafe { intrinsics::arith_offset(self, count) as *mut T } } *) - Definition wrapping_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => ltac:(M.monadic (let self := M.alloc (| self |) in let count := M.alloc (| count |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::arith_offset", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)); M.read (| count |) + [ + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |); + M.read (| count |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -588,7 +610,7 @@ Module ptr. self.cast::().wrapping_offset(count).with_metadata_of(self) } *) - Definition wrapping_byte_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_byte_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -620,7 +642,7 @@ Module ptr. M.read (| count |) ] |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible @@ -635,7 +657,7 @@ Module ptr. intrinsics::ptr_mask(self.cast::<()>(), mask).cast_mut().with_metadata_of(self) } *) - Definition mask (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition mask (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; mask ] => @@ -660,21 +682,22 @@ Module ptr. M.get_function (| "core::intrinsics::ptr_mask", [ Ty.tuple [] ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "cast", [ Ty.tuple [] ] |), [ M.read (| self |) ] - |)); + |) + |); M.read (| mask |) ] |) ] |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible @@ -691,7 +714,7 @@ Module ptr. if self.is_null() { None } else { unsafe { Some(&mut *self) } } } *) - Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -699,7 +722,7 @@ Module ptr. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -716,11 +739,17 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| self |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) |))) ] |) @@ -742,7 +771,7 @@ Module ptr. if self.is_null() { None } else { Some(unsafe { &mut *(self as *mut MaybeUninit) }) } } *) - Definition as_uninit_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -750,7 +779,7 @@ Module ptr. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -767,13 +796,17 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.rust_cast (M.read (| self |)) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.rust_cast (| M.read (| self |) |)) ] + |) |))) ] |) @@ -793,7 +826,7 @@ Module ptr. (self as *const T).guaranteed_eq(other as _) } *) - Definition guaranteed_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition guaranteed_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -807,8 +840,12 @@ Module ptr. [] |), [ - M.rust_cast (* MutToConstPointer *) (M.pointer_coercion (M.read (| self |))); - M.rust_cast (* MutToConstPointer *) (M.pointer_coercion (M.read (| other |))) + M.rust_cast (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) + |); + M.rust_cast (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| other |) |) + |) ] |))) | _, _ => M.impossible @@ -826,7 +863,7 @@ Module ptr. (self as *const T).guaranteed_ne(other as _) } *) - Definition guaranteed_ne (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition guaranteed_ne (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -840,8 +877,12 @@ Module ptr. [] |), [ - M.rust_cast (* MutToConstPointer *) (M.pointer_coercion (M.read (| self |))); - M.rust_cast (* MutToConstPointer *) (M.pointer_coercion (M.read (| other |))) + M.rust_cast (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) + |); + M.rust_cast (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| other |) |) + |) ] |))) | _, _ => M.impossible @@ -860,7 +901,7 @@ Module ptr. unsafe { (self as *const T).offset_from(origin) } } *) - Definition offset_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition offset_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; origin ] => @@ -870,7 +911,9 @@ Module ptr. M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "offset_from", [] |), [ - M.rust_cast (* MutToConstPointer *) (M.pointer_coercion (M.read (| self |))); + M.rust_cast (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) + |); M.read (| origin |) ] |))) @@ -887,7 +930,7 @@ Module ptr. unsafe { self.cast::().offset_from(origin.cast::()) } } *) - Definition byte_offset_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_offset_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self; origin ] => @@ -935,7 +978,7 @@ Module ptr. unsafe { (self as *const T).sub_ptr(origin) } } *) - Definition sub_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; origin ] => @@ -945,7 +988,9 @@ Module ptr. M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "sub_ptr", [] |), [ - M.rust_cast (* MutToConstPointer *) (M.pointer_coercion (M.read (| self |))); + M.rust_cast (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) + |); M.read (| origin |) ] |))) @@ -965,7 +1010,7 @@ Module ptr. unsafe { intrinsics::offset(self, count) } } *) - Definition add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -992,7 +1037,7 @@ Module ptr. unsafe { self.cast::().add(count).with_metadata_of(self) } } *) - Definition byte_add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1024,7 +1069,7 @@ Module ptr. M.read (| count |) ] |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible @@ -1050,7 +1095,7 @@ Module ptr. } } *) - Definition sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1059,7 +1104,7 @@ Module ptr. let count := M.alloc (| count |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1083,7 +1128,10 @@ Module ptr. "core::intrinsics::unchecked_sub", [ Ty.path "isize" ] |), - [ Value.Integer Integer.Isize 0; M.rust_cast (M.read (| count |)) ] + [ + M.of_value (| Value.Integer 0 |); + M.rust_cast (| M.read (| count |) |) + ] |) ] |) @@ -1104,7 +1152,7 @@ Module ptr. unsafe { self.cast::().sub(count).with_metadata_of(self) } } *) - Definition byte_sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1136,7 +1184,7 @@ Module ptr. M.read (| count |) ] |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible @@ -1154,7 +1202,7 @@ Module ptr. self.wrapping_offset(count as isize) } *) - Definition wrapping_add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1167,7 +1215,7 @@ Module ptr. "wrapping_offset", [] |), - [ M.read (| self |); M.rust_cast (M.read (| count |)) ] + [ M.read (| self |); M.rust_cast (| M.read (| count |) |) ] |))) | _, _ => M.impossible end. @@ -1181,7 +1229,7 @@ Module ptr. self.cast::().wrapping_add(count).with_metadata_of(self) } *) - Definition wrapping_byte_add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_byte_add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1213,7 +1261,7 @@ Module ptr. M.read (| count |) ] |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible @@ -1231,7 +1279,7 @@ Module ptr. self.wrapping_offset((count as isize).wrapping_neg()) } *) - Definition wrapping_sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1248,7 +1296,7 @@ Module ptr. M.read (| self |); M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_neg", [] |), - [ M.rust_cast (M.read (| count |)) ] + [ M.rust_cast (| M.read (| count |) |) ] |) ] |))) @@ -1264,7 +1312,7 @@ Module ptr. self.cast::().wrapping_sub(count).with_metadata_of(self) } *) - Definition wrapping_byte_sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition wrapping_byte_sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -1296,7 +1344,7 @@ Module ptr. M.read (| count |) ] |); - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible @@ -1315,7 +1363,7 @@ Module ptr. unsafe { read(self) } } *) - Definition read (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition read (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1323,7 +1371,7 @@ Module ptr. (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) ] + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -1341,7 +1389,7 @@ Module ptr. unsafe { read_volatile(self) } } *) - Definition read_volatile (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition read_volatile (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1349,7 +1397,7 @@ Module ptr. (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::ptr::read_volatile", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) ] + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -1367,7 +1415,7 @@ Module ptr. unsafe { read_unaligned(self) } } *) - Definition read_unaligned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition read_unaligned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1375,7 +1423,7 @@ Module ptr. (let self := M.alloc (| self |) in M.call_closure (| M.get_function (| "core::ptr::read_unaligned", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) ] + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -1393,7 +1441,7 @@ Module ptr. unsafe { copy(self, dest, count) } } *) - Definition copy_to (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_to (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; dest; count ] => @@ -1404,7 +1452,7 @@ Module ptr. M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |); M.read (| dest |); M.read (| count |) ] @@ -1425,7 +1473,7 @@ Module ptr. unsafe { copy_nonoverlapping(self, dest, count) } } *) - Definition copy_to_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_to_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; dest; count ] => @@ -1436,7 +1484,7 @@ Module ptr. M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |); M.read (| dest |); M.read (| count |) ] @@ -1457,7 +1505,7 @@ Module ptr. unsafe { copy(src, self, count) } } *) - Definition copy_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src; count ] => @@ -1485,7 +1533,7 @@ Module ptr. unsafe { copy_nonoverlapping(src, self, count) } } *) - Definition copy_from_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_from_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src; count ] => @@ -1510,7 +1558,7 @@ Module ptr. unsafe { drop_in_place(self) } } *) - Definition drop_in_place (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop_in_place (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1536,7 +1584,7 @@ Module ptr. unsafe { write(self, val) } } *) - Definition write (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val ] => @@ -1563,7 +1611,7 @@ Module ptr. unsafe { write_bytes(self, val, count) } } *) - Definition write_bytes (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_bytes (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val; count ] => @@ -1591,7 +1639,7 @@ Module ptr. unsafe { write_volatile(self, val) } } *) - Definition write_volatile (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_volatile (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val ] => @@ -1618,7 +1666,7 @@ Module ptr. unsafe { write_unaligned(self, val) } } *) - Definition write_unaligned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_unaligned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val ] => @@ -1645,7 +1693,7 @@ Module ptr. unsafe { replace(self, src) } } *) - Definition replace (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src ] => @@ -1672,7 +1720,7 @@ Module ptr. unsafe { swap(self, with) } } *) - Definition swap (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; with_ ] => @@ -1714,7 +1762,7 @@ Module ptr. ret } *) - Definition align_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition align_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; align ] => @@ -1724,22 +1772,23 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "is_power_of_two", [] |), [ M.read (| align |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1756,23 +1805,29 @@ Module ptr. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "align_offset: align is not a power-of-two" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "align_offset: align is not a power-of-two" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ret := @@ -1780,7 +1835,7 @@ Module ptr. M.call_closure (| M.get_function (| "core::ptr::align_offset", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |); M.read (| align |) ] |) @@ -1802,7 +1857,7 @@ Module ptr. self.is_aligned_to(mem::align_of::()) } *) - Definition is_aligned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_aligned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1846,7 +1901,7 @@ Module ptr. unsafe { const_eval_select((self.cast::<()>(), align), const_impl, runtime_impl) } } *) - Definition is_aligned_to (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_aligned_to (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; align ] => @@ -1856,22 +1911,23 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "is_power_of_two", [] |), [ M.read (| align |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1888,23 +1944,29 @@ Module ptr. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "is_aligned_to: align is not a power-of-two" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "is_aligned_to: align is not a power-of-two" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1923,18 +1985,21 @@ Module ptr. ] |), [ - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "cast", - [ Ty.tuple [] ] - |), - [ M.read (| self |) ] - |); - M.read (| align |) - ]; + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "cast", + [ Ty.tuple [] ] + |), + [ M.read (| self |) ] + |)); + A.to_value (M.read (| align |)) + ] + |); M.get_associated_function (| Self, "const_impl.is_aligned_to", [] |); M.get_associated_function (| Self, "runtime_impl.is_aligned_to", [] |) ] @@ -1958,7 +2023,7 @@ Module ptr. metadata(self) } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1969,7 +2034,7 @@ Module ptr. "core::ptr::metadata::metadata", [ Ty.apply (Ty.path "slice") [ T ] ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| self |)) ] + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| self |) |) ] |))) | _, _ => M.impossible end. @@ -1983,22 +2048,23 @@ Module ptr. self.len() == 0 } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -2014,7 +2080,7 @@ Module ptr. unsafe { self.split_at_mut_unchecked(mid) } } *) - Definition split_at_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; mid ] => @@ -2024,17 +2090,17 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| mid |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| mid |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -2043,7 +2109,9 @@ Module ptr. [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2051,11 +2119,17 @@ Module ptr. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: mid <= self.len()" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: mid <= self.len()" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2089,7 +2163,7 @@ Module ptr. ) } *) - Definition split_at_mut_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at_mut_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; mid ] => @@ -2127,18 +2201,24 @@ Module ptr. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), - [ M.read (| ptr |); M.read (| mid |) ] - |); - M.call_closure (| - M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), - [ M.read (| tail |); BinOp.Panic.sub (| M.read (| len |), M.read (| mid |) |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), + [ M.read (| ptr |); M.read (| mid |) ] + |)); + A.to_value + (M.call_closure (| + 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 |) |) + ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -2153,13 +2233,13 @@ Module ptr. self as *mut T } *) - Definition as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| self |)))) + M.rust_cast (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -2176,7 +2256,7 @@ Module ptr. unsafe { index.get_unchecked_mut(self) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ self; index ] => @@ -2210,7 +2290,7 @@ Module ptr. } } *) - Definition as_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2218,7 +2298,7 @@ Module ptr. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2235,31 +2315,42 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::slice::raw::from_raw_parts", - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - |), - [ - M.rust_cast (M.read (| self |)); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], - "len", - [] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts", + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] |), - [ M.read (| self |) ] - |) - ] - |) - ] + [ + M.rust_cast (| M.read (| self |) |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*mut") + [ Ty.apply (Ty.path "slice") [ T ] ], + "len", + [] + |), + [ M.read (| self |) ] + |) + ] + |)) + ] + |) |))) ] |) @@ -2281,7 +2372,7 @@ Module ptr. } } *) - Definition as_uninit_slice_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_slice_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2289,7 +2380,7 @@ Module ptr. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2306,31 +2397,42 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::slice::raw::from_raw_parts_mut", - [ Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ T ] ] - |), - [ - M.rust_cast (M.read (| self |)); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], - "len", - [] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts_mut", + [ + Ty.apply + (Ty.path "core::mem::maybe_uninit::MaybeUninit") + [ T ] + ] |), - [ M.read (| self |) ] - |) - ] - |) - ] + [ + M.rust_cast (| M.read (| self |) |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*mut") + [ Ty.apply (Ty.path "slice") [ T ] ], + "len", + [] + |), + [ M.read (| self |) ] + |) + ] + |)) + ] + |) |))) ] |) @@ -2351,14 +2453,14 @@ Module ptr. *self == *other } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.eq (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2397,7 +2499,7 @@ Module ptr. } } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2406,7 +2508,7 @@ Module ptr. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2425,11 +2527,13 @@ Module ptr. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2453,10 +2557,14 @@ Module ptr. M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + |))) ] |))) ] @@ -2482,27 +2590,30 @@ Module ptr. Some(self.cmp(other)) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::cmp::Ord", - Ty.apply (Ty.path "*mut") [ T ], - [], - "cmp", - [] - |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.apply (Ty.path "*mut") [ T ], + [], + "cmp", + [] + |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2511,14 +2622,14 @@ Module ptr. *self < *other } *) - Definition lt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.lt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.lt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2527,14 +2638,14 @@ Module ptr. *self <= *other } *) - Definition le (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.le (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.le (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2543,14 +2654,14 @@ Module ptr. *self > *other } *) - Definition gt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.gt (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.gt (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. @@ -2559,14 +2670,14 @@ Module ptr. *self >= *other } *) - Definition ge (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.ge (M.read (| M.read (| self |) |)) (M.read (| M.read (| other |) |)))) + BinOp.Pure.ge (| M.read (| M.read (| self |) |), M.read (| M.read (| other |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/ptr/non_null.v b/CoqOfRust/core/ptr/non_null.v index 8ef0935df..f92ce5776 100644 --- a/CoqOfRust/core/ptr/non_null.v +++ b/CoqOfRust/core/ptr/non_null.v @@ -48,7 +48,7 @@ Module ptr. } } *) - Definition dangling (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dangling (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -86,7 +86,7 @@ Module ptr. unsafe { &*self.cast().as_ptr() } } *) - Definition as_uninit_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -125,7 +125,7 @@ Module ptr. unsafe { &mut *self.cast().as_ptr() } } *) - Definition as_uninit_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -165,7 +165,7 @@ Module ptr. } } *) - Definition new_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -174,11 +174,11 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -194,23 +194,28 @@ Module ptr. ] |), [ - Value.Tuple [ M.read (| ptr |) ]; + M.of_value (| Value.Tuple [ A.to_value (M.read (| ptr |)) ] |); M.get_associated_function (| Self, "comptime.new_unchecked", [] |); M.get_associated_function (| Self, "runtime.new_unchecked", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::ptr::non_null::NonNull" - [ - ("pointer", - M.rust_cast (* MutToConstPointer *) (M.pointer_coercion (M.read (| ptr |)))) - ] + M.of_value (| + Value.StructRecord + "core::ptr::non_null::NonNull" + [ + ("pointer", + A.to_value + (M.rust_cast (| + (* MutToConstPointer *) M.pointer_coercion (| M.read (| ptr |) |) + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -230,7 +235,7 @@ Module ptr. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -238,41 +243,47 @@ Module ptr. (let ptr := M.alloc (| ptr |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "is_null", [] |), [ M.read (| ptr |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "new_unchecked", - [] - |), - [ M.read (| ptr |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "new_unchecked", + [] + |), + [ M.read (| ptr |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -294,7 +305,7 @@ Module ptr. } } *) - Definition from_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ data_address; metadata ] => @@ -336,38 +347,43 @@ Module ptr. (self.cast(), super::metadata(self.as_ptr())) } *) - Definition to_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition to_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "cast", - [ Ty.tuple [] ] - |), - [ M.read (| self |) ] - |); - M.call_closure (| - M.get_function (| "core::ptr::metadata::metadata", [ T ] |), - [ - (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ptr", - [] - |), - [ M.read (| self |) ] - |)) - ] - |) - ])) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "cast", + [ Ty.tuple [] ] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| "core::ptr::metadata::metadata", [ T ] |), + [ + (* MutToConstPointer *) + M.pointer_coercion (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_ptr", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -382,7 +398,7 @@ Module ptr. unsafe { NonZeroUsize::new_unchecked(self.pointer.addr()) } } *) - Definition addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -422,7 +438,7 @@ Module ptr. unsafe { NonNull::new_unchecked(self.pointer.with_addr(addr.get()) as *mut _) } } *) - Definition with_addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition with_addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; addr ] => @@ -436,8 +452,8 @@ Module ptr. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "with_addr", @@ -460,7 +476,8 @@ Module ptr. [ M.read (| addr |) ] |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -475,7 +492,7 @@ Module ptr. self.with_addr(f(self.addr())) } *) - Definition map_addr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_addr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ impl_FnOnce_NonZeroUsize__arrow_NonZeroUsize ], [ self; f ] => @@ -500,17 +517,20 @@ Module ptr. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "addr", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "addr", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) ] |) ] @@ -527,20 +547,21 @@ Module ptr. self.pointer as *mut T } *) - Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ptr::non_null::NonNull", "pointer" |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -556,7 +577,7 @@ Module ptr. unsafe { &*self.as_ptr().cast_const() } } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -589,7 +610,7 @@ Module ptr. unsafe { &mut *self.as_ptr() } } *) - Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -616,7 +637,7 @@ Module ptr. unsafe { NonNull::new_unchecked(self.as_ptr() as *mut U) } } *) - Definition cast (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cast (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self ] => @@ -629,15 +650,16 @@ Module ptr. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], "as_ptr", [] |), [ M.read (| self |) ] - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -659,34 +681,37 @@ Module ptr. unsafe { NonNull { pointer: intrinsics::offset(self.pointer, count) } } } *) - Definition offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => ltac:(M.monadic (let self := M.alloc (| self |) in let count := M.alloc (| count |) in - Value.StructRecord - "core::ptr::non_null::NonNull" - [ - ("pointer", - M.call_closure (| - M.get_function (| - "core::intrinsics::offset", - [ Ty.apply (Ty.path "*const") [ T ]; Ty.path "isize" ] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ptr::non_null::NonNull", - "pointer" - |) - |); - M.read (| count |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ptr::non_null::NonNull" + [ + ("pointer", + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::offset", + [ Ty.apply (Ty.path "*const") [ T ]; Ty.path "isize" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ptr::non_null::NonNull", + "pointer" + |) + |); + M.read (| count |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -704,35 +729,38 @@ Module ptr. unsafe { NonNull { pointer: self.pointer.byte_offset(count) } } } *) - Definition byte_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => ltac:(M.monadic (let self := M.alloc (| self |) in let count := M.alloc (| count |) in - Value.StructRecord - "core::ptr::non_null::NonNull" - [ - ("pointer", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "byte_offset", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ptr::non_null::NonNull", - "pointer" - |) - |); - M.read (| count |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ptr::non_null::NonNull" + [ + ("pointer", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "byte_offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ptr::non_null::NonNull", + "pointer" + |) + |); + M.read (| count |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -752,34 +780,37 @@ Module ptr. unsafe { NonNull { pointer: intrinsics::offset(self.pointer, count) } } } *) - Definition add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => ltac:(M.monadic (let self := M.alloc (| self |) in let count := M.alloc (| count |) in - Value.StructRecord - "core::ptr::non_null::NonNull" - [ - ("pointer", - M.call_closure (| - M.get_function (| - "core::intrinsics::offset", - [ Ty.apply (Ty.path "*const") [ T ]; Ty.path "usize" ] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ptr::non_null::NonNull", - "pointer" - |) - |); - M.read (| count |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ptr::non_null::NonNull" + [ + ("pointer", + A.to_value + (M.call_closure (| + M.get_function (| + "core::intrinsics::offset", + [ Ty.apply (Ty.path "*const") [ T ]; Ty.path "usize" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ptr::non_null::NonNull", + "pointer" + |) + |); + M.read (| count |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -797,35 +828,38 @@ Module ptr. unsafe { NonNull { pointer: self.pointer.byte_add(count) } } } *) - Definition byte_add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => ltac:(M.monadic (let self := M.alloc (| self |) in let count := M.alloc (| count |) in - Value.StructRecord - "core::ptr::non_null::NonNull" - [ - ("pointer", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "byte_add", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ptr::non_null::NonNull", - "pointer" - |) - |); - M.read (| count |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ptr::non_null::NonNull" + [ + ("pointer", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "byte_add", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ptr::non_null::NonNull", + "pointer" + |) + |); + M.read (| count |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -849,7 +883,7 @@ Module ptr. } } *) - Definition sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => @@ -858,7 +892,7 @@ Module ptr. let count := M.alloc (| count |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -882,7 +916,10 @@ Module ptr. "core::intrinsics::unchecked_sub", [ Ty.path "isize" ] |), - [ Value.Integer Integer.Isize 0; M.rust_cast (M.read (| count |)) ] + [ + M.of_value (| Value.Integer 0 |); + M.rust_cast (| M.read (| count |) |) + ] |) ] |) @@ -907,35 +944,38 @@ Module ptr. unsafe { NonNull { pointer: self.pointer.byte_sub(count) } } } *) - Definition byte_sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; count ] => ltac:(M.monadic (let self := M.alloc (| self |) in let count := M.alloc (| count |) in - Value.StructRecord - "core::ptr::non_null::NonNull" - [ - ("pointer", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "byte_sub", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ptr::non_null::NonNull", - "pointer" - |) - |); - M.read (| count |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::ptr::non_null::NonNull" + [ + ("pointer", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "byte_sub", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ptr::non_null::NonNull", + "pointer" + |) + |); + M.read (| count |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -952,7 +992,7 @@ Module ptr. unsafe { self.pointer.offset_from(origin.pointer) } } *) - Definition offset_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition offset_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; origin ] => @@ -991,7 +1031,7 @@ Module ptr. unsafe { self.pointer.byte_offset_from(origin.pointer) } } *) - Definition byte_offset_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition byte_offset_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self; origin ] => @@ -1037,7 +1077,7 @@ Module ptr. unsafe { self.pointer.sub_ptr(subtracted.pointer) } } *) - Definition sub_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; subtracted ] => @@ -1079,7 +1119,7 @@ Module ptr. unsafe { ptr::read(self.pointer) } } *) - Definition read (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition read (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1113,7 +1153,7 @@ Module ptr. unsafe { ptr::read_volatile(self.pointer) } } *) - Definition read_volatile (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition read_volatile (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1147,7 +1187,7 @@ Module ptr. unsafe { ptr::read_unaligned(self.pointer) } } *) - Definition read_unaligned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition read_unaligned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1181,7 +1221,7 @@ Module ptr. unsafe { ptr::copy(self.pointer, dest.as_ptr(), count) } } *) - Definition copy_to (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_to (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; dest; count ] => @@ -1226,7 +1266,7 @@ Module ptr. unsafe { ptr::copy_nonoverlapping(self.pointer, dest.as_ptr(), count) } } *) - Definition copy_to_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_to_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; dest; count ] => @@ -1271,7 +1311,7 @@ Module ptr. unsafe { ptr::copy(src.pointer, self.as_ptr(), count) } } *) - Definition copy_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src; count ] => @@ -1316,7 +1356,7 @@ Module ptr. unsafe { ptr::copy_nonoverlapping(src.pointer, self.as_ptr(), count) } } *) - Definition copy_from_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_from_nonoverlapping (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src; count ] => @@ -1358,7 +1398,7 @@ Module ptr. unsafe { ptr::drop_in_place(self.as_ptr()) } } *) - Definition drop_in_place (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop_in_place (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1393,7 +1433,7 @@ Module ptr. unsafe { ptr::write(self.as_ptr(), val) } } *) - Definition write (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val ] => @@ -1430,7 +1470,7 @@ Module ptr. unsafe { ptr::write_bytes(self.as_ptr(), val, count) } } *) - Definition write_bytes (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_bytes (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val; count ] => @@ -1469,7 +1509,7 @@ Module ptr. unsafe { ptr::write_volatile(self.as_ptr(), val) } } *) - Definition write_volatile (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_volatile (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val ] => @@ -1506,7 +1546,7 @@ Module ptr. unsafe { ptr::write_unaligned(self.as_ptr(), val) } } *) - Definition write_unaligned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition write_unaligned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val ] => @@ -1543,7 +1583,7 @@ Module ptr. unsafe { ptr::replace(self.as_ptr(), src) } } *) - Definition replace (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition replace (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src ] => @@ -1580,7 +1620,7 @@ Module ptr. unsafe { ptr::swap(self.as_ptr(), with.as_ptr()) } } *) - Definition swap (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; with_ ] => @@ -1630,7 +1670,7 @@ Module ptr. } } *) - Definition align_offset (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition align_offset (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; align ] => @@ -1640,22 +1680,23 @@ Module ptr. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "is_power_of_two", [] |), [ M.read (| align |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1672,23 +1713,29 @@ Module ptr. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "align_offset: align is not a power-of-two" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "align_offset: align is not a power-of-two" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1722,7 +1769,7 @@ Module ptr. self.pointer.is_aligned() } *) - Definition is_aligned (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_aligned (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1752,7 +1799,7 @@ Module ptr. self.pointer.is_aligned_to(align) } *) - Definition is_aligned_to (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_aligned_to (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; align ] => @@ -1795,7 +1842,7 @@ Module ptr. unsafe { Self::new_unchecked(super::slice_from_raw_parts_mut(data.as_ptr(), len)) } } *) - Definition slice_from_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_from_raw_parts (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ data; len ] => @@ -1839,7 +1886,7 @@ Module ptr. self.as_ptr().len() } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1877,7 +1924,7 @@ Module ptr. unsafe { NonNull::new_unchecked(self.as_ptr().as_mut_ptr()) } } *) - Definition as_non_null_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_non_null_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1923,7 +1970,7 @@ Module ptr. self.as_non_null_ptr().as_ptr() } *) - Definition as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1961,7 +2008,7 @@ Module ptr. unsafe { slice::from_raw_parts(self.cast().as_ptr(), self.len()) } } *) - Definition as_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1974,8 +2021,8 @@ Module ptr. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -1995,7 +2042,8 @@ Module ptr. [ M.read (| self |) ] |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -2021,7 +2069,7 @@ Module ptr. unsafe { slice::from_raw_parts_mut(self.cast().as_ptr(), self.len()) } } *) - Definition as_uninit_slice_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_uninit_slice_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2083,7 +2131,7 @@ Module ptr. unsafe { NonNull::new_unchecked(self.as_ptr().get_unchecked_mut(index)) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ self; index ] => @@ -2135,7 +2183,7 @@ Module ptr. *self } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2202,7 +2250,7 @@ Module ptr. fmt::Pointer::fmt(&self.as_ptr(), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -2251,7 +2299,7 @@ Module ptr. fmt::Pointer::fmt(&self.as_ptr(), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -2312,30 +2360,31 @@ Module ptr. self.as_ptr() == other.as_ptr() } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], "as_ptr", [] |), [ M.read (| M.read (| self |) |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], "as_ptr", [] |), [ M.read (| M.read (| other |) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -2356,7 +2405,7 @@ Module ptr. self.as_ptr().cmp(&other.as_ptr()) } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2414,7 +2463,7 @@ Module ptr. self.as_ptr().partial_cmp(&other.as_ptr()) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -2472,7 +2521,7 @@ Module ptr. self.as_ptr().hash(state) } *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ H ], [ self; state ] => @@ -2523,7 +2572,7 @@ Module ptr. unsafe { NonNull::new_unchecked(unique.as_ptr()) } } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ unique ] => @@ -2568,19 +2617,24 @@ Module ptr. unsafe { NonNull { pointer: reference as *mut T } } } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ reference ] => ltac:(M.monadic (let reference := M.alloc (| reference |) in - Value.StructRecord - "core::ptr::non_null::NonNull" - [ - ("pointer", - (* MutToConstPointer *) - M.pointer_coercion (M.read (| M.use (M.alloc (| M.read (| reference |) |)) |))) - ])) + M.of_value (| + Value.StructRecord + "core::ptr::non_null::NonNull" + [ + ("pointer", + A.to_value + (* MutToConstPointer *) + (M.pointer_coercion (| + M.read (| M.use (M.alloc (| M.read (| reference |) |)) |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -2603,15 +2657,20 @@ Module ptr. unsafe { NonNull { pointer: reference as *const T } } } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ reference ] => ltac:(M.monadic (let reference := M.alloc (| reference |) in - Value.StructRecord - "core::ptr::non_null::NonNull" - [ ("pointer", M.read (| M.use (M.alloc (| M.read (| reference |) |)) |)) ])) + M.of_value (| + Value.StructRecord + "core::ptr::non_null::NonNull" + [ + ("pointer", + A.to_value (M.read (| M.use (M.alloc (| M.read (| reference |) |)) |))) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/ptr/unique.v b/CoqOfRust/core/ptr/unique.v index d0a35dfdd..2ca858a5a 100644 --- a/CoqOfRust/core/ptr/unique.v +++ b/CoqOfRust/core/ptr/unique.v @@ -47,25 +47,29 @@ Module ptr. Unique { pointer: NonNull::dangling(), _marker: PhantomData } } *) - Definition dangling (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition dangling (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::ptr::unique::Unique" - [ - ("pointer", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "dangling", - [] - |), - [] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + (M.of_value (| + Value.StructRecord + "core::ptr::unique::Unique" + [ + ("pointer", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "dangling", + [] + |), + [] + |))); + ("_marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -78,26 +82,30 @@ Module ptr. unsafe { Unique { pointer: NonNull::new_unchecked(ptr), _marker: PhantomData } } } *) - Definition new_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => ltac:(M.monadic (let ptr := M.alloc (| ptr |) in - Value.StructRecord - "core::ptr::unique::Unique" - [ - ("pointer", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "new_unchecked", - [] - |), - [ M.read (| ptr |) ] - |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "core::ptr::unique::Unique" + [ + ("pointer", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "new_unchecked", + [] + |), + [ M.read (| ptr |) ] + |))); + ("_marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -114,7 +122,7 @@ Module ptr. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -122,7 +130,7 @@ Module ptr. (let ptr := M.alloc (| ptr |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -145,20 +153,31 @@ Module ptr. |) in let pointer := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "core::ptr::unique::Unique" - [ - ("pointer", M.read (| pointer |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::ptr::unique::Unique" + [ + ("pointer", A.to_value (M.read (| pointer |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -174,7 +193,7 @@ Module ptr. self.pointer.as_ptr() } *) - Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -210,7 +229,7 @@ Module ptr. unsafe { self.pointer.as_ref() } } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -244,7 +263,7 @@ Module ptr. unsafe { self.pointer.as_mut() } } *) - Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -278,7 +297,7 @@ Module ptr. unsafe { Unique::new_unchecked(self.pointer.cast().as_ptr()) } } *) - Definition cast (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cast (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self ] => @@ -335,7 +354,7 @@ Module ptr. *self } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -400,7 +419,7 @@ Module ptr. fmt::Pointer::fmt(&self.as_ptr(), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -449,7 +468,7 @@ Module ptr. fmt::Pointer::fmt(&self.as_ptr(), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -498,7 +517,7 @@ Module ptr. Self::from(NonNull::from(reference)) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ reference ] => @@ -545,18 +564,21 @@ Module ptr. Unique { pointer, _marker: PhantomData } } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ pointer ] => ltac:(M.monadic (let pointer := M.alloc (| pointer |) in - Value.StructRecord - "core::ptr::unique::Unique" - [ - ("pointer", M.read (| pointer |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "core::ptr::unique::Unique" + [ + ("pointer", A.to_value (M.read (| pointer |))); + ("_marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/result.v b/CoqOfRust/core/result.v index eef479a54..033b3f88f 100644 --- a/CoqOfRust/core/result.v +++ b/CoqOfRust/core/result.v @@ -50,7 +50,7 @@ Module result. Definition Self (T E : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::Result") [ T; E ]. (* PartialEq *) - Definition eq (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self; other ] => @@ -80,11 +80,16 @@ Module result. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -170,7 +175,7 @@ Module result. Definition Self (T E : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::Result") [ T; E ]. (* PartialOrd *) - Definition partial_cmp (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self; other ] => @@ -199,7 +204,11 @@ Module result. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -310,7 +319,7 @@ Module result. Definition Self (T E : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::Result") [ T; E ]. (* Eq *) - Definition assert_receiver_is_total_eq (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -318,13 +327,13 @@ Module result. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) @@ -346,7 +355,7 @@ Module result. Definition Self (T E : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::Result") [ T; E ]. (* Ord *) - Definition cmp (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self; other ] => @@ -385,7 +394,12 @@ Module result. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -474,7 +488,7 @@ Module result. Definition Self (T E : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::Result") [ T; E ]. (* Debug *) - Definition fmt (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self; f ] => @@ -500,8 +514,8 @@ Module result. |), [ M.read (| f |); - M.read (| Value.String "Ok" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Ok" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -520,8 +534,8 @@ Module result. |), [ M.read (| f |); - M.read (| Value.String "Err" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Err" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -544,7 +558,7 @@ Module result. Definition Self (T E : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::Result") [ T; E ]. (* Hash *) - Definition hash (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ __H ], [ self; state ] => @@ -619,7 +633,7 @@ Module result. matches!( *self, Ok(_)) } *) - Definition is_ok (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ok (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -633,8 +647,8 @@ Module result. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -653,7 +667,7 @@ Module result. } } *) - Definition is_ok_and (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ok_and (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ impl_FnOnce_T__arrow_bool ], [ self; f ] => @@ -668,7 +682,7 @@ Module result. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in - M.alloc (| Value.Bool false |))); + M.alloc (| M.of_value (| Value.Bool false |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -683,7 +697,10 @@ Module result. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| x |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) + ] |) |))) ] @@ -701,21 +718,22 @@ Module result. !self.is_ok() } *) - Definition is_err (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_err (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::result::Result") [ T; E ], "is_ok", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -731,7 +749,7 @@ Module result. } } *) - Definition is_err_and (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_err_and (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ impl_FnOnce_E__arrow_bool ], [ self; f ] => @@ -746,7 +764,7 @@ Module result. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Bool false |))); + M.alloc (| M.of_value (| Value.Bool false |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -761,7 +779,10 @@ Module result. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| e |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| e |)) ] |) + ] |) |))) ] @@ -782,7 +803,7 @@ Module result. } } *) - Definition ok (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ok (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -798,13 +819,19 @@ Module result. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -823,7 +850,7 @@ Module result. } } *) - Definition err (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition err (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -837,14 +864,20 @@ Module result. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |))) ] |) @@ -864,7 +897,7 @@ Module result. } } *) - Definition as_ref (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -879,13 +912,23 @@ Module result. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let x := M.alloc (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| x |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| x |)) ] + |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let x := M.alloc (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| x |) ] |))) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| x |)) ] + |) + |))) ] |) |))) @@ -904,7 +947,7 @@ Module result. } } *) - Definition as_mut (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -919,13 +962,23 @@ Module result. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let x := M.alloc (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| x |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| x |)) ] + |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let x := M.alloc (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| x |) ] |))) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| x |)) ] + |) + |))) ] |) |))) @@ -944,7 +997,7 @@ Module result. } } *) - Definition map (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ U; F ], [ self; op ] => @@ -961,27 +1014,39 @@ Module result. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let t := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ T ] ], - "call_once", - [] - |), - [ M.read (| op |); Value.Tuple [ M.read (| t |) ] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ T ] ], + "call_once", + [] + |), + [ + M.read (| op |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| t |)) ] |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] |))) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |) + |))) ] |) |))) @@ -1000,7 +1065,7 @@ Module result. } } *) - Definition map_or (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_or (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ U; F ], [ self; default; f ] => @@ -1026,7 +1091,10 @@ Module result. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| t |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| t |)) ] |) + ] |) |))); fun γ => @@ -1052,7 +1120,7 @@ Module result. } } *) - Definition map_or_else (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_or_else (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ U; D; F ], [ self; default; f ] => @@ -1078,7 +1146,10 @@ Module result. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| t |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| t |)) ] |) + ] |) |))); fun γ => @@ -1095,7 +1166,10 @@ Module result. "call_once", [] |), - [ M.read (| default |); Value.Tuple [ M.read (| e |) ] ] + [ + M.read (| default |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| e |)) ] |) + ] |) |))) ] @@ -1116,7 +1190,7 @@ Module result. } } *) - Definition map_err (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_err (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ F; _ as O ], [ self; op ] => @@ -1132,27 +1206,37 @@ Module result. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let t := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| t |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| t |)) ] + |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - O, - [ Ty.tuple [ E ] ], - "call_once", - [] - |), - [ M.read (| op |); Value.Tuple [ M.read (| e |) ] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + O, + [ Ty.tuple [ E ] ], + "call_once", + [] + |), + [ + M.read (| op |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| e |)) ] |) + ] + |)) + ] + |) |))) ] |) @@ -1173,7 +1257,7 @@ Module result. self } *) - Definition inspect (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inspect (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ F ], [ self; f ] => @@ -1183,7 +1267,7 @@ Module result. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1205,11 +1289,14 @@ Module result. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| t |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| t |)) ] |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in self @@ -1230,7 +1317,7 @@ Module result. self } *) - Definition inspect_err (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition inspect_err (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ F ], [ self; f ] => @@ -1240,7 +1327,7 @@ Module result. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1262,11 +1349,14 @@ Module result. "call_once", [] |), - [ M.read (| f |); Value.Tuple [ M.read (| e |) ] ] + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| e |)) ] |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in self @@ -1286,7 +1376,7 @@ Module result. self.as_ref().map(|t| t.deref()) } *) - Definition as_deref (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_deref (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -1314,8 +1404,8 @@ Module result. |), [ M.read (| self |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1338,7 +1428,8 @@ Module result. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1356,7 +1447,7 @@ Module result. self.as_mut().map(|t| t.deref_mut()) } *) - Definition as_deref_mut (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_deref_mut (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -1384,8 +1475,8 @@ Module result. |), [ M.read (| self |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1408,7 +1499,8 @@ Module result. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1423,36 +1515,39 @@ Module result. Iter { inner: self.as_ref().ok() } } *) - Definition iter (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::result::Iter" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::result::Result") - [ Ty.apply (Ty.path "&") [ T ]; Ty.apply (Ty.path "&") [ E ] ], - "ok", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "core::result::Iter" + [ + ("inner", + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.apply (Ty.path "core::result::Result") [ T; E ], - "as_ref", + Ty.apply + (Ty.path "core::result::Result") + [ Ty.apply (Ty.path "&") [ T ]; Ty.apply (Ty.path "&") [ E ] ], + "ok", [] |), - [ M.read (| self |) ] - |) - ] - |)) - ])) + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::result::Result") [ T; E ], + "as_ref", + [] + |), + [ M.read (| self |) ] + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1465,36 +1560,39 @@ Module result. IterMut { inner: self.as_mut().ok() } } *) - Definition iter_mut (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_mut (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::result::IterMut" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::result::Result") - [ Ty.apply (Ty.path "&mut") [ T ]; Ty.apply (Ty.path "&mut") [ E ] ], - "ok", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "core::result::IterMut" + [ + ("inner", + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.apply (Ty.path "core::result::Result") [ T; E ], - "as_mut", + Ty.apply + (Ty.path "core::result::Result") + [ Ty.apply (Ty.path "&mut") [ T ]; Ty.apply (Ty.path "&mut") [ E ] ], + "ok", [] |), - [ M.read (| self |) ] - |) - ] - |)) - ])) + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::result::Result") [ T; E ], + "as_mut", + [] + |), + [ M.read (| self |) ] + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1513,7 +1611,7 @@ Module result. } } *) - Definition expect (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition expect (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self; msg ] => @@ -1539,7 +1637,7 @@ Module result. M.never_to_any (| M.call_closure (| M.get_function (| "core::result::unwrap_failed", [] |), - [ M.read (| msg |); (* Unsize *) M.pointer_coercion e ] + [ M.read (| msg |); (* Unsize *) M.pointer_coercion (| e |) ] |) |) |))) @@ -1564,7 +1662,7 @@ Module result. } } *) - Definition unwrap (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -1590,8 +1688,12 @@ Module result. M.call_closure (| M.get_function (| "core::result::unwrap_failed", [] |), [ - M.read (| Value.String "called `Result::unwrap()` on an `Err` value" |); - (* Unsize *) M.pointer_coercion e + M.read (| + M.of_value (| + Value.String "called `Result::unwrap()` on an `Err` value" + |) + |); + (* Unsize *) M.pointer_coercion (| e |) ] |) |) @@ -1617,7 +1719,7 @@ Module result. } } *) - Definition unwrap_or_default (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or_default (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -1664,7 +1766,7 @@ Module result. } } *) - Definition expect_err (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition expect_err (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self; msg ] => @@ -1684,7 +1786,7 @@ Module result. M.never_to_any (| M.call_closure (| M.get_function (| "core::result::unwrap_failed", [] |), - [ M.read (| msg |); (* Unsize *) M.pointer_coercion t ] + [ M.read (| msg |); (* Unsize *) M.pointer_coercion (| t |) ] |) |) |))); @@ -1715,7 +1817,7 @@ Module result. } } *) - Definition unwrap_err (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_err (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -1736,9 +1838,11 @@ Module result. M.get_function (| "core::result::unwrap_failed", [] |), [ M.read (| - Value.String "called `Result::unwrap_err()` on an `Ok` value" + M.of_value (| + Value.String "called `Result::unwrap_err()` on an `Ok` value" + |) |); - (* Unsize *) M.pointer_coercion t + (* Unsize *) M.pointer_coercion (| t |) ] |) |) @@ -1770,7 +1874,7 @@ Module result. } } *) - Definition into_ok (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_ok (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -1826,7 +1930,7 @@ Module result. } } *) - Definition into_err (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_err (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -1879,7 +1983,7 @@ Module result. } } *) - Definition and (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition and (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ U ], [ self; res ] => @@ -1900,7 +2004,13 @@ Module result. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] |))) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |) + |))) ] |) |))) @@ -1919,7 +2029,7 @@ Module result. } } *) - Definition and_then (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition and_then (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ U; F ], [ self; op ] => @@ -1944,7 +2054,10 @@ Module result. "call_once", [] |), - [ M.read (| op |); Value.Tuple [ M.read (| t |) ] ] + [ + M.read (| op |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| t |)) ] |) + ] |) |))); fun γ => @@ -1952,7 +2065,13 @@ Module result. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] |))) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |) + |))) ] |) |))) @@ -1971,7 +2090,7 @@ Module result. } } *) - Definition or (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition or (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ F ], [ self; res ] => @@ -1987,7 +2106,11 @@ Module result. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let v := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| v |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| v |)) ] + |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -2011,7 +2134,7 @@ Module result. } } *) - Definition or_else (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition or_else (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ F; _ as O ], [ self; op ] => @@ -2027,7 +2150,11 @@ Module result. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let t := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| t |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| t |)) ] + |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -2042,7 +2169,10 @@ Module result. "call_once", [] |), - [ M.read (| op |); Value.Tuple [ M.read (| e |) ] ] + [ + M.read (| op |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| e |)) ] |) + ] |) |))) ] @@ -2063,7 +2193,7 @@ Module result. } } *) - Definition unwrap_or (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self; default ] => @@ -2103,7 +2233,7 @@ Module result. } } *) - Definition unwrap_or_else (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or_else (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ F ], [ self; op ] => @@ -2134,7 +2264,10 @@ Module result. "call_once", [] |), - [ M.read (| op |); Value.Tuple [ M.read (| e |) ] ] + [ + M.read (| op |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| e |)) ] |) + ] |) |))) ] @@ -2157,7 +2290,7 @@ Module result. } } *) - Definition unwrap_unchecked (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_unchecked (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2166,30 +2299,31 @@ Module result. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::result::Result") [ T; E ], "is_ok", [] |), [ self ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2200,15 +2334,22 @@ Module result. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: self.is_ok()" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: self.is_ok()" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -2252,7 +2393,7 @@ Module result. } } *) - Definition unwrap_err_unchecked (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_err_unchecked (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2261,30 +2402,31 @@ Module result. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::result::Result") [ T; E ], "is_err", [] |), [ self ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2295,16 +2437,22 @@ Module result. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: self.is_err()" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: self.is_err()" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -2351,7 +2499,7 @@ Module result. self.map(|&t| t) } *) - Definition copied (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copied (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2365,8 +2513,8 @@ Module result. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2381,7 +2529,8 @@ Module result. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2399,7 +2548,7 @@ Module result. self.map(|t| t.clone()) } *) - Definition cloned (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cloned (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2413,8 +2562,8 @@ Module result. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2431,7 +2580,8 @@ Module result. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2454,7 +2604,7 @@ Module result. self.map(|&mut t| t) } *) - Definition copied (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copied (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2468,8 +2618,8 @@ Module result. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2484,7 +2634,8 @@ Module result. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2502,7 +2653,7 @@ Module result. self.map(|t| t.clone()) } *) - Definition cloned (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cloned (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2516,8 +2667,8 @@ Module result. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2534,7 +2685,8 @@ Module result. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2560,7 +2712,7 @@ Module result. } } *) - Definition transpose (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition transpose (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2582,24 +2734,44 @@ Module result. |) in let x := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::result::Result::Ok" [ M.read (| x |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| x |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |)) + ] + |) |))) ] |) @@ -2623,7 +2795,7 @@ Module result. self.and_then(convert::identity) } *) - Definition flatten (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition flatten (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2663,7 +2835,7 @@ Module result. panic!("{msg}: {error:?}") } *) - Definition unwrap_failed (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_failed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ msg; error ] => ltac:(M.monadic @@ -2676,34 +2848,49 @@ Module result. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "" |); M.read (| Value.String ": " |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ": " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ msg ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] - ] - |), - [ error ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ msg ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "&") + [ Ty.dyn [ ("core::fmt::Debug::Trait", []) ] ] + ] + |), + [ error ] + |)) + ] + |) + |) + |) ] |) ] @@ -2722,7 +2909,7 @@ Module result. } } *) - Definition clone (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2739,14 +2926,17 @@ Module result. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let x := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ M.read (| x |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2755,14 +2945,17 @@ Module result. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let x := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", E, [], "clone", [] |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", E, [], "clone", [] |), + [ M.read (| x |) ] + |)) + ] + |) |))) ] |) @@ -2779,7 +2972,7 @@ Module result. } } *) - Definition clone_from (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self; source ] => @@ -2788,7 +2981,11 @@ Module result. let source := M.alloc (| source |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| source |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| source |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -2894,25 +3091,28 @@ Module result. IntoIter { inner: self.ok() } } *) - Definition into_iter (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::result::IntoIter" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::result::Result") [ T; E ], - "ok", - [] - |), - [ M.read (| self |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::result::IntoIter" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::result::Result") [ T; E ], + "ok", + [] + |), + [ M.read (| self |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -2945,7 +3145,7 @@ Module result. self.iter() } *) - Definition into_iter (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -2991,7 +3191,7 @@ Module result. self.iter_mut() } *) - Definition into_iter (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -3034,7 +3234,7 @@ Module result. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::Iter") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -3049,17 +3249,18 @@ Module result. |), [ M.read (| f |); - M.read (| Value.String "Iter" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "Iter" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::result::Iter", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -3085,7 +3286,7 @@ Module result. self.inner.take() } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3114,7 +3315,7 @@ Module result. (n, Some(n)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3124,7 +3325,7 @@ Module result. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3150,15 +3351,24 @@ Module result. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in M.alloc (| - Value.Tuple - [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -3186,7 +3396,7 @@ Module result. self.inner.take() } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3262,24 +3472,27 @@ Module result. Iter { inner: self.inner } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::result::Iter" - [ - ("inner", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::result::Iter", - "inner" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::result::Iter" + [ + ("inner", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::result::Iter", + "inner" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -3305,7 +3518,7 @@ Module result. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::IterMut") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -3320,17 +3533,18 @@ Module result. |), [ M.read (| f |); - M.read (| Value.String "IterMut" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "IterMut" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::result::IterMut", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -3356,7 +3570,7 @@ Module result. self.inner.take() } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3385,7 +3599,7 @@ Module result. (n, Some(n)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3395,7 +3609,7 @@ Module result. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3421,15 +3635,24 @@ Module result. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in M.alloc (| - Value.Tuple - [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -3457,7 +3680,7 @@ Module result. self.inner.take() } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3536,33 +3759,36 @@ Module result. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::IntoIter") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::result::IntoIter" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::option::Option") [ T ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::result::IntoIter", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::result::IntoIter" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::option::Option") [ T ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::result::IntoIter", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3579,7 +3805,7 @@ Module result. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::result::IntoIter") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -3594,17 +3820,18 @@ Module result. |), [ M.read (| f |); - M.read (| Value.String "IntoIter" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "IntoIter" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::result::IntoIter", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -3630,7 +3857,7 @@ Module result. self.inner.take() } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3659,7 +3886,7 @@ Module result. (n, Some(n)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3669,7 +3896,7 @@ Module result. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3693,15 +3920,24 @@ Module result. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in M.alloc (| - Value.Tuple - [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -3729,7 +3965,7 @@ Module result. self.inner.take() } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3805,7 +4041,7 @@ Module result. iter::try_process(iter.into_iter(), |i| i.collect()) } *) - Definition from_iter (A E V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (A E V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A E V in match τ, α with | [ _ as I ], [ iter ] => @@ -3849,8 +4085,8 @@ Module result. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3880,7 +4116,8 @@ Module result. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3910,13 +4147,15 @@ Module result. Ok(output) } *) - Definition from_output (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_output (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ output ] => ltac:(M.monadic (let output := M.alloc (| output |) in - Value.StructTuple "core::result::Result::Ok" [ M.read (| output |) ])) + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| output |)) ] + |))) | _, _ => M.impossible end. @@ -3928,7 +4167,7 @@ Module result. } } *) - Definition branch (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition branch (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -3944,9 +4183,11 @@ Module result. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let v := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ M.read (| v |) ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ A.to_value (M.read (| v |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -3954,9 +4195,18 @@ Module result. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |)) + ] + |) |))) ] |) @@ -3989,7 +4239,7 @@ Module result. } } *) - Definition from_residual (T E F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_residual (T E F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E F in match τ, α with | [], [ residual ] => @@ -4005,14 +4255,23 @@ Module result. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| "core::convert::From", F, [ E ], "from", [] |), - [ M.read (| e |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + F, + [ E ], + "from", + [] + |), + [ M.read (| e |) ] + |)) + ] + |) |))) ] |) @@ -4041,7 +4300,7 @@ Module result. Err(From::from(e)) } *) - Definition from_residual (T E F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_residual (T E F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E F in match τ, α with | [], [ β0 ] => @@ -4055,14 +4314,17 @@ Module result. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::ops::try_trait::Yeet", 0 |) in let e := M.copy (| γ0_0 |) in - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| "core::convert::From", F, [ E ], "from", [] |), - [ M.read (| e |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::convert::From", F, [ E ], "from", [] |), + [ M.read (| e |) ] + |)) + ] + |))) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/simulations/bool.v b/CoqOfRust/core/simulations/bool.v index 0034c364b..534f5a437 100644 --- a/CoqOfRust/core/simulations/bool.v +++ b/CoqOfRust/core/simulations/bool.v @@ -4,8 +4,11 @@ Require Import CoqOfRust.lib.lib. Import simulations.M.Notations. Module Bool. - Global Instance IsToValue : ToValue bool := { + Global Instance IsToTy : ToTy bool := { Φ := Ty.path "bool"; + }. + + Global Instance IsToValue : ToValue bool := { φ := Value.Bool; }. diff --git a/CoqOfRust/core/simulations/integer.v b/CoqOfRust/core/simulations/integer.v deleted file mode 100644 index 3cd1129a5..000000000 --- a/CoqOfRust/core/simulations/integer.v +++ /dev/null @@ -1,122 +0,0 @@ -Require Import CoqOfRust.CoqOfRust. -Require Import simulations.M. - -Module I8. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i8"; - φ '(Make x) := Value.Integer Integer.I8 x; - }. -End I8. - -Module I16. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i16"; - φ '(Make x) := Value.Integer Integer.I16 x; - }. -End I16. - -Module I32. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i32"; - φ '(Make x) := Value.Integer Integer.I32 x; - }. -End I32. - -Module I64. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i64"; - φ '(Make x) := Value.Integer Integer.I64 x; - }. -End I64. - -Module I128. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i128"; - φ '(Make x) := Value.Integer Integer.I128 x; - }. -End I128. - -Module Isize. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "isize"; - φ '(Make x) := Value.Integer Integer.Isize x; - }. -End Isize. - -Module U8. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u8"; - φ '(Make x) := Value.Integer Integer.U8 x; - }. -End U8. - -Module U16. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u16"; - φ '(Make x) := Value.Integer Integer.U16 x; - }. -End U16. - -Module U32. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u32"; - φ '(Make x) := Value.Integer Integer.U32 x; - }. -End U32. - -Module U64. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u64"; - φ '(Make x) := Value.Integer Integer.U64 x; - }. -End U64. - -Module U128. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u128"; - φ '(Make x) := Value.Integer Integer.U128 x; - }. -End U128. - -Module Usize. - Inductive t : Set := - | Make (value : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "usize"; - φ '(Make x) := Value.Integer Integer.Usize x; - }. -End Usize. diff --git a/CoqOfRust/core/simulations/option.v b/CoqOfRust/core/simulations/option.v index 65f028119..f52f6644e 100644 --- a/CoqOfRust/core/simulations/option.v +++ b/CoqOfRust/core/simulations/option.v @@ -4,8 +4,11 @@ Require CoqOfRust.core.simulations.default. Import simulations.M.Notations. Module Option. - Global Instance IsToValue (A : Set) (_ : ToValue A) : ToValue (option A) := { + Global Instance IsToTy (A : Set) (_ : ToTy A) : ToTy (option A) := { Φ := Ty.apply (Ty.path "core::option::Option") [Φ A]; + }. + + Global Instance IsToValue (A : Set) (_ : ToValue A) : ToValue (option A) := { φ x := match x with | None => Value.StructTuple "core::option::Option::None" [] diff --git a/CoqOfRust/core/simulations/result.v b/CoqOfRust/core/simulations/result.v index 8aef7bcb7..e0505baa1 100644 --- a/CoqOfRust/core/simulations/result.v +++ b/CoqOfRust/core/simulations/result.v @@ -4,10 +4,11 @@ Require CoqOfRust.core.simulations.default. Import simulations.M.Notations. Module Result. - Global Instance IsToValue - (A B : Set) (_ : ToValue A) (_ : ToValue B) : - ToValue (A + B) := { + Global Instance IsToTy (A B : Set) (_ : ToTy A) (_ : ToTy B) : ToTy (A + B) := { Φ := Ty.apply (Ty.path "core::result::Result") [Φ A; Φ B]; + }. + + Global Instance IsToValue (A B : Set) (_ : ToValue A) (_ : ToValue B) : ToValue (A + B) := { φ x := match x with | inl x => Value.StructTuple "core::result::Result::Ok" [φ x] diff --git a/CoqOfRust/core/slice/ascii.v b/CoqOfRust/core/slice/ascii.v index ce46fe81c..d96dabaa0 100644 --- a/CoqOfRust/core/slice/ascii.v +++ b/CoqOfRust/core/slice/ascii.v @@ -11,7 +11,7 @@ Module slice. is_ascii(self) } *) - Definition is_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -35,14 +35,14 @@ Module slice. } } *) - Definition as_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -60,22 +60,27 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "as_ascii_unchecked", - [] - |), - [ M.read (| self |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_ascii_unchecked", + [] + |), + [ M.read (| self |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -92,14 +97,14 @@ Module slice. unsafe { &*ascii_ptr } } *) - Definition as_ascii_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ascii_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => 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 ascii_ptr := M.alloc (| M.rust_cast (| M.read (| byte_ptr |) |) |) in M.alloc (| M.read (| ascii_ptr |) |) |))) | _, _ => M.impossible @@ -113,30 +118,31 @@ Module slice. self.len() == other.len() && iter::zip(self, other).all(|(a, b)| a.eq_ignore_ascii_case(b)) } *) - Definition eq_ignore_ascii_case (τ : list Ty.t) (α : list Value.t) : M := + Definition eq_ignore_ascii_case (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| other |) ] - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -177,8 +183,8 @@ Module slice. [ M.read (| self |); M.read (| other |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -202,7 +208,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) |))) @@ -219,7 +226,7 @@ Module slice. } } *) - Definition make_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition make_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -287,10 +294,10 @@ Module slice. [ M.read (| byte |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -308,7 +315,7 @@ Module slice. } } *) - Definition make_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition make_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -376,10 +383,10 @@ Module slice. [ M.read (| byte |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -395,39 +402,42 @@ Module slice. EscapeAscii { inner: self.iter().flat_map(EscapeByte) } } *) - Definition escape_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::ascii::EscapeAscii" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ], - [], - "flat_map", - [ - Ty.path "core::ascii::EscapeDefault"; - Ty.path "core::slice::ascii::EscapeByte" - ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "iter", - [] + M.of_value (| + Value.StructRecord + "core::slice::ascii::EscapeAscii" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ], + [], + "flat_map", + [ + Ty.path "core::ascii::EscapeDefault"; + Ty.path "core::slice::ascii::EscapeByte" + ] |), - [ M.read (| self |) ] - |); - Value.StructTuple "core::slice::ascii::EscapeByte" [] - ] - |)) - ])) + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "iter", + [] + |), + [ M.read (| self |) ] + |); + M.of_value (| Value.StructTuple "core::slice::ascii::EscapeByte" [] |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -449,7 +459,7 @@ Module slice. bytes } *) - Definition trim_ascii_start (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_ascii_start (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -460,7 +470,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -471,7 +481,7 @@ Module slice. let first := M.alloc (| γ1_0 |) in let rest := M.alloc (| γ1_rest |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -493,7 +503,7 @@ Module slice. Value.Bool true |) in let _ := M.write (| bytes, M.read (| rest |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))) @@ -506,7 +516,7 @@ Module slice. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -536,7 +546,7 @@ Module slice. bytes } *) - Definition trim_ascii_end (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_ascii_end (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -547,7 +557,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -558,7 +568,7 @@ Module slice. let rest := M.alloc (| γ1_rest |) in let last := M.alloc (| γ1_rev0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -580,7 +590,7 @@ Module slice. Value.Bool true |) in let _ := M.write (| bytes, M.read (| rest |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))) @@ -593,7 +603,7 @@ Module slice. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -613,7 +623,7 @@ Module slice. self.trim_ascii_start().trim_ascii_end() } *) - Definition trim_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -645,12 +655,12 @@ Module slice. Definition Self : Ty.t := Ty.path "core::slice::ascii::EscapeByte". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::slice::ascii::EscapeByte" [])) + M.of_value (| Value.StructTuple "core::slice::ascii::EscapeByte" [] |))) | _, _ => M.impossible end. @@ -683,38 +693,41 @@ Module slice. Definition Self : Ty.t := Ty.path "core::slice::ascii::EscapeAscii". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::ascii::EscapeAscii" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::flatten::FlatMap") + M.of_value (| + Value.StructRecord + "core::slice::ascii::EscapeAscii" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::iter::adapters::flatten::FlatMap") + [ + Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ]; + Ty.path "core::ascii::EscapeDefault"; + Ty.path "core::slice::ascii::EscapeByte" + ], + [], + "clone", + [] + |), [ - Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ]; - Ty.path "core::ascii::EscapeDefault"; - Ty.path "core::slice::ascii::EscapeByte" - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::ascii::EscapeAscii", - "inner" - |) - ] - |)) - ])) + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::ascii::EscapeAscii", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -737,7 +750,7 @@ Module slice. self.inner.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -772,7 +785,7 @@ Module slice. self.inner.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -811,7 +824,7 @@ Module slice. self.inner.try_fold(init, fold) } *) - Definition try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => ltac:(M.monadic @@ -853,7 +866,7 @@ Module slice. self.inner.fold(init, fold) } *) - Definition fold (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; Fold ], [ self; init; fold ] => ltac:(M.monadic @@ -894,7 +907,7 @@ Module slice. self.next_back() } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -936,7 +949,7 @@ Module slice. self.inner.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -993,7 +1006,7 @@ Module slice. self.clone().try_for_each(|b| f.write_char(b as char)) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1029,8 +1042,8 @@ Module slice. [ M.read (| self |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1048,12 +1061,13 @@ Module slice. "write_char", [] |), - [ M.read (| f |); M.rust_cast (M.read (| b |)) ] + [ M.read (| f |); M.rust_cast (| M.read (| b |) |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1075,7 +1089,7 @@ Module slice. f.debug_struct("EscapeAscii").finish_non_exhaustive() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1095,7 +1109,7 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "EscapeAscii" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "EscapeAscii" |) |) ] |) |) ] @@ -1117,29 +1131,31 @@ Module slice. (NONASCII_MASK & v) != 0 } *) - Definition contains_nonascii (τ : list Ty.t) (α : list Value.t) : M := + Definition contains_nonascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| M.get_constant (| "core::slice::ascii::contains_nonascii::NONASCII_MASK" |) - |)) - (M.read (| v |))) - (Value.Integer Integer.Usize 0))) + |), + M.read (| v |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. Module contains_nonascii. - Definition value_NONASCII_MASK : Value.t := + Definition value_NONASCII_MASK : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "repeat_u8", [] |), - [ Value.Integer Integer.U8 128 ] + [ M.of_value (| Value.Integer 128 |) ] |) |))). End contains_nonascii. @@ -1155,7 +1171,7 @@ Module slice. bytes.is_empty() } *) - Definition is_ascii_simple (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii_simple (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -1165,7 +1181,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1177,22 +1193,23 @@ Module slice. let last := M.alloc (| γ1_rev0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "u8", "is_ascii", [] |), [ M.read (| last |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1200,11 +1217,12 @@ Module slice. Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.write (| bytes, M.read (| rest |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1212,7 +1230,7 @@ Module slice. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1319,7 +1337,7 @@ Module slice. !contains_nonascii(last_word) } *) - Definition is_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -1361,7 +1379,7 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1370,32 +1388,35 @@ Module slice. (M.alloc (| LogicalOp.or (| LogicalOp.or (| - BinOp.Pure.lt - (M.read (| len |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| len |), + M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| len |)) - (M.read (| align_offset |)))) + (BinOp.Pure.lt (| + M.read (| len |), + M.read (| align_offset |) + |))) |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| + (BinOp.Pure.lt (| + M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_function (| "core::mem::align_of", [ Ty.path "usize" ] |), [] - |)))) + |) + |))) |) |)) in let _ := @@ -1412,22 +1433,23 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let offset_to_aligned := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| align_offset |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| align_offset |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1455,12 +1477,12 @@ Module slice. "read_unaligned", [] |), - [ M.rust_cast (M.read (| start |)) ] + [ M.rust_cast (| M.read (| start |) |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1475,33 +1497,37 @@ Module slice. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| offset_to_aligned |)) - (M.read (| len |))) + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| offset_to_aligned |), + M.read (| len |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1514,53 +1540,57 @@ Module slice. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: offset_to_aligned <= len" + M.of_value (| + Value.String + "assertion failed: offset_to_aligned <= len" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let word_ptr := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.path "u8" ], "add", [] |), [ M.read (| start |); M.read (| offset_to_aligned |) ] - |)) + |) + |) |) in let byte_pos := M.copy (| offset_to_aligned |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.path "usize" ], "is_aligned_to", @@ -1576,7 +1606,8 @@ Module slice. [] |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1589,41 +1620,46 @@ Module slice. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: word_ptr.is_aligned_to(mem::align_of::())" + M.of_value (| + Value.String + "assertion failed: word_ptr.is_aligned_to(mem::align_of::())" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| byte_pos |)) - (BinOp.Panic.sub (| + BinOp.Pure.lt (| + M.read (| byte_pos |), + BinOp.Panic.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 (| @@ -1632,11 +1668,12 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1644,24 +1681,27 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (BinOp.Panic.add (| + UnOp.Pure.not (| + BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, M.read (| byte_pos |), M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" |) |) - |)) - (M.read (| len |))) + |), + M.read (| len |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1677,28 +1717,34 @@ Module slice. |), [ M.read (| - Value.String - "assertion failed: byte_pos + USIZE_SIZE <= len" + M.of_value (| + Value.String + "assertion failed: byte_pos + USIZE_SIZE <= len" + |) |) ] |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1706,15 +1752,15 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.match_operator (| M.alloc (| M.call_closure (| @@ -1760,7 +1806,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (Value.Tuple [])); + (M.of_value (| + Value.Tuple [] + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1774,27 +1822,35 @@ Module slice. M.read (| γ0_0 |), Value.Bool true |) in - Value.Tuple [])) + M.of_value (| + Value.Tuple [] + |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => M.alloc (| - Value.Bool true + M.of_value (| + Value.Bool true + |) |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Bool false + M.of_value (| + Value.Bool false + |) |))) ] |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1810,20 +1866,25 @@ Module slice. |), [ M.read (| - Value.String - "assertion failed: matches!(word_ptr.cast::().guaranteed_eq(start.wrapping_add(byte_pos)), + M.of_value (| + Value.String + "assertion failed: matches!(word_ptr.cast::().guaranteed_eq(start.wrapping_add(byte_pos)), None | Some(true),)" + |) |) ] |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let word := @@ -1839,7 +1900,7 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1861,10 +1922,14 @@ Module slice. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool false |) |) + M.read (| + M.return_ (| M.of_value (| Value.Bool false |) |) + |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1872,6 +1937,7 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| M.get_constant (| @@ -1889,10 +1955,10 @@ Module slice. "add", [] |), - [ M.read (| word_ptr |); Value.Integer Integer.Usize 1 ] + [ M.read (| word_ptr |); M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1902,7 +1968,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1911,39 +1977,43 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.le - (M.read (| byte_pos |)) - (M.read (| len |)), + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.le (| + M.read (| byte_pos |), + M.read (| len |) + |), ltac:(M.monadic - (BinOp.Pure.le - (BinOp.Panic.sub (| + (BinOp.Pure.le (| + BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| byte_pos |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" |) - |)))) - |)) + |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1956,18 +2026,21 @@ Module slice. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: byte_pos <= len && len - byte_pos <= USIZE_SIZE" + M.of_value (| + Value.String + "assertion failed: byte_pos <= len && len - byte_pos <= USIZE_SIZE" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let last_word := @@ -1979,8 +2052,8 @@ Module slice. [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.path "u8" ], "add", @@ -1989,22 +2062,25 @@ Module slice. [ M.read (| start |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" |) |) |) ] - |)) + |) + |) ] |) |) in M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::slice::ascii::contains_nonascii", [] |), [ M.read (| last_word |) ] - |)) + |) + |) |) |))) |))) @@ -2012,7 +2088,7 @@ Module slice. end. Module is_ascii. - Definition value_USIZE_SIZE : Value.t := + Definition value_USIZE_SIZE : A.t := M.run ltac:(M.monadic (M.alloc (| diff --git a/CoqOfRust/core/slice/cmp.v b/CoqOfRust/core/slice/cmp.v index 5fee87d39..a41116d7c 100644 --- a/CoqOfRust/core/slice/cmp.v +++ b/CoqOfRust/core/slice/cmp.v @@ -11,7 +11,7 @@ Module slice. SlicePartialEq::equal(self, other) } *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -36,7 +36,7 @@ Module slice. SlicePartialEq::not_equal(self, other) } *) - Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -86,7 +86,7 @@ Module slice. SliceOrd::compare(self, other) } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -117,7 +117,7 @@ Module slice. SlicePartialOrd::partial_compare(self, other) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -148,14 +148,14 @@ Module slice. (* Trait *) Module SlicePartialEq. - Definition not_equal (B Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition not_equal (B Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::slice::cmp::SlicePartialEq", Self, @@ -164,7 +164,8 @@ Module slice. [] |), [ M.read (| self |); M.read (| other |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -185,7 +186,7 @@ Module slice. self.iter().zip(other.iter()).all(|(x, y)| x == y) } *) - Definition equal (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition equal (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -197,37 +198,40 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ A ], "len", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ B ], "len", [] |), [ M.read (| other |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -284,8 +288,8 @@ Module slice. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -311,7 +315,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -346,7 +351,7 @@ Module slice. } } *) - Definition equal (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition equal (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -358,37 +363,40 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ A ], "len", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ B ], "len", [] |), [ M.read (| other |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let size := @@ -402,32 +410,35 @@ Module slice. |) |) in M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::intrinsics::compare_bytes", [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ A ], "as_ptr", [] |), [ M.read (| self |) ] - |)); - M.rust_cast - (M.call_closure (| + |) + |); + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ B ], "as_ptr", [] |), [ M.read (| other |) ] - |)); + |) + |); M.read (| size |) ] - |)) - (Value.Integer Integer.I32 0) + |), + M.of_value (| Value.Integer 0 |) + |) |) |))) |))) @@ -468,7 +479,7 @@ Module slice. left.len().partial_cmp(&right.len()) } *) - Definition partial_compare (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_compare (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ _ as left; _ as right ] => @@ -514,9 +525,11 @@ Module slice. |), [ M.read (| left |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| l |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| l |))) ] + |) ] |) |) in @@ -532,9 +545,11 @@ Module slice. |), [ M.read (| right |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| l |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| l |))) ] + |) ] |) |) in @@ -551,10 +566,14 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.Usize 0); ("end_", M.read (| l |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| l |))) + ] + |) ] |) |), @@ -626,7 +645,7 @@ Module slice. "core::option::Option::Some", 0 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let non_eq := M.copy (| γ |) in @@ -641,7 +660,7 @@ Module slice. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -700,21 +719,24 @@ Module slice. Some(SliceOrd::compare(left, right)) } *) - Definition partial_compare (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_compare (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ _ as left; _ as right ] => ltac:(M.monadic (let left := M.alloc (| left |) in let right := M.alloc (| right |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::slice::cmp::SliceOrd", A, [], "compare", [] |), - [ M.read (| left |); M.read (| right |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::slice::cmp::SliceOrd", A, [], "compare", [] |), + [ M.read (| left |); M.read (| right |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -969,7 +991,7 @@ Module slice. left.len().cmp(&right.len()) } *) - Definition compare (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition compare (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [], [ _ as left; _ as right ] => @@ -1015,9 +1037,11 @@ Module slice. |), [ M.read (| left |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| l |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| l |))) ] + |) ] |) |) in @@ -1033,9 +1057,11 @@ Module slice. |), [ M.read (| right |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| l |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| l |))) ] + |) ] |) |) in @@ -1052,10 +1078,14 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.Usize 0); ("end_", M.read (| l |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| l |))) + ] + |) ] |) |), @@ -1120,7 +1150,10 @@ Module slice. |), [ fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))); + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let non_eq := M.copy (| γ |) in @@ -1135,7 +1168,7 @@ Module slice. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -1199,7 +1232,7 @@ Module slice. order.cmp(&0) } *) - Definition compare (τ : list Ty.t) (α : list Value.t) : M := + Definition compare (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ _ as left; _ as right ] => ltac:(M.monadic @@ -1209,53 +1242,57 @@ Module slice. let diff := M.alloc (| BinOp.Panic.sub (| - M.rust_cast - (M.call_closure (| + Integer.Isize, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| left |) ] - |)), - M.rust_cast - (M.call_closure (| + |) + |), + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| right |) ] - |)) + |) + |) |) |) in let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| left |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| right |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1286,8 +1323,8 @@ Module slice. |) in let order := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::intrinsics::compare_bytes", [] |), [ M.call_closure (| @@ -1308,30 +1345,34 @@ Module slice. |); M.read (| len |) ] - |)) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| order |)) (Value.Integer Integer.Isize 0) + BinOp.Pure.eq (| + M.read (| order |), + M.of_value (| 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 - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "isize", [], "cmp", [] |), - [ order; M.alloc (| Value.Integer Integer.Isize 0 |) ] + [ order; M.alloc (| M.of_value (| Value.Integer 0 |) |) ] |) |) |))) @@ -1357,7 +1398,7 @@ Module slice. x.iter().any(|y| *y == *self) } *) - Definition slice_contains (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_contains (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; x ] => @@ -1379,8 +1420,8 @@ Module slice. [ M.read (| x |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1403,7 +1444,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1426,7 +1468,7 @@ Module slice. memchr::memchr( *self, x).is_some() } *) - Definition slice_contains (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_contains (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; x ] => ltac:(M.monadic @@ -1472,28 +1514,29 @@ Module slice. memchr::memchr(byte, bytes).is_some() } *) - Definition slice_contains (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_contains (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; x ] => ltac:(M.monadic (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 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" ] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i8" ], "as_ptr", [] |), [ M.read (| x |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i8" ], diff --git a/CoqOfRust/core/slice/index.v b/CoqOfRust/core/slice/index.v index 60df3920d..363274625 100644 --- a/CoqOfRust/core/slice/index.v +++ b/CoqOfRust/core/slice/index.v @@ -14,7 +14,7 @@ Module slice. index.index(self) } *) - Definition index (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self; index ] => @@ -53,7 +53,7 @@ Module slice. index.index_mut(self) } *) - Definition index_mut (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self; index ] => @@ -94,7 +94,7 @@ Module slice. } } *) - Definition slice_start_index_len_fail (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_start_index_len_fail (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ index; len ] => ltac:(M.monadic @@ -111,7 +111,9 @@ Module slice. ] |), [ - Value.Tuple [ M.read (| index |); M.read (| len |) ]; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| index |)); A.to_value (M.read (| len |)) ] + |); M.get_function (| "core::slice::index::slice_start_index_len_fail_ct", [] |); M.get_function (| "core::slice::index::slice_start_index_len_fail_rt", [] |) ] @@ -124,7 +126,7 @@ Module slice. panic!("range start index {index} out of range for slice of length {len}"); } *) - Definition slice_start_index_len_fail_rt (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_start_index_len_fail_rt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ index; len ] => ltac:(M.monadic @@ -137,37 +139,49 @@ Module slice. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "range start index " |); - M.read (| Value.String " out of range for slice of length " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "range start index " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " out of range for slice of length " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ index ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ len ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ index ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ len ] + |)) + ] + |) + |) + |) ] |) ] @@ -180,7 +194,7 @@ Module slice. panic!("slice start index is out of range for slice"); } *) - Definition slice_start_index_len_fail_ct (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_start_index_len_fail_ct (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0; β1 ] => ltac:(M.monadic @@ -207,16 +221,22 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice start index is out of range for slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice start index is out of range for slice" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -236,7 +256,7 @@ Module slice. } } *) - Definition slice_end_index_len_fail (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_end_index_len_fail (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ index; len ] => ltac:(M.monadic @@ -253,7 +273,9 @@ Module slice. ] |), [ - Value.Tuple [ M.read (| index |); M.read (| len |) ]; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| index |)); A.to_value (M.read (| len |)) ] + |); M.get_function (| "core::slice::index::slice_end_index_len_fail_ct", [] |); M.get_function (| "core::slice::index::slice_end_index_len_fail_rt", [] |) ] @@ -266,7 +288,7 @@ Module slice. panic!("range end index {index} out of range for slice of length {len}"); } *) - Definition slice_end_index_len_fail_rt (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_end_index_len_fail_rt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ index; len ] => ltac:(M.monadic @@ -279,37 +301,49 @@ Module slice. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "range end index " |); - M.read (| Value.String " out of range for slice of length " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "range end index " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " out of range for slice of length " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ index ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ len ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ index ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ len ] + |)) + ] + |) + |) + |) ] |) ] @@ -322,7 +356,7 @@ Module slice. panic!("slice end index is out of range for slice"); } *) - Definition slice_end_index_len_fail_ct (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_end_index_len_fail_ct (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0; β1 ] => ltac:(M.monadic @@ -349,15 +383,22 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "slice end index is out of range for slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice end index is out of range for slice" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -375,7 +416,7 @@ Module slice. unsafe { const_eval_select((index, end), slice_index_order_fail_ct, slice_index_order_fail_rt) } } *) - Definition slice_index_order_fail (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_index_order_fail (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ index; end_ ] => ltac:(M.monadic @@ -392,7 +433,9 @@ Module slice. ] |), [ - Value.Tuple [ M.read (| index |); M.read (| end_ |) ]; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| index |)); A.to_value (M.read (| end_ |)) ] + |); M.get_function (| "core::slice::index::slice_index_order_fail_ct", [] |); M.get_function (| "core::slice::index::slice_index_order_fail_rt", [] |) ] @@ -405,7 +448,7 @@ Module slice. panic!("slice index starts at {index} but ends at {end}"); } *) - Definition slice_index_order_fail_rt (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_index_order_fail_rt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ index; end_ ] => ltac:(M.monadic @@ -418,37 +461,46 @@ Module slice. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "slice index starts at " |); - M.read (| Value.String " but ends at " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "slice index starts at " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " but ends at " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ index ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ end_ ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ index ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ end_ ] + |)) + ] + |) + |) + |) ] |) ] @@ -461,7 +513,7 @@ Module slice. panic!("slice index start is larger than end"); } *) - Definition slice_index_order_fail_ct (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_index_order_fail_ct (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0; β1 ] => ltac:(M.monadic @@ -488,15 +540,22 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "slice index start is larger than end" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice index start is larger than end" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -513,7 +572,7 @@ Module slice. panic!("attempted to index slice from after maximum usize"); } *) - Definition slice_start_index_overflow_fail (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_start_index_overflow_fail (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -524,15 +583,21 @@ Module slice. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "attempted to index slice from after maximum usize" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "attempted to index slice from after maximum usize" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -545,7 +610,7 @@ Module slice. panic!("attempted to index slice up to maximum usize"); } *) - Definition slice_end_index_overflow_fail (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_end_index_overflow_fail (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -556,11 +621,21 @@ Module slice. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "attempted to index slice up to maximum usize" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "attempted to index slice up to maximum usize" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -696,7 +771,7 @@ Module slice. if self < slice.len() { unsafe { Some(&*self.get_unchecked(slice)) } } else { None } } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -705,44 +780,50 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.path "usize", - [ Ty.apply (Ty.path "slice") [ T ] ], - "get_unchecked", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.path "usize", + [ Ty.apply (Ty.path "slice") [ T ] ], + "get_unchecked", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -755,7 +836,7 @@ Module slice. if self < slice.len() { unsafe { Some(&mut *self.get_unchecked_mut(slice)) } } else { None } } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -764,44 +845,50 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.path "usize", - [ Ty.apply (Ty.path "slice") [ T ] ], - "get_unchecked_mut", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.path "usize", + [ Ty.apply (Ty.path "slice") [ T ] ], + "get_unchecked_mut", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -824,7 +911,7 @@ Module slice. } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -834,25 +921,25 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| self |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") @@ -861,7 +948,9 @@ Module slice. [] |), [ M.read (| slice |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -884,27 +973,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::get_unchecked requires that the index is within the slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::get_unchecked requires that the index is within the slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -912,16 +1008,17 @@ Module slice. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.lt - (M.read (| self |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.apply (Ty.path "slice") [ T ] ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) ] |) |) in @@ -955,7 +1052,7 @@ Module slice. unsafe { slice.as_mut_ptr().add(self) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -965,25 +1062,25 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| self |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| self |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -992,7 +1089,9 @@ Module slice. [] |), [ M.read (| slice |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1015,27 +1114,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::get_unchecked_mut requires that the index is within the slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::get_unchecked_mut requires that the index is within the slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1064,7 +1170,7 @@ Module slice. &( *slice)[self] } *) - Definition index (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1081,7 +1187,7 @@ Module slice. &mut ( *slice)[self] } *) - Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1126,7 +1232,7 @@ Module slice. } } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1135,51 +1241,57 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "end", [] |), [ self ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.path "core::ops::index_range::IndexRange", - [ Ty.apply (Ty.path "slice") [ T ] ], - "get_unchecked", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.path "core::ops::index_range::IndexRange", + [ Ty.apply (Ty.path "slice") [ T ] ], + "get_unchecked", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1196,7 +1308,7 @@ Module slice. } } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1205,51 +1317,57 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "end", [] |), [ self ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.path "core::ops::index_range::IndexRange", - [ Ty.apply (Ty.path "slice") [ T ] ], - "get_unchecked_mut", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.path "core::ops::index_range::IndexRange", + [ Ty.apply (Ty.path "slice") [ T ] ], + "get_unchecked_mut", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1269,7 +1387,7 @@ Module slice. unsafe { ptr::slice_from_raw_parts(slice.as_ptr().add(self.start()), self.len()) } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1279,32 +1397,32 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "end", [] |), [ self ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") @@ -1313,7 +1431,9 @@ Module slice. [] |), [ M.read (| slice |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1336,27 +1456,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::get_unchecked requires that the index is within the slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::get_unchecked requires that the index is within the slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1409,7 +1536,7 @@ Module slice. unsafe { ptr::slice_from_raw_parts_mut(slice.as_mut_ptr().add(self.start()), self.len()) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1419,32 +1546,32 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "end", [] |), [ self ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -1453,7 +1580,9 @@ Module slice. [] |), [ M.read (| slice |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1476,27 +1605,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::get_unchecked_mut requires that the index is within the slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::get_unchecked_mut requires that the index is within the slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1549,7 +1685,7 @@ Module slice. } } *) - Definition index (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1558,30 +1694,31 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "end", [] |), [ self ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1639,7 +1776,7 @@ Module slice. } } *) - Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1648,30 +1785,31 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "end", [] |), [ self ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1754,7 +1892,7 @@ Module slice. } } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1763,7 +1901,7 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1771,59 +1909,68 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| + (BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)))) + |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], - [ Ty.apply (Ty.path "slice") [ T ] ], - "get_unchecked", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [ Ty.apply (Ty.path "slice") [ T ] ], + "get_unchecked", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))) ] |) @@ -1841,7 +1988,7 @@ Module slice. } } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1850,7 +1997,7 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1858,59 +2005,68 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| + (BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)))) + |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], - [ Ty.apply (Ty.path "slice") [ T ] ], - "get_unchecked_mut", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [ Ty.apply (Ty.path "slice") [ T ] ], + "get_unchecked_mut", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))) ] |) @@ -1934,7 +2090,7 @@ Module slice. } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -1944,48 +2100,49 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.ge - (M.read (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.ge (| + 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" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") @@ -1994,8 +2151,10 @@ Module slice. [] |), [ M.read (| slice |) ] - |)))) - |)) + |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2018,27 +2177,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::get_unchecked requires that the range is within the slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::get_unchecked requires that the range is within the slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_len := @@ -2108,7 +2274,7 @@ Module slice. } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2118,48 +2284,49 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.ge - (M.read (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.ge (| + 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" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -2168,8 +2335,10 @@ Module slice. [] |), [ M.read (| slice |) ] - |)))) - |)) + |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2192,27 +2361,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::get_unchecked_mut requires that the range is within the slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::get_unchecked_mut requires that the range is within the slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_len := @@ -2280,7 +2456,7 @@ Module slice. unsafe { &*self.get_unchecked(slice) } } *) - Definition index (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2290,28 +2466,29 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2341,29 +2518,30 @@ Module slice. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2397,7 +2575,8 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -2429,7 +2608,7 @@ Module slice. unsafe { &mut *self.get_unchecked_mut(slice) } } *) - Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2439,28 +2618,29 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2490,29 +2670,30 @@ Module slice. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2546,7 +2727,8 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -2597,7 +2779,7 @@ Module slice. (0..self.end).get(slice) } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2613,19 +2795,22 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeTo", - "end" - |) - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeTo", + "end" + |) + |))) + ] + |); M.read (| slice |) ] |))) @@ -2637,7 +2822,7 @@ Module slice. (0..self.end).get_mut(slice) } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2653,19 +2838,22 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeTo", - "end" - |) - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeTo", + "end" + |) + |))) + ] + |); M.read (| slice |) ] |))) @@ -2678,7 +2866,7 @@ Module slice. unsafe { (0..self.end).get_unchecked(slice) } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2694,19 +2882,22 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeTo", - "end" - |) - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeTo", + "end" + |) + |))) + ] + |); M.read (| slice |) ] |))) @@ -2719,7 +2910,7 @@ Module slice. unsafe { (0..self.end).get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2735,19 +2926,22 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeTo", - "end" - |) - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeTo", + "end" + |) + |))) + ] + |); M.read (| slice |) ] |))) @@ -2759,7 +2953,7 @@ Module slice. (0..self.end).index(slice) } *) - Definition index (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2775,19 +2969,22 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeTo", - "end" - |) - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeTo", + "end" + |) + |))) + ] + |); M.read (| slice |) ] |))) @@ -2799,7 +2996,7 @@ Module slice. (0..self.end).index_mut(slice) } *) - Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2815,19 +3012,22 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeTo", - "end" - |) - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeTo", + "end" + |) + |))) + ] + |); M.read (| slice |) ] |))) @@ -2864,7 +3064,7 @@ Module slice. (self.start..slice.len()).get(slice) } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2880,23 +3080,31 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeFrom", - "start" - |) - |)); - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), - [ M.read (| slice |) ] - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeFrom", + "start" + |) + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| slice |) ] + |))) + ] + |); M.read (| slice |) ] |))) @@ -2908,7 +3116,7 @@ Module slice. (self.start..slice.len()).get_mut(slice) } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2924,23 +3132,31 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeFrom", - "start" - |) - |)); - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), - [ M.read (| slice |) ] - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeFrom", + "start" + |) + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| slice |) ] + |))) + ] + |); M.read (| slice |) ] |))) @@ -2953,7 +3169,7 @@ Module slice. unsafe { (self.start..slice.len()).get_unchecked(slice) } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -2969,27 +3185,31 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeFrom", - "start" - |) - |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ Ty.apply (Ty.path "slice") [ T ] ], - "len", - [] - |), - [ M.read (| slice |) ] - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeFrom", + "start" + |) + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.apply (Ty.path "slice") [ T ] ], + "len", + [] + |), + [ M.read (| slice |) ] + |))) + ] + |); M.read (| slice |) ] |))) @@ -3002,7 +3222,7 @@ Module slice. unsafe { (self.start..slice.len()).get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3018,27 +3238,31 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeFrom", - "start" - |) - |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], - "len", - [] - |), - [ M.read (| slice |) ] - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeFrom", + "start" + |) + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], + "len", + [] + |), + [ M.read (| slice |) ] + |))) + ] + |); M.read (| slice |) ] |))) @@ -3054,7 +3278,7 @@ Module slice. unsafe { &*self.get_unchecked(slice) } } *) - Definition index (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3064,29 +3288,30 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::RangeFrom", "start" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3117,7 +3342,7 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3145,7 +3370,7 @@ Module slice. unsafe { &mut *self.get_unchecked_mut(slice) } } *) - Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3155,29 +3380,30 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::RangeFrom", "start" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3208,7 +3434,7 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3256,14 +3482,16 @@ Module slice. Some(slice) } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => ltac:(M.monadic (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in - Value.StructTuple "core::option::Option::Some" [ M.read (| slice |) ])) + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| slice |)) ] + |))) | _, _ => M.impossible end. @@ -3272,14 +3500,16 @@ Module slice. Some(slice) } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => ltac:(M.monadic (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in - Value.StructTuple "core::option::Option::Some" [ M.read (| slice |) ])) + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| slice |)) ] + |))) | _, _ => M.impossible end. @@ -3288,7 +3518,7 @@ Module slice. slice } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3304,7 +3534,7 @@ Module slice. slice } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3320,7 +3550,7 @@ Module slice. slice } *) - Definition index (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3336,7 +3566,7 @@ Module slice. slice } *) - Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3377,7 +3607,7 @@ Module slice. if *self.end() == usize::MAX { None } else { self.into_slice_range().get(slice) } } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3386,15 +3616,15 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -3405,11 +3635,14 @@ Module slice. |), [ self ] |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3447,7 +3680,7 @@ Module slice. if *self.end() == usize::MAX { None } else { self.into_slice_range().get_mut(slice) } } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3456,15 +3689,15 @@ Module slice. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -3475,11 +3708,14 @@ Module slice. |), [ self ] |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3518,7 +3754,7 @@ Module slice. unsafe { self.into_slice_range().get_unchecked(slice) } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3554,7 +3790,7 @@ Module slice. unsafe { self.into_slice_range().get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3592,7 +3828,7 @@ Module slice. self.into_slice_range().index(slice) } *) - Definition index (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3602,15 +3838,15 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -3621,8 +3857,9 @@ Module slice. |), [ self ] |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3637,7 +3874,7 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3674,7 +3911,7 @@ Module slice. self.into_slice_range().index_mut(slice) } *) - Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3684,15 +3921,15 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -3703,8 +3940,9 @@ Module slice. |), [ self ] |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3719,7 +3957,7 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3778,7 +4016,7 @@ Module slice. (0..=self.end).get(slice) } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3801,7 +4039,7 @@ Module slice. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -3822,7 +4060,7 @@ Module slice. (0..=self.end).get_mut(slice) } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3845,7 +4083,7 @@ Module slice. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -3867,7 +4105,7 @@ Module slice. unsafe { (0..=self.end).get_unchecked(slice) } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3890,7 +4128,7 @@ Module slice. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -3912,7 +4150,7 @@ Module slice. unsafe { (0..=self.end).get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3935,7 +4173,7 @@ Module slice. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -3956,7 +4194,7 @@ Module slice. (0..=self.end).index(slice) } *) - Definition index (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -3979,7 +4217,7 @@ Module slice. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -4000,7 +4238,7 @@ Module slice. (0..=self.end).index_mut(slice) } *) - Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -4023,7 +4261,7 @@ Module slice. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -4092,7 +4330,7 @@ Module slice. ops::Range { start, end } } *) - Definition range (τ : list Ty.t) (α : list Value.t) : M := + Definition range (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ R ], [ range; bounds ] => ltac:(M.monadic @@ -4155,10 +4393,11 @@ Module slice. [ M.call_closure (| M.get_associated_function (| Ty.path "usize", "checked_add", [] |), - [ M.read (| M.read (| start |) |); Value.Integer Integer.Usize 1 ] + [ M.read (| M.read (| start |) |); M.of_value (| Value.Integer 1 |) + ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4179,11 +4418,12 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -4224,10 +4464,10 @@ Module slice. [ M.call_closure (| M.get_associated_function (| Ty.path "usize", "checked_add", [] |), - [ M.read (| M.read (| end_ |) |); Value.Integer Integer.Usize 1 ] + [ M.read (| M.read (| end_ |) |); M.of_value (| Value.Integer 1 |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4248,7 +4488,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))); @@ -4269,13 +4510,15 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| start |)) (M.read (| end_ |)) |)) in + (M.alloc (| + BinOp.Pure.gt (| M.read (| start |), M.read (| end_ |) |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| @@ -4285,18 +4528,18 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.gt (M.read (| end_ |)) (M.read (| len |)) |)) in + (M.alloc (| BinOp.Pure.gt (| M.read (| end_ |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| @@ -4306,13 +4549,18 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) |) |))) | _, _ => M.impossible @@ -4337,7 +4585,7 @@ Module slice. start..end } *) - Definition into_range_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition into_range_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ len; β1 ] => ltac:(M.monadic @@ -4379,11 +4627,13 @@ Module slice. let i := M.copy (| γ0_0 |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| i |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -4403,8 +4653,9 @@ Module slice. let i := M.copy (| γ0_0 |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| i |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => @@ -4422,9 +4673,14 @@ Module slice. |) |) in M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) |) |))) ] @@ -4456,7 +4712,7 @@ Module slice. Some(start..end) } *) - Definition into_range (τ : list Ty.t) (α : list Value.t) : M := + Definition into_range (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ len; β1 ] => ltac:(M.monadic @@ -4517,7 +4773,8 @@ Module slice. "checked_add", [] |), - [ M.read (| start |); Value.Integer Integer.Usize 1 ] + [ M.read (| start |); M.of_value (| Value.Integer 1 |) + ] |) ] |) @@ -4573,7 +4830,7 @@ Module slice. ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -4610,7 +4867,8 @@ Module slice. "checked_add", [] |), - [ M.read (| end_ |); Value.Integer Integer.Usize 1 ] + [ M.read (| end_ |); M.of_value (| Value.Integer 1 |) + ] |) ] |) @@ -4680,13 +4938,21 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |)) + ] + |) |) |))) |))) @@ -4723,7 +4989,7 @@ Module slice. start..end } *) - Definition into_slice_range (τ : list Ty.t) (α : list Value.t) : M := + Definition into_slice_range (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ len; β1 ] => ltac:(M.monadic @@ -4777,10 +5043,10 @@ Module slice. "checked_add", [] |), - [ M.read (| start |); Value.Integer Integer.Usize 1 ] + [ M.read (| start |); M.of_value (| Value.Integer 1 |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4801,11 +5067,13 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -4837,10 +5105,10 @@ Module slice. "checked_add", [] |), - [ M.read (| end_ |); Value.Integer Integer.Usize 1 ] + [ M.read (| end_ |); M.of_value (| Value.Integer 1 |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4861,7 +5129,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))); @@ -4880,9 +5149,14 @@ Module slice. |) |) in M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) |) |))) ] @@ -4906,7 +5180,7 @@ Module slice. into_range(slice.len(), self)?.get(slice) } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -5019,7 +5293,7 @@ Module slice. into_range(slice.len(), self)?.get_mut(slice) } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -5133,7 +5407,7 @@ Module slice. unsafe { into_range_unchecked(slice.len(), self).get_unchecked(slice) } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -5175,7 +5449,7 @@ Module slice. unsafe { into_range_unchecked(slice.len(), self).get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -5216,7 +5490,7 @@ Module slice. into_slice_range(slice.len(), self).index(slice) } *) - Definition index (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => @@ -5253,7 +5527,7 @@ Module slice. into_slice_range(slice.len(), self).index_mut(slice) } *) - Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; slice ] => diff --git a/CoqOfRust/core/slice/iter.v b/CoqOfRust/core/slice/iter.v index 9078c0866..d5e8f7e45 100644 --- a/CoqOfRust/core/slice/iter.v +++ b/CoqOfRust/core/slice/iter.v @@ -18,7 +18,7 @@ Module slice. self.iter() } *) - Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -61,7 +61,7 @@ Module slice. self.iter_mut() } *) - Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -109,7 +109,7 @@ Module slice. f.debug_tuple("Iter").field(&self.as_slice()).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -137,12 +137,12 @@ Module slice. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Iter" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Iter" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], @@ -151,7 +151,8 @@ Module slice. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -206,7 +207,7 @@ Module slice. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -223,7 +224,7 @@ Module slice. let end_or_len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -272,21 +273,26 @@ Module slice. |) |) in M.alloc (| - Value.StructRecord - "core::slice::iter::Iter" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "new_unchecked", - [] - |), - [ M.rust_cast (M.read (| ptr |)) ] - |)); - ("end_or_len", M.read (| end_or_len |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::Iter" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "new_unchecked", + [] + |), + [ M.rust_cast (| M.read (| ptr |) |) ] + |))); + ("end_or_len", A.to_value (M.read (| end_or_len |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -301,7 +307,7 @@ Module slice. self.make_slice() } *) - Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -331,40 +337,45 @@ Module slice. Iter { ptr: self.ptr, end_or_len: self.end_or_len, _marker: self._marker } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::Iter" - [ - ("ptr", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Iter", - "ptr" - |) - |)); - ("end_or_len", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Iter", - "end_or_len" - |) - |)); - ("_marker", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Iter", - "_marker" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::Iter" + [ + ("ptr", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Iter", + "ptr" + |) + |))); + ("end_or_len", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Iter", + "end_or_len" + |) + |))); + ("_marker", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Iter", + "_marker" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -385,7 +396,7 @@ Module slice. self.as_slice() } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -432,7 +443,7 @@ Module slice. f.debug_tuple("IterMut").field(&self.make_slice()).finish() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -460,12 +471,12 @@ Module slice. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "IterMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "IterMut" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], @@ -474,7 +485,8 @@ Module slice. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] @@ -545,7 +557,7 @@ Module slice. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -566,7 +578,7 @@ Module slice. let end_or_len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -615,21 +627,26 @@ Module slice. |) |) in M.alloc (| - Value.StructRecord - "core::slice::iter::IterMut" - [ - ("ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "new_unchecked", - [] - |), - [ M.read (| ptr |) ] - |)); - ("end_or_len", M.read (| end_or_len |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::IterMut" + [ + ("ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "new_unchecked", + [] + |), + [ M.read (| ptr |) ] + |))); + ("end_or_len", A.to_value (M.read (| end_or_len |))); + ("_marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -647,7 +664,7 @@ Module slice. unsafe { from_raw_parts_mut(self.ptr.as_ptr(), len!(self)) } } *) - Definition into_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -674,7 +691,7 @@ Module slice. |); M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -757,7 +774,7 @@ Module slice. self.make_slice() } *) - Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -786,7 +803,7 @@ Module slice. unsafe { from_raw_parts_mut(self.ptr.as_ptr(), len!(self)) } } *) - Definition as_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -813,7 +830,7 @@ Module slice. |); M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -900,7 +917,7 @@ Module slice. self.as_slice() } *) - Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -949,20 +966,22 @@ Module slice. Self { v: slice, pred, finished: false } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ slice; pred ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let pred := M.alloc (| pred |) in - Value.StructRecord - "core::slice::iter::Split" - [ - ("v", M.read (| slice |)); - ("pred", M.read (| pred |)); - ("finished", Value.Bool false) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::Split" + [ + ("v", A.to_value (M.read (| slice |))); + ("pred", A.to_value (M.read (| pred |))); + ("finished", A.to_value (M.of_value (| Value.Bool false |))) + ] + |))) | _, _ => M.impossible end. @@ -975,7 +994,7 @@ Module slice. if self.finished { &[] } else { &self.v } } *) - Definition as_slice (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -983,7 +1002,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -996,7 +1015,8 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) |))); fun γ => ltac:(M.monadic @@ -1028,7 +1048,7 @@ Module slice. f.debug_struct("Split").field("v", &self.v).field("finished", &self.finished).finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -1063,27 +1083,29 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Split" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Split" |) |) ] |) |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Split", "v" - |)) + |) + |) ] |); - M.read (| Value.String "finished" |); + M.read (| M.of_value (| Value.String "finished" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Split", "finished" - |)) + |) + |) ] |) ] @@ -1108,43 +1130,48 @@ Module slice. Split { v: self.v, pred: self.pred.clone(), finished: self.finished } } *) - Definition clone (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::Split" - [ - ("v", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Split", - "v" - |) - |)); - ("pred", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Split", - "pred" - |) - ] - |)); - ("finished", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Split", - "finished" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::Split" + [ + ("v", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Split", + "v" + |) + |))); + ("pred", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Split", + "pred" + |) + ] + |))); + ("finished", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Split", + "finished" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -1180,7 +1207,7 @@ Module slice. } } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -1191,7 +1218,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1207,11 +1234,15 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -1247,8 +1278,8 @@ Module slice. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1272,13 +1303,16 @@ Module slice. "core::slice::iter::Split", "pred" |); - Value.Tuple [ M.read (| x |) ] + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -1308,35 +1342,40 @@ Module slice. let idx := M.copy (| γ0_0 |) in let ret := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Split", - "v" - |) - |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| idx |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Split", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| idx |))) ] + |) + ] + |)) + ] + |) |) in let _ := M.write (| @@ -1365,15 +1404,19 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - BinOp.Panic.add (| - M.read (| idx |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| idx |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in @@ -1396,7 +1439,7 @@ Module slice. } } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -1404,7 +1447,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1417,44 +1460,56 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 1; - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Split", - "v" - |) - |) + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Split", + "v" + |) + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |)) ] - |), - Value.Integer Integer.Usize 1 - |) - ] - ] + |)) + ] + |) |))) ] |) @@ -1495,7 +1550,7 @@ Module slice. } } *) - Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -1506,7 +1561,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1522,11 +1577,15 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -1562,8 +1621,8 @@ Module slice. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1587,13 +1646,16 @@ Module slice. "core::slice::iter::Split", "pred" |); - Value.Tuple [ M.read (| x |) ] + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -1623,41 +1685,48 @@ Module slice. let idx := M.copy (| γ0_0 |) in let ret := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Split", - "v" - |) - |); - Value.StructRecord - "core::ops::range::RangeFrom" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), [ - ("start", - BinOp.Panic.add (| - M.read (| idx |), - Value.Integer Integer.Usize 1 - |)) - ] - ] - |) - ] + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Split", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| idx |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) + ] + |)) + ] + |) |) in let _ := M.write (| @@ -1686,9 +1755,11 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| idx |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| idx |))) ] + |) ] |) |) in @@ -1722,7 +1793,7 @@ Module slice. } } *) - Definition finish (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -1730,7 +1801,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1742,7 +1813,9 @@ Module slice. "finished" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -1752,20 +1825,23 @@ Module slice. "core::slice::iter::Split", "finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Split", - "v" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Split", + "v" + |) + |)) + ] + |) |))) ] |) @@ -1816,7 +1892,7 @@ Module slice. Self { v: slice, pred, finished } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ slice; pred ] => @@ -1836,13 +1912,15 @@ Module slice. |) |) in M.alloc (| - Value.StructRecord - "core::slice::iter::SplitInclusive" - [ - ("v", M.read (| slice |)); - ("pred", M.read (| pred |)); - ("finished", M.read (| finished |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::SplitInclusive" + [ + ("v", A.to_value (M.read (| slice |))); + ("pred", A.to_value (M.read (| pred |))); + ("finished", A.to_value (M.read (| finished |))) + ] + |) |) |))) | _, _ => M.impossible @@ -1865,7 +1943,7 @@ Module slice. .finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -1900,27 +1978,32 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SplitInclusive" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SplitInclusive" |) |) + ] |) |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::SplitInclusive", "v" - |)) + |) + |) ] |); - M.read (| Value.String "finished" |); + M.read (| M.of_value (| Value.String "finished" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::SplitInclusive", "finished" - |)) + |) + |) ] |) ] @@ -1946,43 +2029,48 @@ Module slice. SplitInclusive { v: self.v, pred: self.pred.clone(), finished: self.finished } } *) - Definition clone (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::SplitInclusive" - [ - ("v", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitInclusive", - "v" - |) - |)); - ("pred", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitInclusive", - "pred" - |) - ] - |)); - ("finished", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitInclusive", - "finished" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::SplitInclusive" + [ + ("v", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitInclusive", + "v" + |) + |))); + ("pred", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", P, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitInclusive", + "pred" + |) + ] + |))); + ("finished", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitInclusive", + "finished" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -2019,7 +2107,7 @@ Module slice. ret } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -2030,7 +2118,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2046,11 +2134,15 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let idx := @@ -2103,8 +2195,8 @@ Module slice. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2128,17 +2220,20 @@ Module slice. "core::slice::iter::SplitInclusive", "pred" |); - Value.Tuple [ M.read (| x |) ] + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2149,13 +2244,15 @@ Module slice. ltac:(M.monadic (let idx := M.copy (| γ |) in BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.call_closure (| @@ -2179,16 +2276,16 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| idx |)) - (M.call_closure (| + BinOp.Pure.eq (| + M.read (| idx |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -2203,7 +2300,8 @@ Module slice. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2214,40 +2312,48 @@ Module slice. "core::slice::iter::SplitInclusive", "finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ret := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitInclusive", - "v" - |) - |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| idx |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitInclusive", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| idx |))) ] + |) + ] + |)) + ] + |) |) in let _ := M.write (| @@ -2272,9 +2378,11 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| idx |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| idx |))) ] + |) ] |) |) in @@ -2296,7 +2404,7 @@ Module slice. } } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -2304,7 +2412,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2317,47 +2425,61 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 1; - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), - [ - Value.Integer Integer.Usize 1; - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitInclusive", - "v" - |) - |) - ] - |) - ] - |) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::cmp::max", + [ Ty.path "usize" ] + |), + [ + M.of_value (| Value.Integer 1 |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitInclusive", + "v" + |) + |) + ] + |) + ] + |)) + ] + |)) + ] + |) |))) ] |) @@ -2402,7 +2524,7 @@ Module slice. ret } *) - Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -2413,7 +2535,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2429,17 +2551,21 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let remainder := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2469,7 +2595,10 @@ Module slice. Value.Bool true |) in M.alloc (| - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |))); fun γ => ltac:(M.monadic @@ -2494,52 +2623,56 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitInclusive", - "v" - |) - |) - ] - |), - Value.Integer Integer.Usize 1 - |)) - ] - ] - |) - |))) - ] - |) - |) in - let idx := - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], - "unwrap_or", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], - "map", - [ - Ty.path "usize"; - Ty.function [ Ty.tuple [ Ty.path "usize" ] ] (Ty.path "usize") + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitInclusive", + "v" + |) + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) + ] + |) + |))) + ] + |) + |) in + let idx := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], + "map", + [ + Ty.path "usize"; + Ty.function [ Ty.tuple [ Ty.path "usize" ] ] (Ty.path "usize") ] |), [ @@ -2566,8 +2699,8 @@ Module slice. [ M.read (| remainder |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2591,17 +2724,20 @@ Module slice. "core::slice::iter::SplitInclusive", "pred" |); - Value.Tuple [ M.read (| x |) ] + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2612,29 +2748,34 @@ Module slice. ltac:(M.monadic (let idx := M.copy (| γ |) in BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| idx |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| idx |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2645,40 +2786,48 @@ Module slice. "core::slice::iter::SplitInclusive", "finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ret := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ Ty.apply (Ty.path "core::ops::range::RangeFrom") [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitInclusive", - "v" - |) - |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| idx |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitInclusive", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| idx |))) ] + |) + ] + |)) + ] + |) |) in let _ := M.write (| @@ -2703,9 +2852,11 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| idx |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| idx |))) ] + |) ] |) |) in @@ -2758,20 +2909,22 @@ Module slice. Self { v: slice, pred, finished: false } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ slice; pred ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let pred := M.alloc (| pred |) in - Value.StructRecord - "core::slice::iter::SplitMut" - [ - ("v", M.read (| slice |)); - ("pred", M.read (| pred |)); - ("finished", Value.Bool false) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::SplitMut" + [ + ("v", A.to_value (M.read (| slice |))); + ("pred", A.to_value (M.read (| pred |))); + ("finished", A.to_value (M.of_value (| Value.Bool false |))) + ] + |))) | _, _ => M.impossible end. @@ -2789,7 +2942,7 @@ Module slice. f.debug_struct("SplitMut").field("v", &self.v).field("finished", &self.finished).finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -2824,27 +2977,30 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SplitMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "SplitMut" |) |) + ] |) |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::SplitMut", "v" - |)) + |) + |) ] |); - M.read (| Value.String "finished" |); + M.read (| M.of_value (| Value.String "finished" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::SplitMut", "finished" - |)) + |) + |) ] |) ] @@ -2875,7 +3031,7 @@ Module slice. } } *) - Definition finish (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -2883,7 +3039,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2895,7 +3051,9 @@ Module slice. "finished" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -2905,26 +3063,30 @@ Module slice. "core::slice::iter::SplitMut", "finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| - "core::mem::take", - [ Ty.apply (Ty.path "&mut") [ Ty.apply (Ty.path "slice") [ T ] ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitMut", - "v" - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::mem::take", + [ Ty.apply (Ty.path "&mut") [ Ty.apply (Ty.path "slice") [ T ] ] + ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitMut", + "v" + |) + ] + |)) + ] + |) |))) ] |) @@ -2970,7 +3132,7 @@ Module slice. } } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -2981,7 +3143,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2997,11 +3159,15 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -3037,8 +3203,8 @@ Module slice. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3062,13 +3228,16 @@ Module slice. "core::slice::iter::SplitMut", "pred" |); - Value.Tuple [ M.read (| x |) ] + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -3123,8 +3292,9 @@ Module slice. [ M.read (| tmp |); BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -3146,29 +3316,34 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::IndexMut", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index_mut", - [] - |), - [ - M.read (| head |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| idx |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index_mut", + [] + |), + [ + M.read (| head |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| idx |))) ] + |) + ] + |)) + ] + |) |))) ] |))) @@ -3190,7 +3365,7 @@ Module slice. } } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -3198,7 +3373,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3211,44 +3386,56 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 1; - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitMut", - "v" - |) - |) + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitMut", + "v" + |) + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |)) ] - |), - Value.Integer Integer.Usize 1 - |) - ] - ] + |)) + ] + |) |))) ] |) @@ -3296,7 +3483,7 @@ Module slice. } } *) - Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -3307,7 +3494,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3323,11 +3510,15 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let idx_opt := @@ -3372,8 +3563,8 @@ Module slice. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3391,12 +3582,18 @@ Module slice. "call_mut", [] |), - [ M.read (| pred |); Value.Tuple [ M.read (| x |) ] ] + [ + M.read (| pred |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -3471,37 +3668,46 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::IndexMut", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index_mut", - [] - |), - [ - M.read (| tail |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] - ] - |) - ] - |))) - ] - |))) - ] - |) - |))) - |))) - | _, _ => M.impossible + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index_mut", + [] + |), + [ + M.read (| tail |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |)) + ] + |) + |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible end. Axiom Implements : @@ -3548,7 +3754,7 @@ Module slice. Self { v: slice, pred, finished } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ slice; pred ] => @@ -3568,13 +3774,15 @@ Module slice. |) |) in M.alloc (| - Value.StructRecord - "core::slice::iter::SplitInclusiveMut" - [ - ("v", M.read (| slice |)); - ("pred", M.read (| pred |)); - ("finished", M.read (| finished |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::SplitInclusiveMut" + [ + ("v", A.to_value (M.read (| slice |))); + ("pred", A.to_value (M.read (| pred |))); + ("finished", A.to_value (M.read (| finished |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3597,7 +3805,7 @@ Module slice. .finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -3632,27 +3840,32 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SplitInclusiveMut" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SplitInclusiveMut" |) |) + ] |) |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::SplitInclusiveMut", "v" - |)) + |) + |) ] |); - M.read (| Value.String "finished" |); + M.read (| M.of_value (| Value.String "finished" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::SplitInclusiveMut", "finished" - |)) + |) + |) ] |) ] @@ -3698,7 +3911,7 @@ Module slice. Some(head) } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -3709,7 +3922,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3725,11 +3938,15 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let idx_opt := @@ -3774,8 +3991,8 @@ Module slice. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3793,12 +4010,18 @@ Module slice. "call_mut", [] |), - [ M.read (| pred |); Value.Tuple [ M.read (| x |) ] ] + [ + M.read (| pred |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -3823,8 +4046,8 @@ Module slice. |), [ M.read (| idx_opt |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3835,13 +4058,15 @@ Module slice. ltac:(M.monadic (let idx := M.copy (| γ |) in BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.call_closure (| @@ -3865,16 +4090,16 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| idx |)) - (M.call_closure (| + BinOp.Pure.eq (| + M.read (| idx |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -3889,7 +4114,8 @@ Module slice. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3900,10 +4126,10 @@ Module slice. "core::slice::iter::SplitInclusiveMut", "finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let tmp := @@ -3950,7 +4176,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| head |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| head |)) ] + |) |))) ] |) @@ -3971,7 +4201,7 @@ Module slice. } } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -3979,7 +4209,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3992,47 +4222,61 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 1; - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), - [ - Value.Integer Integer.Usize 1; - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitInclusiveMut", - "v" - |) - |) - ] - |) - ] - |) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::cmp::max", + [ Ty.path "usize" ] + |), + [ + M.of_value (| Value.Integer 1 |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitInclusiveMut", + "v" + |) + |) + ] + |) + ] + |)) + ] + |)) + ] + |) |))) ] |) @@ -4086,7 +4330,7 @@ Module slice. Some(tail) } *) - Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -4097,7 +4341,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4113,17 +4357,21 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let idx_opt := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4152,7 +4400,9 @@ Module slice. M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let pred := @@ -4185,30 +4435,34 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::SplitInclusiveMut", - "v" - |) - |) - ] - |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::SplitInclusiveMut", + "v" + |) + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in @@ -4236,8 +4490,8 @@ Module slice. [ M.read (| remainder |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4258,13 +4512,17 @@ Module slice. |), [ M.read (| pred |); - Value.Tuple [ M.read (| x |) ] + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| x |)) ] + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -4291,8 +4549,8 @@ Module slice. |), [ M.read (| idx_opt |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -4303,29 +4561,34 @@ Module slice. ltac:(M.monadic (let idx := M.copy (| γ |) in BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| idx |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| idx |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4336,10 +4599,10 @@ Module slice. "core::slice::iter::SplitInclusiveMut", "finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let tmp := @@ -4386,7 +4649,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| tail |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tail |)) ] + |) |))) ] |) @@ -4433,26 +4700,29 @@ Module slice. Self { inner: Split::new(slice, pred) } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ slice; pred ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let pred := M.alloc (| pred |) in - Value.StructRecord - "core::slice::iter::RSplit" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::Split") [ T; P ], - "new", - [] - |), - [ M.read (| slice |); M.read (| pred |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::RSplit" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::Split") [ T; P ], + "new", + [] + |), + [ M.read (| slice |); M.read (| pred |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4473,7 +4743,7 @@ Module slice. .finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -4508,13 +4778,13 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "RSplit" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RSplit" |) |) ] |) |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RSplit", @@ -4522,13 +4792,14 @@ Module slice. |), "core::slice::iter::Split", "v" - |)) + |) + |) ] |); - M.read (| Value.String "finished" |); + M.read (| M.of_value (| Value.String "finished" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RSplit", @@ -4536,7 +4807,8 @@ Module slice. |), "core::slice::iter::Split", "finished" - |)) + |) + |) ] |) ] @@ -4562,33 +4834,36 @@ Module slice. RSplit { inner: self.inner.clone() } } *) - Definition clone (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::RSplit" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::slice::iter::Split") [ T; P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::RSplit", - "inner" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::RSplit" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::slice::iter::Split") [ T; P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::RSplit", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4614,7 +4889,7 @@ Module slice. self.inner.next_back() } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -4644,7 +4919,7 @@ Module slice. self.inner.size_hint() } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -4692,7 +4967,7 @@ Module slice. self.inner.next() } *) - Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -4735,7 +5010,7 @@ Module slice. self.inner.finish() } *) - Definition finish (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -4798,26 +5073,29 @@ Module slice. Self { inner: SplitMut::new(slice, pred) } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ slice; pred ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let pred := M.alloc (| pred |) in - Value.StructRecord - "core::slice::iter::RSplitMut" - [ - ("inner", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::SplitMut") [ T; P ], - "new", - [] - |), - [ M.read (| slice |); M.read (| pred |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::RSplitMut" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::SplitMut") [ T; P ], + "new", + [] + |), + [ M.read (| slice |); M.read (| pred |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4838,7 +5116,7 @@ Module slice. .finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -4873,13 +5151,14 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "RSplitMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RSplitMut" |) |) + ] |) |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RSplitMut", @@ -4887,13 +5166,14 @@ Module slice. |), "core::slice::iter::SplitMut", "v" - |)) + |) + |) ] |); - M.read (| Value.String "finished" |); + M.read (| M.of_value (| Value.String "finished" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RSplitMut", @@ -4901,7 +5181,8 @@ Module slice. |), "core::slice::iter::SplitMut", "finished" - |)) + |) + |) ] |) ] @@ -4927,7 +5208,7 @@ Module slice. self.inner.finish() } *) - Definition finish (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition finish (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -4974,7 +5255,7 @@ Module slice. self.inner.next_back() } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -5004,7 +5285,7 @@ Module slice. self.inner.size_hint() } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -5052,7 +5333,7 @@ Module slice. self.inner.next() } *) - Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -5111,7 +5392,7 @@ Module slice. Ty.apply (Ty.path "core::slice::iter::GenericSplitN") [ I ]. (* Debug *) - Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; f ] => @@ -5126,25 +5407,27 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "GenericSplitN" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "GenericSplitN" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::GenericSplitN", "iter" - |)); - M.read (| Value.String "count" |); + |) + |); + M.read (| M.of_value (| Value.String "count" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::GenericSplitN", "count" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5181,7 +5464,7 @@ Module slice. } } *) - Definition next (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self ] => @@ -5198,18 +5481,14 @@ Module slice. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 0 - |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 1 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -5219,7 +5498,11 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| M.call_closure (| @@ -5250,7 +5533,11 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| M.call_closure (| @@ -5285,7 +5572,7 @@ Module slice. ) } *) - Definition size_hint (T I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T I in match τ, α with | [], [ self ] => @@ -5319,35 +5606,13 @@ Module slice. let lower := M.copy (| γ0_0 |) in let upper_opt := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::GenericSplitN", - "count" - |) - |); - M.read (| lower |) - ] - |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], - "map_or", - [ - Ty.path "usize"; - Ty.function [ Ty.tuple [ Ty.path "usize" ] ] (Ty.path "usize") - ] - |), + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), [ - M.read (| upper_opt |); M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5355,41 +5620,75 @@ Module slice. "count" |) |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let upper := M.copy (| γ |) in - M.call_closure (| - M.get_function (| - "core::cmp::min", - [ Ty.path "usize" ] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::GenericSplitN", - "count" - |) - |); - M.read (| upper |) - ] - |))) - ] - |) - | _ => M.impossible (||) - end)) + M.read (| lower |) ] - |) - ] - ] + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ], + "map_or", + [ + Ty.path "usize"; + Ty.function + [ Ty.tuple [ Ty.path "usize" ] ] + (Ty.path "usize") + ] + |), + [ + M.read (| upper_opt |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::GenericSplitN", + "count" + |) + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let upper := M.copy (| γ |) in + M.call_closure (| + M.get_function (| + "core::cmp::min", + [ Ty.path "usize" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::GenericSplitN", + "count" + |) + |); + M.read (| upper |) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |)) + ] + |)) + ] + |) |))) ] |) @@ -5433,21 +5732,29 @@ Module slice. Self { inner: GenericSplitN { iter: s, count: n } } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ s; n ] => ltac:(M.monadic (let s := M.alloc (| s |) in let n := M.alloc (| n |) in - Value.StructRecord - "core::slice::iter::SplitN" - [ - ("inner", - Value.StructRecord - "core::slice::iter::GenericSplitN" - [ ("iter", M.read (| s |)); ("count", M.read (| n |)) ]) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::SplitN" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructRecord + "core::slice::iter::GenericSplitN" + [ + ("iter", A.to_value (M.read (| s |))); + ("count", A.to_value (M.read (| n |))) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5465,7 +5772,7 @@ Module slice. f.debug_struct("SplitN").field("inner", &self.inner).finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -5493,17 +5800,18 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SplitN" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "SplitN" |) |) ] |) |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::SplitN", "inner" - |)) + |) + |) ] |) ] @@ -5542,21 +5850,29 @@ Module slice. Self { inner: GenericSplitN { iter: s, count: n } } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ s; n ] => ltac:(M.monadic (let s := M.alloc (| s |) in let n := M.alloc (| n |) in - Value.StructRecord - "core::slice::iter::RSplitN" - [ - ("inner", - Value.StructRecord - "core::slice::iter::GenericSplitN" - [ ("iter", M.read (| s |)); ("count", M.read (| n |)) ]) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::RSplitN" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructRecord + "core::slice::iter::GenericSplitN" + [ + ("iter", A.to_value (M.read (| s |))); + ("count", A.to_value (M.read (| n |))) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5574,7 +5890,7 @@ Module slice. f.debug_struct("RSplitN").field("inner", &self.inner).finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -5602,17 +5918,18 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "RSplitN" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RSplitN" |) |) ] |) |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RSplitN", "inner" - |)) + |) + |) ] |) ] @@ -5651,21 +5968,29 @@ Module slice. Self { inner: GenericSplitN { iter: s, count: n } } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ s; n ] => ltac:(M.monadic (let s := M.alloc (| s |) in let n := M.alloc (| n |) in - Value.StructRecord - "core::slice::iter::SplitNMut" - [ - ("inner", - Value.StructRecord - "core::slice::iter::GenericSplitN" - [ ("iter", M.read (| s |)); ("count", M.read (| n |)) ]) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::SplitNMut" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructRecord + "core::slice::iter::GenericSplitN" + [ + ("iter", A.to_value (M.read (| s |))); + ("count", A.to_value (M.read (| n |))) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5683,7 +6008,7 @@ Module slice. f.debug_struct("SplitNMut").field("inner", &self.inner).finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -5711,17 +6036,18 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SplitNMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "SplitNMut" |) |) ] |) |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::SplitNMut", "inner" - |)) + |) + |) ] |) ] @@ -5760,21 +6086,29 @@ Module slice. Self { inner: GenericSplitN { iter: s, count: n } } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ s; n ] => ltac:(M.monadic (let s := M.alloc (| s |) in let n := M.alloc (| n |) in - Value.StructRecord - "core::slice::iter::RSplitNMut" - [ - ("inner", - Value.StructRecord - "core::slice::iter::GenericSplitN" - [ ("iter", M.read (| s |)); ("count", M.read (| n |)) ]) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::RSplitNMut" + [ + ("inner", + A.to_value + (M.of_value (| + Value.StructRecord + "core::slice::iter::GenericSplitN" + [ + ("iter", A.to_value (M.read (| s |))); + ("count", A.to_value (M.read (| n |))) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5792,7 +6126,7 @@ Module slice. f.debug_struct("RSplitNMut").field("inner", &self.inner).finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -5820,17 +6154,18 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "RSplitNMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RSplitNMut" |) |) ] |) |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RSplitNMut", "inner" - |)) + |) + |) ] |) ] @@ -5862,7 +6197,7 @@ Module slice. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::slice::iter::Windows") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -5877,25 +6212,27 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "Windows" |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "Windows" |) |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Windows", "v" - |)); - M.read (| Value.String "size" |); + |) + |); + M.read (| M.of_value (| Value.String "size" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Windows", "size" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5918,16 +6255,18 @@ Module slice. Self { v: slice, size } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice; size ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let size := M.alloc (| size |) in - Value.StructRecord - "core::slice::iter::Windows" - [ ("v", M.read (| slice |)); ("size", M.read (| size |)) ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::Windows" + [ ("v", A.to_value (M.read (| slice |))); ("size", A.to_value (M.read (| size |))) ] + |))) | _, _ => M.impossible end. @@ -5944,32 +6283,36 @@ Module slice. Windows { v: self.v, size: self.size } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::Windows" - [ - ("v", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Windows", - "v" - |) - |)); - ("size", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Windows", - "size" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::Windows" + [ + ("v", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Windows", + "v" + |) + |))); + ("size", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Windows", + "size" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -6000,7 +6343,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6008,15 +6351,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", @@ -6031,8 +6374,8 @@ Module slice. |) |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -6047,61 +6390,70 @@ Module slice. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let ret := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Windows", - "v" - |) - |); - Value.StructRecord - "core::ops::range::RangeTo" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), [ - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "get", - [] - |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Windows", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Windows", - "size" - |) - |) + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "get", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Windows", + "size" + |) + |) + ] + |))) ] - |)) + |) ] - ] - |) - ] + |)) + ] + |) |) in let _ := M.write (| @@ -6127,9 +6479,11 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.of_value (| Value.Integer 1 |))) ] + |) ] |) |) in @@ -6150,7 +6504,7 @@ Module slice. } } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6158,15 +6512,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", @@ -6181,8 +6535,8 @@ Module slice. |) |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -6197,24 +6551,32 @@ Module slice. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let size := M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -6248,15 +6610,22 @@ Module slice. ] |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| - Value.Tuple - [ - M.read (| size |); - Value.StructTuple "core::option::Option::Some" [ M.read (| size |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| size |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| size |)) ] + |)) + ] + |) |))) ] |) @@ -6269,7 +6638,7 @@ Module slice. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6301,7 +6670,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -6342,7 +6711,7 @@ Module slice. let end_ := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6350,9 +6719,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.gt - (M.read (| end_ |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| end_ |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -6367,7 +6736,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -6383,9 +6753,14 @@ Module slice. "core::slice::iter::Windows", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let nth := @@ -6410,9 +6785,14 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| n |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| n |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |) in @@ -6443,20 +6823,28 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - BinOp.Panic.add (| - M.read (| n |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| nth |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth |)) ] + |) |))) ] |))) @@ -6476,7 +6864,7 @@ Module slice. } } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6484,15 +6872,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", @@ -6507,8 +6895,8 @@ Module slice. |) |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -6523,15 +6911,19 @@ Module slice. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let start := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -6567,35 +6959,40 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::slice::iter::Windows", - "v" - |) - |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| start |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::slice::iter::Windows", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| start |))) ] + |) + ] + |)) + ] + |) |))) ] |) @@ -6612,7 +7009,7 @@ Module slice. unsafe { from_raw_parts(self.v.as_ptr().add(idx), self.size.get()) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -6697,7 +7094,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6705,15 +7102,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", @@ -6728,8 +7125,8 @@ Module slice. |) |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -6744,79 +7141,89 @@ Module slice. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let ret := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Windows", - "v" - |) - |); - Value.StructRecord - "core::ops::range::RangeFrom" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), [ - ("start", - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Windows", - "v" - |) - |) - ] - |), - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "get", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Windows", - "size" - |) - |) - ] - |) - |)) + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Windows", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Windows", + "v" + |) + |) + ] + |), + M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "get", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Windows", + "size" + |) + |) + ] + |) + |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |) in let _ := M.write (| @@ -6841,31 +7248,35 @@ Module slice. "core::slice::iter::Windows", "v" |) - |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Windows", - "v" - |) - |) - ] - |), - Value.Integer Integer.Usize 1 - |)) - ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Windows", + "v" + |) + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in @@ -6889,7 +7300,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -6926,7 +7337,7 @@ Module slice. let end_ := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6934,9 +7345,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt - (M.read (| end_ |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| end_ |), + M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", @@ -6951,7 +7362,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -6967,9 +7379,14 @@ Module slice. "core::slice::iter::Windows", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let ret := @@ -6994,31 +7411,35 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - BinOp.Panic.sub (| - M.read (| end_ |), - M.call_closure (| - M.get_associated_function (| - Ty.path "core::num::nonzero::NonZeroUsize", - "get", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Windows", - "size" - |) + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| end_ |), + M.call_closure (| + M.get_associated_function (| + Ty.path "core::num::nonzero::NonZeroUsize", + "get", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Windows", + "size" + |) + |) + ] |) - ] - |) - |)); - ("end_", M.read (| end_ |)) - ] + |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |) in @@ -7049,20 +7470,28 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.sub (| - M.read (| end_ |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| end_ |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| ret |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| ret |)) ] + |) |))) ] |))) @@ -7138,9 +7567,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -7167,7 +7596,7 @@ Module slice. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::slice::iter::Chunks") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -7182,25 +7611,27 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "Chunks" |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "Chunks" |) |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Chunks", "v" - |)); - M.read (| Value.String "chunk_size" |); + |) + |); + M.read (| M.of_value (| Value.String "chunk_size" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Chunks", "chunk_size" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -7223,16 +7654,21 @@ Module slice. Self { v: slice, chunk_size: size } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice; size ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let size := M.alloc (| size |) in - Value.StructRecord - "core::slice::iter::Chunks" - [ ("v", M.read (| slice |)); ("chunk_size", M.read (| size |)) ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::Chunks" + [ + ("v", A.to_value (M.read (| slice |))); + ("chunk_size", A.to_value (M.read (| size |))) + ] + |))) | _, _ => M.impossible end. @@ -7249,32 +7685,36 @@ Module slice. Chunks { v: self.v, chunk_size: self.chunk_size } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::Chunks" - [ - ("v", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Chunks", - "v" - |) - |)); - ("chunk_size", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::Chunks", - "chunk_size" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::Chunks" + [ + ("v", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Chunks", + "v" + |) + |))); + ("chunk_size", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::Chunks", + "chunk_size" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -7306,7 +7746,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -7314,7 +7754,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7339,7 +7779,9 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let chunksz := @@ -7410,7 +7852,11 @@ Module slice. M.read (| snd |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| fst |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| fst |)) ] + |) |))) ] |))) @@ -7432,7 +7878,7 @@ Module slice. } } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -7440,7 +7886,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7466,19 +7912,25 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -7507,6 +7959,7 @@ Module slice. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -7535,16 +7988,17 @@ Module slice. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rem |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| rem |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7553,8 +8007,9 @@ Module slice. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic n) @@ -7562,11 +8017,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))) ] |) @@ -7579,7 +8041,7 @@ Module slice. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -7615,7 +8077,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -7647,7 +8109,7 @@ Module slice. let start := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7655,9 +8117,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ge - (M.read (| start |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| start |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -7672,7 +8134,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -7688,9 +8151,14 @@ Module slice. "core::slice::iter::Chunks", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let end_ := @@ -7797,10 +8265,14 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |) in @@ -7831,14 +8303,20 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| end_ |))) ] + |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| nth |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth |)) ] + |) |))) ] |))) @@ -7858,7 +8336,7 @@ Module slice. } } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -7866,7 +8344,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7891,14 +8369,19 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.div (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -7915,7 +8398,7 @@ Module slice. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |), M.read (| M.SubPointer.get_struct_record_field (| @@ -7935,35 +8418,40 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::slice::iter::Chunks", - "v" - |) - |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| start |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::slice::iter::Chunks", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| start |))) ] + |) + ] + |)) + ] + |) |))) ] |) @@ -7987,7 +8475,7 @@ Module slice. } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -7998,6 +8486,7 @@ Module slice. let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, M.read (| idx |), M.read (| M.SubPointer.get_struct_record_field (| @@ -8127,7 +8616,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8135,7 +8624,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8160,12 +8649,15 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let remainder := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -8194,16 +8686,17 @@ Module slice. let chunksz := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| remainder |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + M.read (| remainder |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8238,6 +8731,7 @@ Module slice. |) |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -8276,7 +8770,11 @@ Module slice. M.read (| fst |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| snd |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| snd |)) ] + |) |))) ] |))) @@ -8304,7 +8802,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -8328,12 +8826,13 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in + 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 _ := M.write (| @@ -8342,16 +8841,25 @@ Module slice. "core::slice::iter::Chunks", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |), + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |), M.read (| n |) |), M.read (| @@ -8456,9 +8964,14 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |) in @@ -8486,14 +8999,20 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| start |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| start |))) ] + |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| nth_back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth_back |)) ] + |) |))) ] |) @@ -8567,9 +9086,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -8598,7 +9117,7 @@ Module slice. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::slice::iter::ChunksMut") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -8613,33 +9132,36 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "ChunksMut" |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "ChunksMut" |) |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksMut", "v" - |)); - M.read (| Value.String "chunk_size" |); + |) + |); + M.read (| M.of_value (| Value.String "chunk_size" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksMut", "chunk_size" - |)); - M.read (| Value.String "_marker" |); + |) + |); + M.read (| M.of_value (| Value.String "_marker" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksMut", "_marker" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -8662,20 +9184,23 @@ Module slice. Self { v: slice, chunk_size: size, _marker: PhantomData } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice; size ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let size := M.alloc (| size |) in - Value.StructRecord - "core::slice::iter::ChunksMut" - [ - ("v", M.read (| slice |)); - ("chunk_size", M.read (| size |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::ChunksMut" + [ + ("v", A.to_value (M.read (| slice |))); + ("chunk_size", A.to_value (M.read (| size |))); + ("_marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -8705,7 +9230,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8713,7 +9238,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8738,7 +9263,9 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let sz := @@ -8809,7 +9336,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| head |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| head |)) ] + |) |))) ] |))) @@ -8831,7 +9362,7 @@ Module slice. } } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8839,7 +9370,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8865,19 +9396,25 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -8906,6 +9443,7 @@ Module slice. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -8934,16 +9472,17 @@ Module slice. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rem |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| rem |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8952,8 +9491,9 @@ Module slice. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic n) @@ -8961,11 +9501,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))) ] |) @@ -8978,7 +9525,7 @@ Module slice. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9018,7 +9565,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -9050,7 +9597,7 @@ Module slice. let start := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9058,9 +9605,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ge - (M.read (| start |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| start |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -9077,7 +9624,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -9093,9 +9641,14 @@ Module slice. "core::slice::iter::ChunksMut", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let end_ := @@ -9243,9 +9796,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| nth |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth |)) ] + |) |))) ] |))) @@ -9270,7 +9825,7 @@ Module slice. } } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9278,7 +9833,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9303,14 +9858,19 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.div (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -9327,7 +9887,7 @@ Module slice. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |), M.read (| M.SubPointer.get_struct_record_field (| @@ -9347,33 +9907,38 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], - "get_unchecked_mut", - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::slice::iter::ChunksMut", - "v" - |) - |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| start |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], + "get_unchecked_mut", + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::slice::iter::ChunksMut", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| start |))) ] + |) + ] + |)) + ] + |) |))) ] |) @@ -9396,7 +9961,7 @@ Module slice. } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -9407,6 +9972,7 @@ Module slice. let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, M.read (| idx |), M.read (| M.SubPointer.get_struct_record_field (| @@ -9533,7 +10099,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9541,7 +10107,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9566,12 +10132,15 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let remainder := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -9600,16 +10169,17 @@ Module slice. let sz := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| remainder |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + M.read (| remainder |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9662,7 +10232,7 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| M.read (| len |), M.read (| sz |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| sz |) |) ] |) |), @@ -9683,7 +10253,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| tail |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tail |)) ] + |) |))) ] |))) @@ -9715,7 +10289,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -9739,12 +10313,13 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in + 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 _ := M.write (| @@ -9753,16 +10328,25 @@ Module slice. "core::slice::iter::ChunksMut", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |), + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |), M.read (| n |) |), M.read (| @@ -9910,9 +10494,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| nth_back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth_back |)) ] + |) |))) ] |))) @@ -9990,9 +10576,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -10045,7 +10631,7 @@ Module slice. Ty.apply (Ty.path "core::slice::iter::ChunksExact") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -10060,33 +10646,36 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "ChunksExact" |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "ChunksExact" |) |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "v" - |)); - M.read (| Value.String "rem" |); + |) + |); + M.read (| M.of_value (| Value.String "rem" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "rem" - |)); - M.read (| Value.String "chunk_size" |); + |) + |); + M.read (| M.of_value (| Value.String "chunk_size" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "chunk_size" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -10114,7 +10703,7 @@ Module slice. Self { v: fst, rem: snd, chunk_size } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice; chunk_size ] => @@ -10125,6 +10714,7 @@ Module slice. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] @@ -10135,6 +10725,7 @@ Module slice. let fst_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] @@ -10161,13 +10752,15 @@ Module slice. let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "core::slice::iter::ChunksExact" - [ - ("v", M.read (| fst |)); - ("rem", M.read (| snd |)); - ("chunk_size", M.read (| chunk_size |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::ChunksExact" + [ + ("v", A.to_value (M.read (| fst |))); + ("rem", A.to_value (M.read (| snd |))); + ("chunk_size", A.to_value (M.read (| chunk_size |))) + ] + |) |))) ] |) @@ -10184,7 +10777,7 @@ Module slice. self.rem } *) - Definition remainder (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10214,40 +10807,45 @@ Module slice. ChunksExact { v: self.v, rem: self.rem, chunk_size: self.chunk_size } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::ChunksExact" - [ - ("v", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::ChunksExact", - "v" - |) - |)); - ("rem", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::ChunksExact", - "rem" - |) - |)); - ("chunk_size", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::ChunksExact", - "chunk_size" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::ChunksExact" + [ + ("v", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::ChunksExact", + "v" + |) + |))); + ("rem", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::ChunksExact", + "rem" + |) + |))); + ("chunk_size", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::ChunksExact", + "chunk_size" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -10279,7 +10877,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10287,15 +10885,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -10310,17 +10908,20 @@ Module slice. |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "chunk_size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -10366,7 +10967,11 @@ Module slice. M.read (| snd |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| fst |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| fst |)) ] + |) |))) ] |))) @@ -10382,7 +10987,7 @@ Module slice. (n, Some(n)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10392,6 +10997,7 @@ Module slice. let n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ @@ -10414,11 +11020,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -10429,7 +11042,7 @@ Module slice. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10461,7 +11074,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -10493,7 +11106,7 @@ Module slice. let start := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10501,9 +11114,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ge - (M.read (| start |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| start |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -10518,7 +11131,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -10534,9 +11148,14 @@ Module slice. "core::slice::iter::ChunksExact", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -10603,7 +11222,7 @@ Module slice. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10629,7 +11248,7 @@ Module slice. unsafe { from_raw_parts(self.v.as_ptr().add(start), self.chunk_size) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -10640,6 +11259,7 @@ Module slice. let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, M.read (| idx |), M.read (| M.SubPointer.get_struct_record_field (| @@ -10723,7 +11343,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10731,15 +11351,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -10754,17 +11374,20 @@ Module slice. |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "chunk_size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -10784,6 +11407,7 @@ Module slice. |) |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -10828,7 +11452,11 @@ Module slice. M.read (| fst |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| snd |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| snd |)) ] + |) |))) ] |))) @@ -10853,7 +11481,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -10877,12 +11505,13 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in + 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 _ := M.write (| @@ -10891,16 +11520,25 @@ Module slice. "core::slice::iter::ChunksExact", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |), + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |), M.read (| n |) |), M.read (| @@ -10915,6 +11553,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| M.SubPointer.get_struct_record_field (| @@ -10943,9 +11582,14 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |) in @@ -10973,14 +11617,20 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| start |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| start |))) ] + |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| nth_back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth_back |)) ] + |) |))) ] |) @@ -11010,7 +11660,7 @@ Module slice. self.v.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11085,9 +11735,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -11118,7 +11768,7 @@ Module slice. Ty.apply (Ty.path "core::slice::iter::ChunksExactMut") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -11133,41 +11783,45 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "ChunksExactMut" |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "ChunksExactMut" |) |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "v" - |)); - M.read (| Value.String "rem" |); + |) + |); + M.read (| M.of_value (| Value.String "rem" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "rem" - |)); - M.read (| Value.String "chunk_size" |); + |) + |); + M.read (| M.of_value (| Value.String "chunk_size" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "chunk_size" - |)); - M.read (| Value.String "_marker" |); + |) + |); + M.read (| M.of_value (| Value.String "_marker" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "_marker" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -11195,7 +11849,7 @@ Module slice. Self { v: fst, rem: snd, chunk_size, _marker: PhantomData } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice; chunk_size ] => @@ -11206,6 +11860,7 @@ Module slice. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] @@ -11216,6 +11871,7 @@ Module slice. let fst_len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] @@ -11242,14 +11898,20 @@ Module slice. let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "core::slice::iter::ChunksExactMut" - [ - ("v", M.read (| fst |)); - ("rem", M.read (| snd |)); - ("chunk_size", M.read (| chunk_size |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::ChunksExactMut" + [ + ("v", A.to_value (M.read (| fst |))); + ("rem", A.to_value (M.read (| snd |))); + ("chunk_size", A.to_value (M.read (| chunk_size |))); + ("_marker", + A.to_value + (M.of_value (| + Value.StructTuple "core::marker::PhantomData" [] + |))) + ] + |) |))) ] |) @@ -11266,7 +11928,7 @@ Module slice. self.rem } *) - Definition into_remainder (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_remainder (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11308,7 +11970,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11316,15 +11978,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -11339,17 +12001,20 @@ Module slice. |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "chunk_size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -11395,7 +12060,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| head |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| head |)) ] + |) |))) ] |))) @@ -11411,7 +12080,7 @@ Module slice. (n, Some(n)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11421,6 +12090,7 @@ Module slice. let n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -11447,11 +12117,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -11462,7 +12139,7 @@ Module slice. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11495,7 +12172,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -11527,7 +12204,7 @@ Module slice. let start := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11535,9 +12212,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ge - (M.read (| start |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| start |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -11554,7 +12231,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -11570,9 +12248,14 @@ Module slice. "core::slice::iter::ChunksExactMut", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -11641,7 +12324,7 @@ Module slice. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11667,7 +12350,7 @@ Module slice. unsafe { from_raw_parts_mut(self.v.as_mut_ptr().add(start), self.chunk_size) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -11678,6 +12361,7 @@ Module slice. let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, M.read (| idx |), M.read (| M.SubPointer.get_struct_record_field (| @@ -11763,7 +12447,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -11771,15 +12455,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -11794,17 +12478,20 @@ Module slice. |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "chunk_size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -11824,6 +12511,7 @@ Module slice. |) |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -11868,7 +12556,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| tail |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tail |)) ] + |) |))) ] |))) @@ -11897,7 +12589,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -11921,12 +12613,13 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in + 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 _ := M.write (| @@ -11935,16 +12628,25 @@ Module slice. "core::slice::iter::ChunksExactMut", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let start := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |), + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |), M.read (| n |) |), M.read (| @@ -11959,6 +12661,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| M.SubPointer.get_struct_record_field (| @@ -11989,7 +12692,10 @@ Module slice. "core::slice::iter::ChunksExactMut", "v" |); - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) ] |); M.read (| end_ |) @@ -12033,9 +12739,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| nth_back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth_back |)) ] + |) |))) ] |))) @@ -12069,7 +12777,7 @@ Module slice. self.v.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -12148,9 +12856,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -12208,7 +12916,7 @@ Module slice. Ty.apply (Ty.path "core::slice::iter::ArrayWindows") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -12223,112 +12931,126 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "ArrayWindows" |); - M.read (| Value.String "slice_head" |); + M.read (| M.of_value (| Value.String "ArrayWindows" |) |); + M.read (| M.of_value (| Value.String "slice_head" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "slice_head" - |)); - M.read (| Value.String "num" |); + |) + |); + M.read (| M.of_value (| Value.String "num" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "num" - |)); - M.read (| Value.String "marker" |); + |) + |); + M.read (| M.of_value (| Value.String "marker" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "marker" |) - |)) + |) + |) ] |))) | _, _ => M.impossible end. - Axiom Implements : - forall (T : Ty.t), - M.IsTraitInstance - "core::fmt::Debug" - (Self T) - (* Trait polymorphic types *) [] - (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ]. - End Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_core_slice_iter_ArrayWindows_T. - - Module Impl_core_clone_Clone_where_core_clone_Clone_T_for_core_slice_iter_ArrayWindows_T. - Definition Self (T : Ty.t) : Ty.t := - Ty.apply (Ty.path "core::slice::iter::ArrayWindows") [ T ]. - - (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := - let Self : Ty.t := Self T in - match τ, α with - | [], [ self ] => - ltac:(M.monadic - (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::ArrayWindows" - [ - ("slice_head", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "*const") [ T ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::ArrayWindows", - "slice_head" - |) - ] - |)); - ("num", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::ArrayWindows", - "num" - |) - ] - |)); - ("marker", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::marker::PhantomData") - [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "array") [ T ] ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::ArrayWindows", - "marker" - |) - ] - |)) - ])) - | _, _ => M.impossible - end. - + Axiom Implements : + forall (T : Ty.t), + M.IsTraitInstance + "core::fmt::Debug" + (Self T) + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ]. + End Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_core_slice_iter_ArrayWindows_T. + + Module Impl_core_clone_Clone_where_core_clone_Clone_T_for_core_slice_iter_ArrayWindows_T. + Definition Self (T : Ty.t) : Ty.t := + Ty.apply (Ty.path "core::slice::iter::ArrayWindows") [ T ]. + + (* Clone *) + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self T in + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "core::slice::iter::ArrayWindows" + [ + ("slice_head", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "*const") [ T ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::ArrayWindows", + "slice_head" + |) + ] + |))); + ("num", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::ArrayWindows", + "num" + |) + ] + |))); + ("marker", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::marker::PhantomData") + [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "array") [ T ] ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::ArrayWindows", + "marker" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + Axiom Implements : forall (T : Ty.t), M.IsTraitInstance @@ -12361,7 +13083,7 @@ Module slice. Self { slice_head: slice.as_ptr(), num: num_windows, marker: PhantomData } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -12378,28 +13100,34 @@ Module slice. [ M.read (| slice |) ] |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "core::slice::iter::N" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in M.alloc (| - Value.StructRecord - "core::slice::iter::ArrayWindows" - [ - ("slice_head", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_ptr", - [] - |), - [ M.read (| slice |) ] - |)); - ("num", M.read (| num_windows |)); - ("marker", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::ArrayWindows" + [ + ("slice_head", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_ptr", + [] + |), + [ M.read (| slice |) ] + |))); + ("num", A.to_value (M.read (| num_windows |))); + ("marker", + A.to_value + (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -12434,7 +13162,7 @@ Module slice. Some(ret) } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -12445,33 +13173,38 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "num" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ret := @@ -12514,7 +13247,7 @@ Module slice. "slice_head" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -12527,9 +13260,19 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ret |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| ret |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -12540,33 +13283,40 @@ Module slice. (self.num, Some(self.num)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::ArrayWindows", - "num" - |) - |); - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "num" |) - |) - ] - ])) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::ArrayWindows", + "num" + |) + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12575,7 +13325,7 @@ Module slice. self.num } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -12607,7 +13357,7 @@ Module slice. Some(ret) } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -12619,22 +13369,23 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "num" |) - |)) - (M.read (| n |)) + |), + M.read (| n |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -12648,13 +13399,17 @@ Module slice. "core::slice::iter::ArrayWindows", "num" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ret := @@ -12707,7 +13462,11 @@ Module slice. "slice_head" |) |); - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) ] |) |) in @@ -12721,11 +13480,22 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ret |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| ret |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -12736,7 +13506,7 @@ Module slice. self.nth(self.num.checked_sub(1)?) } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -12776,7 +13546,7 @@ Module slice. "num" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) ] @@ -12871,7 +13641,7 @@ Module slice. Some(ret) } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -12882,33 +13652,38 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "num" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ret := @@ -12935,6 +13710,7 @@ Module slice. |) |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12942,7 +13718,7 @@ Module slice. "num" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -12958,9 +13734,19 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ret |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| ret |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -12978,7 +13764,7 @@ Module slice. Some(ret) } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -12990,22 +13776,23 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "num" |) - |)) - (M.read (| n |)) + |), + M.read (| n |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13019,13 +13806,17 @@ Module slice. "core::slice::iter::ArrayWindows", "num" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ret := @@ -13052,6 +13843,7 @@ Module slice. |) |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13059,7 +13851,11 @@ Module slice. "num" |) |), - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) |) ] |) @@ -13076,11 +13872,22 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - BinOp.Panic.add (| M.read (| n |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 1 |) + |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ret |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| ret |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -13108,21 +13915,22 @@ Module slice. self.num == 0 } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "num" |) - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -13152,7 +13960,7 @@ Module slice. Ty.apply (Ty.path "core::slice::iter::ArrayChunks") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -13167,25 +13975,27 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "ArrayChunks" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "ArrayChunks" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayChunks", "iter" - |)); - M.read (| Value.String "rem" |); + |) + |); + M.read (| M.of_value (| Value.String "rem" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayChunks", "rem" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -13210,7 +14020,7 @@ Module slice. Self { iter: array_slice.iter(), rem } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -13236,20 +14046,25 @@ Module slice. let array_slice := M.copy (| γ0_0 |) in let rem := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "core::slice::iter::ArrayChunks" - [ - ("iter", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.apply (Ty.path "array") [ T ] ], - "iter", - [] - |), - [ M.read (| array_slice |) ] - |)); - ("rem", M.read (| rem |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::ArrayChunks" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.apply (Ty.path "array") [ T ] ], + "iter", + [] + |), + [ M.read (| array_slice |) ] + |))); + ("rem", A.to_value (M.read (| rem |))) + ] + |) |))) ] |) @@ -13266,7 +14081,7 @@ Module slice. self.rem } *) - Definition remainder (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13296,43 +14111,47 @@ Module slice. ArrayChunks { iter: self.iter.clone(), rem: self.rem } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::ArrayChunks" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::slice::iter::Iter") - [ Ty.apply (Ty.path "array") [ T ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::ArrayChunks", - "iter" - |) - ] - |)); - ("rem", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::ArrayChunks", - "rem" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::ArrayChunks" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.apply (Ty.path "array") [ T ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::ArrayChunks", + "iter" + |) + ] + |))); + ("rem", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::ArrayChunks", + "rem" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -13358,7 +14177,7 @@ Module slice. self.iter.next() } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13388,7 +14207,7 @@ Module slice. self.iter.size_hint() } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13418,7 +14237,7 @@ Module slice. self.iter.count() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13450,7 +14269,7 @@ Module slice. self.iter.nth(n) } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -13482,7 +14301,7 @@ Module slice. self.iter.last() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13516,7 +14335,7 @@ Module slice. unsafe { self.iter.__iterator_get_unchecked(i) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; i ] => @@ -13570,7 +14389,7 @@ Module slice. self.iter.next_back() } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13600,7 +14419,7 @@ Module slice. self.iter.nth_back(n) } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -13649,7 +14468,7 @@ Module slice. self.iter.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13728,9 +14547,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -13759,7 +14578,7 @@ Module slice. Ty.apply (Ty.path "core::slice::iter::ArrayChunksMut") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -13774,25 +14593,27 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "ArrayChunksMut" |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "ArrayChunksMut" |) |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayChunksMut", "iter" - |)); - M.read (| Value.String "rem" |); + |) + |); + M.read (| M.of_value (| Value.String "rem" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayChunksMut", "rem" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -13817,7 +14638,7 @@ Module slice. Self { iter: array_slice.iter_mut(), rem } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice ] => @@ -13843,20 +14664,25 @@ Module slice. let array_slice := M.copy (| γ0_0 |) in let rem := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "core::slice::iter::ArrayChunksMut" - [ - ("iter", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.apply (Ty.path "array") [ T ] ], - "iter_mut", - [] - |), - [ M.read (| array_slice |) ] - |)); - ("rem", M.read (| rem |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::ArrayChunksMut" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.apply (Ty.path "array") [ T ] ], + "iter_mut", + [] + |), + [ M.read (| array_slice |) ] + |))); + ("rem", A.to_value (M.read (| rem |))) + ] + |) |))) ] |) @@ -13873,7 +14699,7 @@ Module slice. self.rem } *) - Definition into_remainder (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_remainder (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13907,7 +14733,7 @@ Module slice. self.iter.next() } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13939,7 +14765,7 @@ Module slice. self.iter.size_hint() } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -13971,7 +14797,7 @@ Module slice. self.iter.count() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -14005,7 +14831,7 @@ Module slice. self.iter.nth(n) } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -14039,7 +14865,7 @@ Module slice. self.iter.last() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -14075,7 +14901,7 @@ Module slice. unsafe { self.iter.__iterator_get_unchecked(i) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; i ] => @@ -14131,7 +14957,7 @@ Module slice. self.iter.next_back() } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -14163,7 +14989,7 @@ Module slice. self.iter.nth_back(n) } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -14214,7 +15040,7 @@ Module slice. self.iter.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -14295,9 +15121,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -14324,7 +15150,7 @@ Module slice. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::slice::iter::RChunks") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -14339,25 +15165,27 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "RChunks" |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "RChunks" |) |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunks", "v" - |)); - M.read (| Value.String "chunk_size" |); + |) + |); + M.read (| M.of_value (| Value.String "chunk_size" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunks", "chunk_size" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -14380,16 +15208,21 @@ Module slice. Self { v: slice, chunk_size: size } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice; size ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let size := M.alloc (| size |) in - Value.StructRecord - "core::slice::iter::RChunks" - [ ("v", M.read (| slice |)); ("chunk_size", M.read (| size |)) ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::RChunks" + [ + ("v", A.to_value (M.read (| slice |))); + ("chunk_size", A.to_value (M.read (| size |))) + ] + |))) | _, _ => M.impossible end. @@ -14406,32 +15239,36 @@ Module slice. RChunks { v: self.v, chunk_size: self.chunk_size } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in - match τ, α with - | [], [ self ] => - ltac:(M.monadic - (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::RChunks" - [ - ("v", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::RChunks", - "v" - |) - |)); - ("chunk_size", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::RChunks", - "chunk_size" - |) - |)) - ])) + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "core::slice::iter::RChunks" + [ + ("v", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::RChunks", + "v" + |) + |))); + ("chunk_size", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::RChunks", + "chunk_size" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -14469,7 +15306,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -14477,7 +15314,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14502,7 +15339,9 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let len := @@ -14556,7 +15395,11 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| M.read (| len |), M.read (| chunksz |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| chunksz |) + |) ] |) |), @@ -14577,7 +15420,11 @@ Module slice. M.read (| fst |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| snd |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| snd |)) ] + |) |))) ] |))) @@ -14599,7 +15446,7 @@ Module slice. } } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -14607,7 +15454,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14633,19 +15480,25 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -14674,6 +15527,7 @@ Module slice. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -14702,16 +15556,17 @@ Module slice. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rem |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| rem |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14720,8 +15575,9 @@ Module slice. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic n) @@ -14729,11 +15585,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))) ] |) @@ -14746,7 +15609,7 @@ Module slice. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -14784,7 +15647,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -14816,7 +15679,7 @@ Module slice. let end_ := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14824,9 +15687,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ge - (M.read (| end_ |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| end_ |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -14841,7 +15704,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -14857,14 +15721,20 @@ Module slice. "core::slice::iter::RChunks", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let end_ := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -14919,7 +15789,7 @@ Module slice. sum)); fun γ => ltac:(M.monadic - (M.alloc (| Value.Integer Integer.Usize 0 |))) + (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -14945,10 +15815,14 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |) in @@ -14979,17 +15853,24 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| start |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| start |))) + ] + |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| nth |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth |)) ] + |) |))) ] |))) @@ -15010,7 +15891,7 @@ Module slice. } } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -15018,7 +15899,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15043,12 +15924,15 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -15077,16 +15961,17 @@ Module slice. let end_ := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| rem |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| rem |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -15103,35 +15988,43 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::slice::iter::RChunks", - "v" - |) - |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ], + "index", + [] + |), [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| end_ |)) + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::slice::iter::RChunks", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -15150,7 +16043,7 @@ Module slice. unsafe { from_raw_parts(self.v.as_ptr().add(start), end - start) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -15161,6 +16054,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ @@ -15174,6 +16068,7 @@ Module slice. ] |), BinOp.Panic.mul (| + Integer.Usize, M.read (| idx |), M.read (| M.SubPointer.get_struct_record_field (| @@ -15204,7 +16099,7 @@ Module slice. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -15244,7 +16139,7 @@ Module slice. M.read (| start |) ] |); - BinOp.Panic.sub (| M.read (| end_ |), M.read (| start |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) ] |) |) @@ -15287,7 +16182,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -15295,7 +16190,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15320,12 +16215,15 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let remainder := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -15354,16 +16252,17 @@ Module slice. let chunksz := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| remainder |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + M.read (| remainder |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -15418,7 +16317,11 @@ Module slice. M.read (| snd |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| fst |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| fst |)) ] + |) |))) ] |))) @@ -15445,7 +16348,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -15469,12 +16372,13 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in + 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 _ := M.write (| @@ -15483,16 +16387,25 @@ Module slice. "core::slice::iter::RChunks", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let offset_from_end := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |), + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |), M.read (| n |) |), M.read (| @@ -15507,6 +16420,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -15560,9 +16474,14 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |) in @@ -15590,14 +16509,20 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| end_ |))) ] + |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| nth_back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth_back |)) ] + |) |))) ] |) @@ -15671,9 +16596,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -15702,7 +16627,7 @@ Module slice. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::slice::iter::RChunksMut") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -15717,33 +16642,36 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "RChunksMut" |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "RChunksMut" |) |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksMut", "v" - |)); - M.read (| Value.String "chunk_size" |); + |) + |); + M.read (| M.of_value (| Value.String "chunk_size" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksMut", "chunk_size" - |)); - M.read (| Value.String "_marker" |); + |) + |); + M.read (| M.of_value (| Value.String "_marker" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksMut", "_marker" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -15766,20 +16694,23 @@ Module slice. Self { v: slice, chunk_size: size, _marker: PhantomData } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice; size ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let size := M.alloc (| size |) in - Value.StructRecord - "core::slice::iter::RChunksMut" - [ - ("v", M.read (| slice |)); - ("chunk_size", M.read (| size |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::RChunksMut" + [ + ("v", A.to_value (M.read (| slice |))); + ("chunk_size", A.to_value (M.read (| size |))); + ("_marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -15814,7 +16745,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -15822,7 +16753,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15847,7 +16778,9 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let sz := @@ -15916,7 +16849,7 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| M.read (| len |), M.read (| sz |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| sz |) |) ] |) |), @@ -15937,7 +16870,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| tail |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tail |)) ] + |) |))) ] |))) @@ -15959,7 +16896,7 @@ Module slice. } } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -15967,7 +16904,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -15993,19 +16930,25 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -16034,6 +16977,7 @@ Module slice. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -16062,16 +17006,17 @@ Module slice. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| rem |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| rem |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16080,8 +17025,9 @@ Module slice. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic n) @@ -16089,11 +17035,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |))) ] |) @@ -16106,7 +17059,7 @@ Module slice. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -16150,7 +17103,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -16182,7 +17135,7 @@ Module slice. let end_ := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16190,9 +17143,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ge - (M.read (| end_ |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| end_ |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -16209,7 +17162,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -16225,14 +17179,20 @@ Module slice. "core::slice::iter::RChunksMut", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let end_ := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -16289,7 +17249,7 @@ Module slice. sum)); fun γ => ltac:(M.monadic - (M.alloc (| Value.Integer Integer.Usize 0 |))) + (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -16335,6 +17295,7 @@ Module slice. [ M.read (| tail |); BinOp.Panic.sub (| + Integer.Usize, M.read (| end_ |), M.read (| start |) |) @@ -16358,9 +17319,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| nth |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth |)) ] + |) |))) ] |))) @@ -16386,7 +17349,7 @@ Module slice. } } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -16394,7 +17357,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16419,12 +17382,15 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -16453,16 +17419,17 @@ Module slice. let end_ := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| rem |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| rem |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16479,32 +17446,41 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], - "get_unchecked_mut", - [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::slice::iter::RChunksMut", - "v" - |) - |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], + "get_unchecked_mut", + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ] + |), [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| end_ |)) + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::slice::iter::RChunksMut", + "v" + |) + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -16524,7 +17500,7 @@ Module slice. unsafe { from_raw_parts_mut(self.v.as_mut_ptr().add(start), end - start) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -16535,6 +17511,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -16552,6 +17529,7 @@ Module slice. ] |), BinOp.Panic.mul (| + Integer.Usize, M.read (| idx |), M.read (| M.SubPointer.get_struct_record_field (| @@ -16582,7 +17560,7 @@ Module slice. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -16622,7 +17600,7 @@ Module slice. M.read (| start |) ] |); - BinOp.Panic.sub (| M.read (| end_ |), M.read (| start |) |) + BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) ] |) |) @@ -16666,7 +17644,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -16674,7 +17652,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -16699,12 +17677,15 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let remainder := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -16733,16 +17714,17 @@ Module slice. let sz := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| remainder |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.ne (| + M.read (| remainder |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16797,7 +17779,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| head |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| head |)) ] + |) |))) ] |))) @@ -16828,7 +17814,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -16852,12 +17838,13 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in + 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 _ := M.write (| @@ -16866,16 +17853,25 @@ Module slice. "core::slice::iter::RChunksMut", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let offset_from_end := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |), + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |), M.read (| n |) |), M.read (| @@ -16890,6 +17886,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -16981,9 +17978,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| nth_back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth_back |)) ] + |) |))) ] |))) @@ -17061,9 +18060,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -17116,7 +18115,7 @@ Module slice. Ty.apply (Ty.path "core::slice::iter::RChunksExact") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -17131,33 +18130,36 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "RChunksExact" |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "RChunksExact" |) |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "v" - |)); - M.read (| Value.String "rem" |); + |) + |); + M.read (| M.of_value (| Value.String "rem" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "rem" - |)); - M.read (| Value.String "chunk_size" |); + |) + |); + M.read (| M.of_value (| Value.String "chunk_size" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "chunk_size" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -17184,7 +18186,7 @@ Module slice. Self { v: snd, rem: fst, chunk_size } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice; chunk_size ] => @@ -17195,6 +18197,7 @@ Module slice. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] @@ -17221,13 +18224,15 @@ Module slice. let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "core::slice::iter::RChunksExact" - [ - ("v", M.read (| snd |)); - ("rem", M.read (| fst |)); - ("chunk_size", M.read (| chunk_size |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::RChunksExact" + [ + ("v", A.to_value (M.read (| snd |))); + ("rem", A.to_value (M.read (| fst |))); + ("chunk_size", A.to_value (M.read (| chunk_size |))) + ] + |) |))) ] |) @@ -17244,7 +18249,7 @@ Module slice. self.rem } *) - Definition remainder (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -17274,40 +18279,45 @@ Module slice. RChunksExact { v: self.v, rem: self.rem, chunk_size: self.chunk_size } } *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::slice::iter::RChunksExact" - [ - ("v", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::RChunksExact", - "v" - |) - |)); - ("rem", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::RChunksExact", - "rem" - |) - |)); - ("chunk_size", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::RChunksExact", - "chunk_size" - |) - |)) - ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::RChunksExact" + [ + ("v", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::RChunksExact", + "v" + |) + |))); + ("rem", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::RChunksExact", + "rem" + |) + |))); + ("chunk_size", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::RChunksExact", + "chunk_size" + |) + |))) + ] + |))) | _, _ => M.impossible end. @@ -17339,7 +18349,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -17347,15 +18357,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -17370,17 +18380,20 @@ Module slice. |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "chunk_size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -17400,6 +18413,7 @@ Module slice. |) |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -17444,7 +18458,11 @@ Module slice. M.read (| fst |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| snd |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| snd |)) ] + |) |))) ] |))) @@ -17460,7 +18478,7 @@ Module slice. (n, Some(n)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -17470,6 +18488,7 @@ Module slice. let n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ @@ -17492,11 +18511,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -17507,7 +18533,7 @@ Module slice. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -17539,7 +18565,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -17571,7 +18597,7 @@ Module slice. let end_ := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -17579,9 +18605,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ge - (M.read (| end_ |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| end_ |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -17596,7 +18622,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -17612,9 +18639,14 @@ Module slice. "core::slice::iter::RChunksExact", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -17634,6 +18666,7 @@ Module slice. |) |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -17699,7 +18732,7 @@ Module slice. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -17726,7 +18759,7 @@ Module slice. unsafe { from_raw_parts(self.v.as_ptr().add(start), self.chunk_size) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -17737,6 +18770,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ @@ -17750,6 +18784,7 @@ Module slice. ] |), BinOp.Panic.mul (| + Integer.Usize, M.read (| idx |), M.read (| M.SubPointer.get_struct_record_field (| @@ -17764,6 +18799,7 @@ Module slice. let start := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| end_ |), M.read (| M.SubPointer.get_struct_record_field (| @@ -17847,7 +18883,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -17855,15 +18891,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -17878,17 +18914,20 @@ Module slice. |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "chunk_size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -17934,7 +18973,11 @@ Module slice. M.read (| snd |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| fst |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| fst |)) ] + |) |))) ] |))) @@ -17962,7 +19005,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -17986,12 +19029,13 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in + 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 _ := M.write (| @@ -18000,15 +19044,19 @@ Module slice. "core::slice::iter::RChunksExact", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let offset := M.alloc (| BinOp.Panic.mul (| - BinOp.Panic.sub (| M.read (| len |), M.read (| n |) |), + Integer.Usize, + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| n |) |), M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -18021,6 +19069,7 @@ Module slice. let start := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -18043,6 +19092,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| M.SubPointer.get_struct_record_field (| @@ -18071,9 +19121,14 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |) |) in @@ -18101,14 +19156,20 @@ Module slice. "v" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| end_ |))) ] + |) ] |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| nth_back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth_back |)) ] + |) |))) ] |) @@ -18138,7 +19199,7 @@ Module slice. self.v.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -18213,9 +19274,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -18244,7 +19305,7 @@ Module slice. Ty.apply (Ty.path "core::slice::iter::RChunksExactMut") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -18259,33 +19320,36 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "RChunksExactMut" |); - M.read (| Value.String "v" |); + M.read (| M.of_value (| Value.String "RChunksExactMut" |) |); + M.read (| M.of_value (| Value.String "v" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "v" - |)); - M.read (| Value.String "rem" |); + |) + |); + M.read (| M.of_value (| Value.String "rem" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "rem" - |)); - M.read (| Value.String "chunk_size" |); + |) + |); + M.read (| M.of_value (| Value.String "chunk_size" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "chunk_size" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -18312,7 +19376,7 @@ Module slice. Self { v: snd, rem: fst, chunk_size } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ slice; chunk_size ] => @@ -18323,6 +19387,7 @@ Module slice. let rem := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] @@ -18349,13 +19414,15 @@ Module slice. let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in M.alloc (| - Value.StructRecord - "core::slice::iter::RChunksExactMut" - [ - ("v", M.read (| snd |)); - ("rem", M.read (| fst |)); - ("chunk_size", M.read (| chunk_size |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::iter::RChunksExactMut" + [ + ("v", A.to_value (M.read (| snd |))); + ("rem", A.to_value (M.read (| fst |))); + ("chunk_size", A.to_value (M.read (| chunk_size |))) + ] + |) |))) ] |) @@ -18372,7 +19439,7 @@ Module slice. self.rem } *) - Definition into_remainder (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_remainder (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -18415,7 +19482,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -18423,15 +19490,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -18446,17 +19513,20 @@ Module slice. |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "chunk_size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let len := @@ -18495,6 +19565,7 @@ Module slice. |) |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| M.SubPointer.get_struct_record_field (| @@ -18524,7 +19595,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| tail |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tail |)) ] + |) |))) ] |))) @@ -18540,7 +19615,7 @@ Module slice. (n, Some(n)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -18550,6 +19625,7 @@ Module slice. let n := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -18576,11 +19652,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| n |); - Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| n |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| n |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -18591,7 +19674,7 @@ Module slice. self.len() } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -18625,7 +19708,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -18657,7 +19740,7 @@ Module slice. let end_ := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -18665,9 +19748,9 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ge - (M.read (| end_ |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| end_ |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -18684,7 +19767,8 @@ Module slice. |) |) ] - |)), + |) + |), ltac:(M.monadic (M.read (| overflow |))) |) |)) in @@ -18700,9 +19784,14 @@ Module slice. "core::slice::iter::RChunksExactMut", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let len := @@ -18744,7 +19833,11 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| M.read (| len |), M.read (| end_ |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| end_ |) + |) ] |) |), @@ -18792,7 +19885,7 @@ Module slice. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -18819,7 +19912,7 @@ Module slice. unsafe { from_raw_parts_mut(self.v.as_mut_ptr().add(start), self.chunk_size) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -18830,6 +19923,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -18847,6 +19941,7 @@ Module slice. ] |), BinOp.Panic.mul (| + Integer.Usize, M.read (| idx |), M.read (| M.SubPointer.get_struct_record_field (| @@ -18861,6 +19956,7 @@ Module slice. let start := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| end_ |), M.read (| M.SubPointer.get_struct_record_field (| @@ -18946,7 +20042,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -18954,15 +20050,15 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -18977,17 +20073,20 @@ Module slice. |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "chunk_size" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -19033,7 +20132,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| head |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| head |)) ] + |) |))) ] |))) @@ -19065,7 +20168,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -19089,12 +20192,13 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := - M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in + 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 _ := M.write (| @@ -19103,15 +20207,19 @@ Module slice. "core::slice::iter::RChunksExactMut", "v" |), - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) + (* Unsize *) + M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let offset := M.alloc (| BinOp.Panic.mul (| - BinOp.Panic.sub (| M.read (| len |), M.read (| n |) |), + Integer.Usize, + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| n |) |), M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -19124,6 +20232,7 @@ Module slice. let start := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], @@ -19146,6 +20255,7 @@ Module slice. let end_ := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| M.SubPointer.get_struct_record_field (| @@ -19212,9 +20322,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| nth_back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| nth_back |)) ] + |) |))) ] |))) @@ -19248,7 +20360,7 @@ Module slice. self.v.is_empty() } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -19327,9 +20439,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -19384,9 +20496,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -19415,9 +20527,9 @@ Module slice. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : Value.t := + Definition value_MAY_HAVE_SIDE_EFFECT (T : Ty.t) : A.t := let Self : Ty.t := Self T in - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : forall (T : Ty.t), @@ -19447,16 +20559,21 @@ Module slice. GroupBy { slice, predicate } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ slice; predicate ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let predicate := M.alloc (| predicate |) in - Value.StructRecord - "core::slice::iter::GroupBy" - [ ("slice", M.read (| slice |)); ("predicate", M.read (| predicate |)) ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::GroupBy" + [ + ("slice", A.to_value (M.read (| slice |))); + ("predicate", A.to_value (M.read (| predicate |))) + ] + |))) | _, _ => M.impossible end. @@ -19489,7 +20606,7 @@ Module slice. } } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -19497,7 +20614,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19522,10 +20639,12 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let len := M.alloc (| Value.Integer Integer.Usize 1 |) in + (let len := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let iter := M.alloc (| M.call_closure (| @@ -19542,7 +20661,7 @@ Module slice. "slice" |) |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -19550,7 +20669,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19579,7 +20698,7 @@ Module slice. let l := M.alloc (| γ2_0 |) in let r := M.alloc (| γ2_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19606,7 +20725,13 @@ Module slice. "core::slice::iter::GroupBy", "predicate" |); - Value.Tuple [ M.read (| l |); M.read (| r |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| l |)); + A.to_value (M.read (| r |)) + ] + |) ] |) |)) in @@ -19619,8 +20744,9 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => @@ -19639,7 +20765,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -19683,7 +20809,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| head |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| head |)) ] + |) |))) ] |))) @@ -19698,7 +20828,7 @@ Module slice. if self.slice.is_empty() { (0, Some(0)) } else { (1, Some(self.slice.len())) } } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -19706,7 +20836,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19732,41 +20862,52 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 1; - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::GroupBy", - "slice" - |) - |) - ] - |) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::GroupBy", + "slice" + |) + |) + ] + |)) + ] + |)) + ] + |) |))) ] |) @@ -19779,7 +20920,7 @@ Module slice. self.next_back() } *) - Definition last (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -19833,7 +20974,7 @@ Module slice. } } *) - Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -19841,7 +20982,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19866,10 +21007,12 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let len := M.alloc (| Value.Integer Integer.Usize 1 |) in + (let len := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let iter := M.alloc (| M.call_closure (| @@ -19886,7 +21029,7 @@ Module slice. "slice" |) |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -19894,7 +21037,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19923,7 +21066,7 @@ Module slice. let l := M.alloc (| γ2_0 |) in let r := M.alloc (| γ2_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -19950,7 +21093,13 @@ Module slice. "core::slice::iter::GroupBy", "predicate" |); - Value.Tuple [ M.read (| l |); M.read (| r |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| l |)); + A.to_value (M.read (| r |)) + ] + |) ] |) |)) in @@ -19963,8 +21112,9 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => @@ -19983,7 +21133,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -20007,6 +21157,7 @@ Module slice. |) |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -20045,7 +21196,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| tail |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tail |)) ] + |) |))) ] |))) @@ -20086,7 +21241,7 @@ Module slice. f.debug_struct("GroupBy").field("slice", &self.slice).finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -20114,17 +21269,18 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "GroupBy" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "GroupBy" |) |) ] |) |); - M.read (| Value.String "slice" |); + M.read (| M.of_value (| Value.String "slice" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::GroupBy", "slice" - |)) + |) + |) ] |) ] @@ -20161,16 +21317,21 @@ Module slice. GroupByMut { slice, predicate } } *) - Definition new (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ slice; predicate ] => ltac:(M.monadic (let slice := M.alloc (| slice |) in let predicate := M.alloc (| predicate |) in - Value.StructRecord - "core::slice::iter::GroupByMut" - [ ("slice", M.read (| slice |)); ("predicate", M.read (| predicate |)) ])) + M.of_value (| + Value.StructRecord + "core::slice::iter::GroupByMut" + [ + ("slice", A.to_value (M.read (| slice |))); + ("predicate", A.to_value (M.read (| predicate |))) + ] + |))) | _, _ => M.impossible end. @@ -20204,7 +21365,7 @@ Module slice. } } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -20212,7 +21373,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20237,10 +21398,12 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let len := M.alloc (| Value.Integer Integer.Usize 1 |) in + (let len := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let iter := M.alloc (| M.call_closure (| @@ -20257,7 +21420,7 @@ Module slice. "slice" |) |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -20265,7 +21428,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20294,7 +21457,7 @@ Module slice. let l := M.alloc (| γ2_0 |) in let r := M.alloc (| γ2_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20321,7 +21484,13 @@ Module slice. "core::slice::iter::GroupByMut", "predicate" |); - Value.Tuple [ M.read (| l |); M.read (| r |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| l |)); + A.to_value (M.read (| r |)) + ] + |) ] |) |)) in @@ -20334,8 +21503,9 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => @@ -20354,7 +21524,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -20405,7 +21575,11 @@ Module slice. M.read (| tail |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| head |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| head |)) ] + |) |))) ] |))) @@ -20420,7 +21594,7 @@ Module slice. if self.slice.is_empty() { (0, Some(0)) } else { (1, Some(self.slice.len())) } } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -20428,7 +21602,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20454,41 +21628,52 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 0; - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.Usize 0 ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.Usize 1; - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::iter::GroupByMut", - "slice" - |) - |) - ] - |) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::iter::GroupByMut", + "slice" + |) + |) + ] + |)) + ] + |)) + ] + |) |))) ] |) @@ -20501,7 +21686,7 @@ Module slice. self.next_back() } *) - Definition last (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -20556,7 +21741,7 @@ Module slice. } } *) - Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -20564,7 +21749,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20589,10 +21774,12 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic - (let len := M.alloc (| Value.Integer Integer.Usize 1 |) in + (let len := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let iter := M.alloc (| M.call_closure (| @@ -20609,7 +21796,7 @@ Module slice. "slice" |) |); - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) ] |) |) in @@ -20617,7 +21804,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20646,7 +21833,7 @@ Module slice. let l := M.alloc (| γ2_0 |) in let r := M.alloc (| γ2_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -20673,7 +21860,13 @@ Module slice. "core::slice::iter::GroupByMut", "predicate" |); - Value.Tuple [ M.read (| l |); M.read (| r |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| l |)); + A.to_value (M.read (| r |)) + ] + |) ] |) |)) in @@ -20686,8 +21879,9 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => @@ -20706,7 +21900,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -20740,6 +21934,7 @@ Module slice. [ M.read (| slice |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -20770,7 +21965,11 @@ Module slice. M.read (| head |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| tail |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tail |)) ] + |) |))) ] |))) @@ -20811,7 +22010,7 @@ Module slice. f.debug_struct("GroupByMut").field("slice", &self.slice).finish() } *) - Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self; f ] => @@ -20839,17 +22038,18 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "GroupByMut" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "GroupByMut" |) |) ] |) |); - M.read (| Value.String "slice" |); + M.read (| M.of_value (| Value.String "slice" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::GroupByMut", "slice" - |)) + |) + |) ] |) ] diff --git a/CoqOfRust/core/slice/iter/macros.v b/CoqOfRust/core/slice/iter/macros.v index 65107586e..fa01f5895 100644 --- a/CoqOfRust/core/slice/iter/macros.v +++ b/CoqOfRust/core/slice/iter/macros.v @@ -14,7 +14,7 @@ Module slice. unsafe { from_raw_parts(self.ptr.as_ptr(), len!(self)) } } *) - Definition make_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition make_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -24,8 +24,8 @@ Module slice. M.get_function (| "core::slice::raw::from_raw_parts", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], "as_ptr", @@ -40,10 +40,11 @@ Module slice. |) |) ] - |)); + |) + |); M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -136,7 +137,7 @@ Module slice. old } *) - Definition post_inc_start (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition post_inc_start (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; offset ] => @@ -155,7 +156,7 @@ Module slice. let _ := let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -232,7 +233,7 @@ Module slice. |))) ] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in old |))) | _, _ => M.impossible @@ -261,7 +262,7 @@ Module slice. ) } *) - Definition pre_dec_end (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pre_dec_end (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; offset ] => @@ -270,7 +271,7 @@ Module slice. let offset := M.alloc (| offset |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -358,7 +359,7 @@ Module slice. len!(self) } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -366,7 +367,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -442,7 +443,7 @@ Module slice. is_empty!(self) } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -450,7 +451,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -477,7 +478,7 @@ Module slice. |) |) in M.alloc (| - BinOp.Pure.eq (M.read (| len |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| M.read (| len |), M.of_value (| Value.Integer 0 |) |) |))); fun γ => ltac:(M.monadic @@ -555,7 +556,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -563,14 +564,14 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -604,7 +605,10 @@ Module slice. |) |) in M.alloc (| - BinOp.Pure.eq (M.read (| len |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |))); fun γ => ltac:(M.monadic @@ -650,33 +654,38 @@ Module slice. ] |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ref", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], - "post_inc_start", - [] - |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_ref", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], + "post_inc_start", + [] + |), + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] + |) + |) + ] + |)) + ] + |) |))) ] |) @@ -690,7 +699,7 @@ Module slice. (exact, Some(exact)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -700,7 +709,7 @@ Module slice. let exact := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -770,11 +779,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| exact |); - Value.StructTuple "core::option::Option::Some" [ M.read (| exact |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| exact |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| exact |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -785,7 +801,7 @@ Module slice. len!(self) } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -793,7 +809,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -881,7 +897,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -893,18 +909,18 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| n |), + M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -986,7 +1002,8 @@ Module slice. |))) ] |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -995,7 +1012,7 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1030,7 +1047,7 @@ Module slice. |) in M.write (| M.read (| len |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic @@ -1067,11 +1084,15 @@ Module slice. |))) ] |) in - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1086,29 +1107,32 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ref", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], - "post_inc_start", - [] - |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_ref", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], + "post_inc_start", + [] + |), + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] + |) + |) + ] + |)) + ] + |) |) |))) |))) @@ -1123,7 +1147,7 @@ Module slice. NonZeroUsize::new(n - advance).map_or(Ok(()), Err) } *) - Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -1138,7 +1162,7 @@ Module slice. [ M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1255,10 +1279,14 @@ Module slice. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| advance |) |) ] + [ BinOp.Panic.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" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -1271,7 +1299,7 @@ Module slice. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1323,7 +1351,7 @@ Module slice. acc } *) - Definition fold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F ], [ self; init; f ] => @@ -1336,14 +1364,14 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1377,9 +1405,10 @@ Module slice. |) |) in M.alloc (| - BinOp.Pure.eq - (M.read (| len |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |))); fun γ => ltac:(M.monadic @@ -1438,15 +1467,15 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| init |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let acc := M.copy (| init |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1537,36 +1566,41 @@ Module slice. |), [ f; - Value.Tuple - [ - M.read (| acc |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ptr", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "add", + "as_ptr", [] |), [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::slice::iter::Iter", - "ptr" - |) - |); - M.read (| i |) + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ T ], + "add", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::slice::iter::Iter", + "ptr" + |) + |); + M.read (| i |) + ] + |) ] - |) - ] - |) - ] + |)) + ] + |) ] |) |) in @@ -1575,18 +1609,18 @@ Module slice. i, M.call_closure (| M.get_associated_function (| Ty.path "usize", "unchecked_add", [] |), - [ M.read (| i |); Value.Integer Integer.Usize 1 ] + [ M.read (| i |); M.of_value (| Value.Integer 1 |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| i |)) (M.read (| len |)) + BinOp.Pure.eq (| M.read (| i |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1594,7 +1628,8 @@ Module slice. Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) in @@ -1615,7 +1650,7 @@ Module slice. } } *) - Definition for_each (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition for_each (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -1626,7 +1661,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1660,10 +1695,10 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| x |) ] ] + [ f; M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1671,7 +1706,7 @@ Module slice. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1696,7 +1731,7 @@ Module slice. true } *) - Definition all (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition all (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -1710,7 +1745,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1735,15 +1770,15 @@ Module slice. |) in let x := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -1751,8 +1786,14 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| x |) ] ] - |)) + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1761,10 +1802,14 @@ Module slice. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool false |) |) + M.read (| + M.return_ (| M.of_value (| Value.Bool false |) |) + |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -1776,14 +1821,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.Bool true |) + M.alloc (| M.of_value (| Value.Bool true |) |) |))) |))) | _, _ => M.impossible @@ -1803,7 +1848,7 @@ Module slice. false } *) - Definition any (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition any (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -1817,7 +1862,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1842,7 +1887,7 @@ Module slice. |) in let x := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1857,7 +1902,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |) |)) in let _ := @@ -1867,10 +1917,14 @@ Module slice. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool true |) |) + M.read (| + M.return_ (| M.of_value (| Value.Bool true |) |) + |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -1882,14 +1936,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.Bool false |) + M.alloc (| M.of_value (| Value.Bool false |) |) |))) |))) | _, _ => M.impossible @@ -1909,7 +1963,7 @@ Module slice. None } *) - Definition find (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; predicate ] => @@ -1923,7 +1977,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1948,7 +2002,7 @@ Module slice. |) in let x := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1970,7 +2024,10 @@ Module slice. "call_mut", [] |), - [ predicate; Value.Tuple [ x ] ] + [ + predicate; + M.of_value (| Value.Tuple [ A.to_value x ] |) + ] |) |)) in let _ := @@ -1982,14 +2039,18 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -2001,14 +2062,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -2028,7 +2089,7 @@ Module slice. None } *) - Definition find_map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find_map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F ], [ self; f ] => @@ -2042,7 +2103,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2067,7 +2128,7 @@ Module slice. |) in let x := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2081,7 +2142,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |) |) in let γ0_0 := @@ -2095,14 +2161,18 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| y |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| y |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -2114,14 +2184,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -2146,7 +2216,7 @@ Module slice. None } *) - Definition position (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition position (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; predicate ] => @@ -2159,7 +2229,7 @@ Module slice. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2234,12 +2304,12 @@ Module slice. ] |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2265,7 +2335,7 @@ Module slice. let x := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2280,7 +2350,12 @@ Module slice. "call_mut", [] |), - [ predicate; Value.Tuple [ M.read (| x |) ] ] + [ + predicate; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |) |)) in let _ := @@ -2299,21 +2374,26 @@ Module slice. [] |), [ - BinOp.Pure.lt - (M.read (| i |)) - (M.read (| n |)) + BinOp.Pure.lt (| + M.read (| i |), + M.read (| n |) + |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| i |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| i |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2321,11 +2401,12 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2335,14 +2416,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -2367,7 +2448,7 @@ Module slice. None } *) - Definition rposition (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rposition (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; predicate ] => @@ -2380,7 +2461,7 @@ Module slice. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2460,7 +2541,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2489,12 +2570,13 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2509,7 +2591,12 @@ Module slice. "call_mut", [] |), - [ predicate; Value.Tuple [ M.read (| x |) ] ] + [ + predicate; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |) |)) in let _ := @@ -2528,21 +2615,26 @@ Module slice. [] |), [ - BinOp.Pure.lt - (M.read (| i |)) - (M.read (| n |)) + BinOp.Pure.lt (| + M.read (| i |), + M.read (| n |) + |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| i |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| i |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -2554,14 +2646,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -2582,7 +2674,7 @@ Module slice. unsafe { & $( $mut_ )? * self.ptr.as_ptr().add(idx) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -2623,7 +2715,7 @@ Module slice. self.as_slice().is_sorted_by(|a, b| compare(&a, &b)) } *) - Definition is_sorted_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sorted_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; compare ] => @@ -2649,8 +2741,8 @@ Module slice. |), [ self ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -2684,14 +2776,20 @@ Module slice. "call_mut", [] |), - [ compare; Value.Tuple [ a; b ] ] + [ + compare; + M.of_value (| + Value.Tuple [ A.to_value a; A.to_value b ] + |) + ] |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2743,7 +2841,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2751,14 +2849,14 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2792,7 +2890,10 @@ Module slice. |) |) in M.alloc (| - BinOp.Pure.eq (M.read (| len |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |))); fun γ => ltac:(M.monadic @@ -2838,33 +2939,38 @@ Module slice. ] |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ref", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], - "pre_dec_end", - [] - |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_ref", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], + "pre_dec_end", + [] + |), + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] + |) + |) + ] + |)) + ] + |) |))) ] |) @@ -2889,7 +2995,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -2901,18 +3007,18 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| n |), + M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2994,7 +3100,8 @@ Module slice. |))) ] |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3003,7 +3110,7 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3038,7 +3145,7 @@ Module slice. |) in M.write (| M.read (| len |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic @@ -3077,11 +3184,15 @@ Module slice. |))) ] |) in - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -3096,29 +3207,32 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ref", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], - "pre_dec_end", - [] - |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_ref", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], + "pre_dec_end", + [] + |), + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] + |) + |) + ] + |)) + ] + |) |) |))) |))) @@ -3133,7 +3247,7 @@ Module slice. NonZeroUsize::new(n - advance).map_or(Ok(()), Err) } *) - Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -3148,7 +3262,7 @@ Module slice. [ M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3265,10 +3379,14 @@ Module slice. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| advance |) |) ] + [ BinOp.Panic.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" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -3325,7 +3443,7 @@ Module slice. } } *) - Definition next_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3345,7 +3463,7 @@ Module slice. "post_inc_start", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] |) |) ] @@ -3370,7 +3488,7 @@ Module slice. (& $( $mut_ )? []).into_iter() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -3383,7 +3501,7 @@ Module slice. "into_iter", [] |), - [ M.alloc (| Value.Array [] |) ] + [ M.alloc (| M.of_value (| Value.Array [] |) |) ] |))) | _, _ => M.impossible end. @@ -3408,7 +3526,7 @@ Module slice. unsafe { from_raw_parts(self.ptr.as_ptr(), len!(self)) } } *) - Definition make_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition make_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3418,8 +3536,8 @@ Module slice. M.get_function (| "core::slice::raw::from_raw_parts", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], "as_ptr", @@ -3434,10 +3552,11 @@ Module slice. |) |) ] - |)); + |) + |); M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3530,7 +3649,7 @@ Module slice. old } *) - Definition post_inc_start (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition post_inc_start (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; offset ] => @@ -3549,7 +3668,7 @@ Module slice. let _ := let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3626,7 +3745,7 @@ Module slice. |))) ] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in old |))) | _, _ => M.impossible @@ -3655,7 +3774,7 @@ Module slice. ) } *) - Definition pre_dec_end (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition pre_dec_end (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; offset ] => @@ -3664,7 +3783,7 @@ Module slice. let offset := M.alloc (| offset |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3752,7 +3871,7 @@ Module slice. len!(self) } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3760,7 +3879,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3836,7 +3955,7 @@ Module slice. is_empty!(self) } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3844,7 +3963,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3871,7 +3990,7 @@ Module slice. |) |) in M.alloc (| - BinOp.Pure.eq (M.read (| len |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| M.read (| len |), M.of_value (| Value.Integer 0 |) |) |))); fun γ => ltac:(M.monadic @@ -3949,7 +4068,7 @@ Module slice. } } *) - Definition next (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3957,14 +4076,14 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3998,7 +4117,10 @@ Module slice. |) |) in M.alloc (| - BinOp.Pure.eq (M.read (| len |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |))); fun γ => ltac:(M.monadic @@ -4044,33 +4166,38 @@ Module slice. ] |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_mut", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], - "post_inc_start", - [] - |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_mut", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], + "post_inc_start", + [] + |), + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] + |) + |) + ] + |)) + ] + |) |))) ] |) @@ -4084,7 +4211,7 @@ Module slice. (exact, Some(exact)) } *) - Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4094,7 +4221,7 @@ Module slice. let exact := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4164,11 +4291,18 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| exact |); - Value.StructTuple "core::option::Option::Some" [ M.read (| exact |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| exact |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| exact |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -4179,7 +4313,7 @@ Module slice. len!(self) } *) - Definition count (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition count (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4187,7 +4321,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4275,7 +4409,7 @@ Module slice. } } *) - Definition nth (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -4287,18 +4421,18 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| n |), + M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4380,7 +4514,8 @@ Module slice. |))) ] |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4389,7 +4524,7 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4424,7 +4559,7 @@ Module slice. |) in M.write (| M.read (| len |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic @@ -4461,11 +4596,15 @@ Module slice. |))) ] |) in - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -4480,29 +4619,32 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_mut", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], - "post_inc_start", - [] - |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_mut", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], + "post_inc_start", + [] + |), + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] + |) + |) + ] + |)) + ] + |) |) |))) |))) @@ -4517,7 +4659,7 @@ Module slice. NonZeroUsize::new(n - advance).map_or(Ok(()), Err) } *) - Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -4532,7 +4674,7 @@ Module slice. [ M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4649,10 +4791,14 @@ Module slice. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| advance |) |) ] + [ BinOp.Panic.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" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -4665,7 +4811,7 @@ Module slice. self.next_back() } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4717,7 +4863,7 @@ Module slice. acc } *) - Definition fold (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F ], [ self; init; f ] => @@ -4730,14 +4876,14 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4771,9 +4917,10 @@ Module slice. |) |) in M.alloc (| - BinOp.Pure.eq - (M.read (| len |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |))); fun γ => ltac:(M.monadic @@ -4832,15 +4979,15 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| init |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let acc := M.copy (| init |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4931,36 +5078,41 @@ Module slice. |), [ f; - Value.Tuple - [ - M.read (| acc |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ptr", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| acc |)); + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "add", + "as_ptr", [] |), [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::slice::iter::IterMut", - "ptr" - |) - |); - M.read (| i |) + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ T ], + "add", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::slice::iter::IterMut", + "ptr" + |) + |); + M.read (| i |) + ] + |) ] - |) - ] - |) - ] + |)) + ] + |) ] |) |) in @@ -4969,18 +5121,18 @@ Module slice. i, M.call_closure (| M.get_associated_function (| Ty.path "usize", "unchecked_add", [] |), - [ M.read (| i |); Value.Integer Integer.Usize 1 ] + [ M.read (| i |); M.of_value (| Value.Integer 1 |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| i |)) (M.read (| len |)) + BinOp.Pure.eq (| M.read (| i |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -4988,7 +5140,8 @@ Module slice. Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) in @@ -5009,7 +5162,7 @@ Module slice. } } *) - Definition for_each (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition for_each (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -5020,7 +5173,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5054,10 +5207,10 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| x |) ] ] + [ f; M.of_value (| Value.Tuple [ A.to_value (M.read (| x |)) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5065,7 +5218,7 @@ Module slice. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -5090,7 +5243,7 @@ Module slice. true } *) - Definition all (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition all (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -5104,7 +5257,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5129,15 +5282,15 @@ Module slice. |) in let x := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -5146,8 +5299,14 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| x |) ] ] - |)) + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5156,10 +5315,14 @@ Module slice. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool false |) |) + M.read (| + M.return_ (| M.of_value (| Value.Bool false |) |) + |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -5171,14 +5334,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.Bool true |) + M.alloc (| M.of_value (| Value.Bool true |) |) |))) |))) | _, _ => M.impossible @@ -5198,7 +5361,7 @@ Module slice. false } *) - Definition any (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition any (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -5212,7 +5375,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5237,7 +5400,7 @@ Module slice. |) in let x := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5252,7 +5415,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |) |)) in let _ := @@ -5262,10 +5430,14 @@ Module slice. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool true |) |) + M.read (| + M.return_ (| M.of_value (| Value.Bool true |) |) + |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -5277,14 +5449,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.Bool false |) + M.alloc (| M.of_value (| Value.Bool false |) |) |))) |))) | _, _ => M.impossible @@ -5304,7 +5476,7 @@ Module slice. None } *) - Definition find (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; predicate ] => @@ -5318,7 +5490,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5343,7 +5515,7 @@ Module slice. |) in let x := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5365,7 +5537,10 @@ Module slice. "call_mut", [] |), - [ predicate; Value.Tuple [ x ] ] + [ + predicate; + M.of_value (| Value.Tuple [ A.to_value x ] |) + ] |) |)) in let _ := @@ -5377,14 +5552,18 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| x |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -5396,14 +5575,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -5423,7 +5602,7 @@ Module slice. None } *) - Definition find_map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition find_map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F ], [ self; f ] => @@ -5437,7 +5616,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5462,7 +5641,7 @@ Module slice. |) in let x := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5476,7 +5655,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| x |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |) |) in let γ0_0 := @@ -5490,14 +5674,18 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| y |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| y |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -5509,14 +5697,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -5541,7 +5729,7 @@ Module slice. None } *) - Definition position (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition position (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; predicate ] => @@ -5554,7 +5742,7 @@ Module slice. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5629,12 +5817,12 @@ Module slice. ] |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5660,7 +5848,7 @@ Module slice. let x := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5676,7 +5864,12 @@ Module slice. "call_mut", [] |), - [ predicate; Value.Tuple [ M.read (| x |) ] ] + [ + predicate; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |) |)) in let _ := @@ -5695,21 +5888,26 @@ Module slice. [] |), [ - BinOp.Pure.lt - (M.read (| i |)) - (M.read (| n |)) + BinOp.Pure.lt (| + M.read (| i |), + M.read (| n |) + |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| i |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| i |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -5717,11 +5915,12 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -5731,14 +5930,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -5763,7 +5962,7 @@ Module slice. None } *) - Definition rposition (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rposition (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; predicate ] => @@ -5776,7 +5975,7 @@ Module slice. let n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5856,7 +6055,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5885,12 +6084,13 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5905,7 +6105,12 @@ Module slice. "call_mut", [] |), - [ predicate; Value.Tuple [ M.read (| x |) ] ] + [ + predicate; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |) |)) in let _ := @@ -5924,21 +6129,26 @@ Module slice. [] |), [ - BinOp.Pure.lt - (M.read (| i |)) - (M.read (| n |)) + BinOp.Pure.lt (| + M.read (| i |), + M.read (| n |) + |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| i |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| i |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -5950,14 +6160,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -5978,7 +6188,7 @@ Module slice. unsafe { & $( $mut_ )? * self.ptr.as_ptr().add(idx) } } *) - Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; idx ] => @@ -6055,7 +6265,7 @@ Module slice. } } *) - Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6063,14 +6273,14 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6104,7 +6314,10 @@ Module slice. |) |) in M.alloc (| - BinOp.Pure.eq (M.read (| len |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |))); fun γ => ltac:(M.monadic @@ -6150,33 +6363,38 @@ Module slice. ] |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_mut", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], - "pre_dec_end", - [] - |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_mut", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], + "pre_dec_end", + [] + |), + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] + |) + |) + ] + |)) + ] + |) |))) ] |) @@ -6201,7 +6419,7 @@ Module slice. } } *) - Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -6213,18 +6431,18 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| n |), + M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6306,7 +6524,8 @@ Module slice. |))) ] |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6315,7 +6534,7 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6350,7 +6569,7 @@ Module slice. |) in M.write (| M.read (| len |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic @@ -6389,11 +6608,15 @@ Module slice. |))) ] |) in - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6408,29 +6631,32 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_mut", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], - "pre_dec_end", - [] - |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] - |) - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_mut", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], + "pre_dec_end", + [] + |), + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] + |) + |) + ] + |)) + ] + |) |) |))) |))) @@ -6445,7 +6671,7 @@ Module slice. NonZeroUsize::new(n - advance).map_or(Ok(()), Err) } *) - Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_back_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; n ] => @@ -6460,7 +6686,7 @@ Module slice. [ M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6577,10 +6803,14 @@ Module slice. "new", [] |), - [ BinOp.Panic.sub (| M.read (| n |), M.read (| advance |) |) ] + [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| advance |) |) ] + |); + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -6637,7 +6867,7 @@ Module slice. } } *) - Definition next_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6657,7 +6887,7 @@ Module slice. "post_inc_start", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 1 ] + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] |) |) ] @@ -6682,7 +6912,7 @@ Module slice. (& $( $mut_ )? []).into_iter() } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -6695,7 +6925,7 @@ Module slice. "into_iter", [] |), - [ M.alloc (| Value.Array [] |) ] + [ M.alloc (| M.of_value (| Value.Array [] |) |) ] |))) | _, _ => M.impossible end. @@ -6722,7 +6952,7 @@ Module slice. self.inner.next() } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -6754,7 +6984,7 @@ Module slice. self.inner.size_hint() } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -6821,7 +7051,7 @@ Module slice. self.inner.next() } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -6853,7 +7083,7 @@ Module slice. self.inner.size_hint() } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -6920,7 +7150,7 @@ Module slice. self.inner.next() } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -6952,7 +7182,7 @@ Module slice. self.inner.size_hint() } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -7019,7 +7249,7 @@ Module slice. self.inner.next() } *) - Definition next (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => @@ -7051,7 +7281,7 @@ Module slice. self.inner.size_hint() } *) - Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (T P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T P in match τ, α with | [], [ self ] => diff --git a/CoqOfRust/core/slice/memchr.v b/CoqOfRust/core/slice/memchr.v index 1c2c2b0d5..ace10a986 100644 --- a/CoqOfRust/core/slice/memchr.v +++ b/CoqOfRust/core/slice/memchr.v @@ -3,27 +3,27 @@ Require Import CoqOfRust.CoqOfRust. Module slice. Module memchr. - Definition value_LO_USIZE : Value.t := + Definition value_LO_USIZE : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "repeat_u8", [] |), - [ Value.Integer Integer.U8 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). - Definition value_HI_USIZE : Value.t := + Definition value_HI_USIZE : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "repeat_u8", [] |), - [ Value.Integer Integer.U8 128 ] + [ M.of_value (| Value.Integer 128 |) ] |) |))). - Definition value_USIZE_BYTES : Value.t := + Definition value_USIZE_BYTES : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -35,24 +35,27 @@ Module slice. x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0 } *) - Definition contains_zero_byte (τ : list Ty.t) (α : list Value.t) : M := + Definition contains_zero_byte (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_sub", [] |), [ M.read (| x |); M.read (| M.get_constant (| "core::slice::memchr::LO_USIZE" |) |) ] - |)) - (UnOp.Pure.not (M.read (| x |)))) - (M.read (| M.get_constant (| "core::slice::memchr::HI_USIZE" |) |))) - (Value.Integer Integer.Usize 0))) + |), + UnOp.Pure.not (| M.read (| x |) |) + |), + M.read (| M.get_constant (| "core::slice::memchr::HI_USIZE" |) |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -66,7 +69,7 @@ Module slice. memchr_aligned(x, text) } *) - Definition memchr (τ : list Ty.t) (α : list Value.t) : M := + Definition memchr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; text ] => ltac:(M.monadic @@ -77,28 +80,30 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| text |) ] - |)) - (BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + |), + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| 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 @@ -114,7 +119,7 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -144,7 +149,7 @@ Module slice. None } *) - Definition memchr_naive (τ : list Ty.t) (α : list Value.t) : M := + Definition memchr_naive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; text ] => ltac:(M.monadic @@ -153,28 +158,29 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| i |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| i |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| text |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -183,21 +189,22 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_array_field (| M.read (| text |), i |) - |)) - (M.read (| x |)) + |), + M.read (| x |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -208,14 +215,18 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| i |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| i |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -223,11 +234,12 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -237,14 +249,14 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -302,7 +314,7 @@ Module slice. if let Some(i) = memchr_naive(x, slice) { Some(offset + i) } else { None } } *) - Definition memchr_aligned (τ : list Ty.t) (α : list Value.t) : M := + Definition memchr_aligned (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; text ] => ltac:(M.monadic @@ -349,14 +361,17 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| offset |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| offset |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -365,14 +380,17 @@ Module slice. offset, M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| offset |)) (M.read (| len |)) + BinOp.Pure.lt (| + M.read (| offset |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -406,7 +424,7 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -431,17 +449,20 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| index |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| index |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let repeated_x := @@ -455,24 +476,27 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| offset |)) - (BinOp.Panic.sub (| + BinOp.Pure.le (| + M.read (| offset |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.read (| M.get_constant (| "core::slice::memchr::USIZE_BYTES" |) |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -482,20 +506,21 @@ Module slice. let _ := let u := M.copy (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.path "u8" ], "add", [] |), [ M.read (| ptr |); M.read (| offset |) ] - |)) + |) + |) |) in let v := M.copy (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.path "u8" ], "add", @@ -504,6 +529,7 @@ Module slice. [ M.read (| ptr |); BinOp.Panic.add (| + Integer.Usize, M.read (| offset |), M.read (| M.get_constant (| @@ -512,7 +538,8 @@ Module slice. |) |) ] - |)) + |) + |) |) in let zu := M.alloc (| @@ -522,9 +549,10 @@ Module slice. [] |), [ - BinOp.Pure.bit_xor - (M.read (| u |)) - (M.read (| repeated_x |)) + BinOp.Pure.bit_xor (| + M.read (| u |), + M.read (| repeated_x |) + |) ] |) |) in @@ -536,14 +564,15 @@ Module slice. [] |), [ - BinOp.Pure.bit_xor - (M.read (| v |)) - (M.read (| repeated_x |)) + BinOp.Pure.bit_xor (| + M.read (| v |), + M.read (| repeated_x |) + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -563,7 +592,9 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -571,16 +602,18 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), BinOp.Panic.mul (| + Integer.Usize, M.read (| M.get_constant (| "core::slice::memchr::USIZE_BYTES" |) |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -590,7 +623,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -621,6 +654,7 @@ Module slice. ] |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -635,7 +669,7 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -654,13 +688,24 @@ Module slice. |) in let i := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ BinOp.Panic.add (| M.read (| offset |), M.read (| i |) |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| offset |), + M.read (| i |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -721,7 +766,7 @@ Module slice. text[..offset].iter().rposition(|elt| *elt == x) } *) - Definition memrchr (τ : list Ty.t) (α : list Value.t) : M := + Definition memrchr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; text ] => ltac:(M.monadic @@ -773,28 +818,33 @@ Module slice. let prefix := M.copy (| γ0_0 |) in let suffix := M.copy (| γ0_2 |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| prefix |) ] - |); - BinOp.Panic.sub (| - M.read (| len |), - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| suffix |) ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| prefix |) ] + |)); + A.to_value + (BinOp.Panic.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 |) ] + |) + |)) + ] + |) |))) ] |), @@ -808,7 +858,7 @@ Module slice. let offset := M.copy (| max_aligned_offset |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -852,16 +902,21 @@ Module slice. |), [ M.read (| text |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| offset |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value (M.read (| offset |))) + ] + |) ] |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -871,13 +926,15 @@ Module slice. fun γ => ltac:(M.monadic (let elt := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| M.read (| elt |) |)) - (M.read (| x |)))) + BinOp.Pure.eq (| + M.read (| M.read (| elt |) |), + M.read (| x |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -892,19 +949,24 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.read (| offset |), - M.read (| index |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| offset |), + M.read (| index |) + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let repeated_x := @@ -925,16 +987,17 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| offset |)) - (M.read (| min_aligned_offset |)) + BinOp.Pure.gt (| + M.read (| offset |), + M.read (| min_aligned_offset |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -944,8 +1007,8 @@ Module slice. let _ := let u := M.copy (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.path "u8" ], "add", @@ -954,19 +1017,22 @@ Module slice. [ M.read (| ptr |); BinOp.Panic.sub (| + Integer.Usize, M.read (| offset |), BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.read (| chunk_bytes |) |) |) ] - |)) + |) + |) |) in let v := M.copy (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ Ty.path "u8" ], "add", @@ -975,11 +1041,13 @@ Module slice. [ M.read (| ptr |); BinOp.Panic.sub (| + Integer.Usize, M.read (| offset |), M.read (| chunk_bytes |) |) ] - |)) + |) + |) |) in let zu := M.alloc (| @@ -989,9 +1057,10 @@ Module slice. [] |), [ - BinOp.Pure.bit_xor - (M.read (| u |)) - (M.read (| repeated_x |)) + BinOp.Pure.bit_xor (| + M.read (| u |), + M.read (| repeated_x |) + |) ] |) |) in @@ -1003,14 +1072,15 @@ Module slice. [] |), [ - BinOp.Pure.bit_xor - (M.read (| v |)) - (M.read (| repeated_x |)) + BinOp.Pure.bit_xor (| + M.read (| v |), + M.read (| repeated_x |) + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1030,7 +1100,9 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1038,14 +1110,16 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.read (| chunk_bytes |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1055,7 +1129,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -1098,16 +1172,18 @@ Module slice. |), [ M.read (| text |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| offset |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| offset |))) ] + |) ] |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1117,13 +1193,15 @@ Module slice. fun γ => ltac:(M.monadic (let elt := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| M.read (| elt |) |)) - (M.read (| x |)))) + BinOp.Pure.eq (| + M.read (| M.read (| elt |) |), + M.read (| x |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) diff --git a/CoqOfRust/core/slice/mod.v b/CoqOfRust/core/slice/mod.v index 241c27cf7..7e499003a 100644 --- a/CoqOfRust/core/slice/mod.v +++ b/CoqOfRust/core/slice/mod.v @@ -15,294 +15,333 @@ Module slice. }) } *) - Definition split_point_of (τ : list Ty.t) (α : list Value.t) : M := + Definition split_point_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ impl_OneSidedRange_usize_ ], [ range ] => ltac:(M.monadic (let range := M.alloc (| range |) in M.catch_return (| ltac:(M.monadic - (Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.match_operator (| - M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::range::RangeBounds", - impl_OneSidedRange_usize_, - [ Ty.path "usize" ], - "start_bound", - [] - |), - [ range ] - |); - M.call_closure (| - M.get_trait_method (| - "core::ops::range::RangeBounds", - impl_OneSidedRange_usize_, - [ Ty.path "usize" ], - "end_bound", - [] - |), - [ range ] - |) - ] - |), - [ - 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 γ1_0 := - M.SubPointer.get_struct_tuple_field (| - γ0_1, - "core::ops::range::Bound::Excluded", - 0 - |) in - let i := M.copy (| γ1_0 |) in - M.alloc (| - Value.Tuple - [ - Value.StructTuple "core::slice::Direction::Front" []; - M.read (| M.read (| i |) |) - ] - |))); - 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 γ1_0 := - M.SubPointer.get_struct_tuple_field (| - γ0_1, - "core::ops::range::Bound::Included", - 0 - |) in - let i := M.copy (| γ1_0 |) in - M.alloc (| + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [ - Value.StructTuple "core::slice::Direction::Front" []; - M.read (| - M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::Try", - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "usize" ], - [], - "branch", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "checked_add", - [] - |), - [ - M.read (| M.read (| i |) |); - Value.Integer Integer.Usize 1 - ] - |) - ] - |) + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::range::RangeBounds", + impl_OneSidedRange_usize_, + [ Ty.path "usize" ], + "start_bound", + [] + |), + [ range ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::range::RangeBounds", + impl_OneSidedRange_usize_, + [ Ty.path "usize" ], + "end_bound", + [] |), + [ range ] + |)) + ] + |) + |), + [ + 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 γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "core::ops::range::Bound::Excluded", + 0 + |) in + let i := M.copy (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.Tuple [ - 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_ (| + A.to_value + (M.of_value (| + Value.StructTuple "core::slice::Direction::Front" [] + |)); + A.to_value (M.read (| M.read (| i |) |)) + ] + |) + |))); + 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 γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "core::ops::range::Bound::Included", + 0 + |) in + let i := M.copy (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::slice::Direction::Front" [] + |)); + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ], + [], + "branch", + [] + |), + [ M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::FromResidual", - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.tuple - [ - Ty.path "core::slice::Direction"; - Ty.path "usize" - ] - ], - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "core::convert::Infallible" ] - ], - "from_residual", + M.get_associated_function (| + Ty.path "usize", + "checked_add", [] |), - [ M.read (| residual |) ] + [ + M.read (| M.read (| i |) |); + M.of_value (| Value.Integer 1 |) + ] |) - |) + ] |) - |) - |))); - 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)) - ] - |) - |) - ] - |))); - 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 γ1_0 := - M.SubPointer.get_struct_tuple_field (| - γ0_0, - "core::ops::range::Bound::Excluded", - 0 - |) in - let i := M.copy (| γ1_0 |) in - M.alloc (| - Value.Tuple - [ - Value.StructTuple "core::slice::Direction::Back" []; - M.read (| - M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::Try", - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "usize" ], - [], - "branch", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "checked_add", - [] |), [ - M.read (| M.read (| i |) |); - Value.Integer Integer.Usize 1 + 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::option::Option") + [ + Ty.tuple + [ + Ty.path + "core::slice::Direction"; + Ty.path "usize" + ] + ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.path + "core::convert::Infallible" + ] + ], + "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)) ] |) - ] - |) - |), + |)) + ] + |) + |))); + 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 γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "core::ops::range::Bound::Excluded", + 0 + |) in + let i := M.copy (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.Tuple [ - 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_ (| + A.to_value + (M.of_value (| + Value.StructTuple "core::slice::Direction::Back" [] + |)); + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ], + [], + "branch", + [] + |), + [ M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::FromResidual", - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.tuple - [ - Ty.path "core::slice::Direction"; - Ty.path "usize" - ] - ], - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "core::convert::Infallible" ] - ], - "from_residual", + M.get_associated_function (| + Ty.path "usize", + "checked_add", [] |), - [ M.read (| residual |) ] + [ + M.read (| M.read (| i |) |); + M.of_value (| Value.Integer 1 |) + ] |) - |) + ] |) - |) - |))); - 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)) + |), + [ + 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::option::Option") + [ + Ty.tuple + [ + Ty.path + "core::slice::Direction"; + Ty.path "usize" + ] + ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.path + "core::convert::Infallible" + ] + ], + "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)) + ] + |) + |)) ] - |) |) - ] - |))); - 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 γ1_0 := - M.SubPointer.get_struct_tuple_field (| - γ0_0, - "core::ops::range::Bound::Included", - 0 - |) in - let i := M.copy (| γ1_0 |) in - M.alloc (| - Value.Tuple - [ - Value.StructTuple "core::slice::Direction::Back" []; - M.read (| M.read (| i |) |) - ] - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - M.never_to_any (| - M.call_closure (| - M.get_function (| "core::panicking::panic", [] |), - [ - M.read (| - Value.String "internal error: entered unreachable code" + |))); + 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 γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "core::ops::range::Bound::Included", + 0 + |) in + let i := M.copy (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::slice::Direction::Back" [] + |)); + A.to_value (M.read (| M.read (| i |) |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ + M.read (| + M.of_value (| + Value.String "internal error: entered unreachable code" + |) + |) + ] |) - ] - |) - |) - |))) - ] - |) - |) - ])) + |) + |))) + ] + |) + |)) + ] + |))) |))) | _, _ => M.impossible end. @@ -335,7 +374,7 @@ Module slice. ptr::metadata(self) } *) - Definition len (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -358,18 +397,19 @@ Module slice. self.len() == 0 } *) - Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -382,7 +422,7 @@ Module slice. if let [first, ..] = self { Some(first) } else { None } } *) - Definition first (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition first (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -390,7 +430,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -400,10 +440,17 @@ Module slice. let γ1_rest := M.SubPointer.get_slice_rest (| γ, 1, 0 |) in let first := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| first |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| first |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -419,7 +466,7 @@ Module slice. if let [first, ..] = self { Some(first) } else { None } } *) - Definition first_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition first_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -427,7 +474,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -437,10 +484,17 @@ Module slice. let γ1_rest := M.SubPointer.get_slice_rest (| γ, 1, 0 |) in let first := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| first |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| first |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -456,7 +510,7 @@ Module slice. if let [first, tail @ ..] = self { Some((first, tail)) } else { None } } *) - Definition split_first (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_first (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -464,7 +518,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -475,12 +529,24 @@ Module slice. let first := M.alloc (| γ1_0 |) in let tail := M.alloc (| γ1_rest |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| first |); M.read (| tail |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| first |)); A.to_value (M.read (| tail |)) + ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -496,7 +562,7 @@ Module slice. if let [first, tail @ ..] = self { Some((first, tail)) } else { None } } *) - Definition split_first_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_first_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -504,7 +570,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -515,12 +581,24 @@ Module slice. let first := M.alloc (| γ1_0 |) in let tail := M.alloc (| γ1_rest |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| first |); M.read (| tail |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| first |)); A.to_value (M.read (| tail |)) + ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -536,7 +614,7 @@ Module slice. if let [init @ .., last] = self { Some((last, init)) } else { None } } *) - Definition split_last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -544,7 +622,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -555,12 +633,23 @@ Module slice. let init := M.alloc (| γ1_rest |) in let last := M.alloc (| γ1_rev0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| last |); M.read (| init |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| last |)); A.to_value (M.read (| init |)) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -576,7 +665,7 @@ Module slice. if let [init @ .., last] = self { Some((last, init)) } else { None } } *) - Definition split_last_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_last_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -584,7 +673,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -595,12 +684,23 @@ Module slice. let init := M.alloc (| γ1_rest |) in let last := M.alloc (| γ1_rev0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| last |); M.read (| init |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| last |)); A.to_value (M.read (| init |)) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -616,7 +716,7 @@ Module slice. if let [.., last] = self { Some(last) } else { None } } *) - Definition last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -624,7 +724,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -634,10 +734,17 @@ Module slice. let γ1_rev0 := M.SubPointer.get_slice_rev_index (| γ, 0 |) in let last := M.alloc (| γ1_rev0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| last |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| last |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -653,7 +760,7 @@ Module slice. if let [.., last] = self { Some(last) } else { None } } *) - Definition last_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -661,7 +768,7 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -671,10 +778,17 @@ Module slice. let γ1_rev0 := M.SubPointer.get_slice_rev_index (| γ, 0 |) in let last := M.alloc (| γ1_rev0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| last |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| last |)) ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -696,7 +810,7 @@ Module slice. } } *) - Definition first_chunk (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition first_chunk (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -704,42 +818,49 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) - (M.read (| M.get_constant (| "core::slice::first_chunk::N" |) |)) + |), + M.read (| M.get_constant (| "core::slice::first_chunk::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_ptr", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_ptr", + [] + |), + [ M.read (| self |) ] + |) + |)) + ] + |) |))) ] |) @@ -763,7 +884,7 @@ Module slice. } } *) - Definition first_chunk_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition first_chunk_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -771,42 +892,49 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) - (M.read (| M.get_constant (| "core::slice::first_chunk_mut::N" |) |)) + |), + M.read (| M.get_constant (| "core::slice::first_chunk_mut::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_mut_ptr", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_mut_ptr", + [] + |), + [ M.read (| self |) ] + |) + |)) + ] + |) |))) ] |) @@ -832,7 +960,7 @@ Module slice. } } *) - Definition split_first_chunk (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_first_chunk (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -840,26 +968,29 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + 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_first_chunk::N" |) |)) + |), + M.read (| M.get_constant (| "core::slice::split_first_chunk::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -884,23 +1015,30 @@ Module slice. let first := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_ptr", - [] - |), - [ M.read (| first |) ] - |)); - M.read (| tail |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_ptr", + [] + |), + [ M.read (| first |) ] + |) + |)); + A.to_value (M.read (| tail |)) + ] + |)) + ] + |) |))) ] |))) @@ -931,7 +1069,7 @@ Module slice. } } *) - Definition split_first_chunk_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_first_chunk_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -939,28 +1077,31 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + 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_first_chunk_mut::N" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -987,23 +1128,30 @@ Module slice. let first := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_mut_ptr", - [] - |), - [ M.read (| first |) ] - |)); - M.read (| tail |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_mut_ptr", + [] + |), + [ M.read (| first |) ] + |) + |)); + A.to_value (M.read (| tail |)) + ] + |)) + ] + |) |))) ] |))) @@ -1031,7 +1179,7 @@ Module slice. } } *) - Definition split_last_chunk (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_last_chunk (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1039,26 +1187,29 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + 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" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -1072,6 +1223,7 @@ Module slice. [ M.read (| self |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1093,23 +1245,30 @@ Module slice. let init := M.copy (| γ0_0 |) in let last := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_ptr", - [] - |), - [ M.read (| last |) ] - |)); - M.read (| init |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_ptr", + [] + |), + [ M.read (| last |) ] + |) + |)); + A.to_value (M.read (| init |)) + ] + |)) + ] + |) |))) ] |))) @@ -1140,7 +1299,7 @@ Module slice. } } *) - Definition split_last_chunk_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_last_chunk_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1148,28 +1307,29 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + 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_mut::N" |) - |)) + |), + M.read (| M.get_constant (| "core::slice::split_last_chunk_mut::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -1183,6 +1343,7 @@ Module slice. [ M.read (| self |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1206,23 +1367,30 @@ Module slice. let init := M.copy (| γ0_0 |) in let last := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_mut_ptr", - [] - |), - [ M.read (| last |) ] - |)); - M.read (| init |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_mut_ptr", + [] + |), + [ M.read (| last |) ] + |) + |)); + A.to_value (M.read (| init |)) + ] + |)) + ] + |) |))) ] |))) @@ -1251,7 +1419,7 @@ Module slice. } } *) - Definition last_chunk (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last_chunk (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1259,26 +1427,29 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + 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" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let last := @@ -1294,6 +1465,7 @@ Module slice. [ M.read (| self |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1311,19 +1483,23 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_ptr", - [] - |), - [ M.read (| last |) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_ptr", + [] + |), + [ M.read (| last |) ] + |) + |)) + ] + |) |))) ] |) @@ -1351,7 +1527,7 @@ Module slice. } } *) - Definition last_chunk_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition last_chunk_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1359,26 +1535,29 @@ Module slice. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + 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_mut::N" |) |)) + |), + M.read (| M.get_constant (| "core::slice::last_chunk_mut::N" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let last := @@ -1395,6 +1574,7 @@ Module slice. [ M.read (| self |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1415,19 +1595,23 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_mut_ptr", - [] - |), - [ M.read (| last |) ] - |)) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_mut_ptr", + [] + |), + [ M.read (| last |) ] + |) + |)) + ] + |) |))) ] |) @@ -1447,7 +1631,7 @@ Module slice. index.get(self) } *) - Definition get (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ self; index ] => @@ -1477,7 +1661,7 @@ Module slice. index.get_mut(self) } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ self; index ] => @@ -1512,7 +1696,7 @@ Module slice. unsafe { &*index.get_unchecked(self) } } *) - Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ self; index ] => @@ -1547,7 +1731,7 @@ Module slice. unsafe { &mut *index.get_unchecked_mut(self) } } *) - Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ _ as I ], [ self; index ] => @@ -1576,13 +1760,13 @@ Module slice. self as *const [T] as *const T } *) - Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |))) | _, _ => M.impossible end. @@ -1595,13 +1779,13 @@ Module slice. self as *mut [T] as *mut T } *) - Definition as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |))) | _, _ => M.impossible end. @@ -1633,7 +1817,7 @@ Module slice. start..end } *) - Definition as_ptr_range (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr_range (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1661,9 +1845,14 @@ Module slice. |) |) in M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) |) |))) | _, _ => M.impossible @@ -1681,7 +1870,7 @@ Module slice. start..end } *) - Definition as_mut_ptr_range (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_ptr_range (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1713,9 +1902,14 @@ Module slice. |) |) in M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) |) |))) | _, _ => M.impossible @@ -1740,7 +1934,7 @@ Module slice. } } *) - Definition swap (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; a; b ] => @@ -1758,7 +1952,7 @@ Module slice. [ M.read (| pa |); M.read (| pb |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1781,7 +1975,7 @@ Module slice. } } *) - Definition swap_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; a; b ] => @@ -1792,44 +1986,47 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.lt - (M.read (| a |)) - (M.call_closure (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.lt (| + M.read (| a |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| b |)) - (M.call_closure (| + (BinOp.Pure.lt (| + M.read (| b |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)))) - |)) + |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1849,27 +2046,33 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::swap_unchecked requires that the indices are within the slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::swap_unchecked requires that the indices are within the slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ptr := @@ -1899,7 +2102,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1950,7 +2153,7 @@ Module slice. } } *) - Definition reverse (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1960,11 +2163,12 @@ Module slice. let half_len := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in M.match_operator (| @@ -1997,27 +2201,37 @@ Module slice. let end_ := M.copy (| γ0_1 |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::slice::raw::from_raw_parts_mut", [ T ] |), - [ M.read (| start |); M.read (| half_len |) ] - |); - M.call_closure (| - M.get_function (| "core::slice::raw::from_raw_parts_mut", [ T ] |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "sub", - [] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts_mut", + [ T ] |), - [ M.read (| end_ |); M.read (| half_len |) ] - |); - M.read (| half_len |) - ] - |) - ] + [ M.read (| start |); M.read (| half_len |) ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts_mut", + [ T ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "sub", + [] + |), + [ M.read (| end_ |); M.read (| half_len |) ] + |); + M.read (| half_len |) + ] + |)) + ] + |) |), [ fun γ => @@ -2037,7 +2251,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -2055,7 +2269,7 @@ Module slice. Iter::new(self) } *) - Definition iter (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2081,7 +2295,7 @@ Module slice. IterMut::new(self) } *) - Definition iter_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition iter_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2108,7 +2322,7 @@ Module slice. Windows::new(self, size) } *) - Definition windows (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition windows (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; size ] => @@ -2135,7 +2349,7 @@ Module slice. |), [ M.read (| size |) ] |); - M.read (| Value.String "window size must be non-zero" |) + M.read (| M.of_value (| Value.String "window size must be non-zero" |) |) ] |) |) in @@ -2163,7 +2377,7 @@ Module slice. Chunks::new(self, chunk_size) } *) - Definition chunks (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition chunks (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; chunk_size ] => @@ -2173,17 +2387,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| chunk_size |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| chunk_size |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2199,18 +2415,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2237,7 +2463,7 @@ Module slice. ChunksMut::new(self, chunk_size) } *) - Definition chunks_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition chunks_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; chunk_size ] => @@ -2247,17 +2473,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| chunk_size |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| chunk_size |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2273,18 +2501,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2311,7 +2549,7 @@ Module slice. ChunksExact::new(self, chunk_size) } *) - Definition chunks_exact (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition chunks_exact (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; chunk_size ] => @@ -2321,17 +2559,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| chunk_size |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| chunk_size |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2347,18 +2587,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2385,7 +2635,7 @@ Module slice. ChunksExactMut::new(self, chunk_size) } *) - Definition chunks_exact_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition chunks_exact_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; chunk_size ] => @@ -2395,17 +2645,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| chunk_size |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| chunk_size |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2421,18 +2673,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2466,7 +2728,7 @@ Module slice. unsafe { from_raw_parts(self.as_ptr().cast(), new_len) } } *) - Definition as_chunks_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_chunks_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2475,32 +2737,34 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.ne - (M.read (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::slice::as_chunks_unchecked::N" |) - |)) - (Value.Integer Integer.Usize 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.rem (| + (BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -2514,9 +2778,11 @@ Module slice. "core::slice::as_chunks_unchecked::N" |) |) - |)) - (Value.Integer Integer.Usize 0))) - |)) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2536,27 +2802,33 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::as_chunks_unchecked requires `N != 0` and the slice to split exactly into `N`-element chunks" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::as_chunks_unchecked requires `N != 0` and the slice to split exactly into `N`-element chunks" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_len := @@ -2619,7 +2891,7 @@ Module slice. (array_slice, remainder) } *) - Definition as_chunks (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_chunks (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2628,17 +2900,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| M.get_constant (| "core::slice::as_chunks::N" |) |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::slice::as_chunks::N" |) |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2654,23 +2928,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -2685,6 +2970,7 @@ Module slice. [ M.read (| self |); BinOp.Panic.mul (| + Integer.Usize, M.read (| len |), M.read (| M.get_constant (| "core::slice::as_chunks::N" |) |) |) @@ -2709,7 +2995,15 @@ Module slice. [ M.read (| multiple_of_n |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| array_slice |); M.read (| remainder |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| array_slice |)); + A.to_value (M.read (| remainder |)) + ] + |) + |))) ] |) |))) @@ -2731,7 +3025,7 @@ Module slice. (remainder, array_slice) } *) - Definition as_rchunks (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_rchunks (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2740,17 +3034,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| M.get_constant (| "core::slice::as_rchunks::N" |) |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::slice::as_rchunks::N" |) |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2766,23 +3062,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -2797,11 +3104,13 @@ Module slice. [ M.read (| self |); BinOp.Panic.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" |) |) |) @@ -2827,7 +3136,15 @@ Module slice. [ M.read (| multiple_of_n |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| remainder |); M.read (| array_slice |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| remainder |)); + A.to_value (M.read (| array_slice |)) + ] + |) + |))) ] |) |))) @@ -2844,7 +3161,7 @@ Module slice. ArrayChunks::new(self) } *) - Definition array_chunks (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition array_chunks (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2853,17 +3170,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| M.get_constant (| "core::slice::array_chunks::N" |) |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::slice::array_chunks::N" |) |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -2879,18 +3198,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2924,7 +3253,7 @@ Module slice. unsafe { from_raw_parts_mut(self.as_mut_ptr().cast(), new_len) } } *) - Definition as_chunks_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_chunks_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2933,32 +3262,34 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.ne - (M.read (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::slice::as_chunks_unchecked_mut::N" |) - |)) - (Value.Integer Integer.Usize 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.rem (| + (BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -2972,9 +3303,11 @@ Module slice. "core::slice::as_chunks_unchecked_mut::N" |) |) - |)) - (Value.Integer Integer.Usize 0))) - |)) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2994,27 +3327,33 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::as_chunks_unchecked requires `N != 0` and the slice to split exactly into `N`-element chunks" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::as_chunks_unchecked requires `N != 0` and the slice to split exactly into `N`-element chunks" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let new_len := @@ -3077,7 +3416,7 @@ Module slice. (array_slice, remainder) } *) - Definition as_chunks_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_chunks_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3086,17 +3425,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| M.get_constant (| "core::slice::as_chunks_mut::N" |) |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::slice::as_chunks_mut::N" |) |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3112,23 +3453,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -3147,6 +3499,7 @@ Module slice. [ M.read (| self |); BinOp.Panic.mul (| + Integer.Usize, M.read (| len |), M.read (| M.get_constant (| "core::slice::as_chunks_mut::N" |) |) |) @@ -3171,7 +3524,15 @@ Module slice. [ M.read (| multiple_of_n |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| array_slice |); M.read (| remainder |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| array_slice |)); + A.to_value (M.read (| remainder |)) + ] + |) + |))) ] |) |))) @@ -3193,7 +3554,7 @@ Module slice. (remainder, array_slice) } *) - Definition as_rchunks_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_rchunks_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3202,17 +3563,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| M.get_constant (| "core::slice::as_rchunks_mut::N" |) |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::slice::as_rchunks_mut::N" |) |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3228,23 +3591,34 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -3263,11 +3637,13 @@ Module slice. [ M.read (| self |); BinOp.Panic.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" |) |) |) @@ -3293,7 +3669,15 @@ Module slice. [ M.read (| multiple_of_n |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| remainder |); M.read (| array_slice |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| remainder |)); + A.to_value (M.read (| array_slice |)) + ] + |) + |))) ] |) |))) @@ -3310,7 +3694,7 @@ Module slice. ArrayChunksMut::new(self) } *) - Definition array_chunks_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition array_chunks_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3319,19 +3703,21 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::slice::array_chunks_mut::N" |) - |)) - (Value.Integer Integer.Usize 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3347,18 +3733,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3385,7 +3781,7 @@ Module slice. ArrayWindows::new(self) } *) - Definition array_windows (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition array_windows (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3394,17 +3790,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| M.get_constant (| "core::slice::array_windows::N" |) |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| M.get_constant (| "core::slice::array_windows::N" |) |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3420,18 +3818,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "window size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "window size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3458,7 +3866,7 @@ Module slice. RChunks::new(self, chunk_size) } *) - Definition rchunks (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rchunks (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; chunk_size ] => @@ -3468,17 +3876,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| chunk_size |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| chunk_size |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3494,18 +3904,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3532,7 +3952,7 @@ Module slice. RChunksMut::new(self, chunk_size) } *) - Definition rchunks_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rchunks_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; chunk_size ] => @@ -3542,17 +3962,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| chunk_size |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| chunk_size |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3568,18 +3990,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3606,7 +4038,7 @@ Module slice. RChunksExact::new(self, chunk_size) } *) - Definition rchunks_exact (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rchunks_exact (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; chunk_size ] => @@ -3616,17 +4048,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| chunk_size |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| chunk_size |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3642,18 +4076,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3680,7 +4124,7 @@ Module slice. RChunksExactMut::new(self, chunk_size) } *) - Definition rchunks_exact_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rchunks_exact_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; chunk_size ] => @@ -3690,17 +4134,19 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.read (| chunk_size |)) - (Value.Integer Integer.Usize 0)) + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.read (| chunk_size |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3716,18 +4162,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "chunk size must be non-zero" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "chunk size must be non-zero" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3756,7 +4212,7 @@ Module slice. GroupBy::new(self, pred) } *) - Definition group_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition group_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -3786,7 +4242,7 @@ Module slice. GroupByMut::new(self, pred) } *) - Definition group_by_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition group_by_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -3816,7 +4272,7 @@ Module slice. unsafe { self.split_at_unchecked(mid) } } *) - Definition split_at (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; mid ] => @@ -3826,35 +4282,41 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| mid |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| mid |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: mid <= self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: mid <= self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3883,7 +4345,7 @@ Module slice. unsafe { self.split_at_mut_unchecked(mid) } } *) - Definition split_at_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; mid ] => @@ -3893,35 +4355,41 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| mid |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| mid |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: mid <= self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: mid <= self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3960,7 +4428,7 @@ Module slice. unsafe { (from_raw_parts(ptr, mid), from_raw_parts(ptr.add(mid), len - mid)) } } *) - Definition split_at_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; mid ] => @@ -3984,22 +4452,23 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le (M.read (| mid |)) (M.read (| len |))) + UnOp.Pure.not (| + BinOp.Pure.le (| M.read (| mid |), M.read (| len |) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4019,51 +4488,61 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::split_at_unchecked requires the index to be within the slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::split_at_unchecked requires the index to be within the slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::slice::raw::from_raw_parts", [ T ] |), - [ M.read (| ptr |); M.read (| mid |) ] - |); - M.call_closure (| - M.get_function (| "core::slice::raw::from_raw_parts", [ T ] |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "add", - [] - |), + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::slice::raw::from_raw_parts", [ T ] |), [ M.read (| ptr |); M.read (| mid |) ] - |); - BinOp.Panic.sub (| M.read (| len |), M.read (| mid |) |) - ] - |) - ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| "core::slice::raw::from_raw_parts", [ T ] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "add", + [] + |), + [ M.read (| ptr |); M.read (| mid |) ] + |); + BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| mid |) |) + ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -4090,7 +4569,7 @@ Module slice. unsafe { (from_raw_parts_mut(ptr, mid), from_raw_parts_mut(ptr.add(mid), len - mid)) } } *) - Definition split_at_mut_unchecked (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at_mut_unchecked (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; mid ] => @@ -4118,22 +4597,23 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le (M.read (| mid |)) (M.read (| len |))) + UnOp.Pure.not (| + BinOp.Pure.le (| M.read (| mid |), M.read (| len |) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4153,47 +4633,61 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "slice::split_at_mut_unchecked requires the index to be within the slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "slice::split_at_mut_unchecked requires the index to be within the slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::slice::raw::from_raw_parts_mut", [ T ] |), - [ M.read (| ptr |); M.read (| mid |) ] - |); - M.call_closure (| - M.get_function (| "core::slice::raw::from_raw_parts_mut", [ T ] |), - [ - M.call_closure (| - M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::slice::raw::from_raw_parts_mut", [ T ] |), [ M.read (| ptr |); M.read (| mid |) ] - |); - BinOp.Panic.sub (| M.read (| len |), M.read (| mid |) |) - ] - |) - ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| "core::slice::raw::from_raw_parts_mut", [ T ] |), + [ + M.call_closure (| + 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 |) |) + ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -4210,7 +4704,7 @@ Module slice. unsafe { (&*(a.as_ptr() as *const [T; N]), b) } } *) - Definition split_array_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_array_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4235,19 +4729,23 @@ Module slice. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_ptr", - [] - |), - [ M.read (| a |) ] - |)); - M.read (| b |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_ptr", + [] + |), + [ M.read (| a |) ] + |) + |)); + A.to_value (M.read (| b |)) + ] + |) |))) ] |) @@ -4266,7 +4764,7 @@ Module slice. unsafe { (&mut *(a.as_mut_ptr() as *mut [T; N]), b) } } *) - Definition split_array_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_array_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4295,19 +4793,23 @@ Module slice. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_mut_ptr", - [] - |), - [ M.read (| a |) ] - |)); - M.read (| b |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_mut_ptr", + [] + |), + [ M.read (| a |) ] + |) + |)); + A.to_value (M.read (| b |)) + ] + |) |))) ] |) @@ -4327,7 +4829,7 @@ Module slice. unsafe { (a, &*(b.as_ptr() as *const [T; N])) } } *) - Definition rsplit_array_ref (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit_array_ref (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4336,37 +4838,43 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| M.get_constant (| "core::slice::rsplit_array_ref::N" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: N <= self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: N <= self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -4376,6 +4884,7 @@ Module slice. [ M.read (| self |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -4385,27 +4894,31 @@ Module slice. ] |) |), - [ - 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 a := M.copy (| γ0_0 |) in - let b := M.copy (| γ0_1 |) in - M.alloc (| - Value.Tuple - [ - M.read (| a |); - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_ptr", - [] - |), - [ M.read (| b |) ] - |)) - ] + [ + 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 a := M.copy (| γ0_0 |) in + let b := M.copy (| γ0_1 |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_ptr", + [] + |), + [ M.read (| b |) ] + |) + |)) + ] + |) |))) ] |) @@ -4425,7 +4938,7 @@ Module slice. unsafe { (a, &mut *(b.as_mut_ptr() as *mut [T; N])) } } *) - Definition rsplit_array_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit_array_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -4434,37 +4947,43 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| M.get_constant (| "core::slice::rsplit_array_mut::N" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: N <= self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: N <= self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -4478,6 +4997,7 @@ Module slice. [ M.read (| self |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -4495,19 +5015,23 @@ Module slice. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| a |); - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_mut_ptr", - [] - |), - [ M.read (| b |) ] - |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_mut_ptr", + [] + |), + [ M.read (| b |) ] + |) + |)) + ] + |) |))) ] |) @@ -4527,7 +5051,7 @@ Module slice. Split::new(self, pred) } *) - Definition split (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -4557,7 +5081,7 @@ Module slice. SplitMut::new(self, pred) } *) - Definition split_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -4587,7 +5111,7 @@ Module slice. SplitInclusive::new(self, pred) } *) - Definition split_inclusive (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_inclusive (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -4617,7 +5141,7 @@ Module slice. SplitInclusiveMut::new(self, pred) } *) - Definition split_inclusive_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_inclusive_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -4647,7 +5171,7 @@ Module slice. RSplit::new(self, pred) } *) - Definition rsplit (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -4677,7 +5201,7 @@ Module slice. RSplitMut::new(self, pred) } *) - Definition rsplit_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -4707,7 +5231,7 @@ Module slice. SplitN::new(self.split(pred), n) } *) - Definition splitn (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition splitn (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; n; pred ] => @@ -4744,7 +5268,7 @@ Module slice. SplitNMut::new(self.split_mut(pred), n) } *) - Definition splitn_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition splitn_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; n; pred ] => @@ -4785,7 +5309,7 @@ Module slice. RSplitN::new(self.rsplit(pred), n) } *) - Definition rsplitn (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplitn (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; n; pred ] => @@ -4822,7 +5346,7 @@ Module slice. RSplitNMut::new(self.rsplit_mut(pred), n) } *) - Definition rsplitn_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplitn_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; n; pred ] => @@ -4864,7 +5388,7 @@ Module slice. Some((&self[..index], &self[index + 1..])) } *) - Definition split_once (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition split_once (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -4970,51 +5494,70 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| index |)) ] - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ Ty.apply (Ty.path "core::ops::range::RangeFrom") [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - BinOp.Panic.add (| - M.read (| index |), - Value.Integer Integer.Usize 1 - |)) - ] - ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| index |))) ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| index |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) + ] + |)) + ] + |)) + ] + |) |) |))) |))) @@ -5034,7 +5577,7 @@ Module slice. Some((&self[..index], &self[index + 1..])) } *) - Definition rsplit_once (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit_once (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; pred ] => @@ -5140,51 +5683,70 @@ Module slice. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| index |)) ] - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "slice") [ T ], - [ Ty.apply (Ty.path "core::ops::range::RangeFrom") [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - BinOp.Panic.add (| - M.read (| index |), - Value.Integer Integer.Usize 1 - |)) - ] - ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| index |))) ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| index |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) + ] + |)) + ] + |)) + ] + |) |) |))) |))) @@ -5203,7 +5765,7 @@ Module slice. cmp::SliceContains::slice_contains(x, self) } *) - Definition contains (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; x ] => @@ -5230,7 +5792,7 @@ Module slice. self.len() >= n && needle == &self[..n] } *) - Definition starts_with (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition starts_with (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; needle ] => @@ -5247,12 +5809,13 @@ Module slice. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) - (M.read (| n |)), + |), + M.read (| n |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -5275,9 +5838,11 @@ Module slice. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| n |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| n |))) ] + |) ] |) |) @@ -5302,7 +5867,7 @@ Module slice. m >= n && needle == &self[m - n..] } *) - Definition ends_with (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ends_with (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; needle ] => @@ -5312,17 +5877,29 @@ Module slice. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), - [ M.read (| self |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), - [ M.read (| needle |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| needle |) ] + |)) + ] + |) |), [ fun γ => @@ -5333,7 +5910,7 @@ Module slice. let n := M.copy (| γ0_1 |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.ge (M.read (| m |)) (M.read (| n |)), + BinOp.Pure.ge (| M.read (| m |), M.read (| n |) |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -5360,12 +5937,19 @@ Module slice. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - BinOp.Panic.sub (| M.read (| m |), M.read (| n |) |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| m |), + M.read (| n |) + |))) + ] + |) ] |) |) @@ -5400,7 +5984,7 @@ Module slice. None } *) - Definition strip_prefix (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; prefix ] => @@ -5426,23 +6010,24 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| n |)) - (M.call_closure (| + BinOp.Pure.le (| + M.read (| n |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5465,7 +6050,7 @@ Module slice. let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5498,22 +6083,26 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| tail |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tail |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -5540,7 +6129,7 @@ Module slice. None } *) - Definition strip_suffix (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; suffix ] => @@ -5559,25 +6148,29 @@ Module slice. |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| self |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| suffix |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| self |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| suffix |) ] + |)) + ] + |) |), [ fun γ => @@ -5588,14 +6181,14 @@ Module slice. let n := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| n |)) (M.read (| len |)) + BinOp.Pure.le (| M.read (| n |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -5612,7 +6205,11 @@ Module slice. |), [ M.read (| self |); - BinOp.Panic.sub (| M.read (| len |), M.read (| n |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| n |) + |) ] |) |), @@ -5624,7 +6221,7 @@ Module slice. let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5657,23 +6254,29 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| head |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| head |)) ] + |) |) |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -5693,7 +6296,7 @@ Module slice. self.binary_search_by(|p| p.cmp(x)) } *) - Definition binary_search (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition binary_search (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; x ] => @@ -5712,8 +6315,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5730,7 +6333,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -5782,7 +6386,7 @@ Module slice. Err(left) } *) - Definition binary_search_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition binary_search_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -5799,20 +6403,20 @@ Module slice. [ M.read (| self |) ] |) |) in - let left := M.alloc (| Value.Integer Integer.Usize 0 |) in + let left := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let right := M.copy (| size |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| left |)) (M.read (| right |)) + BinOp.Pure.lt (| M.read (| left |), M.read (| right |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -5822,10 +6426,12 @@ Module slice. let mid := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| left |), BinOp.Panic.div (| + Integer.Usize, M.read (| size |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) |) in @@ -5841,17 +6447,20 @@ Module slice. |), [ f; - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| self |); M.read (| mid |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ M.read (| self |); M.read (| mid |) ] + |)) + ] + |) ] |) |) in @@ -5860,7 +6469,7 @@ Module slice. left, M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5878,9 +6487,11 @@ Module slice. [ cmp; M.alloc (| - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) |) ] |) @@ -5892,8 +6503,9 @@ Module slice. |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| mid |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); fun γ => ltac:(M.monadic left) @@ -5906,7 +6518,7 @@ Module slice. right, M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5924,9 +6536,11 @@ Module slice. [ cmp; M.alloc (| - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) |) ] |) @@ -5944,7 +6558,7 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5962,9 +6576,11 @@ Module slice. [ cmp; M.alloc (| - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) |) ] |) @@ -5985,36 +6601,45 @@ Module slice. [] |), [ - BinOp.Pure.lt - (M.read (| mid |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| mid |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) + |) + |) ] |) |) in M.return_ (| - Value.StructTuple - "core::result::Result::Ok" - [ M.read (| mid |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| mid |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.write (| size, - BinOp.Panic.sub (| M.read (| right |), M.read (| left |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| right |), + M.read (| left |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -6024,7 +6649,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -6036,20 +6661,25 @@ Module slice. M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ - BinOp.Pure.le - (M.read (| left |)) - (M.call_closure (| + BinOp.Pure.le (| + M.read (| left |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) + |) + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| left |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Err" [ A.to_value (M.read (| left |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -6068,7 +6698,7 @@ Module slice. self.binary_search_by(|k| f(k).cmp(b)) } *) - Definition binary_search_by_key (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition binary_search_by_key (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ B; F ], [ self; b; f ] => @@ -6088,8 +6718,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6111,7 +6741,10 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| k |) ] ] + [ + f; + M.of_value (| Value.Tuple [ A.to_value (M.read (| k |)) ] |) + ] |) |); M.read (| b |) @@ -6120,7 +6753,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6138,7 +6772,7 @@ Module slice. sort::quicksort(self, T::lt); } *) - Definition sort_unstable (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sort_unstable (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6163,7 +6797,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6180,7 +6814,7 @@ Module slice. sort::quicksort(self, |a, b| compare(a, b) == Ordering::Less); } *) - Definition sort_unstable_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sort_unstable_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; compare ] => @@ -6202,8 +6836,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6245,12 +6879,20 @@ Module slice. |), [ compare; - Value.Tuple [ M.read (| a |); M.read (| b |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |) ] |) |); M.alloc (| - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) |) ] |))) @@ -6259,11 +6901,12 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6281,7 +6924,7 @@ Module slice. sort::quicksort(self, |a, b| f(a).lt(&f(b))); } *) - Definition sort_unstable_by_key (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition sort_unstable_by_key (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ K; F ], [ self; f ] => @@ -6303,8 +6946,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6338,7 +6981,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| a |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| a |)) ] + |) + ] |) |); M.alloc (| @@ -6350,7 +6998,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| b |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| b |)) ] + |) + ] |) |) ] @@ -6360,11 +7013,12 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6381,7 +7035,7 @@ Module slice. select::partition_at_index(self, index, T::lt) } *) - Definition select_nth_unstable (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition select_nth_unstable (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; index ] => @@ -6423,7 +7077,7 @@ Module slice. select::partition_at_index(self, index, |a: &T, b: &T| compare(a, b) == Less) } *) - Definition select_nth_unstable_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition select_nth_unstable_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; index; compare ] => @@ -6444,8 +7098,8 @@ Module slice. [ M.read (| self |); M.read (| index |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6487,12 +7141,20 @@ Module slice. |), [ compare; - Value.Tuple [ M.read (| a |); M.read (| b |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |) ] |) |); M.alloc (| - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) |) ] |))) @@ -6501,7 +7163,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6524,7 +7187,7 @@ Module slice. select::partition_at_index(self, index, |a: &T, b: &T| f(a).lt(&f(b))) } *) - Definition select_nth_unstable_by_key (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition select_nth_unstable_by_key (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ K; F ], [ self; index; f ] => @@ -6545,8 +7208,8 @@ Module slice. [ M.read (| self |); M.read (| index |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6580,7 +7243,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| a |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| a |)) ] + |) + ] |) |); M.alloc (| @@ -6592,7 +7260,12 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| b |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| b |)) ] + |) + ] |) |) ] @@ -6602,7 +7275,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6620,7 +7294,7 @@ Module slice. self.partition_dedup_by(|a, b| a == b) } *) - Definition partition_dedup (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_dedup (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -6638,8 +7312,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -6670,7 +7344,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6785,7 +7460,7 @@ Module slice. self.split_at_mut(next_write) } *) - Definition partition_dedup_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_dedup_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; same_bucket ] => @@ -6804,14 +7479,17 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| len |)) (Value.Integer Integer.Usize 1) + BinOp.Pure.le (| + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6819,16 +7497,22 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple - [ - M.read (| self |); - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ptr := @@ -6842,20 +7526,20 @@ Module slice. [ M.read (| self |) ] |) |) in - let next_read := M.alloc (| Value.Integer Integer.Usize 1 |) in - let next_write := M.alloc (| Value.Integer Integer.Usize 1 |) in + let next_read := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let next_write := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| next_read |)) (M.read (| len |)) + BinOp.Pure.lt (| M.read (| next_read |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -6884,23 +7568,24 @@ Module slice. [ M.read (| ptr |); BinOp.Panic.sub (| + Integer.Usize, M.read (| next_write |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -6916,13 +7601,16 @@ Module slice. |), [ same_bucket; - Value.Tuple - [ - M.read (| ptr_read |); - M.read (| prev_ptr_write |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| ptr_read |)); + A.to_value (M.read (| prev_ptr_write |)) + ] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6931,16 +7619,17 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| next_read |)) - (M.read (| next_write |)) + BinOp.Pure.ne (| + M.read (| next_read |), + M.read (| next_write |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6957,7 +7646,7 @@ Module slice. |), [ M.read (| prev_ptr_write |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -6974,9 +7663,10 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6984,12 +7674,15 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6997,11 +7690,12 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7011,7 +7705,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7046,7 +7740,7 @@ Module slice. self.partition_dedup_by(|a, b| key(a) == key(b)) } *) - Definition partition_dedup_by_key (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_dedup_by_key (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ K; F ], [ self; key ] => @@ -7065,8 +7759,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -7100,7 +7794,12 @@ Module slice. "call_mut", [] |), - [ key; Value.Tuple [ M.read (| a |) ] ] + [ + key; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| a |)) ] + |) + ] |) |); M.alloc (| @@ -7112,7 +7811,12 @@ Module slice. "call_mut", [] |), - [ key; Value.Tuple [ M.read (| b |) ] ] + [ + key; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| b |)) ] + |) + ] |) |) ] @@ -7122,7 +7826,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7145,7 +7850,7 @@ Module slice. } } *) - Definition rotate_left (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_left (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; mid ] => @@ -7155,40 +7860,47 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| mid |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| mid |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: mid <= self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: mid <= self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let k := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -7221,7 +7933,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7243,7 +7955,7 @@ Module slice. } } *) - Definition rotate_right (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition rotate_right (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; k ] => @@ -7253,40 +7965,47 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| k |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| k |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: k <= self.len()" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: k <= self.len()" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let mid := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -7319,7 +8038,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7336,7 +8055,7 @@ Module slice. specialize::SpecFill::spec_fill(self, value); } *) - Definition fill (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fill (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; value ] => @@ -7357,7 +8076,7 @@ Module slice. [ M.read (| self |); M.read (| value |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7376,7 +8095,7 @@ Module slice. } } *) - Definition fill_with (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fill_with (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -7442,13 +8161,13 @@ Module slice. "call_mut", [] |), - [ f; Value.Tuple [] ] + [ f; M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -7468,7 +8187,7 @@ Module slice. self.spec_clone_from(src); } *) - Definition clone_from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src ] => @@ -7489,7 +8208,7 @@ Module slice. [ M.read (| self |); M.read (| src |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7527,7 +8246,7 @@ Module slice. } } *) - Definition copy_from_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_from_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src ] => @@ -7537,30 +8256,31 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| src |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -7592,7 +8312,7 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -7623,7 +8343,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7651,7 +8371,7 @@ Module slice. } } *) - Definition copy_within (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition copy_within (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ R ], [ self; src; dest ] => @@ -7666,19 +8386,22 @@ Module slice. M.get_function (| "core::slice::index::range", [ R ] |), [ M.read (| src |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |), @@ -7701,21 +8424,26 @@ Module slice. let src_end := M.copy (| γ0_1 |) in let count := M.alloc (| - BinOp.Panic.sub (| M.read (| src_end |), M.read (| src_start |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| src_end |), + M.read (| src_start |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| dest |)) - (BinOp.Panic.sub (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| dest |), + BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -7725,7 +8453,9 @@ Module slice. [ M.read (| self |) ] |), M.read (| count |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7745,19 +8475,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "dest is out of bounds" |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "dest is out of bounds" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ptr := @@ -7798,13 +8537,13 @@ Module slice. M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| src_ptr |)); + (* MutToConstPointer *) M.pointer_coercion (| M.read (| src_ptr |) |); M.read (| dest_ptr |); M.read (| count |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -7826,7 +8565,7 @@ Module slice. } } *) - Definition swap_with_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap_with_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -7836,31 +8575,33 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| other |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -7876,23 +8617,29 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "destination and source slices have different lengths" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "destination and source slices have different lengths" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -7923,7 +8670,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7969,7 +8716,7 @@ Module slice. (us_len, ts_len) } *) - Definition align_to_offsets (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition align_to_offsets (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self ] => @@ -7981,6 +8728,7 @@ Module slice. let ts := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ U ] |), [] |), M.read (| gcd |) |) @@ -7988,6 +8736,7 @@ Module slice. let us := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |), M.read (| gcd |) |) @@ -7995,7 +8744,9 @@ Module slice. let us_len := M.alloc (| BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -8008,6 +8759,7 @@ Module slice. let ts_len := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] @@ -8015,7 +8767,11 @@ Module slice. M.read (| ts |) |) |) in - M.alloc (| Value.Tuple [ M.read (| us_len |); M.read (| ts_len |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| us_len |)); A.to_value (M.read (| ts_len |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -8060,7 +8816,7 @@ Module slice. } } *) - Definition align_to (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition align_to (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self ] => @@ -8071,7 +8827,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8094,18 +8850,27 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple - [ - M.read (| self |); - (* Unsize *) - M.pointer_coercion (M.alloc (| Value.Array [] |)); - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ptr := @@ -8130,33 +8895,44 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| offset |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| offset |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - M.read (| self |); - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)); - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -8197,65 +8973,71 @@ Module slice. let us_len := M.copy (| γ0_0 |) in let ts_len := M.copy (| γ0_1 |) in M.alloc (| - Value.Tuple - [ - M.read (| left |); - M.call_closure (| - M.get_function (| - "core::slice::raw::from_raw_parts", - [ U ] - |), - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_ptr", - [] - |), - [ M.read (| rest |) ] - |)); - M.read (| us_len |) - ] - |); - M.call_closure (| - M.get_function (| - "core::slice::raw::from_raw_parts", - [ T ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ T ], - "add", - [] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| left |)); + A.to_value + (M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts", + [ U ] |), [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "as_ptr", - [] - |), - [ M.read (| rest |) ] - |); - BinOp.Panic.sub (| + M.rust_cast (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], - "len", + "as_ptr", [] |), [ M.read (| rest |) ] + |) + |); + M.read (| us_len |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts", + [ T ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ T ], + "add", + [] |), - M.read (| ts_len |) - |) + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "as_ptr", + [] + |), + [ M.read (| rest |) ] + |); + BinOp.Panic.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 |) - ] - |) - ] + |)) + ] + |) |))) ] |))) @@ -8316,7 +9098,7 @@ Module slice. } } *) - Definition align_to_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition align_to_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U ], [ self ] => @@ -8327,7 +9109,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8350,18 +9132,27 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple - [ - M.read (| self |); - (* Unsize *) - M.pointer_coercion (M.alloc (| Value.Array [] |)); - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ptr := @@ -8386,33 +9177,44 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| offset |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| offset |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - M.read (| self |); - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)); - (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| self |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -8475,43 +9277,48 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - M.read (| left |); - M.call_closure (| - M.get_function (| - "core::slice::raw::from_raw_parts_mut", - [ U ] - |), - [ - M.rust_cast (M.read (| mut_ptr |)); - M.read (| us_len |) - ] - |); - M.call_closure (| - M.get_function (| - "core::slice::raw::from_raw_parts_mut", - [ T ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "add", - [] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| left |)); + A.to_value + (M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts_mut", + [ U ] |), [ - M.read (| mut_ptr |); - BinOp.Panic.sub (| - M.read (| rest_len |), - M.read (| ts_len |) - |) + M.rust_cast (| M.read (| mut_ptr |) |); + M.read (| us_len |) ] - |); - M.read (| ts_len |) - ] - |) - ] + |)); + A.to_value + (M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts_mut", + [ T ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "add", + [] + |), + [ + M.read (| mut_ptr |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| rest_len |), + M.read (| ts_len |) + |) + ] + |); + M.read (| ts_len |) + ] + |)) + ] + |) |))) ] |))) @@ -8545,7 +9352,7 @@ Module slice. unsafe { self.align_to() } } *) - Definition as_simd (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_simd (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8555,27 +9362,31 @@ Module slice. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of", - [ Ty.apply (Ty.path "core::core_simd::vector::Simd") [ T ] ] - |), - [] - |) - |); - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of", - [ Ty.apply (Ty.path "array") [ T ] ] - |), - [] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of", + [ Ty.apply (Ty.path "core::core_simd::vector::Simd") [ T ] ] + |), + [] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of", + [ Ty.apply (Ty.path "array") [ T ] ] + |), + [] + |) + |)) + ] + |) |), [ fun γ => @@ -8585,17 +9396,19 @@ Module slice. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8607,7 +9420,9 @@ Module slice. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -8619,14 +9434,16 @@ Module slice. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -8666,7 +9483,7 @@ Module slice. unsafe { self.align_to_mut() } } *) - Definition as_simd_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_simd_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8676,27 +9493,31 @@ Module slice. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of", - [ Ty.apply (Ty.path "core::core_simd::vector::Simd") [ T ] ] - |), - [] - |) - |); - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of", - [ Ty.apply (Ty.path "array") [ T ] ] - |), - [] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of", + [ Ty.apply (Ty.path "core::core_simd::vector::Simd") [ T ] ] + |), + [] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of", + [ Ty.apply (Ty.path "array") [ T ] ] + |), + [] + |) + |)) + ] + |) |), [ fun γ => @@ -8706,17 +9527,19 @@ Module slice. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8728,7 +9551,9 @@ Module slice. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -8740,14 +9565,16 @@ Module slice. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -8778,7 +9605,7 @@ Module slice. self.is_sorted_by(|a, b| a.partial_cmp(b)) } *) - Definition is_sorted (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sorted (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -8796,8 +9623,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -8828,7 +9655,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8846,7 +9674,7 @@ Module slice. self.array_windows().all(|[a, b]| compare(a, b).map_or(false, Ordering::is_le)) } *) - Definition is_sorted_by (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sorted_by (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; compare ] => @@ -8876,8 +9704,8 @@ Module slice. [ M.read (| self |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -8917,9 +9745,16 @@ Module slice. "call_mut", [] |), - [ compare; Value.Tuple [ M.read (| a |); M.read (| b |) ] ] + [ + compare; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| a |)); A.to_value (M.read (| b |)) + ] + |) + ] |); - Value.Bool false; + M.of_value (| Value.Bool false |); M.get_associated_function (| Ty.path "core::cmp::Ordering", "is_le", @@ -8930,7 +9765,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -8949,7 +9785,7 @@ Module slice. self.iter().is_sorted_by_key(f) } *) - Definition is_sorted_by_key (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_sorted_by_key (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F; K ], [ self; f ] => @@ -8987,7 +9823,7 @@ Module slice. self.binary_search_by(|x| if pred(x) { Less } else { Greater }).unwrap_or_else(|i| i) } *) - Definition partition_point (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_point (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ P ], [ self; pred ] => @@ -9013,8 +9849,8 @@ Module slice. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -9026,7 +9862,7 @@ Module slice. (let x := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9041,7 +9877,12 @@ Module slice. "call_mut", [] |), - [ pred; Value.Tuple [ M.read (| x |) ] ] + [ + pred; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| x |)) ] + |) + ] |) |)) in let _ := @@ -9050,12 +9891,16 @@ Module slice. Value.Bool true |) in M.alloc (| - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) |))) ] |) @@ -9063,11 +9908,12 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -9081,7 +9927,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -9110,7 +9957,7 @@ Module slice. } } *) - Definition take (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ R ], [ self; range ] => @@ -9200,23 +10047,24 @@ Module slice. let split_index := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| split_index |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| split_index |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| M.read (| self |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9227,12 +10075,15 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -9261,18 +10112,22 @@ Module slice. (let _ := M.write (| M.read (| self |), M.read (| back |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| front |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| front |)) ] + |) |))); fun γ => ltac:(M.monadic (let _ := M.write (| M.read (| self |), M.read (| front |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| back |)) ] + |) |))) ] |))) @@ -9311,7 +10166,7 @@ Module slice. } } *) - Definition take_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ R ], [ self; range ] => @@ -9401,23 +10256,24 @@ Module slice. let split_index := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| split_index |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| split_index |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| M.read (| self |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9428,12 +10284,15 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -9472,18 +10331,22 @@ Module slice. (let _ := M.write (| M.read (| self |), M.read (| back |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| front |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| front |)) ] + |) |))); fun γ => ltac:(M.monadic (let _ := M.write (| M.read (| self |), M.read (| front |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| back |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| back |)) ] + |) |))) ] |))) @@ -9507,7 +10370,7 @@ Module slice. Some(first) } *) - Definition take_first (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_first (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9602,7 +10465,11 @@ Module slice. let rem := M.copy (| γ0_1 |) in let _ := M.write (| M.read (| self |), M.read (| rem |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| first |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| first |)) ] + |) |))) ] |) @@ -9622,7 +10489,7 @@ Module slice. Some(first) } *) - Definition take_first_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_first_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9725,7 +10592,11 @@ Module slice. let rem := M.copy (| γ0_1 |) in let _ := M.write (| M.read (| self |), M.read (| rem |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| first |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| first |)) ] + |) |))) ] |) @@ -9745,7 +10616,7 @@ Module slice. Some(last) } *) - Definition take_last (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_last (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9840,7 +10711,11 @@ Module slice. let rem := M.copy (| γ0_1 |) in let _ := M.write (| M.read (| self |), M.read (| rem |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| last |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| last |)) ] + |) |))) ] |) @@ -9860,7 +10735,7 @@ Module slice. Some(last) } *) - Definition take_last_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition take_last_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -9963,7 +10838,11 @@ Module slice. let rem := M.copy (| γ0_1 |) in let _ := M.write (| M.read (| self |), M.read (| rem |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| last |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| last |)) ] + |) |))) ] |) @@ -10000,7 +10879,7 @@ Module slice. } } *) - Definition get_many_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_many_unchecked_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; indices ] => @@ -10048,15 +10927,18 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.get_constant (| "core::slice::get_many_unchecked_mut::N" |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.get_constant (| "core::slice::get_many_unchecked_mut::N" |) + |))) + ] + |) ] |) |), @@ -10106,7 +10988,7 @@ Module slice. [ Ty.path "usize" ] |), [ - (* Unsize *) M.pointer_coercion indices; + (* Unsize *) M.pointer_coercion (| indices |); M.read (| i |) ] |) @@ -10123,7 +11005,7 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion (M.read (| arr_ptr |)); + M.pointer_coercion (| M.read (| arr_ptr |) |); M.read (| i |) ] |), @@ -10138,10 +11020,10 @@ Module slice. [ M.read (| slice |); M.read (| idx |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -10178,7 +11060,7 @@ Module slice. unsafe { Ok(self.get_many_unchecked_mut(indices)) } } *) - Definition get_many_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_many_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; indices ] => @@ -10190,15 +11072,15 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::slice::get_many_check_valid", [] |), [ indices; @@ -10211,7 +11093,8 @@ Module slice. [ M.read (| self |) ] |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -10219,33 +11102,44 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::slice::GetManyMutError" - [ ("_private", Value.Tuple []) ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::slice::GetManyMutError" + [ + ("_private", + A.to_value (M.of_value (| Value.Tuple [] |))) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_many_unchecked_mut", - [] - |), - [ M.read (| self |); M.read (| indices |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_many_unchecked_mut", + [] + |), + [ M.read (| self |); M.read (| indices |) ] + |)) + ] + |) |) |))) |))) @@ -10274,7 +11168,7 @@ Module slice. unsafe { from_raw_parts(self.as_ptr().cast(), len) } } *) - Definition flatten (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition flatten (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10284,7 +11178,7 @@ Module slice. let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10316,7 +11210,7 @@ Module slice. M.read (| M.get_constant (| "core::slice::N" |) |) ] |); - M.read (| Value.String "slice len overflow" |) + M.read (| M.of_value (| Value.String "slice len overflow" |) |) ] |) |))); @@ -10387,7 +11281,7 @@ Module slice. unsafe { from_raw_parts_mut(self.as_mut_ptr().cast(), len) } } *) - Definition flatten_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition flatten_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10397,7 +11291,7 @@ Module slice. let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10429,7 +11323,7 @@ Module slice. M.read (| M.get_constant (| "core::slice::N" |) |) ] |); - M.read (| Value.String "slice len overflow" |) + M.read (| M.of_value (| Value.String "slice len overflow" |) |) ] |) |))); @@ -10496,7 +11390,7 @@ Module slice. self.sort_unstable_by(f32::total_cmp); } *) - Definition sort_floats (τ : list Ty.t) (α : list Value.t) : M := + Definition sort_floats (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10523,7 +11417,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10539,7 +11433,7 @@ Module slice. self.sort_unstable_by(f64::total_cmp); } *) - Definition sort_floats (τ : list Ty.t) (α : list Value.t) : M := + Definition sort_floats (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10566,7 +11460,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10593,7 +11487,7 @@ Module slice. } } *) - Definition spec_clone_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_clone_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src ] => @@ -10603,31 +11497,33 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| src |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -10643,23 +11539,29 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "destination and source slices have different lengths" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "destination and source slices have different lengths" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := @@ -10681,7 +11583,11 @@ Module slice. |), [ M.read (| src |); - Value.StructRecord "core::ops::range::RangeTo" [ ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| len |))) ] + |) ] |) |) in @@ -10697,9 +11603,14 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.Usize 0); ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) ] |) |), @@ -10754,10 +11665,10 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -10782,7 +11693,7 @@ Module slice. self.copy_from_slice(src); } *) - Definition spec_clone_from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_clone_from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; src ] => @@ -10801,7 +11712,7 @@ Module slice. [ M.read (| self |); M.read (| src |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10824,10 +11735,12 @@ Module slice. &[] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with - | [], [] => ltac:(M.monadic (* Unsize *) (M.pointer_coercion (M.alloc (| Value.Array [] |)))) + | [], [] => + ltac:(M.monadic + (* Unsize *) (M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |))) | _, _ => M.impossible end. @@ -10849,10 +11762,12 @@ Module slice. &mut [] } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with - | [], [] => ltac:(M.monadic (* Unsize *) (M.pointer_coercion (M.alloc (| Value.Array [] |)))) + | [], [] => + ltac:(M.monadic + (* Unsize *) (M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |))) | _, _ => M.impossible end. @@ -10879,7 +11794,7 @@ Module slice. self } *) - Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -10910,13 +11825,13 @@ Module slice. self } *) - Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - (* Unsize *) M.pointer_coercion (M.read (| self |)))) + (* Unsize *) M.pointer_coercion (| M.read (| self |) |))) | _, _ => M.impossible end. @@ -10944,14 +11859,14 @@ Module slice. valid } *) - Definition get_many_check_valid (τ : list Ty.t) (α : list Value.t) : M := + Definition get_many_check_valid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ indices; len ] => ltac:(M.monadic (let indices := M.alloc (| indices |) in let len := M.alloc (| len |) in M.read (| - let valid := M.alloc (| Value.Bool true |) in + let valid := M.alloc (| M.of_value (| Value.Bool true |) |) in let _ := M.use (M.match_operator (| @@ -10982,7 +11897,7 @@ Module slice. "iter", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| indices |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| indices |) |) ] |) ] |) @@ -11036,9 +11951,10 @@ Module slice. let β := valid in M.write (| β, - BinOp.Pure.bit_and - (M.read (| β |)) - (BinOp.Pure.lt (M.read (| idx |)) (M.read (| len |))) + BinOp.Pure.bit_and (| + M.read (| β |), + BinOp.Pure.lt (| M.read (| idx |), M.read (| len |) |) + |) |) in M.use (M.match_operator (| @@ -11068,9 +11984,11 @@ Module slice. |), [ M.read (| indices |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| i |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| i |))) ] + |) ] |) ] @@ -11120,22 +12038,26 @@ Module slice. let β := valid in M.write (| β, - BinOp.Pure.bit_and - (M.read (| β |)) - (BinOp.Pure.ne - (M.read (| idx |)) - (M.read (| idx2 |))) + BinOp.Pure.bit_and (| + M.read (| β |), + BinOp.Pure.ne (| + M.read (| idx |), + M.read (| idx2 |) + |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -11159,7 +12081,7 @@ Module slice. f.debug_struct("GetManyMutError").finish_non_exhaustive() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -11179,7 +12101,7 @@ Module slice. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "GetManyMutError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "GetManyMutError" |) |) ] |) |) ] @@ -11203,7 +12125,7 @@ Module slice. fmt::Display::fmt("an index is out of bounds or appeared multiple times in the array", f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -11213,7 +12135,9 @@ Module slice. M.get_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |), [ M.read (| - Value.String "an index is out of bounds or appeared multiple times in the array" + M.of_value (| + Value.String "an index is out of bounds or appeared multiple times in the array" + |) |); M.read (| f |) ] diff --git a/CoqOfRust/core/slice/raw.v b/CoqOfRust/core/slice/raw.v index 4a2b98ac7..728742e28 100644 --- a/CoqOfRust/core/slice/raw.v +++ b/CoqOfRust/core/slice/raw.v @@ -16,7 +16,7 @@ Module slice. } } *) - Definition from_raw_parts (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_parts (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ data; len ] => ltac:(M.monadic @@ -25,11 +25,11 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -48,14 +48,17 @@ Module slice. ] |), [ - Value.Tuple [ M.read (| data |); M.read (| len |) ]; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| data |)); A.to_value (M.read (| len |)) ] + |); M.get_function (| "core::slice::raw::from_raw_parts.comptime", [] |); M.get_function (| "core::slice::raw::from_raw_parts.runtime", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -81,7 +84,7 @@ Module slice. } } *) - Definition from_raw_parts_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw_parts_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ data; len ] => ltac:(M.monadic @@ -90,11 +93,11 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -113,7 +116,10 @@ Module slice. ] |), [ - Value.Tuple [ M.read (| data |); M.read (| len |) ]; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| data |)); A.to_value (M.read (| len |)) ] + |); M.get_function (| "core::slice::raw::from_raw_parts_mut.comptime", [] @@ -125,8 +131,8 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -144,17 +150,18 @@ Module slice. array::from_ref(s) } *) - Definition from_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_function (| "core::array::from_ref", [ T ] |), [ M.read (| s |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -163,17 +170,18 @@ Module slice. array::from_mut(s) } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_function (| "core::array::from_mut", [ T ] |), [ M.read (| s |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -183,7 +191,7 @@ Module slice. unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) } } *) - Definition from_ptr_range (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr_range (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ range ] => ltac:(M.monadic @@ -224,7 +232,7 @@ Module slice. unsafe { from_raw_parts_mut(range.start, range.end.sub_ptr(range.start)) } } *) - Definition from_mut_ptr_range (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_ptr_range (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ range ] => ltac:(M.monadic @@ -246,14 +254,15 @@ Module slice. |) |); (* MutToConstPointer *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| range, "core::ops::range::Range", "start" |) - |)) + |) + |) ] |) ] diff --git a/CoqOfRust/core/slice/rotate.v b/CoqOfRust/core/slice/rotate.v index 28477cad6..1a56641b1 100644 --- a/CoqOfRust/core/slice/rotate.v +++ b/CoqOfRust/core/slice/rotate.v @@ -176,7 +176,7 @@ Module slice. } } *) - Definition ptr_rotate (τ : list Ty.t) (α : list Value.t) : M := + Definition ptr_rotate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ _ as left; mid; _ as right ] => ltac:(M.monadic @@ -188,7 +188,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -197,9 +197,11 @@ Module slice. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -209,7 +211,7 @@ Module slice. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -217,13 +219,15 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (M.read (| right |)) - (Value.Integer Integer.Usize 0), + BinOp.Pure.eq (| + M.read (| right |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| left |)) - (Value.Integer Integer.Usize 0))) + (BinOp.Pure.eq (| + M.read (| left |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -233,14 +237,15 @@ Module slice. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Tuple [] |) |) + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -248,25 +253,28 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt - (BinOp.Panic.add (| + BinOp.Pure.lt (| + BinOp.Panic.add (| + Integer.Usize, M.read (| left |), M.read (| right |) - |)) - (Value.Integer Integer.Usize 24), + |), + M.of_value (| Value.Integer 24 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.call_closure (| + (BinOp.Pure.gt (| + 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.apply (Ty.path "array") [ Ty.path "usize" ] ] |), [] - |)))) + |) + |))) |) |)) in let _ := @@ -327,16 +335,17 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| i |)) - (M.read (| left |)) + BinOp.Pure.ge (| + M.read (| i |), + M.read (| left |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -348,24 +357,28 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| left |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| i |)) - (Value.Integer - Integer.Usize - 0) + BinOp.Pure.eq (| + M.read (| i |), + M.of_value (| + Value.Integer 0 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -397,20 +410,25 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| i |)) - (M.read (| gcd |)) + BinOp.Pure.lt (| + M.read (| i |), + M.read (| gcd |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -419,10 +437,14 @@ Module slice. |) in let _ := M.write (| gcd, M.read (| i |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => @@ -432,11 +454,14 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| right |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) |) in @@ -455,12 +480,16 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 1); - ("end_", M.read (| gcd |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 1 |))); + ("end_", A.to_value (M.read (| gcd |))) + ] + |) ] |) |), @@ -536,6 +565,7 @@ Module slice. M.write (| i, BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| right |) |) @@ -573,7 +603,9 @@ Module slice. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -581,13 +613,14 @@ Module slice. (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| i - |)) - (M.read (| + |), + M.read (| left - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -599,6 +632,7 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| left @@ -607,7 +641,9 @@ Module slice. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -615,13 +651,14 @@ Module slice. (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| i - |)) - (M.read (| + |), + M.read (| start - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -681,8 +718,10 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))); @@ -693,6 +732,7 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| right @@ -700,40 +740,45 @@ Module slice. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), [ M.read (| left |); M.read (| right |) ] - |)) - (BinOp.Panic.div (| + |), + BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_function (| "core::mem::size_of", @@ -752,7 +797,8 @@ Module slice. |), [] |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -786,8 +832,8 @@ Module slice. |) in let buf := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -805,7 +851,8 @@ Module slice. [] |), [ rawarray ] - |)) + |) + |) |) in let dim := M.alloc (| @@ -830,16 +877,17 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| left |)) - (M.read (| right |)) + BinOp.Pure.le (| + M.read (| left |), + M.read (| right |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -855,8 +903,8 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -868,7 +916,8 @@ Module slice. M.read (| mid |); M.read (| left |) ] - |)); + |) + |); M.read (| buf |); M.read (| left |) ] @@ -883,8 +932,9 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.read (| mid |)); + M.pointer_coercion (| + M.read (| mid |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -911,14 +961,17 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.read (| buf |)); + M.pointer_coercion (| + M.read (| buf |) + |); M.read (| dim |); M.read (| left |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -930,8 +983,9 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.read (| mid |)); + M.pointer_coercion (| + M.read (| mid |) + |); M.read (| buf |); M.read (| right |) ] @@ -946,8 +1000,8 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -959,7 +1013,8 @@ Module slice. M.read (| mid |); M.read (| left |) ] - |)); + |) + |); M.read (| dim |); M.read (| left |) ] @@ -974,8 +1029,9 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.read (| buf |)); + M.pointer_coercion (| + M.read (| buf |) + |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -993,26 +1049,29 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| left |)) - (M.read (| right |)) + BinOp.Pure.ge (| + M.read (| left |), + M.read (| right |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1059,27 +1118,33 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in let _ := let β := left in M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| right |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| left |)) - (M.read (| right |)) + BinOp.Pure.lt (| + M.read (| left |), + M.read (| right |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1093,7 +1158,9 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) |))); @@ -1139,27 +1206,33 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in let _ := let β := right in M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| left |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| right |)) - (M.read (| left |)) + BinOp.Pure.lt (| + M.read (| right |), + M.read (| left |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1173,7 +1246,9 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) |))) diff --git a/CoqOfRust/core/slice/select.v b/CoqOfRust/core/slice/select.v index d31d1ab24..da650b120 100644 --- a/CoqOfRust/core/slice/select.v +++ b/CoqOfRust/core/slice/select.v @@ -3,8 +3,8 @@ Require Import CoqOfRust.CoqOfRust. Module slice. Module select. - Definition value_MAX_INSERTION : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 10 |))). + Definition value_MAX_INSERTION : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). (* fn partition_at_index_loop<'a, T, F>( @@ -91,7 +91,7 @@ Module slice. } } *) - Definition partition_at_index_loop (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_at_index_loop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; index; is_less; pred ] => ltac:(M.monadic @@ -102,8 +102,8 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let limit := M.alloc (| Value.Integer Integer.I32 16 |) in - let was_balanced := M.alloc (| Value.Bool true |) in + let limit := M.alloc (| M.of_value (| Value.Integer 16 |) |) in + let was_balanced := M.alloc (| M.of_value (| Value.Bool true |) |) in M.alloc (| M.never_to_any (| M.read (| @@ -111,27 +111,28 @@ Module slice. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::slice::select::MAX_INSERTION" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -143,23 +144,24 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -175,35 +177,38 @@ Module slice. |), [ M.read (| v |); - Value.Integer Integer.Usize 1; + M.of_value (| Value.Integer 1 |); M.read (| is_less |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| limit |)) - (Value.Integer Integer.I32 0) + BinOp.Pure.eq (| + M.read (| limit |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -227,22 +232,25 @@ Module slice. ] |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| UnOp.Pure.not (M.read (| was_balanced |)) |)) in + (M.alloc (| + UnOp.Pure.not (| M.read (| was_balanced |) |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -263,12 +271,14 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.I32, M.read (| β |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -286,7 +296,7 @@ Module slice. let pivot := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -299,15 +309,15 @@ Module slice. |) in let p := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -323,16 +333,20 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| p |); - M.SubPointer.get_array_field (| - M.read (| v |), - pivot - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| p |)); + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + pivot + |)) + ] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -358,16 +372,19 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| mid |)) - (M.read (| index |)) + BinOp.Pure.gt (| + M.read (| mid |), + M.read (| index |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -378,14 +395,20 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) ] |) in let _ := @@ -406,9 +429,15 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| mid |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| mid |))) + ] + |) ] |) |) in @@ -416,6 +445,7 @@ Module slice. M.write (| index, BinOp.Panic.sub (| + Integer.Usize, M.read (| index |), M.read (| mid |) |) @@ -423,19 +453,24 @@ Module slice. let _ := M.write (| pred, - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) in M.continue (||) |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -457,8 +492,8 @@ Module slice. let _ := M.write (| was_balanced, - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] @@ -466,6 +501,7 @@ Module slice. [ M.read (| mid |); BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -477,8 +513,9 @@ Module slice. M.read (| mid |) |) ] - |)) - (BinOp.Panic.div (| + |), + BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -487,8 +524,9 @@ Module slice. |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 8 - |)) + M.of_value (| Value.Integer 8 |) + |) + |) |) in M.match_operator (| M.alloc (| @@ -520,7 +558,7 @@ Module slice. |), [ M.read (| right |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |), @@ -544,21 +582,24 @@ Module slice. M.SubPointer.get_array_field (| M.read (| pivot |), M.alloc (| - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| mid |)) - (M.read (| index |)) + BinOp.Pure.lt (| + M.read (| mid |), + M.read (| index |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -574,38 +615,50 @@ Module slice. M.write (| index, BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| index |), M.read (| mid |) |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in let _ := M.write (| pred, - Value.StructTuple - "core::option::Option::Some" - [ M.read (| pivot |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| pivot |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| mid |)) - (M.read (| - index - |)) + BinOp.Pure.gt (| + M.read (| mid |), + M.read (| index |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -618,7 +671,9 @@ Module slice. M.read (| left |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic @@ -626,7 +681,9 @@ Module slice. M.never_to_any (| M.read (| M.return_ (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |) |) |) @@ -661,7 +718,7 @@ Module slice. .map(|(i, _)| i) } *) - Definition min_index (τ : list Ty.t) (α : list Value.t) : M := + Definition min_index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ slice; is_less ] => ltac:(M.monadic @@ -721,8 +778,8 @@ Module slice. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -740,7 +797,7 @@ Module slice. (let t := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -763,21 +820,25 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| - M.SubPointer.get_tuple_field (| - t, - 1 - |) - |); - M.read (| - M.SubPointer.get_tuple_field (| - acc, - 1 - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_tuple_field (| + t, + 1 + |) + |)); + A.to_value + (M.read (| + M.SubPointer.get_tuple_field (| + acc, + 1 + |) + |)) + ] + |) ] |) |)) in @@ -796,11 +857,12 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -816,7 +878,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -831,7 +894,7 @@ Module slice. .map(|(i, _)| i) } *) - Definition max_index (τ : list Ty.t) (α : list Value.t) : M := + Definition max_index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ slice; is_less ] => ltac:(M.monadic @@ -891,8 +954,8 @@ Module slice. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -910,7 +973,7 @@ Module slice. (let t := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -933,21 +996,25 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| - M.SubPointer.get_tuple_field (| - acc, - 1 - |) - |); - M.read (| - M.SubPointer.get_tuple_field (| - t, - 1 - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_tuple_field (| + acc, + 1 + |) + |)); + A.to_value + (M.read (| + M.SubPointer.get_tuple_field (| + t, + 1 + |) + |)) + ] + |) ] |) |)) in @@ -966,11 +1033,12 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -986,7 +1054,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1027,7 +1096,7 @@ Module slice. (left, pivot, right) } *) - Definition partition_at_index (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_at_index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; index; is_less ] => ltac:(M.monadic @@ -1037,23 +1106,24 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| index |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| index |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1069,80 +1139,99 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "partition_at_index index " |); - M.read (| Value.String " greater than length of slice " |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ index ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| v |) ] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "partition_at_index index " |) - |) - ] - |) - ] - |)) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " greater than length of slice " + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ index ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| v |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (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 - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| index |)) - (BinOp.Panic.sub (| + BinOp.Pure.eq (| + M.read (| index |), + BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1151,8 +1240,9 @@ Module slice. |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1189,20 +1279,21 @@ Module slice. [ M.read (| v |); M.read (| max_idx |); M.read (| index |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| index |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| index |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1245,7 +1336,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1259,11 +1350,13 @@ Module slice. M.read (| v |); M.read (| index |); is_less; - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -1296,7 +1389,7 @@ Module slice. "split_at_mut", [] |), - [ M.read (| right |); Value.Integer Integer.Usize 1 ] + [ M.read (| right |); M.of_value (| Value.Integer 1 |) ] |) |), [ @@ -1310,12 +1403,18 @@ Module slice. M.alloc (| M.SubPointer.get_array_field (| M.read (| pivot |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |) in M.alloc (| - Value.Tuple - [ M.read (| left |); M.read (| pivot |); M.read (| right |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| left |)); + A.to_value (M.read (| pivot |)); + A.to_value (M.read (| right |)) + ] + |) |))) ] |))) @@ -1373,7 +1472,7 @@ Module slice. } } *) - Definition median_of_medians (τ : list Ty.t) (α : list Value.t) : M := + Definition median_of_medians (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less; k ] => ltac:(M.monadic @@ -1385,33 +1484,35 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| k |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| k |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1424,44 +1525,49 @@ Module slice. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: k < v.len()" + M.of_value (| + Value.String "assertion failed: k < v.len()" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.read (| M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1472,16 +1578,22 @@ Module slice. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: !T::IS_ZST" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: !T::IS_ZST" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -1491,27 +1603,28 @@ Module slice. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::slice::select::MAX_INSERTION" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1523,23 +1636,24 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1555,35 +1669,38 @@ Module slice. |), [ M.read (| v |); - Value.Integer Integer.Usize 1; + M.of_value (| Value.Integer 1 |); M.read (| is_less |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| k |)) - (BinOp.Panic.sub (| + BinOp.Pure.eq (| + M.read (| k |), + BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1592,8 +1709,9 @@ Module slice. |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1639,23 +1757,24 @@ Module slice. ] |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| k |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| k |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1701,11 +1820,13 @@ Module slice. ] |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -1721,14 +1842,14 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| p |)) (M.read (| k |)) + BinOp.Pure.eq (| M.read (| p |), M.read (| k |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1736,19 +1857,21 @@ Module slice. Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| p |)) (M.read (| k |)) + BinOp.Pure.gt (| M.read (| p |), M.read (| k |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1772,13 +1895,15 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| p |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| p |))) ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1798,15 +1923,19 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - BinOp.Panic.add (| - M.read (| p |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| p |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |) in @@ -1815,14 +1944,16 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), BinOp.Panic.add (| + Integer.Usize, M.read (| p |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -1863,7 +1994,7 @@ Module slice. partition(v, lo + pivot, is_less).0 } *) - Definition median_of_ninthers (τ : list Ty.t) (α : list Value.t) : M := + Definition median_of_ninthers (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less ] => ltac:(M.monadic @@ -1873,28 +2004,30 @@ Module slice. let frac := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |)) - (Value.Integer Integer.Usize 1024) + |), + M.of_value (| Value.Integer 1024 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1903,39 +2036,40 @@ Module slice. |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 12 + M.of_value (| Value.Integer 12 |) |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_mul", [] |), [ - Value.Integer Integer.Usize 128; - Value.Integer Integer.Usize 1024 + M.of_value (| Value.Integer 128 |); + M.of_value (| Value.Integer 1024 |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1944,6 +2078,7 @@ Module slice. |) in M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1952,13 +2087,14 @@ Module slice. |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 64 + M.of_value (| Value.Integer 64 |) |) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -1967,7 +2103,7 @@ Module slice. |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 1024 + M.of_value (| Value.Integer 1024 |) |) |))) ] @@ -1977,46 +2113,70 @@ Module slice. |) in let pivot := M.alloc (| - BinOp.Panic.div (| M.read (| frac |), Value.Integer Integer.Usize 2 |) + BinOp.Panic.div (| + Integer.Usize, + M.read (| frac |), + M.of_value (| Value.Integer 2 |) + |) |) in let lo := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |), M.read (| pivot |) |) |) in - let hi := M.alloc (| BinOp.Panic.add (| M.read (| frac |), M.read (| lo |) |) |) in + let hi := + M.alloc (| + BinOp.Panic.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 (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |), - BinOp.Panic.mul (| Value.Integer Integer.Usize 9, M.read (| frac |) |) + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 9 |), + M.read (| frac |) + |) |), - Value.Integer Integer.Usize 4 + M.of_value (| Value.Integer 4 |) |) |) in let a := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| lo |), - BinOp.Panic.mul (| Value.Integer Integer.Usize 4, M.read (| frac |) |) + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 4 |), + M.read (| frac |) + |) |), M.read (| gap |) |) |) in - let b := M.alloc (| BinOp.Panic.add (| M.read (| hi |), M.read (| gap |) |) |) in + let b := + M.alloc (| + BinOp.Panic.add (| Integer.Usize, M.read (| hi |), M.read (| gap |) |) + |) in let _ := M.use (M.match_operator (| @@ -2030,9 +2190,14 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| lo |)); ("end_", M.read (| hi |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| lo |))); + ("end_", A.to_value (M.read (| hi |))) + ] + |) ] |) |), @@ -2085,30 +2250,36 @@ Module slice. M.read (| is_less |); M.read (| a |); BinOp.Panic.sub (| + Integer.Usize, M.read (| i |), M.read (| frac |) |); M.read (| b |); BinOp.Panic.add (| + Integer.Usize, M.read (| a |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); M.read (| i |); BinOp.Panic.add (| + Integer.Usize, M.read (| b |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); BinOp.Panic.add (| + Integer.Usize, M.read (| a |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |); BinOp.Panic.add (| + Integer.Usize, M.read (| i |), M.read (| frac |) |); BinOp.Panic.add (| + Integer.Usize, M.read (| b |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) ] |) @@ -2118,8 +2289,9 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 3 + M.of_value (| Value.Integer 3 |) |) |) in let _ := @@ -2127,14 +2299,15 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 3 + M.of_value (| Value.Integer 3 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2153,12 +2326,20 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| lo |)); - ("end_", BinOp.Panic.add (| M.read (| lo |), M.read (| frac |) |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| lo |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| lo |), + M.read (| frac |) + |))) + ] + |) ] |); M.read (| is_less |); @@ -2172,7 +2353,7 @@ Module slice. M.get_function (| "core::slice::sort::partition", [ T; F ] |), [ M.read (| v |); - BinOp.Panic.add (| M.read (| lo |), M.read (| pivot |) |); + BinOp.Panic.add (| Integer.Usize, M.read (| lo |), M.read (| pivot |) |); M.read (| is_less |) ] |) @@ -2226,7 +2407,7 @@ Module slice. v.swap(d, e); } *) - Definition ninther (τ : list Ty.t) (α : list Value.t) : M := + Definition ninther (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less; a; b; c; d; e; f; g; h; i ] => ltac:(M.monadic @@ -2274,7 +2455,7 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2295,11 +2476,15 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| M.read (| v |), h |); - M.SubPointer.get_array_field (| M.read (| v |), b |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), h |)); + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), b |)) + ] + |) ] |) |)) in @@ -2312,13 +2497,13 @@ Module slice. [ b; h ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2339,11 +2524,15 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| M.read (| v |), f |); - M.SubPointer.get_array_field (| M.read (| v |), d |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), f |)); + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), d |)) + ] + |) ] |) |)) in @@ -2356,13 +2545,13 @@ Module slice. [ d; f ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2383,21 +2572,25 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| M.read (| v |), e |); - M.SubPointer.get_array_field (| M.read (| v |), d |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), e |)); + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), d |)) + ] + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2420,14 +2613,21 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| - M.read (| v |), - f - |); - M.SubPointer.get_array_field (| M.read (| v |), e |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + f + |)); + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + e + |)) + ] + |) ] |) |)) in @@ -2437,7 +2637,7 @@ Module slice. Value.Bool true |) in let _ := M.write (| d, M.read (| f |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2445,7 +2645,7 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2468,17 +2668,21 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| - M.read (| v |), - e - |); - M.SubPointer.get_array_field (| - M.read (| v |), - b - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + e + |)); + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + b + |)) + ] + |) ] |) |)) in @@ -2502,11 +2706,11 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2533,17 +2737,21 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| - M.read (| v |), - h - |); - M.SubPointer.get_array_field (| - M.read (| v |), - e - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + h + |)); + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + e + |)) + ] + |) ] |) |)) in @@ -2567,15 +2775,19 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2585,7 +2797,7 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2606,22 +2818,26 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| M.read (| v |), d |); - M.SubPointer.get_array_field (| M.read (| v |), b |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), d |)); + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), b |)) + ] + |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.write (| d, M.read (| b |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2644,14 +2860,21 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| - M.read (| v |), - h - |); - M.SubPointer.get_array_field (| M.read (| v |), d |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + h + |)); + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + d + |)) + ] + |) ] |) |)) in @@ -2661,8 +2884,9 @@ Module slice. Value.Bool true |) in let _ := M.write (| d, M.read (| h |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -2674,7 +2898,7 @@ Module slice. [ M.read (| v |); M.read (| d |); M.read (| e |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -2700,7 +2924,7 @@ Module slice. b } *) - Definition median_idx (τ : list Ty.t) (α : list Value.t) : M := + Definition median_idx (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less; a; b; c ] => ltac:(M.monadic @@ -2714,7 +2938,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2735,11 +2959,15 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| M.read (| v |), c |); - M.SubPointer.get_array_field (| M.read (| v |), a |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), c |)); + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), a |)) + ] + |) ] |) |)) in @@ -2752,13 +2980,13 @@ Module slice. [ a; c ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2779,11 +3007,15 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| M.read (| v |), c |); - M.SubPointer.get_array_field (| M.read (| v |), b |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), c |)); + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), b |)) + ] + |) ] |) |)) in @@ -2792,12 +3024,12 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| c |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2818,11 +3050,15 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.SubPointer.get_array_field (| M.read (| v |), b |); - M.SubPointer.get_array_field (| M.read (| v |), a |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), b |)); + A.to_value + (M.SubPointer.get_array_field (| M.read (| v |), a |)) + ] + |) ] |) |)) in @@ -2831,7 +3067,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| a |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in b diff --git a/CoqOfRust/core/slice/sort.v b/CoqOfRust/core/slice/sort.v index b7b96c2bd..af02a0db1 100644 --- a/CoqOfRust/core/slice/sort.v +++ b/CoqOfRust/core/slice/sort.v @@ -25,7 +25,7 @@ Module slice. } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -51,11 +51,11 @@ Module slice. "dest" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -120,7 +120,7 @@ Module slice. } } *) - Definition insert_tail (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_tail (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less ] => ltac:(M.monadic @@ -129,32 +129,34 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |)) - (Value.Integer Integer.Usize 2)) + |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -165,15 +167,22 @@ Module slice. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: v.len() >= 2" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: v.len() >= 2" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let arr_ptr := @@ -190,11 +199,12 @@ Module slice. let i := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let i_ptr := @@ -205,7 +215,7 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -225,18 +235,21 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| i_ptr |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "sub", - [] - |), - [ M.read (| i_ptr |); Value.Integer Integer.Usize 1 ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| i_ptr |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "sub", + [] + |), + [ M.read (| i_ptr |); M.of_value (| Value.Integer 1 |) ] + |)) + ] + |) ] |) |)) in @@ -252,37 +265,44 @@ Module slice. [ M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| i_ptr |)) ] + [ (* MutToConstPointer *) M.pointer_coercion (| M.read (| i_ptr |) |) + ] |) ] |) |) in let hole := M.alloc (| - Value.StructRecord - "core::slice::sort::InsertionHole" - [ - ("src", - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ], - [], - "deref", - [] - |), - [ tmp ] - |)); - ("dest", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "sub", - [] - |), - [ M.read (| i_ptr |); Value.Integer Integer.Usize 1 ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::sort::InsertionHole" + [ + ("src", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ T ], + [], + "deref", + [] + |), + [ tmp ] + |))); + ("dest", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "sub", + [] + |), + [ M.read (| i_ptr |); M.of_value (| Value.Integer 1 |) ] + |))) + ] + |) |) in let _ := M.alloc (| @@ -290,16 +310,17 @@ Module slice. M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| hole, "core::slice::sort::InsertionHole", "dest" |) - |)); + |) + |); M.read (| i_ptr |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -327,16 +348,20 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - M.read (| i |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) ] @@ -396,15 +421,15 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -422,25 +447,30 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ T ], - [], - "deref", - [] - |), - [ tmp ] - |); - M.read (| j_ptr |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ T ], + [], + "deref", + [] + |), + [ tmp ] + |)); + A.to_value + (M.read (| j_ptr |)) + ] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -453,7 +483,10 @@ Module slice. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -465,7 +498,7 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion (M.read (| j_ptr |)); + M.pointer_coercion (| M.read (| j_ptr |) |); M.read (| M.SubPointer.get_struct_record_field (| hole, @@ -473,7 +506,7 @@ Module slice. "dest" |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -486,14 +519,14 @@ Module slice. |), M.read (| j_ptr |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -556,7 +589,7 @@ Module slice. } } *) - Definition insert_head (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_head (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less ] => ltac:(M.monadic @@ -565,32 +598,34 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |)) - (Value.Integer Integer.Usize 2)) + |), + M.of_value (| Value.Integer 2 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -601,19 +636,26 @@ Module slice. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: v.len() >= 2" |) ] + [ + M.read (| + M.of_value (| + Value.String "assertion failed: v.len() >= 2" + |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -633,25 +675,29 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| v |); Value.Integer Integer.Usize 1 ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| v |); Value.Integer Integer.Usize 0 ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ M.read (| v |); M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ M.read (| v |); M.of_value (| Value.Integer 0 |) ] + |)) + ] + |) ] |) |)) in @@ -678,37 +724,46 @@ Module slice. [ M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), - [ (* MutToConstPointer *) M.pointer_coercion (M.read (| arr_ptr |)) ] + [ + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| arr_ptr |) |) + ] |) ] |) |) in let hole := M.alloc (| - Value.StructRecord - "core::slice::sort::InsertionHole" - [ - ("src", - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply (Ty.path "core::mem::manually_drop::ManuallyDrop") [ T ], - [], - "deref", - [] - |), - [ tmp ] - |)); - ("dest", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "add", - [] - |), - [ M.read (| arr_ptr |); Value.Integer Integer.Usize 1 ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::sort::InsertionHole" + [ + ("src", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ T ], + [], + "deref", + [] + |), + [ tmp ] + |))); + ("dest", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "add", + [] + |), + [ M.read (| arr_ptr |); M.of_value (| Value.Integer 1 |) ] + |))) + ] + |) |) in let _ := M.alloc (| @@ -716,24 +771,25 @@ Module slice. M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), - [ M.read (| arr_ptr |); Value.Integer Integer.Usize 1 ] - |)); + [ M.read (| arr_ptr |); M.of_value (| Value.Integer 1 |) ] + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), - [ M.read (| arr_ptr |); Value.Integer Integer.Usize 0 ] + [ M.read (| arr_ptr |); M.of_value (| Value.Integer 0 |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -749,20 +805,23 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 2); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| v |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 2 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| v |) ] + |))) + ] + |) ] |) |), @@ -805,15 +864,15 @@ Module slice. let i := M.copy (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -831,37 +890,42 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ - M.read (| v |); - M.read (| i |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path - "core::mem::manually_drop::ManuallyDrop") - [ T ], - [], - "deref", - [] - |), - [ tmp ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ + M.read (| v |); + M.read (| i |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path + "core::mem::manually_drop::ManuallyDrop") + [ T ], + [], + "deref", + [] + |), + [ tmp ] + |)) + ] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -874,7 +938,10 @@ Module slice. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -886,15 +953,16 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ M.read (| arr_ptr |); M.read (| i |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], @@ -904,12 +972,13 @@ Module slice. [ M.read (| arr_ptr |); BinOp.Panic.sub (| + Integer.Usize, M.read (| i |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -929,14 +998,14 @@ Module slice. [ M.read (| arr_ptr |); M.read (| i |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -964,7 +1033,7 @@ Module slice. } } *) - Definition insertion_sort_shift_left (τ : list Ty.t) (α : list Value.t) : M := + Definition insertion_sort_shift_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; offset; is_less ] => ltac:(M.monadic @@ -981,19 +1050,23 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.ne (M.read (| offset |)) (Value.Integer Integer.Usize 0), + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.ne (| + M.read (| offset |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| offset |)) (M.read (| len |)))) - |)) + (BinOp.Pure.le (| M.read (| offset |), M.read (| len |) |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1002,13 +1075,15 @@ Module slice. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: offset != 0 && offset <= len" + M.of_value (| + Value.String "assertion failed: offset != 0 && offset <= len" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.use @@ -1023,9 +1098,14 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| offset |)); ("end_", M.read (| len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| offset |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) ] |) |), @@ -1086,19 +1166,21 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::RangeToInclusive" - [ ("end_", M.read (| i |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeToInclusive" + [ ("end_", A.to_value (M.read (| i |))) ] + |) ] |); M.read (| is_less |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -1128,7 +1210,7 @@ Module slice. } } *) - Definition insertion_sort_shift_right (τ : list Ty.t) (α : list Value.t) : M := + Definition insertion_sort_shift_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; offset; is_less ] => ltac:(M.monadic @@ -1145,27 +1227,30 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| + UnOp.Pure.not (| + LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.ne - (M.read (| offset |)) - (Value.Integer Integer.Usize 0), + BinOp.Pure.ne (| + M.read (| offset |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| offset |)) (M.read (| len |)))) + (BinOp.Pure.le (| M.read (| offset |), M.read (| len |) |))) |), ltac:(M.monadic - (BinOp.Pure.ge - (M.read (| len |)) - (Value.Integer Integer.Usize 2))) - |)) + (BinOp.Pure.ge (| + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1174,14 +1259,16 @@ Module slice. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: offset != 0 && offset <= len && len >= 2" + M.of_value (| + Value.String + "assertion failed: offset != 0 && offset <= len && len >= 2" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.use @@ -1207,12 +1294,14 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| offset |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| offset |))) + ] + |) ] |) ] @@ -1279,22 +1368,24 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| i |)); - ("end_", M.read (| len |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| i |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) ] |); M.read (| is_less |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -1351,7 +1442,7 @@ Module slice. false } *) - Definition partial_insertion_sort (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_insertion_sort (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less ] => ltac:(M.monadic @@ -1367,7 +1458,7 @@ Module slice. [ M.read (| v |) ] |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 1 |) in + let i := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.use (M.match_operator (| @@ -1381,17 +1472,20 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.get_constant (| - "core::slice::sort::partial_insertion_sort::MAX_STEPS" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.get_constant (| + "core::slice::sort::partial_insertion_sort::MAX_STEPS" + |) + |))) + ] + |) ] |) |), @@ -1435,7 +1529,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1443,12 +1537,13 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| i |)) - (M.read (| len |)), + BinOp.Pure.lt (| + M.read (| i |), + M.read (| len |) + |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -1468,42 +1563,59 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ - M.read (| v |); - M.read (| i |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ - M.read (| v |); - BinOp.Panic.sub (| - M.read (| i |), - Value.Integer - Integer.Usize - 1 - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ T ], + "get_unchecked", + [ + Ty.path + "usize" + ] + |), + [ + M.read (| v |); + M.read (| i |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ T ], + "get_unchecked", + [ + Ty.path + "usize" + ] + |), + [ + M.read (| v |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| + i + |), + M.of_value (| + Value.Integer + 1 + |) + |) + ] + |)) + ] + |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -1516,11 +1628,14 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1532,7 +1647,9 @@ Module slice. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |) |) |))) @@ -1541,16 +1658,17 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| i |)) - (M.read (| len |)) + BinOp.Pure.eq (| + M.read (| i |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1559,29 +1677,35 @@ Module slice. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Bool true |) |) + M.read (| + M.return_ (| + M.of_value (| Value.Bool true |) + |) + |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| len |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| len |), + M.read (| M.get_constant (| "core::slice::sort::partial_insertion_sort::SHORTEST_SHIFTING" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1591,12 +1715,15 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1610,24 +1737,26 @@ Module slice. [ M.read (| v |); BinOp.Panic.sub (| + Integer.Usize, M.read (| i |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); M.read (| i |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| i |)) - (Value.Integer Integer.Usize 2) + BinOp.Pure.ge (| + M.read (| i |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1657,14 +1786,20 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| i |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value (M.read (| i |))) + ] + |) ] |); BinOp.Panic.sub (| + Integer.Usize, M.read (| i |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |); M.read (| is_less |) ] @@ -1693,39 +1828,45 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| i |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value (M.read (| i |))) + ] + |) ] |); - Value.Integer Integer.Usize 1; + M.of_value (| Value.Integer 1 |); M.read (| is_less |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.alloc (| Value.Bool false |) + M.alloc (| M.of_value (| Value.Bool false |) |) |))) |))) | _, _ => M.impossible end. Module partial_insertion_sort. - Definition value_MAX_STEPS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 5 |))). + Definition value_MAX_STEPS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 5 |) |))). - Definition value_SHORTEST_SHIFTING : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 50 |))). + Definition value_SHORTEST_SHIFTING : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 50 |) |))). End partial_insertion_sort. (* @@ -1773,7 +1914,7 @@ Module slice. } } *) - Definition heapsort (τ : list Ty.t) (α : list Value.t) : M := + Definition heapsort (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less ] => ltac:(M.monadic @@ -1782,8 +1923,8 @@ Module slice. M.read (| let sift_down := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -1805,25 +1946,27 @@ Module slice. (let child := M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.mul (| - Value.Integer Integer.Usize 2, + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.read (| node |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| child |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| child |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1832,7 +1975,8 @@ Module slice. [] |), [ M.read (| v |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1846,24 +1990,27 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.add (| + BinOp.Pure.lt (| + BinOp.Panic.add (| + Integer.Usize, M.read (| child |), - Value.Integer Integer.Usize 1 - |)) - (M.call_closure (| + M.of_value (| Value.Integer 1 |) + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -1872,7 +2019,8 @@ Module slice. [] |), [ M.read (| v |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1884,9 +2032,10 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -1906,45 +2055,57 @@ Module slice. |), [ is_less; - Value.Tuple - [ - M.SubPointer.get_array_field (| - M.read (| v |), - child - |); - M.SubPointer.get_array_field (| - M.read (| v |), - M.alloc (| - BinOp.Panic.add (| - M.read (| child |), - Value.Integer - Integer.Usize - 1 - |) - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + child + |)); + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + M.alloc (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| + child + |), + M.of_value (| + Value.Integer 1 + |) + |) + |) + |)) + ] + |) ] - |)) + |) + |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -1964,19 +2125,24 @@ Module slice. |), [ is_less; - Value.Tuple - [ - M.SubPointer.get_array_field (| - M.read (| v |), - node - |); - M.SubPointer.get_array_field (| - M.read (| v |), - child - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + node + |)); + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + child + |)) + ] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1990,7 +2156,9 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -2009,7 +2177,7 @@ Module slice. |) |) in let _ := M.write (| node, M.read (| child |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) |))) ] @@ -2017,7 +2185,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.use @@ -2043,23 +2212,27 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.div (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| v |) ] - |), - Value.Integer Integer.Usize 2 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.div (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| v |) ] + |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) ] |) ] @@ -2136,14 +2309,20 @@ Module slice. |), [ sift_down; - Value.Tuple [ M.read (| v |); M.read (| i |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| v |)); + A.to_value (M.read (| i |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2170,20 +2349,23 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 1); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "len", - [] - |), - [ M.read (| v |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "len", + [] + |), + [ M.read (| v |) ] + |))) + ] + |) ] |) ] @@ -2238,7 +2420,7 @@ Module slice. |), [ M.read (| v |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| i |) ] |) @@ -2273,36 +2455,42 @@ Module slice. |), [ sift_down; - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::IndexMut", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index_mut", - [] - |), - [ - M.read (| v |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| i |)) ] - ] - |); - Value.Integer Integer.Usize 0 - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index_mut", + [] + |), + [ + M.read (| v |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| i |))) + ] + |) + ] + |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -2562,7 +2750,7 @@ Module slice. } } *) - Definition partition_in_blocks (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_in_blocks (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; pivot; is_less ] => ltac:(M.monadic @@ -2599,16 +2787,17 @@ Module slice. |) in let offsets_l := M.alloc (| - repeat - (M.call_closure (| + repeat (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ], "uninit", [] |), [] - |)) + |), 128 + |) |) in let r := M.alloc (| @@ -2641,37 +2830,40 @@ Module slice. |) in let offsets_r := M.alloc (| - repeat - (M.call_closure (| + repeat (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::mem::maybe_uninit::MaybeUninit") [ Ty.path "u8" ], "uninit", [] |), [] - |)) + |), 128 + |) |) in let _ := M.loop (| ltac:(M.monadic (let is_done := M.alloc (| - BinOp.Pure.le - (M.call_closure (| + 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 (| - Value.Integer Integer.Usize 2, + |), + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 2 |), M.read (| M.get_constant (| "core::slice::sort::partition_in_blocks::BLOCK" |) |) - |)) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2690,7 +2882,7 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2698,13 +2890,15 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.lt - (M.read (| start_l |)) - (M.read (| end_l |)), + BinOp.Pure.lt (| + M.read (| start_l |), + M.read (| end_l |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| start_r |)) - (M.read (| end_r |)))) + (BinOp.Pure.lt (| + M.read (| start_r |), + M.read (| end_r |) + |))) |) |)) in let _ := @@ -2717,6 +2911,7 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| M.get_constant (| @@ -2725,22 +2920,24 @@ Module slice. |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| start_l |)) - (M.read (| end_l |)) + BinOp.Pure.lt (| + M.read (| start_l |), + M.read (| end_l |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2748,20 +2945,21 @@ Module slice. Value.Bool true |) in let _ := M.write (| block_r, M.read (| rem |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| start_r |)) - (M.read (| end_r |)) + BinOp.Pure.lt (| + M.read (| start_r |), + M.read (| end_r |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2769,37 +2967,40 @@ Module slice. Value.Bool true |) in let _ := M.write (| block_l, M.read (| rem |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := M.write (| block_l, BinOp.Panic.div (| + Integer.Usize, M.read (| rem |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in let _ := M.write (| block_r, BinOp.Panic.sub (| + Integer.Usize, M.read (| rem |), M.read (| block_l |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2807,31 +3008,34 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.le - (M.read (| block_l |)) - (M.read (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.le (| + M.read (| block_l |), + M.read (| M.get_constant (| "core::slice::sort::partition_in_blocks::BLOCK" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| block_r |)) - (M.read (| + (BinOp.Pure.le (| + M.read (| block_r |), + M.read (| M.get_constant (| "core::slice::sort::partition_in_blocks::BLOCK" |) - |)))) - |)) + |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2847,27 +3051,33 @@ Module slice. |), [ M.read (| - Value.String - "assertion failed: block_l <= BLOCK && block_r <= BLOCK" + M.of_value (| + Value.String + "assertion failed: block_l <= BLOCK && block_r <= BLOCK" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2875,26 +3085,29 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_function (| "core::slice::sort::partition_in_blocks.width", [] |), [ M.read (| l |); M.read (| r |) ] - |)) - (BinOp.Panic.add (| + |), + BinOp.Panic.add (| + Integer.Usize, M.read (| block_l |), M.read (| block_r |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2910,34 +3123,39 @@ Module slice. |), [ M.read (| - Value.String - "assertion failed: width(l, r) == block_l + block_r" + M.of_value (| + Value.String + "assertion failed: width(l, r) == block_l + block_r" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| start_l |)) (M.read (| end_l |)) + BinOp.Pure.eq (| M.read (| start_l |), M.read (| end_l |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2952,7 +3170,7 @@ Module slice. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion offsets_l ] + [ (* Unsize *) M.pointer_coercion (| offsets_l |) ] |) |) in let _ := M.write (| end_l, M.read (| start_l |) |) in @@ -2971,12 +3189,15 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| block_l |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| block_l |))) + ] + |) ] |) |), @@ -3020,7 +3241,7 @@ Module slice. let _ := M.write (| M.read (| end_l |), - M.rust_cast (M.read (| i |)) + M.rust_cast (| M.read (| i |) |) |) in let _ := M.write (| @@ -3035,9 +3256,9 @@ Module slice. |), [ M.read (| end_l |); - M.rust_cast - (UnOp.Pure.not - (M.call_closure (| + M.rust_cast (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -3057,13 +3278,19 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| elem |); - M.read (| pivot |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| elem |)); + A.to_value + (M.read (| pivot |)) + ] + |) ] - |))) + |) + |) + |) ] |) |) in @@ -3078,30 +3305,30 @@ Module slice. |), [ M.read (| elem |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| start_r |)) (M.read (| end_r |)) + BinOp.Pure.eq (| M.read (| start_r |), M.read (| end_r |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3116,7 +3343,7 @@ Module slice. "slice_as_mut_ptr", [] |), - [ (* Unsize *) M.pointer_coercion offsets_r ] + [ (* Unsize *) M.pointer_coercion (| offsets_r |) ] |) |) in let _ := M.write (| end_r, M.read (| start_r |) |) in @@ -3135,12 +3362,15 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| block_r |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| block_r |))) + ] + |) ] |) |), @@ -3192,14 +3422,14 @@ Module slice. |), [ M.read (| elem |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in let _ := M.write (| M.read (| end_r |), - M.rust_cast (M.read (| i |)) + M.rust_cast (| M.read (| i |) |) |) in let _ := M.write (| @@ -3214,8 +3444,8 @@ Module slice. |), [ M.read (| end_r |); - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -3233,24 +3463,29 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| elem |); - M.read (| pivot |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| elem |)); + A.to_value + (M.read (| pivot |)) + ] + |) ] - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let count := @@ -3271,14 +3506,17 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| count |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.gt (| + M.read (| count |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3288,8 +3526,8 @@ Module slice. M.get_function (| "core::ptr::read", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", @@ -3308,7 +3546,8 @@ Module slice. [ M.read (| M.read (| start_l |) |) ] |) ] - |)) + |) + |) ] |) |) in @@ -3321,8 +3560,8 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "sub", @@ -3331,6 +3570,7 @@ Module slice. [ M.read (| r |); BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::convert::From", @@ -3341,10 +3581,11 @@ Module slice. |), [ M.read (| M.read (| start_r |) |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], @@ -3365,7 +3606,7 @@ Module slice. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -3384,12 +3625,15 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 1); - ("end_", M.read (| count |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", A.to_value (M.read (| count |))) + ] + |) ] |) |), @@ -3444,7 +3688,7 @@ Module slice. |), [ M.read (| start_l |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -3457,8 +3701,8 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", @@ -3481,7 +3725,8 @@ Module slice. ] |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], @@ -3491,6 +3736,7 @@ Module slice. [ M.read (| r |); BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::convert::From", @@ -3505,11 +3751,11 @@ Module slice. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -3526,7 +3772,7 @@ Module slice. |), [ M.read (| start_r |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -3539,8 +3785,8 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "sub", @@ -3549,6 +3795,7 @@ Module slice. [ M.read (| r |); BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::convert::From", @@ -3563,10 +3810,13 @@ Module slice. |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| + Value.Integer 1 + |) |) ] - |)); + |) + |); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], @@ -3591,14 +3841,16 @@ Module slice. |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3620,6 +3872,7 @@ Module slice. [ M.read (| r |); BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::convert::From", @@ -3630,11 +3883,11 @@ Module slice. |), [ M.read (| M.read (| start_r |) |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -3654,7 +3907,7 @@ Module slice. "add", [] |), - [ M.read (| start_l |); Value.Integer Integer.Usize 1 ] + [ M.read (| start_l |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -3666,23 +3919,23 @@ Module slice. "add", [] |), - [ M.read (| start_r |); Value.Integer Integer.Usize 1 ] + [ M.read (| start_r |); M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| start_l |)) (M.read (| end_l |)) + BinOp.Pure.eq (| M.read (| start_l |), M.read (| end_l |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3698,20 +3951,20 @@ Module slice. [ M.read (| l |); M.read (| block_l |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| start_r |)) (M.read (| end_r |)) + BinOp.Pure.eq (| M.read (| start_r |), M.read (| end_r |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3727,12 +3980,12 @@ Module slice. [ M.read (| r |); M.read (| block_r |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3740,26 +3993,28 @@ Module slice. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| BinOp.Pure.lt (M.read (| start_l |)) (M.read (| end_l |)) |)) in + (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 _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -3768,19 +4023,22 @@ Module slice. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::slice::sort::partition_in_blocks.width", - [] - |), - [ M.read (| l |); M.read (| r |) ] - |) - |); - block_l - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_function (| + "core::slice::sort::partition_in_blocks.width", + [] + |), + [ M.read (| l |); M.read (| r |) ] + |) + |)); + A.to_value block_l + ] + |) |), [ fun γ => @@ -3790,17 +4048,19 @@ Module slice. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3812,9 +4072,11 @@ Module slice. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -3826,36 +4088,40 @@ Module slice. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| start_l |)) (M.read (| end_l |)) + BinOp.Pure.lt (| M.read (| start_l |), M.read (| end_l |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -3871,7 +4137,7 @@ Module slice. "sub", [] |), - [ M.read (| end_l |); Value.Integer Integer.Usize 1 ] + [ M.read (| end_l |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -3905,7 +4171,7 @@ Module slice. "sub", [] |), - [ M.read (| r |); Value.Integer Integer.Usize 1 ] + [ M.read (| r |); M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -3919,10 +4185,10 @@ Module slice. "sub", [] |), - [ M.read (| r |); Value.Integer Integer.Usize 1 ] + [ M.read (| r |); M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -3932,7 +4198,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -3958,24 +4224,25 @@ Module slice. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| start_r |)) (M.read (| end_r |)) + BinOp.Pure.lt (| M.read (| start_r |), M.read (| end_r |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -3984,19 +4251,22 @@ Module slice. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::slice::sort::partition_in_blocks.width", - [] - |), - [ M.read (| l |); M.read (| r |) ] - |) - |); - block_r - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_function (| + "core::slice::sort::partition_in_blocks.width", + [] + |), + [ M.read (| l |); M.read (| r |) ] + |) + |)); + A.to_value block_r + ] + |) |), [ fun γ => @@ -4008,21 +4278,23 @@ Module slice. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) - |)) - (M.read (| + |), + M.read (| M.read (| right_val |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4034,9 +4306,11 @@ Module slice. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -4051,9 +4325,11 @@ Module slice. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) @@ -4062,29 +4338,33 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| start_r |)) - (M.read (| end_r |)) + BinOp.Pure.lt (| + M.read (| start_r |), + M.read (| end_r |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4100,7 +4380,9 @@ Module slice. "sub", [] |), - [ M.read (| end_r |); Value.Integer Integer.Usize 1 + [ + M.read (| end_r |); + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -4119,6 +4401,7 @@ Module slice. [ M.read (| r |); BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_trait_method (| "core::convert::From", @@ -4129,7 +4412,7 @@ Module slice. |), [ M.read (| M.read (| end_r |) |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -4145,10 +4428,10 @@ Module slice. "add", [] |), - [ M.read (| l |); Value.Integer Integer.Usize 1 ] + [ M.read (| l |); M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4158,7 +4441,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4214,8 +4497,8 @@ Module slice. end. Module partition_in_blocks. - Definition value_BLOCK : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 128 |))). + Definition value_BLOCK : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 128 |) |))). (* fn width(l: *mut T, r: *mut T) -> usize { @@ -4225,7 +4508,7 @@ Module slice. (r.addr() - l.addr()) / mem::size_of::() } *) - Definition width (τ : list Ty.t) (α : list Value.t) : M := + Definition width (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ l; r ] => ltac:(M.monadic @@ -4234,20 +4517,22 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |)) - (Value.Integer Integer.Usize 0)) + |), + M.of_value (| Value.Integer 0 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4257,18 +4542,22 @@ Module slice. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: mem::size_of::() > 0" + M.of_value (| + Value.String "assertion failed: mem::size_of::() > 0" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| BinOp.Panic.div (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "addr", [] |), [ M.read (| r |) ] @@ -4338,7 +4627,7 @@ Module slice. (mid, was_partitioned) } *) - Definition partition (τ : list Ty.t) (α : list Value.t) : M := + Definition partition (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; pivot; is_less ] => ltac:(M.monadic @@ -4351,7 +4640,7 @@ Module slice. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "swap", [] |), - [ M.read (| v |); Value.Integer Integer.Usize 0; M.read (| pivot |) ] + [ M.read (| v |); M.of_value (| Value.Integer 0 |); M.read (| pivot |) ] |) |) in M.match_operator (| @@ -4362,7 +4651,7 @@ Module slice. "split_at_mut", [] |), - [ M.read (| v |); Value.Integer Integer.Usize 1 ] + [ M.read (| v |); M.of_value (| Value.Integer 1 |) ] |) |), [ @@ -4376,7 +4665,7 @@ Module slice. M.alloc (| M.SubPointer.get_array_field (| M.read (| pivot |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |) in let tmp := @@ -4397,24 +4686,27 @@ Module slice. |) in let _pivot_guard := M.alloc (| - Value.StructRecord - "core::slice::sort::InsertionHole" - [ - ("src", - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ T ], - [], - "deref", - [] - |), - [ tmp ] - |)); - ("dest", M.read (| pivot |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::sort::InsertionHole" + [ + ("src", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ T ], + [], + "deref", + [] + |), + [ tmp ] + |))); + ("dest", A.to_value (M.read (| pivot |))) + ] + |) |) in let pivot := M.alloc (| @@ -4429,7 +4721,7 @@ Module slice. [ tmp ] |) |) in - let l := M.alloc (| Value.Integer Integer.Usize 0 |) in + let l := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.alloc (| M.call_closure (| @@ -4446,7 +4738,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4454,7 +4746,7 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| l |)) (M.read (| r |)), + BinOp.Pure.lt (| M.read (| l |), M.read (| r |) |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -4472,18 +4764,21 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| v |); M.read (| l |) ] - |); - M.read (| pivot |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ M.read (| v |); M.read (| l |) ] + |)); + A.to_value (M.read (| pivot |)) + ] + |) ] |))) |) @@ -4498,11 +4793,12 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4512,7 +4808,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4522,7 +4818,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4530,10 +4826,10 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| l |)) (M.read (| r |)), + BinOp.Pure.lt (| M.read (| l |), M.read (| r |) |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -4546,29 +4842,34 @@ Module slice. ], "call_mut", [] - |), - [ - M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ - M.read (| v |); - BinOp.Panic.sub (| - M.read (| r |), - Value.Integer Integer.Usize 1 - |) - ] - |); - M.read (| pivot |) - ] + |), + [ + M.read (| is_less |); + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ + M.read (| v |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| r |), + M.of_value (| Value.Integer 1 |) + |) + ] + |)); + A.to_value (M.read (| pivot |)) + ] + |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -4581,11 +4882,12 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4595,7 +4897,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4603,42 +4905,51 @@ Module slice. |))) |) in M.alloc (| - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| l |), - M.call_closure (| - M.get_function (| - "core::slice::sort::partition_in_blocks", - [ T; F ] - |), - [ + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| l |), M.call_closure (| - M.get_trait_method (| - "core::ops::index::IndexMut", - Ty.apply (Ty.path "slice") [ T ], - [ - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "usize" ] - ], - "index_mut", - [] + M.get_function (| + "core::slice::sort::partition_in_blocks", + [ T; F ] |), [ - M.read (| v |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| l |)); ("end_", M.read (| r |)) ] + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply (Ty.path "slice") [ T ], + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ], + "index_mut", + [] + |), + [ + M.read (| v |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| l |))); + ("end_", A.to_value (M.read (| r |))) + ] + |) + ] + |); + M.read (| pivot |); + M.read (| is_less |) ] - |); - M.read (| pivot |); - M.read (| is_less |) - ] - |) - |); - BinOp.Pure.ge (M.read (| l |)) (M.read (| r |)) - ] + |) + |)); + A.to_value (BinOp.Pure.ge (| M.read (| l |), M.read (| r |) |)) + ] + |) |))) ] |), @@ -4657,10 +4968,16 @@ Module slice. "swap", [] |), - [ M.read (| v |); Value.Integer Integer.Usize 0; M.read (| mid |) ] + [ M.read (| v |); M.of_value (| Value.Integer 0 |); M.read (| mid |) ] |) |) in - M.alloc (| Value.Tuple [ M.read (| mid |); M.read (| was_partitioned |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| mid |)); A.to_value (M.read (| was_partitioned |)) + ] + |) + |))) ] |) |))) @@ -4730,7 +5047,7 @@ Module slice. // back into the slice where it originally was. This step is critical in ensuring safety! } *) - Definition partition_equal (τ : list Ty.t) (α : list Value.t) : M := + Definition partition_equal (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; pivot; is_less ] => ltac:(M.monadic @@ -4744,7 +5061,7 @@ Module slice. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "swap", [] |), - [ M.read (| v |); Value.Integer Integer.Usize 0; M.read (| pivot |) ] + [ M.read (| v |); M.of_value (| Value.Integer 0 |); M.read (| pivot |) ] |) |) in M.match_operator (| @@ -4755,7 +5072,7 @@ Module slice. "split_at_mut", [] |), - [ M.read (| v |); Value.Integer Integer.Usize 1 ] + [ M.read (| v |); M.of_value (| Value.Integer 1 |) ] |) |), [ @@ -4769,7 +5086,7 @@ Module slice. M.alloc (| M.SubPointer.get_array_field (| M.read (| pivot |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |) in let tmp := @@ -4790,24 +5107,27 @@ Module slice. |) in let _pivot_guard := M.alloc (| - Value.StructRecord - "core::slice::sort::InsertionHole" - [ - ("src", - M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "core::mem::manually_drop::ManuallyDrop") - [ T ], - [], - "deref", - [] - |), - [ tmp ] - |)); - ("dest", M.read (| pivot |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::sort::InsertionHole" + [ + ("src", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "core::mem::manually_drop::ManuallyDrop") + [ T ], + [], + "deref", + [] + |), + [ tmp ] + |))); + ("dest", A.to_value (M.read (| pivot |))) + ] + |) |) in let pivot := M.alloc (| @@ -4835,16 +5155,17 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| len |)) - (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4853,13 +5174,14 @@ Module slice. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Integer Integer.Usize 0 |) |) + M.read (| M.return_ (| M.of_value (| Value.Integer 0 |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let l := M.alloc (| Value.Integer Integer.Usize 0 |) in + let l := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let r := M.copy (| len |) in let _ := M.loop (| @@ -4868,7 +5190,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4876,10 +5198,13 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| l |)) (M.read (| r |)), + BinOp.Pure.lt (| + M.read (| l |), + M.read (| r |) + |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -4895,22 +5220,29 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| pivot |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| v |); M.read (| l |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| pivot |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ + M.read (| v |); + M.read (| l |) + ] + |)) + ] + |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -4923,11 +5255,12 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4937,7 +5270,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4952,12 +5285,13 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4965,10 +5299,13 @@ Module slice. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.ge (M.read (| l |)) (M.read (| r |)), + BinOp.Pure.ge (| + M.read (| l |), + M.read (| r |) + |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -4984,22 +5321,29 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| pivot |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| v |); M.read (| r |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| pivot |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ + M.read (| v |); + M.read (| r |) + ] + |)) + ] + |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -5010,20 +5354,22 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| l |)) (M.read (| r |)) + BinOp.Pure.ge (| M.read (| l |), M.read (| r |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -5033,7 +5379,9 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ptr := @@ -5076,14 +5424,19 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) in M.alloc (| - BinOp.Panic.add (| M.read (| l |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| l |), + M.of_value (| Value.Integer 1 |) + |) |))) ] |) @@ -5139,7 +5492,7 @@ Module slice. } } *) - Definition break_patterns (τ : list Ty.t) (α : list Value.t) : M := + Definition break_patterns (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ v ] => ltac:(M.monadic @@ -5153,21 +5506,21 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| len |)) (Value.Integer Integer.Usize 8) + BinOp.Pure.ge (| M.read (| len |), M.of_value (| 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 := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5178,18 +5531,19 @@ Module slice. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.get_constant (| "core::num::BITS" |) - |)) - (Value.Integer Integer.U32 32) + |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5197,87 +5551,97 @@ Module slice. Value.Bool true |) in let r := - M.alloc (| M.rust_cast (M.read (| seed |)) |) in + M.alloc (| + M.rust_cast (| M.read (| seed |) |) + |) in let _ := let β := r in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Panic.shl (| + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Panic.shl (| M.read (| r |), - Value.Integer Integer.I32 13 - |)) + M.of_value (| Value.Integer 13 |) + |) + |) |) in let _ := let β := r in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Panic.shr (| + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| r |), - Value.Integer Integer.I32 17 - |)) + M.of_value (| Value.Integer 17 |) + |) + |) |) in let _ := let β := r in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Panic.shl (| + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Panic.shl (| M.read (| r |), - Value.Integer Integer.I32 5 - |)) + M.of_value (| Value.Integer 5 |) + |) + |) |) in let _ := M.write (| seed, - M.rust_cast (M.read (| r |)) + M.rust_cast (| M.read (| r |) |) |) in seed)); fun γ => ltac:(M.monadic (let r := - M.alloc (| M.rust_cast (M.read (| seed |)) |) in + M.alloc (| + M.rust_cast (| M.read (| seed |) |) + |) in let _ := let β := r in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Panic.shl (| + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Panic.shl (| M.read (| r |), - Value.Integer Integer.I32 13 - |)) + M.of_value (| Value.Integer 13 |) + |) + |) |) in let _ := let β := r in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Panic.shr (| + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| r |), - Value.Integer Integer.I32 7 - |)) + M.of_value (| Value.Integer 7 |) + |) + |) |) in let _ := let β := r in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Panic.shl (| + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Panic.shl (| M.read (| r |), - Value.Integer Integer.I32 17 - |)) + M.of_value (| Value.Integer 17 |) + |) + |) |) in let _ := M.write (| seed, - M.rust_cast (M.read (| r |)) + M.rust_cast (| M.read (| r |) |) |) in seed)) ] @@ -5286,7 +5650,8 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let modulus := M.alloc (| @@ -5298,8 +5663,13 @@ Module slice. let pos := M.alloc (| BinOp.Panic.mul (| - BinOp.Panic.div (| M.read (| len |), Value.Integer Integer.Usize 4 |), - Value.Integer Integer.Usize 2 + Integer.Usize, + BinOp.Panic.div (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 4 |) + |), + M.of_value (| Value.Integer 2 |) |) |) in M.use @@ -5314,12 +5684,14 @@ Module slice. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", Value.Integer Integer.Usize 3) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 3 |))) + ] + |) ] |) |), @@ -5362,8 +5734,8 @@ Module slice. let i := M.copy (| γ0_0 |) in let other := M.alloc (| - BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", Ty.function [ Ty.tuple [] ] (Ty.path "usize"), @@ -5371,25 +5743,28 @@ Module slice. "call_mut", [] |), - [ gen_usize; Value.Tuple [] ] - |)) - (BinOp.Panic.sub (| + [ gen_usize; M.of_value (| Value.Tuple [] |) ] + |), + BinOp.Panic.sub (| + Integer.Usize, M.read (| modulus |), - Value.Integer Integer.Usize 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| other |)) - (M.read (| len |)) + BinOp.Pure.ge (| + M.read (| other |), + M.read (| len |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5401,13 +5776,19 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| len |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -5421,9 +5802,11 @@ Module slice. [ M.read (| v |); BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| pos |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |), M.read (| i |) |); @@ -5431,14 +5814,14 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -5515,7 +5898,7 @@ Module slice. } } *) - Definition choose_pivot (τ : list Ty.t) (α : list Value.t) : M := + Definition choose_pivot (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less ] => ltac:(M.monadic @@ -5532,41 +5915,56 @@ Module slice. let a := M.alloc (| BinOp.Panic.mul (| - BinOp.Panic.div (| M.read (| len |), Value.Integer Integer.Usize 4 |), - Value.Integer Integer.Usize 1 + Integer.Usize, + BinOp.Panic.div (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 4 |) + |), + M.of_value (| Value.Integer 1 |) |) |) in let b := M.alloc (| BinOp.Panic.mul (| - BinOp.Panic.div (| M.read (| len |), Value.Integer Integer.Usize 4 |), - Value.Integer Integer.Usize 2 + Integer.Usize, + BinOp.Panic.div (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 4 |) + |), + M.of_value (| Value.Integer 2 |) |) |) in let c := M.alloc (| BinOp.Panic.mul (| - BinOp.Panic.div (| M.read (| len |), Value.Integer Integer.Usize 4 |), - Value.Integer Integer.Usize 3 + Integer.Usize, + BinOp.Panic.div (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 4 |) + |), + M.of_value (| Value.Integer 3 |) |) |) in - let swaps := M.alloc (| Value.Integer Integer.Usize 0 |) in + let swaps := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| len |)) (Value.Integer Integer.Usize 8) + BinOp.Pure.ge (| M.read (| len |), M.of_value (| Value.Integer 8 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let sort2 := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -5584,7 +5982,7 @@ Module slice. (let b := M.copy (| γ |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5611,39 +6009,47 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ - M.read (| v |); - M.read (| - M.read (| b |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ - M.read (| v |); - M.read (| - M.read (| a |) - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ T ], + "get_unchecked", + [ Ty.path "usize" + ] + |), + [ + M.read (| v |); + M.read (| + M.read (| b |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ T ], + "get_unchecked", + [ Ty.path "usize" + ] + |), + [ + M.read (| v |); + M.read (| + M.read (| a |) + |) + ] + |)) + ] + |) ] |) |)) in @@ -5667,14 +6073,19 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) |))) @@ -5683,12 +6094,13 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let sort3 := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1; α2 ] => @@ -5745,11 +6157,15 @@ Module slice. |), [ sort2; - Value.Tuple - [ - M.read (| a |); - M.read (| b |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| a |)); + A.to_value + (M.read (| b |)) + ] + |) ] |) |) in @@ -5787,11 +6203,15 @@ Module slice. |), [ sort2; - Value.Tuple - [ - M.read (| b |); - M.read (| c |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| b |)); + A.to_value + (M.read (| c |)) + ] + |) ] |) |) in @@ -5829,15 +6249,21 @@ Module slice. |), [ sort2; - Value.Tuple - [ - M.read (| a |); - M.read (| b |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| a |)); + A.to_value + (M.read (| b |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |))) ] |))) @@ -5846,24 +6272,26 @@ Module slice. ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| len |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| len |), + M.read (| M.get_constant (| "core::slice::sort::choose_pivot::SHORTEST_MEDIAN_OF_MEDIANS" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5872,8 +6300,8 @@ Module slice. |) in let sort_adjacent := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -5925,31 +6353,42 @@ Module slice. |), [ sort3; - Value.Tuple - [ - M.alloc (| - BinOp.Panic.sub (| - M.read (| tmp |), - Value.Integer Integer.Usize 1 - |) - |); - M.read (| a |); - M.alloc (| - BinOp.Panic.add (| - M.read (| tmp |), - Value.Integer Integer.Usize 1 - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + BinOp.Panic.sub (| + Integer.Usize, + M.read (| tmp |), + M.of_value (| + Value.Integer 1 + |) + |) + |)); + A.to_value (M.read (| a |)); + A.to_value + (M.alloc (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| tmp |), + M.of_value (| + Value.Integer 1 + |) + |) + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.alloc (| @@ -5967,7 +6406,8 @@ Module slice. "call_mut", [] |), - [ sort_adjacent; Value.Tuple [ a ] ] + [ sort_adjacent; M.of_value (| Value.Tuple [ A.to_value a ] |) + ] |) |) in let _ := @@ -5986,7 +6426,8 @@ Module slice. "call_mut", [] |), - [ sort_adjacent; Value.Tuple [ b ] ] + [ sort_adjacent; M.of_value (| Value.Tuple [ A.to_value b ] |) + ] |) |) in let _ := @@ -6005,11 +6446,13 @@ Module slice. "call_mut", [] |), - [ sort_adjacent; Value.Tuple [ c ] ] + [ sort_adjacent; M.of_value (| Value.Tuple [ A.to_value c ] |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -6038,34 +6481,46 @@ Module slice. "call_mut", [] |), - [ sort3; Value.Tuple [ a; b; c ] ] + [ + sort3; + M.of_value (| + Value.Tuple [ A.to_value a; A.to_value b; A.to_value c ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| swaps |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| swaps |), + M.read (| M.get_constant (| "core::slice::sort::choose_pivot::MAX_SWAPS" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - M.read (| b |); - BinOp.Pure.eq (M.read (| swaps |)) (Value.Integer Integer.Usize 0) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| b |)); + A.to_value + (BinOp.Pure.eq (| + M.read (| swaps |), + M.of_value (| Value.Integer 0 |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -6081,14 +6536,22 @@ Module slice. |) |) in M.alloc (| - Value.Tuple - [ - BinOp.Panic.sub (| - BinOp.Panic.sub (| M.read (| len |), Value.Integer Integer.Usize 1 |), - M.read (| b |) - |); - Value.Bool true - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |), + M.read (| b |) + |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |))) ] |) @@ -6097,14 +6560,18 @@ Module slice. end. Module choose_pivot. - Definition value_SHORTEST_MEDIAN_OF_MEDIANS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 50 |))). + Definition value_SHORTEST_MEDIAN_OF_MEDIANS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 50 |) |))). - Definition value_MAX_SWAPS : Value.t := + Definition value_MAX_SWAPS : A.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.mul (| Value.Integer Integer.Usize 4, Value.Integer Integer.Usize 3 |) + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 4 |), + M.of_value (| Value.Integer 3 |) + |) |))). End choose_pivot. @@ -6196,7 +6663,7 @@ Module slice. } } *) - Definition recurse (τ : list Ty.t) (α : list Value.t) : M := + Definition recurse (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less; pred; limit ] => ltac:(M.monadic @@ -6207,8 +6674,8 @@ 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 (| M.of_value (| Value.Bool true |) |) in + let was_partitioned := M.alloc (| M.of_value (| Value.Bool true |) |) in M.alloc (| M.never_to_any (| M.read (| @@ -6227,20 +6694,21 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| len |)) - (M.read (| + BinOp.Pure.le (| + M.read (| len |), + M.read (| M.get_constant (| "core::slice::sort::recurse::MAX_INSERTION" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6252,16 +6720,17 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| len |)) - (Value.Integer Integer.Usize 2) + BinOp.Pure.ge (| + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6277,35 +6746,38 @@ Module slice. |), [ M.read (| v |); - Value.Integer Integer.Usize 1; + M.of_value (| Value.Integer 1 |); M.read (| is_less |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| limit |)) - (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + M.read (| limit |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6325,22 +6797,25 @@ Module slice. [ M.read (| v |); M.read (| is_less |) ] |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use - (M.alloc (| UnOp.Pure.not (M.read (| was_balanced |)) |)) in + (M.alloc (| + UnOp.Pure.not (| M.read (| was_balanced |) |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -6361,12 +6836,14 @@ Module slice. M.write (| β, BinOp.Panic.sub (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -6385,7 +6862,7 @@ Module slice. let likely_sorted := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6407,7 +6884,7 @@ Module slice. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6429,19 +6906,26 @@ Module slice. |) in M.alloc (| M.never_to_any (| - M.read (| M.return_ (| Value.Tuple [] |) |) + M.read (| + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6454,15 +6938,15 @@ Module slice. |) in let p := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -6478,16 +6962,20 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| p |); - M.SubPointer.get_array_field (| - M.read (| v |), - pivot - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| p |)); + A.to_value + (M.SubPointer.get_array_field (| + M.read (| v |), + pivot + |)) + ] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6529,9 +7017,15 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| mid |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| mid |))) + ] + |) ] |) |) in @@ -6540,10 +7034,13 @@ Module slice. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -6566,8 +7063,8 @@ Module slice. let _ := M.write (| was_balanced, - BinOp.Pure.ge - (M.call_closure (| + BinOp.Pure.ge (| + M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] @@ -6575,15 +7072,18 @@ Module slice. [ M.read (| mid |); BinOp.Panic.sub (| + Integer.Usize, M.read (| len |), M.read (| mid |) |) ] - |)) - (BinOp.Panic.div (| + |), + BinOp.Panic.div (| + Integer.Usize, M.read (| len |), - Value.Integer Integer.Usize 8 - |)) + M.of_value (| Value.Integer 8 |) + |) + |) |) in let _ := M.write (| was_partitioned, M.read (| was_p |) |) in @@ -6617,7 +7117,7 @@ Module slice. |), [ M.read (| right |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |), @@ -6641,20 +7141,22 @@ Module slice. M.SubPointer.get_array_field (| M.read (| pivot |), M.alloc (| - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -6663,8 +7165,8 @@ Module slice. [] |), [ M.read (| left |) ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -6673,7 +7175,8 @@ Module slice. [] |), [ M.read (| right |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6703,11 +7206,18 @@ Module slice. let _ := M.write (| pred, - Value.StructTuple - "core::option::Option::Some" - [ M.read (| pivot |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| pivot |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -6720,9 +7230,16 @@ Module slice. [ M.read (| right |); M.read (| is_less |); - Value.StructTuple - "core::option::Option::Some" - [ M.read (| pivot |) ]; + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + pivot + |)) + ] + |); M.read (| limit |) ] |) @@ -6732,7 +7249,9 @@ Module slice. v, M.read (| left |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] @@ -6753,8 +7272,8 @@ Module slice. end. Module recurse. - Definition value_MAX_INSERTION : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 20 |))). + Definition value_MAX_INSERTION : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 20 |) |))). End recurse. (* @@ -6773,7 +7292,7 @@ Module slice. recurse(v, &mut is_less, None, limit); } *) - Definition quicksort (τ : list Ty.t) (α : list Value.t) : M := + Definition quicksort (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less ] => ltac:(M.monadic @@ -6784,7 +7303,7 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6793,14 +7312,17 @@ Module slice. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Tuple [] |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let limit := M.alloc (| BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::num::BITS" |) |), M.call_closure (| M.get_associated_function (| Ty.path "usize", "leading_zeros", [] |), @@ -6824,12 +7346,12 @@ Module slice. [ M.read (| v |); is_less; - Value.StructTuple "core::option::Option::None" []; + M.of_value (| Value.StructTuple "core::option::Option::None" [] |); M.read (| limit |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible @@ -6943,7 +7465,7 @@ Module slice. } } *) - Definition merge (τ : list Ty.t) (α : list Value.t) : M := + Definition merge (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; mid; buf; is_less ] => ltac:(M.monadic @@ -6972,17 +7494,29 @@ Module slice. |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), - [ M.read (| v |); M.read (| mid |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), - [ M.read (| v |); M.read (| len |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "add", + [] + |), + [ M.read (| v |); M.read (| mid |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "add", + [] + |), + [ M.read (| v |); M.read (| len |) ] + |)) + ] + |) |), [ fun γ => @@ -6991,19 +7525,24 @@ 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 hole := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| mid |)) - (BinOp.Panic.sub (| M.read (| len |), M.read (| mid |) |)) + BinOp.Pure.le (| + M.read (| mid |), + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| mid |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7019,7 +7558,8 @@ Module slice. [ T ] |), [ - (* MutToConstPointer *) M.pointer_coercion (M.read (| v |)); + (* MutToConstPointer *) + M.pointer_coercion (| M.read (| v |) |); M.read (| buf |); M.read (| mid |) ] @@ -7028,23 +7568,26 @@ Module slice. let _ := M.write (| hole, - Value.StructRecord - "core::slice::sort::merge::MergeHole" - [ - ("start", M.read (| buf |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "add", - [] - |), - [ M.read (| buf |); M.read (| mid |) ] - |)); - ("dest", M.read (| v |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::sort::merge::MergeHole" + [ + ("start", A.to_value (M.read (| buf |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "add", + [] + |), + [ M.read (| buf |); M.read (| mid |) ] + |))); + ("dest", A.to_value (M.read (| v |))) + ] + |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let left := M.alloc (| M.SubPointer.get_struct_record_field (| @@ -7065,7 +7608,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7073,19 +7616,21 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| M.read (| left |) |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| M.read (| left |) |), + M.read (| M.SubPointer.get_struct_record_field (| hole, "core::slice::sort::merge::MergeHole", "end" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| right |)) - (M.read (| v_end |)))) + (BinOp.Pure.lt (| + M.read (| right |), + M.read (| v_end |) + |))) |) |)) in let _ := @@ -7111,18 +7656,20 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.read (| right |); - M.read (| M.read (| left |) |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| right |)); + A.to_value (M.read (| M.read (| left |) |)) + ] + |) ] |) |) in let to_copy := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7146,9 +7693,9 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion (M.read (| to_copy |)); + M.pointer_coercion (| M.read (| to_copy |) |); M.read (| M.read (| out |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -7163,7 +7710,7 @@ Module slice. |), [ M.read (| M.read (| out |) |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in @@ -7178,7 +7725,7 @@ Module slice. |), [ M.read (| right |); - M.rust_cast (M.read (| is_l |)) + M.rust_cast (| M.read (| is_l |) |) ] |) |) in @@ -7193,11 +7740,13 @@ Module slice. |), [ M.read (| M.read (| left |) |); - M.rust_cast (UnOp.Pure.not (M.read (| is_l |))) + M.rust_cast (| + UnOp.Pure.not (| M.read (| is_l |) |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7207,7 +7756,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7226,38 +7775,46 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion (M.read (| v_mid |)); + M.pointer_coercion (| M.read (| v_mid |) |); M.read (| buf |); - BinOp.Panic.sub (| M.read (| len |), M.read (| mid |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| mid |) + |) ] |) |) in let _ := M.write (| hole, - Value.StructRecord - "core::slice::sort::merge::MergeHole" - [ - ("start", M.read (| buf |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "add", - [] - |), - [ - M.read (| buf |); - BinOp.Panic.sub (| - M.read (| len |), - M.read (| mid |) - |) - ] - |)); - ("dest", M.read (| v_mid |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::sort::merge::MergeHole" + [ + ("start", A.to_value (M.read (| buf |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "add", + [] + |), + [ + M.read (| buf |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| mid |) + |) + ] + |))); + ("dest", A.to_value (M.read (| v_mid |))) + ] + |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let left := M.alloc (| M.SubPointer.get_struct_record_field (| @@ -7278,7 +7835,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7286,13 +7843,15 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| v |)) - (M.read (| M.read (| left |) |)), + BinOp.Pure.lt (| + M.read (| v |), + M.read (| M.read (| left |) |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| buf |)) - (M.read (| M.read (| right |) |)))) + (BinOp.Pure.lt (| + M.read (| buf |), + M.read (| M.read (| right |) |) + |))) |) |)) in let _ := @@ -7318,31 +7877,35 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "sub", - [] - |), - [ - M.read (| M.read (| right |) |); - Value.Integer Integer.Usize 1 - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ T ], - "sub", - [] - |), - [ - M.read (| M.read (| left |) |); - Value.Integer Integer.Usize 1 - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "sub", + [] + |), + [ + M.read (| M.read (| right |) |); + M.of_value (| Value.Integer 1 |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ T ], + "sub", + [] + |), + [ + M.read (| M.read (| left |) |); + M.of_value (| Value.Integer 1 |) + ] + |)) + ] + |) ] |) |) in @@ -7357,7 +7920,7 @@ Module slice. |), [ M.read (| M.read (| left |) |); - M.rust_cast (M.read (| is_l |)) + M.rust_cast (| M.read (| is_l |) |) ] |) |) in @@ -7372,14 +7935,16 @@ Module slice. |), [ M.read (| M.read (| right |) |); - M.rust_cast (UnOp.Pure.not (M.read (| is_l |))) + M.rust_cast (| + UnOp.Pure.not (| M.read (| is_l |) |) + |) ] |) |) in let to_copy := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7403,7 +7968,8 @@ Module slice. "sub", [] |), - [ M.read (| out |); Value.Integer Integer.Usize 1 ] + [ M.read (| out |); M.of_value (| Value.Integer 1 |) + ] |) |) in let _ := @@ -7415,13 +7981,13 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion (M.read (| to_copy |)); + M.pointer_coercion (| M.read (| to_copy |) |); M.read (| out |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -7431,7 +7997,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -7440,7 +8006,7 @@ Module slice. |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -7473,7 +8039,7 @@ Module slice. } } *) - Definition drop (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -7497,14 +8063,15 @@ Module slice. |) |); (* MutToConstPointer *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge::MergeHole", "start" |) - |)) + |) + |) ] |) |) in @@ -7514,14 +8081,15 @@ Module slice. M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge::MergeHole", "start" |) - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7533,7 +8101,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7826,7 +8394,7 @@ Module slice. } } *) - Definition merge_sort (τ : list Ty.t) (α : list Value.t) : M := + Definition merge_sort (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; CmpF; ElemAllocF; ElemDeallocF; RunAllocF; RunDeallocF ], [ v; is_less; elem_alloc_fn; elem_dealloc_fn; run_alloc_fn; run_dealloc_fn ] => @@ -7842,29 +8410,31 @@ Module slice. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.read (| M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7875,16 +8445,22 @@ Module slice. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: !T::IS_ZST" |) + [ + M.read (| + M.of_value (| + Value.String "assertion failed: !T::IS_ZST" + |) + |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let len := @@ -7896,20 +8472,21 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.read (| len |)) - (M.read (| + BinOp.Pure.le (| + M.read (| len |), + M.read (| M.get_constant (| "core::slice::sort::merge_sort::MAX_INSERTION" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -7918,16 +8495,17 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| len |)) - (Value.Integer Integer.Usize 2) + BinOp.Pure.ge (| + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7943,20 +8521,22 @@ Module slice. |), [ M.read (| v |); - Value.Integer Integer.Usize 1; + M.of_value (| Value.Integer 1 |); M.read (| is_less |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let buf := @@ -7970,7 +8550,11 @@ Module slice. [ ElemAllocF ] |), [ - BinOp.Panic.div (| M.read (| len |), Value.Integer Integer.Usize 2 |); + BinOp.Panic.div (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |); M.read (| elem_alloc_fn |); M.read (| elem_dealloc_fn |) ] @@ -8008,20 +8592,20 @@ Module slice. [ M.read (| run_alloc_fn |); M.read (| run_dealloc_fn |) ] |) |) in - let end_ := M.alloc (| Value.Integer Integer.Usize 0 |) in - let start := M.alloc (| Value.Integer Integer.Usize 0 |) in + let end_ := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let start := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| end_ |)) (M.read (| len |)) + BinOp.Pure.lt (| M.read (| end_ |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -8050,9 +8634,11 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| start |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| start |))) ] + |) ] |); M.read (| is_less |) @@ -8071,13 +8657,14 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| streak_end |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8110,19 +8697,26 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| start |)); - ("end_", M.read (| end_ |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| start |))); + ("end_", + A.to_value (M.read (| end_ |))) + ] + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -8153,16 +8747,20 @@ Module slice. |), [ runs; - Value.StructRecord - "core::slice::sort::TimSortRun" - [ - ("start", M.read (| start |)); - ("len", - BinOp.Panic.sub (| - M.read (| end_ |), - M.read (| start |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::sort::TimSortRun" + [ + ("start", A.to_value (M.read (| start |))); + ("len", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| end_ |), + M.read (| start |) + |))) + ] + |) ] |) |) in @@ -8170,7 +8768,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8236,8 +8834,9 @@ Module slice. [ runs; BinOp.Panic.add (| + Integer.Usize, M.read (| r |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -8258,35 +8857,40 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - left, - "core::slice::sort::TimSortRun", - "start" - |) - |)); - ("end_", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - right, - "core::slice::sort::TimSortRun", - "start" - |) - |), - M.read (| - M.SubPointer.get_struct_record_field (| - right, - "core::slice::sort::TimSortRun", - "len" - |) - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + left, + "core::slice::sort::TimSortRun", + "start" + |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + right, + "core::slice::sort::TimSortRun", + "start" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + right, + "core::slice::sort::TimSortRun", + "len" + |) + |) + |))) + ] + |) ] |) |) in @@ -8312,7 +8916,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.call_closure (| @@ -8329,40 +8933,46 @@ Module slice. [ runs; BinOp.Panic.add (| + Integer.Usize, M.read (| r |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |), - Value.StructRecord - "core::slice::sort::TimSortRun" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - left, - "core::slice::sort::TimSortRun", - "start" - |) - |)); - ("len", - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - left, - "core::slice::sort::TimSortRun", - "len" - |) - |), - M.read (| - M.SubPointer.get_struct_record_field (| - right, - "core::slice::sort::TimSortRun", - "len" - |) - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::slice::sort::TimSortRun" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + left, + "core::slice::sort::TimSortRun", + "start" + |) + |))); + ("len", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + left, + "core::slice::sort::TimSortRun", + "len" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + right, + "core::slice::sort::TimSortRun", + "len" + |) + |) + |))) + ] + |) |) in let _ := M.alloc (| @@ -8378,7 +8988,7 @@ Module slice. [ runs; M.read (| r |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -8390,7 +9000,9 @@ Module slice. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |) |) |))) @@ -8408,7 +9020,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -8417,27 +9029,27 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| + UnOp.Pure.not (| + LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -8447,11 +9059,12 @@ Module slice. [] |), [ runs ] - |)) - (Value.Integer Integer.Usize 1), + |), + M.of_value (| Value.Integer 1 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.call_closure (| M.get_trait_method (| @@ -8464,17 +9077,18 @@ Module slice. "index", [] |), - [ runs; Value.Integer Integer.Usize 0 ] + [ runs; M.of_value (| Value.Integer 0 |) ] |), "core::slice::sort::TimSortRun", "start" |) - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.call_closure (| M.get_trait_method (| @@ -8487,14 +9101,16 @@ Module slice. "index", [] |), - [ runs; Value.Integer Integer.Usize 0 ] + [ runs; M.of_value (| Value.Integer 0 |) ] |), "core::slice::sort::TimSortRun", "len" |) - |)) - (M.read (| len |)))) - |)) + |), + M.read (| len |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8507,29 +9123,32 @@ Module slice. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: runs.len() == 1 && runs[0].start == 0 && runs[0].len == len" + M.of_value (| + Value.String + "assertion failed: runs.len() == 1 && runs[0].start == 0 && runs[0].len == len" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) |))) | _, _ => M.impossible end. Module merge_sort. - Definition value_MAX_INSERTION : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 20 |))). + Definition value_MAX_INSERTION : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 20 |) |))). (* fn collapse(runs: &[TimSortRun], stop: usize) -> Option { @@ -8546,7 +9165,7 @@ Module slice. } } *) - Definition collapse (τ : list Ty.t) (α : list Value.t) : M := + Definition collapse (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ runs; stop ] => ltac:(M.monadic @@ -8565,7 +9184,7 @@ Module slice. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8573,21 +9192,23 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ge (M.read (| n |)) (Value.Integer Integer.Usize 2), + BinOp.Pure.ge (| M.read (| n |), M.of_value (| Value.Integer 2 |) |), ltac:(M.monadic (LogicalOp.or (| LogicalOp.or (| LogicalOp.or (| - BinOp.Pure.eq - (BinOp.Panic.add (| + BinOp.Pure.eq (| + BinOp.Panic.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 Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |), @@ -8601,8 +9222,9 @@ Module slice. M.read (| runs |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |), @@ -8610,72 +9232,80 @@ Module slice. "len" |) |) - |)) - (M.read (| stop |)), + |), + M.read (| stop |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + 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 Integer.Usize 2 + M.of_value (| 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 Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |), "core::slice::sort::TimSortRun", "len" |) - |)))) + |) + |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.ge - (M.read (| n |)) - (Value.Integer Integer.Usize 3), + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 3 |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + 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 Integer.Usize 3 + M.of_value (| Value.Integer 3 |) |) |) |), "core::slice::sort::TimSortRun", "len" |) - |)) - (BinOp.Panic.add (| + |), + BinOp.Panic.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 Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) |), @@ -8689,8 +9319,9 @@ Module slice. M.read (| runs |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |), @@ -8698,40 +9329,45 @@ Module slice. "len" |) |) - |)))) + |) + |))) |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.ge - (M.read (| n |)) - (Value.Integer Integer.Usize 4), + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 4 |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + 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 Integer.Usize 4 + M.of_value (| Value.Integer 4 |) |) |) |), "core::slice::sort::TimSortRun", "len" |) - |)) - (BinOp.Panic.add (| + |), + BinOp.Panic.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 Integer.Usize 3 + M.of_value (| Value.Integer 3 |) |) |) |), @@ -8745,8 +9381,9 @@ Module slice. M.read (| runs |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) |), @@ -8754,14 +9391,15 @@ Module slice. "len" |) |) - |)))) + |) + |))) |))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8769,41 +9407,45 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ge - (M.read (| n |)) - (Value.Integer Integer.Usize 3), + BinOp.Pure.ge (| + M.read (| n |), + M.of_value (| Value.Integer 3 |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| + (BinOp.Pure.lt (| + 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 Integer.Usize 3 + M.of_value (| 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 Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |), "core::slice::sort::TimSortRun", "len" |) - |)))) + |) + |))) |) |)) in let _ := @@ -8812,32 +9454,42 @@ Module slice. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.sub (| - M.read (| n |), - Value.Integer Integer.Usize 3 - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 3 |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.sub (| - M.read (| n |), - Value.Integer Integer.Usize 2 - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| n |), + M.of_value (| Value.Integer 2 |) + |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -8876,7 +9528,7 @@ Module slice. } } *) - Definition new (T ElemDeallocF : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T ElemDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T ElemDeallocF in match τ, α with | [ ElemAllocF ], [ len; elem_alloc_fn; elem_dealloc_fn ] => @@ -8884,43 +9536,49 @@ Module slice. (let len := M.alloc (| len |) in let elem_alloc_fn := M.alloc (| elem_alloc_fn |) in let elem_dealloc_fn := M.alloc (| elem_dealloc_fn |) in - Value.StructRecord - "core::slice::sort::merge_sort::BufGuard" - [ - ("buf_ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ] ], - "unwrap", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "core::slice::sort::merge_sort::BufGuard" + [ + ("buf_ptr", + A.to_value + (M.call_closure (| M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "new", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ] ], + "unwrap", [] |), [ M.call_closure (| - M.get_trait_method (| - "core::ops::function::Fn", - ElemAllocF, - [ Ty.tuple [ Ty.path "usize" ] ], - "call", + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "new", [] |), - [ elem_alloc_fn; Value.Tuple [ M.read (| len |) ] ] + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + ElemAllocF, + [ Ty.tuple [ Ty.path "usize" ] ], + "call", + [] + |), + [ + elem_alloc_fn; + M.of_value (| Value.Tuple [ A.to_value (M.read (| len |)) ] |) + ] + |) + ] |) ] - |) - ] - |)); - ("capacity", M.read (| len |)); - ("elem_dealloc_fn", M.read (| elem_dealloc_fn |)) - ])) + |))); + ("capacity", A.to_value (M.read (| len |))); + ("elem_dealloc_fn", A.to_value (M.read (| elem_dealloc_fn |))) + ] + |))) | _, _ => M.impossible end. @@ -8938,7 +9596,7 @@ Module slice. (self.elem_dealloc_fn)(self.buf_ptr.as_ptr(), self.capacity); } *) - Definition drop (T ElemDeallocF : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (T ElemDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T ElemDeallocF in match τ, α with | [], [ self ] => @@ -8961,36 +9619,40 @@ Module slice. "core::slice::sort::merge_sort::BufGuard", "elem_dealloc_fn" |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], - "as_ptr", - [] - |), - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ T ], + "as_ptr", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::sort::merge_sort::BufGuard", + "buf_ptr" + |) + |) + ] + |)); + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::BufGuard", - "buf_ptr" + "capacity" |) - |) - ] - |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::sort::merge_sort::BufGuard", - "capacity" - |) - |) - ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9039,71 +9701,80 @@ Module slice. } } *) - Definition new (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self RunAllocF RunDeallocF in match τ, α with | [], [ run_alloc_fn; run_dealloc_fn ] => ltac:(M.monadic (let run_alloc_fn := M.alloc (| run_alloc_fn |) in let run_dealloc_fn := M.alloc (| run_dealloc_fn |) in - Value.StructRecord - "core::slice::sort::merge_sort::RunVec" - [ - ("buf_ptr", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.path "core::slice::sort::TimSortRun" ] - ], - "unwrap", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "core::slice::sort::merge_sort::RunVec" + [ + ("buf_ptr", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.path "core::slice::sort::TimSortRun" ], - "new", + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.path "core::slice::sort::TimSortRun" ] + ], + "unwrap", [] |), [ M.call_closure (| - M.get_trait_method (| - "core::ops::function::Fn", - RunAllocF, - [ Ty.tuple [ Ty.path "usize" ] ], - "call", + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.path "core::slice::sort::TimSortRun" ], + "new", [] |), [ - run_alloc_fn; - Value.Tuple + M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + RunAllocF, + [ Ty.tuple [ Ty.path "usize" ] ], + "call", + [] + |), [ - M.read (| - M.get_constant (| - "core::slice::sort::merge_sort::new::START_RUN_CAPACITY" - |) + run_alloc_fn; + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.get_constant (| + "core::slice::sort::merge_sort::new::START_RUN_CAPACITY" + |) + |)) + ] |) ] + |) ] |) ] - |) - ] - |)); - ("capacity", - M.read (| - M.get_constant (| "core::slice::sort::merge_sort::new::START_RUN_CAPACITY" |) - |)); - ("len", Value.Integer Integer.Usize 0); - ("run_alloc_fn", M.read (| run_alloc_fn |)); - ("run_dealloc_fn", M.read (| run_dealloc_fn |)) - ])) + |))); + ("capacity", + A.to_value + (M.read (| + M.get_constant (| + "core::slice::sort::merge_sort::new::START_RUN_CAPACITY" + |) + |))); + ("len", A.to_value (M.of_value (| Value.Integer 0 |))); + ("run_alloc_fn", A.to_value (M.read (| run_alloc_fn |))); + ("run_dealloc_fn", A.to_value (M.read (| run_dealloc_fn |))) + ] + |))) | _, _ => M.impossible end. @@ -9136,7 +9807,7 @@ Module slice. self.len += 1; } *) - Definition push (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition push (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self RunAllocF RunDeallocF in match τ, α with | [], [ self; val ] => @@ -9146,28 +9817,29 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::RunVec", "len" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::RunVec", "capacity" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -9208,6 +9880,7 @@ Module slice. "capacity" |), BinOp.Panic.mul (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9215,7 +9888,7 @@ Module slice. "capacity" |) |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |) |) in let _ := @@ -9261,16 +9934,19 @@ Module slice. "core::slice::sort::merge_sort::RunVec", "run_alloc_fn" |); - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::sort::merge_sort::RunVec", - "capacity" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::sort::merge_sort::RunVec", + "capacity" + |) + |)) + ] + |) ] |) ] @@ -9288,7 +9964,7 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion (M.read (| old_buf_ptr |)); + M.pointer_coercion (| M.read (| old_buf_ptr |) |); M.call_closure (| M.get_associated_function (| Ty.apply @@ -9311,7 +9987,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -9336,13 +10012,18 @@ Module slice. "core::slice::sort::merge_sort::RunVec", "run_dealloc_fn" |); - Value.Tuple - [ M.read (| old_buf_ptr |); M.read (| old_capacity |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| old_buf_ptr |)); + A.to_value (M.read (| old_capacity |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -9393,7 +10074,7 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -9403,9 +10084,13 @@ Module slice. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9431,7 +10116,7 @@ Module slice. self.len -= 1; } *) - Definition remove (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remove (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self RunAllocF RunDeallocF in match τ, α with | [], [ self; index ] => @@ -9441,22 +10126,23 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| index |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| index |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::RunVec", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -9473,18 +10159,28 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Index out of bounds" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Index out of bounds" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -9528,8 +10224,8 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -9537,11 +10233,14 @@ Module slice. "add", [] |), - [ M.read (| ptr |); Value.Integer Integer.Usize 1 ] - |)); + [ M.read (| ptr |); M.of_value (| Value.Integer 1 |) ] + |) + |); M.read (| ptr |); BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9551,12 +10250,12 @@ Module slice. |), M.read (| index |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -9566,9 +10265,13 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9586,7 +10289,7 @@ Module slice. unsafe { &*ptr::slice_from_raw_parts(self.buf_ptr.as_ptr(), self.len) } } *) - Definition as_slice (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_slice (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self RunAllocF RunDeallocF in match τ, α with | [], [ self ] => @@ -9599,8 +10302,8 @@ Module slice. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::ptr::non_null::NonNull") @@ -9617,7 +10320,8 @@ Module slice. |) |) ] - |)); + |) + |); M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9642,7 +10346,7 @@ Module slice. self.len } *) - Definition len (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition len (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self RunAllocF RunDeallocF in match τ, α with | [], [ self ] => @@ -9683,7 +10387,7 @@ Module slice. panic!("Index out of bounds"); } *) - Definition index (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self RunAllocF RunDeallocF in match τ, α with | [], [ self; index ] => @@ -9696,22 +10400,23 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| index |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| index |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::RunVec", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9756,7 +10461,8 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -9771,10 +10477,19 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Index out of bounds" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Index out of bounds" |) + |)) + ] + |) + |) + |) ] |) ] @@ -9815,11 +10530,7 @@ Module slice. panic!("Index out of bounds"); } *) - Definition index_mut - (RunAllocF RunDeallocF : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition index_mut (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self RunAllocF RunDeallocF in match τ, α with | [], [ self; index ] => @@ -9832,22 +10543,23 @@ Module slice. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| index |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| index |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::RunVec", "len" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9892,7 +10604,8 @@ Module slice. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -9907,10 +10620,19 @@ Module slice. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Index out of bounds" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Index out of bounds" |) + |)) + ] + |) + |) + |) ] |) ] @@ -9943,7 +10665,7 @@ Module slice. (self.run_dealloc_fn)(self.buf_ptr.as_ptr(), self.capacity); } *) - Definition drop (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (RunAllocF RunDeallocF : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self RunAllocF RunDeallocF in match τ, α with | [], [ self ] => @@ -9972,38 +10694,42 @@ Module slice. "core::slice::sort::merge_sort::RunVec", "run_dealloc_fn" |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::ptr::non_null::NonNull") - [ Ty.path "core::slice::sort::TimSortRun" ], - "as_ptr", - [] - |), - [ - M.read (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ptr::non_null::NonNull") + [ Ty.path "core::slice::sort::TimSortRun" ], + "as_ptr", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::slice::sort::merge_sort::RunVec", + "buf_ptr" + |) + |) + ] + |)); + A.to_value + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::RunVec", - "buf_ptr" + "capacity" |) - |) - ] - |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::slice::sort::merge_sort::RunVec", - "capacity" - |) - |) - ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10029,14 +10755,14 @@ Module slice. Definition Self : Ty.t := Ty.path "core::slice::sort::TimSortRun". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -10066,7 +10792,7 @@ Module slice. Definition Self : Ty.t := Ty.path "core::slice::sort::TimSortRun". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10080,25 +10806,27 @@ Module slice. |), [ M.read (| f |); - M.read (| Value.String "TimSortRun" |); - M.read (| Value.String "len" |); + M.read (| M.of_value (| Value.String "TimSortRun" |) |); + M.read (| M.of_value (| Value.String "len" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::TimSortRun", "len" - |)); - M.read (| Value.String "start" |); + |) + |); + M.read (| M.of_value (| Value.String "start" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::TimSortRun", "start" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -10141,7 +10869,7 @@ Module slice. end } *) - Definition provide_sorted_batch (τ : list Ty.t) (α : list Value.t) : M := + Definition provide_sorted_batch (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; start; end_; is_less ] => ltac:(M.monadic @@ -10159,19 +10887,20 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.ge (M.read (| end_ |)) (M.read (| start |)), + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.ge (| M.read (| end_ |), M.read (| start |) |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| end_ |)) (M.read (| len |)))) - |)) + (BinOp.Pure.le (| M.read (| end_ |), M.read (| len |) |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -10180,20 +10909,24 @@ Module slice. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: end >= start && end <= len" + M.of_value (| + Value.String "assertion failed: end >= start && end <= len" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let start_end_diff := - M.alloc (| BinOp.Panic.sub (| M.read (| end_ |), M.read (| start |) |) |) in + M.alloc (| + BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10201,15 +10934,16 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| start_end_diff |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| start_end_diff |), + M.read (| M.get_constant (| "core::slice::sort::provide_sorted_batch::MIN_INSERTION_RUN" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.lt (M.read (| end_ |)) (M.read (| len |)))) + (BinOp.Pure.lt (| M.read (| end_ |), M.read (| len |) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -10220,6 +10954,7 @@ Module slice. M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), [ BinOp.Panic.add (| + Integer.Usize, M.read (| start |), M.read (| M.get_constant (| @@ -10235,7 +10970,7 @@ Module slice. M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), - [ M.read (| start_end_diff |); Value.Integer Integer.Usize 1 ] + [ M.read (| start_end_diff |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -10257,9 +10992,14 @@ Module slice. |), [ M.read (| v |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| start |)); ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) ] |); M.read (| presorted_start |); @@ -10267,8 +11007,8 @@ Module slice. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in end_ @@ -10277,8 +11017,8 @@ Module slice. end. Module provide_sorted_batch. - Definition value_MIN_INSERTION_RUN : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 10 |))). + Definition value_MIN_INSERTION_RUN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). End provide_sorted_batch. (* @@ -10316,7 +11056,7 @@ Module slice. } } *) - Definition find_streak (τ : list Ty.t) (α : list Value.t) : M := + Definition find_streak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; F ], [ v; is_less ] => ltac:(M.monadic @@ -10334,28 +11074,39 @@ Module slice. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| len |)) (Value.Integer Integer.Usize 2) + BinOp.Pure.lt (| + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Tuple [ M.read (| len |); Value.Bool false ] |) + M.return_ (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| len |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let end_ := M.alloc (| Value.Integer Integer.Usize 2 |) in + let end_ := M.alloc (| M.of_value (| Value.Integer 2 |) |) in let assume_reverse := M.alloc (| M.call_closure (| @@ -10368,30 +11119,34 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| v |); Value.Integer Integer.Usize 1 ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| v |); Value.Integer Integer.Usize 0 ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ M.read (| v |); M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ M.read (| v |); M.of_value (| Value.Integer 0 |) ] + |)) + ] + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10402,7 +11157,7 @@ Module slice. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10410,7 +11165,10 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| end_ |)) (M.read (| len |)), + BinOp.Pure.lt (| + M.read (| end_ |), + M.read (| len |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -10428,31 +11186,36 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| v |); M.read (| end_ |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ - M.read (| v |); - BinOp.Panic.sub (| - M.read (| end_ |), - Value.Integer Integer.Usize 1 - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ M.read (| v |); M.read (| end_ |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ + M.read (| v |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| end_ |), + M.of_value (| Value.Integer 1 |) + |) + ] + |)) + ] + |) ] |))) |) @@ -10467,11 +11230,12 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -10481,21 +11245,29 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.Tuple [ M.read (| end_ |); Value.Bool true ] |))); + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| end_ |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))); fun γ => ltac:(M.monadic (let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10503,10 +11275,13 @@ Module slice. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| end_ |)) (M.read (| len |)), + BinOp.Pure.lt (| + M.read (| end_ |), + M.read (| len |) + |), ltac:(M.monadic - (UnOp.Pure.not - (M.call_closure (| + (UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", F, @@ -10522,33 +11297,40 @@ Module slice. |), [ M.read (| is_less |); - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ M.read (| v |); M.read (| end_ |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ T ], - "get_unchecked", - [ Ty.path "usize" ] - |), - [ - M.read (| v |); - BinOp.Panic.sub (| - M.read (| end_ |), - Value.Integer Integer.Usize 1 - |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ M.read (| v |); M.read (| end_ |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ T ], + "get_unchecked", + [ Ty.path "usize" ] + |), + [ + M.read (| v |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| end_ |), + M.of_value (| Value.Integer 1 |) + |) + ] + |)) + ] + |) ] - |)))) + |) + |))) |) |)) in let _ := @@ -10561,11 +11343,12 @@ Module slice. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -10575,14 +11358,22 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.Tuple [ M.read (| end_ |); Value.Bool false ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| end_ |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) + |))) ] |) |))) diff --git a/CoqOfRust/core/slice/specialize.v b/CoqOfRust/core/slice/specialize.v index 593b3ab78..1b3669aba 100644 --- a/CoqOfRust/core/slice/specialize.v +++ b/CoqOfRust/core/slice/specialize.v @@ -20,7 +20,7 @@ Module slice. } } *) - Definition spec_fill (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fill (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; value ] => @@ -29,7 +29,7 @@ Module slice. let value := M.alloc (| value |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -119,15 +119,15 @@ Module slice. [ M.read (| el |); value ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.write (| M.read (| last |), M.read (| value |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -153,7 +153,7 @@ Module slice. } } *) - Definition spec_fill (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition spec_fill (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; value ] => @@ -221,10 +221,10 @@ Module slice. let item := M.copy (| γ0_0 |) in let _ := M.write (| M.read (| item |), M.read (| value |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) diff --git a/CoqOfRust/core/str/converts.v b/CoqOfRust/core/str/converts.v index c7a6d40d9..e8e527375 100644 --- a/CoqOfRust/core/str/converts.v +++ b/CoqOfRust/core/str/converts.v @@ -15,7 +15,7 @@ Module str. } } *) - Definition from_utf8 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -34,14 +34,17 @@ Module str. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_function (| "core::str::converts::from_utf8_unchecked", [] |), - [ M.read (| v |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::str::converts::from_utf8_unchecked", [] |), + [ M.read (| v |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -49,7 +52,11 @@ Module str. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let err := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| err |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| err |)) ] + |) |))) ] |) @@ -69,7 +76,7 @@ Module str. } } *) - Definition from_utf8_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf8_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -88,14 +95,20 @@ Module str. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_function (| "core::str::converts::from_utf8_unchecked_mut", [] |), - [ M.read (| v |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::str::converts::from_utf8_unchecked_mut", + [] + |), + [ M.read (| v |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -103,7 +116,11 @@ Module str. M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let err := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| err |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| err |)) ] + |) |))) ] |) @@ -118,7 +135,7 @@ Module str. unsafe { mem::transmute(v) } } *) - Definition from_utf8_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf8_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -145,12 +162,12 @@ Module str. unsafe { &mut *(v as *mut [u8] as *mut str) } } *) - Definition from_utf8_unchecked_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_utf8_unchecked_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |))) | _, _ => M.impossible end. End converts. diff --git a/CoqOfRust/core/str/count.v b/CoqOfRust/core/str/count.v index 7b596bb8d..61f339f7e 100644 --- a/CoqOfRust/core/str/count.v +++ b/CoqOfRust/core/str/count.v @@ -3,15 +3,15 @@ Require Import CoqOfRust.CoqOfRust. Module str. Module count. - Definition value_USIZE_SIZE : Value.t := + Definition value_USIZE_SIZE : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] |) |))). - Definition value_UNROLL_INNER : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 4 |))). + Definition value_UNROLL_INNER : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4 |) |))). (* pub(super) fn count_chars(s: &str) -> usize { @@ -26,29 +26,31 @@ Module str. } } *) - Definition count_chars (τ : list Ty.t) (α : list Value.t) : M := + Definition count_chars (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| s |) ] - |)) - (BinOp.Panic.mul (| + |), + 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" |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -148,7 +150,7 @@ Module str. total } *) - Definition do_count_chars (τ : list Ty.t) (α : list Value.t) : M := + Definition do_count_chars (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -183,7 +185,7 @@ Module str. let tail := M.copy (| γ0_2 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -204,36 +206,38 @@ Module str. [ M.read (| body |) ] |), ltac:(M.monadic - (BinOp.Pure.gt - (M.call_closure (| + (BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| head |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::str::count::USIZE_SIZE" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.gt - (M.call_closure (| + (BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| tail |) ] - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::str::count::USIZE_SIZE" |) - |)))) + |) + |))) |) ] |) @@ -267,12 +271,14 @@ Module str. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let total := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_function (| "core::str::count::char_count_general_case", @@ -360,7 +366,9 @@ Module str. |) in let chunk := M.copy (| γ0_0 |) in let counts := - M.alloc (| Value.Integer Integer.Usize 0 |) in + M.alloc (| + M.of_value (| Value.Integer 0 |) + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -569,6 +577,7 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), @@ -586,14 +595,18 @@ Module str. |) |) in M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |) in M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) |))) ] @@ -601,7 +614,9 @@ Module str. ] |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) |))) ] @@ -611,6 +626,7 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_function (| @@ -622,15 +638,17 @@ Module str. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -640,7 +658,8 @@ Module str. |), [ M.read (| remainder |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -652,9 +671,9 @@ Module str. M.read (| let counts := M.alloc (| - Value.Integer - Integer.Usize - 0 + M.of_value (| + Value.Integer 0 + |) |) in let _ := M.use @@ -755,6 +774,7 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), @@ -772,14 +792,18 @@ Module str. |) |) in M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |) in M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) |))) ] @@ -789,6 +813,7 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_function (| @@ -809,14 +834,16 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -829,8 +856,8 @@ Module str. end. Module do_count_chars. - Definition value_CHUNK_SIZE : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 192 |))). + Definition value_CHUNK_SIZE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 192 |) |))). End do_count_chars. (* @@ -839,29 +866,34 @@ Module str. ((!w >> 7) | (w >> 6)) & LSB } *) - Definition contains_non_continuation_byte (τ : list Ty.t) (α : list Value.t) : M := + Definition contains_non_continuation_byte (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ w ] => ltac:(M.monadic (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 Integer.I32 7 |)) - (BinOp.Panic.shr (| M.read (| w |), Value.Integer Integer.I32 6 |))) - (M.read (| + BinOp.Pure.bit_and (| + BinOp.Pure.bit_or (| + BinOp.Panic.shr (| + UnOp.Pure.not (| M.read (| w |) |), + M.of_value (| Value.Integer 7 |) + |), + BinOp.Panic.shr (| M.read (| w |), M.of_value (| Value.Integer 6 |) |) + |), + M.read (| M.get_constant (| "core::str::count::contains_non_continuation_byte::LSB" |) - |)))) + |) + |))) | _, _ => M.impossible end. Module contains_non_continuation_byte. - Definition value_LSB : Value.t := + Definition value_LSB : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "repeat_u8", [] |), - [ Value.Integer Integer.U8 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). End contains_non_continuation_byte. @@ -875,7 +907,7 @@ Module str. pair_sum.wrapping_mul(LSB_SHORTS) >> ((USIZE_SIZE - 2) * 8) } *) - Definition sum_bytes_in_usize (τ : list Ty.t) (α : list Value.t) : M := + Definition sum_bytes_in_usize (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ values ] => ltac:(M.monadic @@ -884,16 +916,19 @@ Module str. let pair_sum := M.alloc (| BinOp.Panic.add (| - BinOp.Pure.bit_and - (M.read (| values |)) - (M.read (| + 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 Integer.I32 8 |)) - (M.read (| + |) + |), + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| values |), M.of_value (| Value.Integer 8 |) |), + M.read (| M.get_constant (| "core::str::count::sum_bytes_in_usize::SKIP_BYTES" |) - |)) + |) + |) |) |) in M.alloc (| @@ -908,11 +943,13 @@ Module str. ] |), BinOp.Panic.mul (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| M.get_constant (| "core::str::count::USIZE_SIZE" |) |), - Value.Integer Integer.Usize 2 + M.of_value (| Value.Integer 2 |) |), - Value.Integer Integer.Usize 8 + M.of_value (| Value.Integer 8 |) |) |) |) @@ -921,23 +958,23 @@ Module str. end. Module sum_bytes_in_usize. - Definition value_LSB_SHORTS : Value.t := + Definition value_LSB_SHORTS : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "repeat_u16", [] |), - [ Value.Integer Integer.U16 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). - Definition value_SKIP_BYTES : Value.t := + Definition value_SKIP_BYTES : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "repeat_u16", [] |), - [ Value.Integer Integer.U16 255 ] + [ M.of_value (| Value.Integer 255 |) ] |) |))). End sum_bytes_in_usize. @@ -947,7 +984,7 @@ Module str. s.iter().filter(|&&byte| !super::validations::utf8_is_cont_byte(byte)).count() } *) - Definition char_count_general_case (τ : list Ty.t) (α : list Value.t) : M := + Definition char_count_general_case (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -995,8 +1032,8 @@ Module str. |), [ M.read (| s |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1008,18 +1045,20 @@ Module str. (let γ := M.read (| γ |) in let γ := M.read (| γ |) in let byte := M.copy (| γ |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::str::validations::utf8_is_cont_byte", [] |), [ M.read (| byte |) ] - |)))) + |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] diff --git a/CoqOfRust/core/str/error.v b/CoqOfRust/core/str/error.v index 876e702d1..5d082e691 100644 --- a/CoqOfRust/core/str/error.v +++ b/CoqOfRust/core/str/error.v @@ -40,20 +40,21 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::error::Utf8Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -85,28 +86,29 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::error::Utf8Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::error::Utf8Error", "valid_up_to" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::str::error::Utf8Error", "valid_up_to" |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -145,19 +147,19 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::error::Utf8Error". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -178,7 +180,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::error::Utf8Error". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -192,25 +194,27 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "Utf8Error" |); - M.read (| Value.String "valid_up_to" |); + M.read (| M.of_value (| Value.String "Utf8Error" |) |); + M.read (| M.of_value (| Value.String "valid_up_to" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::error::Utf8Error", "valid_up_to" - |)); - M.read (| Value.String "error_len" |); + |) + |); + M.read (| M.of_value (| Value.String "error_len" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::error::Utf8Error", "error_len" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -232,7 +236,7 @@ Module str. self.valid_up_to } *) - Definition valid_up_to (τ : list Ty.t) (α : list Value.t) : M := + Definition valid_up_to (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -258,7 +262,7 @@ Module str. } } *) - Definition error_len (τ : list Ty.t) (α : list Value.t) : M := + Definition error_len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -281,13 +285,17 @@ Module str. |) in let len := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.rust_cast (M.read (| len |)) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.rust_cast (| M.read (| len |) |)) ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -313,7 +321,7 @@ Module str. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -321,7 +329,7 @@ Module str. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -355,43 +363,59 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "invalid utf-8 sequence of " |); - M.read (| Value.String " bytes from index " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "invalid utf-8 sequence of " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes from index " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ error_len ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::error::Utf8Error", - "valid_up_to" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ error_len ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::error::Utf8Error", + "valid_up_to" + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -416,36 +440,47 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "incomplete utf-8 byte sequence from index " - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "incomplete utf-8 byte sequence from index " + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::error::Utf8Error", - "valid_up_to" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::error::Utf8Error", + "valid_up_to" + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -473,12 +508,12 @@ Module str. "invalid utf-8: corrupt contents" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "invalid utf-8: corrupt contents" |))) + M.read (| M.of_value (| Value.String "invalid utf-8: corrupt contents" |) |))) | _, _ => M.impossible end. @@ -501,7 +536,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::error::ParseBoolError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -509,7 +544,7 @@ Module str. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "ParseBoolError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "ParseBoolError" |) |) ] |))) | _, _ => M.impossible end. @@ -526,12 +561,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::error::ParseBoolError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::error::ParseBoolError" [])) + M.of_value (| Value.StructTuple "core::str::error::ParseBoolError" [] |))) | _, _ => M.impossible end. @@ -558,13 +593,13 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::error::ParseBoolError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -591,12 +626,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::error::ParseBoolError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -617,7 +652,7 @@ Module str. "provided string was not `true` or `false`".fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -626,7 +661,9 @@ Module str. M.call_closure (| M.get_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |), [ - M.read (| Value.String "provided string was not `true` or `false`" |); + M.read (| + M.of_value (| Value.String "provided string was not `true` or `false`" |) + |); M.read (| f |) ] |))) @@ -649,12 +686,12 @@ Module str. "failed to parse bool" } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "failed to parse bool" |))) + M.read (| M.of_value (| Value.String "failed to parse bool" |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/str/iter.v b/CoqOfRust/core/str/iter.v index 7a5008904..4201af236 100644 --- a/CoqOfRust/core/str/iter.v +++ b/CoqOfRust/core/str/iter.v @@ -14,32 +14,35 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::Chars". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::Chars" - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::Chars", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::iter::Chars" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::Chars", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -64,7 +67,7 @@ Module str. unsafe { next_code_point(&mut self.iter).map(|ch| char::from_u32_unchecked(ch)) } } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -89,8 +92,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -111,7 +114,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -122,7 +126,7 @@ Module str. super::count::count_chars(self.as_str()) } *) - Definition count (τ : list Ty.t) (α : list Value.t) : M := + Definition count (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -188,7 +192,7 @@ Module str. NonZeroUsize::new(remainder).map_or(Ok(()), Err) } *) - Definition advance_by (τ : list Ty.t) (α : list Value.t) : M := + Definition advance_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; remainder ] => ltac:(M.monadic @@ -197,18 +201,19 @@ Module str. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| remainder |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| remainder |), + M.read (| M.get_constant (| "core::str::iter::advance_by::CHUNK_SIZE" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -238,25 +243,26 @@ Module str. ] |) |) in - let bytes_skipped := M.alloc (| Value.Integer Integer.Usize 0 |) in + let bytes_skipped := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| remainder |)) - (M.read (| + BinOp.Pure.gt (| + M.read (| remainder |), + M.read (| M.get_constant (| "core::str::iter::advance_by::CHUNK_SIZE" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -290,6 +296,7 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| M.get_constant (| @@ -299,7 +306,9 @@ Module str. |) |) in let start_bytes := - M.alloc (| repeat (Value.Bool false) 32 |) in + M.alloc (| + repeat (| M.of_value (| Value.Bool false |), 32 |) + |) in let _ := M.use (M.match_operator (| @@ -315,17 +324,22 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.get_constant (| - "core::str::iter::advance_by::CHUNK_SIZE" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.get_constant (| + "core::str::iter::advance_by::CHUNK_SIZE" + |) + |))) + ] + |) ] |) |), @@ -375,8 +389,8 @@ Module str. start_bytes, i |), - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::str::validations::utf8_is_cont_byte", [] @@ -389,12 +403,17 @@ Module str. |) |) ] - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)) in @@ -403,9 +422,10 @@ Module str. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply @@ -451,8 +471,8 @@ Module str. |), [ M.read (| start_bytes |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -462,18 +482,22 @@ Module str. fun γ => ltac:(M.monadic (let i := M.copy (| γ |) in - M.rust_cast (M.read (| i |)))) + M.rust_cast (| + M.read (| i |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] - |)) + |) + |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -483,7 +507,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -524,15 +548,15 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.call_closure (| + BinOp.Pure.gt (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -549,8 +573,9 @@ Module str. "iter" |) ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -576,26 +601,27 @@ Module str. |) ] |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::str::validations::utf8_is_cont_byte", [] |), [ M.read (| b |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -605,7 +631,9 @@ Module str. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -638,13 +666,13 @@ Module str. "core::str::iter::Chars", "iter" |); - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -654,21 +682,21 @@ Module str. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -676,12 +704,13 @@ Module str. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.gt - (M.read (| remainder |)) - (Value.Integer Integer.Usize 0), + BinOp.Pure.gt (| + M.read (| remainder |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.call_closure (| + (BinOp.Pure.gt (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -698,8 +727,9 @@ Module str. "iter" |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -708,7 +738,11 @@ Module str. let β := remainder in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let b := M.copy (| @@ -727,7 +761,7 @@ Module str. |) ] |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |) in let slurp := @@ -773,7 +807,7 @@ Module str. ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -781,7 +815,7 @@ Module str. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -815,8 +849,12 @@ Module str. |), [ M.read (| remainder |) ] |); - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; - M.constructor_as_closure "core::result::Result::Err" + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |); + M.constructor_as_closure (| "core::result::Result::Err" |) ] |) |) @@ -833,7 +871,7 @@ Module str. ((len + 3) / 4, Some(len)) } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -859,14 +897,27 @@ Module str. |) |) in M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| - BinOp.Panic.add (| M.read (| len |), Value.Integer Integer.Usize 3 |), - Value.Integer Integer.Usize 4 - |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 3 |) + |), + M.of_value (| Value.Integer 4 |) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -878,7 +929,7 @@ Module str. self.next_back() } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -923,7 +974,7 @@ Module str. Ok(()) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -962,10 +1013,19 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Chars(" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Chars(" |) + |)) + ] + |) + |) + |) ] |) ] @@ -1156,8 +1216,17 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String ")" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String ")" |) |)) + ] + |) + |) + |) ] |) ] @@ -1214,7 +1283,13 @@ Module str. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1238,7 +1313,7 @@ Module str. unsafe { next_code_point_reverse(&mut self.iter).map(|ch| char::from_u32_unchecked(ch)) } } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1263,8 +1338,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1285,7 +1360,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1319,7 +1395,7 @@ Module str. unsafe { from_utf8_unchecked(self.iter.as_slice()) } } *) - Definition as_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1360,43 +1436,53 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::CharIndices". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::CharIndices" - [ - ("front_offset", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::CharIndices", - "front_offset" - |) - ] - |)); - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::str::iter::Chars", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::CharIndices", - "iter" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::iter::CharIndices" + [ + ("front_offset", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::CharIndices", + "front_offset" + |) + ] + |))); + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::str::iter::Chars", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::CharIndices", + "iter" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1412,7 +1498,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::CharIndices". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1426,25 +1512,27 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "CharIndices" |); - M.read (| Value.String "front_offset" |); + M.read (| M.of_value (| Value.String "CharIndices" |) |); + M.read (| M.of_value (| Value.String "front_offset" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::CharIndices", "front_offset" - |)); - M.read (| Value.String "iter" |); + |) + |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::CharIndices", "iter" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1478,7 +1566,7 @@ Module str. } } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1529,7 +1617,9 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1580,14 +1670,28 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - BinOp.Panic.sub (| M.read (| pre_len |), M.read (| len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| pre_len |), + M.read (| len |) + |) |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| index |); M.read (| ch |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ A.to_value (M.read (| index |)); A.to_value (M.read (| ch |)) + ] + |)) + ] + |) |))) ] |) @@ -1600,7 +1704,7 @@ Module str. self.iter.count() } *) - Definition count (τ : list Ty.t) (α : list Value.t) : M := + Definition count (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1631,7 +1735,7 @@ Module str. self.iter.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1661,7 +1765,7 @@ Module str. self.next_back() } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1705,7 +1809,7 @@ Module str. }) } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1738,8 +1842,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1753,6 +1857,7 @@ Module str. let index := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1784,12 +1889,21 @@ Module str. |) |) |) in - M.alloc (| Value.Tuple [ M.read (| index |); M.read (| ch |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| index |)); + A.to_value (M.read (| ch |)) + ] + |) + |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1822,7 +1936,7 @@ Module str. self.iter.as_str() } *) - Definition as_str (τ : list Ty.t) (α : list Value.t) : M := + Definition as_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1847,7 +1961,7 @@ Module str. self.front_offset } *) - Definition offset (τ : list Ty.t) (α : list Value.t) : M := + Definition offset (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1881,33 +1995,36 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::Bytes". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::Bytes" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::copied::Copied") - [ Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::Bytes", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::Bytes" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::iter::adapters::copied::Copied") + [ Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::Bytes", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1923,7 +2040,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::Bytes". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1937,16 +2054,17 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "Bytes" |); + M.read (| M.of_value (| Value.String "Bytes" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::Bytes", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -1971,7 +2089,7 @@ Module str. self.0.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2002,7 +2120,7 @@ Module str. self.0.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2033,7 +2151,7 @@ Module str. self.0.count() } *) - Definition count (τ : list Ty.t) (α : list Value.t) : M := + Definition count (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2062,7 +2180,7 @@ Module str. self.0.last() } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2091,7 +2209,7 @@ Module str. self.0.nth(n) } *) - Definition nth (τ : list Ty.t) (α : list Value.t) : M := + Definition nth (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -2127,7 +2245,7 @@ Module str. self.0.all(f) } *) - Definition all (τ : list Ty.t) (α : list Value.t) : M := + Definition all (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; f ] => ltac:(M.monadic @@ -2163,7 +2281,7 @@ Module str. self.0.any(f) } *) - Definition any (τ : list Ty.t) (α : list Value.t) : M := + Definition any (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; f ] => ltac:(M.monadic @@ -2199,7 +2317,7 @@ Module str. self.0.find(predicate) } *) - Definition find (τ : list Ty.t) (α : list Value.t) : M := + Definition find (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -2235,7 +2353,7 @@ Module str. self.0.position(predicate) } *) - Definition position (τ : list Ty.t) (α : list Value.t) : M := + Definition position (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -2271,7 +2389,7 @@ Module str. self.0.rposition(predicate) } *) - Definition rposition (τ : list Ty.t) (α : list Value.t) : M := + Definition rposition (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -2306,7 +2424,7 @@ Module str. unsafe { self.0.__iterator_get_unchecked(idx) } } *) - Definition __iterator_get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition __iterator_get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; idx ] => ltac:(M.monadic @@ -2364,7 +2482,7 @@ Module str. self.0.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2395,7 +2513,7 @@ Module str. self.0.nth_back(n) } *) - Definition nth_back (τ : list Ty.t) (α : list Value.t) : M := + Definition nth_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; n ] => ltac:(M.monadic @@ -2431,7 +2549,7 @@ Module str. self.0.rfind(predicate) } *) - Definition rfind (τ : list Ty.t) (α : list Value.t) : M := + Definition rfind (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; predicate ] => ltac:(M.monadic @@ -2480,7 +2598,7 @@ Module str. self.0.len() } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2511,7 +2629,7 @@ Module str. self.0.is_empty() } *) - Definition is_empty (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2584,8 +2702,8 @@ Module str. (* const MAY_HAVE_SIDE_EFFECT: bool = false; *) (* Ty.path "bool" *) - Definition value_MAY_HAVE_SIDE_EFFECT : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_MAY_HAVE_SIDE_EFFECT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). Axiom Implements : M.IsTraitInstance @@ -2606,7 +2724,7 @@ Module str. $e } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -2615,27 +2733,30 @@ Module str. M.read (| let s := M.copy (| self |) in M.alloc (| - M.struct_record_update - (M.read (| M.read (| s |) |)) - [ - ("matcher", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.associated, - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| s |), - "core::str::iter::SplitInternal", - "matcher" - |) - ] - |)) - ] + M.of_value (| + M.struct_record_update + (M.read (| M.read (| s |) |)) + [ + ("matcher", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.associated, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| s |), + "core::str::iter::SplitInternal", + "matcher" + |) + ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -2679,7 +2800,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -2735,58 +2856,65 @@ Module str. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SplitInternal" |) + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SplitInternal" |) |) ] |) |); - M.read (| Value.String "start" |); + M.read (| M.of_value (| Value.String "start" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "start" - |)) + |) + |) ] |); - M.read (| Value.String "end" |); + M.read (| M.of_value (| Value.String "end" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "end" - |)) + |) + |) ] |); - M.read (| Value.String "matcher" |); + M.read (| M.of_value (| Value.String "matcher" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "matcher" - |)) + |) + |) ] |); - M.read (| Value.String "allow_trailing_empty" |); + M.read (| M.of_value (| Value.String "allow_trailing_empty" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "allow_trailing_empty" - |)) + |) + |) ] |); - M.read (| Value.String "finished" |); + M.read (| M.of_value (| Value.String "finished" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "finished" - |)) + |) + |) ] |) ] @@ -2822,7 +2950,7 @@ Module str. None } *) - Definition get_end (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_end (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -2833,21 +2961,22 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "finished" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2858,10 +2987,10 @@ Module str. "core::str::iter::SplitInternal", "finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2877,8 +3006,9 @@ Module str. |) |), ltac:(M.monadic - (BinOp.Pure.gt - (BinOp.Panic.sub (| + (BinOp.Pure.gt (| + BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2893,8 +3023,9 @@ Module str. "start" |) |) - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -2934,44 +3065,51 @@ Module str. |) ] |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "start" - |) - |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "end" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "start" + |) + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "end" + |) + |))) + ] + |) ] |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| string |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| string |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -2999,7 +3137,7 @@ Module str. } } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -3010,7 +3148,7 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3026,11 +3164,15 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let haystack := @@ -3095,19 +3237,22 @@ Module str. |), [ M.read (| haystack |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "start" - |) - |)); - ("end_", M.read (| a |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "start" + |) + |))); + ("end_", A.to_value (M.read (| a |))) + ] + |) ] |) |) in @@ -3121,7 +3266,11 @@ Module str. M.read (| b |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| elt |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| elt |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -3166,7 +3315,7 @@ Module str. } } *) - Definition next_inclusive (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_inclusive (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -3177,7 +3326,7 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3193,11 +3342,15 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let haystack := @@ -3261,19 +3414,22 @@ Module str. |), [ M.read (| haystack |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "start" - |) - |)); - ("end_", M.read (| b |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "start" + |) + |))); + ("end_", A.to_value (M.read (| b |))) + ] + |) ] |) |) in @@ -3287,7 +3443,11 @@ Module str. M.read (| b |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| elt |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| elt |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -3349,7 +3509,7 @@ Module str. } } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -3360,7 +3520,7 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3376,30 +3536,35 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "allow_trailing_empty" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3410,7 +3575,7 @@ Module str. "core::str::iter::SplitInternal", "allow_trailing_empty" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.match_operator (| M.alloc (| @@ -3435,15 +3600,16 @@ Module str. let elt := M.copy (| γ0_0 |) in let γ := M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_empty", [] |), [ M.read (| elt |) ] - |)) + |) + |) |) in let _ := M.is_constant_or_break_match (| @@ -3454,9 +3620,11 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| elt |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| elt |)) ] + |) |) |) |) @@ -3464,7 +3632,7 @@ Module str. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3484,19 +3652,23 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let haystack := @@ -3561,19 +3733,22 @@ Module str. |), [ M.read (| haystack |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| b |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "end" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| b |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "end" + |) + |))) + ] + |) ] |) |) in @@ -3587,7 +3762,11 @@ Module str. M.read (| a |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| elt |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| elt |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -3598,47 +3777,54 @@ Module str. "core::str::iter::SplitInternal", "finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "usize" ] - ] - |), - [ - M.read (| haystack |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ] + |), [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "start" - |) - |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "end" - |) - |)) + M.read (| haystack |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "start" + |) + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "end" + |) + |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -3694,7 +3880,7 @@ Module str. } } *) - Definition next_back_inclusive (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back_inclusive (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -3705,7 +3891,7 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3721,30 +3907,35 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "allow_trailing_empty" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3755,7 +3946,7 @@ Module str. "core::str::iter::SplitInternal", "allow_trailing_empty" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.match_operator (| M.alloc (| @@ -3780,15 +3971,16 @@ Module str. let elt := M.copy (| γ0_0 |) in let γ := M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_empty", [] |), [ M.read (| elt |) ] - |)) + |) + |) |) in let _ := M.is_constant_or_break_match (| @@ -3799,9 +3991,11 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| elt |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| elt |)) ] + |) |) |) |) @@ -3809,7 +4003,7 @@ Module str. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3829,19 +4023,23 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let haystack := @@ -3905,19 +4103,22 @@ Module str. |), [ M.read (| haystack |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| b |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "end" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| b |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "end" + |) + |))) + ] + |) ] |) |) in @@ -3931,7 +4132,11 @@ Module str. M.read (| b |) |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| elt |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| elt |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -3942,47 +4147,54 @@ Module str. "core::str::iter::SplitInternal", "finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "usize" ] - ] - |), - [ - M.read (| haystack |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ] + |), [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "start" - |) - |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "end" - |) - |)) + M.read (| haystack |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "start" + |) + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "end" + |) + |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))) ] |) @@ -4006,7 +4218,7 @@ Module str. Some(unsafe { self.matcher.haystack().get_unchecked(self.start..self.end) }) } *) - Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -4017,7 +4229,7 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4033,63 +4245,74 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Searcher", - Ty.associated, - [], - "haystack", - [] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] |), [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "matcher" - |) - ] - |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitInternal", - "start" - |) - |)); - ("end_", - M.read (| + M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Searcher", + Ty.associated, + [], + "haystack", + [] + |), + [ M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", - "end" + "matcher" |) - |)) + ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "start" + |) + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitInternal", + "end" + |) + |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |) |))) |))) @@ -4118,7 +4341,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -4146,16 +4369,17 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Split" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Split" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::Split", 0 - |)) + |) + |) ] |) ] @@ -4183,7 +4407,7 @@ Module str. self.0.next() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -4224,32 +4448,35 @@ Module str. $forward_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::Split" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::Split", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::Split" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::Split", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4279,7 +4506,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -4307,16 +4534,17 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "RSplit" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RSplit" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::RSplit", 0 - |)) + |) + |) ] |) ] @@ -4344,7 +4572,7 @@ Module str. self.0.next_back() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -4385,32 +4613,35 @@ Module str. $reverse_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::RSplit" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::RSplit", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::RSplit" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::RSplit", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4455,7 +4686,7 @@ Module str. self.0.next_back() } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -4495,7 +4726,7 @@ Module str. self.0.next() } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -4535,7 +4766,7 @@ Module str. self.0.remainder() } *) - Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -4571,7 +4802,7 @@ Module str. self.0.remainder() } *) - Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -4617,7 +4848,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -4645,16 +4876,20 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "SplitTerminator" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SplitTerminator" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::SplitTerminator", 0 - |)) + |) + |) ] |) ] @@ -4683,7 +4918,7 @@ Module str. self.0.next() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -4725,32 +4960,35 @@ Module str. $forward_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::SplitTerminator" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::SplitTerminator", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::SplitTerminator" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::SplitTerminator", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4781,7 +5019,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -4809,16 +5047,20 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "RSplitTerminator" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "RSplitTerminator" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::RSplitTerminator", 0 - |)) + |) + |) ] |) ] @@ -4847,7 +5089,7 @@ Module str. self.0.next_back() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -4889,32 +5131,35 @@ Module str. $reverse_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => - ltac:(M.monadic - (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::RSplitTerminator" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::RSplitTerminator", - 0 - |) - ] - |) - ])) + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructTuple + "core::str::iter::RSplitTerminator" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::RSplitTerminator", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4962,7 +5207,7 @@ Module str. self.0.next_back() } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5003,7 +5248,7 @@ Module str. self.0.next() } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5044,7 +5289,7 @@ Module str. self.0.remainder() } *) - Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5081,7 +5326,7 @@ Module str. self.0.remainder() } *) - Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5119,7 +5364,7 @@ Module str. $e } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5128,27 +5373,30 @@ Module str. M.read (| let s := M.copy (| self |) in M.alloc (| - M.struct_record_update - (M.read (| M.read (| s |) |)) - [ - ("iter", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| s |), - "core::str::iter::SplitNInternal", - "iter" - |) - ] - |)) - ] + M.of_value (| + M.struct_record_update + (M.read (| M.read (| s |) |)) + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| s |), + "core::str::iter::SplitNInternal", + "iter" + |) + ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -5186,7 +5434,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -5221,27 +5469,32 @@ Module str. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SplitNInternal" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SplitNInternal" |) |) + ] |) |); - M.read (| Value.String "iter" |); + M.read (| M.of_value (| Value.String "iter" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitNInternal", "iter" - |)) + |) + |) ] |); - M.read (| Value.String "count" |); + M.read (| M.of_value (| Value.String "count" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitNInternal", "count" - |)) + |) + |) ] |) ] @@ -5277,7 +5530,7 @@ Module str. } } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5294,18 +5547,14 @@ Module str. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 0 - |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 1 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -5313,7 +5562,7 @@ Module str. "core::str::iter::SplitNInternal", "count" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in M.alloc (| M.call_closure (| @@ -5342,7 +5591,11 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| M.call_closure (| @@ -5388,7 +5641,7 @@ Module str. } } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5405,18 +5658,14 @@ Module str. fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 0 - |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 1 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -5424,7 +5673,7 @@ Module str. "core::str::iter::SplitNInternal", "count" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in M.alloc (| M.call_closure (| @@ -5453,7 +5702,11 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.alloc (| M.call_closure (| @@ -5486,7 +5739,7 @@ Module str. self.iter.remainder() } *) - Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5531,7 +5784,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -5559,16 +5812,17 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "SplitN" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "SplitN" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::SplitN", 0 - |)) + |) + |) ] |) ] @@ -5596,7 +5850,7 @@ Module str. self.0.next() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5637,32 +5891,35 @@ Module str. $forward_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::SplitN" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::SplitNInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::SplitN", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::SplitN" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::SplitNInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::SplitN", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5692,7 +5949,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -5720,16 +5977,17 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "RSplitN" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RSplitN" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::RSplitN", 0 - |)) + |) + |) ] |) ] @@ -5757,7 +6015,7 @@ Module str. self.0.next_back() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5798,32 +6056,35 @@ Module str. $reverse_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::RSplitN" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::SplitNInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::RSplitN", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::RSplitN" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::SplitNInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::RSplitN", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5868,7 +6129,7 @@ Module str. self.0.remainder() } *) - Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5904,7 +6165,7 @@ Module str. self.0.remainder() } *) - Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5942,7 +6203,7 @@ Module str. $e } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -5951,20 +6212,29 @@ Module str. M.read (| let s := M.copy (| self |) in M.alloc (| - Value.StructTuple - "core::str::iter::MatchIndicesInternal" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.associated, [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| s |), - "core::str::iter::MatchIndicesInternal", - 0 - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::str::iter::MatchIndicesInternal" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.associated, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| s |), + "core::str::iter::MatchIndicesInternal", + 0 + |) + ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -5995,7 +6265,7 @@ Module str. f.debug_tuple("MatchIndicesInternal").field(&self.0).finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -6023,16 +6293,20 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "MatchIndicesInternal" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "MatchIndicesInternal" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::MatchIndicesInternal", 0 - |)) + |) + |) ] |) ] @@ -6061,7 +6335,7 @@ Module str. .map(|(start, end)| unsafe { (start, self.0.haystack().get_unchecked(start..end)) }) } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -6097,8 +6371,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6111,49 +6385,55 @@ Module str. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in - Value.Tuple - [ - M.read (| start |); - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "usize" ] - ] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Searcher", - Ty.associated, - [], - "haystack", - [] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| start |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ] |), [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::MatchIndicesInternal", - 0 + M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Searcher", + Ty.associated, + [], + "haystack", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::MatchIndicesInternal", + 0 + |) + ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] |) ] - |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| start |)); - ("end_", M.read (| end_ |)) - ] - ] - |) - ])) + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6174,7 +6454,7 @@ Module str. .map(|(start, end)| unsafe { (start, self.0.haystack().get_unchecked(start..end)) }) } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -6210,8 +6490,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6224,49 +6504,55 @@ Module str. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in - Value.Tuple - [ - M.read (| start |); - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "usize" ] - ] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Searcher", - Ty.associated, - [], - "haystack", - [] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| start |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ] |), [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::MatchIndicesInternal", - 0 + M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Searcher", + Ty.associated, + [], + "haystack", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::MatchIndicesInternal", + 0 + |) + ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", A.to_value (M.read (| end_ |))) + ] |) ] - |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| start |)); - ("end_", M.read (| end_ |)) - ] - ] - |) - ])) + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6294,7 +6580,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -6322,16 +6608,18 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "MatchIndices" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "MatchIndices" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::MatchIndices", 0 - |)) + |) + |) ] |) ] @@ -6360,7 +6648,7 @@ Module str. self.0.next() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -6401,32 +6689,35 @@ Module str. $forward_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::MatchIndices" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::MatchIndicesInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::MatchIndices", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::MatchIndices" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::MatchIndicesInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::MatchIndices", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6457,7 +6748,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -6485,16 +6776,18 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "RMatchIndices" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RMatchIndices" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::RMatchIndices", 0 - |)) + |) + |) ] |) ] @@ -6524,7 +6817,7 @@ Module str. self.0.next_back() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -6566,32 +6859,35 @@ Module str. $reverse_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::RMatchIndices" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::MatchIndicesInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::RMatchIndices", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::RMatchIndices" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::MatchIndicesInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::RMatchIndices", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6637,7 +6933,7 @@ Module str. self.0.next_back() } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -6678,7 +6974,7 @@ Module str. self.0.next() } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -6720,7 +7016,7 @@ Module str. $e } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -6729,20 +7025,29 @@ Module str. M.read (| let s := M.copy (| self |) in M.alloc (| - Value.StructTuple - "core::str::iter::MatchesInternal" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.associated, [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| s |), - "core::str::iter::MatchesInternal", - 0 - |) - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::str::iter::MatchesInternal" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.associated, + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| s |), + "core::str::iter::MatchesInternal", + 0 + |) + ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -6773,7 +7078,7 @@ Module str. f.debug_tuple("MatchesInternal").field(&self.0).finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -6801,16 +7106,20 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "MatchesInternal" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "MatchesInternal" |) |) + ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::MatchesInternal", 0 - |)) + |) + |) ] |) ] @@ -6840,7 +7149,7 @@ Module str. }) } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -6876,8 +7185,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6917,15 +7226,21 @@ Module str. |) ] |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| a |)); ("end_", M.read (| b |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| a |))); + ("end_", A.to_value (M.read (| b |))) + ] + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -6947,7 +7262,7 @@ Module str. }) } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -6983,8 +7298,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7024,15 +7339,21 @@ Module str. |) ] |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| a |)); ("end_", M.read (| b |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| a |))); + ("end_", A.to_value (M.read (| b |))) + ] + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -7060,7 +7381,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -7088,16 +7409,17 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "Matches" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Matches" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::Matches", 0 - |)) + |) + |) ] |) ] @@ -7125,7 +7447,7 @@ Module str. self.0.next() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -7166,32 +7488,35 @@ Module str. $forward_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::Matches" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::MatchesInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::Matches", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::Matches" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::MatchesInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::Matches", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7221,7 +7546,7 @@ Module str. .finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -7249,16 +7574,17 @@ Module str. "debug_tuple", [] |), - [ M.read (| f |); M.read (| Value.String "RMatches" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "RMatches" |) |) ] |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::RMatches", 0 - |)) + |) + |) ] |) ] @@ -7286,7 +7612,7 @@ Module str. self.0.next_back() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -7327,32 +7653,35 @@ Module str. $reverse_iterator(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::RMatches" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::MatchesInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::RMatches", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::RMatches" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::MatchesInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::RMatches", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7397,7 +7726,7 @@ Module str. self.0.next_back() } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -7437,7 +7766,7 @@ Module str. self.0.next() } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -7488,36 +7817,39 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::Lines". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::Lines" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::map::Map") + M.of_value (| + Value.StructTuple + "core::str::iter::Lines" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::iter::adapters::map::Map") + [ + Ty.apply (Ty.path "core::str::iter::SplitInclusive") [ Ty.path "char" ]; + Ty.path "core::str::LinesMap" + ], + [], + "clone", + [] + |), [ - Ty.apply (Ty.path "core::str::iter::SplitInclusive") [ Ty.path "char" ]; - Ty.path "core::str::LinesMap" - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::Lines", - 0 - |) - ] - |) - ])) + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::Lines", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7533,7 +7865,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::Lines". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -7547,16 +7879,17 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "Lines" |); + M.read (| M.of_value (| Value.String "Lines" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::Lines", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -7581,7 +7914,7 @@ Module str. self.0.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7615,7 +7948,7 @@ Module str. self.0.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7649,7 +7982,7 @@ Module str. self.next_back() } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7689,7 +8022,7 @@ Module str. self.0.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7748,31 +8081,34 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::LinesAny". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::LinesAny" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::str::iter::Lines", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::LinesAny", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::LinesAny" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::str::iter::Lines", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::LinesAny", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -7788,7 +8124,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::LinesAny". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -7802,16 +8138,17 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "LinesAny" |); + M.read (| M.of_value (| Value.String "LinesAny" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::LinesAny", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -7836,7 +8173,7 @@ Module str. self.0.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7865,7 +8202,7 @@ Module str. self.0.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7910,7 +8247,7 @@ Module str. self.0.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7973,39 +8310,42 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::SplitWhitespace". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::SplitWhitespace" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::filter::Filter") - [ + M.of_value (| + Value.StructRecord + "core::str::iter::SplitWhitespace" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", Ty.apply - (Ty.path "core::str::iter::Split") - [ Ty.path "core::str::IsWhitespace" ]; - Ty.path "core::str::IsNotEmpty" - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitWhitespace", - "inner" - |) - ] - |)) - ])) + (Ty.path "core::iter::adapters::filter::Filter") + [ + Ty.apply + (Ty.path "core::str::iter::Split") + [ Ty.path "core::str::IsWhitespace" ]; + Ty.path "core::str::IsNotEmpty" + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitWhitespace", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -8021,7 +8361,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::SplitWhitespace". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8035,17 +8375,18 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "SplitWhitespace" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "SplitWhitespace" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitWhitespace", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -8086,44 +8427,47 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::SplitAsciiWhitespace". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::SplitAsciiWhitespace" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::map::Map") - [ + M.of_value (| + Value.StructRecord + "core::str::iter::SplitAsciiWhitespace" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", Ty.apply - (Ty.path "core::iter::adapters::filter::Filter") + (Ty.path "core::iter::adapters::map::Map") [ Ty.apply - (Ty.path "core::slice::iter::Split") - [ Ty.path "u8"; Ty.path "core::str::IsAsciiWhitespace" ]; - Ty.path "core::str::BytesIsNotEmpty" - ]; - Ty.path "core::str::UnsafeBytesToStr" - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitAsciiWhitespace", - "inner" - |) - ] - |)) - ])) + (Ty.path "core::iter::adapters::filter::Filter") + [ + Ty.apply + (Ty.path "core::slice::iter::Split") + [ Ty.path "u8"; Ty.path "core::str::IsAsciiWhitespace" ]; + Ty.path "core::str::BytesIsNotEmpty" + ]; + Ty.path "core::str::UnsafeBytesToStr" + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitAsciiWhitespace", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -8139,7 +8483,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::SplitAsciiWhitespace". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8153,17 +8497,18 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "SplitAsciiWhitespace" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "SplitAsciiWhitespace" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitAsciiWhitespace", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -8195,7 +8540,7 @@ Module str. self.inner.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8231,7 +8576,7 @@ Module str. self.inner.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8267,7 +8612,7 @@ Module str. self.next_back() } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8307,7 +8652,7 @@ Module str. self.inner.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8365,7 +8710,7 @@ Module str. self.inner.iter.remainder() } *) - Definition remainder (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8405,7 +8750,7 @@ Module str. self.inner.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8446,7 +8791,7 @@ Module str. self.inner.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8487,7 +8832,7 @@ Module str. self.next_back() } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8527,7 +8872,7 @@ Module str. self.inner.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8595,7 +8940,7 @@ Module str. Some(unsafe { crate::str::from_utf8_unchecked(&self.inner.iter.iter.v) }) } *) - Definition remainder (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8605,7 +8950,7 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8633,42 +8978,49 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) - |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) - ] - |) in - M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_function (| "core::str::converts::from_utf8_unchecked", [] |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.SubPointer.get_struct_record_field (| + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| "core::str::converts::from_utf8_unchecked", [] |), + [ + M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::SplitAsciiWhitespace", - "inner" + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::SplitAsciiWhitespace", + "inner" + |), + "core::iter::adapters::map::Map", + "iter" + |), + "core::iter::adapters::filter::Filter", + "iter" |), - "core::iter::adapters::map::Map", - "iter" - |), - "core::iter::adapters::filter::Filter", - "iter" - |), - "core::slice::iter::Split", - "v" - |) - |) - ] - |) - ] + "core::slice::iter::Split", + "v" + |) + |) + ] + |)) + ] + |) |) |))) |))) @@ -8690,7 +9042,7 @@ Module str. self.0.next_inclusive() } *) - Definition next (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -8732,7 +9084,7 @@ Module str. f.debug_struct("SplitInclusive").field("0", &self.0).finish() } *) - Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self; f ] => @@ -8760,17 +9112,21 @@ Module str. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "SplitInclusive" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SplitInclusive" |) |) + ] |) |); - M.read (| Value.String "0" |); + M.read (| M.of_value (| Value.String "0" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::iter::SplitInclusive", 0 - |)) + |) + |) ] |) ] @@ -8796,32 +9152,35 @@ Module str. SplitInclusive(self.0.clone()) } *) - Definition clone (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::SplitInclusive" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::iter::SplitInclusive", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::SplitInclusive" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::iter::SplitInclusive", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -8843,7 +9202,7 @@ Module str. self.0.next_back_inclusive() } *) - Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -8897,7 +9256,7 @@ Module str. self.0.remainder() } *) - Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition remainder (P : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self P in match τ, α with | [], [ self ] => @@ -8936,43 +9295,53 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::EncodeUtf16". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::EncodeUtf16" - [ - ("chars", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::str::iter::Chars", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::EncodeUtf16", - "chars" - |) - ] - |)); - ("extra", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "u16", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::EncodeUtf16", - "extra" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::iter::EncodeUtf16" + [ + ("chars", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::str::iter::Chars", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::EncodeUtf16", + "chars" + |) + ] + |))); + ("extra", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "u16", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::EncodeUtf16", + "extra" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -8992,7 +9361,7 @@ Module str. f.debug_struct("EncodeUtf16").finish_non_exhaustive() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9012,7 +9381,7 @@ Module str. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "EncodeUtf16" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "EncodeUtf16" |) |) ] |) |) ] @@ -9052,7 +9421,7 @@ Module str. }) } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9062,22 +9431,23 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::EncodeUtf16", "extra" |) - |)) - (Value.Integer Integer.U16 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -9099,20 +9469,22 @@ Module str. "core::str::iter::EncodeUtf16", "extra" |), - Value.Integer Integer.U16 0 + M.of_value (| Value.Integer 0 |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| tmp |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| tmp |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let buf := M.alloc (| repeat (Value.Integer Integer.U16 0) 2 |) in + let buf := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 2 |) |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9138,8 +9510,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -9167,7 +9539,7 @@ Module str. |), [ M.read (| ch |); - (* Unsize *) M.pointer_coercion buf + (* Unsize *) M.pointer_coercion (| buf |) ] |) ] @@ -9175,16 +9547,17 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| n |)) - (Value.Integer Integer.Usize 2) + BinOp.Pure.eq (| + M.read (| n |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9202,25 +9575,27 @@ Module str. M.SubPointer.get_array_field (| buf, M.alloc (| - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.SubPointer.get_array_field (| buf, - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -9249,7 +9624,7 @@ Module str. } } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9279,58 +9654,83 @@ Module str. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::EncodeUtf16", "extra" |) - |)) - (Value.Integer Integer.U16 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| - BinOp.Panic.add (| M.read (| len |), Value.Integer Integer.Usize 2 |), - Value.Integer Integer.Usize 3 - |); - Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 3 |) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| len |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.add (| - BinOp.Panic.div (| - BinOp.Panic.add (| - M.read (| len |), - Value.Integer Integer.Usize 2 - |), - Value.Integer Integer.Usize 3 - |), - Value.Integer Integer.Usize 1 - |); - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.read (| len |), - Value.Integer Integer.Usize 1 - |) - ] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.div (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 3 |) + |), + M.of_value (| Value.Integer 1 |) + |)); + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |)) + ] + |)) + ] + |) |))) ] |) @@ -9394,49 +9794,52 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::EscapeDebug". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::EscapeDebug" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::chain::Chain") - [ + M.of_value (| + Value.StructRecord + "core::str::iter::EscapeDebug" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", Ty.apply - (Ty.path "core::iter::adapters::flatten::Flatten") + (Ty.path "core::iter::adapters::chain::Chain") [ Ty.apply - (Ty.path "core::option::IntoIter") - [ Ty.path "core::char::EscapeDebug" ] - ]; - Ty.apply - (Ty.path "core::iter::adapters::flatten::FlatMap") - [ - Ty.path "core::str::iter::Chars"; - Ty.path "core::char::EscapeDebug"; - Ty.path "core::str::CharEscapeDebugContinue" - ] - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::EscapeDebug", - "inner" - |) - ] - |)) - ])) + (Ty.path "core::iter::adapters::flatten::Flatten") + [ + Ty.apply + (Ty.path "core::option::IntoIter") + [ Ty.path "core::char::EscapeDebug" ] + ]; + Ty.apply + (Ty.path "core::iter::adapters::flatten::FlatMap") + [ + Ty.path "core::str::iter::Chars"; + Ty.path "core::char::EscapeDebug"; + Ty.path "core::str::CharEscapeDebugContinue" + ] + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::EscapeDebug", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -9452,7 +9855,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::EscapeDebug". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9466,17 +9869,18 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "EscapeDebug" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "EscapeDebug" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::EscapeDebug", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -9511,38 +9915,41 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::EscapeDefault". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::EscapeDefault" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::flatten::FlatMap") + M.of_value (| + Value.StructRecord + "core::str::iter::EscapeDefault" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::iter::adapters::flatten::FlatMap") + [ + Ty.path "core::str::iter::Chars"; + Ty.path "core::char::EscapeDefault"; + Ty.path "core::str::CharEscapeDefault" + ], + [], + "clone", + [] + |), [ - Ty.path "core::str::iter::Chars"; - Ty.path "core::char::EscapeDefault"; - Ty.path "core::str::CharEscapeDefault" - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::EscapeDefault", - "inner" - |) - ] - |)) - ])) + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::EscapeDefault", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -9558,7 +9965,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::EscapeDefault". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9572,17 +9979,18 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "EscapeDefault" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "EscapeDefault" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::EscapeDefault", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -9617,38 +10025,41 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::EscapeUnicode". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::EscapeUnicode" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::iter::adapters::flatten::FlatMap") + M.of_value (| + Value.StructRecord + "core::str::iter::EscapeUnicode" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::iter::adapters::flatten::FlatMap") + [ + Ty.path "core::str::iter::Chars"; + Ty.path "core::char::EscapeUnicode"; + Ty.path "core::str::CharEscapeUnicode" + ], + [], + "clone", + [] + |), [ - Ty.path "core::str::iter::Chars"; - Ty.path "core::char::EscapeUnicode"; - Ty.path "core::str::CharEscapeUnicode" - ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::iter::EscapeUnicode", - "inner" - |) - ] - |)) - ])) + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::iter::EscapeUnicode", + "inner" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -9664,7 +10075,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::iter::EscapeUnicode". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9678,17 +10089,18 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "EscapeUnicode" |); - M.read (| Value.String "inner" |); + M.read (| M.of_value (| Value.String "EscapeUnicode" |) |); + M.read (| M.of_value (| Value.String "inner" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::EscapeUnicode", "inner" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -9710,7 +10122,7 @@ Module str. self.clone().try_for_each(|c| f.write_char(c)) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9746,8 +10158,8 @@ Module str. [ M.read (| self |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -9770,7 +10182,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -9791,7 +10204,7 @@ Module str. Definition _Item : Ty.t := Ty.path "char". (* fn next(&mut self) -> Option { self.inner.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9833,7 +10246,7 @@ Module str. end. (* fn size_hint(&self) -> (usize, Option) { self.inner.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9881,7 +10294,7 @@ Module str. self.inner.try_fold(init, fold) } *) - Definition try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => ltac:(M.monadic @@ -9933,7 +10346,7 @@ Module str. self.inner.fold(init, fold) } *) - Definition fold (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; Fold ], [ self; init; fold ] => ltac:(M.monadic @@ -10014,7 +10427,7 @@ Module str. self.clone().try_for_each(|c| f.write_char(c)) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10050,8 +10463,8 @@ Module str. [ M.read (| self |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10074,7 +10487,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10095,7 +10509,7 @@ Module str. Definition _Item : Ty.t := Ty.path "char". (* fn next(&mut self) -> Option { self.inner.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10126,7 +10540,7 @@ Module str. end. (* fn size_hint(&self) -> (usize, Option) { self.inner.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10163,7 +10577,7 @@ Module str. self.inner.try_fold(init, fold) } *) - Definition try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => ltac:(M.monadic @@ -10204,7 +10618,7 @@ Module str. self.inner.fold(init, fold) } *) - Definition fold (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; Fold ], [ self; init; fold ] => ltac:(M.monadic @@ -10274,7 +10688,7 @@ Module str. self.clone().try_for_each(|c| f.write_char(c)) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10310,8 +10724,8 @@ Module str. [ M.read (| self |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -10334,7 +10748,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10355,7 +10770,7 @@ Module str. Definition _Item : Ty.t := Ty.path "char". (* fn next(&mut self) -> Option { self.inner.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10386,7 +10801,7 @@ Module str. end. (* fn size_hint(&self) -> (usize, Option) { self.inner.size_hint() } *) - Definition size_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition size_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10423,7 +10838,7 @@ Module str. self.inner.try_fold(init, fold) } *) - Definition try_fold (τ : list Ty.t) (α : list Value.t) : M := + Definition try_fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; Fold; R ], [ self; init; fold ] => ltac:(M.monadic @@ -10464,7 +10879,7 @@ Module str. self.inner.fold(init, fold) } *) - Definition fold (τ : list Ty.t) (α : list Value.t) : M := + Definition fold (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ Acc; Fold ], [ self; init; fold ] => ltac:(M.monadic diff --git a/CoqOfRust/core/str/lossy.v b/CoqOfRust/core/str/lossy.v index 387d57e83..ea8f80998 100644 --- a/CoqOfRust/core/str/lossy.v +++ b/CoqOfRust/core/str/lossy.v @@ -18,49 +18,53 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::lossy::Utf8Chunk". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::lossy::Utf8Chunk" - [ - ("valid", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "&") [ Ty.path "str" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::lossy::Utf8Chunk", - "valid" - |) - ] - |)); - ("invalid", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::lossy::Utf8Chunk", - "invalid" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::lossy::Utf8Chunk" + [ + ("valid", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "&") [ Ty.path "str" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::lossy::Utf8Chunk", + "valid" + |) + ] + |))); + ("invalid", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::lossy::Utf8Chunk", + "invalid" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -76,7 +80,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::lossy::Utf8Chunk". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -90,25 +94,27 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "Utf8Chunk" |); - M.read (| Value.String "valid" |); + M.read (| M.of_value (| Value.String "Utf8Chunk" |) |); + M.read (| M.of_value (| Value.String "valid" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::lossy::Utf8Chunk", "valid" - |)); - M.read (| Value.String "invalid" |); + |) + |); + M.read (| M.of_value (| Value.String "invalid" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::lossy::Utf8Chunk", "invalid" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -137,7 +143,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::lossy::Utf8Chunk". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -214,20 +220,21 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::lossy::Utf8Chunk". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) @@ -252,7 +259,7 @@ Module str. self.valid } *) - Definition valid (τ : list Ty.t) (α : list Value.t) : M := + Definition valid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -274,7 +281,7 @@ Module str. self.invalid } *) - Definition invalid (τ : list Ty.t) (α : list Value.t) : M := + Definition invalid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -335,7 +342,7 @@ Module str. f.write_char('"') } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -366,7 +373,7 @@ Module str. "write_char", [] |), - [ M.read (| f |); Value.UnicodeChar 34 ] + [ M.read (| f |); M.of_value (| Value.UnicodeChar 34 |) ] |) ] |) @@ -500,7 +507,7 @@ Module str. |) |) in let from := - M.alloc (| Value.Integer Integer.Usize 0 |) in + M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -591,7 +598,9 @@ Module str. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -599,8 +608,8 @@ Module str. (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.path @@ -610,10 +619,12 @@ Module str. [] |), [ esc ] - |)) - (Value.Integer - Integer.Usize - 1) + |), + M.of_value (| + Value.Integer + 1 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -672,18 +683,22 @@ Module str. M.read (| valid |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - from - |)); - ("end_", - M.read (| - i - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + from + |))); + ("end_", + A.to_value + (M.read (| + i + |))) + ] + |) ] |) ] @@ -953,14 +968,18 @@ Module str. ] |) in M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |) in M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |))) |))) ] @@ -969,6 +988,7 @@ Module str. M.write (| from, BinOp.Panic.add (| + Integer.Usize, M.read (| i |), @@ -988,18 +1008,24 @@ Module str. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)) in @@ -1041,9 +1067,15 @@ Module str. |), [ M.read (| valid |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| from |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (M.read (| from |))) + ] + |) ] |) ] @@ -1106,7 +1138,7 @@ Module str. val)) ] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.use (M.match_operator (| M.alloc (| @@ -1214,74 +1246,101 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "\x" - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "\x" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_upper_hex", - [ - Ty.path - "u8" - ] - |), - [ b - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_upper_hex", + [ + Ty.path + "u8" + ] + |), + [ + b + ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer - Integer.Usize - 0; - Value.UnicodeChar - 32; - Value.StructTuple - "core::fmt::rt::Alignment::Unknown" - []; - Value.Integer - Integer.U32 - 8; - Value.StructTuple - "core::fmt::rt::Count::Implied" - []; - Value.StructTuple - "core::fmt::rt::Count::Is" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Placeholder", + "new", + [] + |), [ - Value.Integer - Integer.Usize - 2 + M.of_value (| + Value.Integer + 0 + |); + M.of_value (| + Value.UnicodeChar + 32 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Alignment::Unknown" + [] + |); + M.of_value (| + Value.Integer + 8 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ + A.to_value + (M.of_value (| + Value.Integer + 2 + |)) + ] + |) ] - ] - |) - ] - |)); + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path @@ -1362,16 +1421,22 @@ Module str. val)) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -1384,7 +1449,7 @@ Module str. "write_char", [] |), - [ M.read (| f |); Value.UnicodeChar 34 ] + [ M.read (| f |); M.of_value (| Value.UnicodeChar 34 |) ] |) |) |))) @@ -1412,32 +1477,35 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::lossy::Utf8Chunks". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::lossy::Utf8Chunks" - [ - ("source", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::lossy::Utf8Chunks", - "source" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::lossy::Utf8Chunks" + [ + ("source", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::lossy::Utf8Chunks", + "source" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1457,12 +1525,16 @@ Module str. Self { source: bytes } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic (let bytes := M.alloc (| bytes |) in - Value.StructRecord "core::str::lossy::Utf8Chunks" [ ("source", M.read (| bytes |)) ])) + M.of_value (| + Value.StructRecord + "core::str::lossy::Utf8Chunks" + [ ("source", A.to_value (M.read (| bytes |))) ] + |))) | _, _ => M.impossible end. @@ -1473,22 +1545,25 @@ Module str. Debug(self.source) } *) - Definition debug (τ : list Ty.t) (α : list Value.t) : M := + Definition debug (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::lossy::Debug" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::lossy::Utf8Chunks", - "source" - |) - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::lossy::Debug" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::lossy::Utf8Chunks", + "source" + |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -1596,7 +1671,7 @@ Module str. }) } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1606,7 +1681,7 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1635,29 +1710,33 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.StructTuple "core::option::Option::None" [] |) + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in - let valid_up_to := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let valid_up_to := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| i |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| i |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", @@ -1672,7 +1751,8 @@ Module str. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1704,29 +1784,31 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| byte |)) - (Value.Integer Integer.U8 128) + BinOp.Pure.lt (| + M.read (| byte |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let w := @@ -1747,20 +1829,20 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 2 + Value.Integer 2 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_associated_function (| Self, "safe_get.next", @@ -1776,15 +1858,17 @@ Module str. |); M.read (| i |) ] - |)) - (Value.Integer - Integer.U8 - 192)) - (M.read (| + |), + M.of_value (| + Value.Integer 192 + |) + |), + M.read (| M.get_constant (| "core::str::lossy::next::TAG_CONT_U8" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1798,7 +1882,9 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -1806,42 +1892,46 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 3 + Value.Integer 3 |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.read (| byte |); - M.call_closure (| - M.get_associated_function (| - Self, - "safe_get.next", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::lossy::Utf8Chunks", - "source" - |) - |); - M.read (| i |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| byte |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Self, + "safe_get.next", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::lossy::Utf8Chunks", + "source" + |) + |); + M.read (| i |) + ] + |)) + ] + |) |), [ fun γ => @@ -1859,9 +1949,11 @@ Module str. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 224 + Value.Integer 224 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1874,7 +1966,9 @@ Module str. γ, 1 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1890,9 +1984,11 @@ Module str. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 237 + Value.Integer 237 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1905,7 +2001,9 @@ Module str. γ, 1 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -1920,22 +2018,23 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_associated_function (| Self, "safe_get.next", @@ -1951,15 +2050,17 @@ Module str. |); M.read (| i |) ] - |)) - (Value.Integer - Integer.U8 - 192)) - (M.read (| + |), + M.of_value (| + Value.Integer 192 + |) + |), + M.read (| M.get_constant (| "core::str::lossy::next::TAG_CONT_U8" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1973,7 +2074,9 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -1981,42 +2084,46 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 4 + Value.Integer 4 |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.read (| byte |); - M.call_closure (| - M.get_associated_function (| - Self, - "safe_get.next", - [] - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::lossy::Utf8Chunks", - "source" - |) - |); - M.read (| i |) - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| byte |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Self, + "safe_get.next", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::lossy::Utf8Chunks", + "source" + |) + |); + M.read (| i |) + ] + |)) + ] + |) |), [ fun γ => @@ -2034,9 +2141,11 @@ Module str. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 240 + Value.Integer 240 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -2049,7 +2158,9 @@ Module str. γ, 1 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -2065,9 +2176,11 @@ Module str. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 244 + Value.Integer 244 |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2082,22 +2195,23 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_associated_function (| Self, "safe_get.next", @@ -2113,15 +2227,17 @@ Module str. |); M.read (| i |) ] - |)) - (Value.Integer - Integer.U8 - 192)) - (M.read (| + |), + M.of_value (| + Value.Integer 192 + |) + |), + M.read (| M.get_constant (| "core::str::lossy::next::TAG_CONT_U8" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2135,7 +2251,9 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -2143,22 +2261,23 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.call_closure (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.call_closure (| M.get_associated_function (| Self, "safe_get.next", @@ -2174,15 +2293,17 @@ Module str. |); M.read (| i |) ] - |)) - (Value.Integer - Integer.U8 - 192)) - (M.read (| + |), + M.of_value (| + Value.Integer 192 + |) + |), + M.read (| M.get_constant (| "core::str::lossy::next::TAG_CONT_U8" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2196,7 +2317,9 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -2204,11 +2327,12 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2219,7 +2343,7 @@ Module str. ] |) in let _ := M.write (| valid_up_to, M.read (| i |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2229,7 +2353,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -2291,23 +2415,29 @@ Module str. let valid := M.copy (| γ0_0 |) in let invalid := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "core::str::lossy::Utf8Chunk" - [ - ("valid", - M.call_closure (| - M.get_function (| - "core::str::converts::from_utf8_unchecked", - [] - |), - [ M.read (| valid |) ] - |)); - ("invalid", M.read (| invalid |)) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::lossy::Utf8Chunk" + [ + ("valid", + A.to_value + (M.call_closure (| + M.get_function (| + "core::str::converts::from_utf8_unchecked", + [] + |), + [ M.read (| valid |) ] + |))); + ("invalid", A.to_value (M.read (| invalid |))) + ] + |)) + ] + |) |))) ] |))) @@ -2345,7 +2475,7 @@ Module str. f.debug_struct("Utf8Chunks").field("source", &self.debug()).finish() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2372,13 +2502,13 @@ Module str. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Utf8Chunks" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Utf8Chunks" |) |) ] |) |); - M.read (| Value.String "source" |); + M.read (| M.of_value (| Value.String "source" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::str::lossy::Utf8Chunks", @@ -2387,7 +2517,8 @@ Module str. |), [ M.read (| self |) ] |) - |)) + |) + |) ] |) ] diff --git a/CoqOfRust/core/str/mod.v b/CoqOfRust/core/str/mod.v index 9a079441c..9f9de08ac 100644 --- a/CoqOfRust/core/str/mod.v +++ b/CoqOfRust/core/str/mod.v @@ -14,7 +14,7 @@ Module str. } } *) - Definition slice_error_fail (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_error_fail (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s; begin; end_ ] => ltac:(M.monadic @@ -37,7 +37,14 @@ Module str. ] |), [ - Value.Tuple [ M.read (| s |); M.read (| begin |); M.read (| end_ |) ]; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| s |)); + A.to_value (M.read (| begin |)); + A.to_value (M.read (| end_ |)) + ] + |); M.get_function (| "core::str::slice_error_fail_ct", [] |); M.get_function (| "core::str::slice_error_fail_rt", [] |) ] @@ -50,7 +57,7 @@ Module str. panic!("failed to slice string"); } *) - Definition slice_error_fail_ct (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_error_fail_ct (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0; β1; β2 ] => ltac:(M.monadic @@ -83,11 +90,21 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "failed to slice string" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "failed to slice string" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -137,7 +154,7 @@ Module str. ); } *) - Definition slice_error_fail_rt (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_error_fail_rt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s; begin; end_ ] => ltac:(M.monadic @@ -169,38 +186,42 @@ Module str. |), [ M.read (| s |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| trunc_len |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| trunc_len |))) ] + |) ] |) |) in let ellipsis := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| trunc_len |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| trunc_len |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| s |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "[...]")); - fun γ => ltac:(M.monadic (M.alloc (| M.read (| Value.String "" |) |))) + M.of_value (| Value.String "[...]" |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.read (| M.of_value (| Value.String "" |) |) |))) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -208,19 +229,21 @@ Module str. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.gt - (M.read (| begin |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| begin |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| s |) ] - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.gt - (M.read (| end_ |)) - (M.call_closure (| + (BinOp.Pure.gt (| + M.read (| end_ |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| s |) ] - |)))) + |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -230,23 +253,24 @@ Module str. let oob_index := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| begin |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| begin |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| s |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -270,46 +294,64 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "byte index " |); - M.read (| Value.String " is out of bounds of `" |); - M.read (| Value.String "`" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "byte index " |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " is out of bounds of `" + |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String "`" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ oob_index ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ s_trunc ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ ellipsis ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ oob_index ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ s_trunc ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ ellipsis ] + |)) + ] + |) + |) + |) ] |) ] @@ -318,19 +360,21 @@ Module str. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (BinOp.Pure.le (M.read (| begin |)) (M.read (| end_ |))) + UnOp.Pure.not (| + BinOp.Pure.le (| M.read (| begin |), M.read (| end_ |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -346,83 +390,102 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "begin <= end (" |); - M.read (| Value.String " <= " |); - M.read (| Value.String ") when slicing `" |); - M.read (| Value.String "`" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "begin <= end (" |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " <= " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String ") when slicing `" |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String "`" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ begin ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ end_ ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ s_trunc ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ ellipsis ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ begin ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ end_ ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ s_trunc ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ ellipsis ] + |)) + ] + |) + |) + |) ] |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let index := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", [] |), [ M.read (| s |); M.read (| begin |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in begin)); @@ -473,9 +536,11 @@ Module str. |), [ M.read (| s |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| char_start |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| char_start |))) ] + |) ] |) ] @@ -488,19 +553,23 @@ Module str. |) in let char_range := M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| char_start |)); - ("end_", - BinOp.Panic.add (| - M.read (| char_start |), - M.call_closure (| - M.get_associated_function (| Ty.path "char", "len_utf8", [] |), - [ M.read (| ch |) ] - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| char_start |))); + ("end_", + A.to_value + (BinOp.Panic.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 (| M.call_closure (| @@ -510,64 +579,84 @@ Module str. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "byte index " |); - M.read (| Value.String " is not a char boundary; it is inside " |); - M.read (| Value.String " (bytes " |); - M.read (| Value.String ") of `" |); - M.read (| Value.String "`" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "byte index " |) |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " is not a char boundary; it is inside " + |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " (bytes " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") of `" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "`" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ index ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "char" ] - |), - [ ch ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] - |), - [ char_range ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ s_trunc ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ ellipsis ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ index ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "char" ] + |), + [ ch ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ] + |), + [ char_range ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ s_trunc ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ ellipsis ] + |)) + ] + |) + |) + |) ] |) ] @@ -578,8 +667,8 @@ Module str. end. Module slice_error_fail_rt. - Definition value_MAX_DISPLAY_LENGTH : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 256 |))). + Definition value_MAX_DISPLAY_LENGTH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 256 |) |))). End slice_error_fail_rt. Module Impl_str. @@ -590,7 +679,7 @@ Module str. self.as_bytes().len() } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -614,17 +703,18 @@ Module str. self.len() == 0 } *) - Definition is_empty (τ : list Ty.t) (α : list Value.t) : M := + Definition is_empty (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -656,7 +746,7 @@ Module str. } } *) - Definition is_char_boundary (τ : list Ty.t) (α : list Value.t) : M := + Definition is_char_boundary (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -667,21 +757,26 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| index |)) (Value.Integer Integer.Usize 0) + BinOp.Pure.eq (| + M.read (| index |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool true |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool true |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -705,12 +800,13 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Pure.eq - (M.read (| index |)) - (M.call_closure (| + BinOp.Pure.eq (| + M.read (| index |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] - |)) + |) + |) |))); fun γ => ltac:(M.monadic @@ -757,7 +853,7 @@ Module str. } } *) - Definition floor_char_boundary (τ : list Ty.t) (α : list Value.t) : M := + Definition floor_char_boundary (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -765,19 +861,20 @@ Module str. let index := M.alloc (| index |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| index |)) - (M.call_closure (| + BinOp.Pure.ge (| + M.read (| index |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -792,7 +889,7 @@ Module str. M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), - [ M.read (| index |); Value.Integer Integer.Usize 3 ] + [ M.read (| index |); M.of_value (| Value.Integer 3 |) ] |) |) in let new_index := @@ -854,8 +951,8 @@ Module str. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -876,12 +973,14 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| lower_bound |), M.call_closure (| M.get_associated_function (| @@ -915,7 +1014,7 @@ Module str. } } *) - Definition ceil_char_boundary (τ : list Ty.t) (α : list Value.t) : M := + Definition ceil_char_boundary (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; index ] => ltac:(M.monadic @@ -923,19 +1022,20 @@ Module str. let index := M.alloc (| index |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| index |)) - (M.call_closure (| + BinOp.Pure.gt (| + M.read (| index |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -951,7 +1051,11 @@ Module str. M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), [ - BinOp.Panic.add (| M.read (| index |), Value.Integer Integer.Usize 4 |); + BinOp.Panic.add (| + Integer.Usize, + M.read (| index |), + M.of_value (| Value.Integer 4 |) + |); M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] @@ -1012,19 +1116,21 @@ Module str. |), [ M.read (| self |) ] |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| index |)); - ("end_", M.read (| upper_bound |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| index |))); + ("end_", A.to_value (M.read (| upper_bound |))) + ] + |) ] |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1045,12 +1151,13 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.read (| upper_bound |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1061,13 +1168,15 @@ Module str. ltac:(M.monadic (let pos := M.copy (| γ |) in BinOp.Panic.add (| + Integer.Usize, M.read (| pos |), M.read (| index |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |))) @@ -1086,7 +1195,7 @@ Module str. unsafe { mem::transmute(self) } } *) - Definition as_bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1115,12 +1224,12 @@ Module str. unsafe { &mut *(self as *mut str as *mut [u8]) } } *) - Definition as_bytes_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition as_bytes_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |))) | _, _ => M.impossible end. @@ -1131,12 +1240,12 @@ Module str. self as *const str as *const u8 } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |))) | _, _ => M.impossible end. @@ -1147,12 +1256,12 @@ Module str. self as *mut str as *mut u8 } *) - Definition as_mut_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_mut_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| self |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| self |) |)) |) |))) | _, _ => M.impossible end. @@ -1163,7 +1272,7 @@ Module str. i.get(self) } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; i ] => ltac:(M.monadic @@ -1189,7 +1298,7 @@ Module str. i.get_mut(self) } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; i ] => ltac:(M.monadic @@ -1218,7 +1327,7 @@ Module str. unsafe { &*i.get_unchecked(self) } } *) - Definition get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; i ] => ltac:(M.monadic @@ -1248,7 +1357,7 @@ Module str. unsafe { &mut *i.get_unchecked_mut(self) } } *) - Definition get_unchecked_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ self; i ] => ltac:(M.monadic @@ -1278,7 +1387,7 @@ Module str. unsafe { &*(begin..end).get_unchecked(self) } } *) - Definition slice_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; begin; end_ ] => ltac:(M.monadic @@ -1294,9 +1403,14 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| begin |)); ("end_", M.read (| end_ |)) ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| begin |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |); M.read (| self |) ] |))) @@ -1314,7 +1428,7 @@ Module str. unsafe { &mut *(begin..end).get_unchecked_mut(self) } } *) - Definition slice_mut_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition slice_mut_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; begin; end_ ] => ltac:(M.monadic @@ -1330,9 +1444,14 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| begin |)); ("end_", M.read (| end_ |)) ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| begin |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |); M.read (| self |) ] |))) @@ -1353,7 +1472,7 @@ Module str. } } *) - Definition split_at (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; mid ] => ltac:(M.monadic @@ -1361,7 +1480,7 @@ Module str. let mid := M.alloc (| mid |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1375,45 +1494,60 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::Range" + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] + ] + |), [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| mid |)) + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| mid |))) + ] + |) ] - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::Range" + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] + ] + |), [ - ("start", M.read (| mid |)); - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| self |) ] - |)) + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| mid |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "len", + [] + |), + [ M.read (| self |) ] + |))) + ] + |) ] - ] - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1421,7 +1555,7 @@ Module str. M.never_to_any (| M.call_closure (| M.get_function (| "core::str::slice_error_fail", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0; M.read (| mid |) ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |); M.read (| mid |) ] |) |) |))) @@ -1451,7 +1585,7 @@ Module str. } } *) - Definition split_at_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition split_at_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; mid ] => ltac:(M.monadic @@ -1459,7 +1593,7 @@ Module str. let mid := M.alloc (| mid |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1487,43 +1621,57 @@ Module str. |) |) in M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_function (| "core::str::converts::from_utf8_unchecked_mut", [] |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| M.get_function (| - "core::slice::raw::from_raw_parts_mut", - [ Ty.path "u8" ] + "core::str::converts::from_utf8_unchecked_mut", + [] |), - [ M.read (| ptr |); M.read (| mid |) ] - |) - ] - |); - M.call_closure (| - M.get_function (| "core::str::converts::from_utf8_unchecked_mut", [] |), - [ - M.call_closure (| + [ + M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts_mut", + [ Ty.path "u8" ] + |), + [ M.read (| ptr |); M.read (| mid |) ] + |) + ] + |)); + A.to_value + (M.call_closure (| M.get_function (| - "core::slice::raw::from_raw_parts_mut", - [ Ty.path "u8" ] + "core::str::converts::from_utf8_unchecked_mut", + [] |), [ M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], - "add", - [] + M.get_function (| + "core::slice::raw::from_raw_parts_mut", + [ Ty.path "u8" ] |), - [ M.read (| ptr |); M.read (| mid |) ] - |); - BinOp.Panic.sub (| M.read (| len |), M.read (| mid |) |) + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u8" ], + "add", + [] + |), + [ M.read (| ptr |); M.read (| mid |) ] + |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| mid |) + |) + ] + |) ] - |) - ] - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1531,7 +1679,7 @@ Module str. M.never_to_any (| M.call_closure (| M.get_function (| "core::str::slice_error_fail", [] |), - [ M.read (| self |); Value.Integer Integer.Usize 0; M.read (| mid |) ] + [ M.read (| self |); M.of_value (| Value.Integer 0 |); M.read (| mid |) ] |) |) |))) @@ -1548,29 +1696,32 @@ Module str. Chars { iter: self.as_bytes().iter() } } *) - Definition chars (τ : list Ty.t) (α : list Value.t) : M := + Definition chars (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::Chars" - [ - ("iter", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "iter", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| Ty.path "str", "as_bytes", [] |), - [ M.read (| self |) ] - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::iter::Chars" + [ + ("iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "iter", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| Ty.path "str", "as_bytes", [] |), + [ M.read (| self |) ] + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1581,21 +1732,24 @@ Module str. CharIndices { front_offset: 0, iter: self.chars() } } *) - Definition char_indices (τ : list Ty.t) (α : list Value.t) : M := + Definition char_indices (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::CharIndices" - [ - ("front_offset", Value.Integer Integer.Usize 0); - ("iter", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "chars", [] |), - [ M.read (| self |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::iter::CharIndices" + [ + ("front_offset", A.to_value (M.of_value (| Value.Integer 0 |))); + ("iter", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "chars", [] |), + [ M.read (| self |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1606,39 +1760,42 @@ Module str. Bytes(self.as_bytes().iter().copied()) } *) - Definition bytes (τ : list Ty.t) (α : list Value.t) : M := + Definition bytes (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::Bytes" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ], - [], - "copied", - [ Ty.path "u8" ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "iter", - [] + M.of_value (| + Value.StructTuple + "core::str::iter::Bytes" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ], + [], + "copied", + [ Ty.path "u8" ] |), [ M.call_closure (| - M.get_associated_function (| Ty.path "str", "as_bytes", [] |), - [ M.read (| self |) ] + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "iter", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| Ty.path "str", "as_bytes", [] |), + [ M.read (| self |) ] + |) + ] |) ] - |) - ] - |) - ])) + |)) + ] + |))) | _, _ => M.impossible end. @@ -1649,38 +1806,44 @@ Module str. SplitWhitespace { inner: self.split(IsWhitespace).filter(IsNotEmpty) } } *) - Definition split_whitespace (τ : list Ty.t) (α : list Value.t) : M := + Definition split_whitespace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::SplitWhitespace" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::str::iter::Split") - [ Ty.path "core::str::IsWhitespace" ], - [], - "filter", - [ Ty.path "core::str::IsNotEmpty" ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "split", - [ Ty.path "core::str::IsWhitespace" ] + M.of_value (| + Value.StructRecord + "core::str::iter::SplitWhitespace" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::str::iter::Split") + [ Ty.path "core::str::IsWhitespace" ], + [], + "filter", + [ Ty.path "core::str::IsNotEmpty" ] |), - [ M.read (| self |); Value.StructTuple "core::str::IsWhitespace" [] ] - |); - Value.StructTuple "core::str::IsNotEmpty" [] - ] - |)) - ])) + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "split", + [ Ty.path "core::str::IsWhitespace" ] + |), + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::str::IsWhitespace" [] |) + ] + |); + M.of_value (| Value.StructTuple "core::str::IsNotEmpty" [] |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1694,7 +1857,7 @@ Module str. SplitAsciiWhitespace { inner } } *) - Definition split_ascii_whitespace (τ : list Ty.t) (α : list Value.t) : M := + Definition split_ascii_whitespace (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1743,20 +1906,22 @@ Module str. M.get_associated_function (| Ty.path "str", "as_bytes", [] |), [ M.read (| self |) ] |); - Value.StructTuple "core::str::IsAsciiWhitespace" [] + M.of_value (| Value.StructTuple "core::str::IsAsciiWhitespace" [] |) ] |); - Value.StructTuple "core::str::BytesIsNotEmpty" [] + M.of_value (| Value.StructTuple "core::str::BytesIsNotEmpty" [] |) ] |); - Value.StructTuple "core::str::UnsafeBytesToStr" [] + M.of_value (| Value.StructTuple "core::str::UnsafeBytesToStr" [] |) ] |) |) in M.alloc (| - Value.StructRecord - "core::str::iter::SplitAsciiWhitespace" - [ ("inner", M.read (| inner |)) ] + M.of_value (| + Value.StructRecord + "core::str::iter::SplitAsciiWhitespace" + [ ("inner", A.to_value (M.read (| inner |))) ] + |) |) |))) | _, _ => M.impossible @@ -1770,35 +1935,38 @@ Module str. Lines(self.split_inclusive('\n').map(LinesMap)) } *) - Definition lines (τ : list Ty.t) (α : list Value.t) : M := + Definition lines (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::Lines" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply (Ty.path "core::str::iter::SplitInclusive") [ Ty.path "char" ], - [], - "map", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ]; Ty.path "core::str::LinesMap" ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "split_inclusive", - [ Ty.path "char" ] + M.of_value (| + Value.StructTuple + "core::str::iter::Lines" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply (Ty.path "core::str::iter::SplitInclusive") [ Ty.path "char" ], + [], + "map", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ]; Ty.path "core::str::LinesMap" ] |), - [ M.read (| self |); Value.UnicodeChar 10 ] - |); - Value.StructTuple "core::str::LinesMap" [] - ] - |) - ])) + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "split_inclusive", + [ Ty.path "char" ] + |), + [ M.read (| self |); M.of_value (| Value.UnicodeChar 10 |) ] + |); + M.of_value (| Value.StructTuple "core::str::LinesMap" [] |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1809,19 +1977,22 @@ Module str. LinesAny(self.lines()) } *) - Definition lines_any (τ : list Ty.t) (α : list Value.t) : M := + Definition lines_any (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::iter::LinesAny" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "str", "lines", [] |), - [ M.read (| self |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::LinesAny" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "lines", [] |), + [ M.read (| self |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -1832,21 +2003,24 @@ Module str. EncodeUtf16 { chars: self.chars(), extra: 0 } } *) - Definition encode_utf16 (τ : list Ty.t) (α : list Value.t) : M := + Definition encode_utf16 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::EncodeUtf16" - [ - ("chars", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "chars", [] |), - [ M.read (| self |) ] - |)); - ("extra", Value.Integer Integer.U16 0) - ])) + M.of_value (| + Value.StructRecord + "core::str::iter::EncodeUtf16" + [ + ("chars", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "chars", [] |), + [ M.read (| self |) ] + |))); + ("extra", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) | _, _ => M.impossible end. @@ -1857,7 +2031,7 @@ Module str. pat.is_contained_in(self) } *) - Definition contains (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic @@ -1877,7 +2051,7 @@ Module str. pat.is_prefix_of(self) } *) - Definition starts_with (τ : list Ty.t) (α : list Value.t) : M := + Definition starts_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic @@ -1900,7 +2074,7 @@ Module str. pat.is_suffix_of(self) } *) - Definition ends_with (τ : list Ty.t) (α : list Value.t) : M := + Definition ends_with (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic @@ -1920,7 +2094,7 @@ Module str. pat.into_searcher(self).next_match().map(|(i, _)| i) } *) - Definition find (τ : list Ty.t) (α : list Value.t) : M := + Definition find (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic @@ -1963,8 +2137,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1980,7 +2154,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1996,7 +2171,7 @@ Module str. pat.into_searcher(self).next_match_back().map(|(i, _)| i) } *) - Definition rfind (τ : list Ty.t) (α : list Value.t) : M := + Definition rfind (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic @@ -2039,8 +2214,8 @@ Module str. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2056,7 +2231,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2075,39 +2251,46 @@ Module str. }) } *) - Definition split (τ : list Ty.t) (α : list Value.t) : M := + Definition split (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::Split" - [ - Value.StructRecord - "core::str::iter::SplitInternal" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| self |) ] - |)); - ("matcher", - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Pattern", - P, - [], - "into_searcher", - [] - |), - [ M.read (| pat |); M.read (| self |) ] - |)); - ("allow_trailing_empty", Value.Bool true); - ("finished", Value.Bool false) - ] - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::Split" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::iter::SplitInternal" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ M.read (| self |) ] + |))); + ("matcher", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Pattern", + P, + [], + "into_searcher", + [] + |), + [ M.read (| pat |); M.read (| self |) ] + |))); + ("allow_trailing_empty", A.to_value (M.of_value (| Value.Bool true |))); + ("finished", A.to_value (M.of_value (| Value.Bool false |))) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2124,39 +2307,46 @@ Module str. }) } *) - Definition split_inclusive (τ : list Ty.t) (α : list Value.t) : M := + Definition split_inclusive (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::SplitInclusive" - [ - Value.StructRecord - "core::str::iter::SplitInternal" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| self |) ] - |)); - ("matcher", - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Pattern", - P, - [], - "into_searcher", - [] - |), - [ M.read (| pat |); M.read (| self |) ] - |)); - ("allow_trailing_empty", Value.Bool false); - ("finished", Value.Bool false) - ] - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::SplitInclusive" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::iter::SplitInternal" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ M.read (| self |) ] + |))); + ("matcher", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Pattern", + P, + [], + "into_searcher", + [] + |), + [ M.read (| pat |); M.read (| self |) ] + |))); + ("allow_trailing_empty", A.to_value (M.of_value (| Value.Bool false |))); + ("finished", A.to_value (M.of_value (| Value.Bool false |))) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2171,28 +2361,31 @@ Module str. RSplit(self.split(pat).0) } *) - Definition rsplit (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::RSplit" - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "str", "split", [ P ] |), - [ M.read (| self |); M.read (| pat |) ] + M.of_value (| + Value.StructTuple + "core::str::iter::RSplit" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "str", "split", [ P ] |), + [ M.read (| self |); M.read (| pat |) ] + |) + |), + "core::str::iter::Split", + 0 |) - |), - "core::str::iter::Split", - 0 - |) - |) - ])) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2203,30 +2396,35 @@ Module str. SplitTerminator(SplitInternal { allow_trailing_empty: false, ..self.split(pat).0 }) } *) - Definition split_terminator (τ : list Ty.t) (α : list Value.t) : M := + Definition split_terminator (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::SplitTerminator" - [ - M.struct_record_update - (M.read (| - M.SubPointer.get_struct_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "str", "split", [ P ] |), - [ M.read (| self |); M.read (| pat |) ] - |) - |), - "core::str::iter::Split", - 0 - |) - |)) - [ ("allow_trailing_empty", Value.Bool false) ] - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::SplitTerminator" + [ + A.to_value + (M.of_value (| + M.struct_record_update + (M.read (| + M.SubPointer.get_struct_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "str", "split", [ P ] |), + [ M.read (| self |); M.read (| pat |) ] + |) + |), + "core::str::iter::Split", + 0 + |) + |)) + [ ("allow_trailing_empty", A.to_value (M.of_value (| Value.Bool false |))) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2241,28 +2439,31 @@ Module str. RSplitTerminator(self.split_terminator(pat).0) } *) - Definition rsplit_terminator (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit_terminator (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::RSplitTerminator" - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "str", "split_terminator", [ P ] |), - [ M.read (| self |); M.read (| pat |) ] + M.of_value (| + Value.StructTuple + "core::str::iter::RSplitTerminator" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "str", "split_terminator", [ P ] |), + [ M.read (| self |); M.read (| pat |) ] + |) + |), + "core::str::iter::SplitTerminator", + 0 |) - |), - "core::str::iter::SplitTerminator", - 0 - |) - |) - ])) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2274,35 +2475,41 @@ Module str. SplitN(SplitNInternal { iter: self.split(pat).0, count: n }) } *) - Definition splitn (τ : list Ty.t) (α : list Value.t) : M := + Definition splitn (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; n; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::SplitN" - [ - Value.StructRecord - "core::str::iter::SplitNInternal" - [ - ("iter", - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "str", "split", [ P ] |), - [ M.read (| self |); M.read (| pat |) ] - |) - |), - "core::str::iter::Split", - 0 - |) - |)); - ("count", M.read (| n |)) - ] - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::SplitN" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::iter::SplitNInternal" + [ + ("iter", + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "str", "split", [ P ] |), + [ M.read (| self |); M.read (| pat |) ] + |) + |), + "core::str::iter::Split", + 0 + |) + |))); + ("count", A.to_value (M.read (| n |))) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2316,29 +2523,32 @@ Module str. RSplitN(self.splitn(n, pat).0) } *) - Definition rsplitn (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplitn (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; n; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let n := M.alloc (| n |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::RSplitN" - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "str", "splitn", [ P ] |), - [ M.read (| self |); M.read (| n |); M.read (| pat |) ] + M.of_value (| + Value.StructTuple + "core::str::iter::RSplitN" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "str", "splitn", [ P ] |), + [ M.read (| self |); M.read (| n |); M.read (| pat |) ] + |) + |), + "core::str::iter::SplitN", + 0 |) - |), - "core::str::iter::SplitN", - 0 - |) - |) - ])) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2351,7 +2561,7 @@ Module str. unsafe { Some((self.get_unchecked(..start), self.get_unchecked(end..))) } } *) - Definition split_once (τ : list Ty.t) (α : list Value.t) : M := + Definition split_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; delimiter ] => ltac:(M.monadic @@ -2460,47 +2670,58 @@ Module str. let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| start |)) ] - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| end_ |)) ] - ] - |) - ] - ] + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| start |))) ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| end_ |))) ] + |) + ] + |)) + ] + |)) + ] + |) |))) ] |) @@ -2521,7 +2742,7 @@ Module str. unsafe { Some((self.get_unchecked(..start), self.get_unchecked(end..))) } } *) - Definition rsplit_once (τ : list Ty.t) (α : list Value.t) : M := + Definition rsplit_once (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; delimiter ] => ltac:(M.monadic @@ -2630,47 +2851,58 @@ Module str. let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ - Ty.apply - (Ty.path "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| start |)) ] - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| start |))) ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| end_ |))) ] + |) + ] + |)) ] - |), - [ - M.read (| self |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| end_ |)) ] - ] - |) - ] - ] + |)) + ] + |) |))) ] |) @@ -2686,30 +2918,36 @@ Module str. Matches(MatchesInternal(pat.into_searcher(self))) } *) - Definition matches (τ : list Ty.t) (α : list Value.t) : M := + Definition matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::Matches" - [ - Value.StructTuple - "core::str::iter::MatchesInternal" - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Pattern", - P, - [], - "into_searcher", - [] - |), - [ M.read (| pat |); M.read (| self |) ] - |) - ] - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::Matches" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::str::iter::MatchesInternal" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Pattern", + P, + [], + "into_searcher", + [] + |), + [ M.read (| pat |); M.read (| self |) ] + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2723,28 +2961,31 @@ Module str. RMatches(self.matches(pat).0) } *) - Definition rmatches (τ : list Ty.t) (α : list Value.t) : M := + Definition rmatches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::RMatches" - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "str", "matches", [ P ] |), - [ M.read (| self |); M.read (| pat |) ] + M.of_value (| + Value.StructTuple + "core::str::iter::RMatches" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "str", "matches", [ P ] |), + [ M.read (| self |); M.read (| pat |) ] + |) + |), + "core::str::iter::Matches", + 0 |) - |), - "core::str::iter::Matches", - 0 - |) - |) - ])) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2755,30 +2996,36 @@ Module str. MatchIndices(MatchIndicesInternal(pat.into_searcher(self))) } *) - Definition match_indices (τ : list Ty.t) (α : list Value.t) : M := + Definition match_indices (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::MatchIndices" - [ - Value.StructTuple - "core::str::iter::MatchIndicesInternal" - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Pattern", - P, - [], - "into_searcher", - [] - |), - [ M.read (| pat |); M.read (| self |) ] - |) - ] - ])) + M.of_value (| + Value.StructTuple + "core::str::iter::MatchIndices" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::str::iter::MatchIndicesInternal" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Pattern", + P, + [], + "into_searcher", + [] + |), + [ M.read (| pat |); M.read (| self |) ] + |)) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2793,28 +3040,31 @@ Module str. RMatchIndices(self.match_indices(pat).0) } *) - Definition rmatch_indices (τ : list Ty.t) (α : list Value.t) : M := + Definition rmatch_indices (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in - Value.StructTuple - "core::str::iter::RMatchIndices" - [ - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "str", "match_indices", [ P ] |), - [ M.read (| self |); M.read (| pat |) ] + M.of_value (| + Value.StructTuple + "core::str::iter::RMatchIndices" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "str", "match_indices", [ P ] |), + [ M.read (| self |); M.read (| pat |) ] + |) + |), + "core::str::iter::MatchIndices", + 0 |) - |), - "core::str::iter::MatchIndices", - 0 - |) - |) - ])) + |)) + ] + |))) | _, _ => M.impossible end. @@ -2826,7 +3076,7 @@ Module str. self.trim_matches(|c: char| c.is_whitespace()) } *) - Definition trim (τ : list Ty.t) (α : list Value.t) : M := + Definition trim (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2839,8 +3089,8 @@ Module str. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2857,7 +3107,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2870,7 +3121,7 @@ Module str. self.trim_start_matches(|c: char| c.is_whitespace()) } *) - Definition trim_start (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_start (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2883,8 +3134,8 @@ Module str. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2901,7 +3152,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2914,7 +3166,7 @@ Module str. self.trim_end_matches(|c: char| c.is_whitespace()) } *) - Definition trim_end (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_end (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2927,8 +3179,8 @@ Module str. |), [ M.read (| self |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -2945,7 +3197,8 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -2958,7 +3211,7 @@ Module str. self.trim_start() } *) - Definition trim_left (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_left (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2977,7 +3230,7 @@ Module str. self.trim_end() } *) - Definition trim_right (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_right (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3011,15 +3264,15 @@ Module str. unsafe { self.get_unchecked(i..j) } } *) - Definition trim_matches (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in M.read (| - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in - let j := M.alloc (| Value.Integer Integer.Usize 0 |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let j := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let matcher := M.alloc (| M.call_closure (| @@ -3035,7 +3288,7 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3064,13 +3317,13 @@ Module str. let b := M.copy (| γ1_1 |) 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 [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3097,8 +3350,8 @@ Module str. 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 - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3110,9 +3363,14 @@ Module str. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", M.read (| i |)); ("end_", M.read (| j |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| i |))); + ("end_", A.to_value (M.read (| j |))) + ] + |) ] |) |) @@ -3133,7 +3391,7 @@ Module str. unsafe { self.get_unchecked(i..self.len()) } } *) - Definition trim_start_matches (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_start_matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic @@ -3162,7 +3420,7 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3189,8 +3447,8 @@ Module str. 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 - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3202,16 +3460,19 @@ Module str. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| i |)); - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| self |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| i |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ M.read (| self |) ] + |))) + ] + |) ] |) |) @@ -3227,7 +3488,7 @@ Module str. prefix.strip_prefix_of(self) } *) - Definition strip_prefix (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; prefix ] => ltac:(M.monadic @@ -3251,7 +3512,7 @@ Module str. suffix.strip_suffix_of(self) } *) - Definition strip_suffix (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; suffix ] => ltac:(M.monadic @@ -3280,14 +3541,14 @@ Module str. unsafe { self.get_unchecked(0..j) } } *) - Definition trim_end_matches (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_end_matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in M.read (| - let j := M.alloc (| Value.Integer Integer.Usize 0 |) in + let j := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let matcher := M.alloc (| M.call_closure (| @@ -3303,7 +3564,7 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3330,8 +3591,8 @@ Module str. 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 - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -3343,9 +3604,14 @@ Module str. |), [ M.read (| self |); - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.Usize 0); ("end_", M.read (| j |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| j |))) + ] + |) ] |) |) @@ -3361,7 +3627,7 @@ Module str. self.trim_start_matches(pat) } *) - Definition trim_left_matches (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_left_matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic @@ -3385,7 +3651,7 @@ Module str. self.trim_end_matches(pat) } *) - Definition trim_right_matches (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_right_matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ self; pat ] => ltac:(M.monadic @@ -3406,7 +3672,7 @@ Module str. FromStr::from_str(self) } *) - Definition parse (τ : list Ty.t) (α : list Value.t) : M := + Definition parse (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self ] => ltac:(M.monadic @@ -3428,7 +3694,7 @@ Module str. self.as_bytes().is_ascii() } *) - Definition is_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3457,7 +3723,7 @@ Module str. self.as_bytes().as_ascii() } *) - Definition as_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3485,7 +3751,7 @@ Module str. self.as_bytes().eq_ignore_ascii_case(other.as_bytes()) } *) - Definition eq_ignore_ascii_case (τ : list Ty.t) (α : list Value.t) : M := + Definition eq_ignore_ascii_case (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -3521,7 +3787,7 @@ Module str. me.make_ascii_uppercase() } *) - Definition make_ascii_uppercase (τ : list Ty.t) (α : list Value.t) : M := + Definition make_ascii_uppercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3558,7 +3824,7 @@ Module str. me.make_ascii_lowercase() } *) - Definition make_ascii_lowercase (τ : list Ty.t) (α : list Value.t) : M := + Definition make_ascii_lowercase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3595,7 +3861,7 @@ Module str. unsafe { core::str::from_utf8_unchecked(self.as_bytes().trim_ascii_start()) } } *) - Definition trim_ascii_start (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_ascii_start (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3631,7 +3897,7 @@ Module str. unsafe { core::str::from_utf8_unchecked(self.as_bytes().trim_ascii_end()) } } *) - Definition trim_ascii_end (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_ascii_end (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3667,7 +3933,7 @@ Module str. unsafe { core::str::from_utf8_unchecked(self.as_bytes().trim_ascii()) } } *) - Definition trim_ascii (τ : list Ty.t) (α : list Value.t) : M := + Definition trim_ascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3708,7 +3974,7 @@ Module str. } } *) - Definition escape_debug (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_debug (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3722,132 +3988,140 @@ Module str. |) |) in M.alloc (| - Value.StructRecord - "core::str::iter::EscapeDebug" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::iter::adapters::flatten::Flatten") - [ - Ty.apply - (Ty.path "core::option::IntoIter") - [ Ty.path "core::char::EscapeDebug" ] - ], - [], - "chain", - [ - Ty.apply - (Ty.path "core::iter::adapters::flatten::FlatMap") - [ - Ty.path "core::str::iter::Chars"; - Ty.path "core::char::EscapeDebug"; - Ty.path "core::str::CharEscapeDebugContinue" - ] - ] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "core::str::iter::EscapeDebug" + [ + ("inner", + A.to_value + (M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path "core::option::IntoIter") - [ Ty.path "core::char::EscapeDebug" ], + (Ty.path "core::iter::adapters::flatten::Flatten") + [ + Ty.apply + (Ty.path "core::option::IntoIter") + [ Ty.path "core::char::EscapeDebug" ] + ], [], - "flatten", - [] + "chain", + [ + Ty.apply + (Ty.path "core::iter::adapters::flatten::FlatMap") + [ + Ty.path "core::str::iter::Chars"; + Ty.path "core::char::EscapeDebug"; + Ty.path "core::str::CharEscapeDebugContinue" + ] + ] |), [ M.call_closure (| M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", + "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path "core::option::Option") + (Ty.path "core::option::IntoIter") [ Ty.path "core::char::EscapeDebug" ], [], - "into_iter", + "flatten", [] |), [ M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "char" ], - "map", - [ - Ty.path "core::char::EscapeDebug"; - Ty.function - [ Ty.tuple [ Ty.path "char" ] ] - (Ty.path "core::char::EscapeDebug") - ] + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "core::char::EscapeDebug" ], + [], + "into_iter", + [] |), [ M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.path "core::str::iter::Chars", - [], - "next", - [] + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "char" ], + "map", + [ + Ty.path "core::char::EscapeDebug"; + Ty.function + [ Ty.tuple [ Ty.path "char" ] ] + (Ty.path "core::char::EscapeDebug") + ] |), - [ chars ] - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let first := M.copy (| γ |) in - M.call_closure (| - M.get_associated_function (| - Ty.path "char", - "escape_debug_ext", - [] - |), - [ - M.read (| first |); - M.read (| - M.get_constant (| - "core::char::methods::ESCAPE_ALL" - |) - |) - ] - |))) - ] - |) - | _ => M.impossible (||) - end)) + [ + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.path "core::str::iter::Chars", + [], + "next", + [] + |), + [ chars ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let first := M.copy (| γ |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "char", + "escape_debug_ext", + [] + |), + [ + M.read (| first |); + M.read (| + M.get_constant (| + "core::char::methods::ESCAPE_ALL" + |) + |) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) ] |) ] + |); + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.path "core::str::iter::Chars", + [], + "flat_map", + [ + Ty.path "core::char::EscapeDebug"; + Ty.path "core::str::CharEscapeDebugContinue" + ] + |), + [ + M.read (| chars |); + M.of_value (| + Value.StructTuple "core::str::CharEscapeDebugContinue" [] + |) + ] |) ] - |); - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.path "core::str::iter::Chars", - [], - "flat_map", - [ - Ty.path "core::char::EscapeDebug"; - Ty.path "core::str::CharEscapeDebugContinue" - ] - |), - [ - M.read (| chars |); - Value.StructTuple "core::str::CharEscapeDebugContinue" [] - ] - |) - ] - |)) - ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3860,32 +4134,38 @@ Module str. EscapeDefault { inner: self.chars().flat_map(CharEscapeDefault) } } *) - Definition escape_default (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::EscapeDefault" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.path "core::str::iter::Chars", - [], - "flat_map", - [ Ty.path "core::char::EscapeDefault"; Ty.path "core::str::CharEscapeDefault" ] - |), - [ - M.call_closure (| - M.get_associated_function (| Ty.path "str", "chars", [] |), - [ M.read (| self |) ] - |); - Value.StructTuple "core::str::CharEscapeDefault" [] - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::iter::EscapeDefault" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.path "core::str::iter::Chars", + [], + "flat_map", + [ + Ty.path "core::char::EscapeDefault"; + Ty.path "core::str::CharEscapeDefault" + ] + |), + [ + M.call_closure (| + M.get_associated_function (| Ty.path "str", "chars", [] |), + [ M.read (| self |) ] + |); + M.of_value (| Value.StructTuple "core::str::CharEscapeDefault" [] |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3897,32 +4177,38 @@ Module str. EscapeUnicode { inner: self.chars().flat_map(CharEscapeUnicode) } } *) - Definition escape_unicode (τ : list Ty.t) (α : list Value.t) : M := + Definition escape_unicode (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::iter::EscapeUnicode" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.path "core::str::iter::Chars", - [], - "flat_map", - [ Ty.path "core::char::EscapeUnicode"; Ty.path "core::str::CharEscapeUnicode" ] - |), - [ - M.call_closure (| - M.get_associated_function (| Ty.path "str", "chars", [] |), - [ M.read (| self |) ] - |); - Value.StructTuple "core::str::CharEscapeUnicode" [] - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::iter::EscapeUnicode" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.path "core::str::iter::Chars", + [], + "flat_map", + [ + Ty.path "core::char::EscapeUnicode"; + Ty.path "core::str::CharEscapeUnicode" + ] + |), + [ + M.call_closure (| + M.get_associated_function (| Ty.path "str", "chars", [] |), + [ M.read (| self |) ] + |); + M.of_value (| Value.StructTuple "core::str::CharEscapeUnicode" [] |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3938,7 +4224,7 @@ Module str. self.as_bytes() } *) - Definition as_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3966,9 +4252,9 @@ Module str. "" } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (M.read (| Value.String "" |))) + | [], [] => ltac:(M.monadic (M.read (| M.of_value (| Value.String "" |) |))) | _, _ => M.impossible end. @@ -3989,13 +4275,13 @@ Module str. unsafe { from_utf8_unchecked_mut(&mut []) } } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.call_closure (| M.get_function (| "core::str::converts::from_utf8_unchecked_mut", [] |), - [ (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) ] + [ (* Unsize *) M.pointer_coercion (| M.alloc (| M.of_value (| Value.Array [] |) |) |) ] |))) | _, _ => M.impossible end. @@ -4012,12 +4298,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::LinesMap". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::LinesMap" [])) + M.of_value (| Value.StructTuple "core::str::LinesMap" [] |))) | _, _ => M.impossible end. @@ -4033,12 +4319,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::CharEscapeDebugContinue". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::CharEscapeDebugContinue" [])) + M.of_value (| Value.StructTuple "core::str::CharEscapeDebugContinue" [] |))) | _, _ => M.impossible end. @@ -4054,12 +4340,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::CharEscapeUnicode". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::CharEscapeUnicode" [])) + M.of_value (| Value.StructTuple "core::str::CharEscapeUnicode" [] |))) | _, _ => M.impossible end. @@ -4075,12 +4361,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::CharEscapeDefault". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::CharEscapeDefault" [])) + M.of_value (| Value.StructTuple "core::str::CharEscapeDefault" [] |))) | _, _ => M.impossible end. @@ -4096,12 +4382,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::IsWhitespace". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::IsWhitespace" [])) + M.of_value (| Value.StructTuple "core::str::IsWhitespace" [] |))) | _, _ => M.impossible end. @@ -4117,12 +4403,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::IsAsciiWhitespace". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::IsAsciiWhitespace" [])) + M.of_value (| Value.StructTuple "core::str::IsAsciiWhitespace" [] |))) | _, _ => M.impossible end. @@ -4138,12 +4424,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::IsNotEmpty". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::IsNotEmpty" [])) + M.of_value (| Value.StructTuple "core::str::IsNotEmpty" [] |))) | _, _ => M.impossible end. @@ -4159,12 +4445,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::BytesIsNotEmpty". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::BytesIsNotEmpty" [])) + M.of_value (| Value.StructTuple "core::str::BytesIsNotEmpty" [] |))) | _, _ => M.impossible end. @@ -4180,12 +4466,12 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::UnsafeBytesToStr". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "core::str::UnsafeBytesToStr" [])) + M.of_value (| Value.StructTuple "core::str::UnsafeBytesToStr" [] |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/str/pattern.v b/CoqOfRust/core/str/pattern.v index a3875155c..ee6983629 100644 --- a/CoqOfRust/core/str/pattern.v +++ b/CoqOfRust/core/str/pattern.v @@ -5,7 +5,7 @@ Module str. Module pattern. (* Trait *) Module Pattern. - Definition is_contained_in (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contained_in (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -52,7 +52,7 @@ Module str. Axiom ProvidedMethod_is_contained_in : M.IsProvidedMethod "core::str::pattern::Pattern" "is_contained_in" is_contained_in. - Definition is_prefix_of (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_prefix_of (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -101,12 +101,9 @@ Module str. 1 |) in let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.Usize 0 - |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -115,7 +112,7 @@ Module str. Axiom ProvidedMethod_is_prefix_of : M.IsProvidedMethod "core::str::pattern::Pattern" "is_prefix_of" is_prefix_of. - Definition is_suffix_of (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_suffix_of (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -166,16 +163,17 @@ Module str. let j := M.copy (| γ0_1 |) in let γ := M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| haystack |) ] - |)) - (M.read (| j |)) + |), + M.read (| j |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -184,7 +182,7 @@ Module str. Axiom ProvidedMethod_is_suffix_of : M.IsProvidedMethod "core::str::pattern::Pattern" "is_suffix_of" is_suffix_of. - Definition strip_prefix_of (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix_of (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -192,7 +190,7 @@ Module str. let haystack := M.alloc (| haystack |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -238,11 +236,11 @@ Module str. let len := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -251,8 +249,14 @@ Module str. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ start; M.alloc (| Value.Integer Integer.Usize 0 |) ] + M.of_value (| + Value.Tuple + [ + A.to_value start; + A.to_value + (M.alloc (| M.of_value (| Value.Integer 0 |) |)) + ] + |) |), [ fun γ => @@ -262,17 +266,19 @@ Module str. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -284,9 +290,11 @@ Module str. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -298,31 +306,40 @@ Module str. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::Arguments", - "new_const", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "The first search step from Searcher must include the first character" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "The first search step from Searcher must include the first character" + |) + |)) + ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) @@ -330,41 +347,50 @@ Module str. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ] - |), - [ - M.read (| haystack |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| len |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ] + |), + [ + M.read (| haystack |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| len |))) ] + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -373,7 +399,7 @@ Module str. Axiom ProvidedMethod_strip_prefix_of : M.IsProvidedMethod "core::str::pattern::Pattern" "strip_prefix_of" strip_prefix_of. - Definition strip_suffix_of (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix_of (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -381,7 +407,7 @@ Module str. let haystack := M.alloc (| haystack |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -427,11 +453,11 @@ Module str. let end_ := M.copy (| γ0_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -440,20 +466,23 @@ Module str. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - end_; - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "len", - [] - |), - [ M.read (| haystack |) ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value end_; + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "len", + [] + |), + [ M.read (| haystack |) ] + |) + |)) + ] + |) |), [ fun γ => @@ -463,17 +492,19 @@ Module str. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -485,9 +516,11 @@ Module str. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -499,31 +532,40 @@ Module str. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::Arguments", - "new_const", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "The first search step from ReverseSearcher must include the last character" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "The first search step from ReverseSearcher must include the last character" + |) + |)) + ] |) - ] - |)) - ] - |) - ] + |) + |) + ] + |)) + ] + |) ] |) |) @@ -531,38 +573,50 @@ Module str. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] - ] - |), - [ - M.read (| haystack |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| start |)) ] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ] + |), + [ + M.read (| haystack |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| start |))) ] + |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -613,14 +667,14 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::SearchStep". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -650,15 +704,15 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::SearchStep". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -688,7 +742,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::SearchStep". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -717,11 +771,16 @@ Module str. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -759,13 +818,15 @@ Module str. let __arg1_1 := M.alloc (| γ2_1 |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| M.read (| __self_0 |) |)) - (M.read (| M.read (| __arg1_0 |) |)), + BinOp.Pure.eq (| + M.read (| M.read (| __self_0 |) |), + M.read (| M.read (| __arg1_0 |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| M.read (| __self_1 |) |)) - (M.read (| M.read (| __arg1_1 |) |)))) + (BinOp.Pure.eq (| + M.read (| M.read (| __self_1 |) |), + M.read (| M.read (| __arg1_1 |) |) + |))) |) |))); fun γ => @@ -804,16 +865,18 @@ Module str. let __arg1_1 := M.alloc (| γ2_1 |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| M.read (| __self_0 |) |)) - (M.read (| M.read (| __arg1_0 |) |)), + BinOp.Pure.eq (| + M.read (| M.read (| __self_0 |) |), + M.read (| M.read (| __arg1_0 |) |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| M.read (| __self_1 |) |)) - (M.read (| M.read (| __arg1_1 |) |)))) + (BinOp.Pure.eq (| + M.read (| M.read (| __self_1 |) |), + M.read (| M.read (| __arg1_1 |) |) + |))) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -835,7 +898,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::SearchStep". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -871,9 +934,9 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "Match" |); - (* Unsize *) M.pointer_coercion (M.read (| __self_0 |)); - (* Unsize *) M.pointer_coercion __self_1 + M.read (| M.of_value (| Value.String "Match" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| __self_0 |) |); + (* Unsize *) M.pointer_coercion (| __self_1 |) ] |) |))); @@ -903,9 +966,9 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "Reject" |); - (* Unsize *) M.pointer_coercion (M.read (| __self_0 |)); - (* Unsize *) M.pointer_coercion __self_1 + M.read (| M.of_value (| Value.String "Reject" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| __self_0 |) |); + (* Unsize *) M.pointer_coercion (| __self_1 |) ] |) |))); @@ -919,7 +982,7 @@ Module str. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Done" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Done" |) |) ] |) |))) ] @@ -938,7 +1001,7 @@ Module str. (* Trait *) Module Searcher. - Definition next_match (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -983,9 +1046,20 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| a |); M.read (| b |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |)) + ] + |) |) |) |) @@ -996,7 +1070,9 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -1015,7 +1091,7 @@ Module str. Axiom ProvidedMethod_next_match : M.IsProvidedMethod "core::str::pattern::Searcher" "next_match" next_match. - Definition next_reject (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1060,9 +1136,20 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| a |); M.read (| b |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |)) + ] + |) |) |) |) @@ -1073,7 +1160,9 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -1096,7 +1185,7 @@ Module str. (* Trait *) Module ReverseSearcher. - Definition next_match_back (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match_back (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1141,9 +1230,20 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| a |); M.read (| b |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |)) + ] + |) |) |) |) @@ -1154,7 +1254,9 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -1173,7 +1275,7 @@ Module str. Axiom ProvidedMethod_next_match_back : M.IsProvidedMethod "core::str::pattern::ReverseSearcher" "next_match_back" next_match_back. - Definition next_reject_back (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject_back (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1218,9 +1320,20 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| a |); M.read (| b |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |)) + ] + |) |) |) |) @@ -1231,7 +1344,9 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -1277,93 +1392,125 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::CharSearcher". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::pattern::CharSearcher" - [ - ("haystack", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "&") [ Ty.path "str" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "haystack" - |) - ] - |)); - ("finger", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger" - |) - ] - |)); - ("finger_back", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger_back" - |) - ] - |)); - ("needle", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "char", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "needle" - |) - ] - |)); - ("utf8_size", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "utf8_size" - |) - ] - |)); - ("utf8_encoded", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "array") [ Ty.path "u8" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "utf8_encoded" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::pattern::CharSearcher" + [ + ("haystack", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "&") [ Ty.path "str" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "haystack" + |) + ] + |))); + ("finger", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger" + |) + ] + |))); + ("finger_back", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger_back" + |) + ] + |))); + ("needle", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "char", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "needle" + |) + ] + |))); + ("utf8_size", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "utf8_size" + |) + ] + |))); + ("utf8_encoded", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "utf8_encoded" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1379,7 +1526,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::CharSearcher". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1389,70 +1536,87 @@ Module str. let names := M.alloc (| M.alloc (| - Value.Array - [ - M.read (| Value.String "haystack" |); - M.read (| Value.String "finger" |); - M.read (| Value.String "finger_back" |); - M.read (| Value.String "needle" |); - M.read (| Value.String "utf8_size" |); - M.read (| Value.String "utf8_encoded" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "haystack" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "finger" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "finger_back" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "needle" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "utf8_size" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "utf8_encoded" |) |)) + ] + |) |) |) in let values := M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "haystack" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger_back" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "needle" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "utf8_size" - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "utf8_encoded" - |) - |)) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "haystack" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger_back" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "needle" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "utf8_size" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "utf8_encoded" + |) + |) + |)) + ] + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1463,8 +1627,8 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "CharSearcher" |); - (* Unsize *) M.pointer_coercion (M.read (| names |)); + M.read (| M.of_value (| Value.String "CharSearcher" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| names |) |); M.read (| values |) ] |) @@ -1489,7 +1653,7 @@ Module str. self.haystack } *) - Definition haystack (τ : list Ty.t) (α : list Value.t) : M := + Definition haystack (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1532,7 +1696,7 @@ Module str. } } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1562,19 +1726,22 @@ Module str. "haystack" |) |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| old_finger |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger_back" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| old_finger |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger_back" + |) + |))) + ] + |) ] |) |) in @@ -1605,7 +1772,7 @@ Module str. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1639,8 +1806,10 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), BinOp.Panic.sub (| + Integer.Usize, M.read (| old_len |), M.call_closure (| M.get_trait_method (| @@ -1662,22 +1831,23 @@ Module str. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| ch |)) - (M.read (| + BinOp.Pure.eq (| + M.read (| ch |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "needle" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1685,40 +1855,48 @@ Module str. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Match" - [ - M.read (| old_finger |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Match" + [ + A.to_value (M.read (| old_finger |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger" + |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Reject" - [ - M.read (| old_finger |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Reject" + [ + A.to_value (M.read (| old_finger |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger" + |) + |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::str::pattern::SearchStep::Done" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::str::pattern::SearchStep::Done" [] |) + |))) ] |) |))) @@ -1768,7 +1946,7 @@ Module str. } } *) - Definition next_match (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1825,26 +2003,30 @@ Module str. |) ] |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger" - |) - |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger_back" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger" + |) + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger_back" + |) + |))) + ] + |) ] |) ] @@ -1907,13 +2089,15 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "utf8_encoded" - |)); + |) + |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1921,13 +2105,13 @@ Module str. "utf8_size" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1955,36 +2139,39 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), BinOp.Panic.add (| + Integer.Usize, M.read (| index |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + 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 let _ := M.is_constant_or_break_match (| @@ -1994,6 +2181,7 @@ Module str. let found_char := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2011,7 +2199,7 @@ Module str. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2044,19 +2232,24 @@ Module str. |) ] |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| found_char |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| found_char |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger" + |) + |))) + ] + |) ] |) |) in @@ -2068,7 +2261,7 @@ Module str. |) in let slice := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2121,29 +2314,35 @@ Module str. "core::str::pattern::CharSearcher", "utf8_encoded" |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - Value.Integer - Integer.Usize - 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "utf8_size" - |) - |)) - ] - ] - |) - |) - ] - |) - |)) in - let _ := + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + self + |), + "core::str::pattern::CharSearcher", + "utf8_size" + |) + |))) + ] + |) + ] + |) + |) + ] + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true @@ -2152,34 +2351,51 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.read (| found_char |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger" - |) - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + found_char + |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + self + |), + "core::str::pattern::CharSearcher", + "finger" + |) + |)) + ] + |)) + ] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -2203,7 +2419,9 @@ Module str. |) |) in M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -2254,7 +2472,7 @@ Module str. } } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2284,19 +2502,22 @@ Module str. "haystack" |) |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger" - |) - |)); - ("end_", M.read (| old_finger |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger" + |) + |))); + ("end_", A.to_value (M.read (| old_finger |))) + ] + |) ] |) |) in @@ -2327,7 +2548,7 @@ Module str. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2361,8 +2582,10 @@ Module str. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), BinOp.Panic.sub (| + Integer.Usize, M.read (| old_len |), M.call_closure (| M.get_trait_method (| @@ -2384,22 +2607,23 @@ Module str. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| ch |)) - (M.read (| + BinOp.Pure.eq (| + M.read (| ch |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "needle" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2407,40 +2631,48 @@ Module str. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Match" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger_back" - |) - |); - M.read (| old_finger |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Match" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger_back" + |) + |)); + A.to_value (M.read (| old_finger |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Reject" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger_back" - |) - |); - M.read (| old_finger |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Reject" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger_back" + |) + |)); + A.to_value (M.read (| old_finger |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::str::pattern::SearchStep::Done" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::str::pattern::SearchStep::Done" [] |) + |))) ] |) |))) @@ -2497,7 +2729,7 @@ Module str. } } *) - Definition next_match_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2556,26 +2788,30 @@ Module str. |), [ M.read (| haystack |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger" - |) - |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger_back" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger" + |) + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "finger_back" + |) + |))) + ] + |) ] |) ] @@ -2641,13 +2877,15 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "utf8_encoded" - |)); + |) + |); BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2655,13 +2893,13 @@ Module str. "utf8_size" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2682,6 +2920,7 @@ Module str. let index := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2695,6 +2934,7 @@ Module str. let shift := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2702,21 +2942,22 @@ Module str. "utf8_size" |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| index |)) - (M.read (| shift |)) + BinOp.Pure.ge (| + M.read (| index |), + M.read (| shift |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2726,12 +2967,13 @@ Module str. let found_char := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| index |), M.read (| shift |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2752,23 +2994,28 @@ Module str. |), [ M.read (| haystack |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| found_char |)); - ("end_", - BinOp.Panic.add (| - M.read (| found_char |), - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "utf8_size" - |) - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| found_char |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| found_char |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::CharSearcher", + "utf8_size" + |) + |) + |))) + ] + |) ] |) |) in @@ -2780,7 +3027,9 @@ Module str. |) in let slice := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic @@ -2834,24 +3083,29 @@ Module str. "core::str::pattern::CharSearcher", "utf8_encoded" |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - Value.Integer - Integer.Usize - 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| - self - |), - "core::str::pattern::CharSearcher", - "utf8_size" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer + 0 + |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + self + |), + "core::str::pattern::CharSearcher", + "utf8_size" + |) + |))) + ] + |) ] |) |) @@ -2876,54 +3130,71 @@ Module str. M.read (| found_char |) |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::CharSearcher", - "finger_back" - |) - |); - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| - self - |), - "core::str::pattern::CharSearcher", - "finger_back" - |) - |), - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| - self - |), - "core::str::pattern::CharSearcher", - "utf8_size" - |) - |) - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + self + |), + "core::str::pattern::CharSearcher", + "finger_back" + |) + |)); + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + self + |), + "core::str::pattern::CharSearcher", + "finger_back" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + self + |), + "core::str::pattern::CharSearcher", + "utf8_size" + |) + |) + |)) + ] + |)) + ] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2935,7 +3206,7 @@ Module str. |), M.read (| index |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2957,7 +3228,9 @@ Module str. |) |) in M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) |) |) |) @@ -3016,14 +3289,14 @@ Module str. } } *) - Definition into_searcher (τ : list Ty.t) (α : list Value.t) : M := + Definition into_searcher (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic (let self := M.alloc (| self |) in let haystack := M.alloc (| haystack |) in M.read (| - let utf8_encoded := M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |) in + let utf8_encoded := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) in let utf8_size := M.alloc (| M.call_closure (| @@ -3031,26 +3304,29 @@ Module str. [ M.call_closure (| M.get_associated_function (| Ty.path "char", "encode_utf8", [] |), - [ M.read (| self |); (* Unsize *) M.pointer_coercion utf8_encoded ] + [ M.read (| self |); (* Unsize *) M.pointer_coercion (| utf8_encoded |) ] |) ] |) |) in M.alloc (| - Value.StructRecord - "core::str::pattern::CharSearcher" - [ - ("haystack", M.read (| haystack |)); - ("finger", Value.Integer Integer.Usize 0); - ("finger_back", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| haystack |) ] - |)); - ("needle", M.read (| self |)); - ("utf8_size", M.read (| utf8_size |)); - ("utf8_encoded", M.read (| utf8_encoded |)) - ] + M.of_value (| + Value.StructRecord + "core::str::pattern::CharSearcher" + [ + ("haystack", A.to_value (M.read (| haystack |))); + ("finger", A.to_value (M.of_value (| Value.Integer 0 |))); + ("finger_back", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ M.read (| haystack |) ] + |))); + ("needle", A.to_value (M.read (| self |))); + ("utf8_size", A.to_value (M.read (| utf8_size |))); + ("utf8_encoded", A.to_value (M.read (| utf8_encoded |))) + ] + |) |) |))) | _, _ => M.impossible @@ -3066,7 +3342,7 @@ Module str. } } *) - Definition is_contained_in (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contained_in (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -3074,16 +3350,17 @@ Module str. let haystack := M.alloc (| haystack |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.rust_cast (M.read (| self |))) - (Value.Integer Integer.U32 128) + BinOp.Pure.lt (| + M.rust_cast (| M.read (| self |) |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3098,13 +3375,14 @@ Module str. M.get_associated_function (| Ty.path "str", "as_bytes", [] |), [ M.read (| haystack |) ] |); - M.alloc (| M.rust_cast (M.read (| self |)) |) + M.alloc (| M.rust_cast (| M.read (| self |) |) |) ] |) |))); fun γ => ltac:(M.monadic - (let buffer := M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |) in + (let buffer := + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3117,7 +3395,7 @@ Module str. [ M.call_closure (| M.get_associated_function (| Ty.path "char", "encode_utf8", [] |), - [ M.read (| self |); (* Unsize *) M.pointer_coercion buffer ] + [ M.read (| self |); (* Unsize *) M.pointer_coercion (| buffer |) ] |); M.read (| haystack |) ] @@ -3134,7 +3412,7 @@ Module str. self.encode_utf8(&mut [0u8; 4]).is_prefix_of(haystack) } *) - Definition is_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -3154,7 +3432,9 @@ Module str. [ M.read (| self |); (* Unsize *) - M.pointer_coercion (M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |)) + M.pointer_coercion (| + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) + |) ] |); M.read (| haystack |) @@ -3168,7 +3448,7 @@ Module str. self.encode_utf8(&mut [0u8; 4]).strip_prefix_of(haystack) } *) - Definition strip_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -3188,7 +3468,9 @@ Module str. [ M.read (| self |); (* Unsize *) - M.pointer_coercion (M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |)) + M.pointer_coercion (| + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) + |) ] |); M.read (| haystack |) @@ -3205,7 +3487,7 @@ Module str. self.encode_utf8(&mut [0u8; 4]).is_suffix_of(haystack) } *) - Definition is_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -3225,7 +3507,9 @@ Module str. [ M.read (| self |); (* Unsize *) - M.pointer_coercion (M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |)) + M.pointer_coercion (| + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) + |) ] |); M.read (| haystack |) @@ -3242,7 +3526,7 @@ Module str. self.encode_utf8(&mut [0u8; 4]).strip_suffix_of(haystack) } *) - Definition strip_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -3262,7 +3546,9 @@ Module str. [ M.read (| self |); (* Unsize *) - M.pointer_coercion (M.alloc (| repeat (Value.Integer Integer.U8 0) 4 |)) + M.pointer_coercion (| + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) + |) ] |); M.read (| haystack |) @@ -3299,7 +3585,7 @@ Module str. ( *self)(c) } *) - Definition matches (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition matches (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; c ] => @@ -3314,7 +3600,7 @@ Module str. "call_mut", [] |), - [ M.read (| self |); Value.Tuple [ M.read (| c |) ] ] + [ M.read (| self |); M.of_value (| Value.Tuple [ A.to_value (M.read (| c |)) ] |) ] |))) | _, _ => M.impossible end. @@ -3336,7 +3622,7 @@ Module str. self.iter().any(|&m| m == c) } *) - Definition matches (τ : list Ty.t) (α : list Value.t) : M := + Definition matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; c ] => ltac:(M.monadic @@ -3362,11 +3648,11 @@ Module str. "iter", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| self |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| self |) |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3377,11 +3663,12 @@ Module str. ltac:(M.monadic (let γ := M.read (| γ |) in let m := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| m |)) (M.read (| c |)))) + BinOp.Pure.eq (| M.read (| m |), M.read (| c |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3404,7 +3691,7 @@ Module str. self.iter().any(|&m| m == c) } *) - Definition matches (τ : list Ty.t) (α : list Value.t) : M := + Definition matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; c ] => ltac:(M.monadic @@ -3430,11 +3717,11 @@ Module str. "iter", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| M.read (| self |) |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| M.read (| self |) |) |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3445,11 +3732,12 @@ Module str. ltac:(M.monadic (let γ := M.read (| γ |) in let m := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| m |)) (M.read (| c |)))) + BinOp.Pure.eq (| M.read (| m |), M.read (| c |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3472,7 +3760,7 @@ Module str. self.iter().any(|&m| m == c) } *) - Definition matches (τ : list Ty.t) (α : list Value.t) : M := + Definition matches (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; c ] => ltac:(M.monadic @@ -3501,8 +3789,8 @@ Module str. [ M.read (| M.read (| self |) |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3513,11 +3801,12 @@ Module str. ltac:(M.monadic (let γ := M.read (| γ |) in let m := M.copy (| γ |) in - BinOp.Pure.eq (M.read (| m |)) (M.read (| c |)))) + BinOp.Pure.eq (| M.read (| m |), M.read (| c |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -3555,61 +3844,66 @@ Module str. Ty.apply (Ty.path "core::str::pattern::MultiCharEqSearcher") [ C ]. (* Clone *) - Definition clone (C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::pattern::MultiCharEqSearcher" - [ - ("char_eq", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", C, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::MultiCharEqSearcher", - "char_eq" - |) - ] - |)); - ("haystack", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "&") [ Ty.path "str" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::MultiCharEqSearcher", - "haystack" - |) - ] - |)); - ("char_indices", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::str::iter::CharIndices", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::MultiCharEqSearcher", - "char_indices" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::pattern::MultiCharEqSearcher" + [ + ("char_eq", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", C, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::MultiCharEqSearcher", + "char_eq" + |) + ] + |))); + ("haystack", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "&") [ Ty.path "str" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::MultiCharEqSearcher", + "haystack" + |) + ] + |))); + ("char_indices", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::str::iter::CharIndices", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::MultiCharEqSearcher", + "char_indices" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3627,7 +3921,7 @@ Module str. Ty.apply (Ty.path "core::str::pattern::MultiCharEqSearcher") [ C ]. (* Debug *) - Definition fmt (C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C in match τ, α with | [], [ self; f ] => @@ -3642,33 +3936,36 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "MultiCharEqSearcher" |); - M.read (| Value.String "char_eq" |); + M.read (| M.of_value (| Value.String "MultiCharEqSearcher" |) |); + M.read (| M.of_value (| Value.String "char_eq" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::MultiCharEqSearcher", "char_eq" - |)); - M.read (| Value.String "haystack" |); + |) + |); + M.read (| M.of_value (| Value.String "haystack" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::MultiCharEqSearcher", "haystack" - |)); - M.read (| Value.String "char_indices" |); + |) + |); + M.read (| M.of_value (| Value.String "char_indices" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::MultiCharEqSearcher", "char_indices" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -3696,31 +3993,35 @@ Module str. MultiCharEqSearcher { haystack, char_eq: self.0, char_indices: haystack.char_indices() } } *) - Definition into_searcher (C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_searcher (C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C in match τ, α with | [], [ self; haystack ] => ltac:(M.monadic (let self := M.alloc (| self |) in let haystack := M.alloc (| haystack |) in - Value.StructRecord - "core::str::pattern::MultiCharEqSearcher" - [ - ("haystack", M.read (| haystack |)); - ("char_eq", - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "core::str::pattern::MultiCharEqPattern", - 0 - |) - |)); - ("char_indices", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "char_indices", [] |), - [ M.read (| haystack |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::pattern::MultiCharEqSearcher" + [ + ("haystack", A.to_value (M.read (| haystack |))); + ("char_eq", + A.to_value + (M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "core::str::pattern::MultiCharEqPattern", + 0 + |) + |))); + ("char_indices", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "char_indices", [] |), + [ M.read (| haystack |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3746,7 +4047,7 @@ Module str. self.haystack } *) - Definition haystack (C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition haystack (C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C in match τ, α with | [], [ self ] => @@ -3780,7 +4081,7 @@ Module str. SearchStep::Done } *) - Definition next (C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C in match τ, α with | [], [ self ] => @@ -3822,7 +4123,7 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3874,10 +4175,14 @@ Module str. |) in let char_len := M.alloc (| - BinOp.Panic.sub (| M.read (| pre_len |), M.read (| len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| pre_len |), + M.read (| len |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3911,15 +4216,19 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::str::pattern::SearchStep::Match" - [ - M.read (| i |); - BinOp.Panic.add (| - M.read (| i |), - M.read (| char_len |) - |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Match" + [ + A.to_value (M.read (| i |)); + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.read (| char_len |) + |)) + ] + |) |) |) |) @@ -3930,25 +4239,31 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::str::pattern::SearchStep::Reject" - [ - M.read (| i |); - BinOp.Panic.add (| - M.read (| i |), - M.read (| char_len |) - |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Reject" + [ + A.to_value (M.read (| i |)); + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.read (| char_len |) + |)) + ] + |) |) |) |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::str::pattern::SearchStep::Done" [] |) + M.alloc (| + M.of_value (| Value.StructTuple "core::str::pattern::SearchStep::Done" [] |) + |) |))) |))) | _, _ => M.impossible @@ -3987,7 +4302,7 @@ Module str. SearchStep::Done } *) - Definition next_back (C : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (C : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C in match τ, α with | [], [ self ] => @@ -4029,7 +4344,7 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4081,10 +4396,14 @@ Module str. |) in let char_len := M.alloc (| - BinOp.Panic.sub (| M.read (| pre_len |), M.read (| len |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| pre_len |), + M.read (| len |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4118,15 +4437,19 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::str::pattern::SearchStep::Match" - [ - M.read (| i |); - BinOp.Panic.add (| - M.read (| i |), - M.read (| char_len |) - |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Match" + [ + A.to_value (M.read (| i |)); + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.read (| char_len |) + |)) + ] + |) |) |) |) @@ -4137,25 +4460,31 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::str::pattern::SearchStep::Reject" - [ - M.read (| i |); - BinOp.Panic.add (| - M.read (| i |), - M.read (| char_len |) - |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Reject" + [ + A.to_value (M.read (| i |)); + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.read (| char_len |) + |)) + ] + |) |) |) |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::str::pattern::SearchStep::Done" [] |) + M.alloc (| + M.of_value (| Value.StructTuple "core::str::pattern::SearchStep::Done" [] |) + |) |))) |))) | _, _ => M.impossible @@ -4194,33 +4523,36 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::CharArraySearcher". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::pattern::CharArraySearcher" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::str::pattern::MultiCharEqSearcher") - [ Ty.apply (Ty.path "array") [ Ty.path "char" ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::pattern::CharArraySearcher", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::CharArraySearcher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::str::pattern::MultiCharEqSearcher") + [ Ty.apply (Ty.path "array") [ Ty.path "char" ] ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::pattern::CharArraySearcher", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4236,7 +4568,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::CharArraySearcher". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4250,16 +4582,17 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "CharArraySearcher" |); + M.read (| M.of_value (| Value.String "CharArraySearcher" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::pattern::CharArraySearcher", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -4284,33 +4617,37 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::CharArrayRefSearcher". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::pattern::CharArrayRefSearcher" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::str::pattern::MultiCharEqSearcher") - [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "array") [ Ty.path "char" ] ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::pattern::CharArrayRefSearcher", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::CharArrayRefSearcher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::str::pattern::MultiCharEqSearcher") + [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "array") [ Ty.path "char" ] ] + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::pattern::CharArrayRefSearcher", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4326,7 +4663,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::CharArrayRefSearcher". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -4340,16 +4677,17 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "CharArrayRefSearcher" |); + M.read (| M.of_value (| Value.String "CharArrayRefSearcher" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::pattern::CharArrayRefSearcher", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -4374,33 +4712,38 @@ Module str. ($smap)(($pmap)(self).into_searcher(haystack)) } *) - Definition into_searcher (τ : list Ty.t) (α : list Value.t) : M := + Definition into_searcher (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic (let self := M.alloc (| self |) in let haystack := M.alloc (| haystack |) in - Value.StructTuple - "core::str::pattern::CharArraySearcher" - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Pattern", - Ty.apply - (Ty.path "core::str::pattern::MultiCharEqPattern") - [ Ty.apply (Ty.path "array") [ Ty.path "char" ] ], - [], - "into_searcher", - [] - |), - [ - Value.StructTuple - "core::str::pattern::MultiCharEqPattern" - [ M.read (| self |) ]; - M.read (| haystack |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::CharArraySearcher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Pattern", + Ty.apply + (Ty.path "core::str::pattern::MultiCharEqPattern") + [ Ty.apply (Ty.path "array") [ Ty.path "char" ] ], + [], + "into_searcher", + [] + |), + [ + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); + M.read (| haystack |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4409,7 +4752,7 @@ Module str. ($pmap)(self).is_contained_in(haystack) } *) - Definition is_contained_in (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contained_in (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -4426,7 +4769,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -4438,7 +4785,7 @@ Module str. ($pmap)(self).is_prefix_of(haystack) } *) - Definition is_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -4455,7 +4802,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -4467,7 +4818,7 @@ Module str. ($pmap)(self).strip_prefix_of(haystack) } *) - Definition strip_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -4484,7 +4835,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -4499,7 +4854,7 @@ Module str. ($pmap)(self).is_suffix_of(haystack) } *) - Definition is_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -4516,7 +4871,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -4531,7 +4890,7 @@ Module str. ($pmap)(self).strip_suffix_of(haystack) } *) - Definition strip_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -4548,7 +4907,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -4580,7 +4943,7 @@ Module str. self.0.haystack() } *) - Definition haystack (τ : list Ty.t) (α : list Value.t) : M := + Definition haystack (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4611,7 +4974,7 @@ Module str. self.0.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4642,7 +5005,7 @@ Module str. self.0.next_match() } *) - Definition next_match (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4673,7 +5036,7 @@ Module str. self.0.next_reject() } *) - Definition next_reject (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4721,7 +5084,7 @@ Module str. self.0.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4752,7 +5115,7 @@ Module str. self.0.next_match_back() } *) - Definition next_match_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4783,7 +5146,7 @@ Module str. self.0.next_reject_back() } *) - Definition next_reject_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4845,33 +5208,39 @@ Module str. ($smap)(($pmap)(self).into_searcher(haystack)) } *) - Definition into_searcher (τ : list Ty.t) (α : list Value.t) : M := + Definition into_searcher (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic (let self := M.alloc (| self |) in let haystack := M.alloc (| haystack |) in - Value.StructTuple - "core::str::pattern::CharArrayRefSearcher" - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Pattern", - Ty.apply - (Ty.path "core::str::pattern::MultiCharEqPattern") - [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "array") [ Ty.path "char" ] ] ], - [], - "into_searcher", - [] - |), - [ - Value.StructTuple - "core::str::pattern::MultiCharEqPattern" - [ M.read (| self |) ]; - M.read (| haystack |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::CharArrayRefSearcher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Pattern", + Ty.apply + (Ty.path "core::str::pattern::MultiCharEqPattern") + [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "array") [ Ty.path "char" ] ] + ], + [], + "into_searcher", + [] + |), + [ + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); + M.read (| haystack |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -4880,7 +5249,7 @@ Module str. ($pmap)(self).is_contained_in(haystack) } *) - Definition is_contained_in (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contained_in (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -4897,7 +5266,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -4909,7 +5282,7 @@ Module str. ($pmap)(self).is_prefix_of(haystack) } *) - Definition is_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -4926,7 +5299,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -4938,7 +5315,7 @@ Module str. ($pmap)(self).strip_prefix_of(haystack) } *) - Definition strip_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -4955,7 +5332,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -4970,7 +5351,7 @@ Module str. ($pmap)(self).is_suffix_of(haystack) } *) - Definition is_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -4987,7 +5368,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -5002,7 +5387,7 @@ Module str. ($pmap)(self).strip_suffix_of(haystack) } *) - Definition strip_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -5019,7 +5404,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -5051,7 +5440,7 @@ Module str. self.0.haystack() } *) - Definition haystack (τ : list Ty.t) (α : list Value.t) : M := + Definition haystack (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5082,7 +5471,7 @@ Module str. self.0.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5113,7 +5502,7 @@ Module str. self.0.next_match() } *) - Definition next_match (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5144,7 +5533,7 @@ Module str. self.0.next_reject() } *) - Definition next_reject (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5192,7 +5581,7 @@ Module str. self.0.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5223,7 +5612,7 @@ Module str. self.0.next_match_back() } *) - Definition next_match_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5254,7 +5643,7 @@ Module str. self.0.next_reject_back() } *) - Definition next_reject_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5315,33 +5704,37 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::CharSliceSearcher". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::pattern::CharSliceSearcher" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "core::str::pattern::MultiCharEqSearcher") - [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "char" ] ] ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::pattern::CharSliceSearcher", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::CharSliceSearcher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::str::pattern::MultiCharEqSearcher") + [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "char" ] ] + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::pattern::CharSliceSearcher", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5357,7 +5750,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::CharSliceSearcher". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5371,16 +5764,17 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "CharSliceSearcher" |); + M.read (| M.of_value (| Value.String "CharSliceSearcher" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::pattern::CharSliceSearcher", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5402,7 +5796,7 @@ Module str. self.0.haystack() } *) - Definition haystack (τ : list Ty.t) (α : list Value.t) : M := + Definition haystack (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5433,7 +5827,7 @@ Module str. self.0.next() } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5464,7 +5858,7 @@ Module str. self.0.next_match() } *) - Definition next_match (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5495,7 +5889,7 @@ Module str. self.0.next_reject() } *) - Definition next_reject (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5543,7 +5937,7 @@ Module str. self.0.next_back() } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5574,7 +5968,7 @@ Module str. self.0.next_match_back() } *) - Definition next_match_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5605,7 +5999,7 @@ Module str. self.0.next_reject_back() } *) - Definition next_reject_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5667,33 +6061,39 @@ Module str. ($smap)(($pmap)(self).into_searcher(haystack)) } *) - Definition into_searcher (τ : list Ty.t) (α : list Value.t) : M := + Definition into_searcher (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic (let self := M.alloc (| self |) in let haystack := M.alloc (| haystack |) in - Value.StructTuple - "core::str::pattern::CharSliceSearcher" - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Pattern", - Ty.apply - (Ty.path "core::str::pattern::MultiCharEqPattern") - [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "char" ] ] ], - [], - "into_searcher", - [] - |), - [ - Value.StructTuple - "core::str::pattern::MultiCharEqPattern" - [ M.read (| self |) ]; - M.read (| haystack |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::CharSliceSearcher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Pattern", + Ty.apply + (Ty.path "core::str::pattern::MultiCharEqPattern") + [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "char" ] ] + ], + [], + "into_searcher", + [] + |), + [ + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); + M.read (| haystack |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5702,7 +6102,7 @@ Module str. ($pmap)(self).is_contained_in(haystack) } *) - Definition is_contained_in (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contained_in (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -5719,7 +6119,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -5731,7 +6135,7 @@ Module str. ($pmap)(self).is_prefix_of(haystack) } *) - Definition is_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -5748,7 +6152,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -5760,7 +6168,7 @@ Module str. ($pmap)(self).strip_prefix_of(haystack) } *) - Definition strip_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -5777,7 +6185,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -5792,7 +6204,7 @@ Module str. ($pmap)(self).is_suffix_of(haystack) } *) - Definition is_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -5809,7 +6221,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -5824,7 +6240,7 @@ Module str. ($pmap)(self).strip_suffix_of(haystack) } *) - Definition strip_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -5841,7 +6257,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -5877,32 +6297,35 @@ Module str. Ty.apply (Ty.path "core::str::pattern::CharPredicateSearcher") [ F ]. (* Clone *) - Definition clone (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "core::str::pattern::CharPredicateSearcher" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::str::pattern::MultiCharEqSearcher") [ F ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "core::str::pattern::CharPredicateSearcher", - 0 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::CharPredicateSearcher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::str::pattern::MultiCharEqSearcher") [ F ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "core::str::pattern::CharPredicateSearcher", + 0 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -5927,7 +6350,7 @@ Module str. .finish() } *) - Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; f ] => @@ -5962,13 +6385,16 @@ Module str. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "CharPredicateSearcher" |) ] + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "CharPredicateSearcher" |) |) + ] |) |); - M.read (| Value.String "haystack" |); + M.read (| M.of_value (| Value.String "haystack" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::pattern::CharPredicateSearcher", @@ -5976,13 +6402,14 @@ Module str. |), "core::str::pattern::MultiCharEqSearcher", "haystack" - |)) + |) + |) ] |); - M.read (| Value.String "char_indices" |); + M.read (| M.of_value (| Value.String "char_indices" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::str::pattern::CharPredicateSearcher", @@ -5990,7 +6417,8 @@ Module str. |), "core::str::pattern::MultiCharEqSearcher", "char_indices" - |)) + |) + |) ] |) ] @@ -6016,7 +6444,7 @@ Module str. self.0.haystack() } *) - Definition haystack (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition haystack (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => @@ -6046,7 +6474,7 @@ Module str. self.0.next() } *) - Definition next (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => @@ -6076,7 +6504,7 @@ Module str. self.0.next_match() } *) - Definition next_match (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => @@ -6106,7 +6534,7 @@ Module str. self.0.next_reject() } *) - Definition next_reject (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => @@ -6155,7 +6583,7 @@ Module str. self.0.next_back() } *) - Definition next_back (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => @@ -6185,7 +6613,7 @@ Module str. self.0.next_match_back() } *) - Definition next_match_back (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match_back (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => @@ -6215,7 +6643,7 @@ Module str. self.0.next_reject_back() } *) - Definition next_reject_back (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition next_reject_back (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self ] => @@ -6279,32 +6707,37 @@ Module str. ($smap)(($pmap)(self).into_searcher(haystack)) } *) - Definition into_searcher (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_searcher (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; haystack ] => ltac:(M.monadic (let self := M.alloc (| self |) in let haystack := M.alloc (| haystack |) in - Value.StructTuple - "core::str::pattern::CharPredicateSearcher" - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Pattern", - Ty.apply (Ty.path "core::str::pattern::MultiCharEqPattern") [ F ], - [], - "into_searcher", - [] - |), - [ - Value.StructTuple - "core::str::pattern::MultiCharEqPattern" - [ M.read (| self |) ]; - M.read (| haystack |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::CharPredicateSearcher" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::str::pattern::Pattern", + Ty.apply (Ty.path "core::str::pattern::MultiCharEqPattern") [ F ], + [], + "into_searcher", + [] + |), + [ + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); + M.read (| haystack |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -6313,7 +6746,7 @@ Module str. ($pmap)(self).is_contained_in(haystack) } *) - Definition is_contained_in (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contained_in (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; haystack ] => @@ -6329,7 +6762,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -6341,7 +6778,7 @@ Module str. ($pmap)(self).is_prefix_of(haystack) } *) - Definition is_prefix_of (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_prefix_of (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; haystack ] => @@ -6357,7 +6794,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -6369,7 +6810,7 @@ Module str. ($pmap)(self).strip_prefix_of(haystack) } *) - Definition strip_prefix_of (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix_of (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; haystack ] => @@ -6385,7 +6826,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -6400,7 +6845,7 @@ Module str. ($pmap)(self).is_suffix_of(haystack) } *) - Definition is_suffix_of (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_suffix_of (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; haystack ] => @@ -6416,7 +6861,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -6431,7 +6880,7 @@ Module str. ($pmap)(self).strip_suffix_of(haystack) } *) - Definition strip_suffix_of (F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix_of (F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F in match τ, α with | [], [ self; haystack ] => @@ -6447,7 +6896,11 @@ Module str. [] |), [ - Value.StructTuple "core::str::pattern::MultiCharEqPattern" [ M.read (| self |) ]; + M.of_value (| + Value.StructTuple + "core::str::pattern::MultiCharEqPattern" + [ A.to_value (M.read (| self |)) ] + |); M.read (| haystack |) ] |))) @@ -6483,7 +6936,7 @@ Module str. ($smap)(($pmap)(self).into_searcher(haystack)) } *) - Definition into_searcher (τ : list Ty.t) (α : list Value.t) : M := + Definition into_searcher (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -6501,8 +6954,8 @@ Module str. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6516,70 +6969,75 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "core::str::pattern::Pattern", - Ty.apply (Ty.path "&") [ Ty.path "str" ], - [], - "into_searcher", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| M.get_trait_method (| - "core::ops::function::Fn", - Ty.function - [ - Ty.tuple - [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - ] - ] - (Ty.apply (Ty.path "&") [ Ty.path "str" ]), - [ - Ty.tuple - [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - ] - ], - "call", + "core::str::pattern::Pattern", + Ty.apply (Ty.path "&") [ Ty.path "str" ], + [], + "into_searcher", [] |), [ - M.alloc (| - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let s := M.copy (| γ |) in - M.read (| s |))) - ] - |) - | _ => M.impossible (||) - end)) + M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + Ty.function + [ + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + ] + ] + (Ty.apply (Ty.path "&") [ Ty.path "str" ]), + [ + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + ] + ], + "call", + [] + |), + [ + M.alloc (| + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let s := M.copy (| γ |) in + M.read (| s |))) + ] + |) + | _ => M.impossible (||) + end) + |) + |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |) + ] |); - Value.Tuple [ M.read (| self |) ] + M.read (| haystack |) ] - |); - M.read (| haystack |) - ] - |) - ] + |)) + ] + |) ] |))) | _, _ => M.impossible @@ -6590,7 +7048,7 @@ Module str. ($pmap)(self).is_contained_in(haystack) } *) - Definition is_contained_in (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contained_in (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -6623,8 +7081,8 @@ Module str. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6639,9 +7097,10 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| self |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |) ] |); M.read (| haystack |) @@ -6655,7 +7114,7 @@ Module str. ($pmap)(self).is_prefix_of(haystack) } *) - Definition is_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -6688,8 +7147,8 @@ Module str. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6704,9 +7163,10 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| self |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |) ] |); M.read (| haystack |) @@ -6720,7 +7180,7 @@ Module str. ($pmap)(self).strip_prefix_of(haystack) } *) - Definition strip_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -6753,8 +7213,8 @@ Module str. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6769,9 +7229,10 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| self |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |) ] |); M.read (| haystack |) @@ -6788,7 +7249,7 @@ Module str. ($pmap)(self).is_suffix_of(haystack) } *) - Definition is_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -6821,8 +7282,8 @@ Module str. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6837,9 +7298,10 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| self |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |) ] |); M.read (| haystack |) @@ -6856,7 +7318,7 @@ Module str. ($pmap)(self).strip_suffix_of(haystack) } *) - Definition strip_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -6889,8 +7351,8 @@ Module str. |), [ M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6905,9 +7367,10 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) |); - Value.Tuple [ M.read (| self |) ] + M.of_value (| Value.Tuple [ A.to_value (M.read (| self |)) ] |) ] |); M.read (| haystack |) @@ -6944,7 +7407,7 @@ Module str. StrSearcher::new(haystack, self) } *) - Definition into_searcher (τ : list Ty.t) (α : list Value.t) : M := + Definition into_searcher (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -6962,7 +7425,7 @@ Module str. haystack.as_bytes().starts_with(self.as_bytes()) } *) - Definition is_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7013,7 +7476,7 @@ Module str. } } *) - Definition is_contained_in (τ : list Ty.t) (α : list Value.t) : M := + Definition is_contained_in (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7024,26 +7487,29 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool true |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool true |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -7071,23 +7537,24 @@ Module str. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7122,7 +7589,7 @@ Module str. |), [ M.read (| self |) ] |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) ] |) @@ -7130,28 +7597,30 @@ Module str. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le - (M.call_closure (| + BinOp.Pure.le (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] - |)) - (Value.Integer Integer.Usize 32) + |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7159,7 +7628,7 @@ Module str. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7185,10 +7654,13 @@ Module str. M.read (| M.return_ (| M.read (| result |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -7260,7 +7732,7 @@ Module str. } } *) - Definition strip_prefix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_prefix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7268,7 +7740,7 @@ Module str. let haystack := M.alloc (| haystack |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7288,50 +7760,58 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ] - |), - [ - M.read (| haystack |); - Value.StructRecord - "core::ops::range::RangeFrom" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ] + |), [ - ("start", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), + M.read (| haystack |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "as_bytes", - [] - |), - [ M.read (| self |) ] - |) + ("start", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "as_bytes", + [] + |), + [ M.read (| self |) ] + |) + ] + |))) ] - |)) + |) ] - ] - |) - ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -7343,7 +7823,7 @@ Module str. haystack.as_bytes().ends_with(self.as_bytes()) } *) - Definition is_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition is_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7380,7 +7860,7 @@ Module str. } } *) - Definition strip_suffix_of (τ : list Ty.t) (α : list Value.t) : M := + Definition strip_suffix_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; haystack ] => ltac:(M.monadic @@ -7388,7 +7868,7 @@ Module str. let haystack := M.alloc (| haystack |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -7410,6 +7890,7 @@ Module str. let i := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| haystack |) ] @@ -7430,37 +7911,47 @@ Module str. |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "get_unchecked", - [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] - ] - |), - [ - M.read (| haystack |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| i |)) ] - ] - |) - ] - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) - ] - |) - |))) - | _, _ => M.impossible - end. - - Axiom Implements : - M.IsTraitInstance - "core::str::pattern::Pattern" + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "get_unchecked", + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ] + |), + [ + M.read (| haystack |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| i |))) ] + |) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::str::pattern::Pattern" Self (* Trait polymorphic types *) [] (* Instance *) @@ -7491,66 +7982,71 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::StrSearcher". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::pattern::StrSearcher" - [ - ("haystack", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "&") [ Ty.path "str" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::StrSearcher", - "haystack" - |) - ] - |)); - ("needle", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "&") [ Ty.path "str" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::StrSearcher", - "needle" - |) - ] - |)); - ("searcher", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::str::pattern::StrSearcherImpl", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::StrSearcher", - "searcher" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::pattern::StrSearcher" + [ + ("haystack", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "&") [ Ty.path "str" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::StrSearcher", + "haystack" + |) + ] + |))); + ("needle", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "&") [ Ty.path "str" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::StrSearcher", + "needle" + |) + ] + |))); + ("searcher", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::str::pattern::StrSearcherImpl", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::StrSearcher", + "searcher" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -7566,7 +8062,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::StrSearcher". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -7580,33 +8076,36 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "StrSearcher" |); - M.read (| Value.String "haystack" |); + M.read (| M.of_value (| Value.String "StrSearcher" |) |); + M.read (| M.of_value (| Value.String "haystack" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::StrSearcher", "haystack" - |)); - M.read (| Value.String "needle" |); + |) + |); + M.read (| M.of_value (| Value.String "needle" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::StrSearcher", "needle" - |)); - M.read (| Value.String "searcher" |); + |) + |); + M.read (| M.of_value (| Value.String "searcher" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::StrSearcher", "searcher" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -7644,7 +8143,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::StrSearcherImpl". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7664,20 +8163,23 @@ Module str. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::str::pattern::StrSearcherImpl::Empty" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::str::pattern::EmptyNeedle", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::StrSearcherImpl::Empty" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::str::pattern::EmptyNeedle", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -7690,20 +8192,23 @@ Module str. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::str::pattern::StrSearcherImpl::TwoWay" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::str::pattern::TwoWaySearcher", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::StrSearcherImpl::TwoWay" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::str::pattern::TwoWaySearcher", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))) ] |) @@ -7723,7 +8228,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::StrSearcherImpl". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -7752,8 +8257,8 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "Empty" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Empty" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -7776,8 +8281,8 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "TwoWay" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "TwoWay" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -7813,70 +8318,107 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::EmptyNeedle". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::pattern::EmptyNeedle" - [ - ("position", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::EmptyNeedle", - "position" - |) - ] - |)); - ("end_", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::EmptyNeedle", - "end" - |) - ] - |)); - ("is_match_fw", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "bool", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::EmptyNeedle", - "is_match_fw" - |) - ] - |)); - ("is_match_bw", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "bool", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::EmptyNeedle", - "is_match_bw" - |) - ] - |)); - ("is_finished", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "bool", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::EmptyNeedle", - "is_finished" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::pattern::EmptyNeedle" + [ + ("position", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::EmptyNeedle", + "position" + |) + ] + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::EmptyNeedle", + "end" + |) + ] + |))); + ("is_match_fw", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::EmptyNeedle", + "is_match_fw" + |) + ] + |))); + ("is_match_bw", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::EmptyNeedle", + "is_match_bw" + |) + ] + |))); + ("is_finished", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::EmptyNeedle", + "is_finished" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -7892,7 +8434,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::EmptyNeedle". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -7906,49 +8448,54 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "EmptyNeedle" |); - M.read (| Value.String "position" |); + M.read (| M.of_value (| Value.String "EmptyNeedle" |) |); + M.read (| M.of_value (| Value.String "position" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::EmptyNeedle", "position" - |)); - M.read (| Value.String "end" |); + |) + |); + M.read (| M.of_value (| Value.String "end" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::EmptyNeedle", "end" - |)); - M.read (| Value.String "is_match_fw" |); + |) + |); + M.read (| M.of_value (| Value.String "is_match_fw" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::EmptyNeedle", "is_match_fw" - |)); - M.read (| Value.String "is_match_bw" |); + |) + |); + M.read (| M.of_value (| Value.String "is_match_bw" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::EmptyNeedle", "is_match_bw" - |)); - M.read (| Value.String "is_finished" |); + |) + |); + M.read (| M.of_value (| Value.String "is_finished" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::EmptyNeedle", "is_finished" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -7991,7 +8538,7 @@ Module str. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ haystack; needle ] => ltac:(M.monadic @@ -7999,7 +8546,7 @@ Module str. let needle := M.alloc (| needle |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8013,66 +8560,93 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructRecord - "core::str::pattern::StrSearcher" - [ - ("haystack", M.read (| haystack |)); - ("needle", M.read (| needle |)); - ("searcher", - Value.StructTuple - "core::str::pattern::StrSearcherImpl::Empty" - [ - Value.StructRecord - "core::str::pattern::EmptyNeedle" - [ - ("position", Value.Integer Integer.Usize 0); - ("end_", - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| haystack |) ] - |)); - ("is_match_fw", Value.Bool true); - ("is_match_bw", Value.Bool true); - ("is_finished", Value.Bool false) - ] - ]) - ] - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - Value.StructRecord - "core::str::pattern::StrSearcher" - [ - ("haystack", M.read (| haystack |)); - ("needle", M.read (| needle |)); - ("searcher", - Value.StructTuple - "core::str::pattern::StrSearcherImpl::TwoWay" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::str::pattern::TwoWaySearcher", - "new", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "str", - "as_bytes", - [] - |), - [ M.read (| needle |) ] - |); - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| haystack |) ] - |) - ] - |) - ]) - ] + M.of_value (| + Value.StructRecord + "core::str::pattern::StrSearcher" + [ + ("haystack", A.to_value (M.read (| haystack |))); + ("needle", A.to_value (M.read (| needle |))); + ("searcher", + A.to_value + (M.of_value (| + Value.StructTuple + "core::str::pattern::StrSearcherImpl::Empty" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::pattern::EmptyNeedle" + [ + ("position", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "len", + [] + |), + [ M.read (| haystack |) ] + |))); + ("is_match_fw", + A.to_value (M.of_value (| Value.Bool true |))); + ("is_match_bw", + A.to_value (M.of_value (| Value.Bool true |))); + ("is_finished", + A.to_value (M.of_value (| Value.Bool false |))) + ] + |)) + ] + |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructRecord + "core::str::pattern::StrSearcher" + [ + ("haystack", A.to_value (M.read (| haystack |))); + ("needle", A.to_value (M.read (| needle |))); + ("searcher", + A.to_value + (M.of_value (| + Value.StructTuple + "core::str::pattern::StrSearcherImpl::TwoWay" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::str::pattern::TwoWaySearcher", + "new", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "as_bytes", + [] + |), + [ M.read (| needle |) ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "str", + "len", + [] + |), + [ M.read (| haystack |) ] + |) + ] + |)) + ] + |))) + ] + |) |))) ] |) @@ -8091,7 +8665,7 @@ Module str. self.haystack } *) - Definition haystack (τ : list Ty.t) (α : list Value.t) : M := + Definition haystack (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8158,7 +8732,7 @@ Module str. } } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8184,7 +8758,7 @@ Module str. let searcher := M.alloc (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8204,14 +8778,17 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::str::pattern::SearchStep::Done" - [] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Done" + [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let is_match := @@ -8229,14 +8806,15 @@ Module str. "core::str::pattern::EmptyNeedle", "is_match_fw" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), "core::str::pattern::EmptyNeedle", "is_match_fw" |) - |)) + |) + |) |) in let pos := M.copy (| @@ -8281,9 +8859,11 @@ Module str. "haystack" |) |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", M.read (| pos |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.read (| pos |))) ] + |) ] |) ] @@ -8302,9 +8882,14 @@ Module str. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Match" - [ M.read (| pos |); M.read (| pos |) ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Match" + [ + A.to_value (M.read (| pos |)); + A.to_value (M.read (| pos |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -8315,10 +8900,12 @@ Module str. "core::str::pattern::EmptyNeedle", "is_finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| - Value.StructTuple "core::str::pattern::SearchStep::Done" [] + M.of_value (| + Value.StructTuple "core::str::pattern::SearchStep::Done" [] + |) |))); fun γ => ltac:(M.monadic @@ -8339,6 +8926,7 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -8351,18 +8939,21 @@ Module str. |) |) in M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Reject" - [ - M.read (| pos |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| searcher |), - "core::str::pattern::EmptyNeedle", - "position" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Reject" + [ + A.to_value (M.read (| pos |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| searcher |), + "core::str::pattern::EmptyNeedle", + "position" + |) + |)) + ] + |) |))) ] |))); @@ -8377,22 +8968,22 @@ Module str. let searcher := M.alloc (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), "core::str::pattern::TwoWaySearcher", "position" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.path "str", "len", @@ -8407,7 +8998,8 @@ Module str. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8418,27 +9010,31 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::str::pattern::SearchStep::Done" - [] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Done" + [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let is_long := M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), "core::str::pattern::TwoWaySearcher", "memory" |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |) in M.match_operator (| M.alloc (| @@ -8499,15 +9095,15 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -8523,7 +9119,8 @@ Module str. |); M.read (| b |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8535,11 +9132,12 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -8551,7 +9149,7 @@ Module str. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -8580,9 +9178,11 @@ Module str. |) |) in M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Reject" - [ M.read (| a |); M.read (| b |) ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Reject" + [ A.to_value (M.read (| a |)); A.to_value (M.read (| b |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -8628,7 +9228,7 @@ Module str. } } *) - Definition next_match (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8684,12 +9284,20 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ M.read (| a |); M.read (| b |) ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |)) + ] + |) |) |) |) @@ -8700,14 +9308,18 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) @@ -8725,18 +9337,19 @@ Module str. let searcher := M.alloc (| γ0_0 |) in let is_long := M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), "core::str::pattern::TwoWaySearcher", "memory" |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8787,7 +9400,7 @@ Module str. |) ] |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |) |))); @@ -8834,7 +9447,7 @@ Module str. |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |))) @@ -8909,7 +9522,7 @@ Module str. } } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8935,7 +9548,7 @@ Module str. let searcher := M.alloc (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8955,14 +9568,17 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::str::pattern::SearchStep::Done" - [] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Done" + [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let is_match := @@ -8980,14 +9596,15 @@ Module str. "core::str::pattern::EmptyNeedle", "is_match_bw" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), "core::str::pattern::EmptyNeedle", "is_match_bw" |) - |)) + |) + |) |) in let end_ := M.copy (| @@ -9032,9 +9649,11 @@ Module str. "haystack" |) |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| end_ |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| end_ |))) ] + |) ] |) ] @@ -9053,9 +9672,14 @@ Module str. Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Match" - [ M.read (| end_ |); M.read (| end_ |) ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Match" + [ + A.to_value (M.read (| end_ |)); + A.to_value (M.read (| end_ |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -9066,10 +9690,12 @@ Module str. "core::str::pattern::EmptyNeedle", "is_finished" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in M.alloc (| - Value.StructTuple "core::str::pattern::SearchStep::Done" [] + M.of_value (| + Value.StructTuple "core::str::pattern::SearchStep::Done" [] + |) |))); fun γ => ltac:(M.monadic @@ -9090,6 +9716,7 @@ Module str. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -9102,18 +9729,21 @@ Module str. |) |) in M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Reject" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| searcher |), - "core::str::pattern::EmptyNeedle", - "end" - |) - |); - M.read (| end_ |) - ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Reject" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| searcher |), + "core::str::pattern::EmptyNeedle", + "end" + |) + |)); + A.to_value (M.read (| end_ |)) + ] + |) |))) ] |))); @@ -9128,22 +9758,23 @@ Module str. let searcher := M.alloc (| γ0_0 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), "core::str::pattern::TwoWaySearcher", "end" |) - |)) - (Value.Integer Integer.Usize 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9154,27 +9785,31 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::str::pattern::SearchStep::Done" - [] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Done" + [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let is_long := M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), "core::str::pattern::TwoWaySearcher", "memory" |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |) in M.match_operator (| M.alloc (| @@ -9235,15 +9870,15 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "str", "is_char_boundary", @@ -9259,7 +9894,8 @@ Module str. |); M.read (| a |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9271,11 +9907,12 @@ Module str. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -9287,7 +9924,7 @@ Module str. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -9316,9 +9953,11 @@ Module str. |) |) in M.alloc (| - Value.StructTuple - "core::str::pattern::SearchStep::Reject" - [ M.read (| a |); M.read (| b |) ] + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Reject" + [ A.to_value (M.read (| a |)); A.to_value (M.read (| b |)) ] + |) |))); fun γ => ltac:(M.monadic @@ -9363,7 +10002,7 @@ Module str. } } *) - Definition next_match_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_match_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9419,12 +10058,20 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.Tuple - [ M.read (| a |); M.read (| b |) ] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| a |)); + A.to_value (M.read (| b |)) + ] + |)) + ] + |) |) |) |) @@ -9435,14 +10082,18 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) @@ -9460,18 +10111,19 @@ Module str. let searcher := M.alloc (| γ0_0 |) in let is_long := M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), "core::str::pattern::TwoWaySearcher", "memory" |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9522,7 +10174,7 @@ Module str. |) ] |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |) |))); @@ -9569,7 +10221,7 @@ Module str. |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |))) @@ -9615,103 +10267,161 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::TwoWaySearcher". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::str::pattern::TwoWaySearcher" - [ - ("crit_pos", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "crit_pos" - |) - ] - |)); - ("crit_pos_back", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "crit_pos_back" - |) - ] - |)); - ("period", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "period" - |) - ] - |)); - ("byteset", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "u64", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "byteset" - |) - ] - |)); - ("position", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "position" - |) - ] - |)); - ("end_", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "end" - |) - ] - |)); - ("memory", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "memory" - |) - ] - |)); - ("memory_back", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "usize", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "memory_back" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::str::pattern::TwoWaySearcher" + [ + ("crit_pos", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "crit_pos" + |) + ] + |))); + ("crit_pos_back", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "crit_pos_back" + |) + ] + |))); + ("period", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "period" + |) + ] + |))); + ("byteset", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "u64", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "byteset" + |) + ] + |))); + ("position", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "position" + |) + ] + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "end" + |) + ] + |))); + ("memory", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "memory" + |) + ] + |))); + ("memory_back", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "memory_back" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -9727,7 +10437,7 @@ Module str. Definition Self : Ty.t := Ty.path "core::str::pattern::TwoWaySearcher". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9737,86 +10447,107 @@ Module str. let names := M.alloc (| M.alloc (| - Value.Array - [ - M.read (| Value.String "crit_pos" |); - M.read (| Value.String "crit_pos_back" |); - M.read (| Value.String "period" |); - M.read (| Value.String "byteset" |); - M.read (| Value.String "position" |); - M.read (| Value.String "end" |); - M.read (| Value.String "memory" |); - M.read (| Value.String "memory_back" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "crit_pos" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "crit_pos_back" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "period" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "byteset" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "position" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "end" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "memory" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "memory_back" |) |)) + ] + |) |) |) in let values := M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "crit_pos" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "crit_pos_back" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "period" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "byteset" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "position" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "end" - |)); - (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "memory" - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "memory_back" - |) - |)) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "crit_pos" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "crit_pos_back" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "period" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "byteset" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "position" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "end" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "memory" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "memory_back" + |) + |) + |)) + ] + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -9827,8 +10558,8 @@ Module str. |), [ M.read (| f |); - M.read (| Value.String "TwoWaySearcher" |); - (* Unsize *) M.pointer_coercion (M.read (| names |)); + M.read (| M.of_value (| Value.String "TwoWaySearcher" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| names |) |); M.read (| values |) ] |) @@ -9917,7 +10648,7 @@ Module str. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ needle; end_ ] => ltac:(M.monadic @@ -9932,7 +10663,7 @@ Module str. "maximal_suffix", [] |), - [ M.read (| needle |); Value.Bool false ] + [ M.read (| needle |); M.of_value (| Value.Bool false |) ] |) |), [ @@ -9950,7 +10681,7 @@ Module str. "maximal_suffix", [] |), - [ M.read (| needle |); Value.Bool true ] + [ M.read (| needle |); M.of_value (| Value.Bool true |) ] |) |), [ @@ -9962,16 +10693,17 @@ Module str. let period_true := M.copy (| γ0_1 |) in M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| crit_pos_false |)) - (M.read (| crit_pos_true |)) + BinOp.Pure.gt (| + M.read (| crit_pos_false |), + M.read (| crit_pos_true |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9979,15 +10711,24 @@ Module str. Value.Bool true |) in M.alloc (| - Value.Tuple - [ M.read (| crit_pos_false |); M.read (| period_false |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| crit_pos_false |)); + A.to_value (M.read (| period_false |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ M.read (| crit_pos_true |); M.read (| period_true |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| crit_pos_true |)); + A.to_value (M.read (| period_true |)) + ] + |) |))) ] |), @@ -9999,7 +10740,7 @@ Module str. let crit_pos := M.copy (| γ0_0 |) in let period := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10036,9 +10777,15 @@ Module str. |), [ M.read (| needle |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| crit_pos |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| crit_pos |))) + ] + |) ] |); M.call_closure (| @@ -10057,16 +10804,22 @@ Module str. |), [ M.read (| needle |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| period |)); - ("end_", - BinOp.Panic.add (| - M.read (| period |), - M.read (| crit_pos |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| period |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| period |), + M.read (| crit_pos |) + |))) + ] + |) ] |) ] @@ -10080,6 +10833,7 @@ Module str. let crit_pos_back := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -10104,7 +10858,7 @@ Module str. [ M.read (| needle |); M.read (| period |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |); M.call_closure (| @@ -10117,7 +10871,7 @@ Module str. [ M.read (| needle |); M.read (| period |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |) ] @@ -10125,116 +10879,144 @@ Module str. |) |) in M.alloc (| - Value.StructRecord - "core::str::pattern::TwoWaySearcher" - [ - ("crit_pos", M.read (| crit_pos |)); - ("crit_pos_back", M.read (| crit_pos_back |)); - ("period", M.read (| period |)); - ("byteset", - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::str::pattern::TwoWaySearcher", - "byteset_create", - [] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply - (Ty.path "slice") - [ Ty.path "u8" ], - [ - Ty.apply - (Ty.path - "core::ops::range::RangeTo") - [ Ty.path "usize" ] - ], - "index", + M.of_value (| + Value.StructRecord + "core::str::pattern::TwoWaySearcher" + [ + ("crit_pos", + A.to_value (M.read (| crit_pos |))); + ("crit_pos_back", + A.to_value (M.read (| crit_pos_back |))); + ("period", A.to_value (M.read (| period |))); + ("byteset", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::str::pattern::TwoWaySearcher", + "byteset_create", [] |), [ - M.read (| needle |); - Value.StructRecord - "core::ops::range::RangeTo" - [ ("end_", M.read (| period |)) ] - ] - |) - ] - |)); - ("position", Value.Integer Integer.Usize 0); - ("end_", M.read (| end_ |)); - ("memory", Value.Integer Integer.Usize 0); - ("memory_back", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "slice") - [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| needle |) ] - |)) - ] - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - Value.StructRecord - "core::str::pattern::TwoWaySearcher" - [ - ("crit_pos", M.read (| crit_pos |)); - ("crit_pos_back", M.read (| crit_pos |)); - ("period", - BinOp.Panic.add (| - M.call_closure (| - M.get_function (| - "core::cmp::max", - [ Ty.path "usize" ] - |), - [ - M.read (| crit_pos |); - BinOp.Panic.sub (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::ops::index::Index", Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", + [ + Ty.apply + (Ty.path + "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", [] |), - [ M.read (| needle |) ] + [ + M.read (| needle |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.read (| period |))) + ] + |) + ] + |) + ] + |))); + ("position", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| end_ |))); + ("memory", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("memory_back", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| needle |) ] + |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructRecord + "core::str::pattern::TwoWaySearcher" + [ + ("crit_pos", + A.to_value (M.read (| crit_pos |))); + ("crit_pos_back", + A.to_value (M.read (| crit_pos |))); + ("period", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.call_closure (| + M.get_function (| + "core::cmp::max", + [ Ty.path "usize" ] |), - M.read (| crit_pos |) - |) - ] - |), - Value.Integer Integer.Usize 1 - |)); - ("byteset", - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::str::pattern::TwoWaySearcher", - "byteset_create", - [] - |), - [ M.read (| needle |) ] - |)); - ("position", Value.Integer Integer.Usize 0); - ("end_", M.read (| end_ |)); - ("memory", - M.read (| - M.get_constant (| "core::num::MAX" |) - |)); - ("memory_back", - M.read (| - M.get_constant (| "core::num::MAX" |) - |)) - ] + [ + M.read (| crit_pos |); + BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| needle |) ] + |), + M.read (| crit_pos |) + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |))); + ("byteset", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::str::pattern::TwoWaySearcher", + "byteset_create", + [] + |), + [ M.read (| needle |) ] + |))); + ("position", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| end_ |))); + ("memory", + A.to_value + (M.read (| + M.get_constant (| "core::num::MAX" |) + |))); + ("memory_back", + A.to_value + (M.read (| + M.get_constant (| "core::num::MAX" |) + |))) + ] + |) |))) ] |))) @@ -10255,7 +11037,7 @@ Module str. bytes.iter().fold(0, |a, &b| (1 << (b & 0x3f)) | a) } *) - Definition byteset_create (τ : list Ty.t) (α : list Value.t) : M := + Definition byteset_create (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ bytes ] => ltac:(M.monadic @@ -10282,9 +11064,9 @@ Module str. |), [ M.read (| bytes |) ] |); - Value.Integer Integer.U64 0; - M.closure - (fun γ => + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1 ] => @@ -10301,20 +11083,23 @@ Module str. ltac:(M.monadic (let γ := M.read (| γ |) in let b := M.copy (| γ |) in - BinOp.Pure.bit_or - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, - BinOp.Pure.bit_and - (M.read (| b |)) - (Value.Integer Integer.U8 63) - |)) - (M.read (| a |)))) + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + BinOp.Pure.bit_and (| + M.read (| b |), + M.of_value (| Value.Integer 63 |) + |) + |), + M.read (| a |) + |))) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -10328,15 +11113,15 @@ Module str. (self.byteset >> ((byte & 0x3f) as usize)) & 1 != 0 } *) - Definition byteset_contains (τ : list Ty.t) (α : list Value.t) : M := + Definition byteset_contains (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; byte ] => ltac:(M.monadic (let self := M.alloc (| self |) in let byte := M.alloc (| byte |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10344,10 +11129,14 @@ Module str. "byteset" |) |), - M.rust_cast (BinOp.Pure.bit_and (M.read (| byte |)) (Value.Integer Integer.U8 63)) - |)) - (Value.Integer Integer.U64 1)) - (Value.Integer Integer.U64 0))) + M.rust_cast (| + BinOp.Pure.bit_and (| M.read (| byte |), M.of_value (| Value.Integer 63 |) |) + |) + |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -10425,7 +11214,7 @@ Module str. } } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as S ], [ self; haystack; needle; long_period ] => ltac:(M.monadic @@ -10447,6 +11236,7 @@ Module str. let needle_last := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -10455,7 +11245,7 @@ Module str. |), [ M.read (| needle |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in M.alloc (| @@ -10476,6 +11266,7 @@ Module str. [ M.read (| haystack |); BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10550,7 +11341,7 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10569,15 +11360,16 @@ Module str. [] |), ltac:(M.monadic - (BinOp.Pure.ne - (M.read (| old_pos |)) - (M.read (| + (BinOp.Pure.ne (| + M.read (| old_pos |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "position" |) - |)))) + |) + |))) |) |)) in let _ := @@ -10612,27 +11404,29 @@ Module str. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::str::pattern::TwoWaySearcher", "byteset_contains", [] |), [ M.read (| self |); M.read (| tail_byte |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10652,6 +11446,7 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -10665,14 +11460,16 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (M.read (| long_period |)) + UnOp.Pure.not (| + M.read (| long_period |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10686,24 +11483,30 @@ Module str. "core::str::pattern::TwoWaySearcher", "memory" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.continue (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let start := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10762,20 +11565,23 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| start |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| needle |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| needle |) ] + |))) + ] + |) ] |) |), @@ -10819,25 +11625,28 @@ Module str. |) in let i := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_array_field (| M.read (| needle |), i |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_array_field (| M.read (| haystack |), M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10849,7 +11658,8 @@ Module str. |) |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10869,9 +11679,12 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| i |), M.read (| M.SubPointer.get_struct_record_field (| @@ -10881,16 +11694,18 @@ Module str. |) |) |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -10898,10 +11713,11 @@ Module str. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| long_period - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10917,17 +11733,21 @@ Module str. "core::str::pattern::TwoWaySearcher", "memory" |), - Value.Integer - Integer.Usize - 0 + M.of_value (| + Value.Integer 0 + |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -10937,19 +11757,21 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let start := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10959,7 +11781,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (M.SubPointer.get_struct_record_field (| @@ -11000,19 +11822,22 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", M.read (| start |)); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "crit_pos" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| start |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "crit_pos" + |) + |))) + ] + |) ] |) ] @@ -11062,25 +11887,28 @@ Module str. |) in let i := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_array_field (| M.read (| needle |), i |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_array_field (| M.read (| haystack |), M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11092,7 +11920,8 @@ Module str. |) |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11112,6 +11941,7 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| M.SubPointer.get_struct_record_field (| @@ -11125,7 +11955,9 @@ Module str. let _ := M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -11133,10 +11965,11 @@ Module str. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| long_period - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11153,6 +11986,7 @@ Module str. "memory" |), BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply @@ -11183,12 +12017,16 @@ Module str. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -11198,12 +12036,14 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -11225,6 +12065,7 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -11238,14 +12079,14 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (M.read (| long_period |)) + UnOp.Pure.not (| M.read (| long_period |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -11259,10 +12100,11 @@ Module str. "core::str::pattern::TwoWaySearcher", "memory" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.return_ (| @@ -11277,6 +12119,7 @@ Module str. [ M.read (| match_pos |); BinOp.Panic.add (| + Integer.Usize, M.read (| match_pos |), M.call_closure (| M.get_associated_function (| @@ -11375,7 +12218,7 @@ Module str. } } *) - Definition next_back (τ : list Ty.t) (α : list Value.t) : M := + Definition next_back (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as S ], [ self; haystack; needle; long_period ] => ltac:(M.monadic @@ -11462,7 +12305,7 @@ Module str. "core::str::pattern::TwoWaySearcher", "end" |), - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in M.return_ (| M.call_closure (| @@ -11474,7 +12317,7 @@ Module str. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| old_end |) ] |) @@ -11487,7 +12330,7 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11506,15 +12349,16 @@ Module str. [] |), ltac:(M.monadic - (BinOp.Pure.ne - (M.read (| old_end |)) - (M.read (| + (BinOp.Pure.ne (| + M.read (| old_end |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "end" |) - |)))) + |) + |))) |) |)) in let _ := @@ -11549,27 +12393,29 @@ Module str. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::str::pattern::TwoWaySearcher", "byteset_contains", [] |), [ M.read (| self |); M.read (| front_byte |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11589,6 +12435,7 @@ Module str. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -11602,14 +12449,16 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (M.read (| long_period |)) + UnOp.Pure.not (| + M.read (| long_period |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11634,22 +12483,28 @@ Module str. [ M.read (| needle |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.continue (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let crit := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11723,12 +12578,15 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", M.read (| crit |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| crit |))) + ] + |) ] |) ] @@ -11778,26 +12636,30 @@ Module str. |) in let i := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_array_field (| M.read (| needle |), i |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_array_field (| M.read (| haystack |), M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -11828,7 +12690,8 @@ Module str. |) |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11848,8 +12711,10 @@ Module str. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11864,7 +12729,9 @@ Module str. let _ := M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -11872,10 +12739,11 @@ Module str. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| long_period - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11911,12 +12779,16 @@ Module str. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -11926,19 +12798,21 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let needle_end := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11983,19 +12857,22 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::str::pattern::TwoWaySearcher", - "crit_pos_back" - |) - |)); - ("end_", M.read (| needle_end |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::str::pattern::TwoWaySearcher", + "crit_pos_back" + |) + |))); + ("end_", A.to_value (M.read (| needle_end |))) + ] + |) ] |) |), @@ -12039,26 +12916,30 @@ Module str. |) in let i := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_array_field (| M.read (| needle |), i |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_array_field (| M.read (| haystack |), M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -12089,7 +12970,8 @@ Module str. |) |) |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12109,6 +12991,7 @@ Module str. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.read (| M.SubPointer.get_struct_record_field (| @@ -12122,7 +13005,9 @@ Module str. let _ := M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -12130,10 +13015,11 @@ Module str. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| long_period - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12160,12 +13046,16 @@ Module str. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -12175,18 +13065,21 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let match_pos := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12214,6 +13107,7 @@ Module str. M.write (| β, BinOp.Panic.sub (| + Integer.Usize, M.read (| β |), M.call_closure (| M.get_associated_function (| @@ -12227,14 +13121,14 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not (M.read (| long_period |)) + UnOp.Pure.not (| M.read (| long_period |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -12257,8 +13151,9 @@ Module str. [ M.read (| needle |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.return_ (| @@ -12273,6 +13168,7 @@ Module str. [ M.read (| match_pos |); BinOp.Panic.add (| + Integer.Usize, M.read (| match_pos |), M.call_closure (| M.get_associated_function (| @@ -12332,22 +13228,22 @@ Module str. (left, period) } *) - Definition maximal_suffix (τ : list Ty.t) (α : list Value.t) : M := + Definition maximal_suffix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ arr; order_greater ] => ltac:(M.monadic (let arr := M.alloc (| arr |) in let order_greater := M.alloc (| order_greater |) in M.read (| - let left := M.alloc (| Value.Integer Integer.Usize 0 |) in - let right := M.alloc (| Value.Integer Integer.Usize 1 |) in - let offset := M.alloc (| Value.Integer Integer.Usize 0 |) in - let period := M.alloc (| Value.Integer Integer.Usize 1 |) in + let left := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let right := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let offset := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let period := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12361,7 +13257,11 @@ Module str. |), [ M.read (| arr |); - BinOp.Panic.add (| M.read (| right |), M.read (| offset |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| right |), + M.read (| offset |) + |) ] |) |) in @@ -12378,12 +13278,16 @@ Module str. M.SubPointer.get_array_field (| M.read (| arr |), M.alloc (| - BinOp.Panic.add (| M.read (| left |), M.read (| offset |) |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| left |), + M.read (| offset |) + |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12392,13 +13296,13 @@ Module str. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| a |)) (M.read (| b |)), + BinOp.Pure.lt (| M.read (| a |), M.read (| b |) |), ltac:(M.monadic - (UnOp.Pure.not (M.read (| order_greater |)))) + (UnOp.Pure.not (| M.read (| order_greater |) |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.gt (M.read (| a |)) (M.read (| b |)), + BinOp.Pure.gt (| M.read (| a |), M.read (| b |) |), ltac:(M.monadic (M.read (| order_greater |))) |))) |) @@ -12413,31 +13317,38 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), BinOp.Panic.add (| + Integer.Usize, M.read (| offset |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in - let _ := M.write (| offset, Value.Integer Integer.Usize 0 |) in + let _ := + M.write (| offset, M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| period, - BinOp.Panic.sub (| M.read (| right |), M.read (| left |) |) + BinOp.Panic.sub (| + Integer.Usize, + M.read (| right |), + M.read (| left |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| a |)) (M.read (| b |)) + BinOp.Pure.eq (| M.read (| a |), M.read (| b |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -12445,19 +13356,21 @@ Module str. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.add (| + BinOp.Pure.eq (| + BinOp.Panic.add (| + Integer.Usize, M.read (| offset |), - Value.Integer Integer.Usize 1 - |)) - (M.read (| period |)) + M.of_value (| Value.Integer 1 |) + |), + M.read (| period |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12469,19 +13382,21 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), BinOp.Panic.add (| + Integer.Usize, M.read (| offset |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in let _ := M.write (| offset, - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -12489,11 +13404,12 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -12504,15 +13420,22 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := - M.write (| offset, Value.Integer Integer.Usize 0 |) in + M.write (| + offset, + M.of_value (| Value.Integer 0 |) + |) in let _ := - M.write (| period, Value.Integer Integer.Usize 1 |) in - M.alloc (| Value.Tuple [] |))) + M.write (| + period, + M.of_value (| Value.Integer 1 |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -12524,14 +13447,18 @@ Module str. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.Tuple [ M.read (| left |); M.read (| period |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| left |)); A.to_value (M.read (| period |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -12579,7 +13506,7 @@ Module str. left } *) - Definition reverse_maximal_suffix (τ : list Ty.t) (α : list Value.t) : M := + Definition reverse_maximal_suffix (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ arr; known_period; order_greater ] => ltac:(M.monadic @@ -12587,10 +13514,10 @@ 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 Integer.Usize 0 |) in - let right := M.alloc (| Value.Integer Integer.Usize 1 |) in - let offset := M.alloc (| Value.Integer Integer.Usize 0 |) in - let period := M.alloc (| Value.Integer Integer.Usize 1 |) in + let left := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let right := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let offset := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let period := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let n := M.alloc (| M.call_closure (| @@ -12606,16 +13533,21 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (BinOp.Panic.add (| M.read (| right |), M.read (| offset |) |)) - (M.read (| n |)) + BinOp.Pure.lt (| + BinOp.Panic.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 @@ -12625,10 +13557,13 @@ Module str. M.read (| arr |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| - Value.Integer Integer.Usize 1, + Integer.Usize, + M.of_value (| Value.Integer 1 |), M.read (| right |) |), M.read (| offset |) @@ -12643,10 +13578,13 @@ Module str. M.read (| arr |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| n |), BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| - Value.Integer Integer.Usize 1, + Integer.Usize, + M.of_value (| Value.Integer 1 |), M.read (| left |) |), M.read (| offset |) @@ -12657,7 +13595,7 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12666,13 +13604,16 @@ Module str. (M.alloc (| LogicalOp.or (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| a |)) (M.read (| b |)), + BinOp.Pure.lt (| M.read (| a |), M.read (| b |) |), ltac:(M.monadic - (UnOp.Pure.not (M.read (| order_greater |)))) + (UnOp.Pure.not (| M.read (| order_greater |) |))) |), ltac:(M.monadic (LogicalOp.and (| - BinOp.Pure.gt (M.read (| a |)) (M.read (| b |)), + BinOp.Pure.gt (| + M.read (| a |), + M.read (| b |) + |), ltac:(M.monadic (M.read (| order_greater |))) |))) |) @@ -12687,35 +13628,41 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), BinOp.Panic.add (| + Integer.Usize, M.read (| offset |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in let _ := - M.write (| offset, Value.Integer Integer.Usize 0 |) in + M.write (| offset, M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| period, BinOp.Panic.sub (| + Integer.Usize, M.read (| right |), M.read (| left |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| a |)) (M.read (| b |)) + BinOp.Pure.eq (| + M.read (| a |), + M.read (| b |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12723,19 +13670,21 @@ Module str. Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.add (| + BinOp.Pure.eq (| + BinOp.Panic.add (| + Integer.Usize, M.read (| offset |), - Value.Integer Integer.Usize 1 - |)) - (M.read (| period |)) + M.of_value (| Value.Integer 1 |) + |), + M.read (| period |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12747,19 +13696,23 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), BinOp.Panic.add (| + Integer.Usize, M.read (| offset |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in let _ := M.write (| offset, - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -12767,11 +13720,14 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => @@ -12782,36 +13738,38 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := M.write (| offset, - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) |) in let _ := M.write (| period, - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| period |)) - (M.read (| known_period |)) + BinOp.Pure.eq (| + M.read (| period |), + M.read (| known_period |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12819,7 +13777,8 @@ Module str. Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -12829,7 +13788,7 @@ Module str. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -12838,26 +13797,28 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| period |)) - (M.read (| known_period |))) + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| period |), + M.read (| known_period |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12870,17 +13831,21 @@ Module str. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: period <= known_period" + M.of_value (| + Value.String + "assertion failed: period <= known_period" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in left @@ -12915,21 +13880,24 @@ Module str. false } *) - Definition use_early_reject (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Bool false)) | _, _ => M.impossible end. + Definition use_early_reject (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Bool false |))) + | _, _ => M.impossible + end. (* fn rejecting(_a: usize, _b: usize) -> Self::Output { None } *) - Definition rejecting (τ : list Ty.t) (α : list Value.t) : M := + Definition rejecting (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ _a; _b ] => ltac:(M.monadic (let _a := M.alloc (| _a |) in let _b := M.alloc (| _b |) in - Value.StructTuple "core::option::Option::None" [])) + M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) | _, _ => M.impossible end. @@ -12938,15 +13906,22 @@ Module str. Some((a, b)) } *) - Definition matching (τ : list Ty.t) (α : list Value.t) : M := + Definition matching (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - Value.StructTuple - "core::option::Option::Some" - [ Value.Tuple [ M.read (| a |); M.read (| b |) ] ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple [ A.to_value (M.read (| a |)); A.to_value (M.read (| b |)) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -12983,23 +13958,28 @@ Module str. true } *) - Definition use_early_reject (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Bool true)) | _, _ => M.impossible end. + Definition use_early_reject (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Bool true |))) + | _, _ => M.impossible + end. (* fn rejecting(a: usize, b: usize) -> Self::Output { SearchStep::Reject(a, b) } *) - Definition rejecting (τ : list Ty.t) (α : list Value.t) : M := + Definition rejecting (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - Value.StructTuple - "core::str::pattern::SearchStep::Reject" - [ M.read (| a |); M.read (| b |) ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Reject" + [ A.to_value (M.read (| a |)); A.to_value (M.read (| b |)) ] + |))) | _, _ => M.impossible end. @@ -13008,15 +13988,17 @@ Module str. SearchStep::Match(a, b) } *) - Definition matching (τ : list Ty.t) (α : list Value.t) : M := + Definition matching (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - Value.StructTuple - "core::str::pattern::SearchStep::Match" - [ M.read (| a |); M.read (| b |) ])) + M.of_value (| + Value.StructTuple + "core::str::pattern::SearchStep::Match" + [ A.to_value (M.read (| a |)); A.to_value (M.read (| b |)) ] + |))) | _, _ => M.impossible end. @@ -13158,7 +14140,7 @@ Module str. Some(result) } *) - Definition simd_contains (τ : list Ty.t) (α : list Value.t) : M := + Definition simd_contains (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ needle; haystack ] => ltac:(M.monadic @@ -13183,33 +14165,35 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.gt - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |)) - (Value.Integer Integer.Usize 1)) + |), + M.of_value (| Value.Integer 1 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13222,29 +14206,33 @@ Module str. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: needle.len() > 1" + M.of_value (| + Value.String "assertion failed: needle.len() > 1" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let first_probe := M.copy (| M.SubPointer.get_array_field (| M.read (| needle |), - M.alloc (| Value.Integer Integer.Usize 0 |) + M.alloc (| M.of_value (| Value.Integer 0 |) |) |) |) in let last_byte_offset := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -13253,33 +14241,34 @@ Module str. |), [ M.read (| needle |) ] |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in let second_probe_offset := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |)) - (Value.Integer Integer.Usize 2) + |), + M.of_value (| Value.Integer 2 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.Usize 1 |))); + M.alloc (| M.of_value (| Value.Integer 1 |) |))); fun γ => ltac:(M.monadic (M.match_operator (| @@ -13300,41 +14289,45 @@ Module str. |), [ M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.call_closure (| - M.get_associated_function (| - Ty.path "usize", - "saturating_sub", - [] - |), - [ - M.call_closure (| + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_sub", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| needle |) ] + |); + M.of_value (| Value.Integer 4 |) + ] + |))); + ("end_", + A.to_value + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |); - Value.Integer Integer.Usize 4 - ] - |)); - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| needle |) ] - |)) - ] + |))) + ] + |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -13345,18 +14338,20 @@ Module str. ltac:(M.monadic (let γ := M.read (| γ |) in let idx := M.copy (| γ |) in - BinOp.Pure.ne - (M.read (| + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_array_field (| M.read (| needle |), idx |) - |)) - (M.read (| first_probe |)))) + |), + M.read (| first_probe |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -13378,28 +14373,30 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| haystack |) ] - |)) - (BinOp.Panic.add (| + |), + BinOp.Panic.add (| + Integer.Usize, M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) |), M.read (| last_byte_offset |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13407,99 +14404,106 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::slice::iter::Windows") - [ Ty.path "u8" ], - [], - "any", - [ - Ty.function + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Windows") + [ Ty.path "u8" ], + [], + "any", [ - Ty.tuple + Ty.function [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ] + ] ] ] + (Ty.path "bool") ] - (Ty.path "bool") - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "windows", - [] - |), - [ - M.read (| haystack |); + |), + [ + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", + "windows", [] |), - [ M.read (| needle |) ] + [ + M.read (| haystack |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| needle |) ] + |) + ] |) - ] - |) - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let c := M.copy (| γ |) in - M.call_closure (| - M.get_trait_method (| - "core::cmp::PartialEq", - Ty.apply - (Ty.path "&") - [ + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let c := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", Ty.apply - (Ty.path "slice") - [ Ty.path "u8" ] - ], - [ - Ty.apply - (Ty.path "&") + (Ty.path "&") + [ + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ] + ], [ Ty.apply - (Ty.path "slice") - [ Ty.path "u8" ] - ] - ], - "eq", - [] - |), - [ c; needle ] - |))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - ] + (Ty.path "&") + [ + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ] + ] + ], + "eq", + [] + |), + [ c; needle ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let first_probe := @@ -13543,16 +14547,18 @@ Module str. |), [ M.read (| needle |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.of_value (| Value.Integer 1 |))) ] + |) ] |) |) in let check_mask := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0; α1; α2 ] => @@ -13578,7 +14584,9 @@ Module str. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic @@ -13592,14 +14600,18 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.Bool false + M.of_value (| + Value.Bool false + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let mask := M.copy (| mask |) in @@ -13607,18 +14619,21 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| mask |)) - (Value.Integer - Integer.U16 - 0) + BinOp.Pure.ne (| + M.read (| mask |), + M.of_value (| + Value.Integer 0 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13639,16 +14654,19 @@ Module str. let offset := M.alloc (| BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.add (| + Integer.Usize, M.read (| idx |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| trailing - |)) + |) + |) |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in let _ := @@ -13693,45 +14711,53 @@ Module str. M.read (| haystack |); - Value.StructRecord - "core::ops::range::RangeFrom" - [ - ("start", - M.read (| - offset - |)) - ] - ] - |); - Value.StructRecord - "core::ops::range::RangeTo" - [ - ("end_", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "slice") - [ - Ty.path - "u8" - ], - "len", - [] - |), + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" [ - M.read (| - trimmed_needle - |) + ("start", + A.to_value + (M.read (| + offset + |))) ] - |)) + |) ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + Ty.path + "u8" + ], + "len", + [] + |), + [ + M.read (| + trimmed_needle + |) + ] + |))) + ] + |) ] |) |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -13763,8 +14789,10 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.Bool - true + M.of_value (| + Value.Bool + true + |) |) |) |) @@ -13772,7 +14800,9 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -13780,20 +14810,24 @@ Module str. let β := mask in M.write (| β, - BinOp.Pure.bit_and - (M.read (| β |)) - (UnOp.Pure.not - (BinOp.Panic.shl (| - Value.Integer - Integer.U16 - 1, + BinOp.Pure.bit_and (| + M.read (| β |), + UnOp.Pure.not (| + BinOp.Panic.shl (| + M.of_value (| + Value.Integer 1 + |), M.read (| trailing |) - |))) + |) + |) + |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))); fun γ => ltac:(M.monadic @@ -13809,7 +14843,9 @@ Module str. |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |) |) |) @@ -13817,7 +14853,9 @@ Module str. ] |))) |) in - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |))) ] @@ -13827,12 +14865,13 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let test_chunk := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -14013,8 +15052,8 @@ Module str. |) in let mask := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::core_simd::masks::Mask") @@ -14023,7 +15062,8 @@ Module str. [] |), [ M.read (| both |) ] - |)) + |) + |) |) in M.return_ (| M.read (| mask |) |) |) @@ -14031,15 +15071,16 @@ Module str. ] |) | _ => M.impossible (||) - end)) + end) + |) |) in - let i := M.alloc (| Value.Integer Integer.Usize 0 |) in - let result := M.alloc (| Value.Bool false |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let result := M.alloc (| M.of_value (| Value.Bool false |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14047,13 +15088,16 @@ Module str. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (BinOp.Panic.add (| + 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 (| M.get_constant (| "core::str::pattern::simd_contains::UNROLL" @@ -14063,16 +15107,17 @@ Module str. M.get_constant (| "core::core_simd::vector::LEN" |) |) |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| haystack |) ] - |)), - ltac:(M.monadic (UnOp.Pure.not (M.read (| result |)))) + |) + |), + ltac:(M.monadic (UnOp.Pure.not (| M.read (| result |) |))) |) |)) in let _ := @@ -14080,7 +15125,8 @@ Module str. M.read (| γ |), Value.Bool true |) in - let masks := M.alloc (| repeat (Value.Integer Integer.U16 0) 4 |) in + let masks := + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 4 |) |) in let _ := M.use (M.match_operator (| @@ -14090,23 +15136,27 @@ Module str. "core::iter::traits::collect::IntoIterator", Ty.apply (Ty.path "core::ops::range::Range") - [ Ty.path "usize" ], - [], - "into_iter", - [] - |), - [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.get_constant (| - "core::str::pattern::simd_contains::UNROLL" - |) - |)) - ] + [ Ty.path "usize" ], + [], + "into_iter", + [] + |), + [ + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.get_constant (| + "core::str::pattern::simd_contains::UNROLL" + |) + |))) + ] + |) ] |) |), @@ -14167,27 +15217,34 @@ Module str. |), [ test_chunk; - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| i |), - BinOp.Panic.mul (| - M.read (| j |), - M.read (| - M.get_constant (| - "core::core_simd::vector::LEN" + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + BinOp.Panic.mul (| + Integer.Usize, + M.read (| j |), + M.read (| + M.get_constant (| + "core::core_simd::vector::LEN" + |) + |) |) - |) - |) - |) - ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -14206,17 +15263,21 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.get_constant (| - "core::str::pattern::simd_contains::UNROLL" - |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.get_constant (| + "core::str::pattern::simd_contains::UNROLL" + |) + |))) + ] + |) ] |) |), @@ -14267,18 +15328,21 @@ Module str. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| mask |)) - (Value.Integer - Integer.U16 - 0) + BinOp.Pure.ne (| + M.read (| mask |), + M.of_value (| + Value.Integer 0 + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14289,9 +15353,9 @@ Module str. let β := result in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| β |), + M.call_closure (| M.get_trait_method (| "core::ops::function::Fn", Ty.function @@ -14317,34 +15381,52 @@ Module str. |), [ check_mask; - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| i |), - BinOp.Panic.mul (| - M.read (| j |), - M.read (| - M.get_constant (| - "core::core_simd::vector::LEN" + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + BinOp.Panic.mul (| + Integer.Usize, + M.read (| + j + |), + M.read (| + M.get_constant (| + "core::core_simd::vector::LEN" + |) + |) |) - |) - |) - |); - M.read (| mask |); - M.read (| result |) - ] + |)); + A.to_value + (M.read (| + mask + |)); + A.to_value + (M.read (| + result + |)) + ] + |) ] - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -14353,8 +15435,10 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), BinOp.Panic.mul (| + Integer.Usize, M.read (| M.get_constant (| "core::str::pattern::simd_contains::UNROLL" @@ -14366,7 +15450,7 @@ Module str. |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -14376,7 +15460,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -14387,7 +15471,7 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14395,25 +15479,28 @@ Module str. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (BinOp.Panic.add (| + BinOp.Pure.lt (| + BinOp.Panic.add (| + Integer.Usize, BinOp.Panic.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.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| haystack |) ] - |)), - ltac:(M.monadic (UnOp.Pure.not (M.read (| result |)))) + |) + |), + ltac:(M.monadic (UnOp.Pure.not (| M.read (| result |) |))) |) |)) in let _ := @@ -14431,21 +15518,25 @@ Module str. "call", [] |), - [ test_chunk; Value.Tuple [ M.read (| i |) ] ] + [ + test_chunk; + M.of_value (| Value.Tuple [ A.to_value (M.read (| i |)) ] |) + ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| mask |)) - (Value.Integer Integer.U16 0) + BinOp.Pure.ne (| + M.read (| mask |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14456,9 +15547,9 @@ Module str. let β := result in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| β |), + M.call_closure (| M.get_trait_method (| "core::ops::function::Fn", Ty.function @@ -14484,17 +15575,22 @@ Module str. |), [ check_mask; - Value.Tuple - [ - M.read (| i |); - M.read (| mask |); - M.read (| result |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| i |)); + A.to_value (M.read (| mask |)); + A.to_value (M.read (| result |)) + ] + |) ] - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -14502,11 +15598,12 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -14516,7 +15613,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -14526,7 +15623,9 @@ Module str. let i := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -14550,19 +15649,22 @@ Module str. "call", [] |), - [ test_chunk; Value.Tuple [ M.read (| i |) ] ] + [ test_chunk; M.of_value (| Value.Tuple [ A.to_value (M.read (| i |)) ] |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| mask |)) (Value.Integer Integer.U16 0) + BinOp.Pure.ne (| + M.read (| mask |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14570,9 +15672,9 @@ Module str. let β := result in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + M.read (| β |), + M.call_closure (| M.get_trait_method (| "core::ops::function::Fn", Ty.function @@ -14585,24 +15687,37 @@ Module str. |), [ check_mask; - Value.Tuple - [ M.read (| i |); M.read (| mask |); M.read (| result |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| i |)); + A.to_value (M.read (| mask |)); + A.to_value (M.read (| result |)) + ] + |) ] - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| result |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| result |)) ] + |) + |) |))) |))) | _, _ => M.impossible end. Module simd_contains. - Definition value_UNROLL : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 4 |))). + Definition value_UNROLL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4 |) |))). End simd_contains. (* @@ -14665,7 +15780,7 @@ Module str. } } *) - Definition small_slice_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition small_slice_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; y ] => ltac:(M.monadic @@ -14676,39 +15791,43 @@ Module str. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| x |) ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| y |) ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| x |) ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| y |) ] + |) + |)) + ] + |) |), [ fun γ => @@ -14718,17 +15837,19 @@ Module str. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14740,9 +15861,11 @@ Module str. M.read (| let kind := M.alloc (| - Value.StructTuple - "core::panicking::AssertKind::Eq" - [] + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) |) in M.alloc (| M.call_closure (| @@ -14754,43 +15877,48 @@ Module str. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.call_closure (| + BinOp.Pure.lt (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| x |) ] - |)) - (Value.Integer Integer.Usize 4) + |), + M.of_value (| Value.Integer 4 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14909,16 +16037,19 @@ Module str. let γ1_1 := M.read (| γ1_1 |) in let b2 := M.copy (| γ1_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| b1 |)) - (M.read (| b2 |)) + BinOp.Pure.ne (| + M.read (| b1 |), + M.read (| b2 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14929,50 +16060,58 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.Bool false + M.of_value (| + Value.Bool false + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - M.return_ (| Value.Bool true |) + M.return_ (| M.of_value (| Value.Bool true |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "as_ptr", - [] - |), - [ M.read (| x |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "as_ptr", - [] - |), - [ M.read (| y |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ M.read (| x |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ M.read (| y |) ] + |)) + ] + |) |), [ fun γ => @@ -14983,51 +16122,57 @@ Module str. let py := M.copy (| γ0_1 |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ Ty.path "u8" ], - "add", - [] - |), - [ - M.read (| px |); - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| x |) ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "add", + [] |), - Value.Integer Integer.Usize 4 - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "*const") [ Ty.path "u8" ], - "add", - [] - |), - [ - M.read (| py |); - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "u8" ], - "len", - [] - |), - [ M.read (| y |) ] + [ + M.read (| px |); + BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| x |) ] + |), + M.of_value (| Value.Integer 4 |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "add", + [] |), - Value.Integer Integer.Usize 4 - |) - ] - |) - ] + [ + M.read (| py |); + BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| y |) ] + |), + M.of_value (| Value.Integer 4 |) + |) + ] + |)) + ] + |) |), [ fun γ => @@ -15040,16 +16185,17 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| px |)) - (M.read (| pxend |)) + BinOp.Pure.lt (| + M.read (| px |), + M.read (| pxend |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -15064,7 +16210,7 @@ Module str. "read_unaligned", [] |), - [ M.rust_cast (M.read (| px |)) ] + [ M.rust_cast (| M.read (| px |) |) ] |) |) in let vy := @@ -15075,21 +16221,22 @@ Module str. "read_unaligned", [] |), - [ M.rust_cast (M.read (| py |)) ] + [ M.rust_cast (| M.read (| py |) |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| vx |)) - (M.read (| vy |)) + BinOp.Pure.ne (| + M.read (| vx |), + M.read (| vy |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -15099,13 +16246,17 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := @@ -15117,7 +16268,9 @@ Module str. "add", [] |), - [ M.read (| px |); Value.Integer Integer.Usize 4 + [ + M.read (| px |); + M.of_value (| Value.Integer 4 |) ] |) |) in @@ -15130,11 +16283,13 @@ Module str. "add", [] |), - [ M.read (| py |); Value.Integer Integer.Usize 4 + [ + M.read (| py |); + M.of_value (| Value.Integer 4 |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -15146,7 +16301,7 @@ Module str. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -15161,7 +16316,7 @@ Module str. "read_unaligned", [] |), - [ M.rust_cast (M.read (| pxend |)) ] + [ M.rust_cast (| M.read (| pxend |) |) ] |) |) in let vy := @@ -15172,10 +16327,10 @@ Module str. "read_unaligned", [] |), - [ M.rust_cast (M.read (| pyend |)) ] + [ M.rust_cast (| M.read (| pyend |) |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| vx |)) (M.read (| vy |)) |))) + M.alloc (| BinOp.Pure.eq (| M.read (| vx |), M.read (| vy |) |) |))) ] |))) ] diff --git a/CoqOfRust/core/str/traits.v b/CoqOfRust/core/str/traits.v index de82137a3..cb9235a7e 100644 --- a/CoqOfRust/core/str/traits.v +++ b/CoqOfRust/core/str/traits.v @@ -11,7 +11,7 @@ Module str. self.as_bytes().cmp(other.as_bytes()) } *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -55,7 +55,7 @@ Module str. self.as_bytes() == other.as_bytes() } *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -110,20 +110,23 @@ Module str. Some(self.cmp(other)) } *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| "core::cmp::Ord", Ty.path "str", [], "cmp", [] |), - [ M.read (| self |); M.read (| other |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "str", [], "cmp", [] |), + [ M.read (| self |); M.read (| other |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -146,7 +149,7 @@ Module str. index.index(self) } *) - Definition index (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; index ] => @@ -184,7 +187,7 @@ Module str. index.index_mut(self) } *) - Definition index_mut (I : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (I : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self I in match τ, α with | [], [ self; index ] => @@ -218,7 +221,7 @@ Module str. panic!("attempted to index str up to maximum usize"); } *) - Definition str_index_overflow_fail (τ : list Ty.t) (α : list Value.t) : M := + Definition str_index_overflow_fail (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -229,11 +232,21 @@ Module str. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "attempted to index str up to maximum usize" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "attempted to index str up to maximum usize" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -252,13 +265,15 @@ Module str. Some(slice) } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in - Value.StructTuple "core::option::Option::Some" [ M.read (| slice |) ])) + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| slice |)) ] + |))) | _, _ => M.impossible end. @@ -267,13 +282,15 @@ Module str. Some(slice) } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in - Value.StructTuple "core::option::Option::Some" [ M.read (| slice |) ])) + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| slice |)) ] + |))) | _, _ => M.impossible end. @@ -282,7 +299,7 @@ Module str. slice } *) - Definition get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -297,7 +314,7 @@ Module str. slice } *) - Definition get_unchecked_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -312,7 +329,7 @@ Module str. slice } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -327,7 +344,7 @@ Module str. slice } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -375,7 +392,7 @@ Module str. } } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -383,7 +400,7 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -392,21 +409,22 @@ Module str. (M.alloc (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_associated_function (| @@ -448,24 +466,31 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], - [ Ty.path "str" ], - "get_unchecked", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [ Ty.path "str" ], + "get_unchecked", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -486,7 +511,7 @@ Module str. } } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -494,7 +519,7 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -503,21 +528,22 @@ Module str. (M.alloc (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_associated_function (| @@ -559,24 +585,31 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], - [ Ty.path "str" ], - "get_unchecked_mut", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [ Ty.path "str" ], + "get_unchecked_mut", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -605,58 +638,59 @@ Module str. ptr::slice_from_raw_parts(ptr, len) as *const str } *) - Definition get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic (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 slice := M.alloc (| M.rust_cast (| M.read (| slice |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.ge - (M.read (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.ge (| + 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" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") @@ -665,8 +699,10 @@ Module str. [] |), [ M.read (| slice |) ] - |)))) - |)) + |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -689,27 +725,34 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "str::get_unchecked requires that the range is within the string slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "str::get_unchecked requires that the range is within the string slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ptr := @@ -744,6 +787,7 @@ Module str. let len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -761,11 +805,12 @@ Module str. |) |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts", [ Ty.path "u8" ] |), [ M.read (| ptr |); M.read (| len |) ] - |)) + |) + |) |) |))) | _, _ => M.impossible @@ -786,58 +831,59 @@ Module str. ptr::slice_from_raw_parts_mut(ptr, len) as *mut str } *) - Definition get_unchecked_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic (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 slice := M.alloc (| M.rust_cast (| M.read (| slice |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| - BinOp.Pure.ge - (M.read (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.ge (| + 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" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| + (BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -846,8 +892,10 @@ Module str. [] |), [ M.read (| slice |) ] - |)))) - |)) + |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -870,27 +918,34 @@ Module str. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "str::get_unchecked_mut requires that the range is within the string slice" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "str::get_unchecked_mut requires that the range is within the string slice" + |) + |)) + ] + |) + |) + |) ] |); - Value.Bool false + M.of_value (| Value.Bool false |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let ptr := @@ -923,6 +978,7 @@ Module str. let len := M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| self, @@ -940,11 +996,12 @@ Module str. |) |) in M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ Ty.path "u8" ] |), [ M.read (| ptr |); M.read (| len |) ] - |)) + |) + |) |) |))) | _, _ => M.impossible @@ -959,7 +1016,7 @@ Module str. } } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -968,23 +1025,27 @@ Module str. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::Range", - "start" - |) - |); - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::Range", - "end" - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::Range", + "start" + |) + |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::Range", + "end" + |) + |)) + ] + |) |), [ fun γ => @@ -1051,7 +1112,7 @@ Module str. } } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1059,7 +1120,7 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1068,21 +1129,22 @@ Module str. (M.alloc (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.le - (M.read (| + BinOp.Pure.le (| + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "start" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_associated_function (| @@ -1200,7 +1262,7 @@ Module str. crate::slice::index::into_range(slice.len(), self)?.get(slice) } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1304,7 +1366,7 @@ Module str. crate::slice::index::into_range(slice.len(), self)?.get_mut(slice) } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1410,7 +1472,7 @@ Module str. unsafe { crate::slice::index::into_range_unchecked(len, self).get_unchecked(slice) } } *) - Definition get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1425,7 +1487,7 @@ Module str. "len", [] |), - [ M.rust_cast (M.read (| slice |)) ] + [ M.rust_cast (| M.read (| slice |) |) ] |) |) in M.alloc (| @@ -1457,7 +1519,7 @@ Module str. unsafe { crate::slice::index::into_range_unchecked(len, self).get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1472,7 +1534,7 @@ Module str. "len", [] |), - [ M.rust_cast (M.read (| slice |)) ] + [ M.rust_cast (| M.read (| slice |) |) ] |) |) in M.alloc (| @@ -1502,7 +1564,7 @@ Module str. crate::slice::index::into_slice_range(slice.len(), self).index(slice) } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1538,7 +1600,7 @@ Module str. crate::slice::index::into_slice_range(slice.len(), self).index_mut(slice) } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1603,7 +1665,7 @@ Module str. } } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1611,7 +1673,7 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1634,24 +1696,31 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ], - [ Ty.path "str" ], - "get_unchecked", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ], + [ Ty.path "str" ], + "get_unchecked", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1669,7 +1738,7 @@ Module str. } } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1677,7 +1746,7 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1700,24 +1769,31 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ], - [ Ty.path "str" ], - "get_unchecked_mut", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ], + [ Ty.path "str" ], + "get_unchecked_mut", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1730,7 +1806,7 @@ Module str. unsafe { (0..self.end).get_unchecked(slice) } } *) - Definition get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1745,19 +1821,22 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeTo", - "end" - |) - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeTo", + "end" + |) + |))) + ] + |); M.read (| slice |) ] |))) @@ -1770,7 +1849,7 @@ Module str. unsafe { (0..self.end).get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1785,19 +1864,22 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeTo", - "end" - |) - |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeTo", + "end" + |) + |))) + ] + |); M.read (| slice |) ] |))) @@ -1813,7 +1895,7 @@ Module str. } } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1858,7 +1940,11 @@ Module str. M.never_to_any (| M.call_closure (| M.get_function (| "core::str::slice_error_fail", [] |), - [ M.read (| slice |); Value.Integer Integer.Usize 0; M.read (| end_ |) ] + [ + M.read (| slice |); + M.of_value (| Value.Integer 0 |); + M.read (| end_ |) + ] |) |) |))) @@ -1879,7 +1965,7 @@ Module str. } } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1887,7 +1973,7 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1929,7 +2015,7 @@ Module str. M.get_function (| "core::str::slice_error_fail", [] |), [ M.read (| slice |); - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -1982,7 +2068,7 @@ Module str. } } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -1990,7 +2076,7 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2013,26 +2099,31 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ], - [ Ty.path "str" ], - "get_unchecked", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ], + [ Ty.path "str" ], + "get_unchecked", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2050,7 +2141,7 @@ Module str. } } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2058,7 +2149,7 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2081,26 +2172,31 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::slice::index::SliceIndex", - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ], - [ Ty.path "str" ], - "get_unchecked_mut", - [] - |), - [ M.read (| self |); M.read (| slice |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::slice::index::SliceIndex", + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ], + [ Ty.path "str" ], + "get_unchecked_mut", + [] + |), + [ M.read (| self |); M.read (| slice |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2114,7 +2210,7 @@ Module str. unsafe { (self.start..len).get_unchecked(slice) } } *) - Definition get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2129,7 +2225,7 @@ Module str. "len", [] |), - [ M.rust_cast (M.read (| slice |)) ] + [ M.rust_cast (| M.read (| slice |) |) ] |) |) in M.alloc (| @@ -2142,19 +2238,22 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeFrom", - "start" - |) - |)); - ("end_", M.read (| len |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeFrom", + "start" + |) + |))); + ("end_", A.to_value (M.read (| len |))) + ] + |); M.read (| slice |) ] |) @@ -2170,7 +2269,7 @@ Module str. unsafe { (self.start..len).get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2185,7 +2284,7 @@ Module str. "len", [] |), - [ M.rust_cast (M.read (| slice |)) ] + [ M.rust_cast (| M.read (| slice |) |) ] |) |) in M.alloc (| @@ -2198,19 +2297,22 @@ Module str. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeFrom", - "start" - |) - |)); - ("end_", M.read (| len |)) - ]; + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeFrom", + "start" + |) + |))); + ("end_", A.to_value (M.read (| len |))) + ] + |); M.read (| slice |) ] |) @@ -2228,7 +2330,7 @@ Module str. } } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2237,20 +2339,24 @@ Module str. M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::ops::range::RangeFrom", - "start" - |) - |); - M.call_closure (| - M.get_associated_function (| Ty.path "str", "len", [] |), - [ M.read (| slice |) ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::ops::range::RangeFrom", + "start" + |) + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ M.read (| slice |) ] + |)) + ] + |) |), [ fun γ => @@ -2312,7 +2418,7 @@ Module str. } } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2320,7 +2426,7 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2412,7 +2518,7 @@ Module str. if *self.end() == usize::MAX { None } else { self.into_slice_range().get(slice) } } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2420,15 +2526,15 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -2439,11 +2545,14 @@ Module str. |), [ self ] |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2481,7 +2590,7 @@ Module str. if *self.end() == usize::MAX { None } else { self.into_slice_range().get_mut(slice) } } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2489,15 +2598,15 @@ Module str. let slice := M.alloc (| slice |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -2508,11 +2617,14 @@ Module str. |), [ self ] |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2551,7 +2663,7 @@ Module str. unsafe { self.into_slice_range().get_unchecked(slice) } } *) - Definition get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2586,7 +2698,7 @@ Module str. unsafe { self.into_slice_range().get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2623,7 +2735,7 @@ Module str. self.into_slice_range().index(slice) } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2632,15 +2744,15 @@ Module str. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -2651,8 +2763,9 @@ Module str. |), [ self ] |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2664,7 +2777,7 @@ Module str. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2701,7 +2814,7 @@ Module str. self.into_slice_range().index_mut(slice) } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2710,15 +2823,15 @@ Module str. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -2729,8 +2842,9 @@ Module str. |), [ self ] |) - |)) - (M.read (| M.get_constant (| "core::num::MAX" |) |)) + |), + M.read (| M.get_constant (| "core::num::MAX" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2742,7 +2856,7 @@ Module str. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -2800,7 +2914,7 @@ Module str. (0..=self.end).get(slice) } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2822,7 +2936,7 @@ Module str. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -2843,7 +2957,7 @@ Module str. (0..=self.end).get_mut(slice) } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2865,7 +2979,7 @@ Module str. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -2887,7 +3001,7 @@ Module str. unsafe { (0..=self.end).get_unchecked(slice) } } *) - Definition get_unchecked (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2909,7 +3023,7 @@ Module str. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -2931,7 +3045,7 @@ Module str. unsafe { (0..=self.end).get_unchecked_mut(slice) } } *) - Definition get_unchecked_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_unchecked_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2953,7 +3067,7 @@ Module str. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -2974,7 +3088,7 @@ Module str. (0..=self.end).index(slice) } *) - Definition index (τ : list Ty.t) (α : list Value.t) : M := + Definition index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -2996,7 +3110,7 @@ Module str. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -3017,7 +3131,7 @@ Module str. (0..=self.end).index_mut(slice) } *) - Definition index_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition index_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; slice ] => ltac:(M.monadic @@ -3039,7 +3153,7 @@ Module str. [] |), [ - Value.Integer Integer.Usize 0; + M.of_value (| Value.Integer 0 |); M.read (| M.SubPointer.get_struct_record_field (| self, @@ -3090,7 +3204,7 @@ Module str. } } *) - Definition from_str (τ : list Ty.t) (α : list Value.t) : M := + Definition from_str (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s ] => ltac:(M.monadic @@ -3104,21 +3218,36 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.String "true" |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Bool true ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Bool true |)) ] + |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.String "false" |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Bool false ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Bool false |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "core::str::error::ParseBoolError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::str::error::ParseBoolError" [] + |)) + ] + |) |))) ] |) diff --git a/CoqOfRust/core/str/validations.v b/CoqOfRust/core/str/validations.v index 255daa379..f97633cef 100644 --- a/CoqOfRust/core/str/validations.v +++ b/CoqOfRust/core/str/validations.v @@ -8,16 +8,18 @@ Module str. (byte & (0x7F >> width)) as u32 } *) - Definition utf8_first_byte (τ : list Ty.t) (α : list Value.t) : M := + Definition utf8_first_byte (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ byte; width ] => ltac:(M.monadic (let byte := M.alloc (| byte |) in let width := M.alloc (| width |) in - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| byte |)) - (BinOp.Panic.shr (| Value.Integer Integer.U8 127, M.read (| width |) |))))) + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| byte |), + BinOp.Panic.shr (| M.of_value (| Value.Integer 127 |), M.read (| width |) |) + |) + |))) | _, _ => M.impossible end. @@ -26,18 +28,21 @@ Module str. (ch << 6) | (byte & CONT_MASK) as u32 } *) - Definition utf8_acc_cont_byte (τ : list Ty.t) (α : list Value.t) : M := + Definition utf8_acc_cont_byte (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ch; byte ] => ltac:(M.monadic (let ch := M.alloc (| ch |) in let byte := M.alloc (| byte |) in - BinOp.Pure.bit_or - (BinOp.Panic.shl (| M.read (| ch |), Value.Integer Integer.I32 6 |)) - (M.rust_cast - (BinOp.Pure.bit_and - (M.read (| byte |)) - (M.read (| M.get_constant (| "core::str::validations::CONT_MASK" |) |)))))) + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| M.read (| ch |), M.of_value (| Value.Integer 6 |) |), + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| byte |), + M.read (| M.get_constant (| "core::str::validations::CONT_MASK" |) |) + |) + |) + |))) | _, _ => M.impossible end. @@ -46,12 +51,15 @@ Module str. (byte as i8) < -64 } *) - Definition utf8_is_cont_byte (τ : list Ty.t) (α : list Value.t) : M := + Definition utf8_is_cont_byte (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ byte ] => ltac:(M.monadic (let byte := M.alloc (| byte |) in - BinOp.Pure.lt (M.rust_cast (M.read (| byte |))) (Value.Integer Integer.I8 (-64)))) + BinOp.Pure.lt (| + M.rust_cast (| M.read (| byte |) |), + M.of_value (| Value.Integer (-64) |) + |))) | _, _ => M.impossible end. @@ -92,7 +100,7 @@ Module str. Some(ch) } *) - Definition next_code_point (τ : list Ty.t) (α : list Value.t) : M := + Definition next_code_point (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ bytes ] => ltac:(M.monadic @@ -179,14 +187,17 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| x |)) (Value.Integer Integer.U8 128) + BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -194,21 +205,23 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.rust_cast (M.read (| x |)) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.rust_cast (| M.read (| x |) |)) ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let init := M.alloc (| M.call_closure (| M.get_function (| "core::str::validations::utf8_first_byte", [] |), - [ M.read (| x |); Value.Integer Integer.U32 2 ] + [ M.read (| x |); M.of_value (| Value.Integer 2 |) ] |) |) in let y := @@ -244,14 +257,17 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| x |)) (Value.Integer Integer.U8 224) + BinOp.Pure.ge (| + M.read (| x |), + M.of_value (| Value.Integer 224 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -287,12 +303,14 @@ Module str. [] |), [ - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| y |)) - (M.read (| + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| y |), + M.read (| M.get_constant (| "core::str::validations::CONT_MASK" |) - |))); + |) + |) + |); M.read (| z |) ] |) @@ -300,24 +318,26 @@ Module str. let _ := M.write (| ch, - BinOp.Pure.bit_or - (BinOp.Panic.shl (| + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| M.read (| init |), - Value.Integer Integer.I32 12 - |)) - (M.read (| y_z |)) + M.of_value (| Value.Integer 12 |) + |), + M.read (| y_z |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| x |)) - (Value.Integer Integer.U8 240) + BinOp.Pure.ge (| + M.read (| x |), + M.of_value (| Value.Integer 240 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -351,29 +371,36 @@ Module str. let _ := M.write (| ch, - BinOp.Pure.bit_or - (BinOp.Panic.shl (| - BinOp.Pure.bit_and - (M.read (| init |)) - (Value.Integer Integer.U32 7), - Value.Integer Integer.I32 18 - |)) - (M.call_closure (| + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| + BinOp.Pure.bit_and (| + M.read (| init |), + M.of_value (| Value.Integer 7 |) + |), + M.of_value (| Value.Integer 18 |) + |), + M.call_closure (| M.get_function (| "core::str::validations::utf8_acc_cont_byte", [] |), [ M.read (| y_z |); M.read (| w |) ] - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ch |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| ch |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -416,7 +443,7 @@ Module str. Some(ch) } *) - Definition next_code_point_reverse (τ : list Ty.t) (α : list Value.t) : M := + Definition next_code_point_reverse (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ bytes ] => ltac:(M.monadic @@ -507,9 +534,10 @@ Module str. (let next_byte := M.copy (| γ |) in let γ := M.alloc (| - BinOp.Pure.lt - (M.read (| next_byte |)) - (Value.Integer Integer.U8 128) + BinOp.Pure.lt (| + M.read (| next_byte |), + M.of_value (| Value.Integer 128 |) + |) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -517,9 +545,11 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ M.rust_cast (M.read (| next_byte |)) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.rust_cast (| M.read (| next_byte |) |)) ] + |) |) |) |) @@ -531,7 +561,7 @@ Module str. ] |) |) in - let ch := M.copy (| Value.DeclaredButUndefined |) in + let ch := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let z := M.copy (| M.call_closure (| @@ -561,12 +591,12 @@ Module str. ch, M.call_closure (| M.get_function (| "core::str::validations::utf8_first_byte", [] |), - [ M.read (| z |); Value.Integer Integer.U32 2 ] + [ M.read (| z |); M.of_value (| Value.Integer 2 |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -612,12 +642,12 @@ Module str. ch, M.call_closure (| M.get_function (| "core::str::validations::utf8_first_byte", [] |), - [ M.read (| y |); Value.Integer Integer.U32 3 ] + [ M.read (| y |); M.of_value (| Value.Integer 3 |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -669,7 +699,7 @@ Module str. "core::str::validations::utf8_first_byte", [] |), - [ M.read (| x |); Value.Integer Integer.U32 4 ] + [ M.read (| x |); M.of_value (| Value.Integer 4 |) ] |) |) in let _ := @@ -683,8 +713,9 @@ Module str. [ M.read (| ch |); M.read (| y |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -698,8 +729,8 @@ Module str. [ M.read (| ch |); M.read (| z |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -710,19 +741,23 @@ Module str. [ M.read (| ch |); M.read (| w |) ] |) |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ch |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| ch |)) ] + |) + |) |))) |))) | _, _ => M.impossible end. - Definition value_NONASCII_MASK : Value.t := + Definition value_NONASCII_MASK : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "repeat_u8", [] |), - [ Value.Integer Integer.U8 128 ] + [ M.of_value (| Value.Integer 128 |) ] |) |))). @@ -731,16 +766,18 @@ Module str. (x & NONASCII_MASK) != 0 } *) - Definition contains_nonascii (τ : list Ty.t) (α : list Value.t) : M := + Definition contains_nonascii (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| x |)) - (M.read (| M.get_constant (| "core::str::validations::NONASCII_MASK" |) |))) - (Value.Integer Integer.Usize 0))) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| x |), + M.read (| M.get_constant (| "core::str::validations::NONASCII_MASK" |) |) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -862,7 +899,7 @@ Module str. Ok(()) } *) - Definition run_utf8_validation (τ : list Ty.t) (α : list Value.t) : M := + Definition run_utf8_validation (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -870,7 +907,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let index := M.alloc (| Value.Integer Integer.Usize 0 |) in + let index := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let len := M.alloc (| M.call_closure (| @@ -891,32 +928,41 @@ Module str. |) in let ascii_block_size := M.alloc (| - BinOp.Panic.mul (| Value.Integer Integer.Usize 2, M.read (| usize_bytes |) |) + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 2 |), + M.read (| usize_bytes |) + |) |) in let blocks_end := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge (M.read (| len |)) (M.read (| ascii_block_size |)) + BinOp.Pure.ge (| + M.read (| len |), + M.read (| ascii_block_size |) + |) |)) in 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 Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.Usize 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |) in @@ -945,14 +991,14 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| index |)) (M.read (| len |)) + BinOp.Pure.lt (| M.read (| index |), M.read (| len |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -965,16 +1011,17 @@ Module str. M.SubPointer.get_array_field (| M.read (| v |), index |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| first |)) - (Value.Integer Integer.U8 128) + BinOp.Pure.ge (| + M.read (| first |), + M.of_value (| Value.Integer 128 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1000,34 +1047,37 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 2 + Value.Integer 2 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.rust_cast - (M.read (| + BinOp.Pure.ge (| + M.rust_cast (| + M.read (| let _ := let β := index in M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -1035,13 +1085,14 @@ Module str. (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| index - |)) - (M.read (| + |), + M.read (| len - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1052,22 +1103,31 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| - old_offset - |)); - ("error_len", - Value.StructTuple - "core::option::Option::None" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" + [ + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))) + ] + |)) + ] + |) |) |) |) @@ -1075,7 +1135,9 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -1083,8 +1145,10 @@ Module str. M.read (| v |), index |) - |))) - (Value.Integer Integer.I8 (-64)) + |) + |), + M.of_value (| Value.Integer (-64) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1095,31 +1159,46 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| old_offset |)); - ("error_len", - Value.StructTuple - "core::option::Option::Some" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" [ - Value.Integer - Integer.U8 - 1 - ]) - ] - ] + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Integer + 1 + |)) + ] + |))) + ] + |)) + ] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => @@ -1127,79 +1206,103 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 3 + Value.Integer 3 |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.read (| first |); - M.read (| - let _ := - let β := index in - M.write (| - β, - BinOp.Panic.add (| - M.read (| β |), - Value.Integer Integer.Usize 1 - |) - |) in - let _ := - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := - M.use + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| first |)); + A.to_value + (M.read (| + let _ := + let β := index in + M.write (| + β, + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| + Value.Integer 1 + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| + M.read (| + index + |), + M.read (| len |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" + [ + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))) + ] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| - BinOp.Pure.ge - (M.read (| index |)) - (M.read (| len |)) - |)) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - M.never_to_any (| - M.read (| - M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| - old_offset - |)); - ("error_len", - Value.StructTuple - "core::option::Option::None" - []) - ] - ] + M.of_value (| + Value.Tuple [] |) - |) - |) - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - Value.Tuple [] - |))) - ] - |) in - M.SubPointer.get_array_field (| - M.read (| v |), - index - |) - |) - ] + |))) + ] + |) in + M.SubPointer.get_array_field (| + M.read (| v |), + index + |) + |)) + ] + |) |), [ fun γ => @@ -1222,9 +1325,9 @@ Module str. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 224 + Value.Integer 224 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1237,7 +1340,7 @@ Module str. γ, 1 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1253,9 +1356,9 @@ Module str. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 237 + Value.Integer 237 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1268,16 +1371,21 @@ Module str. γ, 1 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic @@ -1285,26 +1393,37 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| - old_offset - |)); - ("error_len", - Value.StructTuple - "core::option::Option::Some" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" [ - Value.Integer - Integer.U8 - 1 - ]) - ] - ] + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Integer + 1 + |)) + ] + |))) + ] + |)) + ] + |) |) |) |) @@ -1312,31 +1431,34 @@ Module str. ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.rust_cast - (M.read (| + BinOp.Pure.ge (| + M.rust_cast (| + M.read (| let _ := let β := index in M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -1344,13 +1466,14 @@ Module str. (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| index - |)) - (M.read (| + |), + M.read (| len - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1361,22 +1484,31 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| - old_offset - |)); - ("error_len", - Value.StructTuple - "core::option::Option::None" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" + [ + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))) + ] + |)) + ] + |) |) |) |) @@ -1384,7 +1516,9 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -1392,8 +1526,10 @@ Module str. M.read (| v |), index |) - |))) - (Value.Integer Integer.I8 (-64)) + |) + |), + M.of_value (| Value.Integer (-64) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1404,31 +1540,46 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| old_offset |)); - ("error_len", - Value.StructTuple - "core::option::Option::Some" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" [ - Value.Integer - Integer.U8 - 2 - ]) - ] - ] + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Integer + 2 + |)) + ] + |))) + ] + |)) + ] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => @@ -1436,79 +1587,103 @@ Module str. (let _ := M.is_constant_or_break_match (| M.read (| γ |), - Value.Integer Integer.Usize 4 + Value.Integer 4 |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.read (| first |); - M.read (| - let _ := - let β := index in - M.write (| - β, - BinOp.Panic.add (| - M.read (| β |), - Value.Integer Integer.Usize 1 - |) - |) in - let _ := - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := - M.use + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| first |)); + A.to_value + (M.read (| + let _ := + let β := index in + M.write (| + β, + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| + Value.Integer 1 + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| + M.read (| + index + |), + M.read (| len |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" + [ + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))) + ] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| - BinOp.Pure.ge - (M.read (| index |)) - (M.read (| len |)) - |)) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - M.never_to_any (| - M.read (| - M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| - old_offset - |)); - ("error_len", - Value.StructTuple - "core::option::Option::None" - []) - ] - ] + M.of_value (| + Value.Tuple [] |) - |) - |) - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - Value.Tuple [] - |))) - ] - |) in - M.SubPointer.get_array_field (| - M.read (| v |), - index - |) - |) - ] + |))) + ] + |) in + M.SubPointer.get_array_field (| + M.read (| v |), + index + |) + |)) + ] + |) |), [ fun γ => @@ -1531,9 +1706,9 @@ Module str. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 240 + Value.Integer 240 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1546,7 +1721,7 @@ Module str. γ, 1 |) in - Value.Tuple [])); + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1562,18 +1737,23 @@ Module str. let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.U8 244 + Value.Integer 244 |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic @@ -1581,26 +1761,37 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| - old_offset - |)); - ("error_len", - Value.StructTuple - "core::option::Option::Some" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" [ - Value.Integer - Integer.U8 - 1 - ]) - ] - ] + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Integer + 1 + |)) + ] + |))) + ] + |)) + ] + |) |) |) |) @@ -1609,31 +1800,34 @@ Module str. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.rust_cast - (M.read (| + BinOp.Pure.ge (| + M.rust_cast (| + M.read (| let _ := let β := index in M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -1641,13 +1835,14 @@ Module str. (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| index - |)) - (M.read (| + |), + M.read (| len - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1658,22 +1853,31 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| - old_offset - |)); - ("error_len", - Value.StructTuple - "core::option::Option::None" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" + [ + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))) + ] + |)) + ] + |) |) |) |) @@ -1681,7 +1885,9 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -1689,8 +1895,12 @@ Module str. M.read (| v |), index |) - |))) - (Value.Integer Integer.I8 (-64)) + |) + |), + M.of_value (| + Value.Integer (-64) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1701,61 +1911,77 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| - old_offset - |)); - ("error_len", - Value.StructTuple - "core::option::Option::Some" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" [ - Value.Integer - Integer.U8 - 2 - ]) - ] - ] + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Integer + 2 + |)) + ] + |))) + ] + |)) + ] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.rust_cast - (M.read (| + BinOp.Pure.ge (| + M.rust_cast (| + M.read (| let _ := let β := index in M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -1763,13 +1989,14 @@ Module str. (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| index - |)) - (M.read (| + |), + M.read (| len - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1780,22 +2007,31 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| - old_offset - |)); - ("error_len", - Value.StructTuple - "core::option::Option::None" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" + [ + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))) + ] + |)) + ] + |) |) |) |) @@ -1803,7 +2039,9 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -1811,8 +2049,10 @@ Module str. M.read (| v |), index |) - |))) - (Value.Integer Integer.I8 (-64)) + |) + |), + M.of_value (| Value.Integer (-64) |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1823,31 +2063,46 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| old_offset |)); - ("error_len", - Value.StructTuple - "core::option::Option::Some" + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" [ - Value.Integer - Integer.U8 - 3 - ]) - ] - ] + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Integer + 3 + |)) + ] + |))) + ] + |)) + ] + |) |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))); fun γ => @@ -1856,20 +2111,36 @@ Module str. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::str::error::Utf8Error" - [ - ("valid_up_to", - M.read (| old_offset |)); - ("error_len", - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.U8 1 ]) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::str::error::Utf8Error" + [ + ("valid_up_to", + A.to_value + (M.read (| + old_offset + |))); + ("error_len", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Integer 1 + |)) + ] + |))) + ] + |)) + ] + |) |) |) |) @@ -1881,15 +2152,16 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1897,14 +2169,16 @@ Module str. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.ne - (M.read (| align |)) - (M.read (| + BinOp.Pure.ne (| + M.read (| align |), + M.read (| M.get_constant (| "core::num::MAX" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.rem (| + (BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "usize", @@ -1917,8 +2191,9 @@ Module str. ] |), M.read (| usize_bytes |) - |)) - (Value.Integer Integer.Usize 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |) |)) in let _ := @@ -1941,16 +2216,17 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| index |)) - (M.read (| blocks_end |)) + BinOp.Pure.lt (| + M.read (| index |), + M.read (| blocks_end |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1960,8 +2236,8 @@ Module str. let _ := let block := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") @@ -1973,7 +2249,8 @@ Module str. M.read (| ptr |); M.read (| index |) ] - |)) + |) + |) |) in let zu := M.alloc (| @@ -2008,9 +2285,9 @@ Module str. |), [ M.read (| block |); - Value.Integer - Integer.Usize - 1 + M.of_value (| + Value.Integer 1 + |) ] |) |) @@ -2018,7 +2295,9 @@ Module str. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic @@ -2044,7 +2323,9 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |))) ] |) in @@ -2053,11 +2334,14 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), M.read (| ascii_block_size |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2069,7 +2353,9 @@ Module str. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |) |) |))) @@ -2079,7 +2365,7 @@ Module str. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2087,20 +2373,22 @@ Module str. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| index |)) - (M.read (| len |)), + BinOp.Pure.lt (| + M.read (| index |), + M.read (| len |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| + (BinOp.Pure.lt (| + M.read (| M.SubPointer.get_array_field (| M.read (| v |), index |) - |)) - (Value.Integer - Integer.U8 - 128))) + |), + M.of_value (| + Value.Integer 128 + |) + |))) |) |)) in let _ := @@ -2113,11 +2401,14 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -2129,7 +2420,9 @@ Module str. M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |) |) |))) @@ -2143,11 +2436,12 @@ Module str. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -2161,283 +2455,291 @@ Module str. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible end. - Definition value_UTF8_CHAR_WIDTH : Value.t := + Definition value_UTF8_CHAR_WIDTH : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |) |))). @@ -2446,22 +2748,23 @@ Module str. UTF8_CHAR_WIDTH[b as usize] as usize } *) - Definition utf8_char_width (τ : list Ty.t) (α : list Value.t) : M := + Definition utf8_char_width (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic (let b := M.alloc (| b |) in - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.read (| M.get_constant (| "core::str::validations::UTF8_CHAR_WIDTH" |) |), - M.alloc (| M.rust_cast (M.read (| b |)) |) + M.alloc (| M.rust_cast (| M.read (| b |) |) |) |) - |)))) + |) + |))) | _, _ => M.impossible end. - Definition value_CONT_MASK : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U8 63 |))). + Definition value_CONT_MASK : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 63 |) |))). End validations. End str. diff --git a/CoqOfRust/core/sync/atomic.v b/CoqOfRust/core/sync/atomic.v index db21f89c3..70541862c 100644 --- a/CoqOfRust/core/sync/atomic.v +++ b/CoqOfRust/core/sync/atomic.v @@ -3,8 +3,8 @@ Require Import CoqOfRust.CoqOfRust. Module sync. Module atomic. - Definition value_EMULATE_ATOMIC_BOOL : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))). + Definition value_EMULATE_ATOMIC_BOOL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))). (* StructRecord { @@ -21,13 +21,13 @@ Module sync. Self::new(false) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.call_closure (| M.get_associated_function (| Ty.path "core::sync::atomic::AtomicBool", "new", [] |), - [ Value.Bool false ] + [ M.of_value (| Value.Bool false |) ] |))) | _, _ => M.impossible end. @@ -68,7 +68,7 @@ Module sync. AtomicPtr::new(crate::ptr::null_mut()) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => @@ -167,7 +167,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::Ordering". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -188,7 +188,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::Ordering". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -205,23 +205,23 @@ Module sync. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Relaxed" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Relaxed" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Release" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Release" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Acquire" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Acquire" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "AcqRel" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "AcqRel" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "SeqCst" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "SeqCst" |) |) |))) ] |) |) @@ -253,12 +253,12 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::Ordering". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -286,7 +286,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::Ordering". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -313,7 +313,7 @@ Module sync. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -330,7 +330,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::Ordering". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -365,13 +365,13 @@ Module sync. (* Instance *) [ ("hash", InstanceField.Method hash) ]. End Impl_core_hash_Hash_for_core_sync_atomic_Ordering. - Definition value_ATOMIC_BOOL_INIT : Value.t := + Definition value_ATOMIC_BOOL_INIT : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::sync::atomic::AtomicBool", "new", [] |), - [ Value.Bool false ] + [ M.of_value (| Value.Bool false |) ] |) |))). @@ -383,24 +383,27 @@ Module sync. AtomicBool { v: UnsafeCell::new(v as u8) } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicBool" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u8" ], - "new", - [] - |), - [ M.rust_cast (M.read (| v |)) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicBool" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u8" ], + "new", + [] + |), + [ M.rust_cast (| M.read (| v |) |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -412,7 +415,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -436,13 +439,13 @@ Module sync. unsafe { &mut *(self.v.get() as *mut bool) } } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u8" ], "get", @@ -455,7 +458,8 @@ Module sync. "v" |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -468,12 +472,12 @@ Module sync. unsafe { &mut *(v as *mut bool as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |))) | _, _ => M.impossible end. @@ -485,12 +489,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [bool]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -504,12 +508,12 @@ Module sync. unsafe { &mut *(v as *mut [bool] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |))) | _, _ => M.impossible end. @@ -521,13 +525,13 @@ Module sync. self.v.into_inner() != 0 } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u8" ], "into_inner", @@ -542,8 +546,9 @@ Module sync. |) |) ] - |)) - (Value.Integer Integer.U8 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -556,19 +561,19 @@ Module sync. unsafe { atomic_load(self.v.get(), order) != 0 } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic (let self := M.alloc (| self |) in let order := M.alloc (| order |) in - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "u8" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u8" ], "get", @@ -581,11 +586,13 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] - |)) - (Value.Integer Integer.U8 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -600,7 +607,7 @@ Module sync. } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -627,12 +634,12 @@ Module sync. |) ] |); - M.rust_cast (M.read (| val |)); + M.rust_cast (| M.read (| val |) |); M.read (| order |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -649,7 +656,7 @@ Module sync. } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -658,7 +665,7 @@ Module sync. let order := M.alloc (| order |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -666,7 +673,7 @@ Module sync. 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 M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -683,7 +690,11 @@ Module sync. "fetch_or", [] |), - [ M.read (| self |); Value.Bool true; M.read (| order |) ] + [ + M.read (| self |); + M.of_value (| Value.Bool true |); + M.read (| order |) + ] |) |))); fun γ => @@ -695,7 +706,11 @@ Module sync. "fetch_and", [] |), - [ M.read (| self |); Value.Bool false; M.read (| order |) ] + [ + M.read (| self |); + M.of_value (| Value.Bool false |); + M.read (| order |) + ] |) |))) ] @@ -703,8 +718,8 @@ Module sync. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_function (| "core::sync::atomic::atomic_swap", [ Ty.path "u8" ] @@ -724,11 +739,12 @@ Module sync. |) ] |); - M.rust_cast (M.read (| val |)); + M.rust_cast (| M.read (| val |) |); M.read (| order |) ] - |)) - (Value.Integer Integer.U8 0) + |), + M.of_value (| Value.Integer 0 |) + |) |))) ] |) @@ -746,7 +762,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -849,7 +865,7 @@ Module sync. } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -860,7 +876,7 @@ Module sync. let failure := M.alloc (| failure |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -871,7 +887,13 @@ Module sync. M.copy (| M.match_operator (| M.alloc (| - Value.Tuple [ M.read (| success |); M.read (| failure |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| success |)); + A.to_value (M.read (| failure |)) + ] + |) |), [ fun γ => @@ -879,21 +901,27 @@ Module sync. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple "core::sync::atomic::Ordering::AcqRel" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::AcqRel" [] + |) |))); fun γ => ltac:(M.monadic @@ -912,16 +940,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "there is no such thing as an acquire-release failure ordering" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as an acquire-release failure ordering" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -933,28 +967,36 @@ Module sync. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple "core::sync::atomic::Ordering::AcqRel" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::AcqRel" [] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] + |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple "core::sync::atomic::Ordering::Release" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Release" [] + |) |))); fun γ => ltac:(M.monadic @@ -973,16 +1015,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "there is no such thing as a release failure ordering" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as a release failure ordering" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -994,7 +1042,9 @@ Module sync. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in M.alloc (| - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| + Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + |) |))) ] |) @@ -1002,14 +1052,14 @@ Module sync. let old := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| current |)) (M.read (| new |)) + BinOp.Pure.eq (| M.read (| current |), M.read (| new |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1023,7 +1073,11 @@ Module sync. "fetch_or", [] |), - [ M.read (| self |); Value.Bool false; M.read (| order |) ] + [ + M.read (| self |); + M.of_value (| Value.Bool false |); + M.read (| order |) + ] |) |))); fun γ => @@ -1042,14 +1096,14 @@ Module sync. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| old |)) (M.read (| current |)) + BinOp.Pure.eq (| M.read (| old |), M.read (| current |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1057,12 +1111,20 @@ Module sync. Value.Bool true |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| old |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| old |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| old |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| old |)) ] + |) |))) ] |))); @@ -1090,8 +1152,8 @@ Module sync. |) ] |); - M.rust_cast (M.read (| current |)); - M.rust_cast (M.read (| new |)); + M.rust_cast (| M.read (| current |) |); + M.rust_cast (| M.read (| new |) |); M.read (| success |); M.read (| failure |) ] @@ -1108,9 +1170,17 @@ Module sync. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ BinOp.Pure.ne (M.read (| x |)) (Value.Integer Integer.U8 0) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Pure.ne (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1122,9 +1192,17 @@ Module sync. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ BinOp.Pure.ne (M.read (| x |)) (Value.Integer Integer.U8 0) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (BinOp.Pure.ne (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |)) + ] + |) |))) ] |))) @@ -1158,7 +1236,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -1172,7 +1250,7 @@ Module sync. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1203,7 +1281,7 @@ Module sync. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -1228,8 +1306,8 @@ Module sync. |) ] |); - M.rust_cast (M.read (| current |)); - M.rust_cast (M.read (| new |)); + M.rust_cast (| M.read (| current |) |); + M.rust_cast (| M.read (| new |) |); M.read (| success |); M.read (| failure |) ] @@ -1246,9 +1324,17 @@ Module sync. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ BinOp.Pure.ne (M.read (| x |)) (Value.Integer Integer.U8 0) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Pure.ne (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1260,9 +1346,17 @@ Module sync. |) in let x := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ BinOp.Pure.ne (M.read (| x |)) (Value.Integer Integer.U8 0) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (BinOp.Pure.ne (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |)) + ] + |) |))) ] |) @@ -1280,15 +1374,15 @@ Module sync. unsafe { atomic_and(self.v.get(), val as u8, order) != 0 } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic (let self := M.alloc (| self |) in let val := M.alloc (| val |) in let order := M.alloc (| order |) in - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_function (| "core::sync::atomic::atomic_and", [ Ty.path "u8" ] |), [ M.call_closure (| @@ -1305,11 +1399,12 @@ Module sync. |) ] |); - M.rust_cast (M.read (| val |)); + M.rust_cast (| M.read (| val |) |); M.read (| order |) ] - |)) - (Value.Integer Integer.U8 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -1332,7 +1427,7 @@ Module sync. } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -1341,7 +1436,7 @@ Module sync. let order := M.alloc (| order |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1354,7 +1449,8 @@ Module sync. "fetch_xor", [] |), - [ M.read (| self |); Value.Bool true; M.read (| order |) ] + [ M.read (| self |); M.of_value (| Value.Bool true |); M.read (| order |) + ] |) |))); fun γ => @@ -1366,7 +1462,8 @@ Module sync. "swap", [] |), - [ M.read (| self |); Value.Bool true; M.read (| order |) ] + [ M.read (| self |); M.of_value (| Value.Bool true |); M.read (| order |) + ] |) |))) ] @@ -1383,15 +1480,15 @@ Module sync. unsafe { atomic_or(self.v.get(), val as u8, order) != 0 } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic (let self := M.alloc (| self |) in let val := M.alloc (| val |) in let order := M.alloc (| order |) in - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_function (| "core::sync::atomic::atomic_or", [ Ty.path "u8" ] |), [ M.call_closure (| @@ -1408,11 +1505,12 @@ Module sync. |) ] |); - M.rust_cast (M.read (| val |)); + M.rust_cast (| M.read (| val |) |); M.read (| order |) ] - |)) - (Value.Integer Integer.U8 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -1424,15 +1522,15 @@ Module sync. unsafe { atomic_xor(self.v.get(), val as u8, order) != 0 } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic (let self := M.alloc (| self |) in let val := M.alloc (| val |) in let order := M.alloc (| order |) in - BinOp.Pure.ne - (M.call_closure (| + BinOp.Pure.ne (| + M.call_closure (| M.get_function (| "core::sync::atomic::atomic_xor", [ Ty.path "u8" ] |), [ M.call_closure (| @@ -1449,11 +1547,12 @@ Module sync. |) ] |); - M.rust_cast (M.read (| val |)); + M.rust_cast (| M.read (| val |) |); M.read (| order |) ] - |)) - (Value.Integer Integer.U8 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) | _, _ => M.impossible end. @@ -1464,7 +1563,7 @@ Module sync. self.fetch_xor(true, order) } *) - Definition fetch_not (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -1476,7 +1575,7 @@ Module sync. "fetch_xor", [] |), - [ M.read (| self |); Value.Bool true; M.read (| order |) ] + [ M.read (| self |); M.of_value (| Value.Bool true |); M.read (| order |) ] |))) | _, _ => M.impossible end. @@ -1488,7 +1587,7 @@ Module sync. self.v.get().cast() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1541,7 +1640,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -1567,7 +1666,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1581,7 +1680,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -1644,14 +1748,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1669,27 +1779,30 @@ Module sync. AtomicPtr { p: UnsafeCell::new(p) } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ p ] => ltac:(M.monadic (let p := M.alloc (| p |) in - Value.StructRecord - "core::sync::atomic::AtomicPtr" - [ - ("p", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::cell::UnsafeCell") - [ Ty.apply (Ty.path "*mut") [ T ] ], - "new", - [] - |), - [ M.read (| p |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicPtr" + [ + ("p", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::cell::UnsafeCell") + [ Ty.apply (Ty.path "*mut") [ T ] ], + "new", + [] + |), + [ M.read (| p |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1703,7 +1816,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ ptr ] => @@ -1729,7 +1842,7 @@ Module sync. self.p.get_mut() } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1767,7 +1880,7 @@ Module sync. unsafe { &mut *(v as *mut *mut T as *mut Self) } } *) - Definition from_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => @@ -1775,12 +1888,12 @@ Module sync. (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -1798,13 +1911,13 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [*mut T]) } } *) - Definition get_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -1821,13 +1934,13 @@ Module sync. unsafe { &mut *(v as *mut [*mut T] as *mut [Self]) } } *) - Definition from_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |))) | _, _ => M.impossible end. @@ -1840,7 +1953,7 @@ Module sync. self.p.into_inner() } *) - Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -1875,7 +1988,7 @@ Module sync. unsafe { atomic_load(self.p.get(), order) } } *) - Definition load (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition load (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; order ] => @@ -1889,8 +2002,8 @@ Module sync. |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") @@ -1905,7 +2018,8 @@ Module sync. "p" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -1924,7 +2038,7 @@ Module sync. } } *) - Definition store (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition store (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; ptr; order ] => @@ -1962,7 +2076,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1977,7 +2091,7 @@ Module sync. unsafe { atomic_swap(self.p.get(), ptr, order) } } *) - Definition swap (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; ptr; order ] => @@ -2024,7 +2138,7 @@ Module sync. } } *) - Definition compare_and_swap (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; current; new; order ] => @@ -2097,7 +2211,7 @@ Module sync. unsafe { atomic_compare_exchange(self.p.get(), current, new, success, failure) } } *) - Definition compare_exchange (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; current; new; success; failure ] => @@ -2155,7 +2269,7 @@ Module sync. unsafe { atomic_compare_exchange_weak(self.p.get(), current, new, success, failure) } } *) - Definition compare_exchange_weak (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; current; new; success; failure ] => @@ -2218,7 +2332,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => @@ -2245,7 +2359,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2259,7 +2373,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -2322,14 +2441,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2344,7 +2469,7 @@ Module sync. self.fetch_byte_add(val.wrapping_mul(core::mem::size_of::()), order) } *) - Definition fetch_ptr_add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_ptr_add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val; order ] => @@ -2382,7 +2507,7 @@ Module sync. self.fetch_byte_sub(val.wrapping_mul(core::mem::size_of::()), order) } *) - Definition fetch_ptr_sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_ptr_sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val; order ] => @@ -2421,7 +2546,7 @@ Module sync. unsafe { atomic_add(self.p.get(), core::ptr::invalid_mut(val), order).cast() } } *) - Definition fetch_byte_add (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_byte_add (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val; order ] => @@ -2476,7 +2601,7 @@ Module sync. unsafe { atomic_sub(self.p.get(), core::ptr::invalid_mut(val), order).cast() } } *) - Definition fetch_byte_sub (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_byte_sub (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val; order ] => @@ -2531,7 +2656,7 @@ Module sync. unsafe { atomic_or(self.p.get(), core::ptr::invalid_mut(val), order).cast() } } *) - Definition fetch_or (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val; order ] => @@ -2586,7 +2711,7 @@ Module sync. unsafe { atomic_and(self.p.get(), core::ptr::invalid_mut(val), order).cast() } } *) - Definition fetch_and (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val; order ] => @@ -2641,7 +2766,7 @@ Module sync. unsafe { atomic_xor(self.p.get(), core::ptr::invalid_mut(val), order).cast() } } *) - Definition fetch_xor (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; val; order ] => @@ -2695,7 +2820,7 @@ Module sync. self.p.get() } *) - Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -2731,7 +2856,7 @@ Module sync. Self::new(b) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b ] => ltac:(M.monadic @@ -2759,7 +2884,7 @@ Module sync. Self::new(p) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ p ] => @@ -2800,7 +2925,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -2834,7 +2959,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicI8". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -2862,7 +2987,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -2880,7 +3005,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -2917,24 +3042,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicI8" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i8" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicI8" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i8" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -2946,7 +3074,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -2969,7 +3097,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3004,19 +3132,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -3032,12 +3160,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -3055,19 +3183,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -3083,7 +3211,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3115,7 +3243,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -3125,8 +3253,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "i8" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i8" ], "get", @@ -3139,7 +3267,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -3154,7 +3283,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3186,7 +3315,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -3199,7 +3328,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3246,7 +3375,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -3315,7 +3444,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -3365,7 +3494,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -3412,7 +3541,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3451,7 +3580,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3490,7 +3619,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3529,7 +3658,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3568,7 +3697,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3607,7 +3736,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3656,7 +3785,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -3682,7 +3811,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3696,7 +3825,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -3759,14 +3893,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -3781,7 +3921,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3820,7 +3960,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -3858,7 +3998,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -3898,7 +4038,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -3932,7 +4072,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicU8". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -3960,7 +4100,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -3978,7 +4118,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -4015,24 +4155,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicU8" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u8" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicU8" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u8" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -4044,7 +4187,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -4067,7 +4210,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4102,19 +4245,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -4130,12 +4273,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -4153,19 +4296,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -4181,7 +4324,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4213,7 +4356,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -4223,8 +4366,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "u8" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u8" ], "get", @@ -4237,7 +4380,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -4252,7 +4396,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4284,7 +4428,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4297,7 +4441,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4344,7 +4488,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -4413,7 +4557,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -4463,7 +4607,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -4510,7 +4654,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4549,7 +4693,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4588,7 +4732,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4627,7 +4771,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4666,7 +4810,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4705,7 +4849,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4754,7 +4898,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -4780,7 +4924,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -4794,7 +4938,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -4857,14 +5006,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -4879,7 +5034,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4918,7 +5073,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -4956,7 +5111,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -4996,7 +5151,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -5030,7 +5185,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicI16". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -5058,7 +5213,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5076,7 +5231,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -5113,24 +5268,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicI16" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i16" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicI16" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i16" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5142,7 +5300,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -5165,7 +5323,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5200,19 +5358,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -5228,12 +5386,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -5251,19 +5409,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -5279,7 +5437,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5311,7 +5469,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -5321,8 +5479,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "i16" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i16" ], "get", @@ -5335,7 +5493,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -5350,7 +5509,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -5382,7 +5541,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -5395,7 +5554,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -5442,7 +5601,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -5511,7 +5670,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -5561,7 +5720,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -5608,7 +5767,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -5647,7 +5806,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -5686,7 +5845,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -5725,7 +5884,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -5764,7 +5923,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -5803,7 +5962,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -5852,7 +6011,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -5878,7 +6037,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5892,7 +6051,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -5955,14 +6119,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -5977,7 +6147,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6016,7 +6186,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6054,7 +6224,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6094,7 +6264,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -6128,7 +6298,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicU16". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -6156,7 +6326,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -6174,7 +6344,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -6211,24 +6381,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicU16" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u16" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicU16" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u16" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -6240,7 +6413,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -6263,7 +6436,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6298,19 +6471,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -6326,12 +6499,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -6349,19 +6522,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -6377,7 +6550,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -6409,7 +6582,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -6419,8 +6592,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "u16" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u16" ], "get", @@ -6433,7 +6606,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -6448,7 +6622,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6480,7 +6654,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -6493,7 +6667,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6540,7 +6714,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -6609,7 +6783,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -6659,7 +6833,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -6706,7 +6880,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6745,7 +6919,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6784,7 +6958,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6823,7 +6997,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6862,7 +7036,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6901,7 +7075,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -6950,7 +7124,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -6976,7 +7150,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6990,7 +7164,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -7053,14 +7232,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -7075,7 +7260,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -7114,7 +7299,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -7152,7 +7337,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7192,7 +7377,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -7226,7 +7411,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicI32". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -7254,7 +7439,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -7272,7 +7457,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -7309,24 +7494,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicI32" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i32" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicI32" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i32" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -7338,7 +7526,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -7361,7 +7549,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7396,19 +7584,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -7424,12 +7612,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -7447,19 +7635,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -7475,7 +7663,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -7507,7 +7695,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -7517,8 +7705,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "i32" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i32" ], "get", @@ -7531,7 +7719,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -7546,7 +7735,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -7578,7 +7767,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -7591,7 +7780,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -7638,7 +7827,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -7707,7 +7896,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -7757,7 +7946,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -7804,7 +7993,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -7843,7 +8032,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -7882,7 +8071,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -7921,7 +8110,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -7960,7 +8149,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -7999,7 +8188,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -8048,7 +8237,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -8074,7 +8263,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -8088,7 +8277,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -8151,14 +8345,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -8173,7 +8373,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -8212,7 +8412,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -8250,7 +8450,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8290,7 +8490,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -8324,7 +8524,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicU32". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -8352,7 +8552,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -8370,7 +8570,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -8407,24 +8607,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicU32" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u32" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicU32" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u32" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -8436,7 +8639,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -8459,7 +8662,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8494,19 +8697,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -8522,12 +8725,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -8545,19 +8748,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -8573,7 +8776,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -8605,7 +8808,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -8615,8 +8818,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "u32" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u32" ], "get", @@ -8629,7 +8832,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -8644,7 +8848,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -8676,7 +8880,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -8689,7 +8893,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -8736,7 +8940,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -8805,7 +9009,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -8855,7 +9059,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -8902,7 +9106,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -8941,7 +9145,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -8980,7 +9184,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -9019,7 +9223,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -9058,7 +9262,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -9097,7 +9301,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -9146,7 +9350,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -9172,7 +9376,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -9186,7 +9390,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -9249,14 +9458,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -9271,7 +9486,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -9310,7 +9525,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -9348,7 +9563,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9388,7 +9603,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -9422,7 +9637,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicI64". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -9450,7 +9665,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -9468,7 +9683,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -9505,24 +9720,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicI64" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i64" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicI64" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i64" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -9534,7 +9752,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -9557,7 +9775,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9592,19 +9810,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -9620,12 +9838,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -9643,19 +9861,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -9671,7 +9889,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -9703,7 +9921,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -9713,8 +9931,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "i64" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "i64" ], "get", @@ -9727,7 +9945,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -9742,7 +9961,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -9774,7 +9993,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -9787,7 +10006,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -9834,7 +10053,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -9903,7 +10122,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -9953,7 +10172,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -10000,7 +10219,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10039,7 +10258,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10078,7 +10297,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10117,7 +10336,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10156,7 +10375,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10195,7 +10414,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10244,7 +10463,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -10270,7 +10489,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -10284,7 +10503,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -10347,14 +10571,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -10369,7 +10599,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10408,7 +10638,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10446,7 +10676,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10486,7 +10716,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -10520,7 +10750,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicU64". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -10548,7 +10778,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -10566,7 +10796,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -10603,24 +10833,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicU64" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u64" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicU64" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u64" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -10632,7 +10865,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -10655,7 +10888,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10690,19 +10923,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -10718,12 +10951,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -10741,19 +10974,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -10769,7 +11002,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -10801,7 +11034,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -10811,8 +11044,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "u64" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "u64" ], "get", @@ -10825,7 +11058,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -10840,7 +11074,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10872,7 +11106,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -10885,7 +11119,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -10932,7 +11166,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -11001,7 +11235,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -11051,7 +11285,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -11098,7 +11332,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -11137,7 +11371,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -11176,7 +11410,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -11215,7 +11449,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -11254,7 +11488,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -11293,7 +11527,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -11342,7 +11576,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -11368,7 +11602,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -11382,7 +11616,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -11445,14 +11684,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -11467,7 +11712,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -11506,7 +11751,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -11544,7 +11789,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11584,7 +11829,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -11618,7 +11863,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicIsize". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -11646,7 +11891,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -11664,7 +11909,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -11701,24 +11946,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicIsize" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "isize" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicIsize" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "isize" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -11730,7 +11978,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -11753,7 +12001,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11788,19 +12036,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -11816,12 +12064,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -11839,19 +12087,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -11867,7 +12115,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -11899,7 +12147,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -11909,8 +12157,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "isize" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "isize" ], "get", @@ -11923,7 +12171,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -11938,7 +12187,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -11970,7 +12219,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -11983,7 +12232,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -12030,7 +12279,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -12099,7 +12348,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -12152,7 +12401,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -12199,7 +12448,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -12238,7 +12487,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -12277,7 +12526,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -12316,7 +12565,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -12355,7 +12604,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -12394,7 +12643,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -12443,7 +12692,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -12469,7 +12718,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -12483,7 +12732,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -12546,14 +12800,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -12568,7 +12828,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -12607,7 +12867,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -12645,7 +12905,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -12685,7 +12945,7 @@ Module sync. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -12719,7 +12979,7 @@ Module sync. Definition Self : Ty.t := Ty.path "core::sync::atomic::AtomicUsize". (* fn from(v: $int_type) -> Self { Self::new(v) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic @@ -12747,7 +13007,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -12765,7 +13025,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -12802,24 +13062,27 @@ Module sync. Self {v: UnsafeCell::new(v)} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in - Value.StructRecord - "core::sync::atomic::AtomicUsize" - [ - ("v", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "usize" ], - "new", - [] - |), - [ M.read (| v |) ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::sync::atomic::AtomicUsize" + [ + ("v", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "usize" ], + "new", + [] + |), + [ M.read (| v |) ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -12831,7 +13094,7 @@ Module sync. unsafe { &*ptr.cast() } } *) - Definition from_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition from_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ ptr ] => ltac:(M.monadic @@ -12854,7 +13117,7 @@ Module sync. self.v.get_mut() } *) - Definition get_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -12889,19 +13152,19 @@ Module sync. unsafe { &mut *(v as *mut $int_type as *mut Self) } } *) - Definition from_mut (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -12917,12 +13180,12 @@ Module sync. unsafe { &mut *(this as *mut [Self] as *mut [$int_type]) } } *) - Definition get_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| this |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| this |) |)) |) |))) | _, _ => M.impossible end. @@ -12940,19 +13203,19 @@ Module sync. unsafe { &mut *(v as *mut [$int_type] as *mut [Self]) } } *) - Definition from_mut_slice (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v ] => ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| M.match_operator (| - M.alloc (| repeat (Value.Tuple []) 0 |), + M.alloc (| repeat (| M.of_value (| Value.Tuple [] |), 0 |) |), [ fun γ => ltac:(M.monadic (M.alloc (| - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| v |) |)) |)) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| v |) |)) |) |) |))) ] |) @@ -12968,7 +13231,7 @@ Module sync. self.v.into_inner() } *) - Definition into_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13000,7 +13263,7 @@ Module sync. unsafe { atomic_load(self.v.get(), order) } } *) - Definition load (τ : list Ty.t) (α : list Value.t) : M := + Definition load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; order ] => ltac:(M.monadic @@ -13010,8 +13273,8 @@ Module sync. M.get_function (| "core::sync::atomic::atomic_load", [ Ty.path "usize" ] |), [ (* MutToConstPointer *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::cell::UnsafeCell") [ Ty.path "usize" ], "get", @@ -13024,7 +13287,8 @@ Module sync. "v" |) ] - |)); + |) + |); M.read (| order |) ] |))) @@ -13039,7 +13303,7 @@ Module sync. unsafe { atomic_store(self.v.get(), val, order); } } *) - Definition store (τ : list Ty.t) (α : list Value.t) : M := + Definition store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13071,7 +13335,7 @@ Module sync. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -13084,7 +13348,7 @@ Module sync. unsafe { atomic_swap(self.v.get(), val, order) } } *) - Definition swap (τ : list Ty.t) (α : list Value.t) : M := + Definition swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13131,7 +13395,7 @@ Module sync. } } *) - Definition compare_and_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_and_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; order ] => ltac:(M.monadic @@ -13200,7 +13464,7 @@ Module sync. unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) } } *) - Definition compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -13253,7 +13517,7 @@ Module sync. } } *) - Definition compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; current; new; success; failure ] => ltac:(M.monadic @@ -13300,7 +13564,7 @@ Module sync. unsafe { atomic_add(self.v.get(), val, order) } } *) - Definition fetch_add (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13339,7 +13603,7 @@ Module sync. unsafe { atomic_sub(self.v.get(), val, order) } } *) - Definition fetch_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13378,7 +13642,7 @@ Module sync. unsafe { atomic_and(self.v.get(), val, order) } } *) - Definition fetch_and (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13417,7 +13681,7 @@ Module sync. unsafe { atomic_nand(self.v.get(), val, order) } } *) - Definition fetch_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13456,7 +13720,7 @@ Module sync. unsafe { atomic_or(self.v.get(), val, order) } } *) - Definition fetch_or (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13495,7 +13759,7 @@ Module sync. unsafe { atomic_xor(self.v.get(), val, order) } } *) - Definition fetch_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13544,7 +13808,7 @@ Module sync. Err(prev) } *) - Definition fetch_update (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_update (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ self; set_order; fetch_order; f ] => ltac:(M.monadic @@ -13570,7 +13834,7 @@ Module sync. M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -13584,7 +13848,12 @@ Module sync. "call_mut", [] |), - [ f; Value.Tuple [ M.read (| prev |) ] ] + [ + f; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| prev |)) ] + |) + ] |) |) in let γ0_0 := @@ -13647,14 +13916,20 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) ] |))) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| prev |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| prev |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -13669,7 +13944,7 @@ Module sync. unsafe { $max_fn(self.v.get(), val, order) } } *) - Definition fetch_max (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13708,7 +13983,7 @@ Module sync. unsafe { $min_fn(self.v.get(), val, order) } } *) - Definition fetch_min (τ : list Ty.t) (α : list Value.t) : M := + Definition fetch_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; val; order ] => ltac:(M.monadic @@ -13746,7 +14021,7 @@ Module sync. self.v.get() } *) - Definition as_ptr (τ : list Ty.t) (α : list Value.t) : M := + Definition as_ptr (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -13771,23 +14046,23 @@ Module sync. Axiom AssociatedFunction_as_ptr : M.IsAssociatedFunction Self "as_ptr" as_ptr. End Impl_core_sync_atomic_AtomicUsize. - Definition value_ATOMIC_ISIZE_INIT : Value.t := + Definition value_ATOMIC_ISIZE_INIT : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::sync::atomic::AtomicIsize", "new", [] |), - [ Value.Integer Integer.Isize 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |))). - Definition value_ATOMIC_USIZE_INIT : Value.t := + Definition value_ATOMIC_USIZE_INIT : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::sync::atomic::AtomicUsize", "new", [] |), - [ Value.Integer Integer.Usize 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |))). @@ -13802,7 +14077,7 @@ Module sync. } } *) - Definition strongest_failure_ordering (τ : list Ty.t) (α : list Value.t) : M := + Definition strongest_failure_ordering (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ order ] => ltac:(M.monadic @@ -13813,19 +14088,29 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |) + |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |) + |))) ] |) |))) @@ -13846,7 +14131,7 @@ Module sync. } } *) - Definition atomic_store (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_store (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -13896,15 +14181,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "there is no such thing as an acquire store" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as an acquire store" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -13926,16 +14218,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "there is no such thing as an acquire-release store" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as an acquire-release store" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -13962,7 +14260,7 @@ Module sync. } } *) - Definition atomic_load (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_load (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; order ] => ltac:(M.monadic @@ -14011,15 +14309,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "there is no such thing as a release load" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as a release load" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -14041,16 +14346,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "there is no such thing as an acquire-release load" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as an acquire-release load" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -14077,7 +14388,7 @@ Module sync. } } *) - Definition atomic_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -14148,7 +14459,7 @@ Module sync. } } *) - Definition atomic_add (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -14219,7 +14530,7 @@ Module sync. } } *) - Definition atomic_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -14309,7 +14620,7 @@ Module sync. if ok { Ok(val) } else { Err(val) } } *) - Definition atomic_compare_exchange (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_compare_exchange (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; old; new; success; failure ] => ltac:(M.monadic @@ -14321,7 +14632,12 @@ Module sync. M.read (| M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| success |); M.read (| failure |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| success |)); A.to_value (M.read (| failure |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -14535,16 +14851,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "there is no such thing as an acquire-release failure ordering" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as an acquire-release failure ordering" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -14568,16 +14890,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "there is no such thing as a release failure ordering" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as a release failure ordering" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -14594,7 +14922,7 @@ Module sync. let val := M.copy (| γ0_0 |) in let ok := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14602,12 +14930,20 @@ Module sync. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| val |)) ] + |) |))) ] |))) @@ -14650,7 +14986,7 @@ Module sync. if ok { Ok(val) } else { Err(val) } } *) - Definition atomic_compare_exchange_weak (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_compare_exchange_weak (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; old; new; success; failure ] => ltac:(M.monadic @@ -14662,7 +14998,12 @@ Module sync. M.read (| M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| success |); M.read (| failure |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| success |)); A.to_value (M.read (| failure |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -14876,16 +15217,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "there is no such thing as an acquire-release failure ordering" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as an acquire-release failure ordering" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -14909,16 +15256,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "there is no such thing as a release failure ordering" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as a release failure ordering" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -14935,7 +15288,7 @@ Module sync. let val := M.copy (| γ0_0 |) in let ok := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -14943,12 +15296,20 @@ Module sync. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| val |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| val |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| val |)) ] + |) |))) ] |))) @@ -14972,7 +15333,7 @@ Module sync. } } *) - Definition atomic_and (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_and (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -15043,7 +15404,7 @@ Module sync. } } *) - Definition atomic_nand (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_nand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -15114,7 +15475,7 @@ Module sync. } } *) - Definition atomic_or (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_or (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -15185,7 +15546,7 @@ Module sync. } } *) - Definition atomic_xor (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_xor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -15256,7 +15617,7 @@ Module sync. } } *) - Definition atomic_max (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_max (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -15327,7 +15688,7 @@ Module sync. } } *) - Definition atomic_min (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_min (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -15398,7 +15759,7 @@ Module sync. } } *) - Definition atomic_umax (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_umax (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -15469,7 +15830,7 @@ Module sync. } } *) - Definition atomic_umin (τ : list Ty.t) (α : list Value.t) : M := + Definition atomic_umin (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ dst; val; order ] => ltac:(M.monadic @@ -15540,7 +15901,7 @@ Module sync. } } *) - Definition fence (τ : list Ty.t) (α : list Value.t) : M := + Definition fence (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ order ] => ltac:(M.monadic @@ -15596,15 +15957,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "there is no such thing as a relaxed fence" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as a relaxed fence" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -15631,7 +15999,7 @@ Module sync. } } *) - Definition compiler_fence (τ : list Ty.t) (α : list Value.t) : M := + Definition compiler_fence (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ order ] => ltac:(M.monadic @@ -15699,16 +16067,22 @@ Module sync. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "there is no such thing as a relaxed compiler fence" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "there is no such thing as a relaxed compiler fence" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -15729,7 +16103,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -15747,7 +16121,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -15773,7 +16147,7 @@ Module sync. fmt::Debug::fmt(&self.load(Ordering::Relaxed), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -15798,7 +16172,7 @@ Module sync. |), [ M.read (| self |); - Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |) ] |) |); @@ -15825,7 +16199,7 @@ Module sync. fmt::Pointer::fmt(&self.load(Ordering::SeqCst), f) } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -15848,7 +16222,9 @@ Module sync. "load", [] |), - [ M.read (| self |); Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] + [ + M.read (| self |); + M.of_value (| Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] |) ] |) |); @@ -15872,7 +16248,7 @@ Module sync. spin_loop() } *) - Definition spin_loop_hint (τ : list Ty.t) (α : list Value.t) : M := + Definition spin_loop_hint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.call_closure (| M.get_function (| "core::hint::spin_loop", [] |), [] |))) diff --git a/CoqOfRust/core/sync/exclusive.v b/CoqOfRust/core/sync/exclusive.v index 6184f6d1e..b37864234 100644 --- a/CoqOfRust/core/sync/exclusive.v +++ b/CoqOfRust/core/sync/exclusive.v @@ -15,20 +15,23 @@ Module sync. Ty.apply (Ty.path "core::sync::exclusive::Exclusive") [ T ]. (* Default *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::sync::exclusive::Exclusive" - [ - ("inner", - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::sync::exclusive::Exclusive" + [ + ("inner", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -63,7 +66,7 @@ Module sync. f.debug_struct("Exclusive").finish_non_exhaustive() } *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -84,7 +87,7 @@ Module sync. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Exclusive" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Exclusive" |) |) ] |) |) ] @@ -110,13 +113,17 @@ Module sync. Self { inner: t } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => ltac:(M.monadic (let t := M.alloc (| t |) in - Value.StructRecord "core::sync::exclusive::Exclusive" [ ("inner", M.read (| t |)) ])) + M.of_value (| + Value.StructRecord + "core::sync::exclusive::Exclusive" + [ ("inner", A.to_value (M.read (| t |))) ] + |))) | _, _ => M.impossible end. @@ -129,7 +136,7 @@ Module sync. self.inner } *) - Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition into_inner (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -153,7 +160,7 @@ Module sync. &mut self.inner } *) - Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -178,7 +185,7 @@ Module sync. unsafe { Pin::new_unchecked(&mut self.get_unchecked_mut().inner) } } *) - Definition get_pin_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition get_pin_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -224,13 +231,13 @@ Module sync. unsafe { &mut *(r as *mut T as *mut Exclusive) } } *) - Definition from_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ r ] => ltac:(M.monadic (let r := M.alloc (| r |) in - M.rust_cast (M.read (| M.use (M.alloc (| M.read (| r |) |)) |)))) + M.rust_cast (| M.read (| M.use (M.alloc (| M.read (| r |) |)) |) |))) | _, _ => M.impossible end. @@ -245,7 +252,7 @@ Module sync. unsafe { Pin::new_unchecked(Self::from_mut(r.get_unchecked_mut())) } } *) - Definition from_pin_mut (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_pin_mut (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ r ] => @@ -301,7 +308,7 @@ Module sync. Self::new(t) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => @@ -339,7 +346,7 @@ Module sync. self.into_inner().call_once(args) } *) - Definition call_once (F Args : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call_once (F Args : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F Args in match τ, α with | [], [ self; args ] => @@ -385,7 +392,7 @@ Module sync. self.get_mut().call_mut(args) } *) - Definition call_mut (F Args : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition call_mut (F Args : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self F Args in match τ, α with | [], [ self; args ] => @@ -430,7 +437,7 @@ Module sync. self.get_pin_mut().poll(cx) } *) - Definition poll (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition poll (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; cx ] => @@ -479,7 +486,7 @@ Module sync. G::resume(self.get_pin_mut(), arg) } *) - Definition resume (R G : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition resume (R G : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self R G in match τ, α with | [], [ self; arg ] => diff --git a/CoqOfRust/core/task/poll.v b/CoqOfRust/core/task/poll.v index 945068dae..98cdb4498 100644 --- a/CoqOfRust/core/task/poll.v +++ b/CoqOfRust/core/task/poll.v @@ -39,7 +39,7 @@ Module task. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::task::poll::Poll") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -60,19 +60,24 @@ Module task. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "core::task::poll::Poll::Pending" [] |) + |))) ] |) |))) @@ -92,7 +97,7 @@ Module task. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::task::poll::Poll") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -122,8 +127,8 @@ Module task. |), [ M.read (| f |); - M.read (| Value.String "Ready" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Ready" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -137,7 +142,7 @@ Module task. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Pending" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Pending" |) |) ] |) |))) ] @@ -171,7 +176,7 @@ Module task. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::task::poll::Poll") [ T ]. (* Eq *) - Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -179,8 +184,8 @@ Module task. (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -212,7 +217,7 @@ Module task. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::task::poll::Poll") [ T ]. (* PartialEq *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -242,11 +247,16 @@ Module task. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -280,7 +290,7 @@ Module task. [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -303,7 +313,7 @@ Module task. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::task::poll::Poll") [ T ]. (* Ord *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -342,7 +352,12 @@ Module task. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -372,7 +387,9 @@ Module task. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + |))) ] |))); fun γ => @@ -398,7 +415,7 @@ Module task. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::task::poll::Poll") [ T ]. (* PartialOrd *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -427,7 +444,11 @@ Module task. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -494,7 +515,7 @@ Module task. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::task::poll::Poll") [ T ]. (* Hash *) - Definition hash (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ __H ], [ self; state ] => @@ -544,7 +565,7 @@ Module task. [ M.read (| __self_0 |); M.read (| state |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -574,7 +595,7 @@ Module task. } } *) - Definition map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ self; f ] => @@ -595,24 +616,32 @@ Module task. |) in let t := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ T ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| t |) ] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ T ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| Value.Tuple [ A.to_value (M.read (| t |)) ] |) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::task::poll::Poll::Pending" [] |) + |))) ] |) |))) @@ -628,7 +657,7 @@ Module task. matches!( *self, Poll::Ready(_)) } *) - Definition is_ready (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_ready (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -646,8 +675,8 @@ Module task. "core::task::poll::Poll::Ready", 0 |) in - M.alloc (| Value.Bool true |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -663,21 +692,22 @@ Module task. !self.is_ready() } *) - Definition is_pending (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_pending (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::task::poll::Poll") [ T ], "is_ready", [] |), [ M.read (| self |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -704,7 +734,7 @@ Module task. } } *) - Definition map_ok (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_ok (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ U; F ], [ self; f ] => @@ -731,24 +761,35 @@ Module task. |) in let t := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ T ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| t |) ] ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ T ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| t |)) ] + |) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -766,13 +807,24 @@ Module task. |) in let e := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::task::poll::Poll::Pending" [] |) + |))) ] |) |))) @@ -795,7 +847,7 @@ Module task. } } *) - Definition map_err (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_err (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ U; F ], [ self; f ] => @@ -822,9 +874,18 @@ Module task. |) in let t := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ Value.StructTuple "core::result::Result::Ok" [ M.read (| t |) ] ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| t |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -842,28 +903,41 @@ Module task. |) in let e := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ E ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| e |) ] ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ E ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| e |)) ] + |) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::task::poll::Poll::Pending" [] |) + |))) ] |) |))) @@ -898,7 +972,7 @@ Module task. } } *) - Definition map_ok (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_ok (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ U; F ], [ self; f ] => @@ -931,28 +1005,42 @@ Module task. |) in let t := M.copy (| γ2_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ T ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| t |) ] ] - |) - ] - ] - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ T ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| t |)) ] + |) + ] + |)) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -976,13 +1064,25 @@ Module task. |) in let e := M.copy (| γ2_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] ] - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -993,13 +1093,20 @@ Module task. 0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::task::poll::Poll::Pending" [] |) + |))) ] |) |))) @@ -1023,7 +1130,7 @@ Module task. } } *) - Definition map_err (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map_err (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [ U; F ], [ self; f ] => @@ -1056,13 +1163,25 @@ Module task. |) in let t := M.copy (| γ2_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "core::result::Result::Ok" [ M.read (| t |) ] ] - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| t |)) ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1086,28 +1205,42 @@ Module task. |) in let e := M.copy (| γ2_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::function::FnOnce", - F, - [ Ty.tuple [ E ] ], - "call_once", - [] - |), - [ M.read (| f |); Value.Tuple [ M.read (| e |) ] ] - |) - ] - ] - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnOnce", + F, + [ Ty.tuple [ E ] ], + "call_once", + [] + |), + [ + M.read (| f |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| e |)) ] + |) + ] + |)) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1118,13 +1251,20 @@ Module task. 0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ Value.StructTuple "core::option::Option::None" [] ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::task::poll::Poll::Pending" [] |) + |))) ] |) |))) @@ -1144,13 +1284,15 @@ Module task. Poll::Ready(t) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ t ] => ltac:(M.monadic (let t := M.alloc (| t |) in - Value.StructTuple "core::task::poll::Poll::Ready" [ M.read (| t |) ])) + M.of_value (| + Value.StructTuple "core::task::poll::Poll::Ready" [ A.to_value (M.read (| t |)) ] + |))) | _, _ => M.impossible end. @@ -1181,7 +1323,7 @@ Module task. c.map(Ok) } *) - Definition from_output (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_output (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ c ] => @@ -1196,7 +1338,7 @@ Module task. Ty.function [ T ] (Ty.apply (Ty.path "core::result::Result") [ T; E ]) ] |), - [ M.read (| c |); M.constructor_as_closure "core::result::Result::Ok" ] + [ M.read (| c |); M.constructor_as_closure (| "core::result::Result::Ok" |) ] |))) | _, _ => M.impossible end. @@ -1210,7 +1352,7 @@ Module task. } } *) - Definition branch (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition branch (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -1236,9 +1378,18 @@ Module task. |) in let x := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ Value.StructTuple "core::task::poll::Poll::Ready" [ M.read (| x |) ] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ A.to_value (M.read (| x |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1256,16 +1407,32 @@ Module task. |) in let e := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ Value.StructTuple "core::task::poll::Poll::Pending" [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::task::poll::Poll::Pending" [] + |)) + ] + |) |))) ] |) @@ -1301,7 +1468,7 @@ Module task. } } *) - Definition from_residual (T E F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_residual (T E F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E F in match τ, α with | [], [ x ] => @@ -1321,24 +1488,30 @@ Module task. |) in let e := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - F, - [ E ], - "from", - [] - |), - [ M.read (| e |) ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + F, + [ E ], + "from", + [] + |), + [ M.read (| e |) ] + |)) + ] + |)) + ] + |) |))) ] |) @@ -1384,7 +1557,7 @@ Module task. c.map(|x| x.map(Ok)) } *) - Definition from_output (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_output (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ c ] => @@ -1409,8 +1582,8 @@ Module task. |), [ M.read (| c |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1433,13 +1606,14 @@ Module task. |), [ M.read (| x |); - M.constructor_as_closure "core::result::Result::Ok" + M.constructor_as_closure (| "core::result::Result::Ok" |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -1455,7 +1629,7 @@ Module task. } } *) - Definition branch (T E : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition branch (T E : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E in match τ, α with | [], [ self ] => @@ -1487,13 +1661,25 @@ Module task. |) in let x := M.copy (| γ2_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ - Value.StructTuple - "core::task::poll::Poll::Ready" - [ Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] ] - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| x |)) ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1517,9 +1703,18 @@ Module task. |) in let e := M.copy (| γ2_0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Break" - [ Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Break" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -1530,20 +1725,37 @@ Module task. 0 |) in M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ - Value.StructTuple - "core::task::poll::Poll::Ready" - [ Value.StructTuple "core::option::Option::None" [] ] - ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::ops::control_flow::ControlFlow::Continue" - [ Value.StructTuple "core::task::poll::Poll::Pending" [] ] + M.of_value (| + Value.StructTuple + "core::ops::control_flow::ControlFlow::Continue" + [ + A.to_value + (M.of_value (| + Value.StructTuple "core::task::poll::Poll::Pending" [] + |)) + ] + |) |))) ] |) @@ -1583,7 +1795,7 @@ Module task. } } *) - Definition from_residual (T E F : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from_residual (T E F : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T E F in match τ, α with | [], [ x ] => @@ -1603,28 +1815,37 @@ Module task. |) in let e := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::task::poll::Poll::Ready" - [ - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - F, - [ E ], - "from", - [] - |), - [ M.read (| e |) ] - |) - ] - ] - ] + M.of_value (| + Value.StructTuple + "core::task::poll::Poll::Ready" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + F, + [ E ], + "from", + [] + |), + [ M.read (| e |) ] + |)) + ] + |)) + ] + |)) + ] + |) |))) ] |) diff --git a/CoqOfRust/core/task/wake.v b/CoqOfRust/core/task/wake.v index 0d1170665..376810274 100644 --- a/CoqOfRust/core/task/wake.v +++ b/CoqOfRust/core/task/wake.v @@ -29,28 +29,29 @@ Module task. Definition Self : Ty.t := Ty.path "core::task::wake::RawWaker". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWaker", "data" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::task::wake::RawWaker", "data" |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -89,7 +90,7 @@ Module task. Definition Self : Ty.t := Ty.path "core::task::wake::RawWaker". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -103,25 +104,27 @@ Module task. |), [ M.read (| f |); - M.read (| Value.String "RawWaker" |); - M.read (| Value.String "data" |); + M.read (| M.of_value (| Value.String "RawWaker" |) |); + M.read (| M.of_value (| Value.String "data" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWaker", "data" - |)); - M.read (| Value.String "vtable" |); + |) + |); + M.read (| M.of_value (| Value.String "vtable" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWaker", "vtable" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -143,15 +146,20 @@ Module task. RawWaker { data, vtable } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ data; vtable ] => ltac:(M.monadic (let data := M.alloc (| data |) in let vtable := M.alloc (| vtable |) in - Value.StructRecord - "core::task::wake::RawWaker" - [ ("data", M.read (| data |)); ("vtable", M.read (| vtable |)) ])) + M.of_value (| + Value.StructRecord + "core::task::wake::RawWaker" + [ + ("data", A.to_value (M.read (| data |))); + ("vtable", A.to_value (M.read (| vtable |))) + ] + |))) | _, _ => M.impossible end. @@ -162,7 +170,7 @@ Module task. self.data } *) - Definition data (τ : list Ty.t) (α : list Value.t) : M := + Definition data (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -184,7 +192,7 @@ Module task. self.vtable } *) - Definition vtable (τ : list Ty.t) (α : list Value.t) : M := + Definition vtable (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -234,7 +242,7 @@ Module task. Definition Self : Ty.t := Ty.path "core::task::wake::RawWakerVTable". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -243,71 +251,75 @@ Module task. LogicalOp.and (| LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWakerVTable", "clone" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::task::wake::RawWakerVTable", "clone" |) - |)), + |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWakerVTable", "wake" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::task::wake::RawWakerVTable", "wake" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWakerVTable", "wake_by_ref" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::task::wake::RawWakerVTable", "wake_by_ref" |) - |)))) + |) + |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWakerVTable", "drop" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::task::wake::RawWakerVTable", "drop" |) - |)))) + |) + |))) |))) | _, _ => M.impossible end. @@ -335,29 +347,29 @@ Module task. Definition Self : Ty.t := Ty.path "core::task::wake::RawWakerVTable". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -382,7 +394,7 @@ Module task. Definition Self : Ty.t := Ty.path "core::task::wake::RawWakerVTable". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -396,41 +408,45 @@ Module task. |), [ M.read (| f |); - M.read (| Value.String "RawWakerVTable" |); - M.read (| Value.String "clone" |); + M.read (| M.of_value (| Value.String "RawWakerVTable" |) |); + M.read (| M.of_value (| Value.String "clone" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWakerVTable", "clone" - |)); - M.read (| Value.String "wake" |); + |) + |); + M.read (| M.of_value (| Value.String "wake" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWakerVTable", "wake" - |)); - M.read (| Value.String "wake_by_ref" |); + |) + |); + M.read (| M.of_value (| Value.String "wake_by_ref" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWakerVTable", "wake_by_ref" - |)); - M.read (| Value.String "drop" |); + |) + |); + M.read (| M.of_value (| Value.String "drop" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::RawWakerVTable", "drop" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -457,7 +473,7 @@ Module task. Self { clone, wake, wake_by_ref, drop } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ clone; wake; wake_by_ref; drop ] => ltac:(M.monadic @@ -465,14 +481,16 @@ Module task. let wake := M.alloc (| wake |) in let wake_by_ref := M.alloc (| wake_by_ref |) in let drop := M.alloc (| drop |) in - Value.StructRecord - "core::task::wake::RawWakerVTable" - [ - ("clone", M.read (| clone |)); - ("wake", M.read (| wake |)); - ("wake_by_ref", M.read (| wake_by_ref |)); - ("drop", M.read (| drop |)) - ])) + M.of_value (| + Value.StructRecord + "core::task::wake::RawWakerVTable" + [ + ("clone", A.to_value (M.read (| clone |))); + ("wake", A.to_value (M.read (| wake |))); + ("wake_by_ref", A.to_value (M.read (| wake_by_ref |))); + ("drop", A.to_value (M.read (| drop |))) + ] + |))) | _, _ => M.impossible end. @@ -509,18 +527,22 @@ Module task. Context { waker, _marker: PhantomData, _marker2: PhantomData } } *) - Definition from_waker (τ : list Ty.t) (α : list Value.t) : M := + Definition from_waker (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ waker ] => ltac:(M.monadic (let waker := M.alloc (| waker |) in - Value.StructRecord - "core::task::wake::Context" - [ - ("waker", M.read (| waker |)); - ("_marker", Value.StructTuple "core::marker::PhantomData" []); - ("_marker2", Value.StructTuple "core::marker::PhantomData" []) - ])) + M.of_value (| + Value.StructRecord + "core::task::wake::Context" + [ + ("waker", A.to_value (M.read (| waker |))); + ("_marker", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))); + ("_marker2", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |))) | _, _ => M.impossible end. @@ -531,7 +553,7 @@ Module task. &self.waker } *) - Definition waker (τ : list Ty.t) (α : list Value.t) : M := + Definition waker (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -557,7 +579,7 @@ Module task. f.debug_struct("Context").field("waker", &self.waker).finish() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -584,17 +606,18 @@ Module task. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Context" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Context" |) |) ] |) |); - M.read (| Value.String "waker" |); + M.read (| M.of_value (| Value.String "waker" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::Context", "waker" - |)) + |) + |) ] |) ] @@ -669,7 +692,7 @@ Module task. unsafe { (wake)(data) }; } *) - Definition wake (τ : list Ty.t) (α : list Value.t) : M := + Definition wake (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -714,7 +737,7 @@ Module task. |) in let _ := M.alloc (| M.call_closure (| M.read (| wake |), [ M.read (| data |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -730,7 +753,7 @@ Module task. unsafe { (self.waker.vtable.wake_by_ref)(self.waker.data) } } *) - Definition wake_by_ref (τ : list Ty.t) (α : list Value.t) : M := + Definition wake_by_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -777,7 +800,7 @@ Module task. self.waker == other.waker } *) - Definition will_wake (τ : list Ty.t) (α : list Value.t) : M := + Definition will_wake (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -814,12 +837,16 @@ Module task. Waker { waker } } *) - Definition from_raw (τ : list Ty.t) (α : list Value.t) : M := + Definition from_raw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ waker ] => ltac:(M.monadic (let waker := M.alloc (| waker |) in - Value.StructRecord "core::task::wake::Waker" [ ("waker", M.read (| waker |)) ])) + M.of_value (| + Value.StructRecord + "core::task::wake::Waker" + [ ("waker", A.to_value (M.read (| waker |))) ] + |))) | _, _ => M.impossible end. @@ -842,13 +869,18 @@ Module task. Waker { waker: RAW } } *) - Definition noop (τ : list Ty.t) (α : list Value.t) : M := + Definition noop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::task::wake::Waker" - [ ("waker", M.read (| M.get_constant (| "core::task::wake::noop::RAW" |) |)) ])) + (M.of_value (| + Value.StructRecord + "core::task::wake::Waker" + [ + ("waker", + A.to_value (M.read (| M.get_constant (| "core::task::wake::noop::RAW" |) |))) + ] + |))) | _, _ => M.impossible end. @@ -859,7 +891,7 @@ Module task. &self.waker } *) - Definition as_raw (τ : list Ty.t) (α : list Value.t) : M := + Definition as_raw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -888,48 +920,51 @@ Module task. } } *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::task::wake::Waker" - [ - ("waker", - M.call_closure (| - M.read (| - M.SubPointer.get_struct_record_field (| + M.of_value (| + Value.StructRecord + "core::task::wake::Waker" + [ + ("waker", + A.to_value + (M.call_closure (| M.read (| M.SubPointer.get_struct_record_field (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::task::wake::Waker", - "waker" + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::task::wake::Waker", + "waker" + |), + "core::task::wake::RawWaker", + "vtable" + |) |), - "core::task::wake::RawWaker", - "vtable" + "core::task::wake::RawWakerVTable", + "clone" |) |), - "core::task::wake::RawWakerVTable", - "clone" - |) - |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::task::wake::Waker", - "waker" - |), - "core::task::wake::RawWaker", - "data" - |) - |) - ] - |)) - ])) + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::task::wake::Waker", + "waker" + |), + "core::task::wake::RawWaker", + "data" + |) + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -940,7 +975,7 @@ Module task. } } *) - Definition clone_from (τ : list Ty.t) (α : list Value.t) : M := + Definition clone_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; source ] => ltac:(M.monadic @@ -948,22 +983,23 @@ Module task. let source := M.alloc (| source |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "core::task::wake::Waker", "will_wake", [] |), [ M.read (| self |); M.read (| source |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -980,8 +1016,8 @@ Module task. [ M.read (| source |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -1009,7 +1045,7 @@ Module task. unsafe { (self.waker.vtable.drop)(self.waker.data) } } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1069,7 +1105,7 @@ Module task. .finish() } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -1122,13 +1158,14 @@ Module task. "debug_struct", [] |), - [ M.read (| f |); M.read (| Value.String "Waker" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Waker" |) |) + ] |) |); - M.read (| Value.String "data" |); + M.read (| M.of_value (| Value.String "data" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::task::wake::Waker", @@ -1136,11 +1173,12 @@ Module task. |), "core::task::wake::RawWaker", "data" - |)) + |) + |) ] |); - M.read (| Value.String "vtable" |); - (* Unsize *) M.pointer_coercion vtable_ptr + M.read (| M.of_value (| Value.String "vtable" |) |); + (* Unsize *) M.pointer_coercion (| vtable_ptr |) ] |) ] diff --git a/CoqOfRust/core/time.v b/CoqOfRust/core/time.v index 08a106e51..2f63b975c 100644 --- a/CoqOfRust/core/time.v +++ b/CoqOfRust/core/time.v @@ -2,20 +2,20 @@ Require Import CoqOfRust.CoqOfRust. Module time. - Definition value_NANOS_PER_SEC : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 1000000000 |))). + Definition value_NANOS_PER_SEC : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1000000000 |) |))). - Definition value_NANOS_PER_MILLI : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 1000000 |))). + Definition value_NANOS_PER_MILLI : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1000000 |) |))). - Definition value_NANOS_PER_MICRO : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 1000 |))). + Definition value_NANOS_PER_MICRO : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1000 |) |))). - Definition value_MILLIS_PER_SEC : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 1000 |))). + Definition value_MILLIS_PER_SEC : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1000 |) |))). - Definition value_MICROS_PER_SEC : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U64 1000000 |))). + Definition value_MICROS_PER_SEC : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1000000 |) |))). (* StructTuple { @@ -28,14 +28,14 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Nanoseconds". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -76,27 +76,28 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Nanoseconds". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "core::time::Nanoseconds", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "core::time::Nanoseconds", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -123,15 +124,15 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Nanoseconds". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -150,7 +151,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Nanoseconds". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -192,7 +193,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Nanoseconds". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -228,7 +229,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Nanoseconds". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -265,11 +266,15 @@ Module time. unsafe { Nanoseconds(0) } } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple "core::time::Nanoseconds" [ Value.Integer Integer.U32 0 ])) + (M.of_value (| + Value.StructTuple + "core::time::Nanoseconds" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |))) | _, _ => M.impossible end. @@ -292,19 +297,19 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Duration". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -347,28 +352,29 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Duration". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::time::Duration", "secs" |) - |)), + |) + |), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -418,20 +424,20 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Duration". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) @@ -452,7 +458,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Duration". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -537,7 +543,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Duration". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -610,7 +616,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Duration". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -666,36 +672,40 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::Duration". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "core::time::Duration" - [ - ("secs", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u64", - [], - "default", - [] - |), - [] - |)); - ("nanos", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "core::time::Nanoseconds", - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "core::time::Duration" + [ + ("secs", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u64", + [], + "default", + [] + |), + [] + |))); + ("nanos", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "core::time::Nanoseconds", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -712,13 +722,13 @@ Module time. (* pub const SECOND: Duration = Duration::from_secs(1); *) (* Ty.path "core::time::Duration" *) - Definition value_SECOND : Value.t := + Definition value_SECOND : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_secs", [] |), - [ Value.Integer Integer.U64 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). @@ -726,13 +736,13 @@ Module time. (* pub const MILLISECOND: Duration = Duration::from_millis(1); *) (* Ty.path "core::time::Duration" *) - Definition value_MILLISECOND : Value.t := + Definition value_MILLISECOND : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_millis", [] |), - [ Value.Integer Integer.U64 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). @@ -741,13 +751,13 @@ Module time. (* pub const MICROSECOND: Duration = Duration::from_micros(1); *) (* Ty.path "core::time::Duration" *) - Definition value_MICROSECOND : Value.t := + Definition value_MICROSECOND : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_micros", [] |), - [ Value.Integer Integer.U64 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). @@ -756,13 +766,13 @@ Module time. (* pub const NANOSECOND: Duration = Duration::from_nanos(1); *) (* Ty.path "core::time::Duration" *) - Definition value_NANOSECOND : Value.t := + Definition value_NANOSECOND : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_nanos", [] |), - [ Value.Integer Integer.U64 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) |))). @@ -771,13 +781,13 @@ Module time. (* pub const ZERO: Duration = Duration::from_nanos(0); *) (* Ty.path "core::time::Duration" *) - Definition value_ZERO : Value.t := + Definition value_ZERO : A.t := M.run ltac:(M.monadic (M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_nanos", [] |), - [ Value.Integer Integer.U64 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |))). @@ -785,7 +795,7 @@ Module time. (* pub const MAX: Duration = Duration::new(u64::MAX, NANOS_PER_SEC - 1); *) (* Ty.path "core::time::Duration" *) - Definition value_MAX : Value.t := + Definition value_MAX : A.t := M.run ltac:(M.monadic (M.alloc (| @@ -794,8 +804,9 @@ Module time. [ 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 Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -814,7 +825,7 @@ Module time. Duration { secs, nanos: unsafe { Nanoseconds(nanos) } } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ secs; nanos ] => ltac:(M.monadic @@ -829,11 +840,13 @@ Module time. M.get_associated_function (| Ty.path "u64", "checked_add", [] |), [ M.read (| secs |); - M.rust_cast - (BinOp.Panic.div (| + M.rust_cast (| + BinOp.Panic.div (| + Integer.U32, M.read (| nanos |), M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) - |)) + |) + |) ] |) |), @@ -863,11 +876,21 @@ Module time. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "overflow in Duration::new" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "overflow in Duration::new" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -880,17 +903,26 @@ Module time. let nanos := M.alloc (| BinOp.Panic.rem (| + Integer.U32, M.read (| nanos |), M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) |) |) in M.alloc (| - Value.StructRecord - "core::time::Duration" - [ - ("secs", M.read (| secs |)); - ("nanos", Value.StructTuple "core::time::Nanoseconds" [ M.read (| nanos |) ]) - ] + M.of_value (| + Value.StructRecord + "core::time::Duration" + [ + ("secs", A.to_value (M.read (| secs |))); + ("nanos", + A.to_value + (M.of_value (| + Value.StructTuple + "core::time::Nanoseconds" + [ A.to_value (M.read (| nanos |)) ] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -903,14 +935,14 @@ Module time. Duration::new(secs, 0) } *) - Definition from_secs (τ : list Ty.t) (α : list Value.t) : M := + Definition from_secs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ secs ] => ltac:(M.monadic (let secs := M.alloc (| secs |) in M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "new", [] |), - [ M.read (| secs |); Value.Integer Integer.U32 0 ] + [ M.read (| secs |); M.of_value (| Value.Integer 0 |) ] |))) | _, _ => M.impossible end. @@ -922,7 +954,7 @@ Module time. Duration::new(millis / MILLIS_PER_SEC, ((millis % MILLIS_PER_SEC) as u32) * NANOS_PER_MILLI) } *) - Definition from_millis (τ : list Ty.t) (α : list Value.t) : M := + Definition from_millis (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ millis ] => ltac:(M.monadic @@ -931,15 +963,19 @@ Module time. 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 (| - M.rust_cast - (BinOp.Panic.rem (| + 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" |) |) |) ] @@ -954,7 +990,7 @@ Module time. Duration::new(micros / MICROS_PER_SEC, ((micros % MICROS_PER_SEC) as u32) * NANOS_PER_MICRO) } *) - Definition from_micros (τ : list Ty.t) (α : list Value.t) : M := + Definition from_micros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ micros ] => ltac:(M.monadic @@ -963,15 +999,19 @@ Module time. 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 (| - M.rust_cast - (BinOp.Panic.rem (| + 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" |) |) |) ] @@ -986,7 +1026,7 @@ Module time. Duration::new(nanos / (NANOS_PER_SEC as u64), (nanos % (NANOS_PER_SEC as u64)) as u32) } *) - Definition from_nanos (τ : list Ty.t) (α : list Value.t) : M := + Definition from_nanos (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ nanos ] => ltac:(M.monadic @@ -995,14 +1035,17 @@ Module time. 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" |) |)) + M.rust_cast (| M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) |) |); - M.rust_cast - (BinOp.Panic.rem (| + M.rust_cast (| + BinOp.Panic.rem (| + Integer.U64, M.read (| nanos |), - 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 @@ -1015,24 +1058,25 @@ Module time. self.secs == 0 && self.nanos.0 == 0 } *) - Definition is_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition is_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in LogicalOp.and (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)) - (Value.Integer Integer.U64 0), + |), + M.of_value (| Value.Integer 0 |) + |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1042,8 +1086,9 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) - (Value.Integer Integer.U32 0))) + |), + M.of_value (| Value.Integer 0 |) + |))) |))) | _, _ => M.impossible end. @@ -1055,7 +1100,7 @@ Module time. self.secs } *) - Definition as_secs (τ : list Ty.t) (α : list Value.t) : M := + Definition as_secs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1077,12 +1122,13 @@ Module time. self.nanos.0 / NANOS_PER_MILLI } *) - Definition subsec_millis (τ : list Ty.t) (α : list Value.t) : M := + Definition subsec_millis (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.div (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -1107,12 +1153,13 @@ Module time. self.nanos.0 / NANOS_PER_MICRO } *) - Definition subsec_micros (τ : list Ty.t) (α : list Value.t) : M := + Definition subsec_micros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.div (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -1137,7 +1184,7 @@ Module time. self.nanos.0 } *) - Definition subsec_nanos (τ : list Ty.t) (α : list Value.t) : M := + Definition subsec_nanos (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1163,25 +1210,29 @@ Module time. self.secs as u128 * MILLIS_PER_SEC as u128 + (self.nanos.0 / NANOS_PER_MILLI) as u128 } *) - Definition as_millis (τ : list Ty.t) (α : list Value.t) : M := + Definition as_millis (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.add (| + Integer.U128, BinOp.Panic.mul (| - M.rust_cast - (M.read (| + 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 (| M.read (| M.get_constant (| "core::time::MILLIS_PER_SEC" |) |) |) |), - M.rust_cast - (BinOp.Panic.div (| + M.rust_cast (| + BinOp.Panic.div (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -1194,7 +1245,8 @@ Module time. |) |), M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |) - |)) + |) + |) |))) | _, _ => M.impossible end. @@ -1206,25 +1258,29 @@ Module time. self.secs as u128 * MICROS_PER_SEC as u128 + (self.nanos.0 / NANOS_PER_MICRO) as u128 } *) - Definition as_micros (τ : list Ty.t) (α : list Value.t) : M := + Definition as_micros (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.add (| + Integer.U128, BinOp.Panic.mul (| - M.rust_cast - (M.read (| + 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 (| M.read (| M.get_constant (| "core::time::MICROS_PER_SEC" |) |) |) |), - M.rust_cast - (BinOp.Panic.div (| + M.rust_cast (| + BinOp.Panic.div (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -1237,7 +1293,8 @@ Module time. |) |), M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) |) - |)) + |) + |) |))) | _, _ => M.impossible end. @@ -1249,25 +1306,28 @@ Module time. self.secs as u128 * NANOS_PER_SEC as u128 + self.nanos.0 as u128 } *) - Definition as_nanos (τ : list Ty.t) (α : list Value.t) : M := + Definition as_nanos (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.add (| + Integer.U128, BinOp.Panic.mul (| - M.rust_cast - (M.read (| + 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.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) |) |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1277,7 +1337,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) + |) + |) |))) | _, _ => M.impossible end. @@ -1289,7 +1350,7 @@ Module time. if let Some(res) = self.checked_sub(other) { res } else { other.checked_sub(self).unwrap() } } *) - Definition abs_diff (τ : list Ty.t) (α : list Value.t) : M := + Definition abs_diff (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1297,7 +1358,7 @@ Module time. let other := M.alloc (| other |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1370,7 +1431,7 @@ Module time. } } *) - Definition checked_add (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1380,7 +1441,7 @@ Module time. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1416,6 +1477,7 @@ Module time. let nanos := M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -1442,18 +1504,19 @@ Module time. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| nanos |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| nanos |), + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1465,6 +1528,7 @@ Module time. M.write (| β, BinOp.Panic.sub (| + Integer.U32, M.read (| β |), M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) @@ -1472,7 +1536,7 @@ Module time. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1484,7 +1548,10 @@ Module time. "checked_add", [] |), - [ M.read (| secs |); Value.Integer Integer.U64 1 ] + [ + M.read (| secs |); + M.of_value (| Value.Integer 1 |) + ] |) |) in let γ0_0 := @@ -1495,30 +1562,36 @@ Module time. |) in let new_secs := M.copy (| γ0_0 |) in let _ := M.write (| secs, M.read (| new_secs |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1526,21 +1599,23 @@ Module time. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| nanos |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| nanos |), + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1553,37 +1628,47 @@ Module time. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: nanos < NANOS_PER_SEC" + M.of_value (| + Value.String + "assertion failed: nanos < NANOS_PER_SEC" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::time::Duration", - "new", - [] - |), - [ M.read (| secs |); M.read (| nanos |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::time::Duration", + "new", + [] + |), + [ M.read (| secs |); M.read (| nanos |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1601,7 +1686,7 @@ Module time. } } *) - Definition saturating_add (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1654,7 +1739,7 @@ Module time. } } *) - Definition checked_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1664,7 +1749,7 @@ Module time. ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1700,15 +1785,15 @@ Module time. let nanos := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| self, @@ -1718,8 +1803,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| rhs, @@ -1729,7 +1814,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1738,6 +1824,7 @@ Module time. |) in M.alloc (| BinOp.Panic.sub (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -1765,7 +1852,7 @@ Module time. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1777,7 +1864,10 @@ Module time. "checked_sub", [] |), - [ M.read (| secs |); Value.Integer Integer.U64 1 ] + [ + M.read (| secs |); + M.of_value (| Value.Integer 1 |) + ] |) |) in let γ0_0 := @@ -1790,7 +1880,9 @@ Module time. let _ := M.write (| secs, M.read (| sub_secs |) |) in M.alloc (| BinOp.Panic.sub (| + Integer.U32, BinOp.Panic.add (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -1825,9 +1917,11 @@ Module time. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::option::Option::None" - [] + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) |) |) |) @@ -1839,11 +1933,12 @@ Module time. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -1851,21 +1946,23 @@ Module time. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| nanos |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| nanos |), + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1878,37 +1975,47 @@ Module time. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: nanos < NANOS_PER_SEC" + M.of_value (| + Value.String + "assertion failed: nanos < NANOS_PER_SEC" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::time::Duration", - "new", - [] - |), - [ M.read (| secs |); M.read (| nanos |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::time::Duration", + "new", + [] + |), + [ M.read (| secs |); M.read (| nanos |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -1926,7 +2033,7 @@ Module time. } } *) - Definition saturating_sub (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1976,7 +2083,7 @@ Module time. None } *) - Definition checked_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -1988,8 +2095,9 @@ Module time. let total_nanos := M.alloc (| BinOp.Panic.mul (| - M.rust_cast - (M.read (| + Integer.U64, + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| self, @@ -1999,28 +2107,36 @@ Module time. "core::time::Nanoseconds", 0 |) - |)), - M.rust_cast (M.read (| rhs |)) + |) + |), + M.rust_cast (| M.read (| rhs |) |) |) |) in 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" |) |)) + M.rust_cast (| + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) + |) |) |) in let nanos := M.alloc (| - M.rust_cast - (BinOp.Panic.rem (| + 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" |) |)) - |)) + M.rust_cast (| + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) + |) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2036,7 +2152,7 @@ Module time. "secs" |) |); - M.rust_cast (M.read (| rhs |)) + M.rust_cast (| M.read (| rhs |) |) ] |) |) in @@ -2048,7 +2164,7 @@ Module time. |) in let s := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2075,11 +2191,15 @@ Module time. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2087,21 +2207,23 @@ Module time. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| nanos |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| nanos |), + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2117,8 +2239,10 @@ Module time. |), [ M.read (| - Value.String - "assertion failed: nanos < NANOS_PER_SEC" + M.of_value (| + Value.String + "assertion failed: nanos < NANOS_PER_SEC" + |) |) ] |) @@ -2126,38 +2250,45 @@ Module time. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.return_ (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::time::Duration", - "new", - [] - |), - [ M.read (| secs |); M.read (| nanos |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::time::Duration", + "new", + [] + |), + [ M.read (| secs |); M.read (| nanos |) ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) |))) |))) | _, _ => M.impossible @@ -2173,7 +2304,7 @@ Module time. } } *) - Definition saturating_mul (τ : list Ty.t) (α : list Value.t) : M := + Definition saturating_mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2222,7 +2353,7 @@ Module time. } } *) - Definition checked_div (τ : list Ty.t) (α : list Value.t) : M := + Definition checked_div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2230,41 +2361,47 @@ Module time. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne (M.read (| rhs |)) (Value.Integer Integer.U32 0) + BinOp.Pure.ne (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::time::Duration", - "secs" - |) - |), - M.rust_cast (M.read (| rhs |)) - |); - BinOp.Panic.rem (| - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "core::time::Duration", - "secs" - |) - |), - M.rust_cast (M.read (| rhs |)) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.U64, + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::time::Duration", + "secs" + |) + |), + M.rust_cast (| M.read (| rhs |) |) + |)); + A.to_value + (BinOp.Panic.rem (| + Integer.U64, + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "core::time::Duration", + "secs" + |) + |), + M.rust_cast (| M.read (| rhs |) |) + |)) + ] + |) |), [ fun γ => @@ -2275,37 +2412,43 @@ Module time. let extra_secs := M.copy (| γ0_1 |) in M.match_operator (| M.alloc (| - Value.Tuple - [ - BinOp.Panic.div (| - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.SubPointer.get_struct_record_field (| - self, - "core::time::Duration", - "nanos" + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.div (| + Integer.U32, + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.SubPointer.get_struct_record_field (| + self, + "core::time::Duration", + "nanos" + |), + "core::time::Nanoseconds", + 0 + |) |), - "core::time::Nanoseconds", - 0 - |) - |), - M.read (| rhs |) - |); - BinOp.Panic.rem (| - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.SubPointer.get_struct_record_field (| - self, - "core::time::Duration", - "nanos" + M.read (| rhs |) + |)); + A.to_value + (BinOp.Panic.rem (| + Integer.U32, + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.SubPointer.get_struct_record_field (| + self, + "core::time::Duration", + "nanos" + |), + "core::time::Nanoseconds", + 0 + |) |), - "core::time::Nanoseconds", - 0 - |) - |), - M.read (| rhs |) - |) - ] + M.read (| rhs |) + |)) + ] + |) |), [ fun γ => @@ -2319,32 +2462,42 @@ Module time. M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - M.rust_cast - (BinOp.Panic.div (| + 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 - (M.read (| + 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 (| extra_nanos |) |) |), - M.rust_cast (M.read (| rhs |)) - |)) + M.rust_cast (| M.read (| rhs |) |) + |) + |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), @@ -2352,21 +2505,23 @@ Module time. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.lt - (M.read (| nanos |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.read (| nanos |), + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2382,8 +2537,10 @@ Module time. |), [ M.read (| - Value.String - "assertion failed: nanos < NANOS_PER_SEC" + M.of_value (| + Value.String + "assertion failed: nanos < NANOS_PER_SEC" + |) |) ] |) @@ -2391,33 +2548,43 @@ Module time. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::time::Duration", - "new", - [] - |), - [ M.read (| secs |); M.read (| nanos |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::time::Duration", + "new", + [] + |), + [ M.read (| secs |); M.read (| nanos |) ] + |)) + ] + |) |))) ] |))) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -2431,23 +2598,26 @@ Module time. (self.secs as f64) + (self.nanos.0 as f64) / (NANOS_PER_SEC as f64) } *) - Definition as_secs_f64 (τ : list Ty.t) (α : list Value.t) : M := + Definition as_secs_f64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.add (| - M.rust_cast - (M.read (| + Integer.Usize, + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)), + |) + |), BinOp.Panic.div (| - M.rust_cast - (M.read (| + Integer.Usize, + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2457,8 +2627,9 @@ 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 @@ -2471,23 +2642,26 @@ Module time. (self.secs as f32) + (self.nanos.0 as f32) / (NANOS_PER_SEC as f32) } *) - Definition as_secs_f32 (τ : list Ty.t) (α : list Value.t) : M := + Definition as_secs_f32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.add (| - M.rust_cast - (M.read (| + Integer.Usize, + M.rust_cast (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)), + |) + |), BinOp.Panic.div (| - M.rust_cast - (M.read (| + Integer.Usize, + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2497,8 +2671,9 @@ 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 @@ -2514,7 +2689,7 @@ Module time. } } *) - Definition from_secs_f64 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_secs_f64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ secs ] => ltac:(M.monadic @@ -2583,7 +2758,7 @@ Module time. } } *) - Definition from_secs_f32 (τ : list Ty.t) (α : list Value.t) : M := + Definition from_secs_f32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ secs ] => ltac:(M.monadic @@ -2649,7 +2824,7 @@ Module time. Duration::from_secs_f64(rhs * self.as_secs_f64()) } *) - Definition mul_f64 (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_f64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2659,6 +2834,7 @@ Module time. M.get_associated_function (| Ty.path "core::time::Duration", "from_secs_f64", [] |), [ BinOp.Panic.mul (| + Integer.Usize, M.read (| rhs |), M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f64", [] |), @@ -2677,7 +2853,7 @@ Module time. Duration::from_secs_f32(rhs * self.as_secs_f32()) } *) - Definition mul_f32 (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_f32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2687,6 +2863,7 @@ Module time. M.get_associated_function (| Ty.path "core::time::Duration", "from_secs_f32", [] |), [ BinOp.Panic.mul (| + Integer.Usize, M.read (| rhs |), M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f32", [] |), @@ -2705,7 +2882,7 @@ Module time. Duration::from_secs_f64(self.as_secs_f64() / rhs) } *) - Definition div_f64 (τ : list Ty.t) (α : list Value.t) : M := + Definition div_f64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2715,6 +2892,7 @@ Module time. M.get_associated_function (| Ty.path "core::time::Duration", "from_secs_f64", [] |), [ BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f64", [] |), [ self ] @@ -2733,7 +2911,7 @@ Module time. Duration::from_secs_f32(self.as_secs_f32() / rhs) } *) - Definition div_f32 (τ : list Ty.t) (α : list Value.t) : M := + Definition div_f32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -2743,6 +2921,7 @@ Module time. M.get_associated_function (| Ty.path "core::time::Duration", "from_secs_f32", [] |), [ BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f32", [] |), [ self ] @@ -2761,13 +2940,14 @@ Module time. self.as_secs_f64() / rhs.as_secs_f64() } *) - Definition div_duration_f64 (τ : list Ty.t) (α : list Value.t) : M := + Definition div_duration_f64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f64", [] |), [ self ] @@ -2788,13 +2968,14 @@ Module time. self.as_secs_f32() / rhs.as_secs_f32() } *) - Definition div_duration_f32 (τ : list Ty.t) (α : list Value.t) : M := + Definition div_duration_f32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in BinOp.Panic.div (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f32", [] |), [ self ] @@ -2821,7 +3002,7 @@ Module time. ) } *) - Definition try_from_secs_f32 (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from_secs_f32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ secs ] => ltac:(M.monadic @@ -2831,14 +3012,17 @@ Module time. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| secs |)) (M.read (| UnsupportedLiteral |)) + BinOp.Pure.lt (| + M.read (| secs |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2846,23 +3030,31 @@ Module time. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::time::TryFromFloatSecsError" - [ - ("kind", - Value.StructTuple - "core::time::TryFromFloatSecsErrorKind::Negative" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::time::TryFromFloatSecsError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::time::TryFromFloatSecsErrorKind::Negative" + [] + |))) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let bits := @@ -2874,60 +3066,77 @@ Module time. |) in let mant := M.alloc (| - BinOp.Pure.bit_or - (BinOp.Pure.bit_and - (M.read (| bits |)) - (M.read (| - M.get_constant (| "core::time::try_from_secs_f32::MANT_MASK" |) - |))) - (BinOp.Panic.add (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_and (| + M.read (| bits |), + M.read (| M.get_constant (| "core::time::try_from_secs_f32::MANT_MASK" |) |) + |), + BinOp.Panic.add (| + Integer.U32, M.read (| M.get_constant (| "core::time::try_from_secs_f32::MANT_MASK" |) |), - Value.Integer Integer.U32 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let exp := M.alloc (| BinOp.Panic.add (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer Integer.I32 23 |)) - (M.read (| + Integer.I16, + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| + M.read (| bits |), + M.of_value (| 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" |) |) |) |) in M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| exp |)) (Value.Integer Integer.I16 (-31)) + BinOp.Pure.lt (| + M.read (| exp |), + M.of_value (| Value.Integer (-31) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple [ Value.Integer Integer.U64 0; Value.Integer Integer.U32 0 ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exp |)) - (Value.Integer Integer.I16 0) + BinOp.Pure.lt (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2948,7 +3157,8 @@ Module time. [ M.read (| mant |) ] |), BinOp.Panic.add (| - Value.Integer Integer.I16 41, + Integer.I16, + M.of_value (| Value.Integer 41 |), M.read (| exp |) |) |) @@ -2956,13 +3166,15 @@ Module time. let nanos_offset := M.alloc (| BinOp.Panic.add (| - Value.Integer Integer.I32 23, - Value.Integer Integer.I32 41 + Integer.I32, + M.of_value (| Value.Integer 23 |), + M.of_value (| Value.Integer 41 |) |) |) in let nanos_tmp := M.alloc (| BinOp.Panic.mul (| + Integer.U128, M.call_closure (| M.get_trait_method (| "core::convert::From", @@ -2991,79 +3203,92 @@ Module time. |) in let nanos := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| nanos_tmp |), M.read (| nanos_offset |) - |)) + |) + |) |) in let rem_mask := M.alloc (| BinOp.Panic.sub (| + Integer.U128, BinOp.Panic.shl (| - Value.Integer Integer.U128 1, + M.of_value (| Value.Integer 1 |), M.read (| nanos_offset |) |), - Value.Integer Integer.U128 1 + M.of_value (| Value.Integer 1 |) |) |) in let rem_msb_mask := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U128 1, + M.of_value (| Value.Integer 1 |), BinOp.Panic.sub (| + Integer.I32, M.read (| nanos_offset |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in let rem := M.alloc (| - BinOp.Pure.bit_and - (M.read (| nanos_tmp |)) - (M.read (| rem_mask |)) + BinOp.Pure.bit_and (| + M.read (| nanos_tmp |), + M.read (| rem_mask |) + |) |) in let is_tie := M.alloc (| - BinOp.Pure.eq (M.read (| rem |)) (M.read (| rem_msb_mask |)) + BinOp.Pure.eq (| + M.read (| rem |), + M.read (| rem_msb_mask |) + |) |) in let is_even := M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| nanos |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| nanos |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let rem_msb := M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| nanos_tmp |)) - (M.read (| rem_msb_mask |))) - (Value.Integer Integer.U128 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| nanos_tmp |), + M.read (| rem_msb_mask |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let add_ns := M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| + UnOp.Pure.not (| + LogicalOp.or (| M.read (| rem_msb |), ltac:(M.monadic (LogicalOp.and (| M.read (| is_even |), ltac:(M.monadic (M.read (| is_tie |))) |))) - |)) + |) + |) |) in let nanos := M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| nanos |), - M.rust_cast (M.read (| add_ns |)) + M.rust_cast (| M.read (| add_ns |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3071,17 +3296,19 @@ Module time. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (Value.Integer Integer.I32 23) - (Value.Integer Integer.I32 23), + BinOp.Pure.eq (| + M.of_value (| Value.Integer 23 |), + M.of_value (| Value.Integer 23 |) + |), ltac:(M.monadic - (BinOp.Pure.ne - (M.read (| nanos |)) - (M.read (| + (BinOp.Pure.ne (| + M.read (| nanos |), + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)))) + |) + |))) |) |)) in let _ := @@ -3090,33 +3317,41 @@ Module time. Value.Bool true |) in M.alloc (| - Value.Tuple - [ Value.Integer Integer.U64 0; M.read (| nanos |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| nanos |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U64 1; - Value.Integer Integer.U32 0 - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exp |)) - (Value.Integer Integer.I16 23) + BinOp.Pure.lt (| + M.read (| exp |), + M.of_value (| Value.Integer 23 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3137,7 +3372,8 @@ Module time. BinOp.Panic.shr (| M.read (| mant |), BinOp.Panic.sub (| - Value.Integer Integer.I16 23, + Integer.I16, + M.of_value (| Value.Integer 23 |), M.read (| exp |) |) |) @@ -3155,24 +3391,26 @@ Module time. [] |), [ - BinOp.Pure.bit_and - (BinOp.Panic.shl (| + BinOp.Pure.bit_and (| + BinOp.Panic.shl (| M.read (| mant |), M.read (| exp |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::time::try_from_secs_f32::MANT_MASK" |) - |)) + |) + |) ] |) |) in let nanos_offset := - M.alloc (| Value.Integer Integer.I32 23 |) in + M.alloc (| M.of_value (| Value.Integer 23 |) |) in let nanos_tmp := M.alloc (| BinOp.Panic.mul (| + Integer.U64, M.call_closure (| M.get_trait_method (| "core::convert::From", @@ -3194,81 +3432,92 @@ Module time. |) in let nanos := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| nanos_tmp |), M.read (| nanos_offset |) - |)) + |) + |) |) in let rem_mask := M.alloc (| BinOp.Panic.sub (| + Integer.U64, BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), M.read (| nanos_offset |) |), - Value.Integer Integer.U64 1 + M.of_value (| Value.Integer 1 |) |) |) in let rem_msb_mask := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U64 1, + M.of_value (| Value.Integer 1 |), BinOp.Panic.sub (| + Integer.I32, M.read (| nanos_offset |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in let rem := M.alloc (| - BinOp.Pure.bit_and - (M.read (| nanos_tmp |)) - (M.read (| rem_mask |)) + BinOp.Pure.bit_and (| + M.read (| nanos_tmp |), + M.read (| rem_mask |) + |) |) in let is_tie := M.alloc (| - BinOp.Pure.eq - (M.read (| rem |)) - (M.read (| rem_msb_mask |)) + BinOp.Pure.eq (| + M.read (| rem |), + M.read (| rem_msb_mask |) + |) |) in let is_even := M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| nanos |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| nanos |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let rem_msb := M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| nanos_tmp |)) - (M.read (| rem_msb_mask |))) - (Value.Integer Integer.U64 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| nanos_tmp |), + M.read (| rem_msb_mask |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let add_ns := M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| + UnOp.Pure.not (| + LogicalOp.or (| M.read (| rem_msb |), ltac:(M.monadic (LogicalOp.and (| M.read (| is_even |), ltac:(M.monadic (M.read (| is_tie |))) |))) - |)) + |) + |) |) in let nanos := M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| nanos |), - M.rust_cast (M.read (| add_ns |)) + M.rust_cast (| M.read (| add_ns |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3276,17 +3525,19 @@ Module time. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (Value.Integer Integer.I32 23) - (Value.Integer Integer.I32 23), + BinOp.Pure.eq (| + M.of_value (| Value.Integer 23 |), + M.of_value (| Value.Integer 23 |) + |), ltac:(M.monadic - (BinOp.Pure.ne - (M.read (| nanos |)) - (M.read (| + (BinOp.Pure.ne (| + M.read (| nanos |), + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)))) + |) + |))) |) |)) in let _ := @@ -3295,36 +3546,47 @@ Module time. Value.Bool true |) in M.alloc (| - Value.Tuple - [ M.read (| secs |); M.read (| nanos |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| secs |)); + A.to_value (M.read (| nanos |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| secs |), - Value.Integer Integer.U64 1 - |); - Value.Integer Integer.U32 0 - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.U64, + M.read (| secs |), + M.of_value (| Value.Integer 1 |) + |)); + A.to_value + (M.of_value (| Value.Integer 0 |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exp |)) - (Value.Integer Integer.I16 64) + BinOp.Pure.lt (| + M.read (| exp |), + M.of_value (| Value.Integer 64 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3345,17 +3607,21 @@ Module time. [ M.read (| mant |) ] |), BinOp.Panic.sub (| + Integer.I16, M.read (| exp |), - Value.Integer Integer.I16 23 + M.of_value (| Value.Integer 23 |) |) |) |) in M.alloc (| - Value.Tuple - [ - M.read (| secs |); - Value.Integer Integer.U32 0 - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| secs |)); + A.to_value + (M.of_value (| Value.Integer 0 |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3363,18 +3629,26 @@ Module time. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::time::TryFromFloatSecsError" - [ - ("kind", - Value.StructTuple - "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::time::TryFromFloatSecsError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" + [] + |))) + ] + |)) + ] + |) |) |) |) @@ -3395,18 +3669,21 @@ Module time. let secs := M.copy (| γ0_0 |) in let nanos := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::time::Duration", - "new", - [] - |), - [ M.read (| secs |); M.read (| nanos |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::time::Duration", + "new", + [] + |), + [ M.read (| secs |); M.read (| nanos |) ] + |)) + ] + |) |))) ] |) @@ -3430,7 +3707,7 @@ Module time. ) } *) - Definition try_from_secs_f64 (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from_secs_f64 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ secs ] => ltac:(M.monadic @@ -3440,14 +3717,17 @@ Module time. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| secs |)) (M.read (| UnsupportedLiteral |)) + BinOp.Pure.lt (| + M.read (| secs |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3455,23 +3735,31 @@ Module time. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::time::TryFromFloatSecsError" - [ - ("kind", - Value.StructTuple - "core::time::TryFromFloatSecsErrorKind::Negative" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::time::TryFromFloatSecsError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::time::TryFromFloatSecsErrorKind::Negative" + [] + |))) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let bits := @@ -3483,60 +3771,77 @@ Module time. |) in let mant := M.alloc (| - BinOp.Pure.bit_or - (BinOp.Pure.bit_and - (M.read (| bits |)) - (M.read (| - M.get_constant (| "core::time::try_from_secs_f64::MANT_MASK" |) - |))) - (BinOp.Panic.add (| + BinOp.Pure.bit_or (| + BinOp.Pure.bit_and (| + M.read (| bits |), + M.read (| M.get_constant (| "core::time::try_from_secs_f64::MANT_MASK" |) |) + |), + BinOp.Panic.add (| + Integer.U64, M.read (| M.get_constant (| "core::time::try_from_secs_f64::MANT_MASK" |) |), - Value.Integer Integer.U64 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let exp := M.alloc (| BinOp.Panic.add (| - M.rust_cast - (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer Integer.I32 52 |)) - (M.read (| + Integer.I16, + M.rust_cast (| + BinOp.Pure.bit_and (| + BinOp.Panic.shr (| + M.read (| bits |), + M.of_value (| 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" |) |) |) |) in M.match_operator (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| exp |)) (Value.Integer Integer.I16 (-31)) + BinOp.Pure.lt (| + M.read (| exp |), + M.of_value (| Value.Integer (-31) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Tuple [ Value.Integer Integer.U64 0; Value.Integer Integer.U32 0 ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exp |)) - (Value.Integer Integer.I16 0) + BinOp.Pure.lt (| + M.read (| exp |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3557,7 +3862,8 @@ Module time. [ M.read (| mant |) ] |), BinOp.Panic.add (| - Value.Integer Integer.I16 44, + Integer.I16, + M.of_value (| Value.Integer 44 |), M.read (| exp |) |) |) @@ -3565,13 +3871,15 @@ Module time. let nanos_offset := M.alloc (| BinOp.Panic.add (| - Value.Integer Integer.I32 52, - Value.Integer Integer.I32 44 + Integer.I32, + M.of_value (| Value.Integer 52 |), + M.of_value (| Value.Integer 44 |) |) |) in let nanos_tmp := M.alloc (| BinOp.Panic.mul (| + Integer.U128, M.call_closure (| M.get_trait_method (| "core::convert::From", @@ -3600,79 +3908,92 @@ Module time. |) in let nanos := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| nanos_tmp |), M.read (| nanos_offset |) - |)) + |) + |) |) in let rem_mask := M.alloc (| BinOp.Panic.sub (| + Integer.U128, BinOp.Panic.shl (| - Value.Integer Integer.U128 1, + M.of_value (| Value.Integer 1 |), M.read (| nanos_offset |) |), - Value.Integer Integer.U128 1 + M.of_value (| Value.Integer 1 |) |) |) in let rem_msb_mask := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U128 1, + M.of_value (| Value.Integer 1 |), BinOp.Panic.sub (| + Integer.I32, M.read (| nanos_offset |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in let rem := M.alloc (| - BinOp.Pure.bit_and - (M.read (| nanos_tmp |)) - (M.read (| rem_mask |)) + BinOp.Pure.bit_and (| + M.read (| nanos_tmp |), + M.read (| rem_mask |) + |) |) in let is_tie := M.alloc (| - BinOp.Pure.eq (M.read (| rem |)) (M.read (| rem_msb_mask |)) + BinOp.Pure.eq (| + M.read (| rem |), + M.read (| rem_msb_mask |) + |) |) in let is_even := M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| nanos |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| nanos |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let rem_msb := M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| nanos_tmp |)) - (M.read (| rem_msb_mask |))) - (Value.Integer Integer.U128 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| nanos_tmp |), + M.read (| rem_msb_mask |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let add_ns := M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| + UnOp.Pure.not (| + LogicalOp.or (| M.read (| rem_msb |), ltac:(M.monadic (LogicalOp.and (| M.read (| is_even |), ltac:(M.monadic (M.read (| is_tie |))) |))) - |)) + |) + |) |) in let nanos := M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| nanos |), - M.rust_cast (M.read (| add_ns |)) + M.rust_cast (| M.read (| add_ns |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3680,17 +4001,19 @@ Module time. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (Value.Integer Integer.I32 52) - (Value.Integer Integer.I32 23), + BinOp.Pure.eq (| + M.of_value (| Value.Integer 52 |), + M.of_value (| Value.Integer 23 |) + |), ltac:(M.monadic - (BinOp.Pure.ne - (M.read (| nanos |)) - (M.read (| + (BinOp.Pure.ne (| + M.read (| nanos |), + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)))) + |) + |))) |) |)) in let _ := @@ -3699,33 +4022,41 @@ Module time. Value.Bool true |) in M.alloc (| - Value.Tuple - [ Value.Integer Integer.U64 0; M.read (| nanos |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.read (| nanos |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U64 1; - Value.Integer Integer.U32 0 - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exp |)) - (Value.Integer Integer.I16 52) + BinOp.Pure.lt (| + M.read (| exp |), + M.of_value (| Value.Integer 52 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3746,7 +4077,8 @@ Module time. BinOp.Panic.shr (| M.read (| mant |), BinOp.Panic.sub (| - Value.Integer Integer.I16 52, + Integer.I16, + M.of_value (| Value.Integer 52 |), M.read (| exp |) |) |) @@ -3764,24 +4096,26 @@ Module time. [] |), [ - BinOp.Pure.bit_and - (BinOp.Panic.shl (| + BinOp.Pure.bit_and (| + BinOp.Panic.shl (| M.read (| mant |), M.read (| exp |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::time::try_from_secs_f64::MANT_MASK" |) - |)) + |) + |) ] |) |) in let nanos_offset := - M.alloc (| Value.Integer Integer.I32 52 |) in + M.alloc (| M.of_value (| Value.Integer 52 |) |) in let nanos_tmp := M.alloc (| BinOp.Panic.mul (| + Integer.U128, M.call_closure (| M.get_trait_method (| "core::convert::From", @@ -3803,81 +4137,92 @@ Module time. |) in let nanos := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| + M.rust_cast (| + BinOp.Panic.shr (| M.read (| nanos_tmp |), M.read (| nanos_offset |) - |)) + |) + |) |) in let rem_mask := M.alloc (| BinOp.Panic.sub (| + Integer.U128, BinOp.Panic.shl (| - Value.Integer Integer.U128 1, + M.of_value (| Value.Integer 1 |), M.read (| nanos_offset |) |), - Value.Integer Integer.U128 1 + M.of_value (| Value.Integer 1 |) |) |) in let rem_msb_mask := M.alloc (| BinOp.Panic.shl (| - Value.Integer Integer.U128 1, + M.of_value (| Value.Integer 1 |), BinOp.Panic.sub (| + Integer.I32, M.read (| nanos_offset |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) |) |) in let rem := M.alloc (| - BinOp.Pure.bit_and - (M.read (| nanos_tmp |)) - (M.read (| rem_mask |)) + BinOp.Pure.bit_and (| + M.read (| nanos_tmp |), + M.read (| rem_mask |) + |) |) in let is_tie := M.alloc (| - BinOp.Pure.eq - (M.read (| rem |)) - (M.read (| rem_msb_mask |)) + BinOp.Pure.eq (| + M.read (| rem |), + M.read (| rem_msb_mask |) + |) |) in let is_even := M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| nanos |)) - (Value.Integer Integer.U32 1)) - (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| nanos |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let rem_msb := M.alloc (| - BinOp.Pure.eq - (BinOp.Pure.bit_and - (M.read (| nanos_tmp |)) - (M.read (| rem_msb_mask |))) - (Value.Integer Integer.U128 0) + BinOp.Pure.eq (| + BinOp.Pure.bit_and (| + M.read (| nanos_tmp |), + M.read (| rem_msb_mask |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let add_ns := M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| + UnOp.Pure.not (| + LogicalOp.or (| M.read (| rem_msb |), ltac:(M.monadic (LogicalOp.and (| M.read (| is_even |), ltac:(M.monadic (M.read (| is_tie |))) |))) - |)) + |) + |) |) in let nanos := M.alloc (| BinOp.Panic.add (| + Integer.U32, M.read (| nanos |), - M.rust_cast (M.read (| add_ns |)) + M.rust_cast (| M.read (| add_ns |) |) |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3885,17 +4230,19 @@ Module time. M.use (M.alloc (| LogicalOp.or (| - BinOp.Pure.eq - (Value.Integer Integer.I32 52) - (Value.Integer Integer.I32 23), + BinOp.Pure.eq (| + M.of_value (| Value.Integer 52 |), + M.of_value (| Value.Integer 23 |) + |), ltac:(M.monadic - (BinOp.Pure.ne - (M.read (| nanos |)) - (M.read (| + (BinOp.Pure.ne (| + M.read (| nanos |), + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)))) + |) + |))) |) |)) in let _ := @@ -3904,36 +4251,47 @@ Module time. Value.Bool true |) in M.alloc (| - Value.Tuple - [ M.read (| secs |); M.read (| nanos |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| secs |)); + A.to_value (M.read (| nanos |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple - [ - BinOp.Panic.add (| - M.read (| secs |), - Value.Integer Integer.U64 1 - |); - Value.Integer Integer.U32 0 - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (BinOp.Panic.add (| + Integer.U64, + M.read (| secs |), + M.of_value (| Value.Integer 1 |) + |)); + A.to_value + (M.of_value (| Value.Integer 0 |)) + ] + |) |))) ] |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| exp |)) - (Value.Integer Integer.I16 64) + BinOp.Pure.lt (| + M.read (| exp |), + M.of_value (| Value.Integer 64 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3954,17 +4312,21 @@ Module time. [ M.read (| mant |) ] |), BinOp.Panic.sub (| + Integer.I16, M.read (| exp |), - Value.Integer Integer.I16 52 + M.of_value (| Value.Integer 52 |) |) |) |) in M.alloc (| - Value.Tuple - [ - M.read (| secs |); - Value.Integer Integer.U32 0 - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| secs |)); + A.to_value + (M.of_value (| Value.Integer 0 |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -3972,18 +4334,26 @@ Module time. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructRecord - "core::time::TryFromFloatSecsError" - [ - ("kind", - Value.StructTuple - "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" - []) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::time::TryFromFloatSecsError" + [ + ("kind", + A.to_value + (M.of_value (| + Value.StructTuple + "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" + [] + |))) + ] + |)) + ] + |) |) |) |) @@ -4004,18 +4374,21 @@ Module time. let secs := M.copy (| γ0_0 |) in let nanos := M.copy (| γ0_1 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::time::Duration", - "new", - [] - |), - [ M.read (| secs |); M.read (| nanos |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::time::Duration", + "new", + [] + |), + [ M.read (| secs |); M.read (| nanos |) ] + |)) + ] + |) |))) ] |) @@ -4039,7 +4412,7 @@ Module time. self.checked_add(rhs).expect("overflow when adding durations") } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4056,7 +4429,7 @@ Module time. M.get_associated_function (| Ty.path "core::time::Duration", "checked_add", [] |), [ M.read (| self |); M.read (| rhs |) ] |); - M.read (| Value.String "overflow when adding durations" |) + M.read (| M.of_value (| Value.String "overflow when adding durations" |) |) ] |))) | _, _ => M.impossible @@ -4078,7 +4451,7 @@ Module time. *self = *self + rhs; } *) - Definition add_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition add_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4099,7 +4472,7 @@ Module time. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4123,7 +4496,7 @@ Module time. self.checked_sub(rhs).expect("overflow when subtracting durations") } *) - Definition sub (τ : list Ty.t) (α : list Value.t) : M := + Definition sub (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4140,7 +4513,7 @@ Module time. M.get_associated_function (| Ty.path "core::time::Duration", "checked_sub", [] |), [ M.read (| self |); M.read (| rhs |) ] |); - M.read (| Value.String "overflow when subtracting durations" |) + M.read (| M.of_value (| Value.String "overflow when subtracting durations" |) |) ] |))) | _, _ => M.impossible @@ -4162,7 +4535,7 @@ Module time. *self = *self - rhs; } *) - Definition sub_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition sub_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4183,7 +4556,7 @@ Module time. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4207,7 +4580,7 @@ Module time. self.checked_mul(rhs).expect("overflow when multiplying duration by scalar") } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4224,7 +4597,9 @@ Module time. M.get_associated_function (| Ty.path "core::time::Duration", "checked_mul", [] |), [ M.read (| self |); M.read (| rhs |) ] |); - M.read (| Value.String "overflow when multiplying duration by scalar" |) + M.read (| + M.of_value (| Value.String "overflow when multiplying duration by scalar" |) + |) ] |))) | _, _ => M.impossible @@ -4249,7 +4624,7 @@ Module time. rhs * self } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4284,7 +4659,7 @@ Module time. *self = *self * rhs; } *) - Definition mul_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition mul_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4305,7 +4680,7 @@ Module time. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4329,7 +4704,7 @@ Module time. self.checked_div(rhs).expect("divide by zero error when dividing duration by scalar") } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4346,7 +4721,11 @@ Module time. M.get_associated_function (| Ty.path "core::time::Duration", "checked_div", [] |), [ M.read (| self |); M.read (| rhs |) ] |); - M.read (| Value.String "divide by zero error when dividing duration by scalar" |) + M.read (| + M.of_value (| + Value.String "divide by zero error when dividing duration by scalar" + |) + |) ] |))) | _, _ => M.impossible @@ -4368,7 +4747,7 @@ Module time. *self = *self / rhs; } *) - Definition div_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition div_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -4389,7 +4768,7 @@ Module time. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -4410,14 +4789,14 @@ Module time. sum_durations!(iter) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let total_secs := M.alloc (| Value.Integer Integer.U64 0 |) in - let total_nanos := M.alloc (| Value.Integer Integer.U64 0 |) in + let total_secs := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let total_nanos := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -4498,7 +4877,10 @@ Module time. ] |); M.read (| - Value.String "overflow in iter::sum over durations" + M.of_value (| + Value.String + "overflow in iter::sum over durations" + |) |) ] |) @@ -4517,8 +4899,8 @@ Module time. |), [ M.read (| total_nanos |); - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| entry, @@ -4528,7 +4910,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) + |) + |) ] |) |), @@ -4566,36 +4949,43 @@ Module time. [ M.read (| total_secs |); BinOp.Panic.div (| + Integer.U64, M.read (| total_nanos |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) + |) + |) |) ] |); M.read (| - Value.String - "overflow in iter::sum over durations" + M.of_value (| + Value.String + "overflow in iter::sum over durations" + |) |) ] |) |) in M.alloc (| BinOp.Panic.add (| + Integer.U64, BinOp.Panic.rem (| + Integer.U64, M.read (| total_nanos |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) + |) + |) |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| entry, @@ -4605,17 +4995,18 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) + |) + |) |) |))) ] |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4634,13 +5025,17 @@ Module time. [ 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" |) |)) + M.rust_cast (| + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) + |) |) ] |); - M.read (| Value.String "overflow in iter::sum over durations" |) + M.read (| + M.of_value (| Value.String "overflow in iter::sum over durations" |) + |) ] |) |) in @@ -4648,14 +5043,15 @@ Module time. 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" |) |)) + M.rust_cast (| M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) |) |) |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "new", [] |), - [ M.read (| total_secs |); M.rust_cast (M.read (| total_nanos |)) ] + [ M.read (| total_secs |); M.rust_cast (| M.read (| total_nanos |) |) ] |) |) |))) @@ -4678,14 +5074,14 @@ Module time. sum_durations!(iter) } *) - Definition sum (τ : list Ty.t) (α : list Value.t) : M := + Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let total_secs := M.alloc (| Value.Integer Integer.U64 0 |) in - let total_nanos := M.alloc (| Value.Integer Integer.U64 0 |) in + let total_secs := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let total_nanos := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -4766,7 +5162,10 @@ Module time. ] |); M.read (| - Value.String "overflow in iter::sum over durations" + M.of_value (| + Value.String + "overflow in iter::sum over durations" + |) |) ] |) @@ -4785,8 +5184,8 @@ Module time. |), [ M.read (| total_nanos |); - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| entry |), @@ -4796,7 +5195,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) + |) + |) ] |) |), @@ -4834,36 +5234,43 @@ Module time. [ M.read (| total_secs |); BinOp.Panic.div (| + Integer.U64, M.read (| total_nanos |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) + |) + |) |) ] |); M.read (| - Value.String - "overflow in iter::sum over durations" + M.of_value (| + Value.String + "overflow in iter::sum over durations" + |) |) ] |) |) in M.alloc (| BinOp.Panic.add (| + Integer.U64, BinOp.Panic.rem (| + Integer.U64, M.read (| total_nanos |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) + |) + |) |), - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| entry |), @@ -4873,17 +5280,18 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) + |) + |) |) |))) ] |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -4902,13 +5310,17 @@ Module time. [ 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" |) |)) + M.rust_cast (| + M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) + |) |) ] |); - M.read (| Value.String "overflow in iter::sum over durations" |) + M.read (| + M.of_value (| Value.String "overflow in iter::sum over durations" |) + |) ] |) |) in @@ -4916,14 +5328,15 @@ Module time. 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" |) |)) + M.rust_cast (| M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) |) |) |) in M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "new", [] |), - [ M.read (| total_secs |); M.rust_cast (M.read (| total_nanos |)) ] + [ M.read (| total_secs |); M.rust_cast (| M.read (| total_nanos |) |) ] |) |) |))) @@ -5131,7 +5544,7 @@ Module time. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5141,7 +5554,7 @@ Module time. let prefix := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -5159,28 +5572,30 @@ Module time. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "+")); - fun γ => ltac:(M.monadic (M.alloc (| M.read (| Value.String "" |) |))) + M.of_value (| Value.String "+" |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.read (| M.of_value (| Value.String "" |) |) |))) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| + BinOp.Pure.gt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)) - (Value.Integer Integer.U64 0) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -5207,26 +5622,27 @@ Module time. |) |); BinOp.Panic.div (| + Integer.U32, M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |), - Value.Integer Integer.U32 10 + M.of_value (| Value.Integer 10 |) |); M.read (| prefix |); - M.read (| Value.String "s" |) + M.read (| M.of_value (| Value.String "s" |) |) ] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5236,10 +5652,9 @@ 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" |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5248,8 +5663,9 @@ Module time. M.get_associated_function (| Self, "fmt_decimal.fmt", [] |), [ M.read (| f |); - M.rust_cast - (BinOp.Panic.div (| + M.rust_cast (| + BinOp.Panic.div (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -5264,8 +5680,10 @@ Module time. M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |) - |)); + |) + |); BinOp.Panic.rem (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -5280,26 +5698,27 @@ Module time. 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 Integer.U32 10 + M.of_value (| Value.Integer 10 |) |); M.read (| prefix |); - M.read (| Value.String "ms" |) + M.read (| M.of_value (| Value.String "ms" |) |) ] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5309,10 +5728,11 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) - (M.read (| + |), + M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5324,8 +5744,9 @@ Module time. M.get_associated_function (| Self, "fmt_decimal.fmt", [] |), [ M.read (| f |); - M.rust_cast - (BinOp.Panic.div (| + M.rust_cast (| + BinOp.Panic.div (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -5340,8 +5761,10 @@ Module time. M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) |) - |)); + |) + |); BinOp.Panic.rem (| + Integer.U32, M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -5358,13 +5781,16 @@ Module time. |) |); BinOp.Panic.div (| + Integer.U32, M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) |), - Value.Integer Integer.U32 10 + M.of_value (| Value.Integer 10 |) |); M.read (| prefix |); - M.read (| Value.String (String.String "181" "s") |) + M.read (| + M.of_value (| Value.String (String.String "181" "s") |) + |) ] |) |))); @@ -5375,8 +5801,8 @@ Module time. M.get_associated_function (| Self, "fmt_decimal.fmt", [] |), [ M.read (| f |); - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5386,11 +5812,12 @@ Module time. "core::time::Nanoseconds", 0 |) - |)); - Value.Integer Integer.U32 0; - Value.Integer Integer.U32 1; + |) + |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |); M.read (| prefix |); - M.read (| Value.String "ns" |) + M.read (| M.of_value (| Value.String "ns" |) |) ] |) |))) @@ -5423,7 +5850,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::TryFromFloatSecsError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5437,17 +5864,18 @@ Module time. |), [ M.read (| f |); - M.read (| Value.String "TryFromFloatSecsError" |); - M.read (| Value.String "kind" |); + M.read (| M.of_value (| Value.String "TryFromFloatSecsError" |) |); + M.read (| M.of_value (| Value.String "kind" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::TryFromFloatSecsError", "kind" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -5465,32 +5893,35 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::TryFromFloatSecsError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "core::time::TryFromFloatSecsError" - [ - ("kind", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "core::time::TryFromFloatSecsErrorKind", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "core::time::TryFromFloatSecsError", - "kind" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "core::time::TryFromFloatSecsError" + [ + ("kind", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "core::time::TryFromFloatSecsErrorKind", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "core::time::TryFromFloatSecsError", + "kind" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -5517,7 +5948,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::TryFromFloatSecsError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5570,15 +6001,15 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::TryFromFloatSecsError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -5608,7 +6039,7 @@ Module time. } } *) - Definition description (τ : list Ty.t) (α : list Value.t) : M := + Definition description (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5623,11 +6054,15 @@ Module time. [ fun γ => ltac:(M.monadic - (Value.String "can not convert float seconds to Duration: value is negative")); + (M.of_value (| + Value.String "can not convert float seconds to Duration: value is negative" + |))); fun γ => ltac:(M.monadic - (Value.String - "can not convert float seconds to Duration: value is either too big or NaN")) + (M.of_value (| + Value.String + "can not convert float seconds to Duration: value is either too big or NaN" + |))) ] |) |))) @@ -5645,7 +6080,7 @@ Module time. self.description().fmt(f) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5700,7 +6135,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::TryFromFloatSecsErrorKind". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -5717,11 +6152,11 @@ Module time. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Negative" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Negative" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "OverflowOrNan" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "OverflowOrNan" |) |) |))) ] |) |) @@ -5742,7 +6177,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::TryFromFloatSecsErrorKind". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -5755,13 +6190,17 @@ Module time. ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple "core::time::TryFromFloatSecsErrorKind::Negative" [] + M.of_value (| + Value.StructTuple "core::time::TryFromFloatSecsErrorKind::Negative" [] + |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in M.alloc (| - Value.StructTuple "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" [] + M.of_value (| + Value.StructTuple "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" [] + |) |))) ] |) @@ -5792,7 +6231,7 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::TryFromFloatSecsErrorKind". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -5819,7 +6258,7 @@ Module time. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -5847,12 +6286,12 @@ Module time. Definition Self : Ty.t := Ty.path "core::time::TryFromFloatSecsErrorKind". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/tuple.v b/CoqOfRust/core/tuple.v index e32410dfd..31686ac66 100644 --- a/CoqOfRust/core/tuple.v +++ b/CoqOfRust/core/tuple.v @@ -14,15 +14,15 @@ Module tuple. } } *) - Definition ordering_is_some (τ : list Ty.t) (α : list Value.t) : M := + Definition ordering_is_some (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c; x ] => ltac:(M.monadic (let c := M.alloc (| c |) in let x := M.alloc (| x |) in - BinOp.Pure.eq - (M.rust_cast (M.read (| x |))) - (M.read (| + BinOp.Pure.eq (| + M.rust_cast (| M.read (| x |) |), + M.read (| M.match_operator (| c, [ @@ -35,11 +35,12 @@ Module tuple. 0 |) in let c := M.copy (| γ0_0 |) in - M.alloc (| M.rust_cast (M.read (| c |)) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I8 2 |))) + M.alloc (| M.rust_cast (| M.read (| c |) |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))) ] |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -51,7 +52,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -73,7 +74,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -151,7 +152,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -173,7 +174,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -195,7 +196,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -217,7 +218,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -239,7 +240,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -280,7 +281,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; other ] => @@ -314,24 +315,27 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -353,7 +357,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -367,7 +371,9 @@ Module tuple. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in let value_T := M.copy (| γ0_0 |) in - M.alloc (| Value.Tuple [ M.read (| value_T |) ] |))) + M.alloc (| + M.of_value (| Value.Tuple [ A.to_value (M.read (| value_T |)) ] |) + |))) ] |) |))) @@ -392,7 +398,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -406,7 +412,9 @@ Module tuple. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let value_T := M.copy (| γ0_0 |) in - M.alloc (| Value.Array [ M.read (| value_T |) ] |))) + M.alloc (| + M.of_value (| Value.Array [ A.to_value (M.read (| value_T |)) ] |) + |))) ] |) |))) @@ -430,7 +438,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [ self; other ] => @@ -462,7 +470,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [ self; other ] => @@ -555,7 +563,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [ self; other ] => @@ -612,7 +620,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [ self; other ] => @@ -631,24 +639,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -673,7 +688,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [ self; other ] => @@ -692,24 +707,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -734,7 +756,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [ self; other ] => @@ -753,24 +775,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -795,7 +824,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [ self; other ] => @@ -814,24 +843,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -875,7 +911,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [ self; other ] => @@ -932,34 +968,38 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -981,7 +1021,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -997,7 +1037,12 @@ Module tuple. let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in let value_U := M.copy (| γ0_0 |) in let value_T := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| value_U |); M.read (| value_T |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| value_U |)); A.to_value (M.read (| value_T |)) ] + |) + |))) ] |) |))) @@ -1022,7 +1067,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -1038,7 +1083,12 @@ Module tuple. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let value_U := M.copy (| γ0_0 |) in let value_T := M.copy (| γ0_1 |) in - M.alloc (| Value.Array [ M.read (| value_U |); M.read (| value_T |) ] |))) + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| value_U |)); A.to_value (M.read (| value_T |)) ] + |) + |))) ] |) |))) @@ -1062,7 +1112,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [ self; other ] => @@ -1104,7 +1154,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [ self; other ] => @@ -1207,7 +1257,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [ self; other ] => @@ -1295,7 +1345,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [ self; other ] => @@ -1314,24 +1364,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -1353,28 +1410,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -1407,7 +1470,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [ self; other ] => @@ -1426,24 +1489,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -1465,28 +1535,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -1519,7 +1595,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [ self; other ] => @@ -1538,24 +1614,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -1577,21 +1660,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1600,7 +1686,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -1634,7 +1722,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [ self; other ] => @@ -1653,24 +1741,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -1692,21 +1787,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1715,7 +1813,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -1768,7 +1868,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [ self; other ] => @@ -1844,44 +1944,49 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -1903,7 +2008,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -1922,8 +2027,14 @@ Module tuple. let value_U := M.copy (| γ0_1 |) in let value_T := M.copy (| γ0_2 |) in M.alloc (| - Value.Tuple - [ M.read (| value_V |); M.read (| value_U |); M.read (| value_T |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -1949,7 +2060,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -1968,8 +2079,14 @@ Module tuple. let value_U := M.copy (| γ0_1 |) in let value_T := M.copy (| γ0_2 |) in M.alloc (| - Value.Array - [ M.read (| value_V |); M.read (| value_U |); M.read (| value_T |) ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -1994,7 +2111,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [ self; other ] => @@ -2046,7 +2163,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [ self; other ] => @@ -2159,7 +2276,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [ self; other ] => @@ -2278,7 +2395,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [ self; other ] => @@ -2297,24 +2414,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -2336,28 +2460,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -2379,24 +2509,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2408,7 +2541,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -2444,7 +2579,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [ self; other ] => @@ -2463,24 +2598,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -2502,28 +2644,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -2545,24 +2693,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2574,7 +2725,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -2610,7 +2763,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [ self; other ] => @@ -2629,24 +2782,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -2668,21 +2828,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2691,7 +2854,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -2714,24 +2879,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2743,7 +2911,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -2779,7 +2949,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [ self; other ] => @@ -2798,24 +2968,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -2837,21 +3014,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2860,7 +3040,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -2883,24 +3065,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2912,7 +3097,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -2967,7 +3154,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [ self; other ] => @@ -3062,54 +3249,60 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self W V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", W, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", W, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -3131,7 +3324,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -3152,13 +3345,15 @@ Module tuple. let value_U := M.copy (| γ0_2 |) in let value_T := M.copy (| γ0_3 |) in M.alloc (| - Value.Tuple - [ - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -3184,7 +3379,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -3205,13 +3400,15 @@ Module tuple. let value_U := M.copy (| γ0_2 |) in let value_T := M.copy (| γ0_3 |) in M.alloc (| - Value.Array - [ - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -3236,7 +3433,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [ self; other ] => @@ -3298,7 +3495,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [ self; other ] => @@ -3422,7 +3619,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [ self; other ] => @@ -3578,7 +3775,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [ self; other ] => @@ -3597,24 +3794,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -3636,28 +3840,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -3679,24 +3889,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3708,7 +3921,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -3731,26 +3946,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3765,7 +3983,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -3809,7 +4029,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [ self; other ] => @@ -3828,24 +4048,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -3867,28 +4094,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -3910,24 +4143,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3939,7 +4175,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -3962,26 +4200,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -3996,7 +4237,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -4040,7 +4283,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [ self; other ] => @@ -4059,24 +4302,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -4098,21 +4348,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4121,7 +4374,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -4144,24 +4399,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4173,7 +4431,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -4196,26 +4456,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4230,9 +4493,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -4276,7 +4541,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [ self; other ] => @@ -4295,25 +4560,32 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] - |) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] + |) |))); fun γ => ltac:(M.monadic @@ -4334,21 +4606,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4357,7 +4632,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -4380,24 +4657,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4409,7 +4689,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -4432,26 +4714,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -4466,9 +4751,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -4531,7 +4818,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [ self; other ] => @@ -4663,64 +4950,71 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self X W V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", X, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", W, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", X, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", W, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -4742,7 +5036,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -4765,14 +5059,16 @@ Module tuple. let value_U := M.copy (| γ0_3 |) in let value_T := M.copy (| γ0_4 |) in M.alloc (| - Value.Tuple - [ - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -4798,7 +5094,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -4821,14 +5117,16 @@ Module tuple. let value_U := M.copy (| γ0_3 |) in let value_T := M.copy (| γ0_4 |) in M.alloc (| - Value.Array - [ - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -4853,7 +5151,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [ self; other ] => @@ -4925,7 +5223,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [ self; other ] => @@ -5061,7 +5359,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [ self; other ] => @@ -5254,7 +5552,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [ self; other ] => @@ -5273,24 +5571,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -5312,28 +5617,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -5355,24 +5666,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5384,7 +5698,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -5407,26 +5723,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5441,7 +5760,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -5470,26 +5791,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5504,9 +5828,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -5552,7 +5878,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [ self; other ] => @@ -5571,24 +5897,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -5610,28 +5943,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -5653,24 +5992,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5682,7 +6024,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -5705,26 +6049,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5739,7 +6086,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -5768,26 +6117,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5802,9 +6154,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -5850,7 +6204,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [ self; other ] => @@ -5869,24 +6223,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -5908,21 +6269,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -5931,7 +6295,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -5954,24 +6320,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -5983,7 +6352,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -6006,26 +6377,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6040,9 +6414,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -6071,26 +6447,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6105,9 +6484,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -6153,7 +6534,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [ self; other ] => @@ -6172,24 +6553,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -6211,21 +6599,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6234,7 +6625,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -6257,24 +6650,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6286,7 +6682,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -6309,26 +6707,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6343,9 +6744,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -6374,26 +6777,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -6408,9 +6814,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -6475,7 +6883,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [ self; other ] => @@ -6638,74 +7046,82 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Y X W V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", X, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", W, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", X, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", W, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -6727,7 +7143,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -6752,15 +7168,17 @@ Module tuple. let value_U := M.copy (| γ0_4 |) in let value_T := M.copy (| γ0_5 |) in M.alloc (| - Value.Tuple - [ - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -6786,7 +7204,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -6811,15 +7229,17 @@ Module tuple. let value_U := M.copy (| γ0_4 |) in let value_T := M.copy (| γ0_5 |) in M.alloc (| - Value.Array - [ - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -6844,7 +7264,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -6926,7 +7346,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -7072,7 +7492,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -7302,7 +7722,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -7321,24 +7741,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -7360,28 +7787,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -7403,24 +7836,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7432,7 +7868,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -7455,26 +7893,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7489,7 +7930,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -7518,26 +7961,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7552,9 +7998,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -7583,26 +8031,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7617,9 +8068,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -7667,7 +8120,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -7686,24 +8139,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -7725,30 +8185,36 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] - |) - |))); + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] + |) + |))); fun γ => ltac:(M.monadic (let c := @@ -7768,24 +8234,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7797,7 +8266,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -7820,26 +8291,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7854,7 +8328,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -7883,26 +8359,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7917,9 +8396,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -7948,26 +8429,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -7982,9 +8466,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -8032,7 +8518,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -8051,24 +8537,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -8090,21 +8583,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -8113,7 +8609,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -8136,24 +8634,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8165,7 +8666,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -8188,26 +8691,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8222,9 +8728,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -8253,26 +8761,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8287,9 +8798,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -8318,26 +8831,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8352,9 +8868,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -8402,7 +8920,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -8421,24 +8939,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -8460,21 +8985,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -8483,7 +9011,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -8506,24 +9036,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8535,7 +9068,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -8558,26 +9093,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8592,9 +9130,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -8623,26 +9163,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8657,9 +9200,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -8688,26 +9233,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -8722,9 +9270,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -8791,7 +9341,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -8985,84 +9535,93 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Z Y X W V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", X, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", W, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", X, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", W, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -9084,7 +9643,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -9111,16 +9670,18 @@ Module tuple. let value_U := M.copy (| γ0_5 |) in let value_T := M.copy (| γ0_6 |) in M.alloc (| - Value.Tuple - [ - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -9146,7 +9707,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -9173,16 +9734,18 @@ Module tuple. let value_U := M.copy (| γ0_5 |) in let value_T := M.copy (| γ0_6 |) in M.alloc (| - Value.Array - [ - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -9207,7 +9770,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -9299,7 +9862,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -9455,7 +10018,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -9723,7 +10286,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -9742,24 +10305,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -9781,28 +10351,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -9824,24 +10400,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9853,7 +10432,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -9876,26 +10457,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9910,7 +10494,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -9939,26 +10525,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -9973,9 +10562,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -10004,26 +10595,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10038,9 +10632,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -10069,26 +10665,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10103,9 +10704,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -10155,7 +10758,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -10174,24 +10777,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -10213,28 +10823,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -10256,24 +10872,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10285,7 +10904,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -10308,26 +10929,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10342,7 +10966,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -10371,26 +10997,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10405,9 +11034,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -10436,26 +11067,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10470,9 +11104,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -10501,26 +11137,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10535,9 +11176,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -10587,7 +11230,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -10606,24 +11249,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -10645,21 +11295,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -10668,7 +11321,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -10691,24 +11346,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10720,7 +11378,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -10743,26 +11403,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10777,9 +11440,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -10808,26 +11473,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10842,9 +11510,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -10873,26 +11543,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10907,9 +11580,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -10938,26 +11613,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -10972,9 +11652,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -11024,7 +11706,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -11043,24 +11725,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -11082,21 +11771,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -11105,7 +11797,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -11128,24 +11822,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11157,7 +11854,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -11180,26 +11879,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11214,9 +11916,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -11245,26 +11949,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11279,9 +11986,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -11310,26 +12019,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11344,9 +12056,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -11375,26 +12089,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -11409,9 +12128,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -11480,7 +12201,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -11706,94 +12427,104 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A Z Y X W V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", A, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", X, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", W, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", A, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", X, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", W, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -11815,7 +12546,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -11844,17 +12575,19 @@ Module tuple. let value_U := M.copy (| γ0_6 |) in let value_T := M.copy (| γ0_7 |) in M.alloc (| - Value.Tuple - [ - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -11880,7 +12613,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -11909,17 +12642,19 @@ Module tuple. let value_U := M.copy (| γ0_6 |) in let value_T := M.copy (| γ0_7 |) in M.alloc (| - Value.Array - [ - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -11944,7 +12679,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -12046,7 +12781,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -12212,7 +12947,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -12522,7 +13257,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -12541,24 +13276,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -12580,28 +13322,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -12623,24 +13371,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12652,7 +13403,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -12675,26 +13428,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12709,7 +13465,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -12738,26 +13496,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12772,9 +13533,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -12803,26 +13566,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12837,9 +13603,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -12868,26 +13636,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12902,9 +13675,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -12933,15 +13708,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -12950,11 +13729,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -12969,9 +13751,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -13027,7 +13811,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -13046,24 +13830,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -13085,28 +13876,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -13128,24 +13925,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13157,7 +13957,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -13180,26 +13982,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13214,7 +14019,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -13243,26 +14050,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13277,9 +14087,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -13308,26 +14120,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13342,9 +14157,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -13373,26 +14190,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13407,9 +14229,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -13438,15 +14262,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -13455,11 +14283,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] - ] - |)) + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13474,9 +14305,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -13532,7 +14365,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -13551,24 +14384,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -13590,21 +14430,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13613,7 +14456,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -13636,24 +14481,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13665,7 +14513,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -13688,26 +14538,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13722,9 +14575,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -13753,26 +14608,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13787,9 +14645,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -13818,26 +14678,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13852,9 +14715,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -13883,26 +14748,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13917,9 +14787,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -13948,15 +14820,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -13965,11 +14841,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -13984,9 +14863,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -14042,7 +14923,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -14061,24 +14942,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -14100,21 +14988,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -14123,7 +15014,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -14146,24 +15039,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14175,7 +15071,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -14198,26 +15096,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14232,9 +15133,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -14263,26 +15166,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14297,9 +15203,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -14328,26 +15236,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14362,9 +15273,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -14393,26 +15306,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14427,9 +15345,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -14458,15 +15378,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -14475,11 +15399,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -14494,9 +15421,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -14571,7 +15500,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -14833,104 +15762,115 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self B A Z Y X W V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", B, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", A, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", X, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", W, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", B, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", A, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", X, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", W, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -14952,7 +15892,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -14983,18 +15923,20 @@ Module tuple. let value_U := M.copy (| γ0_7 |) in let value_T := M.copy (| γ0_8 |) in M.alloc (| - Value.Tuple - [ - M.read (| value_B |); - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_B |)); + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -15020,7 +15962,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -15051,18 +15993,20 @@ Module tuple. let value_U := M.copy (| γ0_7 |) in let value_T := M.copy (| γ0_8 |) in M.alloc (| - Value.Array - [ - M.read (| value_B |); - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_B |)); + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -15088,7 +16032,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -15200,7 +16144,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -15381,7 +16325,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -15735,7 +16679,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -15754,24 +16698,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -15793,28 +16744,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -15836,24 +16793,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -15865,7 +16825,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -15888,26 +16850,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -15922,7 +16887,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -15951,26 +16918,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -15985,9 +16955,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16016,26 +16988,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16050,9 +17025,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16081,26 +17058,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16115,9 +17097,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16146,15 +17130,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -16163,11 +17151,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16182,9 +17173,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16218,7 +17211,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -16226,8 +17221,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -16236,12 +17231,15 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) - |)) in + |) + |) + |)) in let _ := M.is_constant_or_break_match (| M.read (| @@ -16260,9 +17258,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16320,7 +17320,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -16339,24 +17339,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -16378,28 +17385,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -16421,24 +17434,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16450,7 +17466,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -16473,26 +17491,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16507,7 +17528,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -16536,26 +17559,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16570,9 +17596,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16601,26 +17629,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16635,9 +17666,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16666,26 +17699,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16700,9 +17738,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16731,15 +17771,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -16748,11 +17792,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16767,9 +17814,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16803,7 +17852,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -16811,8 +17862,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -16821,11 +17872,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -16845,9 +17899,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -16905,7 +17961,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -16924,24 +17980,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -16963,21 +18026,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -16986,7 +18052,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -17009,24 +18077,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17038,7 +18109,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -17061,26 +18134,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17095,9 +18171,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17126,26 +18204,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17160,9 +18241,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17191,26 +18274,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17225,9 +18311,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17256,26 +18344,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17290,9 +18383,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17321,15 +18416,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -17338,11 +18437,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17357,9 +18459,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17393,7 +18497,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -17401,8 +18507,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -17411,11 +18517,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17435,9 +18544,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17495,7 +18606,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -17514,24 +18625,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -17553,21 +18671,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -17576,7 +18697,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -17599,24 +18722,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17628,7 +18754,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -17651,26 +18779,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17685,9 +18816,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17716,26 +18849,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17750,9 +18886,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17781,26 +18919,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17815,9 +18956,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17846,26 +18989,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17880,9 +19028,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17911,15 +19061,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -17928,11 +19082,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -17947,9 +19104,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -17983,7 +19142,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -17991,8 +19152,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -18001,11 +19162,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -18025,9 +19189,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -18105,7 +19271,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -18406,152 +19572,164 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self C B A Z Y X W V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", C, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", B, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", A, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", X, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", W, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) - | _, _ => M.impossible - end. - - Axiom Implements : - forall (C B A Z Y X W V U T : Ty.t), - M.IsTraitInstance - "core::default::Default" - (Self C B A Z Y X W V U T) - (* Trait polymorphic types *) [] - (* Instance *) [ ("default", InstanceField.Method (default C B A Z Y X W V U T)) ]. - End Impl_core_default_Default_where_core_default_Default_C_where_core_default_Default_B_where_core_default_Default_A_where_core_default_Default_Z_where_core_default_Default_Y_where_core_default_Default_X_where_core_default_Default_W_where_core_default_Default_V_where_core_default_Default_U_where_core_default_Default_T_for_Tuple_C_B_A_Z_Y_X_W_V_U_T_. - - Module Impl_core_convert_From_array_T_for_Tuple_T_T_T_T_T_T_T_T_T_T_. - Definition Self (T : Ty.t) : Ty.t := Ty.tuple [ T; T; T; T; T; T; T; T; T; T ]. - - (* - fn from(array: [T; ${count($T)}]) -> Self { - let [$($T,)+] = array; - ($($T,)+) - } - *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := - let Self : Ty.t := Self T in - match τ, α with - | [], [ array ] => - ltac:(M.monadic - (let array := M.alloc (| array |) in - M.read (| - M.match_operator (| - array, + (M.of_value (| + Value.Tuple [ - fun γ => - ltac:(M.monadic - (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in - let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in - let γ0_2 := M.SubPointer.get_slice_index (| γ, 2 |) in - let γ0_3 := M.SubPointer.get_slice_index (| γ, 3 |) in - let γ0_4 := M.SubPointer.get_slice_index (| γ, 4 |) in + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", C, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", B, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", A, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", X, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", W, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + forall (C B A Z Y X W V U T : Ty.t), + M.IsTraitInstance + "core::default::Default" + (Self C B A Z Y X W V U T) + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method (default C B A Z Y X W V U T)) ]. + End Impl_core_default_Default_where_core_default_Default_C_where_core_default_Default_B_where_core_default_Default_A_where_core_default_Default_Z_where_core_default_Default_Y_where_core_default_Default_X_where_core_default_Default_W_where_core_default_Default_V_where_core_default_Default_U_where_core_default_Default_T_for_Tuple_C_B_A_Z_Y_X_W_V_U_T_. + + Module Impl_core_convert_From_array_T_for_Tuple_T_T_T_T_T_T_T_T_T_T_. + Definition Self (T : Ty.t) : Ty.t := Ty.tuple [ T; T; T; T; T; T; T; T; T; T ]. + + (* + fn from(array: [T; ${count($T)}]) -> Self { + let [$($T,)+] = array; + ($($T,)+) + } + *) + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self T in + match τ, α with + | [], [ array ] => + ltac:(M.monadic + (let array := M.alloc (| array |) in + M.read (| + M.match_operator (| + array, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in + let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in + let γ0_2 := M.SubPointer.get_slice_index (| γ, 2 |) in + let γ0_3 := M.SubPointer.get_slice_index (| γ, 3 |) in + let γ0_4 := M.SubPointer.get_slice_index (| γ, 4 |) in let γ0_5 := M.SubPointer.get_slice_index (| γ, 5 |) in let γ0_6 := M.SubPointer.get_slice_index (| γ, 6 |) in let γ0_7 := M.SubPointer.get_slice_index (| γ, 7 |) in @@ -18568,19 +19746,21 @@ Module tuple. let value_U := M.copy (| γ0_8 |) in let value_T := M.copy (| γ0_9 |) in M.alloc (| - Value.Tuple - [ - M.read (| value_C |); - M.read (| value_B |); - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_C |)); + A.to_value (M.read (| value_B |)); + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -18606,7 +19786,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -18639,19 +19819,21 @@ Module tuple. let value_U := M.copy (| γ0_8 |) in let value_T := M.copy (| γ0_9 |) in M.alloc (| - Value.Array - [ - M.read (| value_C |); - M.read (| value_B |); - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_C |)); + A.to_value (M.read (| value_B |)); + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -18677,7 +19859,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -18805,7 +19987,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -19002,7 +20184,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -19404,7 +20586,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -19423,24 +20605,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -19462,28 +20651,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -19505,24 +20700,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -19534,7 +20732,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -19557,26 +20757,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -19591,7 +20794,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -19620,26 +20825,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -19654,9 +20862,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -19685,26 +20895,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -19719,9 +20932,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -19750,26 +20965,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -19784,9 +21004,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -19815,15 +21037,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -19832,11 +21058,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -19851,9 +21080,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -19887,7 +21118,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -19895,8 +21128,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -19905,11 +21138,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -19929,9 +21165,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -19965,8 +21203,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -19975,8 +21215,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -19985,11 +21225,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20009,9 +21252,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -20073,7 +21318,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -20092,24 +21337,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -20131,28 +21383,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -20174,24 +21432,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20203,7 +21464,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -20226,26 +21489,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20260,7 +21526,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -20289,26 +21557,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20323,9 +21594,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -20354,26 +21627,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20388,9 +21664,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -20419,26 +21697,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20453,9 +21736,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -20484,15 +21769,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -20501,11 +21790,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20520,9 +21812,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -20556,7 +21850,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -20564,8 +21860,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -20574,11 +21870,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20598,9 +21897,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -20634,8 +21935,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -20644,8 +21947,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -20654,11 +21957,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20678,9 +21984,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -20742,7 +22050,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -20761,24 +22069,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -20800,21 +22115,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -20823,7 +22141,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -20846,24 +22166,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20875,7 +22198,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -20898,26 +22223,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20932,9 +22260,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -20963,26 +22293,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -20997,9 +22330,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21028,26 +22363,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21062,9 +22400,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21093,26 +22433,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21127,9 +22472,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21158,15 +22505,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -21175,11 +22526,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21194,9 +22548,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21230,7 +22586,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -21238,8 +22596,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -21248,11 +22606,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21272,9 +22633,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21308,8 +22671,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -21318,8 +22683,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -21328,11 +22693,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21352,9 +22720,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21416,7 +22786,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -21435,24 +22805,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -21474,21 +22851,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -21497,7 +22877,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -21520,24 +22902,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21549,7 +22934,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -21572,26 +22959,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21606,9 +22996,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21637,26 +23029,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21671,9 +23066,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21702,26 +23099,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21736,9 +23136,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21767,26 +23169,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21801,9 +23208,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21832,15 +23241,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -21849,11 +23262,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21868,9 +23284,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21904,7 +23322,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -21912,8 +23332,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -21922,11 +23342,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -21946,9 +23369,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -21982,8 +23407,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -21992,8 +23419,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -22002,11 +23429,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -22026,9 +23456,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -22110,7 +23542,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -22450,124 +23882,137 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self D C B A Z Y X W V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", D, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", C, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", B, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", A, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", X, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", W, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", D, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", C, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", B, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", A, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", X, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", W, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -22589,7 +24034,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -22624,20 +24069,22 @@ Module tuple. let value_U := M.copy (| γ0_9 |) in let value_T := M.copy (| γ0_10 |) in M.alloc (| - Value.Tuple - [ - M.read (| value_D |); - M.read (| value_C |); - M.read (| value_B |); - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_D |)); + A.to_value (M.read (| value_C |)); + A.to_value (M.read (| value_B |)); + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -22663,7 +24110,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -22698,20 +24145,22 @@ Module tuple. let value_U := M.copy (| γ0_9 |) in let value_T := M.copy (| γ0_10 |) in M.alloc (| - Value.Array - [ - M.read (| value_D |); - M.read (| value_C |); - M.read (| value_B |); - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_D |)); + A.to_value (M.read (| value_C |)); + A.to_value (M.read (| value_B |)); + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -22737,7 +24186,7 @@ Module tuple. $( ${ignore($T)} self.${index()} == other.${index()} )&&+ } *) - Definition eq (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -22887,7 +24336,7 @@ Module tuple. $( ${ignore($T)} self.${index()} != other.${index()} )||+ } *) - Definition ne (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ne (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -23106,11 +24555,7 @@ Module tuple. lexical_partial_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition partial_cmp - (E D C B A Z Y X W V U T : Ty.t) - (τ : list Ty.t) - (α : list Value.t) - : M := + Definition partial_cmp (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -23562,7 +25007,7 @@ Module tuple. lexical_ord!(lt, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition lt (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition lt (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -23581,24 +25026,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -23620,28 +25072,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -23663,24 +25121,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23692,7 +25153,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -23715,26 +25178,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23749,7 +25215,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -23778,26 +25246,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23812,9 +25283,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -23843,26 +25316,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23877,9 +25353,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -23908,26 +25386,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -23942,9 +25425,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -23973,15 +25458,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -23990,11 +25479,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24009,9 +25501,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24045,7 +25539,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -24053,8 +25549,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -24063,11 +25559,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24087,9 +25586,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24123,8 +25624,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -24133,8 +25636,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -24143,11 +25646,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24167,9 +25673,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24206,8 +25714,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun @@ -24217,8 +25727,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -24227,11 +25737,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := @@ -24252,9 +25765,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24319,7 +25834,7 @@ Module tuple. lexical_ord!(le, Less, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition le (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition le (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -24338,24 +25853,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -24377,28 +25899,34 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Less" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Less" [] |) + ] |) |))); fun γ => @@ -24420,24 +25948,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24449,7 +25980,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -24472,26 +26005,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24506,7 +26042,9 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Less" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) ] |) |))); @@ -24535,26 +26073,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24569,9 +26110,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24600,26 +26143,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24634,9 +26180,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24665,26 +26213,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24699,9 +26252,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24730,15 +26285,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -24747,11 +26306,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24766,9 +26328,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24802,7 +26366,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -24810,8 +26376,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -24820,11 +26386,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24844,9 +26413,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24880,8 +26451,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -24890,8 +26463,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -24900,11 +26473,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -24924,9 +26500,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -24963,8 +26541,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun @@ -24974,8 +26554,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -24984,11 +26564,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := @@ -25009,9 +26592,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Less" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Less" + [] + |) ] |) |))); @@ -25076,7 +26661,7 @@ Module tuple. lexical_ord!(ge, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition ge (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ge (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -25095,24 +26680,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -25134,21 +26726,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -25157,7 +26752,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -25180,24 +26777,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -25209,7 +26809,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -25232,26 +26834,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -25266,9 +26871,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -25297,26 +26904,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -25331,9 +26941,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -25362,26 +26974,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -25396,9 +27011,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -25427,26 +27044,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -25461,9 +27083,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -25492,15 +27116,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -25509,11 +27137,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -25528,9 +27159,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -25564,7 +27197,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -25572,8 +27207,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -25582,11 +27217,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -25606,9 +27244,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -25642,8 +27282,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -25652,8 +27294,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -25662,11 +27304,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -25686,9 +27331,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -25725,8 +27372,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun @@ -25736,8 +27385,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -25746,11 +27395,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := @@ -25771,9 +27423,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -25838,7 +27492,7 @@ Module tuple. lexical_ord!(gt, Greater, $( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition gt (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition gt (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -25857,24 +27511,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Equal" [] ] - |)) + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Equal" [] |) + ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), - [ M.read (| c |); Value.StructTuple "core::cmp::Ordering::Greater" [] ] + [ + M.read (| c |); + M.of_value (| Value.StructTuple "core::cmp::Ordering::Greater" [] |) + ] |) |))); fun γ => @@ -25896,21 +27557,24 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -25919,7 +27583,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -25942,24 +27608,27 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Equal" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Equal" [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -25971,7 +27640,9 @@ Module tuple. M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple "core::cmp::Ordering::Greater" [] + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) ] |) |))); @@ -25994,26 +27665,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -26028,9 +27702,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -26059,26 +27735,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -26093,9 +27772,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -26124,26 +27805,29 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -26158,9 +27842,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -26189,26 +27875,31 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -26223,9 +27914,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -26254,15 +27947,19 @@ Module tuple. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -26271,11 +27968,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -26290,9 +27990,11 @@ Module tuple. |), [ M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -26326,7 +28028,9 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -26334,8 +28038,8 @@ Module tuple. (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -26344,11 +28048,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -26368,9 +28075,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -26404,8 +28113,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun γ => @@ -26414,8 +28125,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -26424,11 +28135,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -26448,9 +28162,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -26487,8 +28203,10 @@ Module tuple. |) in M.match_operator (| M.alloc (| - Value.Tuple - [] + M.of_value (| + Value.Tuple + [] + |) |), [ fun @@ -26498,8 +28216,8 @@ Module tuple. γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_function (| "core::tuple::ordering_is_some", [] @@ -26508,11 +28226,14 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Equal" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Equal" + [] + |) ] - |)) + |) + |) |)) in let _ := @@ -26533,9 +28254,11 @@ Module tuple. M.read (| c |); - Value.StructTuple - "core::cmp::Ordering::Greater" - [] + M.of_value (| + Value.StructTuple + "core::cmp::Ordering::Greater" + [] + |) ] |) |))); @@ -26620,7 +28343,7 @@ Module tuple. lexical_cmp!($( ${ignore($T)} self.${index()}, other.${index()} ),+) } *) - Definition cmp (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [ self; other ] => @@ -27001,134 +28724,148 @@ Module tuple. ($({ let x: $T = Default::default(); x},)+) } *) - Definition default (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (E D C B A Z Y X W V U T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self E D C B A Z Y X W V U T in match τ, α with | [], [] => ltac:(M.monadic - (Value.Tuple - [ - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", E, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", D, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", C, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", B, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", A, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", X, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", W, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", V, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", U, [], "default", [] |), - [] - |) - |) in - x - |); - M.read (| - let x := - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), - [] - |) - |) in - x - |) - ])) + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", E, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", D, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", C, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", B, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", A, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", X, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", W, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", V, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", U, [], "default", [] |), + [] + |) + |) in + x + |)); + A.to_value + (M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + [] + |) + |) in + x + |)) + ] + |))) | _, _ => M.impossible end. @@ -27150,7 +28887,7 @@ Module tuple. ($($T,)+) } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ array ] => @@ -27187,21 +28924,23 @@ Module tuple. let value_U := M.copy (| γ0_10 |) in let value_T := M.copy (| γ0_11 |) in M.alloc (| - Value.Tuple - [ - M.read (| value_E |); - M.read (| value_D |); - M.read (| value_C |); - M.read (| value_B |); - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| value_E |)); + A.to_value (M.read (| value_D |)); + A.to_value (M.read (| value_C |)); + A.to_value (M.read (| value_B |)); + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) @@ -27227,7 +28966,7 @@ Module tuple. [$($T,)+] } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ tuple ] => @@ -27264,21 +29003,23 @@ Module tuple. let value_U := M.copy (| γ0_10 |) in let value_T := M.copy (| γ0_11 |) in M.alloc (| - Value.Array - [ - M.read (| value_E |); - M.read (| value_D |); - M.read (| value_C |); - M.read (| value_B |); - M.read (| value_A |); - M.read (| value_Z |); - M.read (| value_Y |); - M.read (| value_X |); - M.read (| value_W |); - M.read (| value_V |); - M.read (| value_U |); - M.read (| value_T |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| value_E |)); + A.to_value (M.read (| value_D |)); + A.to_value (M.read (| value_C |)); + A.to_value (M.read (| value_B |)); + A.to_value (M.read (| value_A |)); + A.to_value (M.read (| value_Z |)); + A.to_value (M.read (| value_Y |)); + A.to_value (M.read (| value_X |)); + A.to_value (M.read (| value_W |)); + A.to_value (M.read (| value_V |)); + A.to_value (M.read (| value_U |)); + A.to_value (M.read (| value_T |)) + ] + |) |))) ] |) diff --git a/CoqOfRust/core/unicode/mod.v b/CoqOfRust/core/unicode/mod.v index 8361f89ec..2a1ae42d9 100644 --- a/CoqOfRust/core/unicode/mod.v +++ b/CoqOfRust/core/unicode/mod.v @@ -2,6 +2,6 @@ Require Import CoqOfRust.CoqOfRust. Module unicode. - Definition value_UNICODE_VERSION : Value.t := + Definition value_UNICODE_VERSION : A.t := M.run ltac:(M.monadic (M.get_constant (| "core::unicode::unicode_data::UNICODE_VERSION" |))). End unicode. diff --git a/CoqOfRust/core/unicode/printable.v b/CoqOfRust/core/unicode/printable.v index cc8c6006e..e60d2114a 100644 --- a/CoqOfRust/core/unicode/printable.v +++ b/CoqOfRust/core/unicode/printable.v @@ -39,7 +39,7 @@ Module unicode. current } *) - Definition check (τ : list Ty.t) (α : list Value.t) : M := + Definition check (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; singletonuppers; singletonlowers; normal ] => ltac:(M.monadic @@ -52,9 +52,11 @@ Module unicode. (M.read (| let xupper := M.alloc (| - M.rust_cast (BinOp.Panic.shr (| M.read (| x |), Value.Integer Integer.I32 8 |)) + M.rust_cast (| + BinOp.Panic.shr (| M.read (| x |), M.of_value (| Value.Integer 8 |) |) + |) |) in - let lowerstart := M.alloc (| Value.Integer Integer.Usize 0 |) in + let lowerstart := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -120,22 +122,24 @@ Module unicode. let lowerend := M.alloc (| BinOp.Panic.add (| + Integer.Usize, M.read (| lowerstart |), - M.rust_cast (M.read (| lowercount |)) + M.rust_cast (| M.read (| lowercount |) |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| xupper |)) - (M.read (| upper |)) + BinOp.Pure.eq (| + M.read (| xupper |), + M.read (| upper |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -177,14 +181,20 @@ Module unicode. |), [ M.read (| singletonlowers |); - Value.StructRecord - "core::ops::range::Range" - [ - ("start", - M.read (| lowerstart |)); - ("end_", - M.read (| lowerend |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + lowerstart + |))); + ("end_", + A.to_value + (M.read (| lowerend |))) + ] + |) ] |) ] @@ -237,7 +247,9 @@ Module unicode. M.copy (| γ0_0 |) in M.match_operator (| M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |), [ fun γ => @@ -245,14 +257,16 @@ Module unicode. (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| lower - |)) - (M.rust_cast - (M.read (| + |), + M.rust_cast (| + M.read (| x - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -266,8 +280,10 @@ Module unicode. M.never_to_any (| M.read (| M.return_ (| - Value.Bool - false + M.of_value (| + Value.Bool + false + |) |) |) |) @@ -275,29 +291,35 @@ Module unicode. fun γ => ltac:(M.monadic (M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple + [] + |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) |))) ] |)))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| xupper |)) - (M.read (| upper |)) + BinOp.Pure.lt (| + M.read (| xupper |), + M.read (| upper |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -311,21 +333,23 @@ Module unicode. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] |) in let _ := M.write (| lowerstart, M.read (| lowerend |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in - let x := M.alloc (| M.rust_cast (M.read (| x |)) |) in + let x := M.alloc (| M.rust_cast (| M.read (| x |) |) |) in let normal := M.alloc (| M.call_closure (| @@ -348,12 +372,12 @@ Module unicode. ] |) |) in - let current := M.alloc (| Value.Bool true |) in + let current := M.alloc (| M.of_value (| Value.Bool true |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -386,18 +410,20 @@ Module unicode. let len := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| v |)) - (Value.Integer Integer.U8 128)) - (Value.Integer Integer.U8 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| v |), + M.of_value (| Value.Integer 128 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -405,16 +431,18 @@ Module unicode. Value.Bool true |) in M.alloc (| - BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| v |)) - (Value.Integer Integer.U8 127)), - Value.Integer Integer.I32 8 - |)) - (M.rust_cast - (M.call_closure (| + BinOp.Pure.bit_or (| + BinOp.Panic.shl (| + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| v |), + M.of_value (| Value.Integer 127 |) + |) + |), + M.of_value (| Value.Integer 8 |) + |), + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -441,11 +469,13 @@ Module unicode. [ normal ] |) ] - |))) + |) + |) + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.rust_cast (M.read (| v |)) |))) + (M.alloc (| M.rust_cast (| M.read (| v |) |) |))) ] |) |) in @@ -453,20 +483,25 @@ Module unicode. let β := x in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), M.read (| len |) |) + BinOp.Panic.sub (| + Integer.I32, + M.read (| β |), + M.read (| len |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer Integer.I32 0) + BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -476,12 +511,14 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := - M.write (| current, UnOp.Pure.not (M.read (| current |)) |) in - M.alloc (| Value.Tuple [] |))); + M.write (| current, UnOp.Pure.not (| M.read (| current |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -491,7 +528,7 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -551,7 +588,7 @@ Module unicode. } } *) - Definition is_printable (τ : list Ty.t) (α : list Value.t) : M := + Definition is_printable (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -559,52 +596,56 @@ 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 [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| x |)) (Value.Integer Integer.U32 32) + BinOp.Pure.lt (| M.read (| x |), M.of_value (| Value.Integer 32 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Bool false |))); + M.alloc (| M.of_value (| Value.Bool false |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| x |)) (Value.Integer Integer.U32 127) + BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| Value.Integer 127 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Bool true |))); + M.alloc (| M.of_value (| Value.Bool true |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer Integer.U32 65536) + BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| Value.Integer 65536 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -640,16 +681,17 @@ Module unicode. fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer Integer.U32 131072) + BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| Value.Integer 131072 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -686,7 +728,7 @@ Module unicode. ltac:(M.monadic (let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -694,17 +736,19 @@ Module unicode. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (Value.Integer - Integer.U32 - 173792) - (M.read (| x |)), + BinOp.Pure.le (| + M.of_value (| + Value.Integer 173792 + |), + M.read (| x |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer - Integer.U32 - 173824))) + (BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| + Value.Integer 173824 + |) + |))) |) |)) in let _ := @@ -715,18 +759,22 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -734,17 +782,19 @@ Module unicode. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (Value.Integer - Integer.U32 - 177978) - (M.read (| x |)), + BinOp.Pure.le (| + M.of_value (| + Value.Integer 177978 + |), + M.read (| x |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer - Integer.U32 - 177984))) + (BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| + Value.Integer 177984 + |) + |))) |) |)) in let _ := @@ -755,18 +805,22 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -774,17 +828,19 @@ Module unicode. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (Value.Integer - Integer.U32 - 178206) - (M.read (| x |)), + BinOp.Pure.le (| + M.of_value (| + Value.Integer 178206 + |), + M.read (| x |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer - Integer.U32 - 178208))) + (BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| + Value.Integer 178208 + |) + |))) |) |)) in let _ := @@ -795,18 +851,22 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -814,17 +874,19 @@ Module unicode. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (Value.Integer - Integer.U32 - 183970) - (M.read (| x |)), + BinOp.Pure.le (| + M.of_value (| + Value.Integer 183970 + |), + M.read (| x |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer - Integer.U32 - 183984))) + (BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| + Value.Integer 183984 + |) + |))) |) |)) in let _ := @@ -835,18 +897,22 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -854,17 +920,19 @@ Module unicode. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (Value.Integer - Integer.U32 - 191457) - (M.read (| x |)), + BinOp.Pure.le (| + M.of_value (| + Value.Integer 191457 + |), + M.read (| x |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer - Integer.U32 - 194560))) + (BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| + Value.Integer 194560 + |) + |))) |) |)) in let _ := @@ -875,18 +943,22 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -894,17 +966,19 @@ Module unicode. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (Value.Integer - Integer.U32 - 195102) - (M.read (| x |)), + BinOp.Pure.le (| + M.of_value (| + Value.Integer 195102 + |), + M.read (| x |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer - Integer.U32 - 196608))) + (BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| + Value.Integer 196608 + |) + |))) |) |)) in let _ := @@ -915,18 +989,22 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -934,17 +1012,19 @@ Module unicode. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (Value.Integer - Integer.U32 - 201547) - (M.read (| x |)), + BinOp.Pure.le (| + M.of_value (| + Value.Integer 201547 + |), + M.read (| x |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer - Integer.U32 - 201552))) + (BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| + Value.Integer 201552 + |) + |))) |) |)) in let _ := @@ -955,18 +1035,22 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -974,17 +1058,19 @@ Module unicode. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (Value.Integer - Integer.U32 - 205744) - (M.read (| x |)), + BinOp.Pure.le (| + M.of_value (| + Value.Integer 205744 + |), + M.read (| x |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer - Integer.U32 - 917760))) + (BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| + Value.Integer 917760 + |) + |))) |) |)) in let _ := @@ -995,18 +1081,22 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1014,17 +1104,19 @@ Module unicode. M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.le - (Value.Integer - Integer.U32 - 918000) - (M.read (| x |)), + BinOp.Pure.le (| + M.of_value (| + Value.Integer 918000 + |), + M.read (| x |) + |), ltac:(M.monadic - (BinOp.Pure.lt - (M.read (| x |)) - (Value.Integer - Integer.U32 - 1114112))) + (BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| + Value.Integer 1114112 + |) + |))) |) |)) in let _ := @@ -1035,16 +1127,20 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| - M.return_ (| Value.Bool false |) + M.return_ (| + M.of_value (| Value.Bool false |) + |) |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Bool true |))) + M.alloc (| M.of_value (| Value.Bool true |) |))) ] |))) ] @@ -1058,1402 +1154,2008 @@ Module unicode. | _, _ => M.impossible end. - Definition value_SINGLETONS0U : Value.t := + Definition value_SINGLETONS0U : A.t := M.run ltac:(M.monadic (M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 3; Value.Integer Integer.U8 5 ]; - Value.Tuple [ Value.Integer Integer.U8 5; Value.Integer Integer.U8 6 ]; - Value.Tuple [ Value.Integer Integer.U8 6; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 7; Value.Integer Integer.U8 6 ]; - Value.Tuple [ Value.Integer Integer.U8 8; Value.Integer Integer.U8 7 ]; - Value.Tuple [ Value.Integer Integer.U8 9; Value.Integer Integer.U8 17 ]; - Value.Tuple [ Value.Integer Integer.U8 10; Value.Integer Integer.U8 28 ]; - Value.Tuple [ Value.Integer Integer.U8 11; Value.Integer Integer.U8 25 ]; - Value.Tuple [ Value.Integer Integer.U8 12; Value.Integer Integer.U8 26 ]; - Value.Tuple [ Value.Integer Integer.U8 13; Value.Integer Integer.U8 16 ]; - Value.Tuple [ Value.Integer Integer.U8 14; Value.Integer Integer.U8 12 ]; - Value.Tuple [ Value.Integer Integer.U8 15; Value.Integer Integer.U8 4 ]; - Value.Tuple [ Value.Integer Integer.U8 16; Value.Integer Integer.U8 3 ]; - Value.Tuple [ Value.Integer Integer.U8 18; Value.Integer Integer.U8 18 ]; - Value.Tuple [ Value.Integer Integer.U8 19; Value.Integer Integer.U8 9 ]; - Value.Tuple [ Value.Integer Integer.U8 22; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 23; Value.Integer Integer.U8 4 ]; - Value.Tuple [ Value.Integer Integer.U8 24; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 25; Value.Integer Integer.U8 3 ]; - Value.Tuple [ Value.Integer Integer.U8 26; Value.Integer Integer.U8 7 ]; - Value.Tuple [ Value.Integer Integer.U8 27; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 28; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 31; Value.Integer Integer.U8 22 ]; - Value.Tuple [ Value.Integer Integer.U8 32; Value.Integer Integer.U8 3 ]; - Value.Tuple [ Value.Integer Integer.U8 43; Value.Integer Integer.U8 3 ]; - Value.Tuple [ Value.Integer Integer.U8 45; Value.Integer Integer.U8 11 ]; - Value.Tuple [ Value.Integer Integer.U8 46; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 48; Value.Integer Integer.U8 3 ]; - Value.Tuple [ Value.Integer Integer.U8 49; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 50; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 167; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 169; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 170; Value.Integer Integer.U8 4 ]; - Value.Tuple [ Value.Integer Integer.U8 171; Value.Integer Integer.U8 8 ]; - Value.Tuple [ Value.Integer Integer.U8 250; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 251; Value.Integer Integer.U8 5 ]; - Value.Tuple [ Value.Integer Integer.U8 253; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 254; Value.Integer Integer.U8 3 ]; - Value.Tuple [ Value.Integer Integer.U8 255; Value.Integer Integer.U8 9 ] - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 7 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 17 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 28 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 25 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 26 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 16 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 12 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 18 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 9 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 7 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 22 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 11 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 167 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 169 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 170 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 171 |)); + A.to_value (M.of_value (| Value.Integer 8 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 250 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 251 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 253 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 254 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.of_value (| Value.Integer 9 |)) + ] + |)) + ] + |) + |) + |) |))). - Definition value_SINGLETONS0L : Value.t := + Definition value_SINGLETONS0L : A.t := M.run ltac:(M.monadic (M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 173; - Value.Integer Integer.U8 120; - Value.Integer Integer.U8 121; - Value.Integer Integer.U8 139; - Value.Integer Integer.U8 141; - Value.Integer Integer.U8 162; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 87; - Value.Integer Integer.U8 88; - Value.Integer Integer.U8 139; - Value.Integer Integer.U8 140; - Value.Integer Integer.U8 144; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 221; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 75; - Value.Integer Integer.U8 76; - Value.Integer Integer.U8 251; - Value.Integer Integer.U8 252; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 92; - Value.Integer Integer.U8 93; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 226; - Value.Integer Integer.U8 132; - Value.Integer Integer.U8 141; - Value.Integer Integer.U8 142; - Value.Integer Integer.U8 145; - Value.Integer Integer.U8 146; - Value.Integer Integer.U8 169; - Value.Integer Integer.U8 177; - Value.Integer Integer.U8 186; - Value.Integer Integer.U8 187; - Value.Integer Integer.U8 197; - Value.Integer Integer.U8 198; - Value.Integer Integer.U8 201; - Value.Integer Integer.U8 202; - Value.Integer Integer.U8 222; - Value.Integer Integer.U8 228; - Value.Integer Integer.U8 229; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 74; - Value.Integer Integer.U8 93; - Value.Integer Integer.U8 132; - Value.Integer Integer.U8 142; - Value.Integer Integer.U8 146; - Value.Integer Integer.U8 169; - Value.Integer Integer.U8 177; - Value.Integer Integer.U8 180; - Value.Integer Integer.U8 186; - Value.Integer Integer.U8 187; - Value.Integer Integer.U8 198; - Value.Integer Integer.U8 202; - Value.Integer Integer.U8 206; - Value.Integer Integer.U8 207; - Value.Integer Integer.U8 228; - Value.Integer Integer.U8 229; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 74; - Value.Integer Integer.U8 94; - Value.Integer Integer.U8 100; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 132; - Value.Integer Integer.U8 145; - Value.Integer Integer.U8 155; - Value.Integer Integer.U8 157; - Value.Integer Integer.U8 201; - Value.Integer Integer.U8 206; - Value.Integer Integer.U8 207; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 87; - Value.Integer Integer.U8 91; - Value.Integer Integer.U8 92; - Value.Integer Integer.U8 94; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 100; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 141; - Value.Integer Integer.U8 145; - Value.Integer Integer.U8 169; - Value.Integer Integer.U8 180; - Value.Integer Integer.U8 186; - Value.Integer Integer.U8 187; - Value.Integer Integer.U8 197; - Value.Integer Integer.U8 201; - Value.Integer Integer.U8 223; - Value.Integer Integer.U8 228; - Value.Integer Integer.U8 229; - Value.Integer Integer.U8 240; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 100; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 132; - Value.Integer Integer.U8 178; - Value.Integer Integer.U8 188; - Value.Integer Integer.U8 190; - Value.Integer Integer.U8 191; - Value.Integer Integer.U8 213; - Value.Integer Integer.U8 215; - Value.Integer Integer.U8 240; - Value.Integer Integer.U8 241; - Value.Integer Integer.U8 131; - Value.Integer Integer.U8 133; - Value.Integer Integer.U8 139; - Value.Integer Integer.U8 164; - Value.Integer Integer.U8 166; - Value.Integer Integer.U8 190; - Value.Integer Integer.U8 191; - Value.Integer Integer.U8 197; - Value.Integer Integer.U8 199; - Value.Integer Integer.U8 207; - Value.Integer Integer.U8 218; - Value.Integer Integer.U8 219; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 152; - Value.Integer Integer.U8 189; - Value.Integer Integer.U8 205; - Value.Integer Integer.U8 198; - Value.Integer Integer.U8 206; - Value.Integer Integer.U8 207; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 79; - Value.Integer Integer.U8 87; - Value.Integer Integer.U8 89; - Value.Integer Integer.U8 94; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 137; - Value.Integer Integer.U8 142; - Value.Integer Integer.U8 143; - Value.Integer Integer.U8 177; - Value.Integer Integer.U8 182; - Value.Integer Integer.U8 183; - Value.Integer Integer.U8 191; - Value.Integer Integer.U8 193; - Value.Integer Integer.U8 198; - Value.Integer Integer.U8 199; - Value.Integer Integer.U8 215; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 91; - Value.Integer Integer.U8 92; - Value.Integer Integer.U8 246; - Value.Integer Integer.U8 247; - Value.Integer Integer.U8 254; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 109; - Value.Integer Integer.U8 113; - Value.Integer Integer.U8 222; - Value.Integer Integer.U8 223; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 110; - Value.Integer Integer.U8 111; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 125; - Value.Integer Integer.U8 126; - Value.Integer Integer.U8 174; - Value.Integer Integer.U8 175; - Value.Integer Integer.U8 127; - Value.Integer Integer.U8 187; - Value.Integer Integer.U8 188; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 79; - Value.Integer Integer.U8 88; - Value.Integer Integer.U8 90; - Value.Integer Integer.U8 92; - Value.Integer Integer.U8 94; - Value.Integer Integer.U8 126; - Value.Integer Integer.U8 127; - Value.Integer Integer.U8 181; - Value.Integer Integer.U8 197; - Value.Integer Integer.U8 212; - Value.Integer Integer.U8 213; - Value.Integer Integer.U8 220; - Value.Integer Integer.U8 240; - Value.Integer Integer.U8 241; - Value.Integer Integer.U8 245; - Value.Integer Integer.U8 114; - Value.Integer Integer.U8 115; - Value.Integer Integer.U8 143; - Value.Integer Integer.U8 116; - Value.Integer Integer.U8 117; - Value.Integer Integer.U8 150; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 167; - Value.Integer Integer.U8 175; - Value.Integer Integer.U8 183; - Value.Integer Integer.U8 191; - Value.Integer Integer.U8 199; - Value.Integer Integer.U8 207; - Value.Integer Integer.U8 215; - Value.Integer Integer.U8 223; - Value.Integer Integer.U8 154; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 151; - Value.Integer Integer.U8 152; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 143; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 210; - Value.Integer Integer.U8 212; - Value.Integer Integer.U8 206; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 79; - Value.Integer Integer.U8 90; - Value.Integer Integer.U8 91; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 238; - Value.Integer Integer.U8 239; - Value.Integer Integer.U8 110; - Value.Integer Integer.U8 111; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 66; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 144; - Value.Integer Integer.U8 145; - Value.Integer Integer.U8 83; - Value.Integer Integer.U8 103; - Value.Integer Integer.U8 117; - Value.Integer Integer.U8 200; - Value.Integer Integer.U8 201; - Value.Integer Integer.U8 208; - Value.Integer Integer.U8 209; - Value.Integer Integer.U8 216; - Value.Integer Integer.U8 217; - Value.Integer Integer.U8 231; - Value.Integer Integer.U8 254; - Value.Integer Integer.U8 255 - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 173 |)); + A.to_value (M.of_value (| Value.Integer 120 |)); + A.to_value (M.of_value (| Value.Integer 121 |)); + A.to_value (M.of_value (| Value.Integer 139 |)); + A.to_value (M.of_value (| Value.Integer 141 |)); + A.to_value (M.of_value (| Value.Integer 162 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 87 |)); + A.to_value (M.of_value (| Value.Integer 88 |)); + A.to_value (M.of_value (| Value.Integer 139 |)); + A.to_value (M.of_value (| Value.Integer 140 |)); + A.to_value (M.of_value (| Value.Integer 144 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 221 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 75 |)); + A.to_value (M.of_value (| Value.Integer 76 |)); + A.to_value (M.of_value (| Value.Integer 251 |)); + A.to_value (M.of_value (| Value.Integer 252 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 92 |)); + A.to_value (M.of_value (| Value.Integer 93 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 226 |)); + A.to_value (M.of_value (| Value.Integer 132 |)); + A.to_value (M.of_value (| Value.Integer 141 |)); + A.to_value (M.of_value (| Value.Integer 142 |)); + A.to_value (M.of_value (| Value.Integer 145 |)); + A.to_value (M.of_value (| Value.Integer 146 |)); + A.to_value (M.of_value (| Value.Integer 169 |)); + A.to_value (M.of_value (| Value.Integer 177 |)); + A.to_value (M.of_value (| Value.Integer 186 |)); + A.to_value (M.of_value (| Value.Integer 187 |)); + A.to_value (M.of_value (| Value.Integer 197 |)); + A.to_value (M.of_value (| Value.Integer 198 |)); + A.to_value (M.of_value (| Value.Integer 201 |)); + A.to_value (M.of_value (| Value.Integer 202 |)); + A.to_value (M.of_value (| Value.Integer 222 |)); + A.to_value (M.of_value (| Value.Integer 228 |)); + A.to_value (M.of_value (| Value.Integer 229 |)); + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 74 |)); + A.to_value (M.of_value (| Value.Integer 93 |)); + A.to_value (M.of_value (| Value.Integer 132 |)); + A.to_value (M.of_value (| Value.Integer 142 |)); + A.to_value (M.of_value (| Value.Integer 146 |)); + A.to_value (M.of_value (| Value.Integer 169 |)); + A.to_value (M.of_value (| Value.Integer 177 |)); + A.to_value (M.of_value (| Value.Integer 180 |)); + A.to_value (M.of_value (| Value.Integer 186 |)); + A.to_value (M.of_value (| Value.Integer 187 |)); + A.to_value (M.of_value (| Value.Integer 198 |)); + A.to_value (M.of_value (| Value.Integer 202 |)); + A.to_value (M.of_value (| Value.Integer 206 |)); + A.to_value (M.of_value (| Value.Integer 207 |)); + A.to_value (M.of_value (| Value.Integer 228 |)); + A.to_value (M.of_value (| Value.Integer 229 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 74 |)); + A.to_value (M.of_value (| Value.Integer 94 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 132 |)); + A.to_value (M.of_value (| Value.Integer 145 |)); + A.to_value (M.of_value (| Value.Integer 155 |)); + A.to_value (M.of_value (| Value.Integer 157 |)); + A.to_value (M.of_value (| Value.Integer 201 |)); + A.to_value (M.of_value (| Value.Integer 206 |)); + A.to_value (M.of_value (| Value.Integer 207 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 87 |)); + A.to_value (M.of_value (| Value.Integer 91 |)); + A.to_value (M.of_value (| Value.Integer 92 |)); + A.to_value (M.of_value (| Value.Integer 94 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 141 |)); + A.to_value (M.of_value (| Value.Integer 145 |)); + A.to_value (M.of_value (| Value.Integer 169 |)); + A.to_value (M.of_value (| Value.Integer 180 |)); + A.to_value (M.of_value (| Value.Integer 186 |)); + A.to_value (M.of_value (| Value.Integer 187 |)); + A.to_value (M.of_value (| Value.Integer 197 |)); + A.to_value (M.of_value (| Value.Integer 201 |)); + A.to_value (M.of_value (| Value.Integer 223 |)); + A.to_value (M.of_value (| Value.Integer 228 |)); + A.to_value (M.of_value (| Value.Integer 229 |)); + A.to_value (M.of_value (| Value.Integer 240 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 132 |)); + A.to_value (M.of_value (| Value.Integer 178 |)); + A.to_value (M.of_value (| Value.Integer 188 |)); + A.to_value (M.of_value (| Value.Integer 190 |)); + A.to_value (M.of_value (| Value.Integer 191 |)); + A.to_value (M.of_value (| Value.Integer 213 |)); + A.to_value (M.of_value (| Value.Integer 215 |)); + A.to_value (M.of_value (| Value.Integer 240 |)); + A.to_value (M.of_value (| Value.Integer 241 |)); + A.to_value (M.of_value (| Value.Integer 131 |)); + A.to_value (M.of_value (| Value.Integer 133 |)); + A.to_value (M.of_value (| Value.Integer 139 |)); + A.to_value (M.of_value (| Value.Integer 164 |)); + A.to_value (M.of_value (| Value.Integer 166 |)); + A.to_value (M.of_value (| Value.Integer 190 |)); + A.to_value (M.of_value (| Value.Integer 191 |)); + A.to_value (M.of_value (| Value.Integer 197 |)); + A.to_value (M.of_value (| Value.Integer 199 |)); + A.to_value (M.of_value (| Value.Integer 207 |)); + A.to_value (M.of_value (| Value.Integer 218 |)); + A.to_value (M.of_value (| Value.Integer 219 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 152 |)); + A.to_value (M.of_value (| Value.Integer 189 |)); + A.to_value (M.of_value (| Value.Integer 205 |)); + A.to_value (M.of_value (| Value.Integer 198 |)); + A.to_value (M.of_value (| Value.Integer 206 |)); + A.to_value (M.of_value (| Value.Integer 207 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 79 |)); + A.to_value (M.of_value (| Value.Integer 87 |)); + A.to_value (M.of_value (| Value.Integer 89 |)); + A.to_value (M.of_value (| Value.Integer 94 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 137 |)); + A.to_value (M.of_value (| Value.Integer 142 |)); + A.to_value (M.of_value (| Value.Integer 143 |)); + A.to_value (M.of_value (| Value.Integer 177 |)); + A.to_value (M.of_value (| Value.Integer 182 |)); + A.to_value (M.of_value (| Value.Integer 183 |)); + A.to_value (M.of_value (| Value.Integer 191 |)); + A.to_value (M.of_value (| Value.Integer 193 |)); + A.to_value (M.of_value (| Value.Integer 198 |)); + A.to_value (M.of_value (| Value.Integer 199 |)); + A.to_value (M.of_value (| Value.Integer 215 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 91 |)); + A.to_value (M.of_value (| Value.Integer 92 |)); + A.to_value (M.of_value (| Value.Integer 246 |)); + A.to_value (M.of_value (| Value.Integer 247 |)); + A.to_value (M.of_value (| Value.Integer 254 |)); + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 109 |)); + A.to_value (M.of_value (| Value.Integer 113 |)); + A.to_value (M.of_value (| Value.Integer 222 |)); + A.to_value (M.of_value (| Value.Integer 223 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 110 |)); + A.to_value (M.of_value (| Value.Integer 111 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 125 |)); + A.to_value (M.of_value (| Value.Integer 126 |)); + A.to_value (M.of_value (| Value.Integer 174 |)); + A.to_value (M.of_value (| Value.Integer 175 |)); + A.to_value (M.of_value (| Value.Integer 127 |)); + A.to_value (M.of_value (| Value.Integer 187 |)); + A.to_value (M.of_value (| Value.Integer 188 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 79 |)); + A.to_value (M.of_value (| Value.Integer 88 |)); + A.to_value (M.of_value (| Value.Integer 90 |)); + A.to_value (M.of_value (| Value.Integer 92 |)); + A.to_value (M.of_value (| Value.Integer 94 |)); + A.to_value (M.of_value (| Value.Integer 126 |)); + A.to_value (M.of_value (| Value.Integer 127 |)); + A.to_value (M.of_value (| Value.Integer 181 |)); + A.to_value (M.of_value (| Value.Integer 197 |)); + A.to_value (M.of_value (| Value.Integer 212 |)); + A.to_value (M.of_value (| Value.Integer 213 |)); + A.to_value (M.of_value (| Value.Integer 220 |)); + A.to_value (M.of_value (| Value.Integer 240 |)); + A.to_value (M.of_value (| Value.Integer 241 |)); + A.to_value (M.of_value (| Value.Integer 245 |)); + A.to_value (M.of_value (| Value.Integer 114 |)); + A.to_value (M.of_value (| Value.Integer 115 |)); + A.to_value (M.of_value (| Value.Integer 143 |)); + A.to_value (M.of_value (| Value.Integer 116 |)); + A.to_value (M.of_value (| Value.Integer 117 |)); + A.to_value (M.of_value (| Value.Integer 150 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 167 |)); + A.to_value (M.of_value (| Value.Integer 175 |)); + A.to_value (M.of_value (| Value.Integer 183 |)); + A.to_value (M.of_value (| Value.Integer 191 |)); + A.to_value (M.of_value (| Value.Integer 199 |)); + A.to_value (M.of_value (| Value.Integer 207 |)); + A.to_value (M.of_value (| Value.Integer 215 |)); + A.to_value (M.of_value (| Value.Integer 223 |)); + A.to_value (M.of_value (| Value.Integer 154 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 151 |)); + A.to_value (M.of_value (| Value.Integer 152 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 143 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 210 |)); + A.to_value (M.of_value (| Value.Integer 212 |)); + A.to_value (M.of_value (| Value.Integer 206 |)); + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 79 |)); + A.to_value (M.of_value (| Value.Integer 90 |)); + A.to_value (M.of_value (| Value.Integer 91 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 238 |)); + A.to_value (M.of_value (| Value.Integer 239 |)); + A.to_value (M.of_value (| Value.Integer 110 |)); + A.to_value (M.of_value (| Value.Integer 111 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 66 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 144 |)); + A.to_value (M.of_value (| Value.Integer 145 |)); + A.to_value (M.of_value (| Value.Integer 83 |)); + A.to_value (M.of_value (| Value.Integer 103 |)); + A.to_value (M.of_value (| Value.Integer 117 |)); + A.to_value (M.of_value (| Value.Integer 200 |)); + A.to_value (M.of_value (| Value.Integer 201 |)); + A.to_value (M.of_value (| Value.Integer 208 |)); + A.to_value (M.of_value (| Value.Integer 209 |)); + A.to_value (M.of_value (| Value.Integer 216 |)); + A.to_value (M.of_value (| Value.Integer 217 |)); + A.to_value (M.of_value (| Value.Integer 231 |)); + A.to_value (M.of_value (| Value.Integer 254 |)); + A.to_value (M.of_value (| Value.Integer 255 |)) + ] + |) + |) + |) |))). - Definition value_SINGLETONS1U : Value.t := + Definition value_SINGLETONS1U : A.t := M.run ltac:(M.monadic (M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 6 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 3; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 4; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 5; Value.Integer Integer.U8 7 ]; - Value.Tuple [ Value.Integer Integer.U8 7; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 8; Value.Integer Integer.U8 8 ]; - Value.Tuple [ Value.Integer Integer.U8 9; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 10; Value.Integer Integer.U8 5 ]; - Value.Tuple [ Value.Integer Integer.U8 11; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 14; Value.Integer Integer.U8 4 ]; - Value.Tuple [ Value.Integer Integer.U8 16; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 17; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 18; Value.Integer Integer.U8 5 ]; - Value.Tuple [ Value.Integer Integer.U8 19; Value.Integer Integer.U8 17 ]; - Value.Tuple [ Value.Integer Integer.U8 20; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 21; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 23; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 25; Value.Integer Integer.U8 13 ]; - Value.Tuple [ Value.Integer Integer.U8 28; Value.Integer Integer.U8 5 ]; - Value.Tuple [ Value.Integer Integer.U8 29; Value.Integer Integer.U8 8 ]; - Value.Tuple [ Value.Integer Integer.U8 31; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 36; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 106; Value.Integer Integer.U8 4 ]; - Value.Tuple [ Value.Integer Integer.U8 107; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 175; Value.Integer Integer.U8 3 ]; - Value.Tuple [ Value.Integer Integer.U8 177; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 188; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 207; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 209; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 212; Value.Integer Integer.U8 12 ]; - Value.Tuple [ Value.Integer Integer.U8 213; Value.Integer Integer.U8 9 ]; - Value.Tuple [ Value.Integer Integer.U8 214; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 215; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 218; Value.Integer Integer.U8 1 ]; - Value.Tuple [ Value.Integer Integer.U8 224; Value.Integer Integer.U8 5 ]; - Value.Tuple [ Value.Integer Integer.U8 225; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 231; Value.Integer Integer.U8 4 ]; - Value.Tuple [ Value.Integer Integer.U8 232; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 238; Value.Integer Integer.U8 32 ]; - Value.Tuple [ Value.Integer Integer.U8 240; Value.Integer Integer.U8 4 ]; - Value.Tuple [ Value.Integer Integer.U8 248; Value.Integer Integer.U8 2 ]; - Value.Tuple [ Value.Integer Integer.U8 250; Value.Integer Integer.U8 3 ]; - Value.Tuple [ Value.Integer Integer.U8 251; Value.Integer Integer.U8 1 ] - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 17 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 13 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 8 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 106 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 107 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 175 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 177 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 188 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 207 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 209 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 212 |)); + A.to_value (M.of_value (| Value.Integer 12 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 213 |)); + A.to_value (M.of_value (| Value.Integer 9 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 214 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 215 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 218 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 224 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 225 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 231 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 232 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 238 |)); + A.to_value (M.of_value (| Value.Integer 32 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 240 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 248 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 250 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 251 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)) + ] + |) + |) + |) |))). - Definition value_SINGLETONS1L : Value.t := + Definition value_SINGLETONS1L : A.t := M.run ltac:(M.monadic (M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 79; - Value.Integer Integer.U8 143; - Value.Integer Integer.U8 158; - Value.Integer Integer.U8 158; - Value.Integer Integer.U8 159; - Value.Integer Integer.U8 123; - Value.Integer Integer.U8 139; - Value.Integer Integer.U8 147; - Value.Integer Integer.U8 150; - Value.Integer Integer.U8 162; - Value.Integer Integer.U8 178; - Value.Integer Integer.U8 186; - Value.Integer Integer.U8 134; - Value.Integer Integer.U8 177; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 243; - Value.Integer Integer.U8 208; - Value.Integer Integer.U8 209; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 87; - Value.Integer Integer.U8 127; - Value.Integer Integer.U8 170; - Value.Integer Integer.U8 174; - Value.Integer Integer.U8 175; - Value.Integer Integer.U8 189; - Value.Integer Integer.U8 53; - Value.Integer Integer.U8 224; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 135; - Value.Integer Integer.U8 137; - Value.Integer Integer.U8 142; - Value.Integer Integer.U8 158; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 74; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 79; - Value.Integer Integer.U8 100; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 92; - Value.Integer Integer.U8 182; - Value.Integer Integer.U8 183; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 168; - Value.Integer Integer.U8 169; - Value.Integer Integer.U8 216; - Value.Integer Integer.U8 217; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 144; - Value.Integer Integer.U8 145; - Value.Integer Integer.U8 168; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 105; - Value.Integer Integer.U8 143; - Value.Integer Integer.U8 146; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 111; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 191; - Value.Integer Integer.U8 238; - Value.Integer Integer.U8 239; - Value.Integer Integer.U8 90; - Value.Integer Integer.U8 98; - Value.Integer Integer.U8 244; - Value.Integer Integer.U8 252; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 83; - Value.Integer Integer.U8 84; - Value.Integer Integer.U8 154; - Value.Integer Integer.U8 155; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 85; - Value.Integer Integer.U8 157; - Value.Integer Integer.U8 160; - Value.Integer Integer.U8 161; - Value.Integer Integer.U8 163; - Value.Integer Integer.U8 164; - Value.Integer Integer.U8 167; - Value.Integer Integer.U8 168; - Value.Integer Integer.U8 173; - Value.Integer Integer.U8 186; - Value.Integer Integer.U8 188; - Value.Integer Integer.U8 196; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 81; - Value.Integer Integer.U8 166; - Value.Integer Integer.U8 167; - Value.Integer Integer.U8 204; - Value.Integer Integer.U8 205; - Value.Integer Integer.U8 160; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 37; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 231; - Value.Integer Integer.U8 236; - Value.Integer Integer.U8 239; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 197; - Value.Integer Integer.U8 198; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 37; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 74; - Value.Integer Integer.U8 76; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 83; - Value.Integer Integer.U8 85; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 88; - Value.Integer Integer.U8 90; - Value.Integer Integer.U8 92; - Value.Integer Integer.U8 94; - Value.Integer Integer.U8 96; - Value.Integer Integer.U8 99; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 107; - Value.Integer Integer.U8 115; - Value.Integer Integer.U8 120; - Value.Integer Integer.U8 125; - Value.Integer Integer.U8 127; - Value.Integer Integer.U8 138; - Value.Integer Integer.U8 164; - Value.Integer Integer.U8 170; - Value.Integer Integer.U8 175; - Value.Integer Integer.U8 176; - Value.Integer Integer.U8 192; - Value.Integer Integer.U8 208; - Value.Integer Integer.U8 174; - Value.Integer Integer.U8 175; - Value.Integer Integer.U8 110; - Value.Integer Integer.U8 111; - Value.Integer Integer.U8 190; - Value.Integer Integer.U8 147 - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 79 |)); + A.to_value (M.of_value (| Value.Integer 143 |)); + A.to_value (M.of_value (| Value.Integer 158 |)); + A.to_value (M.of_value (| Value.Integer 158 |)); + A.to_value (M.of_value (| Value.Integer 159 |)); + A.to_value (M.of_value (| Value.Integer 123 |)); + A.to_value (M.of_value (| Value.Integer 139 |)); + A.to_value (M.of_value (| Value.Integer 147 |)); + A.to_value (M.of_value (| Value.Integer 150 |)); + A.to_value (M.of_value (| Value.Integer 162 |)); + A.to_value (M.of_value (| Value.Integer 178 |)); + A.to_value (M.of_value (| Value.Integer 186 |)); + A.to_value (M.of_value (| Value.Integer 134 |)); + A.to_value (M.of_value (| Value.Integer 177 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 243 |)); + A.to_value (M.of_value (| Value.Integer 208 |)); + A.to_value (M.of_value (| Value.Integer 209 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 87 |)); + A.to_value (M.of_value (| Value.Integer 127 |)); + A.to_value (M.of_value (| Value.Integer 170 |)); + A.to_value (M.of_value (| Value.Integer 174 |)); + A.to_value (M.of_value (| Value.Integer 175 |)); + A.to_value (M.of_value (| Value.Integer 189 |)); + A.to_value (M.of_value (| Value.Integer 53 |)); + A.to_value (M.of_value (| Value.Integer 224 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 135 |)); + A.to_value (M.of_value (| Value.Integer 137 |)); + A.to_value (M.of_value (| Value.Integer 142 |)); + A.to_value (M.of_value (| Value.Integer 158 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 74 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 79 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 92 |)); + A.to_value (M.of_value (| Value.Integer 182 |)); + A.to_value (M.of_value (| Value.Integer 183 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 168 |)); + A.to_value (M.of_value (| Value.Integer 169 |)); + A.to_value (M.of_value (| Value.Integer 216 |)); + A.to_value (M.of_value (| Value.Integer 217 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 144 |)); + A.to_value (M.of_value (| Value.Integer 145 |)); + A.to_value (M.of_value (| Value.Integer 168 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 105 |)); + A.to_value (M.of_value (| Value.Integer 143 |)); + A.to_value (M.of_value (| Value.Integer 146 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 111 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 191 |)); + A.to_value (M.of_value (| Value.Integer 238 |)); + A.to_value (M.of_value (| Value.Integer 239 |)); + A.to_value (M.of_value (| Value.Integer 90 |)); + A.to_value (M.of_value (| Value.Integer 98 |)); + A.to_value (M.of_value (| Value.Integer 244 |)); + A.to_value (M.of_value (| Value.Integer 252 |)); + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.of_value (| Value.Integer 83 |)); + A.to_value (M.of_value (| Value.Integer 84 |)); + A.to_value (M.of_value (| Value.Integer 154 |)); + A.to_value (M.of_value (| Value.Integer 155 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 85 |)); + A.to_value (M.of_value (| Value.Integer 157 |)); + A.to_value (M.of_value (| Value.Integer 160 |)); + A.to_value (M.of_value (| Value.Integer 161 |)); + A.to_value (M.of_value (| Value.Integer 163 |)); + A.to_value (M.of_value (| Value.Integer 164 |)); + A.to_value (M.of_value (| Value.Integer 167 |)); + A.to_value (M.of_value (| Value.Integer 168 |)); + A.to_value (M.of_value (| Value.Integer 173 |)); + A.to_value (M.of_value (| Value.Integer 186 |)); + A.to_value (M.of_value (| Value.Integer 188 |)); + A.to_value (M.of_value (| Value.Integer 196 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 81 |)); + A.to_value (M.of_value (| Value.Integer 166 |)); + A.to_value (M.of_value (| Value.Integer 167 |)); + A.to_value (M.of_value (| Value.Integer 204 |)); + A.to_value (M.of_value (| Value.Integer 205 |)); + A.to_value (M.of_value (| Value.Integer 160 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 37 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 231 |)); + A.to_value (M.of_value (| Value.Integer 236 |)); + A.to_value (M.of_value (| Value.Integer 239 |)); + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.of_value (| Value.Integer 197 |)); + A.to_value (M.of_value (| Value.Integer 198 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 37 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 74 |)); + A.to_value (M.of_value (| Value.Integer 76 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 83 |)); + A.to_value (M.of_value (| Value.Integer 85 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 88 |)); + A.to_value (M.of_value (| Value.Integer 90 |)); + A.to_value (M.of_value (| Value.Integer 92 |)); + A.to_value (M.of_value (| Value.Integer 94 |)); + A.to_value (M.of_value (| Value.Integer 96 |)); + A.to_value (M.of_value (| Value.Integer 99 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 107 |)); + A.to_value (M.of_value (| Value.Integer 115 |)); + A.to_value (M.of_value (| Value.Integer 120 |)); + A.to_value (M.of_value (| Value.Integer 125 |)); + A.to_value (M.of_value (| Value.Integer 127 |)); + A.to_value (M.of_value (| Value.Integer 138 |)); + A.to_value (M.of_value (| Value.Integer 164 |)); + A.to_value (M.of_value (| Value.Integer 170 |)); + A.to_value (M.of_value (| Value.Integer 175 |)); + A.to_value (M.of_value (| Value.Integer 176 |)); + A.to_value (M.of_value (| Value.Integer 192 |)); + A.to_value (M.of_value (| Value.Integer 208 |)); + A.to_value (M.of_value (| Value.Integer 174 |)); + A.to_value (M.of_value (| Value.Integer 175 |)); + A.to_value (M.of_value (| Value.Integer 110 |)); + A.to_value (M.of_value (| Value.Integer 111 |)); + A.to_value (M.of_value (| Value.Integer 190 |)); + A.to_value (M.of_value (| Value.Integer 147 |)) + ] + |) + |) + |) |))). - Definition value_NORMAL0 : Value.t := + Definition value_NORMAL0 : A.t := M.run ltac:(M.monadic (M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 223; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 68; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 172; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 171; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 85; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 87; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 37; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 109; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 106; - Value.Integer Integer.U8 37; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 200; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 176; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 253; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 89; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 106; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 89; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 172; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 77; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 164; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 140; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 151; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 136; - Value.Integer Integer.U8 148; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 190; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 116; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 214; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 255; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 223; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 242; - Value.Integer Integer.U8 157; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 92; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 184; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 203; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 116; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 90; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 89; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 131; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 76; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 138; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 171; - Value.Integer Integer.U8 164; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 161; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 218; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 166; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 245; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 76; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 141; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 190; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 13 - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 223 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 68 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 172 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 171 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 85 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 87 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 37 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 109 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 106 |)); + A.to_value (M.of_value (| Value.Integer 37 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 200 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 176 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 253 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 89 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 106 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 89 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 172 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 77 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 164 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 140 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 151 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 136 |)); + A.to_value (M.of_value (| Value.Integer 148 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 190 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 116 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 214 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 255 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 223 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 242 |)); + A.to_value (M.of_value (| Value.Integer 157 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 92 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 184 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 203 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 116 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 90 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 89 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 131 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 76 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 138 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 171 |)); + A.to_value (M.of_value (| Value.Integer 164 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 161 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 218 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 166 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 245 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 76 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 141 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 190 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 13 |)) + ] + |) + |) + |) |))). - Definition value_NORMAL1 : Value.t := + Definition value_NORMAL1 : A.t := M.run ltac:(M.monadic (M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 94; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 123; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 68; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 170; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 99; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 75; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 82; - Value.Integer Integer.U8 75; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 68; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 117; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 66; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 81; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 139; - Value.Integer Integer.U8 98; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 166; - Value.Integer Integer.U8 94; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 185; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 100; - Value.Integer Integer.U8 83; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 83; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 246; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 131; - Value.Integer Integer.U8 155; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 117; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 196; - Value.Integer Integer.U8 138; - Value.Integer Integer.U8 76; - Value.Integer Integer.U8 99; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 132; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 143; - Value.Integer Integer.U8 170; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 161; - Value.Integer Integer.U8 185; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 92; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 176; - Value.Integer Integer.U8 91; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 75; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 151; - Value.Integer Integer.U8 248; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 132; - Value.Integer Integer.U8 214; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 162; - Value.Integer Integer.U8 231; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 140; - Value.Integer Integer.U8 137; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 107; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 146; - Value.Integer Integer.U8 96; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 116; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 246; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 115; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 112; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 122; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 87; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 135; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 133; - Value.Integer Integer.U8 66; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 132; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 213; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 112; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 208; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 130; - Value.Integer Integer.U8 230; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 247; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 76; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 131; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 68; - Value.Integer Integer.U8 76; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 194; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 85; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 100; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 174; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 154; - Value.Integer Integer.U8 131; - Value.Integer Integer.U8 216; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 119; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 129; - Value.Integer Integer.U8 84; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 203; - Value.Integer Integer.U8 37; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 132; - Value.Integer Integer.U8 6 - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 94 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 123 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 68 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 170 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 99 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 75 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 82 |)); + A.to_value (M.of_value (| Value.Integer 75 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 68 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 117 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 66 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 81 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 139 |)); + A.to_value (M.of_value (| Value.Integer 98 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 166 |)); + A.to_value (M.of_value (| Value.Integer 94 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 185 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 83 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 83 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 246 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 131 |)); + A.to_value (M.of_value (| Value.Integer 155 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 117 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 196 |)); + A.to_value (M.of_value (| Value.Integer 138 |)); + A.to_value (M.of_value (| Value.Integer 76 |)); + A.to_value (M.of_value (| Value.Integer 99 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 132 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 143 |)); + A.to_value (M.of_value (| Value.Integer 170 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 161 |)); + A.to_value (M.of_value (| Value.Integer 185 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 92 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 176 |)); + A.to_value (M.of_value (| Value.Integer 91 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 75 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 151 |)); + A.to_value (M.of_value (| Value.Integer 248 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 132 |)); + A.to_value (M.of_value (| Value.Integer 214 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 162 |)); + A.to_value (M.of_value (| Value.Integer 231 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 140 |)); + A.to_value (M.of_value (| Value.Integer 137 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 107 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 146 |)); + A.to_value (M.of_value (| Value.Integer 96 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 116 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 246 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 115 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 112 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 122 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 87 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 135 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 133 |)); + A.to_value (M.of_value (| Value.Integer 66 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 132 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 213 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 112 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 208 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 130 |)); + A.to_value (M.of_value (| Value.Integer 230 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 247 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 76 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 131 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 68 |)); + A.to_value (M.of_value (| Value.Integer 76 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 194 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 85 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 174 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 154 |)); + A.to_value (M.of_value (| Value.Integer 131 |)); + A.to_value (M.of_value (| Value.Integer 216 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 119 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 129 |)); + A.to_value (M.of_value (| Value.Integer 84 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 203 |)); + A.to_value (M.of_value (| Value.Integer 37 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 132 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |) + |) + |) |))). End printable. End unicode. diff --git a/CoqOfRust/core/unicode/unicode_data.v b/CoqOfRust/core/unicode/unicode_data.v index 117d16a8a..9d11deb0d 100644 --- a/CoqOfRust/core/unicode/unicode_data.v +++ b/CoqOfRust/core/unicode/unicode_data.v @@ -52,7 +52,7 @@ Module unicode. (word & (1 << (needle % 64) as u64)) != 0 } *) - Definition bitset_search (τ : list Ty.t) (α : list Value.t) : M := + Definition bitset_search (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ needle; chunk_idx_map; bitset_chunk_idx; bitset_canonical; bitset_canonicalized ] => ltac:(M.monadic @@ -66,12 +66,18 @@ Module unicode. (M.read (| let bucket_idx := M.alloc (| - M.rust_cast - (BinOp.Panic.div (| M.read (| needle |), Value.Integer Integer.U32 64 |)) + M.rust_cast (| + BinOp.Panic.div (| + Integer.U32, + M.read (| needle |), + M.of_value (| Value.Integer 64 |) + |) + |) |) in let chunk_map_idx := M.alloc (| BinOp.Panic.div (| + Integer.Usize, M.read (| bucket_idx |), M.read (| M.get_constant (| @@ -83,6 +89,7 @@ Module unicode. let chunk_piece := M.alloc (| BinOp.Panic.rem (| + Integer.Usize, M.read (| bucket_idx |), M.read (| M.get_constant (| @@ -94,24 +101,27 @@ Module unicode. let chunk_idx := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| chunk_map_idx |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| chunk_map_idx |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| chunk_idx_map |)) + [ + (* Unsize *) + M.pointer_coercion (| M.read (| chunk_idx_map |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -122,37 +132,40 @@ Module unicode. fun γ => ltac:(M.monadic (M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))) ] |) |) in let idx := M.alloc (| - M.rust_cast - (M.read (| + M.rust_cast (| + M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_array_field (| M.read (| bitset_chunk_idx |), - M.alloc (| M.rust_cast (M.read (| chunk_idx |)) |) + M.alloc (| M.rust_cast (| M.read (| chunk_idx |) |) |) |), chunk_piece |) - |)) + |) + |) |) in let word := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| idx |)) - (M.call_closure (| + BinOp.Pure.lt (| + M.read (| idx |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u64" ], "len", @@ -160,9 +173,10 @@ Module unicode. |), [ (* Unsize *) - M.pointer_coercion (M.read (| bitset_canonical |)) + M.pointer_coercion (| M.read (| bitset_canonical |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -174,6 +188,7 @@ Module unicode. M.read (| bitset_canonicalized |), M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.read (| idx |), M.call_closure (| M.get_associated_function (| @@ -183,7 +198,7 @@ Module unicode. |), [ (* Unsize *) - M.pointer_coercion (M.read (| bitset_canonical |)) + M.pointer_coercion (| M.read (| bitset_canonical |) |) ] |) |) @@ -200,23 +215,25 @@ Module unicode. M.copy (| M.SubPointer.get_array_field (| M.read (| bitset_canonical |), - M.alloc (| M.rust_cast (M.read (| real_idx |)) |) + M.alloc (| M.rust_cast (| M.read (| real_idx |) |) |) |) |) in let should_invert := M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| mapping |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U8 1, - Value.Integer Integer.I32 6 - |))) - (Value.Integer Integer.U8 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| mapping |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 6 |) + |) + |), + M.of_value (| Value.Integer 0 |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -229,41 +246,47 @@ Module unicode. let _ := M.write (| word, - UnOp.Pure.not (M.read (| word |)) + UnOp.Pure.not (| M.read (| word |) |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let quantity := M.alloc (| - BinOp.Pure.bit_and - (M.read (| mapping |)) - (BinOp.Panic.sub (| + BinOp.Pure.bit_and (| + M.read (| mapping |), + BinOp.Panic.sub (| + Integer.U8, BinOp.Panic.shl (| - Value.Integer Integer.U8 1, - Value.Integer Integer.I32 6 + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 6 |) |), - Value.Integer Integer.U8 1 - |)) + M.of_value (| Value.Integer 1 |) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| mapping |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U8 1, - Value.Integer Integer.I32 7 - |))) - (Value.Integer Integer.U8 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| mapping |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 7 |) + |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -276,10 +299,10 @@ Module unicode. β, BinOp.Panic.shr (| M.read (| β |), - M.rust_cast (M.read (| quantity |)) + M.rust_cast (| M.read (| quantity |) |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -293,11 +316,11 @@ Module unicode. |), [ M.read (| word |); - M.rust_cast (M.read (| quantity |)) + M.rust_cast (| M.read (| quantity |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in word)) @@ -307,15 +330,22 @@ Module unicode. |) |) in M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| word |)) - (BinOp.Panic.shl (| - Value.Integer Integer.U64 1, - M.rust_cast - (BinOp.Panic.rem (| M.read (| needle |), Value.Integer Integer.U32 64 |)) - |))) - (Value.Integer Integer.U64 0) + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| word |), + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.rust_cast (| + BinOp.Panic.rem (| + Integer.U32, + M.read (| needle |), + M.of_value (| Value.Integer 64 |) + |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |) |) |))) |))) @@ -327,17 +357,22 @@ Module unicode. short_offset_run_header & ((1 << 21) - 1) } *) - Definition decode_prefix_sum (τ : list Ty.t) (α : list Value.t) : M := + Definition decode_prefix_sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ short_offset_run_header ] => ltac:(M.monadic (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 (| - BinOp.Panic.shl (| Value.Integer Integer.U32 1, Value.Integer Integer.I32 21 |), - Value.Integer Integer.U32 1 - |)))) + BinOp.Pure.bit_and (| + M.read (| short_offset_run_header |), + BinOp.Panic.sub (| + Integer.U32, + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 21 |) + |), + M.of_value (| Value.Integer 1 |) + |) + |))) | _, _ => M.impossible end. @@ -346,16 +381,17 @@ Module unicode. (short_offset_run_header >> 21) as usize } *) - Definition decode_length (τ : list Ty.t) (α : list Value.t) : M := + Definition decode_length (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ 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.rust_cast (| + BinOp.Panic.shr (| M.read (| short_offset_run_header |), - Value.Integer Integer.I32 21 - |)))) + M.of_value (| Value.Integer 21 |) + |) + |))) | _, _ => M.impossible end. @@ -400,7 +436,7 @@ Module unicode. offset_idx % 2 == 1 } *) - Definition skip_search (τ : list Ty.t) (α : list Value.t) : M := + Definition skip_search (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ needle; short_offset_runs; offsets ] => ltac:(M.monadic @@ -424,12 +460,15 @@ Module unicode. ] |), [ - (* Unsize *) M.pointer_coercion (M.read (| short_offset_runs |)); + (* Unsize *) M.pointer_coercion (| M.read (| short_offset_runs |) |); M.alloc (| - BinOp.Panic.shl (| M.read (| needle |), Value.Integer Integer.I32 11 |) + BinOp.Panic.shl (| + M.read (| needle |), + M.of_value (| Value.Integer 11 |) + |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -447,12 +486,13 @@ Module unicode. "shl", [] |), - [ M.read (| header |); Value.Integer Integer.I32 11 ] + [ M.read (| header |); M.of_value (| Value.Integer 11 |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |), @@ -467,7 +507,11 @@ Module unicode. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Panic.add (| M.read (| idx |), Value.Integer Integer.Usize 1 |) + BinOp.Panic.add (| + Integer.Usize, + M.read (| idx |), + M.of_value (| Value.Integer 1 |) + |) |))); fun γ => ltac:(M.monadic @@ -496,7 +540,7 @@ Module unicode. let length := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -509,10 +553,12 @@ Module unicode. [ Ty.path "usize" ] |), [ - (* Unsize *) M.pointer_coercion (M.read (| short_offset_runs |)); + (* Unsize *) + M.pointer_coercion (| M.read (| short_offset_runs |) |); BinOp.Panic.add (| + Integer.Usize, M.read (| last_idx |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) ] |) @@ -526,6 +572,7 @@ Module unicode. let next := M.copy (| γ0_0 |) in M.alloc (| BinOp.Panic.sub (| + Integer.Usize, M.call_closure (| M.get_function (| "core::unicode::unicode_data::decode_length", [] |), [ M.read (| M.read (| next |) |) ] @@ -537,13 +584,14 @@ Module unicode. ltac:(M.monadic (M.alloc (| BinOp.Panic.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 |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| offsets |) |) ] |), M.read (| offset_idx |) |) @@ -572,10 +620,10 @@ Module unicode. [ M.call_closure (| M.get_associated_function (| Ty.path "usize", "checked_sub", [] |), - [ M.read (| last_idx |); Value.Integer Integer.Usize 1 ] + [ M.read (| last_idx |); M.of_value (| Value.Integer 1 |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -602,16 +650,19 @@ Module unicode. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - Value.Integer Integer.U32 0 + M.of_value (| Value.Integer 0 |) ] |) |) in let total := - M.alloc (| BinOp.Panic.sub (| M.read (| needle |), M.read (| prev |) |) |) in - let prefix_sum := M.alloc (| Value.Integer Integer.U32 0 |) in + M.alloc (| + BinOp.Panic.sub (| Integer.U32, M.read (| needle |), M.read (| prev |) |) + |) in + let prefix_sum := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -625,16 +676,20 @@ Module unicode. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.sub (| - M.read (| length |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.read (| length |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |), @@ -686,22 +741,24 @@ Module unicode. M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), - M.rust_cast (M.read (| offset |)) + M.rust_cast (| M.read (| offset |) |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt - (M.read (| prefix_sum |)) - (M.read (| total |)) + BinOp.Pure.gt (| + M.read (| prefix_sum |), + M.read (| total |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -711,7 +768,9 @@ Module unicode. M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -719,1573 +778,1588 @@ Module unicode. M.write (| β, BinOp.Panic.add (| + Integer.Usize, M.read (| β |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| M.read (| offset_idx |), Value.Integer Integer.Usize 2 |)) - (Value.Integer Integer.Usize 1) + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.Usize, + M.read (| offset_idx |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 1 |) + |) |) |))) | _, _ => M.impossible end. - Definition value_UNICODE_VERSION : Value.t := + Definition value_UNICODE_VERSION : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Tuple - [ Value.Integer Integer.U8 15; Value.Integer Integer.U8 0; Value.Integer Integer.U8 0 - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |))). Module alphabetic. - Definition value_SHORT_OFFSET_RUNS : Value.t := + Definition value_SHORT_OFFSET_RUNS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 706; - Value.Integer Integer.U32 33559113; - Value.Integer Integer.U32 872420973; - Value.Integer Integer.U32 952114966; - Value.Integer Integer.U32 1161831606; - Value.Integer Integer.U32 1310731264; - Value.Integer Integer.U32 1314926597; - Value.Integer Integer.U32 1394619392; - Value.Integer Integer.U32 1444957632; - Value.Integer Integer.U32 1447077005; - Value.Integer Integer.U32 1451271693; - Value.Integer Integer.U32 1459672996; - Value.Integer Integer.U32 1648425216; - Value.Integer Integer.U32 1658911342; - Value.Integer Integer.U32 1661009214; - Value.Integer Integer.U32 1707147904; - Value.Integer Integer.U32 1793132343; - Value.Integer Integer.U32 1887506048; - Value.Integer Integer.U32 2040601600; - Value.Integer Integer.U32 2392923872; - Value.Integer Integer.U32 2481005466; - Value.Integer Integer.U32 2504077200; - Value.Integer Integer.U32 2514564144; - Value.Integer Integer.U32 2520859648; - Value.Integer Integer.U32 2527151687; - Value.Integer Integer.U32 2529257472; - Value.Integer Integer.U32 2531355193; - Value.Integer Integer.U32 2533453376; - Value.Integer Integer.U32 2564917240; - Value.Integer Integer.U32 2596375766; - Value.Integer Integer.U32 2600579056; - Value.Integer Integer.U32 2606870819; - Value.Integer Integer.U32 2621551356; - Value.Integer Integer.U32 2642525184; - Value.Integer Integer.U32 2644628480; - Value.Integer Integer.U32 2665600678; - Value.Integer Integer.U32 2743197440; - Value.Integer Integer.U32 2791432848; - Value.Integer Integer.U32 2841765072; - Value.Integer Integer.U32 2850154464; - Value.Integer Integer.U32 2854350336; - Value.Integer Integer.U32 2887905584; - Value.Integer Integer.U32 3026321408; - Value.Integer Integer.U32 3038947040; - Value.Integer Integer.U32 3041048378; - Value.Integer Integer.U32 3045248674; - Value.Integer Integer.U32 3053644769; - Value.Integer Integer.U32 3057842176; - Value.Integer Integer.U32 3059939870; - Value.Integer Integer.U32 3062038528; - Value.Integer Integer.U32 3064140619; - Value.Integer Integer.U32 3066241968; - Value.Integer Integer.U32 3071550384 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 706 |)); + A.to_value (M.of_value (| Value.Integer 33559113 |)); + A.to_value (M.of_value (| Value.Integer 872420973 |)); + A.to_value (M.of_value (| Value.Integer 952114966 |)); + A.to_value (M.of_value (| Value.Integer 1161831606 |)); + A.to_value (M.of_value (| Value.Integer 1310731264 |)); + A.to_value (M.of_value (| Value.Integer 1314926597 |)); + A.to_value (M.of_value (| Value.Integer 1394619392 |)); + A.to_value (M.of_value (| Value.Integer 1444957632 |)); + A.to_value (M.of_value (| Value.Integer 1447077005 |)); + A.to_value (M.of_value (| Value.Integer 1451271693 |)); + A.to_value (M.of_value (| Value.Integer 1459672996 |)); + A.to_value (M.of_value (| Value.Integer 1648425216 |)); + A.to_value (M.of_value (| Value.Integer 1658911342 |)); + A.to_value (M.of_value (| Value.Integer 1661009214 |)); + A.to_value (M.of_value (| Value.Integer 1707147904 |)); + A.to_value (M.of_value (| Value.Integer 1793132343 |)); + A.to_value (M.of_value (| Value.Integer 1887506048 |)); + A.to_value (M.of_value (| Value.Integer 2040601600 |)); + A.to_value (M.of_value (| Value.Integer 2392923872 |)); + A.to_value (M.of_value (| Value.Integer 2481005466 |)); + A.to_value (M.of_value (| Value.Integer 2504077200 |)); + A.to_value (M.of_value (| Value.Integer 2514564144 |)); + A.to_value (M.of_value (| Value.Integer 2520859648 |)); + A.to_value (M.of_value (| Value.Integer 2527151687 |)); + A.to_value (M.of_value (| Value.Integer 2529257472 |)); + A.to_value (M.of_value (| Value.Integer 2531355193 |)); + A.to_value (M.of_value (| Value.Integer 2533453376 |)); + A.to_value (M.of_value (| Value.Integer 2564917240 |)); + A.to_value (M.of_value (| Value.Integer 2596375766 |)); + A.to_value (M.of_value (| Value.Integer 2600579056 |)); + A.to_value (M.of_value (| Value.Integer 2606870819 |)); + A.to_value (M.of_value (| Value.Integer 2621551356 |)); + A.to_value (M.of_value (| Value.Integer 2642525184 |)); + A.to_value (M.of_value (| Value.Integer 2644628480 |)); + A.to_value (M.of_value (| Value.Integer 2665600678 |)); + A.to_value (M.of_value (| Value.Integer 2743197440 |)); + A.to_value (M.of_value (| Value.Integer 2791432848 |)); + A.to_value (M.of_value (| Value.Integer 2841765072 |)); + A.to_value (M.of_value (| Value.Integer 2850154464 |)); + A.to_value (M.of_value (| Value.Integer 2854350336 |)); + A.to_value (M.of_value (| Value.Integer 2887905584 |)); + A.to_value (M.of_value (| Value.Integer 3026321408 |)); + A.to_value (M.of_value (| Value.Integer 3038947040 |)); + A.to_value (M.of_value (| Value.Integer 3041048378 |)); + A.to_value (M.of_value (| Value.Integer 3045248674 |)); + A.to_value (M.of_value (| Value.Integer 3053644769 |)); + A.to_value (M.of_value (| Value.Integer 3057842176 |)); + A.to_value (M.of_value (| Value.Integer 3059939870 |)); + A.to_value (M.of_value (| Value.Integer 3062038528 |)); + A.to_value (M.of_value (| Value.Integer 3064140619 |)); + A.to_value (M.of_value (| Value.Integer 3066241968 |)); + A.to_value (M.of_value (| Value.Integer 3071550384 |)) + ] + |) |) |))). - Definition value_OFFSETS : Value.t := + Definition value_OFFSETS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 65; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 83; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 139; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 166; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 76; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 37; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 75; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 89; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 192; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 53; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 116; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 229; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 90; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 94; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 113; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 103; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 68; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 123; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 106; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 108; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 116; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 135; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 89; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 123; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 53; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 158; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 65; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 110; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 156; - Value.Integer Integer.U8 66; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 66; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 184; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 185; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 103; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 93; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 37; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 111; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 79; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 111; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 196; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 97; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 79; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 75; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 107; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 85; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 65; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 213; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 112; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 197; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 68; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 222; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 65 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 83 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 139 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 166 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 76 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 37 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 75 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 89 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 192 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 53 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 116 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 229 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 90 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 94 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 113 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 103 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 68 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 123 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 106 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 108 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 116 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 135 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 89 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 123 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 53 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 158 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 65 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 110 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 156 |)); + A.to_value (M.of_value (| Value.Integer 66 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 66 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 184 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 185 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 103 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 93 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 37 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 111 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 79 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 111 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 196 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 97 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 79 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 75 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 107 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 85 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 65 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 213 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 112 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 197 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 68 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 222 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |) |))). @@ -2298,7 +2372,7 @@ Module unicode. ) } *) - Definition lookup (τ : list Ty.t) (α : list Value.t) : M := + Definition lookup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -2306,7 +2380,7 @@ Module unicode. M.call_closure (| M.get_function (| "core::unicode::unicode_data::skip_search", [] |), [ - M.rust_cast (M.read (| c |)); + M.rust_cast (| M.read (| c |) |); M.read (| M.get_constant (| "core::unicode::unicode_data::alphabetic::SHORT_OFFSET_RUNS" |) |); @@ -2318,935 +2392,939 @@ Module unicode. End alphabetic. Module case_ignorable. - Definition value_SHORT_OFFSET_RUNS : Value.t := + Definition value_SHORT_OFFSET_RUNS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 688; - Value.Integer Integer.U32 44045149; - Value.Integer Integer.U32 572528402; - Value.Integer Integer.U32 576724925; - Value.Integer Integer.U32 807414908; - Value.Integer Integer.U32 878718981; - Value.Integer Integer.U32 903913493; - Value.Integer Integer.U32 929080568; - Value.Integer Integer.U32 933275148; - Value.Integer Integer.U32 937491230; - Value.Integer Integer.U32 1138818560; - Value.Integer Integer.U32 1147208189; - Value.Integer Integer.U32 1210124160; - Value.Integer Integer.U32 1222707713; - Value.Integer Integer.U32 1235291428; - Value.Integer Integer.U32 1260457643; - Value.Integer Integer.U32 1264654383; - Value.Integer Integer.U32 1499535675; - Value.Integer Integer.U32 1507925040; - Value.Integer Integer.U32 1566646003; - Value.Integer Integer.U32 1629566000; - Value.Integer Integer.U32 1650551536; - Value.Integer Integer.U32 1658941263; - Value.Integer Integer.U32 1671540720; - Value.Integer Integer.U32 1688321181; - Value.Integer Integer.U32 1700908800; - Value.Integer Integer.U32 1709298023; - Value.Integer Integer.U32 1717688832; - Value.Integer Integer.U32 1738661888; - Value.Integer Integer.U32 1763828398; - Value.Integer Integer.U32 1797383403; - Value.Integer Integer.U32 1805773008; - Value.Integer Integer.U32 1809970171; - Value.Integer Integer.U32 1819148289; - Value.Integer Integer.U32 1824457200 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 688 |)); + A.to_value (M.of_value (| Value.Integer 44045149 |)); + A.to_value (M.of_value (| Value.Integer 572528402 |)); + A.to_value (M.of_value (| Value.Integer 576724925 |)); + A.to_value (M.of_value (| Value.Integer 807414908 |)); + A.to_value (M.of_value (| Value.Integer 878718981 |)); + A.to_value (M.of_value (| Value.Integer 903913493 |)); + A.to_value (M.of_value (| Value.Integer 929080568 |)); + A.to_value (M.of_value (| Value.Integer 933275148 |)); + A.to_value (M.of_value (| Value.Integer 937491230 |)); + A.to_value (M.of_value (| Value.Integer 1138818560 |)); + A.to_value (M.of_value (| Value.Integer 1147208189 |)); + A.to_value (M.of_value (| Value.Integer 1210124160 |)); + A.to_value (M.of_value (| Value.Integer 1222707713 |)); + A.to_value (M.of_value (| Value.Integer 1235291428 |)); + A.to_value (M.of_value (| Value.Integer 1260457643 |)); + A.to_value (M.of_value (| Value.Integer 1264654383 |)); + A.to_value (M.of_value (| Value.Integer 1499535675 |)); + A.to_value (M.of_value (| Value.Integer 1507925040 |)); + A.to_value (M.of_value (| Value.Integer 1566646003 |)); + A.to_value (M.of_value (| Value.Integer 1629566000 |)); + A.to_value (M.of_value (| Value.Integer 1650551536 |)); + A.to_value (M.of_value (| Value.Integer 1658941263 |)); + A.to_value (M.of_value (| Value.Integer 1671540720 |)); + A.to_value (M.of_value (| Value.Integer 1688321181 |)); + A.to_value (M.of_value (| Value.Integer 1700908800 |)); + A.to_value (M.of_value (| Value.Integer 1709298023 |)); + A.to_value (M.of_value (| Value.Integer 1717688832 |)); + A.to_value (M.of_value (| Value.Integer 1738661888 |)); + A.to_value (M.of_value (| Value.Integer 1763828398 |)); + A.to_value (M.of_value (| Value.Integer 1797383403 |)); + A.to_value (M.of_value (| Value.Integer 1805773008 |)); + A.to_value (M.of_value (| Value.Integer 1809970171 |)); + A.to_value (M.of_value (| Value.Integer 1819148289 |)); + A.to_value (M.of_value (| Value.Integer 1824457200 |)) + ] + |) |) |))). - Definition value_OFFSETS : Value.t := + Definition value_OFFSETS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 192; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 251; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 207; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 91; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 90; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 98; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 94; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 65; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 118; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 219; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 82; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 113; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 125; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 96; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 93; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 93; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 98; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 103; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 151; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 66; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 100; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 121; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 147; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 169; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 226; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 149; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 165; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 123; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 157; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 37; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 195; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 84; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 238; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 85; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 106; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 144; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 82; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 122; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 148; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 160; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 109; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 96; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 240; - Value.Integer Integer.U8 0 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 192 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 251 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 207 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 91 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 90 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 98 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 94 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 65 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 118 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 219 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 82 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 113 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 125 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 96 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 93 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 93 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 98 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 103 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 151 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 66 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 121 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 147 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 169 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 226 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 149 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 165 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 123 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 157 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 37 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 195 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 84 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 238 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 85 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 106 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 144 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 82 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 122 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 148 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 160 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 109 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 96 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 240 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |) |))). @@ -3259,7 +3337,7 @@ Module unicode. ) } *) - Definition lookup (τ : list Ty.t) (α : list Value.t) : M := + Definition lookup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -3267,7 +3345,7 @@ Module unicode. M.call_closure (| M.get_function (| "core::unicode::unicode_data::skip_search", [] |), [ - M.rust_cast (M.read (| c |)); + M.rust_cast (| M.read (| c |) |); M.read (| M.get_constant (| "core::unicode::unicode_data::case_ignorable::SHORT_OFFSET_RUNS" @@ -3283,362 +3361,366 @@ Module unicode. End case_ignorable. Module cased. - Definition value_SHORT_OFFSET_RUNS : Value.t := + Definition value_SHORT_OFFSET_RUNS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 4256; - Value.Integer Integer.U32 115348384; - Value.Integer Integer.U32 136322176; - Value.Integer Integer.U32 144711446; - Value.Integer Integer.U32 163587254; - Value.Integer Integer.U32 320875520; - Value.Integer Integer.U32 325101120; - Value.Integer Integer.U32 350268208; - Value.Integer Integer.U32 392231680; - Value.Integer Integer.U32 404815649; - Value.Integer Integer.U32 413205504; - Value.Integer Integer.U32 421595008; - Value.Integer Integer.U32 467733632; - Value.Integer Integer.U32 484513952; - Value.Integer Integer.U32 492924480; - Value.Integer Integer.U32 497144832; - Value.Integer Integer.U32 501339814; - Value.Integer Integer.U32 578936576; - Value.Integer Integer.U32 627171376; - Value.Integer Integer.U32 639756544; - Value.Integer Integer.U32 643952944; - Value.Integer Integer.U32 649261450 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 4256 |)); + A.to_value (M.of_value (| Value.Integer 115348384 |)); + A.to_value (M.of_value (| Value.Integer 136322176 |)); + A.to_value (M.of_value (| Value.Integer 144711446 |)); + A.to_value (M.of_value (| Value.Integer 163587254 |)); + A.to_value (M.of_value (| Value.Integer 320875520 |)); + A.to_value (M.of_value (| Value.Integer 325101120 |)); + A.to_value (M.of_value (| Value.Integer 350268208 |)); + A.to_value (M.of_value (| Value.Integer 392231680 |)); + A.to_value (M.of_value (| Value.Integer 404815649 |)); + A.to_value (M.of_value (| Value.Integer 413205504 |)); + A.to_value (M.of_value (| Value.Integer 421595008 |)); + A.to_value (M.of_value (| Value.Integer 467733632 |)); + A.to_value (M.of_value (| Value.Integer 484513952 |)); + A.to_value (M.of_value (| Value.Integer 492924480 |)); + A.to_value (M.of_value (| Value.Integer 497144832 |)); + A.to_value (M.of_value (| Value.Integer 501339814 |)); + A.to_value (M.of_value (| Value.Integer 578936576 |)); + A.to_value (M.of_value (| Value.Integer 627171376 |)); + A.to_value (M.of_value (| Value.Integer 639756544 |)); + A.to_value (M.of_value (| Value.Integer 643952944 |)); + A.to_value (M.of_value (| Value.Integer 649261450 |)) + ] + |) |) |))). - Definition value_OFFSETS : Value.t := + Definition value_OFFSETS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 65; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 195; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 208; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 96; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 83; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 139; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 166; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 192; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 53; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 116; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 229; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 132; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 96; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 116; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 85; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 65; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 68; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 0 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 65 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 195 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 208 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 96 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 83 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 139 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 166 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 192 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 53 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 116 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 229 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 132 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 96 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 116 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 85 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 65 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 68 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |) |))). @@ -3651,7 +3733,7 @@ Module unicode. ) } *) - Definition lookup (τ : list Ty.t) (α : list Value.t) : M := + Definition lookup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -3659,7 +3741,7 @@ Module unicode. M.call_closure (| M.get_function (| "core::unicode::unicode_data::skip_search", [] |), [ - M.rust_cast (M.read (| c |)); + M.rust_cast (| M.read (| c |) |); M.read (| M.get_constant (| "core::unicode::unicode_data::cased::SHORT_OFFSET_RUNS" |) |); @@ -3671,24 +3753,30 @@ Module unicode. End cased. Module cc. - Definition value_SHORT_OFFSET_RUNS : Value.t := + Definition value_SHORT_OFFSET_RUNS : A.t := M.run ltac:(M.monadic - (M.alloc (| M.alloc (| Value.Array [ Value.Integer Integer.U32 1114272 ] |) |))). + (M.alloc (| + M.alloc (| + M.of_value (| Value.Array [ A.to_value (M.of_value (| Value.Integer 1114272 |)) ] |) + |) + |))). - Definition value_OFFSETS : Value.t := + Definition value_OFFSETS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 0 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |) |))). @@ -3701,7 +3789,7 @@ Module unicode. ) } *) - Definition lookup (τ : list Ty.t) (α : list Value.t) : M := + Definition lookup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -3709,7 +3797,7 @@ Module unicode. M.call_closure (| M.get_function (| "core::unicode::unicode_data::skip_search", [] |), [ - M.rust_cast (M.read (| c |)); + M.rust_cast (| M.read (| c |) |); M.read (| M.get_constant (| "core::unicode::unicode_data::cc::SHORT_OFFSET_RUNS" |) |); @@ -3721,785 +3809,789 @@ Module unicode. End cc. Module grapheme_extend. - Definition value_SHORT_OFFSET_RUNS : Value.t := + Definition value_SHORT_OFFSET_RUNS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 768; - Value.Integer Integer.U32 2098307; - Value.Integer Integer.U32 6292881; - Value.Integer Integer.U32 10490717; - Value.Integer Integer.U32 522196754; - Value.Integer Integer.U32 526393356; - Value.Integer Integer.U32 731917551; - Value.Integer Integer.U32 740306986; - Value.Integer Integer.U32 752920175; - Value.Integer Integer.U32 761309186; - Value.Integer Integer.U32 778107678; - Value.Integer Integer.U32 908131840; - Value.Integer Integer.U32 912326558; - Value.Integer Integer.U32 920715773; - Value.Integer Integer.U32 924912129; - Value.Integer Integer.U32 937495844; - Value.Integer Integer.U32 962662059; - Value.Integer Integer.U32 966858799; - Value.Integer Integer.U32 1214323760; - Value.Integer Integer.U32 1285627635; - Value.Integer Integer.U32 1348547648; - Value.Integer Integer.U32 1369533168; - Value.Integer Integer.U32 1377922895; - Value.Integer Integer.U32 1386331293; - Value.Integer Integer.U32 1398918912; - Value.Integer Integer.U32 1403113829; - Value.Integer Integer.U32 1411504640; - Value.Integer Integer.U32 1440866304; - Value.Integer Integer.U32 1466032814; - Value.Integer Integer.U32 1495393516; - Value.Integer Integer.U32 1503783120; - Value.Integer Integer.U32 1508769824; - Value.Integer Integer.U32 1518273008 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 768 |)); + A.to_value (M.of_value (| Value.Integer 2098307 |)); + A.to_value (M.of_value (| Value.Integer 6292881 |)); + A.to_value (M.of_value (| Value.Integer 10490717 |)); + A.to_value (M.of_value (| Value.Integer 522196754 |)); + A.to_value (M.of_value (| Value.Integer 526393356 |)); + A.to_value (M.of_value (| Value.Integer 731917551 |)); + A.to_value (M.of_value (| Value.Integer 740306986 |)); + A.to_value (M.of_value (| Value.Integer 752920175 |)); + A.to_value (M.of_value (| Value.Integer 761309186 |)); + A.to_value (M.of_value (| Value.Integer 778107678 |)); + A.to_value (M.of_value (| Value.Integer 908131840 |)); + A.to_value (M.of_value (| Value.Integer 912326558 |)); + A.to_value (M.of_value (| Value.Integer 920715773 |)); + A.to_value (M.of_value (| Value.Integer 924912129 |)); + A.to_value (M.of_value (| Value.Integer 937495844 |)); + A.to_value (M.of_value (| Value.Integer 962662059 |)); + A.to_value (M.of_value (| Value.Integer 966858799 |)); + A.to_value (M.of_value (| Value.Integer 1214323760 |)); + A.to_value (M.of_value (| Value.Integer 1285627635 |)); + A.to_value (M.of_value (| Value.Integer 1348547648 |)); + A.to_value (M.of_value (| Value.Integer 1369533168 |)); + A.to_value (M.of_value (| Value.Integer 1377922895 |)); + A.to_value (M.of_value (| Value.Integer 1386331293 |)); + A.to_value (M.of_value (| Value.Integer 1398918912 |)); + A.to_value (M.of_value (| Value.Integer 1403113829 |)); + A.to_value (M.of_value (| Value.Integer 1411504640 |)); + A.to_value (M.of_value (| Value.Integer 1440866304 |)); + A.to_value (M.of_value (| Value.Integer 1466032814 |)); + A.to_value (M.of_value (| Value.Integer 1495393516 |)); + A.to_value (M.of_value (| Value.Integer 1503783120 |)); + A.to_value (M.of_value (| Value.Integer 1508769824 |)); + A.to_value (M.of_value (| Value.Integer 1518273008 |)) + ] + |) |) |))). - Definition value_OFFSETS : Value.t := + Definition value_OFFSETS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 112; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 91; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 81; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 98; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 117; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 118; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 219; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 152; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 198; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 195; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 141; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 96; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 105; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 151; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 238; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 226; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 149; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 165; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 80; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 123; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 95; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 157; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 195; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 81; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 235; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 85; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 106; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 101; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 245; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 144; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 82; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 122; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 81; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 148; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 100; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 160; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 109; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 96; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 240; - Value.Integer Integer.U8 0 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 112 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 91 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 81 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 98 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 117 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 118 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 219 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 152 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 198 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 195 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 141 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 96 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 105 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 151 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 238 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 226 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 149 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 165 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 80 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 123 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 95 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 157 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 195 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 81 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 235 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 85 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 106 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 101 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 245 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 144 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 82 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 122 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 81 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 148 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 100 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 160 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 109 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 96 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 240 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |) |))). @@ -4512,7 +4604,7 @@ Module unicode. ) } *) - Definition lookup (τ : list Ty.t) (α : list Value.t) : M := + Definition lookup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -4520,7 +4612,7 @@ Module unicode. M.call_closure (| M.get_function (| "core::unicode::unicode_data::skip_search", [] |), [ - M.rust_cast (M.read (| c |)); + M.rust_cast (| M.read (| c |) |); M.read (| M.get_constant (| "core::unicode::unicode_data::grapheme_extend::SHORT_OFFSET_RUNS" @@ -4536,626 +4628,841 @@ Module unicode. End grapheme_extend. Module lowercase. - Definition value_BITSET_CHUNKS_MAP : Value.t := + Definition value_BITSET_CHUNKS_MAP : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 7 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 7 |)) + ] + |) |) |))). - Definition value_BITSET_INDEX_CHUNKS : Value.t := + Definition value_BITSET_INDEX_CHUNKS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 65; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 33 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 27 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 69; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 67; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 37 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 68; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 73; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 53; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 31 - ]; - Value.Array - [ - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 66; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ]; - Value.Array - [ - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 75; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 74; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 71; - Value.Integer Integer.U8 72; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 45 - ] - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 65 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 33 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 27 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 67 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 37 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 68 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 73 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 53 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 31 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 66 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 75 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 74 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 71 |)); + A.to_value (M.of_value (| Value.Integer 72 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 45 |)) + ] + |)) + ] + |) |) |))). - Definition value_BITSET_CANONICAL : Value.t := + Definition value_BITSET_CANONICAL : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U64 0; - Value.Integer Integer.U64 18446673704966422527; - Value.Integer Integer.U64 12297829382473033730; - Value.Integer Integer.U64 2251799813685247; - Value.Integer Integer.U64 18446739675663105535; - Value.Integer Integer.U64 9223934986808197120; - Value.Integer Integer.U64 1152921504590069760; - Value.Integer Integer.U64 1152921487426978047; - Value.Integer Integer.U64 18446744073709529733; - Value.Integer Integer.U64 18446744069414584320; - Value.Integer Integer.U64 18446744056529682432; - Value.Integer Integer.U64 18446742974197923840; - Value.Integer Integer.U64 18446739675663106031; - Value.Integer Integer.U64 18446726481523572736; - Value.Integer Integer.U64 18446466996645134335; - Value.Integer Integer.U64 18446462598732858304; - Value.Integer Integer.U64 18446462598732840960; - Value.Integer Integer.U64 18410715274543104000; - Value.Integer Integer.U64 18158513701852807104; - Value.Integer Integer.U64 17870283321406062592; - Value.Integer Integer.U64 17293822586148356092; - Value.Integer Integer.U64 12297829382473045332; - Value.Integer Integer.U64 12297829382473034410; - Value.Integer Integer.U64 6172933889249159850; - Value.Integer Integer.U64 4674456033467236607; - Value.Integer Integer.U64 4611405638684049471; - Value.Integer Integer.U64 4601013484258328575; - Value.Integer Integer.U64 4539628424389459968; - Value.Integer Integer.U64 4362299189061746720; - Value.Integer Integer.U64 3607524039012697088; - Value.Integer Integer.U64 2016486715966881792; - Value.Integer Integer.U64 1814856824841797631; - Value.Integer Integer.U64 575897802350002105; - Value.Integer Integer.U64 530298856167572746; - Value.Integer Integer.U64 297241973452963840; - Value.Integer Integer.U64 144115188074807295; - Value.Integer Integer.U64 71777214282006783; - Value.Integer Integer.U64 61925590106570972; - Value.Integer Integer.U64 2339875276368554; - Value.Integer Integer.U64 36009005809663; - Value.Integer Integer.U64 8660801551359; - Value.Integer Integer.U64 1099509514240; - Value.Integer Integer.U64 133143986179; - Value.Integer Integer.U64 984263338; - Value.Integer Integer.U64 16253055; - Value.Integer Integer.U64 3063; - Value.Integer Integer.U64 10663022717737544362; - Value.Integer Integer.U64 10808545280696953514; - Value.Integer Integer.U64 12261519110656315968; - Value.Integer Integer.U64 12294970652241842346; - Value.Integer Integer.U64 12297829383904690175; - Value.Integer Integer.U64 12298110845996498944; - Value.Integer Integer.U64 15324248332066007893; - Value.Integer Integer.U64 16596095761559859497; - Value.Integer Integer.U64 16987577794709946364 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 18446673704966422527 |)); + A.to_value (M.of_value (| Value.Integer 12297829382473033730 |)); + A.to_value (M.of_value (| Value.Integer 2251799813685247 |)); + A.to_value (M.of_value (| Value.Integer 18446739675663105535 |)); + A.to_value (M.of_value (| Value.Integer 9223934986808197120 |)); + A.to_value (M.of_value (| Value.Integer 1152921504590069760 |)); + A.to_value (M.of_value (| Value.Integer 1152921487426978047 |)); + A.to_value (M.of_value (| Value.Integer 18446744073709529733 |)); + A.to_value (M.of_value (| Value.Integer 18446744069414584320 |)); + A.to_value (M.of_value (| Value.Integer 18446744056529682432 |)); + A.to_value (M.of_value (| Value.Integer 18446742974197923840 |)); + A.to_value (M.of_value (| Value.Integer 18446739675663106031 |)); + A.to_value (M.of_value (| Value.Integer 18446726481523572736 |)); + A.to_value (M.of_value (| Value.Integer 18446466996645134335 |)); + A.to_value (M.of_value (| Value.Integer 18446462598732858304 |)); + A.to_value (M.of_value (| Value.Integer 18446462598732840960 |)); + A.to_value (M.of_value (| Value.Integer 18410715274543104000 |)); + A.to_value (M.of_value (| Value.Integer 18158513701852807104 |)); + A.to_value (M.of_value (| Value.Integer 17870283321406062592 |)); + A.to_value (M.of_value (| Value.Integer 17293822586148356092 |)); + A.to_value (M.of_value (| Value.Integer 12297829382473045332 |)); + A.to_value (M.of_value (| Value.Integer 12297829382473034410 |)); + A.to_value (M.of_value (| Value.Integer 6172933889249159850 |)); + A.to_value (M.of_value (| Value.Integer 4674456033467236607 |)); + A.to_value (M.of_value (| Value.Integer 4611405638684049471 |)); + A.to_value (M.of_value (| Value.Integer 4601013484258328575 |)); + A.to_value (M.of_value (| Value.Integer 4539628424389459968 |)); + A.to_value (M.of_value (| Value.Integer 4362299189061746720 |)); + A.to_value (M.of_value (| Value.Integer 3607524039012697088 |)); + A.to_value (M.of_value (| Value.Integer 2016486715966881792 |)); + A.to_value (M.of_value (| Value.Integer 1814856824841797631 |)); + A.to_value (M.of_value (| Value.Integer 575897802350002105 |)); + A.to_value (M.of_value (| Value.Integer 530298856167572746 |)); + A.to_value (M.of_value (| Value.Integer 297241973452963840 |)); + A.to_value (M.of_value (| Value.Integer 144115188074807295 |)); + A.to_value (M.of_value (| Value.Integer 71777214282006783 |)); + A.to_value (M.of_value (| Value.Integer 61925590106570972 |)); + A.to_value (M.of_value (| Value.Integer 2339875276368554 |)); + A.to_value (M.of_value (| Value.Integer 36009005809663 |)); + A.to_value (M.of_value (| Value.Integer 8660801551359 |)); + A.to_value (M.of_value (| Value.Integer 1099509514240 |)); + A.to_value (M.of_value (| Value.Integer 133143986179 |)); + A.to_value (M.of_value (| Value.Integer 984263338 |)); + A.to_value (M.of_value (| Value.Integer 16253055 |)); + A.to_value (M.of_value (| Value.Integer 3063 |)); + A.to_value (M.of_value (| Value.Integer 10663022717737544362 |)); + A.to_value (M.of_value (| Value.Integer 10808545280696953514 |)); + A.to_value (M.of_value (| Value.Integer 12261519110656315968 |)); + A.to_value (M.of_value (| Value.Integer 12294970652241842346 |)); + A.to_value (M.of_value (| Value.Integer 12297829383904690175 |)); + A.to_value (M.of_value (| Value.Integer 12298110845996498944 |)); + A.to_value (M.of_value (| Value.Integer 15324248332066007893 |)); + A.to_value (M.of_value (| Value.Integer 16596095761559859497 |)); + A.to_value (M.of_value (| Value.Integer 16987577794709946364 |)) + ] + |) |) |))). - Definition value_BITSET_MAPPING : Value.t := + Definition value_BITSET_MAPPING : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 64 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 188 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 183 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 176 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 109 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 124 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 126 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 66 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 70 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 77 ]; - Value.Tuple [ Value.Integer Integer.U8 2; Value.Integer Integer.U8 146 ]; - Value.Tuple [ Value.Integer Integer.U8 2; Value.Integer Integer.U8 144 ]; - Value.Tuple [ Value.Integer Integer.U8 2; Value.Integer Integer.U8 83 ]; - Value.Tuple [ Value.Integer Integer.U8 3; Value.Integer Integer.U8 93 ]; - Value.Tuple [ Value.Integer Integer.U8 3; Value.Integer Integer.U8 147 ]; - Value.Tuple [ Value.Integer Integer.U8 3; Value.Integer Integer.U8 133 ]; - Value.Tuple [ Value.Integer Integer.U8 4; Value.Integer Integer.U8 12 ]; - Value.Tuple [ Value.Integer Integer.U8 4; Value.Integer Integer.U8 6 ]; - Value.Tuple [ Value.Integer Integer.U8 5; Value.Integer Integer.U8 187 ]; - Value.Tuple [ Value.Integer Integer.U8 6; Value.Integer Integer.U8 78 ]; - Value.Tuple [ Value.Integer Integer.U8 7; Value.Integer Integer.U8 132 ] - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 64 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 188 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 183 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 176 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 109 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 124 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 126 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 66 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 70 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 77 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 146 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 144 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 83 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 93 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 147 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 133 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 12 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 187 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 78 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 132 |)) + ] + |)) + ] + |) |) |))). @@ -5170,7 +5477,7 @@ Module unicode. ) } *) - Definition lookup (τ : list Ty.t) (α : list Value.t) : M := + Definition lookup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -5178,7 +5485,7 @@ Module unicode. M.call_closure (| M.get_function (| "core::unicode::unicode_data::bitset_search", [] |), [ - M.rust_cast (M.read (| c |)); + M.rust_cast (| M.read (| c |) |); M.read (| M.get_constant (| "core::unicode::unicode_data::lowercase::BITSET_CHUNKS_MAP" |) |); @@ -5198,339 +5505,343 @@ Module unicode. End lowercase. Module n. - Definition value_SHORT_OFFSET_RUNS : Value.t := + Definition value_SHORT_OFFSET_RUNS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 1632; - Value.Integer Integer.U32 18876774; - Value.Integer Integer.U32 31461440; - Value.Integer Integer.U32 102765417; - Value.Integer Integer.U32 111154926; - Value.Integer Integer.U32 115349830; - Value.Integer Integer.U32 132128880; - Value.Integer Integer.U32 165684320; - Value.Integer Integer.U32 186656630; - Value.Integer Integer.U32 195046653; - Value.Integer Integer.U32 199241735; - Value.Integer Integer.U32 203436434; - Value.Integer Integer.U32 216049184; - Value.Integer Integer.U32 241215536; - Value.Integer Integer.U32 249605104; - Value.Integer Integer.U32 274792208; - Value.Integer Integer.U32 278987015; - Value.Integer Integer.U32 283181793; - Value.Integer Integer.U32 295766104; - Value.Integer Integer.U32 320933114; - Value.Integer Integer.U32 383848032; - Value.Integer Integer.U32 392238160; - Value.Integer Integer.U32 434181712; - Value.Integer Integer.U32 442570976; - Value.Integer Integer.U32 455154768; - Value.Integer Integer.U32 463544144; - Value.Integer Integer.U32 476128256; - Value.Integer Integer.U32 484534880; - Value.Integer Integer.U32 488730240; - Value.Integer Integer.U32 505533120; - Value.Integer Integer.U32 509728718; - Value.Integer Integer.U32 522314048; - Value.Integer Integer.U32 526508784; - Value.Integer Integer.U32 530703600; - Value.Integer Integer.U32 534898887; - Value.Integer Integer.U32 539094129; - Value.Integer Integer.U32 547483904; - Value.Integer Integer.U32 568458224; - Value.Integer Integer.U32 573766650 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1632 |)); + A.to_value (M.of_value (| Value.Integer 18876774 |)); + A.to_value (M.of_value (| Value.Integer 31461440 |)); + A.to_value (M.of_value (| Value.Integer 102765417 |)); + A.to_value (M.of_value (| Value.Integer 111154926 |)); + A.to_value (M.of_value (| Value.Integer 115349830 |)); + A.to_value (M.of_value (| Value.Integer 132128880 |)); + A.to_value (M.of_value (| Value.Integer 165684320 |)); + A.to_value (M.of_value (| Value.Integer 186656630 |)); + A.to_value (M.of_value (| Value.Integer 195046653 |)); + A.to_value (M.of_value (| Value.Integer 199241735 |)); + A.to_value (M.of_value (| Value.Integer 203436434 |)); + A.to_value (M.of_value (| Value.Integer 216049184 |)); + A.to_value (M.of_value (| Value.Integer 241215536 |)); + A.to_value (M.of_value (| Value.Integer 249605104 |)); + A.to_value (M.of_value (| Value.Integer 274792208 |)); + A.to_value (M.of_value (| Value.Integer 278987015 |)); + A.to_value (M.of_value (| Value.Integer 283181793 |)); + A.to_value (M.of_value (| Value.Integer 295766104 |)); + A.to_value (M.of_value (| Value.Integer 320933114 |)); + A.to_value (M.of_value (| Value.Integer 383848032 |)); + A.to_value (M.of_value (| Value.Integer 392238160 |)); + A.to_value (M.of_value (| Value.Integer 434181712 |)); + A.to_value (M.of_value (| Value.Integer 442570976 |)); + A.to_value (M.of_value (| Value.Integer 455154768 |)); + A.to_value (M.of_value (| Value.Integer 463544144 |)); + A.to_value (M.of_value (| Value.Integer 476128256 |)); + A.to_value (M.of_value (| Value.Integer 484534880 |)); + A.to_value (M.of_value (| Value.Integer 488730240 |)); + A.to_value (M.of_value (| Value.Integer 505533120 |)); + A.to_value (M.of_value (| Value.Integer 509728718 |)); + A.to_value (M.of_value (| Value.Integer 522314048 |)); + A.to_value (M.of_value (| Value.Integer 526508784 |)); + A.to_value (M.of_value (| Value.Integer 530703600 |)); + A.to_value (M.of_value (| Value.Integer 534898887 |)); + A.to_value (M.of_value (| Value.Integer 539094129 |)); + A.to_value (M.of_value (| Value.Integer 547483904 |)); + A.to_value (M.of_value (| Value.Integer 568458224 |)); + A.to_value (M.of_value (| Value.Integer 573766650 |)) + ] + |) |) |))). - Definition value_OFFSETS : Value.t := + Definition value_OFFSETS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 120; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 134; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 198; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 118; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 108; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 118; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 118; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 110; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 115; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 103; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 104; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 109; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 96; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 118; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 239; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 165; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 182; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 134; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 198; - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 78; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 138; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 188; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 154; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 38; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 198; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 134; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 202; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 75; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 160; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 75; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 104; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 158; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 112; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 134; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 144; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 251; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 118; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 93; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 227; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 70; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 102; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 111; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 86; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 134; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 23; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 108; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 128; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 76; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 0 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 120 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 134 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 198 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 118 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 108 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 118 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 118 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 110 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 115 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 103 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 104 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 109 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 96 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 118 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 239 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 165 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 182 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 134 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 198 |)); + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 78 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 138 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 188 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 154 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 38 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 198 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 134 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 202 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 75 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 160 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 75 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 104 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 158 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 112 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 134 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 144 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 251 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 118 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 93 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 227 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 70 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 102 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 111 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 86 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 134 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 23 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 108 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 128 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 76 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |) |))). @@ -5543,7 +5854,7 @@ Module unicode. ) } *) - Definition lookup (τ : list Ty.t) (α : list Value.t) : M := + Definition lookup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -5551,7 +5862,7 @@ Module unicode. M.call_closure (| M.get_function (| "core::unicode::unicode_data::skip_search", [] |), [ - M.rust_cast (M.read (| c |)); + M.rust_cast (| M.read (| c |) |); M.read (| M.get_constant (| "core::unicode::unicode_data::n::SHORT_OFFSET_RUNS" |) |); @@ -5563,563 +5874,797 @@ Module unicode. End n. Module uppercase. - Definition value_BITSET_CHUNKS_MAP : Value.t := + Definition value_BITSET_CHUNKS_MAP : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 4; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) |))). - Definition value_BITSET_INDEX_CHUNKS : Value.t := + Definition value_BITSET_INDEX_CHUNKS : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 34; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 1 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 5; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 39; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 62; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 42; - Value.Integer Integer.U8 29; - Value.Integer Integer.U8 24; - Value.Integer Integer.U8 23 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 8; - Value.Integer Integer.U8 44; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 36; - Value.Integer Integer.U8 28; - Value.Integer Integer.U8 66; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 54; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 61; - Value.Integer Integer.U8 60; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 20; - Value.Integer Integer.U8 14; - Value.Integer Integer.U8 16; - Value.Integer Integer.U8 4 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 55; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 59; - Value.Integer Integer.U8 45; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 48; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 31; - Value.Integer Integer.U8 35; - Value.Integer Integer.U8 21; - Value.Integer Integer.U8 22; - Value.Integer Integer.U8 15; - Value.Integer Integer.U8 13; - Value.Integer Integer.U8 33; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 11; - Value.Integer Integer.U8 30; - Value.Integer Integer.U8 38 - ]; - Value.Array - [ - Value.Integer Integer.U8 51; - Value.Integer Integer.U8 53; - Value.Integer Integer.U8 26; - Value.Integer Integer.U8 49; - Value.Integer Integer.U8 12; - Value.Integer Integer.U8 7; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 50; - Value.Integer Integer.U8 40; - Value.Integer Integer.U8 52; - Value.Integer Integer.U8 6; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 65; - Value.Integer Integer.U8 64; - Value.Integer Integer.U8 63; - Value.Integer Integer.U8 67 - ]; - Value.Array - [ - Value.Integer Integer.U8 56; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 9; - Value.Integer Integer.U8 46; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 41; - Value.Integer Integer.U8 32; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 19; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 18; - Value.Integer Integer.U8 10; - Value.Integer Integer.U8 47; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ]; - Value.Array - [ - Value.Integer Integer.U8 57; - Value.Integer Integer.U8 37; - Value.Integer Integer.U8 17; - Value.Integer Integer.U8 27; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43; - Value.Integer Integer.U8 43 - ] - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 34 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 62 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 42 |)); + A.to_value (M.of_value (| Value.Integer 29 |)); + A.to_value (M.of_value (| Value.Integer 24 |)); + A.to_value (M.of_value (| Value.Integer 23 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 8 |)); + A.to_value (M.of_value (| Value.Integer 44 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 36 |)); + A.to_value (M.of_value (| Value.Integer 28 |)); + A.to_value (M.of_value (| Value.Integer 66 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 54 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 61 |)); + A.to_value (M.of_value (| Value.Integer 60 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 20 |)); + A.to_value (M.of_value (| Value.Integer 14 |)); + A.to_value (M.of_value (| Value.Integer 16 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 55 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 59 |)); + A.to_value (M.of_value (| Value.Integer 45 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 48 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 31 |)); + A.to_value (M.of_value (| Value.Integer 35 |)); + A.to_value (M.of_value (| Value.Integer 21 |)); + A.to_value (M.of_value (| Value.Integer 22 |)); + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 33 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 11 |)); + A.to_value (M.of_value (| Value.Integer 30 |)); + A.to_value (M.of_value (| Value.Integer 38 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 51 |)); + A.to_value (M.of_value (| Value.Integer 53 |)); + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 49 |)); + A.to_value (M.of_value (| Value.Integer 12 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 50 |)); + A.to_value (M.of_value (| Value.Integer 40 |)); + A.to_value (M.of_value (| Value.Integer 52 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 65 |)); + A.to_value (M.of_value (| Value.Integer 64 |)); + A.to_value (M.of_value (| Value.Integer 63 |)); + A.to_value (M.of_value (| Value.Integer 67 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 56 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 46 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 41 |)); + A.to_value (M.of_value (| Value.Integer 32 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 19 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 18 |)); + A.to_value (M.of_value (| Value.Integer 10 |)); + A.to_value (M.of_value (| Value.Integer 47 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 57 |)); + A.to_value (M.of_value (| Value.Integer 37 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 27 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)); + A.to_value (M.of_value (| Value.Integer 43 |)) + ] + |)) + ] + |) |) |))). - Definition value_BITSET_CANONICAL : Value.t := + Definition value_BITSET_CANONICAL : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U64 576460743713488896; - Value.Integer Integer.U64 18014398509481983; - Value.Integer Integer.U64 6148914691236516865; - Value.Integer Integer.U64 576460735123554305; - Value.Integer Integer.U64 9007199275778805; - Value.Integer Integer.U64 18446744069414584320; - Value.Integer Integer.U64 18446742974197924863; - Value.Integer Integer.U64 18446726481523637343; - Value.Integer Integer.U64 18446466996779287551; - Value.Integer Integer.U64 18446462598732840960; - Value.Integer Integer.U64 18446274948748367189; - Value.Integer Integer.U64 9242793810247811072; - Value.Integer Integer.U64 8863084067199903664; - Value.Integer Integer.U64 7783721355972007253; - Value.Integer Integer.U64 7638198793012598101; - Value.Integer Integer.U64 6184099063146390672; - Value.Integer Integer.U64 6151773421467674709; - Value.Integer Integer.U64 6148914691236517205; - Value.Integer Integer.U64 6148914691236506283; - Value.Integer Integer.U64 6148914689804861440; - Value.Integer Integer.U64 6148633210533183488; - Value.Integer Integer.U64 3122495741643543722; - Value.Integer Integer.U64 1274187559846268630; - Value.Integer Integer.U64 1080897995681042176; - Value.Integer Integer.U64 1080863910568919040; - Value.Integer Integer.U64 288230371856744511; - Value.Integer Integer.U64 17977448100528131; - Value.Integer Integer.U64 1169903278445909; - Value.Integer Integer.U64 281470681743392; - Value.Integer Integer.U64 280378317225728; - Value.Integer Integer.U64 17575006099264; - Value.Integer Integer.U64 2139095039; - Value.Integer Integer.U64 3667967; - Value.Integer Integer.U64 21882; - Value.Integer Integer.U64 8383; - Value.Integer Integer.U64 12273810184460391765; - Value.Integer Integer.U64 13839347594782259332; - Value.Integer Integer.U64 13845730589451223040; - Value.Integer Integer.U64 16613872850358272000; - Value.Integer Integer.U64 16717361816799215616; - Value.Integer Integer.U64 17293822586282573568; - Value.Integer Integer.U64 17870001846429417472; - Value.Integer Integer.U64 18374966856193736448 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 576460743713488896 |)); + A.to_value (M.of_value (| Value.Integer 18014398509481983 |)); + A.to_value (M.of_value (| Value.Integer 6148914691236516865 |)); + A.to_value (M.of_value (| Value.Integer 576460735123554305 |)); + A.to_value (M.of_value (| Value.Integer 9007199275778805 |)); + A.to_value (M.of_value (| Value.Integer 18446744069414584320 |)); + A.to_value (M.of_value (| Value.Integer 18446742974197924863 |)); + A.to_value (M.of_value (| Value.Integer 18446726481523637343 |)); + A.to_value (M.of_value (| Value.Integer 18446466996779287551 |)); + A.to_value (M.of_value (| Value.Integer 18446462598732840960 |)); + A.to_value (M.of_value (| Value.Integer 18446274948748367189 |)); + A.to_value (M.of_value (| Value.Integer 9242793810247811072 |)); + A.to_value (M.of_value (| Value.Integer 8863084067199903664 |)); + A.to_value (M.of_value (| Value.Integer 7783721355972007253 |)); + A.to_value (M.of_value (| Value.Integer 7638198793012598101 |)); + A.to_value (M.of_value (| Value.Integer 6184099063146390672 |)); + A.to_value (M.of_value (| Value.Integer 6151773421467674709 |)); + A.to_value (M.of_value (| Value.Integer 6148914691236517205 |)); + A.to_value (M.of_value (| Value.Integer 6148914691236506283 |)); + A.to_value (M.of_value (| Value.Integer 6148914689804861440 |)); + A.to_value (M.of_value (| Value.Integer 6148633210533183488 |)); + A.to_value (M.of_value (| Value.Integer 3122495741643543722 |)); + A.to_value (M.of_value (| Value.Integer 1274187559846268630 |)); + A.to_value (M.of_value (| Value.Integer 1080897995681042176 |)); + A.to_value (M.of_value (| Value.Integer 1080863910568919040 |)); + A.to_value (M.of_value (| Value.Integer 288230371856744511 |)); + A.to_value (M.of_value (| Value.Integer 17977448100528131 |)); + A.to_value (M.of_value (| Value.Integer 1169903278445909 |)); + A.to_value (M.of_value (| Value.Integer 281470681743392 |)); + A.to_value (M.of_value (| Value.Integer 280378317225728 |)); + A.to_value (M.of_value (| Value.Integer 17575006099264 |)); + A.to_value (M.of_value (| Value.Integer 2139095039 |)); + A.to_value (M.of_value (| Value.Integer 3667967 |)); + A.to_value (M.of_value (| Value.Integer 21882 |)); + A.to_value (M.of_value (| Value.Integer 8383 |)); + A.to_value (M.of_value (| Value.Integer 12273810184460391765 |)); + A.to_value (M.of_value (| Value.Integer 13839347594782259332 |)); + A.to_value (M.of_value (| Value.Integer 13845730589451223040 |)); + A.to_value (M.of_value (| Value.Integer 16613872850358272000 |)); + A.to_value (M.of_value (| Value.Integer 16717361816799215616 |)); + A.to_value (M.of_value (| Value.Integer 17293822586282573568 |)); + A.to_value (M.of_value (| Value.Integer 17870001846429417472 |)); + A.to_value (M.of_value (| Value.Integer 18374966856193736448 |)) + ] + |) |) |))). - Definition value_BITSET_MAPPING : Value.t := + Definition value_BITSET_MAPPING : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 187 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 177 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 171 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 167 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 164 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 32 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 47 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 51 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 121 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 117 ]; - Value.Tuple [ Value.Integer Integer.U8 0; Value.Integer Integer.U8 109 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 150 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 148 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 142 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 134 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 131 ]; - Value.Tuple [ Value.Integer Integer.U8 1; Value.Integer Integer.U8 64 ]; - Value.Tuple [ Value.Integer Integer.U8 2; Value.Integer Integer.U8 164 ]; - Value.Tuple [ Value.Integer Integer.U8 2; Value.Integer Integer.U8 146 ]; - Value.Tuple [ Value.Integer Integer.U8 2; Value.Integer Integer.U8 20 ]; - Value.Tuple [ Value.Integer Integer.U8 3; Value.Integer Integer.U8 146 ]; - Value.Tuple [ Value.Integer Integer.U8 3; Value.Integer Integer.U8 140 ]; - Value.Tuple [ Value.Integer Integer.U8 3; Value.Integer Integer.U8 134 ]; - Value.Tuple [ Value.Integer Integer.U8 4; Value.Integer Integer.U8 178 ]; - Value.Tuple [ Value.Integer Integer.U8 4; Value.Integer Integer.U8 171 ] - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 187 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 177 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 171 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 167 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 164 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 32 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 47 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 51 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 121 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 117 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 109 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 150 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 148 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 142 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 134 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 131 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 64 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 164 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 146 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 20 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 146 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 140 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 134 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 178 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 171 |)) + ] + |)) + ] + |) |) |))). @@ -6134,7 +6679,7 @@ Module unicode. ) } *) - Definition lookup (τ : list Ty.t) (α : list Value.t) : M := + Definition lookup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -6142,7 +6687,7 @@ Module unicode. M.call_closure (| M.get_function (| "core::unicode::unicode_data::bitset_search", [] |), [ - M.rust_cast (M.read (| c |)); + M.rust_cast (| M.read (| c |) |); M.read (| M.get_constant (| "core::unicode::unicode_data::uppercase::BITSET_CHUNKS_MAP" |) |); @@ -6162,270 +6707,272 @@ Module unicode. End uppercase. Module white_space. - Definition value_WHITESPACE_MAP : Value.t := + Definition value_WHITESPACE_MAP : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 3; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 2; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 1; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0; - Value.Integer Integer.U8 0 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) |) |))). @@ -6440,7 +6987,7 @@ Module unicode. } } *) - Definition lookup (τ : list Ty.t) (α : list Value.t) : M := + Definition lookup (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -6448,20 +6995,20 @@ Module unicode. M.read (| M.match_operator (| M.alloc (| - BinOp.Panic.shr (| M.rust_cast (M.read (| c |)), Value.Integer Integer.I32 8 |) + BinOp.Panic.shr (| + M.rust_cast (| M.read (| c |) |), + M.of_value (| Value.Integer 8 |) + |) |), [ fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U32 0 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_array_field (| M.read (| M.get_constant (| @@ -6469,38 +7016,36 @@ Module unicode. |) |), M.alloc (| - BinOp.Pure.bit_and - (M.rust_cast (M.read (| c |))) - (Value.Integer Integer.Usize 255) + BinOp.Pure.bit_and (| + M.rust_cast (| M.read (| c |) |), + M.of_value (| Value.Integer 255 |) + |) |) |) - |)) - (Value.Integer Integer.U8 1)) - (Value.Integer Integer.U8 0) + |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 0 |) + |) |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U32 22 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 22 |) in M.alloc (| - BinOp.Pure.eq - (M.rust_cast (M.read (| c |))) - (Value.Integer Integer.U32 5760) + BinOp.Pure.eq (| + M.rust_cast (| M.read (| c |) |), + M.of_value (| Value.Integer 5760 |) + |) |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U32 32 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 32 |) in M.alloc (| - BinOp.Pure.ne - (BinOp.Pure.bit_and - (M.read (| + BinOp.Pure.ne (| + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_array_field (| M.read (| M.get_constant (| @@ -6508,28 +7053,29 @@ Module unicode. |) |), M.alloc (| - BinOp.Pure.bit_and - (M.rust_cast (M.read (| c |))) - (Value.Integer Integer.Usize 255) + BinOp.Pure.bit_and (| + M.rust_cast (| M.read (| c |) |), + M.of_value (| Value.Integer 255 |) + |) |) |) - |)) - (Value.Integer Integer.U8 2)) - (Value.Integer Integer.U8 0) + |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 0 |) + |) |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.U32 48 - |) in + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 48 |) in M.alloc (| - BinOp.Pure.eq - (M.rust_cast (M.read (| c |))) - (Value.Integer Integer.U32 12288) + BinOp.Pure.eq (| + M.rust_cast (| M.read (| c |) |), + M.of_value (| Value.Integer 12288 |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) ] |) |))) @@ -6538,8 +7084,8 @@ Module unicode. End white_space. Module conversions. - Definition value_INDEX_MASK : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 4194304 |))). + Definition value_INDEX_MASK : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4194304 |) |))). (* pub fn to_lower(c: char) -> [char; 3] { @@ -6559,14 +7105,14 @@ Module unicode. } } *) - Definition to_lower (τ : list Ty.t) (α : list Value.t) : M := + Definition to_lower (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic (let c := M.alloc (| c |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6580,20 +7126,24 @@ Module unicode. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Array - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.path "u8", - "to_ascii_lowercase", - [] - |), - [ M.alloc (| M.rust_cast (M.read (| c |)) |) ] - |)); - Value.UnicodeChar 0; - Value.UnicodeChar 0 - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "u8", + "to_ascii_lowercase", + [] + |), + [ M.alloc (| M.rust_cast (| M.read (| c |) |) |) ] + |) + |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -6648,8 +7198,8 @@ Module unicode. |) |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6677,11 +7227,12 @@ Module unicode. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6754,8 +7305,8 @@ Module unicode. |), [ M.read (| u |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6766,20 +7317,34 @@ Module unicode. ltac:(M.monadic (let c := M.copy (| γ |) in - Value.Array - [ - M.read (| c |); - Value.UnicodeChar 0; - Value.UnicodeChar 0 - ])) + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + c + |)); + A.to_value + (M.of_value (| + Value.UnicodeChar + 0 + |)); + A.to_value + (M.of_value (| + Value.UnicodeChar + 0 + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6811,26 +7376,31 @@ Module unicode. |) |) |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| u |)) - (BinOp.Panic.sub (| + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| u |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::unicode::unicode_data::conversions::INDEX_MASK" |) |), - Value.Integer - Integer.U32 - 1 - |))) + M.of_value (| + Value.Integer + 1 + |) + |) + |) + |) ] |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -6838,10 +7408,18 @@ Module unicode. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - Value.Array [ M.read (| c |); Value.UnicodeChar 0; Value.UnicodeChar 0 ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| c |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |) ] |) |))) @@ -6869,14 +7447,14 @@ Module unicode. } } *) - Definition to_upper (τ : list Ty.t) (α : list Value.t) : M := + Definition to_upper (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic (let c := M.alloc (| c |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -6890,20 +7468,24 @@ Module unicode. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.Array - [ - M.rust_cast - (M.call_closure (| - M.get_associated_function (| - Ty.path "u8", - "to_ascii_uppercase", - [] - |), - [ M.alloc (| M.rust_cast (M.read (| c |)) |) ] - |)); - Value.UnicodeChar 0; - Value.UnicodeChar 0 - ] + M.of_value (| + Value.Array + [ + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "u8", + "to_ascii_uppercase", + [] + |), + [ M.alloc (| M.rust_cast (| M.read (| c |) |) |) ] + |) + |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -6958,8 +7540,8 @@ Module unicode. |) |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -6987,11 +7569,12 @@ Module unicode. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7064,8 +7647,8 @@ Module unicode. |), [ M.read (| u |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7076,20 +7659,34 @@ Module unicode. ltac:(M.monadic (let c := M.copy (| γ |) in - Value.Array - [ - M.read (| c |); - Value.UnicodeChar 0; - Value.UnicodeChar 0 - ])) + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + c + |)); + A.to_value + (M.of_value (| + Value.UnicodeChar + 0 + |)); + A.to_value + (M.of_value (| + Value.UnicodeChar + 0 + |)) + ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -7121,26 +7718,31 @@ Module unicode. |) |) |); - M.rust_cast - (BinOp.Pure.bit_and - (M.read (| u |)) - (BinOp.Panic.sub (| + M.rust_cast (| + BinOp.Pure.bit_and (| + M.read (| u |), + BinOp.Panic.sub (| + Integer.U32, M.read (| M.get_constant (| "core::unicode::unicode_data::conversions::INDEX_MASK" |) |), - Value.Integer - Integer.U32 - 1 - |))) + M.of_value (| + Value.Integer + 1 + |) + |) + |) + |) ] |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -7148,10 +7750,18 @@ Module unicode. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - Value.Array [ M.read (| c |); Value.UnicodeChar 0; Value.UnicodeChar 0 ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| c |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |) ] |) |))) @@ -7161,3175 +7771,24250 @@ Module unicode. | _, _ => M.impossible end. - Definition value_LOWERCASE_TABLE : Value.t := - M.run - ltac:(M.monadic - (M.alloc (| - M.alloc (| - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Tuple [ Value.UnicodeChar 192; Value.Integer Integer.U32 224 ]; - Value.Tuple [ Value.UnicodeChar 193; Value.Integer Integer.U32 225 ]; - Value.Tuple [ Value.UnicodeChar 194; Value.Integer Integer.U32 226 ]; - Value.Tuple [ Value.UnicodeChar 195; Value.Integer Integer.U32 227 ]; - Value.Tuple [ Value.UnicodeChar 196; Value.Integer Integer.U32 228 ]; - Value.Tuple [ Value.UnicodeChar 197; Value.Integer Integer.U32 229 ]; - Value.Tuple [ Value.UnicodeChar 198; Value.Integer Integer.U32 230 ]; - Value.Tuple [ Value.UnicodeChar 199; Value.Integer Integer.U32 231 ]; - Value.Tuple [ Value.UnicodeChar 200; Value.Integer Integer.U32 232 ]; - Value.Tuple [ Value.UnicodeChar 201; Value.Integer Integer.U32 233 ]; - Value.Tuple [ Value.UnicodeChar 202; Value.Integer Integer.U32 234 ]; - Value.Tuple [ Value.UnicodeChar 203; Value.Integer Integer.U32 235 ]; - Value.Tuple [ Value.UnicodeChar 204; Value.Integer Integer.U32 236 ]; - Value.Tuple [ Value.UnicodeChar 205; Value.Integer Integer.U32 237 ]; - Value.Tuple [ Value.UnicodeChar 206; Value.Integer Integer.U32 238 ]; - Value.Tuple [ Value.UnicodeChar 207; Value.Integer Integer.U32 239 ]; - Value.Tuple [ Value.UnicodeChar 208; Value.Integer Integer.U32 240 ]; - Value.Tuple [ Value.UnicodeChar 209; Value.Integer Integer.U32 241 ]; - Value.Tuple [ Value.UnicodeChar 210; Value.Integer Integer.U32 242 ]; - Value.Tuple [ Value.UnicodeChar 211; Value.Integer Integer.U32 243 ]; - Value.Tuple [ Value.UnicodeChar 212; Value.Integer Integer.U32 244 ]; - Value.Tuple [ Value.UnicodeChar 213; Value.Integer Integer.U32 245 ]; - Value.Tuple [ Value.UnicodeChar 214; Value.Integer Integer.U32 246 ]; - Value.Tuple [ Value.UnicodeChar 216; Value.Integer Integer.U32 248 ]; - Value.Tuple [ Value.UnicodeChar 217; Value.Integer Integer.U32 249 ]; - Value.Tuple [ Value.UnicodeChar 218; Value.Integer Integer.U32 250 ]; - Value.Tuple [ Value.UnicodeChar 219; Value.Integer Integer.U32 251 ]; - Value.Tuple [ Value.UnicodeChar 220; Value.Integer Integer.U32 252 ]; - Value.Tuple [ Value.UnicodeChar 221; Value.Integer Integer.U32 253 ]; - Value.Tuple [ Value.UnicodeChar 222; Value.Integer Integer.U32 254 ]; - Value.Tuple [ Value.UnicodeChar 256; Value.Integer Integer.U32 257 ]; - Value.Tuple [ Value.UnicodeChar 258; Value.Integer Integer.U32 259 ]; - Value.Tuple [ Value.UnicodeChar 260; Value.Integer Integer.U32 261 ]; - Value.Tuple [ Value.UnicodeChar 262; Value.Integer Integer.U32 263 ]; - Value.Tuple [ Value.UnicodeChar 264; Value.Integer Integer.U32 265 ]; - Value.Tuple [ Value.UnicodeChar 266; Value.Integer Integer.U32 267 ]; - Value.Tuple [ Value.UnicodeChar 268; Value.Integer Integer.U32 269 ]; - Value.Tuple [ Value.UnicodeChar 270; Value.Integer Integer.U32 271 ]; - Value.Tuple [ Value.UnicodeChar 272; Value.Integer Integer.U32 273 ]; - Value.Tuple [ Value.UnicodeChar 274; Value.Integer Integer.U32 275 ]; - Value.Tuple [ Value.UnicodeChar 276; Value.Integer Integer.U32 277 ]; - Value.Tuple [ Value.UnicodeChar 278; Value.Integer Integer.U32 279 ]; - Value.Tuple [ Value.UnicodeChar 280; Value.Integer Integer.U32 281 ]; - Value.Tuple [ Value.UnicodeChar 282; Value.Integer Integer.U32 283 ]; - Value.Tuple [ Value.UnicodeChar 284; Value.Integer Integer.U32 285 ]; - Value.Tuple [ Value.UnicodeChar 286; Value.Integer Integer.U32 287 ]; - Value.Tuple [ Value.UnicodeChar 288; Value.Integer Integer.U32 289 ]; - Value.Tuple [ Value.UnicodeChar 290; Value.Integer Integer.U32 291 ]; - Value.Tuple [ Value.UnicodeChar 292; Value.Integer Integer.U32 293 ]; - Value.Tuple [ Value.UnicodeChar 294; Value.Integer Integer.U32 295 ]; - Value.Tuple [ Value.UnicodeChar 296; Value.Integer Integer.U32 297 ]; - Value.Tuple [ Value.UnicodeChar 298; Value.Integer Integer.U32 299 ]; - Value.Tuple [ Value.UnicodeChar 300; Value.Integer Integer.U32 301 ]; - Value.Tuple [ Value.UnicodeChar 302; Value.Integer Integer.U32 303 ]; - Value.Tuple [ Value.UnicodeChar 304; Value.Integer Integer.U32 4194304 ]; - Value.Tuple [ Value.UnicodeChar 306; Value.Integer Integer.U32 307 ]; - Value.Tuple [ Value.UnicodeChar 308; Value.Integer Integer.U32 309 ]; - Value.Tuple [ Value.UnicodeChar 310; Value.Integer Integer.U32 311 ]; - Value.Tuple [ Value.UnicodeChar 313; Value.Integer Integer.U32 314 ]; - Value.Tuple [ Value.UnicodeChar 315; Value.Integer Integer.U32 316 ]; - Value.Tuple [ Value.UnicodeChar 317; Value.Integer Integer.U32 318 ]; - Value.Tuple [ Value.UnicodeChar 319; Value.Integer Integer.U32 320 ]; - Value.Tuple [ Value.UnicodeChar 321; Value.Integer Integer.U32 322 ]; - Value.Tuple [ Value.UnicodeChar 323; Value.Integer Integer.U32 324 ]; - Value.Tuple [ Value.UnicodeChar 325; Value.Integer Integer.U32 326 ]; - Value.Tuple [ Value.UnicodeChar 327; Value.Integer Integer.U32 328 ]; - Value.Tuple [ Value.UnicodeChar 330; Value.Integer Integer.U32 331 ]; - Value.Tuple [ Value.UnicodeChar 332; Value.Integer Integer.U32 333 ]; - Value.Tuple [ Value.UnicodeChar 334; Value.Integer Integer.U32 335 ]; - Value.Tuple [ Value.UnicodeChar 336; Value.Integer Integer.U32 337 ]; - Value.Tuple [ Value.UnicodeChar 338; Value.Integer Integer.U32 339 ]; - Value.Tuple [ Value.UnicodeChar 340; Value.Integer Integer.U32 341 ]; - Value.Tuple [ Value.UnicodeChar 342; Value.Integer Integer.U32 343 ]; - Value.Tuple [ Value.UnicodeChar 344; Value.Integer Integer.U32 345 ]; - Value.Tuple [ Value.UnicodeChar 346; Value.Integer Integer.U32 347 ]; - Value.Tuple [ Value.UnicodeChar 348; Value.Integer Integer.U32 349 ]; - Value.Tuple [ Value.UnicodeChar 350; Value.Integer Integer.U32 351 ]; - Value.Tuple [ Value.UnicodeChar 352; Value.Integer Integer.U32 353 ]; - Value.Tuple [ Value.UnicodeChar 354; Value.Integer Integer.U32 355 ]; - Value.Tuple [ Value.UnicodeChar 356; Value.Integer Integer.U32 357 ]; - Value.Tuple [ Value.UnicodeChar 358; Value.Integer Integer.U32 359 ]; - Value.Tuple [ Value.UnicodeChar 360; Value.Integer Integer.U32 361 ]; - Value.Tuple [ Value.UnicodeChar 362; Value.Integer Integer.U32 363 ]; - Value.Tuple [ Value.UnicodeChar 364; Value.Integer Integer.U32 365 ]; - Value.Tuple [ Value.UnicodeChar 366; Value.Integer Integer.U32 367 ]; - Value.Tuple [ Value.UnicodeChar 368; Value.Integer Integer.U32 369 ]; - Value.Tuple [ Value.UnicodeChar 370; Value.Integer Integer.U32 371 ]; - Value.Tuple [ Value.UnicodeChar 372; Value.Integer Integer.U32 373 ]; - Value.Tuple [ Value.UnicodeChar 374; Value.Integer Integer.U32 375 ]; - Value.Tuple [ Value.UnicodeChar 376; Value.Integer Integer.U32 255 ]; - Value.Tuple [ Value.UnicodeChar 377; Value.Integer Integer.U32 378 ]; - Value.Tuple [ Value.UnicodeChar 379; Value.Integer Integer.U32 380 ]; - Value.Tuple [ Value.UnicodeChar 381; Value.Integer Integer.U32 382 ]; - Value.Tuple [ Value.UnicodeChar 385; Value.Integer Integer.U32 595 ]; - Value.Tuple [ Value.UnicodeChar 386; Value.Integer Integer.U32 387 ]; - Value.Tuple [ Value.UnicodeChar 388; Value.Integer Integer.U32 389 ]; - Value.Tuple [ Value.UnicodeChar 390; Value.Integer Integer.U32 596 ]; - Value.Tuple [ Value.UnicodeChar 391; Value.Integer Integer.U32 392 ]; - Value.Tuple [ Value.UnicodeChar 393; Value.Integer Integer.U32 598 ]; - Value.Tuple [ Value.UnicodeChar 394; Value.Integer Integer.U32 599 ]; - Value.Tuple [ Value.UnicodeChar 395; Value.Integer Integer.U32 396 ]; - Value.Tuple [ Value.UnicodeChar 398; Value.Integer Integer.U32 477 ]; - Value.Tuple [ Value.UnicodeChar 399; Value.Integer Integer.U32 601 ]; - Value.Tuple [ Value.UnicodeChar 400; Value.Integer Integer.U32 603 ]; - Value.Tuple [ Value.UnicodeChar 401; Value.Integer Integer.U32 402 ]; - Value.Tuple [ Value.UnicodeChar 403; Value.Integer Integer.U32 608 ]; - Value.Tuple [ Value.UnicodeChar 404; Value.Integer Integer.U32 611 ]; - Value.Tuple [ Value.UnicodeChar 406; Value.Integer Integer.U32 617 ]; - Value.Tuple [ Value.UnicodeChar 407; Value.Integer Integer.U32 616 ]; - Value.Tuple [ Value.UnicodeChar 408; Value.Integer Integer.U32 409 ]; - Value.Tuple [ Value.UnicodeChar 412; Value.Integer Integer.U32 623 ]; - Value.Tuple [ Value.UnicodeChar 413; Value.Integer Integer.U32 626 ]; - Value.Tuple [ Value.UnicodeChar 415; Value.Integer Integer.U32 629 ]; - Value.Tuple [ Value.UnicodeChar 416; Value.Integer Integer.U32 417 ]; - Value.Tuple [ Value.UnicodeChar 418; Value.Integer Integer.U32 419 ]; - Value.Tuple [ Value.UnicodeChar 420; Value.Integer Integer.U32 421 ]; - Value.Tuple [ Value.UnicodeChar 422; Value.Integer Integer.U32 640 ]; - Value.Tuple [ Value.UnicodeChar 423; Value.Integer Integer.U32 424 ]; - Value.Tuple [ Value.UnicodeChar 425; Value.Integer Integer.U32 643 ]; - Value.Tuple [ Value.UnicodeChar 428; Value.Integer Integer.U32 429 ]; - Value.Tuple [ Value.UnicodeChar 430; Value.Integer Integer.U32 648 ]; - Value.Tuple [ Value.UnicodeChar 431; Value.Integer Integer.U32 432 ]; - Value.Tuple [ Value.UnicodeChar 433; Value.Integer Integer.U32 650 ]; - Value.Tuple [ Value.UnicodeChar 434; Value.Integer Integer.U32 651 ]; - Value.Tuple [ Value.UnicodeChar 435; Value.Integer Integer.U32 436 ]; - Value.Tuple [ Value.UnicodeChar 437; Value.Integer Integer.U32 438 ]; - Value.Tuple [ Value.UnicodeChar 439; Value.Integer Integer.U32 658 ]; - Value.Tuple [ Value.UnicodeChar 440; Value.Integer Integer.U32 441 ]; - Value.Tuple [ Value.UnicodeChar 444; Value.Integer Integer.U32 445 ]; - Value.Tuple [ Value.UnicodeChar 452; Value.Integer Integer.U32 454 ]; - Value.Tuple [ Value.UnicodeChar 453; Value.Integer Integer.U32 454 ]; - Value.Tuple [ Value.UnicodeChar 455; Value.Integer Integer.U32 457 ]; - Value.Tuple [ Value.UnicodeChar 456; Value.Integer Integer.U32 457 ]; - Value.Tuple [ Value.UnicodeChar 458; Value.Integer Integer.U32 460 ]; - Value.Tuple [ Value.UnicodeChar 459; Value.Integer Integer.U32 460 ]; - Value.Tuple [ Value.UnicodeChar 461; Value.Integer Integer.U32 462 ]; - Value.Tuple [ Value.UnicodeChar 463; Value.Integer Integer.U32 464 ]; - Value.Tuple [ Value.UnicodeChar 465; Value.Integer Integer.U32 466 ]; - Value.Tuple [ Value.UnicodeChar 467; Value.Integer Integer.U32 468 ]; - Value.Tuple [ Value.UnicodeChar 469; Value.Integer Integer.U32 470 ]; - Value.Tuple [ Value.UnicodeChar 471; Value.Integer Integer.U32 472 ]; - Value.Tuple [ Value.UnicodeChar 473; Value.Integer Integer.U32 474 ]; - Value.Tuple [ Value.UnicodeChar 475; Value.Integer Integer.U32 476 ]; - Value.Tuple [ Value.UnicodeChar 478; Value.Integer Integer.U32 479 ]; - Value.Tuple [ Value.UnicodeChar 480; Value.Integer Integer.U32 481 ]; - Value.Tuple [ Value.UnicodeChar 482; Value.Integer Integer.U32 483 ]; - Value.Tuple [ Value.UnicodeChar 484; Value.Integer Integer.U32 485 ]; - Value.Tuple [ Value.UnicodeChar 486; Value.Integer Integer.U32 487 ]; - Value.Tuple [ Value.UnicodeChar 488; Value.Integer Integer.U32 489 ]; - Value.Tuple [ Value.UnicodeChar 490; Value.Integer Integer.U32 491 ]; - Value.Tuple [ Value.UnicodeChar 492; Value.Integer Integer.U32 493 ]; - Value.Tuple [ Value.UnicodeChar 494; Value.Integer Integer.U32 495 ]; - Value.Tuple [ Value.UnicodeChar 497; Value.Integer Integer.U32 499 ]; - Value.Tuple [ Value.UnicodeChar 498; Value.Integer Integer.U32 499 ]; - Value.Tuple [ Value.UnicodeChar 500; Value.Integer Integer.U32 501 ]; - Value.Tuple [ Value.UnicodeChar 502; Value.Integer Integer.U32 405 ]; - Value.Tuple [ Value.UnicodeChar 503; Value.Integer Integer.U32 447 ]; - Value.Tuple [ Value.UnicodeChar 504; Value.Integer Integer.U32 505 ]; - Value.Tuple [ Value.UnicodeChar 506; Value.Integer Integer.U32 507 ]; - Value.Tuple [ Value.UnicodeChar 508; Value.Integer Integer.U32 509 ]; - Value.Tuple [ Value.UnicodeChar 510; Value.Integer Integer.U32 511 ]; - Value.Tuple [ Value.UnicodeChar 512; Value.Integer Integer.U32 513 ]; - Value.Tuple [ Value.UnicodeChar 514; Value.Integer Integer.U32 515 ]; - Value.Tuple [ Value.UnicodeChar 516; Value.Integer Integer.U32 517 ]; - Value.Tuple [ Value.UnicodeChar 518; Value.Integer Integer.U32 519 ]; - Value.Tuple [ Value.UnicodeChar 520; Value.Integer Integer.U32 521 ]; - Value.Tuple [ Value.UnicodeChar 522; Value.Integer Integer.U32 523 ]; - Value.Tuple [ Value.UnicodeChar 524; Value.Integer Integer.U32 525 ]; - Value.Tuple [ Value.UnicodeChar 526; Value.Integer Integer.U32 527 ]; - Value.Tuple [ Value.UnicodeChar 528; Value.Integer Integer.U32 529 ]; - Value.Tuple [ Value.UnicodeChar 530; Value.Integer Integer.U32 531 ]; - Value.Tuple [ Value.UnicodeChar 532; Value.Integer Integer.U32 533 ]; - Value.Tuple [ Value.UnicodeChar 534; Value.Integer Integer.U32 535 ]; - Value.Tuple [ Value.UnicodeChar 536; Value.Integer Integer.U32 537 ]; - Value.Tuple [ Value.UnicodeChar 538; Value.Integer Integer.U32 539 ]; - Value.Tuple [ Value.UnicodeChar 540; Value.Integer Integer.U32 541 ]; - Value.Tuple [ Value.UnicodeChar 542; Value.Integer Integer.U32 543 ]; - Value.Tuple [ Value.UnicodeChar 544; Value.Integer Integer.U32 414 ]; - Value.Tuple [ Value.UnicodeChar 546; Value.Integer Integer.U32 547 ]; - Value.Tuple [ Value.UnicodeChar 548; Value.Integer Integer.U32 549 ]; - Value.Tuple [ Value.UnicodeChar 550; Value.Integer Integer.U32 551 ]; - Value.Tuple [ Value.UnicodeChar 552; Value.Integer Integer.U32 553 ]; - Value.Tuple [ Value.UnicodeChar 554; Value.Integer Integer.U32 555 ]; - Value.Tuple [ Value.UnicodeChar 556; Value.Integer Integer.U32 557 ]; - Value.Tuple [ Value.UnicodeChar 558; Value.Integer Integer.U32 559 ]; - Value.Tuple [ Value.UnicodeChar 560; Value.Integer Integer.U32 561 ]; - Value.Tuple [ Value.UnicodeChar 562; Value.Integer Integer.U32 563 ]; - Value.Tuple [ Value.UnicodeChar 570; Value.Integer Integer.U32 11365 ]; - Value.Tuple [ Value.UnicodeChar 571; Value.Integer Integer.U32 572 ]; - Value.Tuple [ Value.UnicodeChar 573; Value.Integer Integer.U32 410 ]; - Value.Tuple [ Value.UnicodeChar 574; Value.Integer Integer.U32 11366 ]; - Value.Tuple [ Value.UnicodeChar 577; Value.Integer Integer.U32 578 ]; - Value.Tuple [ Value.UnicodeChar 579; Value.Integer Integer.U32 384 ]; - Value.Tuple [ Value.UnicodeChar 580; Value.Integer Integer.U32 649 ]; - Value.Tuple [ Value.UnicodeChar 581; Value.Integer Integer.U32 652 ]; - Value.Tuple [ Value.UnicodeChar 582; Value.Integer Integer.U32 583 ]; - Value.Tuple [ Value.UnicodeChar 584; Value.Integer Integer.U32 585 ]; - Value.Tuple [ Value.UnicodeChar 586; Value.Integer Integer.U32 587 ]; - Value.Tuple [ Value.UnicodeChar 588; Value.Integer Integer.U32 589 ]; - Value.Tuple [ Value.UnicodeChar 590; Value.Integer Integer.U32 591 ]; - Value.Tuple [ Value.UnicodeChar 880; Value.Integer Integer.U32 881 ]; - Value.Tuple [ Value.UnicodeChar 882; Value.Integer Integer.U32 883 ]; - Value.Tuple [ Value.UnicodeChar 886; Value.Integer Integer.U32 887 ]; - Value.Tuple [ Value.UnicodeChar 895; Value.Integer Integer.U32 1011 ]; - Value.Tuple [ Value.UnicodeChar 902; Value.Integer Integer.U32 940 ]; - Value.Tuple [ Value.UnicodeChar 904; Value.Integer Integer.U32 941 ]; - Value.Tuple [ Value.UnicodeChar 905; Value.Integer Integer.U32 942 ]; - Value.Tuple [ Value.UnicodeChar 906; Value.Integer Integer.U32 943 ]; - Value.Tuple [ Value.UnicodeChar 908; Value.Integer Integer.U32 972 ]; - Value.Tuple [ Value.UnicodeChar 910; Value.Integer Integer.U32 973 ]; - Value.Tuple [ Value.UnicodeChar 911; Value.Integer Integer.U32 974 ]; - Value.Tuple [ Value.UnicodeChar 913; Value.Integer Integer.U32 945 ]; - Value.Tuple [ Value.UnicodeChar 914; Value.Integer Integer.U32 946 ]; - Value.Tuple [ Value.UnicodeChar 915; Value.Integer Integer.U32 947 ]; - Value.Tuple [ Value.UnicodeChar 916; Value.Integer Integer.U32 948 ]; - Value.Tuple [ Value.UnicodeChar 917; Value.Integer Integer.U32 949 ]; - Value.Tuple [ Value.UnicodeChar 918; Value.Integer Integer.U32 950 ]; - Value.Tuple [ Value.UnicodeChar 919; Value.Integer Integer.U32 951 ]; - Value.Tuple [ Value.UnicodeChar 920; Value.Integer Integer.U32 952 ]; - Value.Tuple [ Value.UnicodeChar 921; Value.Integer Integer.U32 953 ]; - Value.Tuple [ Value.UnicodeChar 922; Value.Integer Integer.U32 954 ]; - Value.Tuple [ Value.UnicodeChar 923; Value.Integer Integer.U32 955 ]; - Value.Tuple [ Value.UnicodeChar 924; Value.Integer Integer.U32 956 ]; - Value.Tuple [ Value.UnicodeChar 925; Value.Integer Integer.U32 957 ]; - Value.Tuple [ Value.UnicodeChar 926; Value.Integer Integer.U32 958 ]; - Value.Tuple [ Value.UnicodeChar 927; Value.Integer Integer.U32 959 ]; - Value.Tuple [ Value.UnicodeChar 928; Value.Integer Integer.U32 960 ]; - Value.Tuple [ Value.UnicodeChar 929; Value.Integer Integer.U32 961 ]; - Value.Tuple [ Value.UnicodeChar 931; Value.Integer Integer.U32 963 ]; - Value.Tuple [ Value.UnicodeChar 932; Value.Integer Integer.U32 964 ]; - Value.Tuple [ Value.UnicodeChar 933; Value.Integer Integer.U32 965 ]; - Value.Tuple [ Value.UnicodeChar 934; Value.Integer Integer.U32 966 ]; - Value.Tuple [ Value.UnicodeChar 935; Value.Integer Integer.U32 967 ]; - Value.Tuple [ Value.UnicodeChar 936; Value.Integer Integer.U32 968 ]; - Value.Tuple [ Value.UnicodeChar 937; Value.Integer Integer.U32 969 ]; - Value.Tuple [ Value.UnicodeChar 938; Value.Integer Integer.U32 970 ]; - Value.Tuple [ Value.UnicodeChar 939; Value.Integer Integer.U32 971 ]; - Value.Tuple [ Value.UnicodeChar 975; Value.Integer Integer.U32 983 ]; - Value.Tuple [ Value.UnicodeChar 984; Value.Integer Integer.U32 985 ]; - Value.Tuple [ Value.UnicodeChar 986; Value.Integer Integer.U32 987 ]; - Value.Tuple [ Value.UnicodeChar 988; Value.Integer Integer.U32 989 ]; - Value.Tuple [ Value.UnicodeChar 990; Value.Integer Integer.U32 991 ]; - Value.Tuple [ Value.UnicodeChar 992; Value.Integer Integer.U32 993 ]; - Value.Tuple [ Value.UnicodeChar 994; Value.Integer Integer.U32 995 ]; - Value.Tuple [ Value.UnicodeChar 996; Value.Integer Integer.U32 997 ]; - Value.Tuple [ Value.UnicodeChar 998; Value.Integer Integer.U32 999 ]; - Value.Tuple [ Value.UnicodeChar 1000; Value.Integer Integer.U32 1001 ]; - Value.Tuple [ Value.UnicodeChar 1002; Value.Integer Integer.U32 1003 ]; - Value.Tuple [ Value.UnicodeChar 1004; Value.Integer Integer.U32 1005 ]; - Value.Tuple [ Value.UnicodeChar 1006; Value.Integer Integer.U32 1007 ]; - Value.Tuple [ Value.UnicodeChar 1012; Value.Integer Integer.U32 952 ]; - Value.Tuple [ Value.UnicodeChar 1015; Value.Integer Integer.U32 1016 ]; - Value.Tuple [ Value.UnicodeChar 1017; Value.Integer Integer.U32 1010 ]; - Value.Tuple [ Value.UnicodeChar 1018; Value.Integer Integer.U32 1019 ]; - Value.Tuple [ Value.UnicodeChar 1021; Value.Integer Integer.U32 891 ]; - Value.Tuple [ Value.UnicodeChar 1022; Value.Integer Integer.U32 892 ]; - Value.Tuple [ Value.UnicodeChar 1023; Value.Integer Integer.U32 893 ]; - Value.Tuple [ Value.UnicodeChar 1024; Value.Integer Integer.U32 1104 ]; - Value.Tuple [ Value.UnicodeChar 1025; Value.Integer Integer.U32 1105 ]; - Value.Tuple [ Value.UnicodeChar 1026; Value.Integer Integer.U32 1106 ]; - Value.Tuple [ Value.UnicodeChar 1027; Value.Integer Integer.U32 1107 ]; - Value.Tuple [ Value.UnicodeChar 1028; Value.Integer Integer.U32 1108 ]; - Value.Tuple [ Value.UnicodeChar 1029; Value.Integer Integer.U32 1109 ]; - Value.Tuple [ Value.UnicodeChar 1030; Value.Integer Integer.U32 1110 ]; - Value.Tuple [ Value.UnicodeChar 1031; Value.Integer Integer.U32 1111 ]; - Value.Tuple [ Value.UnicodeChar 1032; Value.Integer Integer.U32 1112 ]; - Value.Tuple [ Value.UnicodeChar 1033; Value.Integer Integer.U32 1113 ]; - Value.Tuple [ Value.UnicodeChar 1034; Value.Integer Integer.U32 1114 ]; - Value.Tuple [ Value.UnicodeChar 1035; Value.Integer Integer.U32 1115 ]; - Value.Tuple [ Value.UnicodeChar 1036; Value.Integer Integer.U32 1116 ]; - Value.Tuple [ Value.UnicodeChar 1037; Value.Integer Integer.U32 1117 ]; - Value.Tuple [ Value.UnicodeChar 1038; Value.Integer Integer.U32 1118 ]; - Value.Tuple [ Value.UnicodeChar 1039; Value.Integer Integer.U32 1119 ]; - Value.Tuple [ Value.UnicodeChar 1040; Value.Integer Integer.U32 1072 ]; - Value.Tuple [ Value.UnicodeChar 1041; Value.Integer Integer.U32 1073 ]; - Value.Tuple [ Value.UnicodeChar 1042; Value.Integer Integer.U32 1074 ]; - Value.Tuple [ Value.UnicodeChar 1043; Value.Integer Integer.U32 1075 ]; - Value.Tuple [ Value.UnicodeChar 1044; Value.Integer Integer.U32 1076 ]; - Value.Tuple [ Value.UnicodeChar 1045; Value.Integer Integer.U32 1077 ]; - Value.Tuple [ Value.UnicodeChar 1046; Value.Integer Integer.U32 1078 ]; - Value.Tuple [ Value.UnicodeChar 1047; Value.Integer Integer.U32 1079 ]; - Value.Tuple [ Value.UnicodeChar 1048; Value.Integer Integer.U32 1080 ]; - Value.Tuple [ Value.UnicodeChar 1049; Value.Integer Integer.U32 1081 ]; - Value.Tuple [ Value.UnicodeChar 1050; Value.Integer Integer.U32 1082 ]; - Value.Tuple [ Value.UnicodeChar 1051; Value.Integer Integer.U32 1083 ]; - Value.Tuple [ Value.UnicodeChar 1052; Value.Integer Integer.U32 1084 ]; - Value.Tuple [ Value.UnicodeChar 1053; Value.Integer Integer.U32 1085 ]; - Value.Tuple [ Value.UnicodeChar 1054; Value.Integer Integer.U32 1086 ]; - Value.Tuple [ Value.UnicodeChar 1055; Value.Integer Integer.U32 1087 ]; - Value.Tuple [ Value.UnicodeChar 1056; Value.Integer Integer.U32 1088 ]; - Value.Tuple [ Value.UnicodeChar 1057; Value.Integer Integer.U32 1089 ]; - Value.Tuple [ Value.UnicodeChar 1058; Value.Integer Integer.U32 1090 ]; - Value.Tuple [ Value.UnicodeChar 1059; Value.Integer Integer.U32 1091 ]; - Value.Tuple [ Value.UnicodeChar 1060; Value.Integer Integer.U32 1092 ]; - Value.Tuple [ Value.UnicodeChar 1061; Value.Integer Integer.U32 1093 ]; - Value.Tuple [ Value.UnicodeChar 1062; Value.Integer Integer.U32 1094 ]; - Value.Tuple [ Value.UnicodeChar 1063; Value.Integer Integer.U32 1095 ]; - Value.Tuple [ Value.UnicodeChar 1064; Value.Integer Integer.U32 1096 ]; - Value.Tuple [ Value.UnicodeChar 1065; Value.Integer Integer.U32 1097 ]; - Value.Tuple [ Value.UnicodeChar 1066; Value.Integer Integer.U32 1098 ]; - Value.Tuple [ Value.UnicodeChar 1067; Value.Integer Integer.U32 1099 ]; - Value.Tuple [ Value.UnicodeChar 1068; Value.Integer Integer.U32 1100 ]; - Value.Tuple [ Value.UnicodeChar 1069; Value.Integer Integer.U32 1101 ]; - Value.Tuple [ Value.UnicodeChar 1070; Value.Integer Integer.U32 1102 ]; - Value.Tuple [ Value.UnicodeChar 1071; Value.Integer Integer.U32 1103 ]; - Value.Tuple [ Value.UnicodeChar 1120; Value.Integer Integer.U32 1121 ]; - Value.Tuple [ Value.UnicodeChar 1122; Value.Integer Integer.U32 1123 ]; - Value.Tuple [ Value.UnicodeChar 1124; Value.Integer Integer.U32 1125 ]; - Value.Tuple [ Value.UnicodeChar 1126; Value.Integer Integer.U32 1127 ]; - Value.Tuple [ Value.UnicodeChar 1128; Value.Integer Integer.U32 1129 ]; - Value.Tuple [ Value.UnicodeChar 1130; Value.Integer Integer.U32 1131 ]; - Value.Tuple [ Value.UnicodeChar 1132; Value.Integer Integer.U32 1133 ]; - Value.Tuple [ Value.UnicodeChar 1134; Value.Integer Integer.U32 1135 ]; - Value.Tuple [ Value.UnicodeChar 1136; Value.Integer Integer.U32 1137 ]; - Value.Tuple [ Value.UnicodeChar 1138; Value.Integer Integer.U32 1139 ]; - Value.Tuple [ Value.UnicodeChar 1140; Value.Integer Integer.U32 1141 ]; - Value.Tuple [ Value.UnicodeChar 1142; Value.Integer Integer.U32 1143 ]; - Value.Tuple [ Value.UnicodeChar 1144; Value.Integer Integer.U32 1145 ]; - Value.Tuple [ Value.UnicodeChar 1146; Value.Integer Integer.U32 1147 ]; - Value.Tuple [ Value.UnicodeChar 1148; Value.Integer Integer.U32 1149 ]; - Value.Tuple [ Value.UnicodeChar 1150; Value.Integer Integer.U32 1151 ]; - Value.Tuple [ Value.UnicodeChar 1152; Value.Integer Integer.U32 1153 ]; - Value.Tuple [ Value.UnicodeChar 1162; Value.Integer Integer.U32 1163 ]; - Value.Tuple [ Value.UnicodeChar 1164; Value.Integer Integer.U32 1165 ]; - Value.Tuple [ Value.UnicodeChar 1166; Value.Integer Integer.U32 1167 ]; - Value.Tuple [ Value.UnicodeChar 1168; Value.Integer Integer.U32 1169 ]; - Value.Tuple [ Value.UnicodeChar 1170; Value.Integer Integer.U32 1171 ]; - Value.Tuple [ Value.UnicodeChar 1172; Value.Integer Integer.U32 1173 ]; - Value.Tuple [ Value.UnicodeChar 1174; Value.Integer Integer.U32 1175 ]; - Value.Tuple [ Value.UnicodeChar 1176; Value.Integer Integer.U32 1177 ]; - Value.Tuple [ Value.UnicodeChar 1178; Value.Integer Integer.U32 1179 ]; - Value.Tuple [ Value.UnicodeChar 1180; Value.Integer Integer.U32 1181 ]; - Value.Tuple [ Value.UnicodeChar 1182; Value.Integer Integer.U32 1183 ]; - Value.Tuple [ Value.UnicodeChar 1184; Value.Integer Integer.U32 1185 ]; - Value.Tuple [ Value.UnicodeChar 1186; Value.Integer Integer.U32 1187 ]; - Value.Tuple [ Value.UnicodeChar 1188; Value.Integer Integer.U32 1189 ]; - Value.Tuple [ Value.UnicodeChar 1190; Value.Integer Integer.U32 1191 ]; - Value.Tuple [ Value.UnicodeChar 1192; Value.Integer Integer.U32 1193 ]; - Value.Tuple [ Value.UnicodeChar 1194; Value.Integer Integer.U32 1195 ]; - Value.Tuple [ Value.UnicodeChar 1196; Value.Integer Integer.U32 1197 ]; - Value.Tuple [ Value.UnicodeChar 1198; Value.Integer Integer.U32 1199 ]; - Value.Tuple [ Value.UnicodeChar 1200; Value.Integer Integer.U32 1201 ]; - Value.Tuple [ Value.UnicodeChar 1202; Value.Integer Integer.U32 1203 ]; - Value.Tuple [ Value.UnicodeChar 1204; Value.Integer Integer.U32 1205 ]; - Value.Tuple [ Value.UnicodeChar 1206; Value.Integer Integer.U32 1207 ]; - Value.Tuple [ Value.UnicodeChar 1208; Value.Integer Integer.U32 1209 ]; - Value.Tuple [ Value.UnicodeChar 1210; Value.Integer Integer.U32 1211 ]; - Value.Tuple [ Value.UnicodeChar 1212; Value.Integer Integer.U32 1213 ]; - Value.Tuple [ Value.UnicodeChar 1214; Value.Integer Integer.U32 1215 ]; - Value.Tuple [ Value.UnicodeChar 1216; Value.Integer Integer.U32 1231 ]; - Value.Tuple [ Value.UnicodeChar 1217; Value.Integer Integer.U32 1218 ]; - Value.Tuple [ Value.UnicodeChar 1219; Value.Integer Integer.U32 1220 ]; - Value.Tuple [ Value.UnicodeChar 1221; Value.Integer Integer.U32 1222 ]; - Value.Tuple [ Value.UnicodeChar 1223; Value.Integer Integer.U32 1224 ]; - Value.Tuple [ Value.UnicodeChar 1225; Value.Integer Integer.U32 1226 ]; - Value.Tuple [ Value.UnicodeChar 1227; Value.Integer Integer.U32 1228 ]; - Value.Tuple [ Value.UnicodeChar 1229; Value.Integer Integer.U32 1230 ]; - Value.Tuple [ Value.UnicodeChar 1232; Value.Integer Integer.U32 1233 ]; - Value.Tuple [ Value.UnicodeChar 1234; Value.Integer Integer.U32 1235 ]; - Value.Tuple [ Value.UnicodeChar 1236; Value.Integer Integer.U32 1237 ]; - Value.Tuple [ Value.UnicodeChar 1238; Value.Integer Integer.U32 1239 ]; - Value.Tuple [ Value.UnicodeChar 1240; Value.Integer Integer.U32 1241 ]; - Value.Tuple [ Value.UnicodeChar 1242; Value.Integer Integer.U32 1243 ]; - Value.Tuple [ Value.UnicodeChar 1244; Value.Integer Integer.U32 1245 ]; - Value.Tuple [ Value.UnicodeChar 1246; Value.Integer Integer.U32 1247 ]; - Value.Tuple [ Value.UnicodeChar 1248; Value.Integer Integer.U32 1249 ]; - Value.Tuple [ Value.UnicodeChar 1250; Value.Integer Integer.U32 1251 ]; - Value.Tuple [ Value.UnicodeChar 1252; Value.Integer Integer.U32 1253 ]; - Value.Tuple [ Value.UnicodeChar 1254; Value.Integer Integer.U32 1255 ]; - Value.Tuple [ Value.UnicodeChar 1256; Value.Integer Integer.U32 1257 ]; - Value.Tuple [ Value.UnicodeChar 1258; Value.Integer Integer.U32 1259 ]; - Value.Tuple [ Value.UnicodeChar 1260; Value.Integer Integer.U32 1261 ]; - Value.Tuple [ Value.UnicodeChar 1262; Value.Integer Integer.U32 1263 ]; - Value.Tuple [ Value.UnicodeChar 1264; Value.Integer Integer.U32 1265 ]; - Value.Tuple [ Value.UnicodeChar 1266; Value.Integer Integer.U32 1267 ]; - Value.Tuple [ Value.UnicodeChar 1268; Value.Integer Integer.U32 1269 ]; - Value.Tuple [ Value.UnicodeChar 1270; Value.Integer Integer.U32 1271 ]; - Value.Tuple [ Value.UnicodeChar 1272; Value.Integer Integer.U32 1273 ]; - Value.Tuple [ Value.UnicodeChar 1274; Value.Integer Integer.U32 1275 ]; - Value.Tuple [ Value.UnicodeChar 1276; Value.Integer Integer.U32 1277 ]; - Value.Tuple [ Value.UnicodeChar 1278; Value.Integer Integer.U32 1279 ]; - Value.Tuple [ Value.UnicodeChar 1280; Value.Integer Integer.U32 1281 ]; - Value.Tuple [ Value.UnicodeChar 1282; Value.Integer Integer.U32 1283 ]; - Value.Tuple [ Value.UnicodeChar 1284; Value.Integer Integer.U32 1285 ]; - Value.Tuple [ Value.UnicodeChar 1286; Value.Integer Integer.U32 1287 ]; - Value.Tuple [ Value.UnicodeChar 1288; Value.Integer Integer.U32 1289 ]; - Value.Tuple [ Value.UnicodeChar 1290; Value.Integer Integer.U32 1291 ]; - Value.Tuple [ Value.UnicodeChar 1292; Value.Integer Integer.U32 1293 ]; - Value.Tuple [ Value.UnicodeChar 1294; Value.Integer Integer.U32 1295 ]; - Value.Tuple [ Value.UnicodeChar 1296; Value.Integer Integer.U32 1297 ]; - Value.Tuple [ Value.UnicodeChar 1298; Value.Integer Integer.U32 1299 ]; - Value.Tuple [ Value.UnicodeChar 1300; Value.Integer Integer.U32 1301 ]; - Value.Tuple [ Value.UnicodeChar 1302; Value.Integer Integer.U32 1303 ]; - Value.Tuple [ Value.UnicodeChar 1304; Value.Integer Integer.U32 1305 ]; - Value.Tuple [ Value.UnicodeChar 1306; Value.Integer Integer.U32 1307 ]; - Value.Tuple [ Value.UnicodeChar 1308; Value.Integer Integer.U32 1309 ]; - Value.Tuple [ Value.UnicodeChar 1310; Value.Integer Integer.U32 1311 ]; - Value.Tuple [ Value.UnicodeChar 1312; Value.Integer Integer.U32 1313 ]; - Value.Tuple [ Value.UnicodeChar 1314; Value.Integer Integer.U32 1315 ]; - Value.Tuple [ Value.UnicodeChar 1316; Value.Integer Integer.U32 1317 ]; - Value.Tuple [ Value.UnicodeChar 1318; Value.Integer Integer.U32 1319 ]; - Value.Tuple [ Value.UnicodeChar 1320; Value.Integer Integer.U32 1321 ]; - Value.Tuple [ Value.UnicodeChar 1322; Value.Integer Integer.U32 1323 ]; - Value.Tuple [ Value.UnicodeChar 1324; Value.Integer Integer.U32 1325 ]; - Value.Tuple [ Value.UnicodeChar 1326; Value.Integer Integer.U32 1327 ]; - Value.Tuple [ Value.UnicodeChar 1329; Value.Integer Integer.U32 1377 ]; - Value.Tuple [ Value.UnicodeChar 1330; Value.Integer Integer.U32 1378 ]; - Value.Tuple [ Value.UnicodeChar 1331; Value.Integer Integer.U32 1379 ]; - Value.Tuple [ Value.UnicodeChar 1332; Value.Integer Integer.U32 1380 ]; - Value.Tuple [ Value.UnicodeChar 1333; Value.Integer Integer.U32 1381 ]; - Value.Tuple [ Value.UnicodeChar 1334; Value.Integer Integer.U32 1382 ]; - Value.Tuple [ Value.UnicodeChar 1335; Value.Integer Integer.U32 1383 ]; - Value.Tuple [ Value.UnicodeChar 1336; Value.Integer Integer.U32 1384 ]; - Value.Tuple [ Value.UnicodeChar 1337; Value.Integer Integer.U32 1385 ]; - Value.Tuple [ Value.UnicodeChar 1338; Value.Integer Integer.U32 1386 ]; - Value.Tuple [ Value.UnicodeChar 1339; Value.Integer Integer.U32 1387 ]; - Value.Tuple [ Value.UnicodeChar 1340; Value.Integer Integer.U32 1388 ]; - Value.Tuple [ Value.UnicodeChar 1341; Value.Integer Integer.U32 1389 ]; - Value.Tuple [ Value.UnicodeChar 1342; Value.Integer Integer.U32 1390 ]; - Value.Tuple [ Value.UnicodeChar 1343; Value.Integer Integer.U32 1391 ]; - Value.Tuple [ Value.UnicodeChar 1344; Value.Integer Integer.U32 1392 ]; - Value.Tuple [ Value.UnicodeChar 1345; Value.Integer Integer.U32 1393 ]; - Value.Tuple [ Value.UnicodeChar 1346; Value.Integer Integer.U32 1394 ]; - Value.Tuple [ Value.UnicodeChar 1347; Value.Integer Integer.U32 1395 ]; - Value.Tuple [ Value.UnicodeChar 1348; Value.Integer Integer.U32 1396 ]; - Value.Tuple [ Value.UnicodeChar 1349; Value.Integer Integer.U32 1397 ]; - Value.Tuple [ Value.UnicodeChar 1350; Value.Integer Integer.U32 1398 ]; - Value.Tuple [ Value.UnicodeChar 1351; Value.Integer Integer.U32 1399 ]; - Value.Tuple [ Value.UnicodeChar 1352; Value.Integer Integer.U32 1400 ]; - Value.Tuple [ Value.UnicodeChar 1353; Value.Integer Integer.U32 1401 ]; - Value.Tuple [ Value.UnicodeChar 1354; Value.Integer Integer.U32 1402 ]; - Value.Tuple [ Value.UnicodeChar 1355; Value.Integer Integer.U32 1403 ]; - Value.Tuple [ Value.UnicodeChar 1356; Value.Integer Integer.U32 1404 ]; - Value.Tuple [ Value.UnicodeChar 1357; Value.Integer Integer.U32 1405 ]; - Value.Tuple [ Value.UnicodeChar 1358; Value.Integer Integer.U32 1406 ]; - Value.Tuple [ Value.UnicodeChar 1359; Value.Integer Integer.U32 1407 ]; - Value.Tuple [ Value.UnicodeChar 1360; Value.Integer Integer.U32 1408 ]; - Value.Tuple [ Value.UnicodeChar 1361; Value.Integer Integer.U32 1409 ]; - Value.Tuple [ Value.UnicodeChar 1362; Value.Integer Integer.U32 1410 ]; - Value.Tuple [ Value.UnicodeChar 1363; Value.Integer Integer.U32 1411 ]; - Value.Tuple [ Value.UnicodeChar 1364; Value.Integer Integer.U32 1412 ]; - Value.Tuple [ Value.UnicodeChar 1365; Value.Integer Integer.U32 1413 ]; - Value.Tuple [ Value.UnicodeChar 1366; Value.Integer Integer.U32 1414 ]; - Value.Tuple [ Value.UnicodeChar 4256; Value.Integer Integer.U32 11520 ]; - Value.Tuple [ Value.UnicodeChar 4257; Value.Integer Integer.U32 11521 ]; - Value.Tuple [ Value.UnicodeChar 4258; Value.Integer Integer.U32 11522 ]; - Value.Tuple [ Value.UnicodeChar 4259; Value.Integer Integer.U32 11523 ]; - Value.Tuple [ Value.UnicodeChar 4260; Value.Integer Integer.U32 11524 ]; - Value.Tuple [ Value.UnicodeChar 4261; Value.Integer Integer.U32 11525 ]; - Value.Tuple [ Value.UnicodeChar 4262; Value.Integer Integer.U32 11526 ]; - Value.Tuple [ Value.UnicodeChar 4263; Value.Integer Integer.U32 11527 ]; - Value.Tuple [ Value.UnicodeChar 4264; Value.Integer Integer.U32 11528 ]; - Value.Tuple [ Value.UnicodeChar 4265; Value.Integer Integer.U32 11529 ]; - Value.Tuple [ Value.UnicodeChar 4266; Value.Integer Integer.U32 11530 ]; - Value.Tuple [ Value.UnicodeChar 4267; Value.Integer Integer.U32 11531 ]; - Value.Tuple [ Value.UnicodeChar 4268; Value.Integer Integer.U32 11532 ]; - Value.Tuple [ Value.UnicodeChar 4269; Value.Integer Integer.U32 11533 ]; - Value.Tuple [ Value.UnicodeChar 4270; Value.Integer Integer.U32 11534 ]; - Value.Tuple [ Value.UnicodeChar 4271; Value.Integer Integer.U32 11535 ]; - Value.Tuple [ Value.UnicodeChar 4272; Value.Integer Integer.U32 11536 ]; - Value.Tuple [ Value.UnicodeChar 4273; Value.Integer Integer.U32 11537 ]; - Value.Tuple [ Value.UnicodeChar 4274; Value.Integer Integer.U32 11538 ]; - Value.Tuple [ Value.UnicodeChar 4275; Value.Integer Integer.U32 11539 ]; - Value.Tuple [ Value.UnicodeChar 4276; Value.Integer Integer.U32 11540 ]; - Value.Tuple [ Value.UnicodeChar 4277; Value.Integer Integer.U32 11541 ]; - Value.Tuple [ Value.UnicodeChar 4278; Value.Integer Integer.U32 11542 ]; - Value.Tuple [ Value.UnicodeChar 4279; Value.Integer Integer.U32 11543 ]; - Value.Tuple [ Value.UnicodeChar 4280; Value.Integer Integer.U32 11544 ]; - Value.Tuple [ Value.UnicodeChar 4281; Value.Integer Integer.U32 11545 ]; - Value.Tuple [ Value.UnicodeChar 4282; Value.Integer Integer.U32 11546 ]; - Value.Tuple [ Value.UnicodeChar 4283; Value.Integer Integer.U32 11547 ]; - Value.Tuple [ Value.UnicodeChar 4284; Value.Integer Integer.U32 11548 ]; - Value.Tuple [ Value.UnicodeChar 4285; Value.Integer Integer.U32 11549 ]; - Value.Tuple [ Value.UnicodeChar 4286; Value.Integer Integer.U32 11550 ]; - Value.Tuple [ Value.UnicodeChar 4287; Value.Integer Integer.U32 11551 ]; - Value.Tuple [ Value.UnicodeChar 4288; Value.Integer Integer.U32 11552 ]; - Value.Tuple [ Value.UnicodeChar 4289; Value.Integer Integer.U32 11553 ]; - Value.Tuple [ Value.UnicodeChar 4290; Value.Integer Integer.U32 11554 ]; - Value.Tuple [ Value.UnicodeChar 4291; Value.Integer Integer.U32 11555 ]; - Value.Tuple [ Value.UnicodeChar 4292; Value.Integer Integer.U32 11556 ]; - Value.Tuple [ Value.UnicodeChar 4293; Value.Integer Integer.U32 11557 ]; - Value.Tuple [ Value.UnicodeChar 4295; Value.Integer Integer.U32 11559 ]; - Value.Tuple [ Value.UnicodeChar 4301; Value.Integer Integer.U32 11565 ]; - Value.Tuple [ Value.UnicodeChar 5024; Value.Integer Integer.U32 43888 ]; - Value.Tuple [ Value.UnicodeChar 5025; Value.Integer Integer.U32 43889 ]; - Value.Tuple [ Value.UnicodeChar 5026; Value.Integer Integer.U32 43890 ]; - Value.Tuple [ Value.UnicodeChar 5027; Value.Integer Integer.U32 43891 ]; - Value.Tuple [ Value.UnicodeChar 5028; Value.Integer Integer.U32 43892 ]; - Value.Tuple [ Value.UnicodeChar 5029; Value.Integer Integer.U32 43893 ]; - Value.Tuple [ Value.UnicodeChar 5030; Value.Integer Integer.U32 43894 ]; - Value.Tuple [ Value.UnicodeChar 5031; Value.Integer Integer.U32 43895 ]; - Value.Tuple [ Value.UnicodeChar 5032; Value.Integer Integer.U32 43896 ]; - Value.Tuple [ Value.UnicodeChar 5033; Value.Integer Integer.U32 43897 ]; - Value.Tuple [ Value.UnicodeChar 5034; Value.Integer Integer.U32 43898 ]; - Value.Tuple [ Value.UnicodeChar 5035; Value.Integer Integer.U32 43899 ]; - Value.Tuple [ Value.UnicodeChar 5036; Value.Integer Integer.U32 43900 ]; - Value.Tuple [ Value.UnicodeChar 5037; Value.Integer Integer.U32 43901 ]; - Value.Tuple [ Value.UnicodeChar 5038; Value.Integer Integer.U32 43902 ]; - Value.Tuple [ Value.UnicodeChar 5039; Value.Integer Integer.U32 43903 ]; - Value.Tuple [ Value.UnicodeChar 5040; Value.Integer Integer.U32 43904 ]; - Value.Tuple [ Value.UnicodeChar 5041; Value.Integer Integer.U32 43905 ]; - Value.Tuple [ Value.UnicodeChar 5042; Value.Integer Integer.U32 43906 ]; - Value.Tuple [ Value.UnicodeChar 5043; Value.Integer Integer.U32 43907 ]; - Value.Tuple [ Value.UnicodeChar 5044; Value.Integer Integer.U32 43908 ]; - Value.Tuple [ Value.UnicodeChar 5045; Value.Integer Integer.U32 43909 ]; - Value.Tuple [ Value.UnicodeChar 5046; Value.Integer Integer.U32 43910 ]; - Value.Tuple [ Value.UnicodeChar 5047; Value.Integer Integer.U32 43911 ]; - Value.Tuple [ Value.UnicodeChar 5048; Value.Integer Integer.U32 43912 ]; - Value.Tuple [ Value.UnicodeChar 5049; Value.Integer Integer.U32 43913 ]; - Value.Tuple [ Value.UnicodeChar 5050; Value.Integer Integer.U32 43914 ]; - Value.Tuple [ Value.UnicodeChar 5051; Value.Integer Integer.U32 43915 ]; - Value.Tuple [ Value.UnicodeChar 5052; Value.Integer Integer.U32 43916 ]; - Value.Tuple [ Value.UnicodeChar 5053; Value.Integer Integer.U32 43917 ]; - Value.Tuple [ Value.UnicodeChar 5054; Value.Integer Integer.U32 43918 ]; - Value.Tuple [ Value.UnicodeChar 5055; Value.Integer Integer.U32 43919 ]; - Value.Tuple [ Value.UnicodeChar 5056; Value.Integer Integer.U32 43920 ]; - Value.Tuple [ Value.UnicodeChar 5057; Value.Integer Integer.U32 43921 ]; - Value.Tuple [ Value.UnicodeChar 5058; Value.Integer Integer.U32 43922 ]; - Value.Tuple [ Value.UnicodeChar 5059; Value.Integer Integer.U32 43923 ]; - Value.Tuple [ Value.UnicodeChar 5060; Value.Integer Integer.U32 43924 ]; - Value.Tuple [ Value.UnicodeChar 5061; Value.Integer Integer.U32 43925 ]; - Value.Tuple [ Value.UnicodeChar 5062; Value.Integer Integer.U32 43926 ]; - Value.Tuple [ Value.UnicodeChar 5063; Value.Integer Integer.U32 43927 ]; - Value.Tuple [ Value.UnicodeChar 5064; Value.Integer Integer.U32 43928 ]; - Value.Tuple [ Value.UnicodeChar 5065; Value.Integer Integer.U32 43929 ]; - Value.Tuple [ Value.UnicodeChar 5066; Value.Integer Integer.U32 43930 ]; - Value.Tuple [ Value.UnicodeChar 5067; Value.Integer Integer.U32 43931 ]; - Value.Tuple [ Value.UnicodeChar 5068; Value.Integer Integer.U32 43932 ]; - Value.Tuple [ Value.UnicodeChar 5069; Value.Integer Integer.U32 43933 ]; - Value.Tuple [ Value.UnicodeChar 5070; Value.Integer Integer.U32 43934 ]; - Value.Tuple [ Value.UnicodeChar 5071; Value.Integer Integer.U32 43935 ]; - Value.Tuple [ Value.UnicodeChar 5072; Value.Integer Integer.U32 43936 ]; - Value.Tuple [ Value.UnicodeChar 5073; Value.Integer Integer.U32 43937 ]; - Value.Tuple [ Value.UnicodeChar 5074; Value.Integer Integer.U32 43938 ]; - Value.Tuple [ Value.UnicodeChar 5075; Value.Integer Integer.U32 43939 ]; - Value.Tuple [ Value.UnicodeChar 5076; Value.Integer Integer.U32 43940 ]; - Value.Tuple [ Value.UnicodeChar 5077; Value.Integer Integer.U32 43941 ]; - Value.Tuple [ Value.UnicodeChar 5078; Value.Integer Integer.U32 43942 ]; - Value.Tuple [ Value.UnicodeChar 5079; Value.Integer Integer.U32 43943 ]; - Value.Tuple [ Value.UnicodeChar 5080; Value.Integer Integer.U32 43944 ]; - Value.Tuple [ Value.UnicodeChar 5081; Value.Integer Integer.U32 43945 ]; - Value.Tuple [ Value.UnicodeChar 5082; Value.Integer Integer.U32 43946 ]; - Value.Tuple [ Value.UnicodeChar 5083; Value.Integer Integer.U32 43947 ]; - Value.Tuple [ Value.UnicodeChar 5084; Value.Integer Integer.U32 43948 ]; - Value.Tuple [ Value.UnicodeChar 5085; Value.Integer Integer.U32 43949 ]; - Value.Tuple [ Value.UnicodeChar 5086; Value.Integer Integer.U32 43950 ]; - Value.Tuple [ Value.UnicodeChar 5087; Value.Integer Integer.U32 43951 ]; - Value.Tuple [ Value.UnicodeChar 5088; Value.Integer Integer.U32 43952 ]; - Value.Tuple [ Value.UnicodeChar 5089; Value.Integer Integer.U32 43953 ]; - Value.Tuple [ Value.UnicodeChar 5090; Value.Integer Integer.U32 43954 ]; - Value.Tuple [ Value.UnicodeChar 5091; Value.Integer Integer.U32 43955 ]; - Value.Tuple [ Value.UnicodeChar 5092; Value.Integer Integer.U32 43956 ]; - Value.Tuple [ Value.UnicodeChar 5093; Value.Integer Integer.U32 43957 ]; - Value.Tuple [ Value.UnicodeChar 5094; Value.Integer Integer.U32 43958 ]; - Value.Tuple [ Value.UnicodeChar 5095; Value.Integer Integer.U32 43959 ]; - Value.Tuple [ Value.UnicodeChar 5096; Value.Integer Integer.U32 43960 ]; - Value.Tuple [ Value.UnicodeChar 5097; Value.Integer Integer.U32 43961 ]; - Value.Tuple [ Value.UnicodeChar 5098; Value.Integer Integer.U32 43962 ]; - Value.Tuple [ Value.UnicodeChar 5099; Value.Integer Integer.U32 43963 ]; - Value.Tuple [ Value.UnicodeChar 5100; Value.Integer Integer.U32 43964 ]; - Value.Tuple [ Value.UnicodeChar 5101; Value.Integer Integer.U32 43965 ]; - Value.Tuple [ Value.UnicodeChar 5102; Value.Integer Integer.U32 43966 ]; - Value.Tuple [ Value.UnicodeChar 5103; Value.Integer Integer.U32 43967 ]; - Value.Tuple [ Value.UnicodeChar 5104; Value.Integer Integer.U32 5112 ]; - Value.Tuple [ Value.UnicodeChar 5105; Value.Integer Integer.U32 5113 ]; - Value.Tuple [ Value.UnicodeChar 5106; Value.Integer Integer.U32 5114 ]; - Value.Tuple [ Value.UnicodeChar 5107; Value.Integer Integer.U32 5115 ]; - Value.Tuple [ Value.UnicodeChar 5108; Value.Integer Integer.U32 5116 ]; - Value.Tuple [ Value.UnicodeChar 5109; Value.Integer Integer.U32 5117 ]; - Value.Tuple [ Value.UnicodeChar 7312; Value.Integer Integer.U32 4304 ]; - Value.Tuple [ Value.UnicodeChar 7313; Value.Integer Integer.U32 4305 ]; - Value.Tuple [ Value.UnicodeChar 7314; Value.Integer Integer.U32 4306 ]; - Value.Tuple [ Value.UnicodeChar 7315; Value.Integer Integer.U32 4307 ]; - Value.Tuple [ Value.UnicodeChar 7316; Value.Integer Integer.U32 4308 ]; - Value.Tuple [ Value.UnicodeChar 7317; Value.Integer Integer.U32 4309 ]; - Value.Tuple [ Value.UnicodeChar 7318; Value.Integer Integer.U32 4310 ]; - Value.Tuple [ Value.UnicodeChar 7319; Value.Integer Integer.U32 4311 ]; - Value.Tuple [ Value.UnicodeChar 7320; Value.Integer Integer.U32 4312 ]; - Value.Tuple [ Value.UnicodeChar 7321; Value.Integer Integer.U32 4313 ]; - Value.Tuple [ Value.UnicodeChar 7322; Value.Integer Integer.U32 4314 ]; - Value.Tuple [ Value.UnicodeChar 7323; Value.Integer Integer.U32 4315 ]; - Value.Tuple [ Value.UnicodeChar 7324; Value.Integer Integer.U32 4316 ]; - Value.Tuple [ Value.UnicodeChar 7325; Value.Integer Integer.U32 4317 ]; - Value.Tuple [ Value.UnicodeChar 7326; Value.Integer Integer.U32 4318 ]; - Value.Tuple [ Value.UnicodeChar 7327; Value.Integer Integer.U32 4319 ]; - Value.Tuple [ Value.UnicodeChar 7328; Value.Integer Integer.U32 4320 ]; - Value.Tuple [ Value.UnicodeChar 7329; Value.Integer Integer.U32 4321 ]; - Value.Tuple [ Value.UnicodeChar 7330; Value.Integer Integer.U32 4322 ]; - Value.Tuple [ Value.UnicodeChar 7331; Value.Integer Integer.U32 4323 ]; - Value.Tuple [ Value.UnicodeChar 7332; Value.Integer Integer.U32 4324 ]; - Value.Tuple [ Value.UnicodeChar 7333; Value.Integer Integer.U32 4325 ]; - Value.Tuple [ Value.UnicodeChar 7334; Value.Integer Integer.U32 4326 ]; - Value.Tuple [ Value.UnicodeChar 7335; Value.Integer Integer.U32 4327 ]; - Value.Tuple [ Value.UnicodeChar 7336; Value.Integer Integer.U32 4328 ]; - Value.Tuple [ Value.UnicodeChar 7337; Value.Integer Integer.U32 4329 ]; - Value.Tuple [ Value.UnicodeChar 7338; Value.Integer Integer.U32 4330 ]; - Value.Tuple [ Value.UnicodeChar 7339; Value.Integer Integer.U32 4331 ]; - Value.Tuple [ Value.UnicodeChar 7340; Value.Integer Integer.U32 4332 ]; - Value.Tuple [ Value.UnicodeChar 7341; Value.Integer Integer.U32 4333 ]; - Value.Tuple [ Value.UnicodeChar 7342; Value.Integer Integer.U32 4334 ]; - Value.Tuple [ Value.UnicodeChar 7343; Value.Integer Integer.U32 4335 ]; - Value.Tuple [ Value.UnicodeChar 7344; Value.Integer Integer.U32 4336 ]; - Value.Tuple [ Value.UnicodeChar 7345; Value.Integer Integer.U32 4337 ]; - Value.Tuple [ Value.UnicodeChar 7346; Value.Integer Integer.U32 4338 ]; - Value.Tuple [ Value.UnicodeChar 7347; Value.Integer Integer.U32 4339 ]; - Value.Tuple [ Value.UnicodeChar 7348; Value.Integer Integer.U32 4340 ]; - Value.Tuple [ Value.UnicodeChar 7349; Value.Integer Integer.U32 4341 ]; - Value.Tuple [ Value.UnicodeChar 7350; Value.Integer Integer.U32 4342 ]; - Value.Tuple [ Value.UnicodeChar 7351; Value.Integer Integer.U32 4343 ]; - Value.Tuple [ Value.UnicodeChar 7352; Value.Integer Integer.U32 4344 ]; - Value.Tuple [ Value.UnicodeChar 7353; Value.Integer Integer.U32 4345 ]; - Value.Tuple [ Value.UnicodeChar 7354; Value.Integer Integer.U32 4346 ]; - Value.Tuple [ Value.UnicodeChar 7357; Value.Integer Integer.U32 4349 ]; - Value.Tuple [ Value.UnicodeChar 7358; Value.Integer Integer.U32 4350 ]; - Value.Tuple [ Value.UnicodeChar 7359; Value.Integer Integer.U32 4351 ]; - Value.Tuple [ Value.UnicodeChar 7680; Value.Integer Integer.U32 7681 ]; - Value.Tuple [ Value.UnicodeChar 7682; Value.Integer Integer.U32 7683 ]; - Value.Tuple [ Value.UnicodeChar 7684; Value.Integer Integer.U32 7685 ]; - Value.Tuple [ Value.UnicodeChar 7686; Value.Integer Integer.U32 7687 ]; - Value.Tuple [ Value.UnicodeChar 7688; Value.Integer Integer.U32 7689 ]; - Value.Tuple [ Value.UnicodeChar 7690; Value.Integer Integer.U32 7691 ]; - Value.Tuple [ Value.UnicodeChar 7692; Value.Integer Integer.U32 7693 ]; - Value.Tuple [ Value.UnicodeChar 7694; Value.Integer Integer.U32 7695 ]; - Value.Tuple [ Value.UnicodeChar 7696; Value.Integer Integer.U32 7697 ]; - Value.Tuple [ Value.UnicodeChar 7698; Value.Integer Integer.U32 7699 ]; - Value.Tuple [ Value.UnicodeChar 7700; Value.Integer Integer.U32 7701 ]; - Value.Tuple [ Value.UnicodeChar 7702; Value.Integer Integer.U32 7703 ]; - Value.Tuple [ Value.UnicodeChar 7704; Value.Integer Integer.U32 7705 ]; - Value.Tuple [ Value.UnicodeChar 7706; Value.Integer Integer.U32 7707 ]; - Value.Tuple [ Value.UnicodeChar 7708; Value.Integer Integer.U32 7709 ]; - Value.Tuple [ Value.UnicodeChar 7710; Value.Integer Integer.U32 7711 ]; - Value.Tuple [ Value.UnicodeChar 7712; Value.Integer Integer.U32 7713 ]; - Value.Tuple [ Value.UnicodeChar 7714; Value.Integer Integer.U32 7715 ]; - Value.Tuple [ Value.UnicodeChar 7716; Value.Integer Integer.U32 7717 ]; - Value.Tuple [ Value.UnicodeChar 7718; Value.Integer Integer.U32 7719 ]; - Value.Tuple [ Value.UnicodeChar 7720; Value.Integer Integer.U32 7721 ]; - Value.Tuple [ Value.UnicodeChar 7722; Value.Integer Integer.U32 7723 ]; - Value.Tuple [ Value.UnicodeChar 7724; Value.Integer Integer.U32 7725 ]; - Value.Tuple [ Value.UnicodeChar 7726; Value.Integer Integer.U32 7727 ]; - Value.Tuple [ Value.UnicodeChar 7728; Value.Integer Integer.U32 7729 ]; - Value.Tuple [ Value.UnicodeChar 7730; Value.Integer Integer.U32 7731 ]; - Value.Tuple [ Value.UnicodeChar 7732; Value.Integer Integer.U32 7733 ]; - Value.Tuple [ Value.UnicodeChar 7734; Value.Integer Integer.U32 7735 ]; - Value.Tuple [ Value.UnicodeChar 7736; Value.Integer Integer.U32 7737 ]; - Value.Tuple [ Value.UnicodeChar 7738; Value.Integer Integer.U32 7739 ]; - Value.Tuple [ Value.UnicodeChar 7740; Value.Integer Integer.U32 7741 ]; - Value.Tuple [ Value.UnicodeChar 7742; Value.Integer Integer.U32 7743 ]; - Value.Tuple [ Value.UnicodeChar 7744; Value.Integer Integer.U32 7745 ]; - Value.Tuple [ Value.UnicodeChar 7746; Value.Integer Integer.U32 7747 ]; - Value.Tuple [ Value.UnicodeChar 7748; Value.Integer Integer.U32 7749 ]; - Value.Tuple [ Value.UnicodeChar 7750; Value.Integer Integer.U32 7751 ]; - Value.Tuple [ Value.UnicodeChar 7752; Value.Integer Integer.U32 7753 ]; - Value.Tuple [ Value.UnicodeChar 7754; Value.Integer Integer.U32 7755 ]; - Value.Tuple [ Value.UnicodeChar 7756; Value.Integer Integer.U32 7757 ]; - Value.Tuple [ Value.UnicodeChar 7758; Value.Integer Integer.U32 7759 ]; - Value.Tuple [ Value.UnicodeChar 7760; Value.Integer Integer.U32 7761 ]; - Value.Tuple [ Value.UnicodeChar 7762; Value.Integer Integer.U32 7763 ]; - Value.Tuple [ Value.UnicodeChar 7764; Value.Integer Integer.U32 7765 ]; - Value.Tuple [ Value.UnicodeChar 7766; Value.Integer Integer.U32 7767 ]; - Value.Tuple [ Value.UnicodeChar 7768; Value.Integer Integer.U32 7769 ]; - Value.Tuple [ Value.UnicodeChar 7770; Value.Integer Integer.U32 7771 ]; - Value.Tuple [ Value.UnicodeChar 7772; Value.Integer Integer.U32 7773 ]; - Value.Tuple [ Value.UnicodeChar 7774; Value.Integer Integer.U32 7775 ]; - Value.Tuple [ Value.UnicodeChar 7776; Value.Integer Integer.U32 7777 ]; - Value.Tuple [ Value.UnicodeChar 7778; Value.Integer Integer.U32 7779 ]; - Value.Tuple [ Value.UnicodeChar 7780; Value.Integer Integer.U32 7781 ]; - Value.Tuple [ Value.UnicodeChar 7782; Value.Integer Integer.U32 7783 ]; - Value.Tuple [ Value.UnicodeChar 7784; Value.Integer Integer.U32 7785 ]; - Value.Tuple [ Value.UnicodeChar 7786; Value.Integer Integer.U32 7787 ]; - Value.Tuple [ Value.UnicodeChar 7788; Value.Integer Integer.U32 7789 ]; - Value.Tuple [ Value.UnicodeChar 7790; Value.Integer Integer.U32 7791 ]; - Value.Tuple [ Value.UnicodeChar 7792; Value.Integer Integer.U32 7793 ]; - Value.Tuple [ Value.UnicodeChar 7794; Value.Integer Integer.U32 7795 ]; - Value.Tuple [ Value.UnicodeChar 7796; Value.Integer Integer.U32 7797 ]; - Value.Tuple [ Value.UnicodeChar 7798; Value.Integer Integer.U32 7799 ]; - Value.Tuple [ Value.UnicodeChar 7800; Value.Integer Integer.U32 7801 ]; - Value.Tuple [ Value.UnicodeChar 7802; Value.Integer Integer.U32 7803 ]; - Value.Tuple [ Value.UnicodeChar 7804; Value.Integer Integer.U32 7805 ]; - Value.Tuple [ Value.UnicodeChar 7806; Value.Integer Integer.U32 7807 ]; - Value.Tuple [ Value.UnicodeChar 7808; Value.Integer Integer.U32 7809 ]; - Value.Tuple [ Value.UnicodeChar 7810; Value.Integer Integer.U32 7811 ]; - Value.Tuple [ Value.UnicodeChar 7812; Value.Integer Integer.U32 7813 ]; - Value.Tuple [ Value.UnicodeChar 7814; Value.Integer Integer.U32 7815 ]; - Value.Tuple [ Value.UnicodeChar 7816; Value.Integer Integer.U32 7817 ]; - Value.Tuple [ Value.UnicodeChar 7818; Value.Integer Integer.U32 7819 ]; - Value.Tuple [ Value.UnicodeChar 7820; Value.Integer Integer.U32 7821 ]; - Value.Tuple [ Value.UnicodeChar 7822; Value.Integer Integer.U32 7823 ]; - Value.Tuple [ Value.UnicodeChar 7824; Value.Integer Integer.U32 7825 ]; - Value.Tuple [ Value.UnicodeChar 7826; Value.Integer Integer.U32 7827 ]; - Value.Tuple [ Value.UnicodeChar 7828; Value.Integer Integer.U32 7829 ]; - Value.Tuple [ Value.UnicodeChar 7838; Value.Integer Integer.U32 223 ]; - Value.Tuple [ Value.UnicodeChar 7840; Value.Integer Integer.U32 7841 ]; - Value.Tuple [ Value.UnicodeChar 7842; Value.Integer Integer.U32 7843 ]; - Value.Tuple [ Value.UnicodeChar 7844; Value.Integer Integer.U32 7845 ]; - Value.Tuple [ Value.UnicodeChar 7846; Value.Integer Integer.U32 7847 ]; - Value.Tuple [ Value.UnicodeChar 7848; Value.Integer Integer.U32 7849 ]; - Value.Tuple [ Value.UnicodeChar 7850; Value.Integer Integer.U32 7851 ]; - Value.Tuple [ Value.UnicodeChar 7852; Value.Integer Integer.U32 7853 ]; - Value.Tuple [ Value.UnicodeChar 7854; Value.Integer Integer.U32 7855 ]; - Value.Tuple [ Value.UnicodeChar 7856; Value.Integer Integer.U32 7857 ]; - Value.Tuple [ Value.UnicodeChar 7858; Value.Integer Integer.U32 7859 ]; - Value.Tuple [ Value.UnicodeChar 7860; Value.Integer Integer.U32 7861 ]; - Value.Tuple [ Value.UnicodeChar 7862; Value.Integer Integer.U32 7863 ]; - Value.Tuple [ Value.UnicodeChar 7864; Value.Integer Integer.U32 7865 ]; - Value.Tuple [ Value.UnicodeChar 7866; Value.Integer Integer.U32 7867 ]; - Value.Tuple [ Value.UnicodeChar 7868; Value.Integer Integer.U32 7869 ]; - Value.Tuple [ Value.UnicodeChar 7870; Value.Integer Integer.U32 7871 ]; - Value.Tuple [ Value.UnicodeChar 7872; Value.Integer Integer.U32 7873 ]; - Value.Tuple [ Value.UnicodeChar 7874; Value.Integer Integer.U32 7875 ]; - Value.Tuple [ Value.UnicodeChar 7876; Value.Integer Integer.U32 7877 ]; - Value.Tuple [ Value.UnicodeChar 7878; Value.Integer Integer.U32 7879 ]; - Value.Tuple [ Value.UnicodeChar 7880; Value.Integer Integer.U32 7881 ]; - Value.Tuple [ Value.UnicodeChar 7882; Value.Integer Integer.U32 7883 ]; - Value.Tuple [ Value.UnicodeChar 7884; Value.Integer Integer.U32 7885 ]; - Value.Tuple [ Value.UnicodeChar 7886; Value.Integer Integer.U32 7887 ]; - Value.Tuple [ Value.UnicodeChar 7888; Value.Integer Integer.U32 7889 ]; - Value.Tuple [ Value.UnicodeChar 7890; Value.Integer Integer.U32 7891 ]; - Value.Tuple [ Value.UnicodeChar 7892; Value.Integer Integer.U32 7893 ]; - Value.Tuple [ Value.UnicodeChar 7894; Value.Integer Integer.U32 7895 ]; - Value.Tuple [ Value.UnicodeChar 7896; Value.Integer Integer.U32 7897 ]; - Value.Tuple [ Value.UnicodeChar 7898; Value.Integer Integer.U32 7899 ]; - Value.Tuple [ Value.UnicodeChar 7900; Value.Integer Integer.U32 7901 ]; - Value.Tuple [ Value.UnicodeChar 7902; Value.Integer Integer.U32 7903 ]; - Value.Tuple [ Value.UnicodeChar 7904; Value.Integer Integer.U32 7905 ]; - Value.Tuple [ Value.UnicodeChar 7906; Value.Integer Integer.U32 7907 ]; - Value.Tuple [ Value.UnicodeChar 7908; Value.Integer Integer.U32 7909 ]; - Value.Tuple [ Value.UnicodeChar 7910; Value.Integer Integer.U32 7911 ]; - Value.Tuple [ Value.UnicodeChar 7912; Value.Integer Integer.U32 7913 ]; - Value.Tuple [ Value.UnicodeChar 7914; Value.Integer Integer.U32 7915 ]; - Value.Tuple [ Value.UnicodeChar 7916; Value.Integer Integer.U32 7917 ]; - Value.Tuple [ Value.UnicodeChar 7918; Value.Integer Integer.U32 7919 ]; - Value.Tuple [ Value.UnicodeChar 7920; Value.Integer Integer.U32 7921 ]; - Value.Tuple [ Value.UnicodeChar 7922; Value.Integer Integer.U32 7923 ]; - Value.Tuple [ Value.UnicodeChar 7924; Value.Integer Integer.U32 7925 ]; - Value.Tuple [ Value.UnicodeChar 7926; Value.Integer Integer.U32 7927 ]; - Value.Tuple [ Value.UnicodeChar 7928; Value.Integer Integer.U32 7929 ]; - Value.Tuple [ Value.UnicodeChar 7930; Value.Integer Integer.U32 7931 ]; - Value.Tuple [ Value.UnicodeChar 7932; Value.Integer Integer.U32 7933 ]; - Value.Tuple [ Value.UnicodeChar 7934; Value.Integer Integer.U32 7935 ]; - Value.Tuple [ Value.UnicodeChar 7944; Value.Integer Integer.U32 7936 ]; - Value.Tuple [ Value.UnicodeChar 7945; Value.Integer Integer.U32 7937 ]; - Value.Tuple [ Value.UnicodeChar 7946; Value.Integer Integer.U32 7938 ]; - Value.Tuple [ Value.UnicodeChar 7947; Value.Integer Integer.U32 7939 ]; - Value.Tuple [ Value.UnicodeChar 7948; Value.Integer Integer.U32 7940 ]; - Value.Tuple [ Value.UnicodeChar 7949; Value.Integer Integer.U32 7941 ]; - Value.Tuple [ Value.UnicodeChar 7950; Value.Integer Integer.U32 7942 ]; - Value.Tuple [ Value.UnicodeChar 7951; Value.Integer Integer.U32 7943 ]; - Value.Tuple [ Value.UnicodeChar 7960; Value.Integer Integer.U32 7952 ]; - Value.Tuple [ Value.UnicodeChar 7961; Value.Integer Integer.U32 7953 ]; - Value.Tuple [ Value.UnicodeChar 7962; Value.Integer Integer.U32 7954 ]; - Value.Tuple [ Value.UnicodeChar 7963; Value.Integer Integer.U32 7955 ]; - Value.Tuple [ Value.UnicodeChar 7964; Value.Integer Integer.U32 7956 ]; - Value.Tuple [ Value.UnicodeChar 7965; Value.Integer Integer.U32 7957 ]; - Value.Tuple [ Value.UnicodeChar 7976; Value.Integer Integer.U32 7968 ]; - Value.Tuple [ Value.UnicodeChar 7977; Value.Integer Integer.U32 7969 ]; - Value.Tuple [ Value.UnicodeChar 7978; Value.Integer Integer.U32 7970 ]; - Value.Tuple [ Value.UnicodeChar 7979; Value.Integer Integer.U32 7971 ]; - Value.Tuple [ Value.UnicodeChar 7980; Value.Integer Integer.U32 7972 ]; - Value.Tuple [ Value.UnicodeChar 7981; Value.Integer Integer.U32 7973 ]; - Value.Tuple [ Value.UnicodeChar 7982; Value.Integer Integer.U32 7974 ]; - Value.Tuple [ Value.UnicodeChar 7983; Value.Integer Integer.U32 7975 ]; - Value.Tuple [ Value.UnicodeChar 7992; Value.Integer Integer.U32 7984 ]; - Value.Tuple [ Value.UnicodeChar 7993; Value.Integer Integer.U32 7985 ]; - Value.Tuple [ Value.UnicodeChar 7994; Value.Integer Integer.U32 7986 ]; - Value.Tuple [ Value.UnicodeChar 7995; Value.Integer Integer.U32 7987 ]; - Value.Tuple [ Value.UnicodeChar 7996; Value.Integer Integer.U32 7988 ]; - Value.Tuple [ Value.UnicodeChar 7997; Value.Integer Integer.U32 7989 ]; - Value.Tuple [ Value.UnicodeChar 7998; Value.Integer Integer.U32 7990 ]; - Value.Tuple [ Value.UnicodeChar 7999; Value.Integer Integer.U32 7991 ]; - Value.Tuple [ Value.UnicodeChar 8008; Value.Integer Integer.U32 8000 ]; - Value.Tuple [ Value.UnicodeChar 8009; Value.Integer Integer.U32 8001 ]; - Value.Tuple [ Value.UnicodeChar 8010; Value.Integer Integer.U32 8002 ]; - Value.Tuple [ Value.UnicodeChar 8011; Value.Integer Integer.U32 8003 ]; - Value.Tuple [ Value.UnicodeChar 8012; Value.Integer Integer.U32 8004 ]; - Value.Tuple [ Value.UnicodeChar 8013; Value.Integer Integer.U32 8005 ]; - Value.Tuple [ Value.UnicodeChar 8025; Value.Integer Integer.U32 8017 ]; - Value.Tuple [ Value.UnicodeChar 8027; Value.Integer Integer.U32 8019 ]; - Value.Tuple [ Value.UnicodeChar 8029; Value.Integer Integer.U32 8021 ]; - Value.Tuple [ Value.UnicodeChar 8031; Value.Integer Integer.U32 8023 ]; - Value.Tuple [ Value.UnicodeChar 8040; Value.Integer Integer.U32 8032 ]; - Value.Tuple [ Value.UnicodeChar 8041; Value.Integer Integer.U32 8033 ]; - Value.Tuple [ Value.UnicodeChar 8042; Value.Integer Integer.U32 8034 ]; - Value.Tuple [ Value.UnicodeChar 8043; Value.Integer Integer.U32 8035 ]; - Value.Tuple [ Value.UnicodeChar 8044; Value.Integer Integer.U32 8036 ]; - Value.Tuple [ Value.UnicodeChar 8045; Value.Integer Integer.U32 8037 ]; - Value.Tuple [ Value.UnicodeChar 8046; Value.Integer Integer.U32 8038 ]; - Value.Tuple [ Value.UnicodeChar 8047; Value.Integer Integer.U32 8039 ]; - Value.Tuple [ Value.UnicodeChar 8072; Value.Integer Integer.U32 8064 ]; - Value.Tuple [ Value.UnicodeChar 8073; Value.Integer Integer.U32 8065 ]; - Value.Tuple [ Value.UnicodeChar 8074; Value.Integer Integer.U32 8066 ]; - Value.Tuple [ Value.UnicodeChar 8075; Value.Integer Integer.U32 8067 ]; - Value.Tuple [ Value.UnicodeChar 8076; Value.Integer Integer.U32 8068 ]; - Value.Tuple [ Value.UnicodeChar 8077; Value.Integer Integer.U32 8069 ]; - Value.Tuple [ Value.UnicodeChar 8078; Value.Integer Integer.U32 8070 ]; - Value.Tuple [ Value.UnicodeChar 8079; Value.Integer Integer.U32 8071 ]; - Value.Tuple [ Value.UnicodeChar 8088; Value.Integer Integer.U32 8080 ]; - Value.Tuple [ Value.UnicodeChar 8089; Value.Integer Integer.U32 8081 ]; - Value.Tuple [ Value.UnicodeChar 8090; Value.Integer Integer.U32 8082 ]; - Value.Tuple [ Value.UnicodeChar 8091; Value.Integer Integer.U32 8083 ]; - Value.Tuple [ Value.UnicodeChar 8092; Value.Integer Integer.U32 8084 ]; - Value.Tuple [ Value.UnicodeChar 8093; Value.Integer Integer.U32 8085 ]; - Value.Tuple [ Value.UnicodeChar 8094; Value.Integer Integer.U32 8086 ]; - Value.Tuple [ Value.UnicodeChar 8095; Value.Integer Integer.U32 8087 ]; - Value.Tuple [ Value.UnicodeChar 8104; Value.Integer Integer.U32 8096 ]; - Value.Tuple [ Value.UnicodeChar 8105; Value.Integer Integer.U32 8097 ]; - Value.Tuple [ Value.UnicodeChar 8106; Value.Integer Integer.U32 8098 ]; - Value.Tuple [ Value.UnicodeChar 8107; Value.Integer Integer.U32 8099 ]; - Value.Tuple [ Value.UnicodeChar 8108; Value.Integer Integer.U32 8100 ]; - Value.Tuple [ Value.UnicodeChar 8109; Value.Integer Integer.U32 8101 ]; - Value.Tuple [ Value.UnicodeChar 8110; Value.Integer Integer.U32 8102 ]; - Value.Tuple [ Value.UnicodeChar 8111; Value.Integer Integer.U32 8103 ]; - Value.Tuple [ Value.UnicodeChar 8120; Value.Integer Integer.U32 8112 ]; - Value.Tuple [ Value.UnicodeChar 8121; Value.Integer Integer.U32 8113 ]; - Value.Tuple [ Value.UnicodeChar 8122; Value.Integer Integer.U32 8048 ]; - Value.Tuple [ Value.UnicodeChar 8123; Value.Integer Integer.U32 8049 ]; - Value.Tuple [ Value.UnicodeChar 8124; Value.Integer Integer.U32 8115 ]; - Value.Tuple [ Value.UnicodeChar 8136; Value.Integer Integer.U32 8050 ]; - Value.Tuple [ Value.UnicodeChar 8137; Value.Integer Integer.U32 8051 ]; - Value.Tuple [ Value.UnicodeChar 8138; Value.Integer Integer.U32 8052 ]; - Value.Tuple [ Value.UnicodeChar 8139; Value.Integer Integer.U32 8053 ]; - Value.Tuple [ Value.UnicodeChar 8140; Value.Integer Integer.U32 8131 ]; - Value.Tuple [ Value.UnicodeChar 8152; Value.Integer Integer.U32 8144 ]; - Value.Tuple [ Value.UnicodeChar 8153; Value.Integer Integer.U32 8145 ]; - Value.Tuple [ Value.UnicodeChar 8154; Value.Integer Integer.U32 8054 ]; - Value.Tuple [ Value.UnicodeChar 8155; Value.Integer Integer.U32 8055 ]; - Value.Tuple [ Value.UnicodeChar 8168; Value.Integer Integer.U32 8160 ]; - Value.Tuple [ Value.UnicodeChar 8169; Value.Integer Integer.U32 8161 ]; - Value.Tuple [ Value.UnicodeChar 8170; Value.Integer Integer.U32 8058 ]; - Value.Tuple [ Value.UnicodeChar 8171; Value.Integer Integer.U32 8059 ]; - Value.Tuple [ Value.UnicodeChar 8172; Value.Integer Integer.U32 8165 ]; - Value.Tuple [ Value.UnicodeChar 8184; Value.Integer Integer.U32 8056 ]; - Value.Tuple [ Value.UnicodeChar 8185; Value.Integer Integer.U32 8057 ]; - Value.Tuple [ Value.UnicodeChar 8186; Value.Integer Integer.U32 8060 ]; - Value.Tuple [ Value.UnicodeChar 8187; Value.Integer Integer.U32 8061 ]; - Value.Tuple [ Value.UnicodeChar 8188; Value.Integer Integer.U32 8179 ]; - Value.Tuple [ Value.UnicodeChar 8486; Value.Integer Integer.U32 969 ]; - Value.Tuple [ Value.UnicodeChar 8490; Value.Integer Integer.U32 107 ]; - Value.Tuple [ Value.UnicodeChar 8491; Value.Integer Integer.U32 229 ]; - Value.Tuple [ Value.UnicodeChar 8498; Value.Integer Integer.U32 8526 ]; - Value.Tuple [ Value.UnicodeChar 8544; Value.Integer Integer.U32 8560 ]; - Value.Tuple [ Value.UnicodeChar 8545; Value.Integer Integer.U32 8561 ]; - Value.Tuple [ Value.UnicodeChar 8546; Value.Integer Integer.U32 8562 ]; - Value.Tuple [ Value.UnicodeChar 8547; Value.Integer Integer.U32 8563 ]; - Value.Tuple [ Value.UnicodeChar 8548; Value.Integer Integer.U32 8564 ]; - Value.Tuple [ Value.UnicodeChar 8549; Value.Integer Integer.U32 8565 ]; - Value.Tuple [ Value.UnicodeChar 8550; Value.Integer Integer.U32 8566 ]; - Value.Tuple [ Value.UnicodeChar 8551; Value.Integer Integer.U32 8567 ]; - Value.Tuple [ Value.UnicodeChar 8552; Value.Integer Integer.U32 8568 ]; - Value.Tuple [ Value.UnicodeChar 8553; Value.Integer Integer.U32 8569 ]; - Value.Tuple [ Value.UnicodeChar 8554; Value.Integer Integer.U32 8570 ]; - Value.Tuple [ Value.UnicodeChar 8555; Value.Integer Integer.U32 8571 ]; - Value.Tuple [ Value.UnicodeChar 8556; Value.Integer Integer.U32 8572 ]; - Value.Tuple [ Value.UnicodeChar 8557; Value.Integer Integer.U32 8573 ]; - Value.Tuple [ Value.UnicodeChar 8558; Value.Integer Integer.U32 8574 ]; - Value.Tuple [ Value.UnicodeChar 8559; Value.Integer Integer.U32 8575 ]; - Value.Tuple [ Value.UnicodeChar 8579; Value.Integer Integer.U32 8580 ]; - Value.Tuple [ Value.UnicodeChar 9398; Value.Integer Integer.U32 9424 ]; - Value.Tuple [ Value.UnicodeChar 9399; Value.Integer Integer.U32 9425 ]; - Value.Tuple [ Value.UnicodeChar 9400; Value.Integer Integer.U32 9426 ]; - Value.Tuple [ Value.UnicodeChar 9401; Value.Integer Integer.U32 9427 ]; - Value.Tuple [ Value.UnicodeChar 9402; Value.Integer Integer.U32 9428 ]; - Value.Tuple [ Value.UnicodeChar 9403; Value.Integer Integer.U32 9429 ]; - Value.Tuple [ Value.UnicodeChar 9404; Value.Integer Integer.U32 9430 ]; - Value.Tuple [ Value.UnicodeChar 9405; Value.Integer Integer.U32 9431 ]; - Value.Tuple [ Value.UnicodeChar 9406; Value.Integer Integer.U32 9432 ]; - Value.Tuple [ Value.UnicodeChar 9407; Value.Integer Integer.U32 9433 ]; - Value.Tuple [ Value.UnicodeChar 9408; Value.Integer Integer.U32 9434 ]; - Value.Tuple [ Value.UnicodeChar 9409; Value.Integer Integer.U32 9435 ]; - Value.Tuple [ Value.UnicodeChar 9410; Value.Integer Integer.U32 9436 ]; - Value.Tuple [ Value.UnicodeChar 9411; Value.Integer Integer.U32 9437 ]; - Value.Tuple [ Value.UnicodeChar 9412; Value.Integer Integer.U32 9438 ]; - Value.Tuple [ Value.UnicodeChar 9413; Value.Integer Integer.U32 9439 ]; - Value.Tuple [ Value.UnicodeChar 9414; Value.Integer Integer.U32 9440 ]; - Value.Tuple [ Value.UnicodeChar 9415; Value.Integer Integer.U32 9441 ]; - Value.Tuple [ Value.UnicodeChar 9416; Value.Integer Integer.U32 9442 ]; - Value.Tuple [ Value.UnicodeChar 9417; Value.Integer Integer.U32 9443 ]; - Value.Tuple [ Value.UnicodeChar 9418; Value.Integer Integer.U32 9444 ]; - Value.Tuple [ Value.UnicodeChar 9419; Value.Integer Integer.U32 9445 ]; - Value.Tuple [ Value.UnicodeChar 9420; Value.Integer Integer.U32 9446 ]; - Value.Tuple [ Value.UnicodeChar 9421; Value.Integer Integer.U32 9447 ]; - Value.Tuple [ Value.UnicodeChar 9422; Value.Integer Integer.U32 9448 ]; - Value.Tuple [ Value.UnicodeChar 9423; Value.Integer Integer.U32 9449 ]; - Value.Tuple [ Value.UnicodeChar 11264; Value.Integer Integer.U32 11312 ]; - Value.Tuple [ Value.UnicodeChar 11265; Value.Integer Integer.U32 11313 ]; - Value.Tuple [ Value.UnicodeChar 11266; Value.Integer Integer.U32 11314 ]; - Value.Tuple [ Value.UnicodeChar 11267; Value.Integer Integer.U32 11315 ]; - Value.Tuple [ Value.UnicodeChar 11268; Value.Integer Integer.U32 11316 ]; - Value.Tuple [ Value.UnicodeChar 11269; Value.Integer Integer.U32 11317 ]; - Value.Tuple [ Value.UnicodeChar 11270; Value.Integer Integer.U32 11318 ]; - Value.Tuple [ Value.UnicodeChar 11271; Value.Integer Integer.U32 11319 ]; - Value.Tuple [ Value.UnicodeChar 11272; Value.Integer Integer.U32 11320 ]; - Value.Tuple [ Value.UnicodeChar 11273; Value.Integer Integer.U32 11321 ]; - Value.Tuple [ Value.UnicodeChar 11274; Value.Integer Integer.U32 11322 ]; - Value.Tuple [ Value.UnicodeChar 11275; Value.Integer Integer.U32 11323 ]; - Value.Tuple [ Value.UnicodeChar 11276; Value.Integer Integer.U32 11324 ]; - Value.Tuple [ Value.UnicodeChar 11277; Value.Integer Integer.U32 11325 ]; - Value.Tuple [ Value.UnicodeChar 11278; Value.Integer Integer.U32 11326 ]; - Value.Tuple [ Value.UnicodeChar 11279; Value.Integer Integer.U32 11327 ]; - Value.Tuple [ Value.UnicodeChar 11280; Value.Integer Integer.U32 11328 ]; - Value.Tuple [ Value.UnicodeChar 11281; Value.Integer Integer.U32 11329 ]; - Value.Tuple [ Value.UnicodeChar 11282; Value.Integer Integer.U32 11330 ]; - Value.Tuple [ Value.UnicodeChar 11283; Value.Integer Integer.U32 11331 ]; - Value.Tuple [ Value.UnicodeChar 11284; Value.Integer Integer.U32 11332 ]; - Value.Tuple [ Value.UnicodeChar 11285; Value.Integer Integer.U32 11333 ]; - Value.Tuple [ Value.UnicodeChar 11286; Value.Integer Integer.U32 11334 ]; - Value.Tuple [ Value.UnicodeChar 11287; Value.Integer Integer.U32 11335 ]; - Value.Tuple [ Value.UnicodeChar 11288; Value.Integer Integer.U32 11336 ]; - Value.Tuple [ Value.UnicodeChar 11289; Value.Integer Integer.U32 11337 ]; - Value.Tuple [ Value.UnicodeChar 11290; Value.Integer Integer.U32 11338 ]; - Value.Tuple [ Value.UnicodeChar 11291; Value.Integer Integer.U32 11339 ]; - Value.Tuple [ Value.UnicodeChar 11292; Value.Integer Integer.U32 11340 ]; - Value.Tuple [ Value.UnicodeChar 11293; Value.Integer Integer.U32 11341 ]; - Value.Tuple [ Value.UnicodeChar 11294; Value.Integer Integer.U32 11342 ]; - Value.Tuple [ Value.UnicodeChar 11295; Value.Integer Integer.U32 11343 ]; - Value.Tuple [ Value.UnicodeChar 11296; Value.Integer Integer.U32 11344 ]; - Value.Tuple [ Value.UnicodeChar 11297; Value.Integer Integer.U32 11345 ]; - Value.Tuple [ Value.UnicodeChar 11298; Value.Integer Integer.U32 11346 ]; - Value.Tuple [ Value.UnicodeChar 11299; Value.Integer Integer.U32 11347 ]; - Value.Tuple [ Value.UnicodeChar 11300; Value.Integer Integer.U32 11348 ]; - Value.Tuple [ Value.UnicodeChar 11301; Value.Integer Integer.U32 11349 ]; - Value.Tuple [ Value.UnicodeChar 11302; Value.Integer Integer.U32 11350 ]; - Value.Tuple [ Value.UnicodeChar 11303; Value.Integer Integer.U32 11351 ]; - Value.Tuple [ Value.UnicodeChar 11304; Value.Integer Integer.U32 11352 ]; - Value.Tuple [ Value.UnicodeChar 11305; Value.Integer Integer.U32 11353 ]; - Value.Tuple [ Value.UnicodeChar 11306; Value.Integer Integer.U32 11354 ]; - Value.Tuple [ Value.UnicodeChar 11307; Value.Integer Integer.U32 11355 ]; - Value.Tuple [ Value.UnicodeChar 11308; Value.Integer Integer.U32 11356 ]; - Value.Tuple [ Value.UnicodeChar 11309; Value.Integer Integer.U32 11357 ]; - Value.Tuple [ Value.UnicodeChar 11310; Value.Integer Integer.U32 11358 ]; - Value.Tuple [ Value.UnicodeChar 11311; Value.Integer Integer.U32 11359 ]; - Value.Tuple [ Value.UnicodeChar 11360; Value.Integer Integer.U32 11361 ]; - Value.Tuple [ Value.UnicodeChar 11362; Value.Integer Integer.U32 619 ]; - Value.Tuple [ Value.UnicodeChar 11363; Value.Integer Integer.U32 7549 ]; - Value.Tuple [ Value.UnicodeChar 11364; Value.Integer Integer.U32 637 ]; - Value.Tuple [ Value.UnicodeChar 11367; Value.Integer Integer.U32 11368 ]; - Value.Tuple [ Value.UnicodeChar 11369; Value.Integer Integer.U32 11370 ]; - Value.Tuple [ Value.UnicodeChar 11371; Value.Integer Integer.U32 11372 ]; - Value.Tuple [ Value.UnicodeChar 11373; Value.Integer Integer.U32 593 ]; - Value.Tuple [ Value.UnicodeChar 11374; Value.Integer Integer.U32 625 ]; - Value.Tuple [ Value.UnicodeChar 11375; Value.Integer Integer.U32 592 ]; - Value.Tuple [ Value.UnicodeChar 11376; Value.Integer Integer.U32 594 ]; - Value.Tuple [ Value.UnicodeChar 11378; Value.Integer Integer.U32 11379 ]; - Value.Tuple [ Value.UnicodeChar 11381; Value.Integer Integer.U32 11382 ]; - Value.Tuple [ Value.UnicodeChar 11390; Value.Integer Integer.U32 575 ]; - Value.Tuple [ Value.UnicodeChar 11391; Value.Integer Integer.U32 576 ]; - Value.Tuple [ Value.UnicodeChar 11392; Value.Integer Integer.U32 11393 ]; - Value.Tuple [ Value.UnicodeChar 11394; Value.Integer Integer.U32 11395 ]; - Value.Tuple [ Value.UnicodeChar 11396; Value.Integer Integer.U32 11397 ]; - Value.Tuple [ Value.UnicodeChar 11398; Value.Integer Integer.U32 11399 ]; - Value.Tuple [ Value.UnicodeChar 11400; Value.Integer Integer.U32 11401 ]; - Value.Tuple [ Value.UnicodeChar 11402; Value.Integer Integer.U32 11403 ]; - Value.Tuple [ Value.UnicodeChar 11404; Value.Integer Integer.U32 11405 ]; - Value.Tuple [ Value.UnicodeChar 11406; Value.Integer Integer.U32 11407 ]; - Value.Tuple [ Value.UnicodeChar 11408; Value.Integer Integer.U32 11409 ]; - Value.Tuple [ Value.UnicodeChar 11410; Value.Integer Integer.U32 11411 ]; - Value.Tuple [ Value.UnicodeChar 11412; Value.Integer Integer.U32 11413 ]; - Value.Tuple [ Value.UnicodeChar 11414; Value.Integer Integer.U32 11415 ]; - Value.Tuple [ Value.UnicodeChar 11416; Value.Integer Integer.U32 11417 ]; - Value.Tuple [ Value.UnicodeChar 11418; Value.Integer Integer.U32 11419 ]; - Value.Tuple [ Value.UnicodeChar 11420; Value.Integer Integer.U32 11421 ]; - Value.Tuple [ Value.UnicodeChar 11422; Value.Integer Integer.U32 11423 ]; - Value.Tuple [ Value.UnicodeChar 11424; Value.Integer Integer.U32 11425 ]; - Value.Tuple [ Value.UnicodeChar 11426; Value.Integer Integer.U32 11427 ]; - Value.Tuple [ Value.UnicodeChar 11428; Value.Integer Integer.U32 11429 ]; - Value.Tuple [ Value.UnicodeChar 11430; Value.Integer Integer.U32 11431 ]; - Value.Tuple [ Value.UnicodeChar 11432; Value.Integer Integer.U32 11433 ]; - Value.Tuple [ Value.UnicodeChar 11434; Value.Integer Integer.U32 11435 ]; - Value.Tuple [ Value.UnicodeChar 11436; Value.Integer Integer.U32 11437 ]; - Value.Tuple [ Value.UnicodeChar 11438; Value.Integer Integer.U32 11439 ]; - Value.Tuple [ Value.UnicodeChar 11440; Value.Integer Integer.U32 11441 ]; - Value.Tuple [ Value.UnicodeChar 11442; Value.Integer Integer.U32 11443 ]; - Value.Tuple [ Value.UnicodeChar 11444; Value.Integer Integer.U32 11445 ]; - Value.Tuple [ Value.UnicodeChar 11446; Value.Integer Integer.U32 11447 ]; - Value.Tuple [ Value.UnicodeChar 11448; Value.Integer Integer.U32 11449 ]; - Value.Tuple [ Value.UnicodeChar 11450; Value.Integer Integer.U32 11451 ]; - Value.Tuple [ Value.UnicodeChar 11452; Value.Integer Integer.U32 11453 ]; - Value.Tuple [ Value.UnicodeChar 11454; Value.Integer Integer.U32 11455 ]; - Value.Tuple [ Value.UnicodeChar 11456; Value.Integer Integer.U32 11457 ]; - Value.Tuple [ Value.UnicodeChar 11458; Value.Integer Integer.U32 11459 ]; - Value.Tuple [ Value.UnicodeChar 11460; Value.Integer Integer.U32 11461 ]; - Value.Tuple [ Value.UnicodeChar 11462; Value.Integer Integer.U32 11463 ]; - Value.Tuple [ Value.UnicodeChar 11464; Value.Integer Integer.U32 11465 ]; - Value.Tuple [ Value.UnicodeChar 11466; Value.Integer Integer.U32 11467 ]; - Value.Tuple [ Value.UnicodeChar 11468; Value.Integer Integer.U32 11469 ]; - Value.Tuple [ Value.UnicodeChar 11470; Value.Integer Integer.U32 11471 ]; - Value.Tuple [ Value.UnicodeChar 11472; Value.Integer Integer.U32 11473 ]; - Value.Tuple [ Value.UnicodeChar 11474; Value.Integer Integer.U32 11475 ]; - Value.Tuple [ Value.UnicodeChar 11476; Value.Integer Integer.U32 11477 ]; - Value.Tuple [ Value.UnicodeChar 11478; Value.Integer Integer.U32 11479 ]; - Value.Tuple [ Value.UnicodeChar 11480; Value.Integer Integer.U32 11481 ]; - Value.Tuple [ Value.UnicodeChar 11482; Value.Integer Integer.U32 11483 ]; - Value.Tuple [ Value.UnicodeChar 11484; Value.Integer Integer.U32 11485 ]; - Value.Tuple [ Value.UnicodeChar 11486; Value.Integer Integer.U32 11487 ]; - Value.Tuple [ Value.UnicodeChar 11488; Value.Integer Integer.U32 11489 ]; - Value.Tuple [ Value.UnicodeChar 11490; Value.Integer Integer.U32 11491 ]; - Value.Tuple [ Value.UnicodeChar 11499; Value.Integer Integer.U32 11500 ]; - Value.Tuple [ Value.UnicodeChar 11501; Value.Integer Integer.U32 11502 ]; - Value.Tuple [ Value.UnicodeChar 11506; Value.Integer Integer.U32 11507 ]; - Value.Tuple [ Value.UnicodeChar 42560; Value.Integer Integer.U32 42561 ]; - Value.Tuple [ Value.UnicodeChar 42562; Value.Integer Integer.U32 42563 ]; - Value.Tuple [ Value.UnicodeChar 42564; Value.Integer Integer.U32 42565 ]; - Value.Tuple [ Value.UnicodeChar 42566; Value.Integer Integer.U32 42567 ]; - Value.Tuple [ Value.UnicodeChar 42568; Value.Integer Integer.U32 42569 ]; - Value.Tuple [ Value.UnicodeChar 42570; Value.Integer Integer.U32 42571 ]; - Value.Tuple [ Value.UnicodeChar 42572; Value.Integer Integer.U32 42573 ]; - Value.Tuple [ Value.UnicodeChar 42574; Value.Integer Integer.U32 42575 ]; - Value.Tuple [ Value.UnicodeChar 42576; Value.Integer Integer.U32 42577 ]; - Value.Tuple [ Value.UnicodeChar 42578; Value.Integer Integer.U32 42579 ]; - Value.Tuple [ Value.UnicodeChar 42580; Value.Integer Integer.U32 42581 ]; - Value.Tuple [ Value.UnicodeChar 42582; Value.Integer Integer.U32 42583 ]; - Value.Tuple [ Value.UnicodeChar 42584; Value.Integer Integer.U32 42585 ]; - Value.Tuple [ Value.UnicodeChar 42586; Value.Integer Integer.U32 42587 ]; - Value.Tuple [ Value.UnicodeChar 42588; Value.Integer Integer.U32 42589 ]; - Value.Tuple [ Value.UnicodeChar 42590; Value.Integer Integer.U32 42591 ]; - Value.Tuple [ Value.UnicodeChar 42592; Value.Integer Integer.U32 42593 ]; - Value.Tuple [ Value.UnicodeChar 42594; Value.Integer Integer.U32 42595 ]; - Value.Tuple [ Value.UnicodeChar 42596; Value.Integer Integer.U32 42597 ]; - Value.Tuple [ Value.UnicodeChar 42598; Value.Integer Integer.U32 42599 ]; - Value.Tuple [ Value.UnicodeChar 42600; Value.Integer Integer.U32 42601 ]; - Value.Tuple [ Value.UnicodeChar 42602; Value.Integer Integer.U32 42603 ]; - Value.Tuple [ Value.UnicodeChar 42604; Value.Integer Integer.U32 42605 ]; - Value.Tuple [ Value.UnicodeChar 42624; Value.Integer Integer.U32 42625 ]; - Value.Tuple [ Value.UnicodeChar 42626; Value.Integer Integer.U32 42627 ]; - Value.Tuple [ Value.UnicodeChar 42628; Value.Integer Integer.U32 42629 ]; - Value.Tuple [ Value.UnicodeChar 42630; Value.Integer Integer.U32 42631 ]; - Value.Tuple [ Value.UnicodeChar 42632; Value.Integer Integer.U32 42633 ]; - Value.Tuple [ Value.UnicodeChar 42634; Value.Integer Integer.U32 42635 ]; - Value.Tuple [ Value.UnicodeChar 42636; Value.Integer Integer.U32 42637 ]; - Value.Tuple [ Value.UnicodeChar 42638; Value.Integer Integer.U32 42639 ]; - Value.Tuple [ Value.UnicodeChar 42640; Value.Integer Integer.U32 42641 ]; - Value.Tuple [ Value.UnicodeChar 42642; Value.Integer Integer.U32 42643 ]; - Value.Tuple [ Value.UnicodeChar 42644; Value.Integer Integer.U32 42645 ]; - Value.Tuple [ Value.UnicodeChar 42646; Value.Integer Integer.U32 42647 ]; - Value.Tuple [ Value.UnicodeChar 42648; Value.Integer Integer.U32 42649 ]; - Value.Tuple [ Value.UnicodeChar 42650; Value.Integer Integer.U32 42651 ]; - Value.Tuple [ Value.UnicodeChar 42786; Value.Integer Integer.U32 42787 ]; - Value.Tuple [ Value.UnicodeChar 42788; Value.Integer Integer.U32 42789 ]; - Value.Tuple [ Value.UnicodeChar 42790; Value.Integer Integer.U32 42791 ]; - Value.Tuple [ Value.UnicodeChar 42792; Value.Integer Integer.U32 42793 ]; - Value.Tuple [ Value.UnicodeChar 42794; Value.Integer Integer.U32 42795 ]; - Value.Tuple [ Value.UnicodeChar 42796; Value.Integer Integer.U32 42797 ]; - Value.Tuple [ Value.UnicodeChar 42798; Value.Integer Integer.U32 42799 ]; - Value.Tuple [ Value.UnicodeChar 42802; Value.Integer Integer.U32 42803 ]; - Value.Tuple [ Value.UnicodeChar 42804; Value.Integer Integer.U32 42805 ]; - Value.Tuple [ Value.UnicodeChar 42806; Value.Integer Integer.U32 42807 ]; - Value.Tuple [ Value.UnicodeChar 42808; Value.Integer Integer.U32 42809 ]; - Value.Tuple [ Value.UnicodeChar 42810; Value.Integer Integer.U32 42811 ]; - Value.Tuple [ Value.UnicodeChar 42812; Value.Integer Integer.U32 42813 ]; - Value.Tuple [ Value.UnicodeChar 42814; Value.Integer Integer.U32 42815 ]; - Value.Tuple [ Value.UnicodeChar 42816; Value.Integer Integer.U32 42817 ]; - Value.Tuple [ Value.UnicodeChar 42818; Value.Integer Integer.U32 42819 ]; - Value.Tuple [ Value.UnicodeChar 42820; Value.Integer Integer.U32 42821 ]; - Value.Tuple [ Value.UnicodeChar 42822; Value.Integer Integer.U32 42823 ]; - Value.Tuple [ Value.UnicodeChar 42824; Value.Integer Integer.U32 42825 ]; - Value.Tuple [ Value.UnicodeChar 42826; Value.Integer Integer.U32 42827 ]; - Value.Tuple [ Value.UnicodeChar 42828; Value.Integer Integer.U32 42829 ]; - Value.Tuple [ Value.UnicodeChar 42830; Value.Integer Integer.U32 42831 ]; - Value.Tuple [ Value.UnicodeChar 42832; Value.Integer Integer.U32 42833 ]; - Value.Tuple [ Value.UnicodeChar 42834; Value.Integer Integer.U32 42835 ]; - Value.Tuple [ Value.UnicodeChar 42836; Value.Integer Integer.U32 42837 ]; - Value.Tuple [ Value.UnicodeChar 42838; Value.Integer Integer.U32 42839 ]; - Value.Tuple [ Value.UnicodeChar 42840; Value.Integer Integer.U32 42841 ]; - Value.Tuple [ Value.UnicodeChar 42842; Value.Integer Integer.U32 42843 ]; - Value.Tuple [ Value.UnicodeChar 42844; Value.Integer Integer.U32 42845 ]; - Value.Tuple [ Value.UnicodeChar 42846; Value.Integer Integer.U32 42847 ]; - Value.Tuple [ Value.UnicodeChar 42848; Value.Integer Integer.U32 42849 ]; - Value.Tuple [ Value.UnicodeChar 42850; Value.Integer Integer.U32 42851 ]; - Value.Tuple [ Value.UnicodeChar 42852; Value.Integer Integer.U32 42853 ]; - Value.Tuple [ Value.UnicodeChar 42854; Value.Integer Integer.U32 42855 ]; - Value.Tuple [ Value.UnicodeChar 42856; Value.Integer Integer.U32 42857 ]; - Value.Tuple [ Value.UnicodeChar 42858; Value.Integer Integer.U32 42859 ]; - Value.Tuple [ Value.UnicodeChar 42860; Value.Integer Integer.U32 42861 ]; - Value.Tuple [ Value.UnicodeChar 42862; Value.Integer Integer.U32 42863 ]; - Value.Tuple [ Value.UnicodeChar 42873; Value.Integer Integer.U32 42874 ]; - Value.Tuple [ Value.UnicodeChar 42875; Value.Integer Integer.U32 42876 ]; - Value.Tuple [ Value.UnicodeChar 42877; Value.Integer Integer.U32 7545 ]; - Value.Tuple [ Value.UnicodeChar 42878; Value.Integer Integer.U32 42879 ]; - Value.Tuple [ Value.UnicodeChar 42880; Value.Integer Integer.U32 42881 ]; - Value.Tuple [ Value.UnicodeChar 42882; Value.Integer Integer.U32 42883 ]; - Value.Tuple [ Value.UnicodeChar 42884; Value.Integer Integer.U32 42885 ]; - Value.Tuple [ Value.UnicodeChar 42886; Value.Integer Integer.U32 42887 ]; - Value.Tuple [ Value.UnicodeChar 42891; Value.Integer Integer.U32 42892 ]; - Value.Tuple [ Value.UnicodeChar 42893; Value.Integer Integer.U32 613 ]; - Value.Tuple [ Value.UnicodeChar 42896; Value.Integer Integer.U32 42897 ]; - Value.Tuple [ Value.UnicodeChar 42898; Value.Integer Integer.U32 42899 ]; - Value.Tuple [ Value.UnicodeChar 42902; Value.Integer Integer.U32 42903 ]; - Value.Tuple [ Value.UnicodeChar 42904; Value.Integer Integer.U32 42905 ]; - Value.Tuple [ Value.UnicodeChar 42906; Value.Integer Integer.U32 42907 ]; - Value.Tuple [ Value.UnicodeChar 42908; Value.Integer Integer.U32 42909 ]; - Value.Tuple [ Value.UnicodeChar 42910; Value.Integer Integer.U32 42911 ]; - Value.Tuple [ Value.UnicodeChar 42912; Value.Integer Integer.U32 42913 ]; - Value.Tuple [ Value.UnicodeChar 42914; Value.Integer Integer.U32 42915 ]; - Value.Tuple [ Value.UnicodeChar 42916; Value.Integer Integer.U32 42917 ]; - Value.Tuple [ Value.UnicodeChar 42918; Value.Integer Integer.U32 42919 ]; - Value.Tuple [ Value.UnicodeChar 42920; Value.Integer Integer.U32 42921 ]; - Value.Tuple [ Value.UnicodeChar 42922; Value.Integer Integer.U32 614 ]; - Value.Tuple [ Value.UnicodeChar 42923; Value.Integer Integer.U32 604 ]; - Value.Tuple [ Value.UnicodeChar 42924; Value.Integer Integer.U32 609 ]; - Value.Tuple [ Value.UnicodeChar 42925; Value.Integer Integer.U32 620 ]; - Value.Tuple [ Value.UnicodeChar 42926; Value.Integer Integer.U32 618 ]; - Value.Tuple [ Value.UnicodeChar 42928; Value.Integer Integer.U32 670 ]; - Value.Tuple [ Value.UnicodeChar 42929; Value.Integer Integer.U32 647 ]; - Value.Tuple [ Value.UnicodeChar 42930; Value.Integer Integer.U32 669 ]; - Value.Tuple [ Value.UnicodeChar 42931; Value.Integer Integer.U32 43859 ]; - Value.Tuple [ Value.UnicodeChar 42932; Value.Integer Integer.U32 42933 ]; - Value.Tuple [ Value.UnicodeChar 42934; Value.Integer Integer.U32 42935 ]; - Value.Tuple [ Value.UnicodeChar 42936; Value.Integer Integer.U32 42937 ]; - Value.Tuple [ Value.UnicodeChar 42938; Value.Integer Integer.U32 42939 ]; - Value.Tuple [ Value.UnicodeChar 42940; Value.Integer Integer.U32 42941 ]; - Value.Tuple [ Value.UnicodeChar 42942; Value.Integer Integer.U32 42943 ]; - Value.Tuple [ Value.UnicodeChar 42944; Value.Integer Integer.U32 42945 ]; - Value.Tuple [ Value.UnicodeChar 42946; Value.Integer Integer.U32 42947 ]; - Value.Tuple [ Value.UnicodeChar 42948; Value.Integer Integer.U32 42900 ]; - Value.Tuple [ Value.UnicodeChar 42949; Value.Integer Integer.U32 642 ]; - Value.Tuple [ Value.UnicodeChar 42950; Value.Integer Integer.U32 7566 ]; - Value.Tuple [ Value.UnicodeChar 42951; Value.Integer Integer.U32 42952 ]; - Value.Tuple [ Value.UnicodeChar 42953; Value.Integer Integer.U32 42954 ]; - Value.Tuple [ Value.UnicodeChar 42960; Value.Integer Integer.U32 42961 ]; - Value.Tuple [ Value.UnicodeChar 42966; Value.Integer Integer.U32 42967 ]; - Value.Tuple [ Value.UnicodeChar 42968; Value.Integer Integer.U32 42969 ]; - Value.Tuple [ Value.UnicodeChar 42997; Value.Integer Integer.U32 42998 ]; - Value.Tuple [ Value.UnicodeChar 65313; Value.Integer Integer.U32 65345 ]; - Value.Tuple [ Value.UnicodeChar 65314; Value.Integer Integer.U32 65346 ]; - Value.Tuple [ Value.UnicodeChar 65315; Value.Integer Integer.U32 65347 ]; - Value.Tuple [ Value.UnicodeChar 65316; Value.Integer Integer.U32 65348 ]; - Value.Tuple [ Value.UnicodeChar 65317; Value.Integer Integer.U32 65349 ]; - Value.Tuple [ Value.UnicodeChar 65318; Value.Integer Integer.U32 65350 ]; - Value.Tuple [ Value.UnicodeChar 65319; Value.Integer Integer.U32 65351 ]; - Value.Tuple [ Value.UnicodeChar 65320; Value.Integer Integer.U32 65352 ]; - Value.Tuple [ Value.UnicodeChar 65321; Value.Integer Integer.U32 65353 ]; - Value.Tuple [ Value.UnicodeChar 65322; Value.Integer Integer.U32 65354 ]; - Value.Tuple [ Value.UnicodeChar 65323; Value.Integer Integer.U32 65355 ]; - Value.Tuple [ Value.UnicodeChar 65324; Value.Integer Integer.U32 65356 ]; - Value.Tuple [ Value.UnicodeChar 65325; Value.Integer Integer.U32 65357 ]; - Value.Tuple [ Value.UnicodeChar 65326; Value.Integer Integer.U32 65358 ]; - Value.Tuple [ Value.UnicodeChar 65327; Value.Integer Integer.U32 65359 ]; - Value.Tuple [ Value.UnicodeChar 65328; Value.Integer Integer.U32 65360 ]; - Value.Tuple [ Value.UnicodeChar 65329; Value.Integer Integer.U32 65361 ]; - Value.Tuple [ Value.UnicodeChar 65330; Value.Integer Integer.U32 65362 ]; - Value.Tuple [ Value.UnicodeChar 65331; Value.Integer Integer.U32 65363 ]; - Value.Tuple [ Value.UnicodeChar 65332; Value.Integer Integer.U32 65364 ]; - Value.Tuple [ Value.UnicodeChar 65333; Value.Integer Integer.U32 65365 ]; - Value.Tuple [ Value.UnicodeChar 65334; Value.Integer Integer.U32 65366 ]; - Value.Tuple [ Value.UnicodeChar 65335; Value.Integer Integer.U32 65367 ]; - Value.Tuple [ Value.UnicodeChar 65336; Value.Integer Integer.U32 65368 ]; - Value.Tuple [ Value.UnicodeChar 65337; Value.Integer Integer.U32 65369 ]; - Value.Tuple [ Value.UnicodeChar 65338; Value.Integer Integer.U32 65370 ]; - Value.Tuple [ Value.UnicodeChar 66560; Value.Integer Integer.U32 66600 ]; - Value.Tuple [ Value.UnicodeChar 66561; Value.Integer Integer.U32 66601 ]; - Value.Tuple [ Value.UnicodeChar 66562; Value.Integer Integer.U32 66602 ]; - Value.Tuple [ Value.UnicodeChar 66563; Value.Integer Integer.U32 66603 ]; - Value.Tuple [ Value.UnicodeChar 66564; Value.Integer Integer.U32 66604 ]; - Value.Tuple [ Value.UnicodeChar 66565; Value.Integer Integer.U32 66605 ]; - Value.Tuple [ Value.UnicodeChar 66566; Value.Integer Integer.U32 66606 ]; - Value.Tuple [ Value.UnicodeChar 66567; Value.Integer Integer.U32 66607 ]; - Value.Tuple [ Value.UnicodeChar 66568; Value.Integer Integer.U32 66608 ]; - Value.Tuple [ Value.UnicodeChar 66569; Value.Integer Integer.U32 66609 ]; - Value.Tuple [ Value.UnicodeChar 66570; Value.Integer Integer.U32 66610 ]; - Value.Tuple [ Value.UnicodeChar 66571; Value.Integer Integer.U32 66611 ]; - Value.Tuple [ Value.UnicodeChar 66572; Value.Integer Integer.U32 66612 ]; - Value.Tuple [ Value.UnicodeChar 66573; Value.Integer Integer.U32 66613 ]; - Value.Tuple [ Value.UnicodeChar 66574; Value.Integer Integer.U32 66614 ]; - Value.Tuple [ Value.UnicodeChar 66575; Value.Integer Integer.U32 66615 ]; - Value.Tuple [ Value.UnicodeChar 66576; Value.Integer Integer.U32 66616 ]; - Value.Tuple [ Value.UnicodeChar 66577; Value.Integer Integer.U32 66617 ]; - Value.Tuple [ Value.UnicodeChar 66578; Value.Integer Integer.U32 66618 ]; - Value.Tuple [ Value.UnicodeChar 66579; Value.Integer Integer.U32 66619 ]; - Value.Tuple [ Value.UnicodeChar 66580; Value.Integer Integer.U32 66620 ]; - Value.Tuple [ Value.UnicodeChar 66581; Value.Integer Integer.U32 66621 ]; - Value.Tuple [ Value.UnicodeChar 66582; Value.Integer Integer.U32 66622 ]; - Value.Tuple [ Value.UnicodeChar 66583; Value.Integer Integer.U32 66623 ]; - Value.Tuple [ Value.UnicodeChar 66584; Value.Integer Integer.U32 66624 ]; - Value.Tuple [ Value.UnicodeChar 66585; Value.Integer Integer.U32 66625 ]; - Value.Tuple [ Value.UnicodeChar 66586; Value.Integer Integer.U32 66626 ]; - Value.Tuple [ Value.UnicodeChar 66587; Value.Integer Integer.U32 66627 ]; - Value.Tuple [ Value.UnicodeChar 66588; Value.Integer Integer.U32 66628 ]; - Value.Tuple [ Value.UnicodeChar 66589; Value.Integer Integer.U32 66629 ]; - Value.Tuple [ Value.UnicodeChar 66590; Value.Integer Integer.U32 66630 ]; - Value.Tuple [ Value.UnicodeChar 66591; Value.Integer Integer.U32 66631 ]; - Value.Tuple [ Value.UnicodeChar 66592; Value.Integer Integer.U32 66632 ]; - Value.Tuple [ Value.UnicodeChar 66593; Value.Integer Integer.U32 66633 ]; - Value.Tuple [ Value.UnicodeChar 66594; Value.Integer Integer.U32 66634 ]; - Value.Tuple [ Value.UnicodeChar 66595; Value.Integer Integer.U32 66635 ]; - Value.Tuple [ Value.UnicodeChar 66596; Value.Integer Integer.U32 66636 ]; - Value.Tuple [ Value.UnicodeChar 66597; Value.Integer Integer.U32 66637 ]; - Value.Tuple [ Value.UnicodeChar 66598; Value.Integer Integer.U32 66638 ]; - Value.Tuple [ Value.UnicodeChar 66599; Value.Integer Integer.U32 66639 ]; - Value.Tuple [ Value.UnicodeChar 66736; Value.Integer Integer.U32 66776 ]; - Value.Tuple [ Value.UnicodeChar 66737; Value.Integer Integer.U32 66777 ]; - Value.Tuple [ Value.UnicodeChar 66738; Value.Integer Integer.U32 66778 ]; - Value.Tuple [ Value.UnicodeChar 66739; Value.Integer Integer.U32 66779 ]; - Value.Tuple [ Value.UnicodeChar 66740; Value.Integer Integer.U32 66780 ]; - Value.Tuple [ Value.UnicodeChar 66741; Value.Integer Integer.U32 66781 ]; - Value.Tuple [ Value.UnicodeChar 66742; Value.Integer Integer.U32 66782 ]; - Value.Tuple [ Value.UnicodeChar 66743; Value.Integer Integer.U32 66783 ]; - Value.Tuple [ Value.UnicodeChar 66744; Value.Integer Integer.U32 66784 ]; - Value.Tuple [ Value.UnicodeChar 66745; Value.Integer Integer.U32 66785 ]; - Value.Tuple [ Value.UnicodeChar 66746; Value.Integer Integer.U32 66786 ]; - Value.Tuple [ Value.UnicodeChar 66747; Value.Integer Integer.U32 66787 ]; - Value.Tuple [ Value.UnicodeChar 66748; Value.Integer Integer.U32 66788 ]; - Value.Tuple [ Value.UnicodeChar 66749; Value.Integer Integer.U32 66789 ]; - Value.Tuple [ Value.UnicodeChar 66750; Value.Integer Integer.U32 66790 ]; - Value.Tuple [ Value.UnicodeChar 66751; Value.Integer Integer.U32 66791 ]; - Value.Tuple [ Value.UnicodeChar 66752; Value.Integer Integer.U32 66792 ]; - Value.Tuple [ Value.UnicodeChar 66753; Value.Integer Integer.U32 66793 ]; - Value.Tuple [ Value.UnicodeChar 66754; Value.Integer Integer.U32 66794 ]; - Value.Tuple [ Value.UnicodeChar 66755; Value.Integer Integer.U32 66795 ]; - Value.Tuple [ Value.UnicodeChar 66756; Value.Integer Integer.U32 66796 ]; - Value.Tuple [ Value.UnicodeChar 66757; Value.Integer Integer.U32 66797 ]; - Value.Tuple [ Value.UnicodeChar 66758; Value.Integer Integer.U32 66798 ]; - Value.Tuple [ Value.UnicodeChar 66759; Value.Integer Integer.U32 66799 ]; - Value.Tuple [ Value.UnicodeChar 66760; Value.Integer Integer.U32 66800 ]; - Value.Tuple [ Value.UnicodeChar 66761; Value.Integer Integer.U32 66801 ]; - Value.Tuple [ Value.UnicodeChar 66762; Value.Integer Integer.U32 66802 ]; - Value.Tuple [ Value.UnicodeChar 66763; Value.Integer Integer.U32 66803 ]; - Value.Tuple [ Value.UnicodeChar 66764; Value.Integer Integer.U32 66804 ]; - Value.Tuple [ Value.UnicodeChar 66765; Value.Integer Integer.U32 66805 ]; - Value.Tuple [ Value.UnicodeChar 66766; Value.Integer Integer.U32 66806 ]; - Value.Tuple [ Value.UnicodeChar 66767; Value.Integer Integer.U32 66807 ]; - Value.Tuple [ Value.UnicodeChar 66768; Value.Integer Integer.U32 66808 ]; - Value.Tuple [ Value.UnicodeChar 66769; Value.Integer Integer.U32 66809 ]; - Value.Tuple [ Value.UnicodeChar 66770; Value.Integer Integer.U32 66810 ]; - Value.Tuple [ Value.UnicodeChar 66771; Value.Integer Integer.U32 66811 ]; - Value.Tuple [ Value.UnicodeChar 66928; Value.Integer Integer.U32 66967 ]; - Value.Tuple [ Value.UnicodeChar 66929; Value.Integer Integer.U32 66968 ]; - Value.Tuple [ Value.UnicodeChar 66930; Value.Integer Integer.U32 66969 ]; - Value.Tuple [ Value.UnicodeChar 66931; Value.Integer Integer.U32 66970 ]; - Value.Tuple [ Value.UnicodeChar 66932; Value.Integer Integer.U32 66971 ]; - Value.Tuple [ Value.UnicodeChar 66933; Value.Integer Integer.U32 66972 ]; - Value.Tuple [ Value.UnicodeChar 66934; Value.Integer Integer.U32 66973 ]; - Value.Tuple [ Value.UnicodeChar 66935; Value.Integer Integer.U32 66974 ]; - Value.Tuple [ Value.UnicodeChar 66936; Value.Integer Integer.U32 66975 ]; - Value.Tuple [ Value.UnicodeChar 66937; Value.Integer Integer.U32 66976 ]; - Value.Tuple [ Value.UnicodeChar 66938; Value.Integer Integer.U32 66977 ]; - Value.Tuple [ Value.UnicodeChar 66940; Value.Integer Integer.U32 66979 ]; - Value.Tuple [ Value.UnicodeChar 66941; Value.Integer Integer.U32 66980 ]; - Value.Tuple [ Value.UnicodeChar 66942; Value.Integer Integer.U32 66981 ]; - Value.Tuple [ Value.UnicodeChar 66943; Value.Integer Integer.U32 66982 ]; - Value.Tuple [ Value.UnicodeChar 66944; Value.Integer Integer.U32 66983 ]; - Value.Tuple [ Value.UnicodeChar 66945; Value.Integer Integer.U32 66984 ]; - Value.Tuple [ Value.UnicodeChar 66946; Value.Integer Integer.U32 66985 ]; - Value.Tuple [ Value.UnicodeChar 66947; Value.Integer Integer.U32 66986 ]; - Value.Tuple [ Value.UnicodeChar 66948; Value.Integer Integer.U32 66987 ]; - Value.Tuple [ Value.UnicodeChar 66949; Value.Integer Integer.U32 66988 ]; - Value.Tuple [ Value.UnicodeChar 66950; Value.Integer Integer.U32 66989 ]; - Value.Tuple [ Value.UnicodeChar 66951; Value.Integer Integer.U32 66990 ]; - Value.Tuple [ Value.UnicodeChar 66952; Value.Integer Integer.U32 66991 ]; - Value.Tuple [ Value.UnicodeChar 66953; Value.Integer Integer.U32 66992 ]; - Value.Tuple [ Value.UnicodeChar 66954; Value.Integer Integer.U32 66993 ]; - Value.Tuple [ Value.UnicodeChar 66956; Value.Integer Integer.U32 66995 ]; - Value.Tuple [ Value.UnicodeChar 66957; Value.Integer Integer.U32 66996 ]; - Value.Tuple [ Value.UnicodeChar 66958; Value.Integer Integer.U32 66997 ]; - Value.Tuple [ Value.UnicodeChar 66959; Value.Integer Integer.U32 66998 ]; - Value.Tuple [ Value.UnicodeChar 66960; Value.Integer Integer.U32 66999 ]; - Value.Tuple [ Value.UnicodeChar 66961; Value.Integer Integer.U32 67000 ]; - Value.Tuple [ Value.UnicodeChar 66962; Value.Integer Integer.U32 67001 ]; - Value.Tuple [ Value.UnicodeChar 66964; Value.Integer Integer.U32 67003 ]; - Value.Tuple [ Value.UnicodeChar 66965; Value.Integer Integer.U32 67004 ]; - Value.Tuple [ Value.UnicodeChar 68736; Value.Integer Integer.U32 68800 ]; - Value.Tuple [ Value.UnicodeChar 68737; Value.Integer Integer.U32 68801 ]; - Value.Tuple [ Value.UnicodeChar 68738; Value.Integer Integer.U32 68802 ]; - Value.Tuple [ Value.UnicodeChar 68739; Value.Integer Integer.U32 68803 ]; - Value.Tuple [ Value.UnicodeChar 68740; Value.Integer Integer.U32 68804 ]; - Value.Tuple [ Value.UnicodeChar 68741; Value.Integer Integer.U32 68805 ]; - Value.Tuple [ Value.UnicodeChar 68742; Value.Integer Integer.U32 68806 ]; - Value.Tuple [ Value.UnicodeChar 68743; Value.Integer Integer.U32 68807 ]; - Value.Tuple [ Value.UnicodeChar 68744; Value.Integer Integer.U32 68808 ]; - Value.Tuple [ Value.UnicodeChar 68745; Value.Integer Integer.U32 68809 ]; - Value.Tuple [ Value.UnicodeChar 68746; Value.Integer Integer.U32 68810 ]; - Value.Tuple [ Value.UnicodeChar 68747; Value.Integer Integer.U32 68811 ]; - Value.Tuple [ Value.UnicodeChar 68748; Value.Integer Integer.U32 68812 ]; - Value.Tuple [ Value.UnicodeChar 68749; Value.Integer Integer.U32 68813 ]; - Value.Tuple [ Value.UnicodeChar 68750; Value.Integer Integer.U32 68814 ]; - Value.Tuple [ Value.UnicodeChar 68751; Value.Integer Integer.U32 68815 ]; - Value.Tuple [ Value.UnicodeChar 68752; Value.Integer Integer.U32 68816 ]; - Value.Tuple [ Value.UnicodeChar 68753; Value.Integer Integer.U32 68817 ]; - Value.Tuple [ Value.UnicodeChar 68754; Value.Integer Integer.U32 68818 ]; - Value.Tuple [ Value.UnicodeChar 68755; Value.Integer Integer.U32 68819 ]; - Value.Tuple [ Value.UnicodeChar 68756; Value.Integer Integer.U32 68820 ]; - Value.Tuple [ Value.UnicodeChar 68757; Value.Integer Integer.U32 68821 ]; - Value.Tuple [ Value.UnicodeChar 68758; Value.Integer Integer.U32 68822 ]; - Value.Tuple [ Value.UnicodeChar 68759; Value.Integer Integer.U32 68823 ]; - Value.Tuple [ Value.UnicodeChar 68760; Value.Integer Integer.U32 68824 ]; - Value.Tuple [ Value.UnicodeChar 68761; Value.Integer Integer.U32 68825 ]; - Value.Tuple [ Value.UnicodeChar 68762; Value.Integer Integer.U32 68826 ]; - Value.Tuple [ Value.UnicodeChar 68763; Value.Integer Integer.U32 68827 ]; - Value.Tuple [ Value.UnicodeChar 68764; Value.Integer Integer.U32 68828 ]; - Value.Tuple [ Value.UnicodeChar 68765; Value.Integer Integer.U32 68829 ]; - Value.Tuple [ Value.UnicodeChar 68766; Value.Integer Integer.U32 68830 ]; - Value.Tuple [ Value.UnicodeChar 68767; Value.Integer Integer.U32 68831 ]; - Value.Tuple [ Value.UnicodeChar 68768; Value.Integer Integer.U32 68832 ]; - Value.Tuple [ Value.UnicodeChar 68769; Value.Integer Integer.U32 68833 ]; - Value.Tuple [ Value.UnicodeChar 68770; Value.Integer Integer.U32 68834 ]; - Value.Tuple [ Value.UnicodeChar 68771; Value.Integer Integer.U32 68835 ]; - Value.Tuple [ Value.UnicodeChar 68772; Value.Integer Integer.U32 68836 ]; - Value.Tuple [ Value.UnicodeChar 68773; Value.Integer Integer.U32 68837 ]; - Value.Tuple [ Value.UnicodeChar 68774; Value.Integer Integer.U32 68838 ]; - Value.Tuple [ Value.UnicodeChar 68775; Value.Integer Integer.U32 68839 ]; - Value.Tuple [ Value.UnicodeChar 68776; Value.Integer Integer.U32 68840 ]; - Value.Tuple [ Value.UnicodeChar 68777; Value.Integer Integer.U32 68841 ]; - Value.Tuple [ Value.UnicodeChar 68778; Value.Integer Integer.U32 68842 ]; - Value.Tuple [ Value.UnicodeChar 68779; Value.Integer Integer.U32 68843 ]; - Value.Tuple [ Value.UnicodeChar 68780; Value.Integer Integer.U32 68844 ]; - Value.Tuple [ Value.UnicodeChar 68781; Value.Integer Integer.U32 68845 ]; - Value.Tuple [ Value.UnicodeChar 68782; Value.Integer Integer.U32 68846 ]; - Value.Tuple [ Value.UnicodeChar 68783; Value.Integer Integer.U32 68847 ]; - Value.Tuple [ Value.UnicodeChar 68784; Value.Integer Integer.U32 68848 ]; - Value.Tuple [ Value.UnicodeChar 68785; Value.Integer Integer.U32 68849 ]; - Value.Tuple [ Value.UnicodeChar 68786; Value.Integer Integer.U32 68850 ]; - Value.Tuple [ Value.UnicodeChar 71840; Value.Integer Integer.U32 71872 ]; - Value.Tuple [ Value.UnicodeChar 71841; Value.Integer Integer.U32 71873 ]; - Value.Tuple [ Value.UnicodeChar 71842; Value.Integer Integer.U32 71874 ]; - Value.Tuple [ Value.UnicodeChar 71843; Value.Integer Integer.U32 71875 ]; - Value.Tuple [ Value.UnicodeChar 71844; Value.Integer Integer.U32 71876 ]; - Value.Tuple [ Value.UnicodeChar 71845; Value.Integer Integer.U32 71877 ]; - Value.Tuple [ Value.UnicodeChar 71846; Value.Integer Integer.U32 71878 ]; - Value.Tuple [ Value.UnicodeChar 71847; Value.Integer Integer.U32 71879 ]; - Value.Tuple [ Value.UnicodeChar 71848; Value.Integer Integer.U32 71880 ]; - Value.Tuple [ Value.UnicodeChar 71849; Value.Integer Integer.U32 71881 ]; - Value.Tuple [ Value.UnicodeChar 71850; Value.Integer Integer.U32 71882 ]; - Value.Tuple [ Value.UnicodeChar 71851; Value.Integer Integer.U32 71883 ]; - Value.Tuple [ Value.UnicodeChar 71852; Value.Integer Integer.U32 71884 ]; - Value.Tuple [ Value.UnicodeChar 71853; Value.Integer Integer.U32 71885 ]; - Value.Tuple [ Value.UnicodeChar 71854; Value.Integer Integer.U32 71886 ]; - Value.Tuple [ Value.UnicodeChar 71855; Value.Integer Integer.U32 71887 ]; - Value.Tuple [ Value.UnicodeChar 71856; Value.Integer Integer.U32 71888 ]; - Value.Tuple [ Value.UnicodeChar 71857; Value.Integer Integer.U32 71889 ]; - Value.Tuple [ Value.UnicodeChar 71858; Value.Integer Integer.U32 71890 ]; - Value.Tuple [ Value.UnicodeChar 71859; Value.Integer Integer.U32 71891 ]; - Value.Tuple [ Value.UnicodeChar 71860; Value.Integer Integer.U32 71892 ]; - Value.Tuple [ Value.UnicodeChar 71861; Value.Integer Integer.U32 71893 ]; - Value.Tuple [ Value.UnicodeChar 71862; Value.Integer Integer.U32 71894 ]; - Value.Tuple [ Value.UnicodeChar 71863; Value.Integer Integer.U32 71895 ]; - Value.Tuple [ Value.UnicodeChar 71864; Value.Integer Integer.U32 71896 ]; - Value.Tuple [ Value.UnicodeChar 71865; Value.Integer Integer.U32 71897 ]; - Value.Tuple [ Value.UnicodeChar 71866; Value.Integer Integer.U32 71898 ]; - Value.Tuple [ Value.UnicodeChar 71867; Value.Integer Integer.U32 71899 ]; - Value.Tuple [ Value.UnicodeChar 71868; Value.Integer Integer.U32 71900 ]; - Value.Tuple [ Value.UnicodeChar 71869; Value.Integer Integer.U32 71901 ]; - Value.Tuple [ Value.UnicodeChar 71870; Value.Integer Integer.U32 71902 ]; - Value.Tuple [ Value.UnicodeChar 71871; Value.Integer Integer.U32 71903 ]; - Value.Tuple [ Value.UnicodeChar 93760; Value.Integer Integer.U32 93792 ]; - Value.Tuple [ Value.UnicodeChar 93761; Value.Integer Integer.U32 93793 ]; - Value.Tuple [ Value.UnicodeChar 93762; Value.Integer Integer.U32 93794 ]; - Value.Tuple [ Value.UnicodeChar 93763; Value.Integer Integer.U32 93795 ]; - Value.Tuple [ Value.UnicodeChar 93764; Value.Integer Integer.U32 93796 ]; - Value.Tuple [ Value.UnicodeChar 93765; Value.Integer Integer.U32 93797 ]; - Value.Tuple [ Value.UnicodeChar 93766; Value.Integer Integer.U32 93798 ]; - Value.Tuple [ Value.UnicodeChar 93767; Value.Integer Integer.U32 93799 ]; - Value.Tuple [ Value.UnicodeChar 93768; Value.Integer Integer.U32 93800 ]; - Value.Tuple [ Value.UnicodeChar 93769; Value.Integer Integer.U32 93801 ]; - Value.Tuple [ Value.UnicodeChar 93770; Value.Integer Integer.U32 93802 ]; - Value.Tuple [ Value.UnicodeChar 93771; Value.Integer Integer.U32 93803 ]; - Value.Tuple [ Value.UnicodeChar 93772; Value.Integer Integer.U32 93804 ]; - Value.Tuple [ Value.UnicodeChar 93773; Value.Integer Integer.U32 93805 ]; - Value.Tuple [ Value.UnicodeChar 93774; Value.Integer Integer.U32 93806 ]; - Value.Tuple [ Value.UnicodeChar 93775; Value.Integer Integer.U32 93807 ]; - Value.Tuple [ Value.UnicodeChar 93776; Value.Integer Integer.U32 93808 ]; - Value.Tuple [ Value.UnicodeChar 93777; Value.Integer Integer.U32 93809 ]; - Value.Tuple [ Value.UnicodeChar 93778; Value.Integer Integer.U32 93810 ]; - Value.Tuple [ Value.UnicodeChar 93779; Value.Integer Integer.U32 93811 ]; - Value.Tuple [ Value.UnicodeChar 93780; Value.Integer Integer.U32 93812 ]; - Value.Tuple [ Value.UnicodeChar 93781; Value.Integer Integer.U32 93813 ]; - Value.Tuple [ Value.UnicodeChar 93782; Value.Integer Integer.U32 93814 ]; - Value.Tuple [ Value.UnicodeChar 93783; Value.Integer Integer.U32 93815 ]; - Value.Tuple [ Value.UnicodeChar 93784; Value.Integer Integer.U32 93816 ]; - Value.Tuple [ Value.UnicodeChar 93785; Value.Integer Integer.U32 93817 ]; - Value.Tuple [ Value.UnicodeChar 93786; Value.Integer Integer.U32 93818 ]; - Value.Tuple [ Value.UnicodeChar 93787; Value.Integer Integer.U32 93819 ]; - Value.Tuple [ Value.UnicodeChar 93788; Value.Integer Integer.U32 93820 ]; - Value.Tuple [ Value.UnicodeChar 93789; Value.Integer Integer.U32 93821 ]; - Value.Tuple [ Value.UnicodeChar 93790; Value.Integer Integer.U32 93822 ]; - Value.Tuple [ Value.UnicodeChar 93791; Value.Integer Integer.U32 93823 ]; - Value.Tuple [ Value.UnicodeChar 125184; Value.Integer Integer.U32 125218 ]; - Value.Tuple [ Value.UnicodeChar 125185; Value.Integer Integer.U32 125219 ]; - Value.Tuple [ Value.UnicodeChar 125186; Value.Integer Integer.U32 125220 ]; - Value.Tuple [ Value.UnicodeChar 125187; Value.Integer Integer.U32 125221 ]; - Value.Tuple [ Value.UnicodeChar 125188; Value.Integer Integer.U32 125222 ]; - Value.Tuple [ Value.UnicodeChar 125189; Value.Integer Integer.U32 125223 ]; - Value.Tuple [ Value.UnicodeChar 125190; Value.Integer Integer.U32 125224 ]; - Value.Tuple [ Value.UnicodeChar 125191; Value.Integer Integer.U32 125225 ]; - Value.Tuple [ Value.UnicodeChar 125192; Value.Integer Integer.U32 125226 ]; - Value.Tuple [ Value.UnicodeChar 125193; Value.Integer Integer.U32 125227 ]; - Value.Tuple [ Value.UnicodeChar 125194; Value.Integer Integer.U32 125228 ]; - Value.Tuple [ Value.UnicodeChar 125195; Value.Integer Integer.U32 125229 ]; - Value.Tuple [ Value.UnicodeChar 125196; Value.Integer Integer.U32 125230 ]; - Value.Tuple [ Value.UnicodeChar 125197; Value.Integer Integer.U32 125231 ]; - Value.Tuple [ Value.UnicodeChar 125198; Value.Integer Integer.U32 125232 ]; - Value.Tuple [ Value.UnicodeChar 125199; Value.Integer Integer.U32 125233 ]; - Value.Tuple [ Value.UnicodeChar 125200; Value.Integer Integer.U32 125234 ]; - Value.Tuple [ Value.UnicodeChar 125201; Value.Integer Integer.U32 125235 ]; - Value.Tuple [ Value.UnicodeChar 125202; Value.Integer Integer.U32 125236 ]; - Value.Tuple [ Value.UnicodeChar 125203; Value.Integer Integer.U32 125237 ]; - Value.Tuple [ Value.UnicodeChar 125204; Value.Integer Integer.U32 125238 ]; - Value.Tuple [ Value.UnicodeChar 125205; Value.Integer Integer.U32 125239 ]; - Value.Tuple [ Value.UnicodeChar 125206; Value.Integer Integer.U32 125240 ]; - Value.Tuple [ Value.UnicodeChar 125207; Value.Integer Integer.U32 125241 ]; - Value.Tuple [ Value.UnicodeChar 125208; Value.Integer Integer.U32 125242 ]; - Value.Tuple [ Value.UnicodeChar 125209; Value.Integer Integer.U32 125243 ]; - Value.Tuple [ Value.UnicodeChar 125210; Value.Integer Integer.U32 125244 ]; - Value.Tuple [ Value.UnicodeChar 125211; Value.Integer Integer.U32 125245 ]; - Value.Tuple [ Value.UnicodeChar 125212; Value.Integer Integer.U32 125246 ]; - Value.Tuple [ Value.UnicodeChar 125213; Value.Integer Integer.U32 125247 ]; - Value.Tuple [ Value.UnicodeChar 125214; Value.Integer Integer.U32 125248 ]; - Value.Tuple [ Value.UnicodeChar 125215; Value.Integer Integer.U32 125249 ]; - Value.Tuple [ Value.UnicodeChar 125216; Value.Integer Integer.U32 125250 ]; - Value.Tuple [ Value.UnicodeChar 125217; Value.Integer Integer.U32 125251 ] - ] - |)) - |) - |))). - - Definition value_LOWERCASE_TABLE_MULTI : Value.t := - M.run - ltac:(M.monadic - (M.alloc (| - M.alloc (| - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Array - [ Value.UnicodeChar 105; Value.UnicodeChar 775; Value.UnicodeChar 0 ] - ] - |)) - |) - |))). - - Definition value_UPPERCASE_TABLE : Value.t := + Definition value_LOWERCASE_TABLE : A.t := M.run ltac:(M.monadic (M.alloc (| M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Tuple [ Value.UnicodeChar 181; Value.Integer Integer.U32 924 ]; - Value.Tuple [ Value.UnicodeChar 223; Value.Integer Integer.U32 4194304 ]; - Value.Tuple [ Value.UnicodeChar 224; Value.Integer Integer.U32 192 ]; - Value.Tuple [ Value.UnicodeChar 225; Value.Integer Integer.U32 193 ]; - Value.Tuple [ Value.UnicodeChar 226; Value.Integer Integer.U32 194 ]; - Value.Tuple [ Value.UnicodeChar 227; Value.Integer Integer.U32 195 ]; - Value.Tuple [ Value.UnicodeChar 228; Value.Integer Integer.U32 196 ]; - Value.Tuple [ Value.UnicodeChar 229; Value.Integer Integer.U32 197 ]; - Value.Tuple [ Value.UnicodeChar 230; Value.Integer Integer.U32 198 ]; - Value.Tuple [ Value.UnicodeChar 231; Value.Integer Integer.U32 199 ]; - Value.Tuple [ Value.UnicodeChar 232; Value.Integer Integer.U32 200 ]; - Value.Tuple [ Value.UnicodeChar 233; Value.Integer Integer.U32 201 ]; - Value.Tuple [ Value.UnicodeChar 234; Value.Integer Integer.U32 202 ]; - Value.Tuple [ Value.UnicodeChar 235; Value.Integer Integer.U32 203 ]; - Value.Tuple [ Value.UnicodeChar 236; Value.Integer Integer.U32 204 ]; - Value.Tuple [ Value.UnicodeChar 237; Value.Integer Integer.U32 205 ]; - Value.Tuple [ Value.UnicodeChar 238; Value.Integer Integer.U32 206 ]; - Value.Tuple [ Value.UnicodeChar 239; Value.Integer Integer.U32 207 ]; - Value.Tuple [ Value.UnicodeChar 240; Value.Integer Integer.U32 208 ]; - Value.Tuple [ Value.UnicodeChar 241; Value.Integer Integer.U32 209 ]; - Value.Tuple [ Value.UnicodeChar 242; Value.Integer Integer.U32 210 ]; - Value.Tuple [ Value.UnicodeChar 243; Value.Integer Integer.U32 211 ]; - Value.Tuple [ Value.UnicodeChar 244; Value.Integer Integer.U32 212 ]; - Value.Tuple [ Value.UnicodeChar 245; Value.Integer Integer.U32 213 ]; - Value.Tuple [ Value.UnicodeChar 246; Value.Integer Integer.U32 214 ]; - Value.Tuple [ Value.UnicodeChar 248; Value.Integer Integer.U32 216 ]; - Value.Tuple [ Value.UnicodeChar 249; Value.Integer Integer.U32 217 ]; - Value.Tuple [ Value.UnicodeChar 250; Value.Integer Integer.U32 218 ]; - Value.Tuple [ Value.UnicodeChar 251; Value.Integer Integer.U32 219 ]; - Value.Tuple [ Value.UnicodeChar 252; Value.Integer Integer.U32 220 ]; - Value.Tuple [ Value.UnicodeChar 253; Value.Integer Integer.U32 221 ]; - Value.Tuple [ Value.UnicodeChar 254; Value.Integer Integer.U32 222 ]; - Value.Tuple [ Value.UnicodeChar 255; Value.Integer Integer.U32 376 ]; - Value.Tuple [ Value.UnicodeChar 257; Value.Integer Integer.U32 256 ]; - Value.Tuple [ Value.UnicodeChar 259; Value.Integer Integer.U32 258 ]; - Value.Tuple [ Value.UnicodeChar 261; Value.Integer Integer.U32 260 ]; - Value.Tuple [ Value.UnicodeChar 263; Value.Integer Integer.U32 262 ]; - Value.Tuple [ Value.UnicodeChar 265; Value.Integer Integer.U32 264 ]; - Value.Tuple [ Value.UnicodeChar 267; Value.Integer Integer.U32 266 ]; - Value.Tuple [ Value.UnicodeChar 269; Value.Integer Integer.U32 268 ]; - Value.Tuple [ Value.UnicodeChar 271; Value.Integer Integer.U32 270 ]; - Value.Tuple [ Value.UnicodeChar 273; Value.Integer Integer.U32 272 ]; - Value.Tuple [ Value.UnicodeChar 275; Value.Integer Integer.U32 274 ]; - Value.Tuple [ Value.UnicodeChar 277; Value.Integer Integer.U32 276 ]; - Value.Tuple [ Value.UnicodeChar 279; Value.Integer Integer.U32 278 ]; - Value.Tuple [ Value.UnicodeChar 281; Value.Integer Integer.U32 280 ]; - Value.Tuple [ Value.UnicodeChar 283; Value.Integer Integer.U32 282 ]; - Value.Tuple [ Value.UnicodeChar 285; Value.Integer Integer.U32 284 ]; - Value.Tuple [ Value.UnicodeChar 287; Value.Integer Integer.U32 286 ]; - Value.Tuple [ Value.UnicodeChar 289; Value.Integer Integer.U32 288 ]; - Value.Tuple [ Value.UnicodeChar 291; Value.Integer Integer.U32 290 ]; - Value.Tuple [ Value.UnicodeChar 293; Value.Integer Integer.U32 292 ]; - Value.Tuple [ Value.UnicodeChar 295; Value.Integer Integer.U32 294 ]; - Value.Tuple [ Value.UnicodeChar 297; Value.Integer Integer.U32 296 ]; - Value.Tuple [ Value.UnicodeChar 299; Value.Integer Integer.U32 298 ]; - Value.Tuple [ Value.UnicodeChar 301; Value.Integer Integer.U32 300 ]; - Value.Tuple [ Value.UnicodeChar 303; Value.Integer Integer.U32 302 ]; - Value.Tuple [ Value.UnicodeChar 305; Value.Integer Integer.U32 73 ]; - Value.Tuple [ Value.UnicodeChar 307; Value.Integer Integer.U32 306 ]; - Value.Tuple [ Value.UnicodeChar 309; Value.Integer Integer.U32 308 ]; - Value.Tuple [ Value.UnicodeChar 311; Value.Integer Integer.U32 310 ]; - Value.Tuple [ Value.UnicodeChar 314; Value.Integer Integer.U32 313 ]; - Value.Tuple [ Value.UnicodeChar 316; Value.Integer Integer.U32 315 ]; - Value.Tuple [ Value.UnicodeChar 318; Value.Integer Integer.U32 317 ]; - Value.Tuple [ Value.UnicodeChar 320; Value.Integer Integer.U32 319 ]; - Value.Tuple [ Value.UnicodeChar 322; Value.Integer Integer.U32 321 ]; - Value.Tuple [ Value.UnicodeChar 324; Value.Integer Integer.U32 323 ]; - Value.Tuple [ Value.UnicodeChar 326; Value.Integer Integer.U32 325 ]; - Value.Tuple [ Value.UnicodeChar 328; Value.Integer Integer.U32 327 ]; - Value.Tuple [ Value.UnicodeChar 329; Value.Integer Integer.U32 4194305 ]; - Value.Tuple [ Value.UnicodeChar 331; Value.Integer Integer.U32 330 ]; - Value.Tuple [ Value.UnicodeChar 333; Value.Integer Integer.U32 332 ]; - Value.Tuple [ Value.UnicodeChar 335; Value.Integer Integer.U32 334 ]; - Value.Tuple [ Value.UnicodeChar 337; Value.Integer Integer.U32 336 ]; - Value.Tuple [ Value.UnicodeChar 339; Value.Integer Integer.U32 338 ]; - Value.Tuple [ Value.UnicodeChar 341; Value.Integer Integer.U32 340 ]; - Value.Tuple [ Value.UnicodeChar 343; Value.Integer Integer.U32 342 ]; - Value.Tuple [ Value.UnicodeChar 345; Value.Integer Integer.U32 344 ]; - Value.Tuple [ Value.UnicodeChar 347; Value.Integer Integer.U32 346 ]; - Value.Tuple [ Value.UnicodeChar 349; Value.Integer Integer.U32 348 ]; - Value.Tuple [ Value.UnicodeChar 351; Value.Integer Integer.U32 350 ]; - Value.Tuple [ Value.UnicodeChar 353; Value.Integer Integer.U32 352 ]; - Value.Tuple [ Value.UnicodeChar 355; Value.Integer Integer.U32 354 ]; - Value.Tuple [ Value.UnicodeChar 357; Value.Integer Integer.U32 356 ]; - Value.Tuple [ Value.UnicodeChar 359; Value.Integer Integer.U32 358 ]; - Value.Tuple [ Value.UnicodeChar 361; Value.Integer Integer.U32 360 ]; - Value.Tuple [ Value.UnicodeChar 363; Value.Integer Integer.U32 362 ]; - Value.Tuple [ Value.UnicodeChar 365; Value.Integer Integer.U32 364 ]; - Value.Tuple [ Value.UnicodeChar 367; Value.Integer Integer.U32 366 ]; - Value.Tuple [ Value.UnicodeChar 369; Value.Integer Integer.U32 368 ]; - Value.Tuple [ Value.UnicodeChar 371; Value.Integer Integer.U32 370 ]; - Value.Tuple [ Value.UnicodeChar 373; Value.Integer Integer.U32 372 ]; - Value.Tuple [ Value.UnicodeChar 375; Value.Integer Integer.U32 374 ]; - Value.Tuple [ Value.UnicodeChar 378; Value.Integer Integer.U32 377 ]; - Value.Tuple [ Value.UnicodeChar 380; Value.Integer Integer.U32 379 ]; - Value.Tuple [ Value.UnicodeChar 382; Value.Integer Integer.U32 381 ]; - Value.Tuple [ Value.UnicodeChar 383; Value.Integer Integer.U32 83 ]; - Value.Tuple [ Value.UnicodeChar 384; Value.Integer Integer.U32 579 ]; - Value.Tuple [ Value.UnicodeChar 387; Value.Integer Integer.U32 386 ]; - Value.Tuple [ Value.UnicodeChar 389; Value.Integer Integer.U32 388 ]; - Value.Tuple [ Value.UnicodeChar 392; Value.Integer Integer.U32 391 ]; - Value.Tuple [ Value.UnicodeChar 396; Value.Integer Integer.U32 395 ]; - Value.Tuple [ Value.UnicodeChar 402; Value.Integer Integer.U32 401 ]; - Value.Tuple [ Value.UnicodeChar 405; Value.Integer Integer.U32 502 ]; - Value.Tuple [ Value.UnicodeChar 409; Value.Integer Integer.U32 408 ]; - Value.Tuple [ Value.UnicodeChar 410; Value.Integer Integer.U32 573 ]; - Value.Tuple [ Value.UnicodeChar 414; Value.Integer Integer.U32 544 ]; - Value.Tuple [ Value.UnicodeChar 417; Value.Integer Integer.U32 416 ]; - Value.Tuple [ Value.UnicodeChar 419; Value.Integer Integer.U32 418 ]; - Value.Tuple [ Value.UnicodeChar 421; Value.Integer Integer.U32 420 ]; - Value.Tuple [ Value.UnicodeChar 424; Value.Integer Integer.U32 423 ]; - Value.Tuple [ Value.UnicodeChar 429; Value.Integer Integer.U32 428 ]; - Value.Tuple [ Value.UnicodeChar 432; Value.Integer Integer.U32 431 ]; - Value.Tuple [ Value.UnicodeChar 436; Value.Integer Integer.U32 435 ]; - Value.Tuple [ Value.UnicodeChar 438; Value.Integer Integer.U32 437 ]; - Value.Tuple [ Value.UnicodeChar 441; Value.Integer Integer.U32 440 ]; - Value.Tuple [ Value.UnicodeChar 445; Value.Integer Integer.U32 444 ]; - Value.Tuple [ Value.UnicodeChar 447; Value.Integer Integer.U32 503 ]; - Value.Tuple [ Value.UnicodeChar 453; Value.Integer Integer.U32 452 ]; - Value.Tuple [ Value.UnicodeChar 454; Value.Integer Integer.U32 452 ]; - Value.Tuple [ Value.UnicodeChar 456; Value.Integer Integer.U32 455 ]; - Value.Tuple [ Value.UnicodeChar 457; Value.Integer Integer.U32 455 ]; - Value.Tuple [ Value.UnicodeChar 459; Value.Integer Integer.U32 458 ]; - Value.Tuple [ Value.UnicodeChar 460; Value.Integer Integer.U32 458 ]; - Value.Tuple [ Value.UnicodeChar 462; Value.Integer Integer.U32 461 ]; - Value.Tuple [ Value.UnicodeChar 464; Value.Integer Integer.U32 463 ]; - Value.Tuple [ Value.UnicodeChar 466; Value.Integer Integer.U32 465 ]; - Value.Tuple [ Value.UnicodeChar 468; Value.Integer Integer.U32 467 ]; - Value.Tuple [ Value.UnicodeChar 470; Value.Integer Integer.U32 469 ]; - Value.Tuple [ Value.UnicodeChar 472; Value.Integer Integer.U32 471 ]; - Value.Tuple [ Value.UnicodeChar 474; Value.Integer Integer.U32 473 ]; - Value.Tuple [ Value.UnicodeChar 476; Value.Integer Integer.U32 475 ]; - Value.Tuple [ Value.UnicodeChar 477; Value.Integer Integer.U32 398 ]; - Value.Tuple [ Value.UnicodeChar 479; Value.Integer Integer.U32 478 ]; - Value.Tuple [ Value.UnicodeChar 481; Value.Integer Integer.U32 480 ]; - Value.Tuple [ Value.UnicodeChar 483; Value.Integer Integer.U32 482 ]; - Value.Tuple [ Value.UnicodeChar 485; Value.Integer Integer.U32 484 ]; - Value.Tuple [ Value.UnicodeChar 487; Value.Integer Integer.U32 486 ]; - Value.Tuple [ Value.UnicodeChar 489; Value.Integer Integer.U32 488 ]; - Value.Tuple [ Value.UnicodeChar 491; Value.Integer Integer.U32 490 ]; - Value.Tuple [ Value.UnicodeChar 493; Value.Integer Integer.U32 492 ]; - Value.Tuple [ Value.UnicodeChar 495; Value.Integer Integer.U32 494 ]; - Value.Tuple [ Value.UnicodeChar 496; Value.Integer Integer.U32 4194306 ]; - Value.Tuple [ Value.UnicodeChar 498; Value.Integer Integer.U32 497 ]; - Value.Tuple [ Value.UnicodeChar 499; Value.Integer Integer.U32 497 ]; - Value.Tuple [ Value.UnicodeChar 501; Value.Integer Integer.U32 500 ]; - Value.Tuple [ Value.UnicodeChar 505; Value.Integer Integer.U32 504 ]; - Value.Tuple [ Value.UnicodeChar 507; Value.Integer Integer.U32 506 ]; - Value.Tuple [ Value.UnicodeChar 509; Value.Integer Integer.U32 508 ]; - Value.Tuple [ Value.UnicodeChar 511; Value.Integer Integer.U32 510 ]; - Value.Tuple [ Value.UnicodeChar 513; Value.Integer Integer.U32 512 ]; - Value.Tuple [ Value.UnicodeChar 515; Value.Integer Integer.U32 514 ]; - Value.Tuple [ Value.UnicodeChar 517; Value.Integer Integer.U32 516 ]; - Value.Tuple [ Value.UnicodeChar 519; Value.Integer Integer.U32 518 ]; - Value.Tuple [ Value.UnicodeChar 521; Value.Integer Integer.U32 520 ]; - Value.Tuple [ Value.UnicodeChar 523; Value.Integer Integer.U32 522 ]; - Value.Tuple [ Value.UnicodeChar 525; Value.Integer Integer.U32 524 ]; - Value.Tuple [ Value.UnicodeChar 527; Value.Integer Integer.U32 526 ]; - Value.Tuple [ Value.UnicodeChar 529; Value.Integer Integer.U32 528 ]; - Value.Tuple [ Value.UnicodeChar 531; Value.Integer Integer.U32 530 ]; - Value.Tuple [ Value.UnicodeChar 533; Value.Integer Integer.U32 532 ]; - Value.Tuple [ Value.UnicodeChar 535; Value.Integer Integer.U32 534 ]; - Value.Tuple [ Value.UnicodeChar 537; Value.Integer Integer.U32 536 ]; - Value.Tuple [ Value.UnicodeChar 539; Value.Integer Integer.U32 538 ]; - Value.Tuple [ Value.UnicodeChar 541; Value.Integer Integer.U32 540 ]; - Value.Tuple [ Value.UnicodeChar 543; Value.Integer Integer.U32 542 ]; - Value.Tuple [ Value.UnicodeChar 547; Value.Integer Integer.U32 546 ]; - Value.Tuple [ Value.UnicodeChar 549; Value.Integer Integer.U32 548 ]; - Value.Tuple [ Value.UnicodeChar 551; Value.Integer Integer.U32 550 ]; - Value.Tuple [ Value.UnicodeChar 553; Value.Integer Integer.U32 552 ]; - Value.Tuple [ Value.UnicodeChar 555; Value.Integer Integer.U32 554 ]; - Value.Tuple [ Value.UnicodeChar 557; Value.Integer Integer.U32 556 ]; - Value.Tuple [ Value.UnicodeChar 559; Value.Integer Integer.U32 558 ]; - Value.Tuple [ Value.UnicodeChar 561; Value.Integer Integer.U32 560 ]; - Value.Tuple [ Value.UnicodeChar 563; Value.Integer Integer.U32 562 ]; - Value.Tuple [ Value.UnicodeChar 572; Value.Integer Integer.U32 571 ]; - Value.Tuple [ Value.UnicodeChar 575; Value.Integer Integer.U32 11390 ]; - Value.Tuple [ Value.UnicodeChar 576; Value.Integer Integer.U32 11391 ]; - Value.Tuple [ Value.UnicodeChar 578; Value.Integer Integer.U32 577 ]; - Value.Tuple [ Value.UnicodeChar 583; Value.Integer Integer.U32 582 ]; - Value.Tuple [ Value.UnicodeChar 585; Value.Integer Integer.U32 584 ]; - Value.Tuple [ Value.UnicodeChar 587; Value.Integer Integer.U32 586 ]; - Value.Tuple [ Value.UnicodeChar 589; Value.Integer Integer.U32 588 ]; - Value.Tuple [ Value.UnicodeChar 591; Value.Integer Integer.U32 590 ]; - Value.Tuple [ Value.UnicodeChar 592; Value.Integer Integer.U32 11375 ]; - Value.Tuple [ Value.UnicodeChar 593; Value.Integer Integer.U32 11373 ]; - Value.Tuple [ Value.UnicodeChar 594; Value.Integer Integer.U32 11376 ]; - Value.Tuple [ Value.UnicodeChar 595; Value.Integer Integer.U32 385 ]; - Value.Tuple [ Value.UnicodeChar 596; Value.Integer Integer.U32 390 ]; - Value.Tuple [ Value.UnicodeChar 598; Value.Integer Integer.U32 393 ]; - Value.Tuple [ Value.UnicodeChar 599; Value.Integer Integer.U32 394 ]; - Value.Tuple [ Value.UnicodeChar 601; Value.Integer Integer.U32 399 ]; - Value.Tuple [ Value.UnicodeChar 603; Value.Integer Integer.U32 400 ]; - Value.Tuple [ Value.UnicodeChar 604; Value.Integer Integer.U32 42923 ]; - Value.Tuple [ Value.UnicodeChar 608; Value.Integer Integer.U32 403 ]; - Value.Tuple [ Value.UnicodeChar 609; Value.Integer Integer.U32 42924 ]; - Value.Tuple [ Value.UnicodeChar 611; Value.Integer Integer.U32 404 ]; - Value.Tuple [ Value.UnicodeChar 613; Value.Integer Integer.U32 42893 ]; - Value.Tuple [ Value.UnicodeChar 614; Value.Integer Integer.U32 42922 ]; - Value.Tuple [ Value.UnicodeChar 616; Value.Integer Integer.U32 407 ]; - Value.Tuple [ Value.UnicodeChar 617; Value.Integer Integer.U32 406 ]; - Value.Tuple [ Value.UnicodeChar 618; Value.Integer Integer.U32 42926 ]; - Value.Tuple [ Value.UnicodeChar 619; Value.Integer Integer.U32 11362 ]; - Value.Tuple [ Value.UnicodeChar 620; Value.Integer Integer.U32 42925 ]; - Value.Tuple [ Value.UnicodeChar 623; Value.Integer Integer.U32 412 ]; - Value.Tuple [ Value.UnicodeChar 625; Value.Integer Integer.U32 11374 ]; - Value.Tuple [ Value.UnicodeChar 626; Value.Integer Integer.U32 413 ]; - Value.Tuple [ Value.UnicodeChar 629; Value.Integer Integer.U32 415 ]; - Value.Tuple [ Value.UnicodeChar 637; Value.Integer Integer.U32 11364 ]; - Value.Tuple [ Value.UnicodeChar 640; Value.Integer Integer.U32 422 ]; - Value.Tuple [ Value.UnicodeChar 642; Value.Integer Integer.U32 42949 ]; - Value.Tuple [ Value.UnicodeChar 643; Value.Integer Integer.U32 425 ]; - Value.Tuple [ Value.UnicodeChar 647; Value.Integer Integer.U32 42929 ]; - Value.Tuple [ Value.UnicodeChar 648; Value.Integer Integer.U32 430 ]; - Value.Tuple [ Value.UnicodeChar 649; Value.Integer Integer.U32 580 ]; - Value.Tuple [ Value.UnicodeChar 650; Value.Integer Integer.U32 433 ]; - Value.Tuple [ Value.UnicodeChar 651; Value.Integer Integer.U32 434 ]; - Value.Tuple [ Value.UnicodeChar 652; Value.Integer Integer.U32 581 ]; - Value.Tuple [ Value.UnicodeChar 658; Value.Integer Integer.U32 439 ]; - Value.Tuple [ Value.UnicodeChar 669; Value.Integer Integer.U32 42930 ]; - Value.Tuple [ Value.UnicodeChar 670; Value.Integer Integer.U32 42928 ]; - Value.Tuple [ Value.UnicodeChar 837; Value.Integer Integer.U32 921 ]; - Value.Tuple [ Value.UnicodeChar 881; Value.Integer Integer.U32 880 ]; - Value.Tuple [ Value.UnicodeChar 883; Value.Integer Integer.U32 882 ]; - Value.Tuple [ Value.UnicodeChar 887; Value.Integer Integer.U32 886 ]; - Value.Tuple [ Value.UnicodeChar 891; Value.Integer Integer.U32 1021 ]; - Value.Tuple [ Value.UnicodeChar 892; Value.Integer Integer.U32 1022 ]; - Value.Tuple [ Value.UnicodeChar 893; Value.Integer Integer.U32 1023 ]; - Value.Tuple [ Value.UnicodeChar 912; Value.Integer Integer.U32 4194307 ]; - Value.Tuple [ Value.UnicodeChar 940; Value.Integer Integer.U32 902 ]; - Value.Tuple [ Value.UnicodeChar 941; Value.Integer Integer.U32 904 ]; - Value.Tuple [ Value.UnicodeChar 942; Value.Integer Integer.U32 905 ]; - Value.Tuple [ Value.UnicodeChar 943; Value.Integer Integer.U32 906 ]; - Value.Tuple [ Value.UnicodeChar 944; Value.Integer Integer.U32 4194308 ]; - Value.Tuple [ Value.UnicodeChar 945; Value.Integer Integer.U32 913 ]; - Value.Tuple [ Value.UnicodeChar 946; Value.Integer Integer.U32 914 ]; - Value.Tuple [ Value.UnicodeChar 947; Value.Integer Integer.U32 915 ]; - Value.Tuple [ Value.UnicodeChar 948; Value.Integer Integer.U32 916 ]; - Value.Tuple [ Value.UnicodeChar 949; Value.Integer Integer.U32 917 ]; - Value.Tuple [ Value.UnicodeChar 950; Value.Integer Integer.U32 918 ]; - Value.Tuple [ Value.UnicodeChar 951; Value.Integer Integer.U32 919 ]; - Value.Tuple [ Value.UnicodeChar 952; Value.Integer Integer.U32 920 ]; - Value.Tuple [ Value.UnicodeChar 953; Value.Integer Integer.U32 921 ]; - Value.Tuple [ Value.UnicodeChar 954; Value.Integer Integer.U32 922 ]; - Value.Tuple [ Value.UnicodeChar 955; Value.Integer Integer.U32 923 ]; - Value.Tuple [ Value.UnicodeChar 956; Value.Integer Integer.U32 924 ]; - Value.Tuple [ Value.UnicodeChar 957; Value.Integer Integer.U32 925 ]; - Value.Tuple [ Value.UnicodeChar 958; Value.Integer Integer.U32 926 ]; - Value.Tuple [ Value.UnicodeChar 959; Value.Integer Integer.U32 927 ]; - Value.Tuple [ Value.UnicodeChar 960; Value.Integer Integer.U32 928 ]; - Value.Tuple [ Value.UnicodeChar 961; Value.Integer Integer.U32 929 ]; - Value.Tuple [ Value.UnicodeChar 962; Value.Integer Integer.U32 931 ]; - Value.Tuple [ Value.UnicodeChar 963; Value.Integer Integer.U32 931 ]; - Value.Tuple [ Value.UnicodeChar 964; Value.Integer Integer.U32 932 ]; - Value.Tuple [ Value.UnicodeChar 965; Value.Integer Integer.U32 933 ]; - Value.Tuple [ Value.UnicodeChar 966; Value.Integer Integer.U32 934 ]; - Value.Tuple [ Value.UnicodeChar 967; Value.Integer Integer.U32 935 ]; - Value.Tuple [ Value.UnicodeChar 968; Value.Integer Integer.U32 936 ]; - Value.Tuple [ Value.UnicodeChar 969; Value.Integer Integer.U32 937 ]; - Value.Tuple [ Value.UnicodeChar 970; Value.Integer Integer.U32 938 ]; - Value.Tuple [ Value.UnicodeChar 971; Value.Integer Integer.U32 939 ]; - Value.Tuple [ Value.UnicodeChar 972; Value.Integer Integer.U32 908 ]; - Value.Tuple [ Value.UnicodeChar 973; Value.Integer Integer.U32 910 ]; - Value.Tuple [ Value.UnicodeChar 974; Value.Integer Integer.U32 911 ]; - Value.Tuple [ Value.UnicodeChar 976; Value.Integer Integer.U32 914 ]; - Value.Tuple [ Value.UnicodeChar 977; Value.Integer Integer.U32 920 ]; - Value.Tuple [ Value.UnicodeChar 981; Value.Integer Integer.U32 934 ]; - Value.Tuple [ Value.UnicodeChar 982; Value.Integer Integer.U32 928 ]; - Value.Tuple [ Value.UnicodeChar 983; Value.Integer Integer.U32 975 ]; - Value.Tuple [ Value.UnicodeChar 985; Value.Integer Integer.U32 984 ]; - Value.Tuple [ Value.UnicodeChar 987; Value.Integer Integer.U32 986 ]; - Value.Tuple [ Value.UnicodeChar 989; Value.Integer Integer.U32 988 ]; - Value.Tuple [ Value.UnicodeChar 991; Value.Integer Integer.U32 990 ]; - Value.Tuple [ Value.UnicodeChar 993; Value.Integer Integer.U32 992 ]; - Value.Tuple [ Value.UnicodeChar 995; Value.Integer Integer.U32 994 ]; - Value.Tuple [ Value.UnicodeChar 997; Value.Integer Integer.U32 996 ]; - Value.Tuple [ Value.UnicodeChar 999; Value.Integer Integer.U32 998 ]; - Value.Tuple [ Value.UnicodeChar 1001; Value.Integer Integer.U32 1000 ]; - Value.Tuple [ Value.UnicodeChar 1003; Value.Integer Integer.U32 1002 ]; - Value.Tuple [ Value.UnicodeChar 1005; Value.Integer Integer.U32 1004 ]; - Value.Tuple [ Value.UnicodeChar 1007; Value.Integer Integer.U32 1006 ]; - Value.Tuple [ Value.UnicodeChar 1008; Value.Integer Integer.U32 922 ]; - Value.Tuple [ Value.UnicodeChar 1009; Value.Integer Integer.U32 929 ]; - Value.Tuple [ Value.UnicodeChar 1010; Value.Integer Integer.U32 1017 ]; - Value.Tuple [ Value.UnicodeChar 1011; Value.Integer Integer.U32 895 ]; - Value.Tuple [ Value.UnicodeChar 1013; Value.Integer Integer.U32 917 ]; - Value.Tuple [ Value.UnicodeChar 1016; Value.Integer Integer.U32 1015 ]; - Value.Tuple [ Value.UnicodeChar 1019; Value.Integer Integer.U32 1018 ]; - Value.Tuple [ Value.UnicodeChar 1072; Value.Integer Integer.U32 1040 ]; - Value.Tuple [ Value.UnicodeChar 1073; Value.Integer Integer.U32 1041 ]; - Value.Tuple [ Value.UnicodeChar 1074; Value.Integer Integer.U32 1042 ]; - Value.Tuple [ Value.UnicodeChar 1075; Value.Integer Integer.U32 1043 ]; - Value.Tuple [ Value.UnicodeChar 1076; Value.Integer Integer.U32 1044 ]; - Value.Tuple [ Value.UnicodeChar 1077; Value.Integer Integer.U32 1045 ]; - Value.Tuple [ Value.UnicodeChar 1078; Value.Integer Integer.U32 1046 ]; - Value.Tuple [ Value.UnicodeChar 1079; Value.Integer Integer.U32 1047 ]; - Value.Tuple [ Value.UnicodeChar 1080; Value.Integer Integer.U32 1048 ]; - Value.Tuple [ Value.UnicodeChar 1081; Value.Integer Integer.U32 1049 ]; - Value.Tuple [ Value.UnicodeChar 1082; Value.Integer Integer.U32 1050 ]; - Value.Tuple [ Value.UnicodeChar 1083; Value.Integer Integer.U32 1051 ]; - Value.Tuple [ Value.UnicodeChar 1084; Value.Integer Integer.U32 1052 ]; - Value.Tuple [ Value.UnicodeChar 1085; Value.Integer Integer.U32 1053 ]; - Value.Tuple [ Value.UnicodeChar 1086; Value.Integer Integer.U32 1054 ]; - Value.Tuple [ Value.UnicodeChar 1087; Value.Integer Integer.U32 1055 ]; - Value.Tuple [ Value.UnicodeChar 1088; Value.Integer Integer.U32 1056 ]; - Value.Tuple [ Value.UnicodeChar 1089; Value.Integer Integer.U32 1057 ]; - Value.Tuple [ Value.UnicodeChar 1090; Value.Integer Integer.U32 1058 ]; - Value.Tuple [ Value.UnicodeChar 1091; Value.Integer Integer.U32 1059 ]; - Value.Tuple [ Value.UnicodeChar 1092; Value.Integer Integer.U32 1060 ]; - Value.Tuple [ Value.UnicodeChar 1093; Value.Integer Integer.U32 1061 ]; - Value.Tuple [ Value.UnicodeChar 1094; Value.Integer Integer.U32 1062 ]; - Value.Tuple [ Value.UnicodeChar 1095; Value.Integer Integer.U32 1063 ]; - Value.Tuple [ Value.UnicodeChar 1096; Value.Integer Integer.U32 1064 ]; - Value.Tuple [ Value.UnicodeChar 1097; Value.Integer Integer.U32 1065 ]; - Value.Tuple [ Value.UnicodeChar 1098; Value.Integer Integer.U32 1066 ]; - Value.Tuple [ Value.UnicodeChar 1099; Value.Integer Integer.U32 1067 ]; - Value.Tuple [ Value.UnicodeChar 1100; Value.Integer Integer.U32 1068 ]; - Value.Tuple [ Value.UnicodeChar 1101; Value.Integer Integer.U32 1069 ]; - Value.Tuple [ Value.UnicodeChar 1102; Value.Integer Integer.U32 1070 ]; - Value.Tuple [ Value.UnicodeChar 1103; Value.Integer Integer.U32 1071 ]; - Value.Tuple [ Value.UnicodeChar 1104; Value.Integer Integer.U32 1024 ]; - Value.Tuple [ Value.UnicodeChar 1105; Value.Integer Integer.U32 1025 ]; - Value.Tuple [ Value.UnicodeChar 1106; Value.Integer Integer.U32 1026 ]; - Value.Tuple [ Value.UnicodeChar 1107; Value.Integer Integer.U32 1027 ]; - Value.Tuple [ Value.UnicodeChar 1108; Value.Integer Integer.U32 1028 ]; - Value.Tuple [ Value.UnicodeChar 1109; Value.Integer Integer.U32 1029 ]; - Value.Tuple [ Value.UnicodeChar 1110; Value.Integer Integer.U32 1030 ]; - Value.Tuple [ Value.UnicodeChar 1111; Value.Integer Integer.U32 1031 ]; - Value.Tuple [ Value.UnicodeChar 1112; Value.Integer Integer.U32 1032 ]; - Value.Tuple [ Value.UnicodeChar 1113; Value.Integer Integer.U32 1033 ]; - Value.Tuple [ Value.UnicodeChar 1114; Value.Integer Integer.U32 1034 ]; - Value.Tuple [ Value.UnicodeChar 1115; Value.Integer Integer.U32 1035 ]; - Value.Tuple [ Value.UnicodeChar 1116; Value.Integer Integer.U32 1036 ]; - Value.Tuple [ Value.UnicodeChar 1117; Value.Integer Integer.U32 1037 ]; - Value.Tuple [ Value.UnicodeChar 1118; Value.Integer Integer.U32 1038 ]; - Value.Tuple [ Value.UnicodeChar 1119; Value.Integer Integer.U32 1039 ]; - Value.Tuple [ Value.UnicodeChar 1121; Value.Integer Integer.U32 1120 ]; - Value.Tuple [ Value.UnicodeChar 1123; Value.Integer Integer.U32 1122 ]; - Value.Tuple [ Value.UnicodeChar 1125; Value.Integer Integer.U32 1124 ]; - Value.Tuple [ Value.UnicodeChar 1127; Value.Integer Integer.U32 1126 ]; - Value.Tuple [ Value.UnicodeChar 1129; Value.Integer Integer.U32 1128 ]; - Value.Tuple [ Value.UnicodeChar 1131; Value.Integer Integer.U32 1130 ]; - Value.Tuple [ Value.UnicodeChar 1133; Value.Integer Integer.U32 1132 ]; - Value.Tuple [ Value.UnicodeChar 1135; Value.Integer Integer.U32 1134 ]; - Value.Tuple [ Value.UnicodeChar 1137; Value.Integer Integer.U32 1136 ]; - Value.Tuple [ Value.UnicodeChar 1139; Value.Integer Integer.U32 1138 ]; - Value.Tuple [ Value.UnicodeChar 1141; Value.Integer Integer.U32 1140 ]; - Value.Tuple [ Value.UnicodeChar 1143; Value.Integer Integer.U32 1142 ]; - Value.Tuple [ Value.UnicodeChar 1145; Value.Integer Integer.U32 1144 ]; - Value.Tuple [ Value.UnicodeChar 1147; Value.Integer Integer.U32 1146 ]; - Value.Tuple [ Value.UnicodeChar 1149; Value.Integer Integer.U32 1148 ]; - Value.Tuple [ Value.UnicodeChar 1151; Value.Integer Integer.U32 1150 ]; - Value.Tuple [ Value.UnicodeChar 1153; Value.Integer Integer.U32 1152 ]; - Value.Tuple [ Value.UnicodeChar 1163; Value.Integer Integer.U32 1162 ]; - Value.Tuple [ Value.UnicodeChar 1165; Value.Integer Integer.U32 1164 ]; - Value.Tuple [ Value.UnicodeChar 1167; Value.Integer Integer.U32 1166 ]; - Value.Tuple [ Value.UnicodeChar 1169; Value.Integer Integer.U32 1168 ]; - Value.Tuple [ Value.UnicodeChar 1171; Value.Integer Integer.U32 1170 ]; - Value.Tuple [ Value.UnicodeChar 1173; Value.Integer Integer.U32 1172 ]; - Value.Tuple [ Value.UnicodeChar 1175; Value.Integer Integer.U32 1174 ]; - Value.Tuple [ Value.UnicodeChar 1177; Value.Integer Integer.U32 1176 ]; - Value.Tuple [ Value.UnicodeChar 1179; Value.Integer Integer.U32 1178 ]; - Value.Tuple [ Value.UnicodeChar 1181; Value.Integer Integer.U32 1180 ]; - Value.Tuple [ Value.UnicodeChar 1183; Value.Integer Integer.U32 1182 ]; - Value.Tuple [ Value.UnicodeChar 1185; Value.Integer Integer.U32 1184 ]; - Value.Tuple [ Value.UnicodeChar 1187; Value.Integer Integer.U32 1186 ]; - Value.Tuple [ Value.UnicodeChar 1189; Value.Integer Integer.U32 1188 ]; - Value.Tuple [ Value.UnicodeChar 1191; Value.Integer Integer.U32 1190 ]; - Value.Tuple [ Value.UnicodeChar 1193; Value.Integer Integer.U32 1192 ]; - Value.Tuple [ Value.UnicodeChar 1195; Value.Integer Integer.U32 1194 ]; - Value.Tuple [ Value.UnicodeChar 1197; Value.Integer Integer.U32 1196 ]; - Value.Tuple [ Value.UnicodeChar 1199; Value.Integer Integer.U32 1198 ]; - Value.Tuple [ Value.UnicodeChar 1201; Value.Integer Integer.U32 1200 ]; - Value.Tuple [ Value.UnicodeChar 1203; Value.Integer Integer.U32 1202 ]; - Value.Tuple [ Value.UnicodeChar 1205; Value.Integer Integer.U32 1204 ]; - Value.Tuple [ Value.UnicodeChar 1207; Value.Integer Integer.U32 1206 ]; - Value.Tuple [ Value.UnicodeChar 1209; Value.Integer Integer.U32 1208 ]; - Value.Tuple [ Value.UnicodeChar 1211; Value.Integer Integer.U32 1210 ]; - Value.Tuple [ Value.UnicodeChar 1213; Value.Integer Integer.U32 1212 ]; - Value.Tuple [ Value.UnicodeChar 1215; Value.Integer Integer.U32 1214 ]; - Value.Tuple [ Value.UnicodeChar 1218; Value.Integer Integer.U32 1217 ]; - Value.Tuple [ Value.UnicodeChar 1220; Value.Integer Integer.U32 1219 ]; - Value.Tuple [ Value.UnicodeChar 1222; Value.Integer Integer.U32 1221 ]; - Value.Tuple [ Value.UnicodeChar 1224; Value.Integer Integer.U32 1223 ]; - Value.Tuple [ Value.UnicodeChar 1226; Value.Integer Integer.U32 1225 ]; - Value.Tuple [ Value.UnicodeChar 1228; Value.Integer Integer.U32 1227 ]; - Value.Tuple [ Value.UnicodeChar 1230; Value.Integer Integer.U32 1229 ]; - Value.Tuple [ Value.UnicodeChar 1231; Value.Integer Integer.U32 1216 ]; - Value.Tuple [ Value.UnicodeChar 1233; Value.Integer Integer.U32 1232 ]; - Value.Tuple [ Value.UnicodeChar 1235; Value.Integer Integer.U32 1234 ]; - Value.Tuple [ Value.UnicodeChar 1237; Value.Integer Integer.U32 1236 ]; - Value.Tuple [ Value.UnicodeChar 1239; Value.Integer Integer.U32 1238 ]; - Value.Tuple [ Value.UnicodeChar 1241; Value.Integer Integer.U32 1240 ]; - Value.Tuple [ Value.UnicodeChar 1243; Value.Integer Integer.U32 1242 ]; - Value.Tuple [ Value.UnicodeChar 1245; Value.Integer Integer.U32 1244 ]; - Value.Tuple [ Value.UnicodeChar 1247; Value.Integer Integer.U32 1246 ]; - Value.Tuple [ Value.UnicodeChar 1249; Value.Integer Integer.U32 1248 ]; - Value.Tuple [ Value.UnicodeChar 1251; Value.Integer Integer.U32 1250 ]; - Value.Tuple [ Value.UnicodeChar 1253; Value.Integer Integer.U32 1252 ]; - Value.Tuple [ Value.UnicodeChar 1255; Value.Integer Integer.U32 1254 ]; - Value.Tuple [ Value.UnicodeChar 1257; Value.Integer Integer.U32 1256 ]; - Value.Tuple [ Value.UnicodeChar 1259; Value.Integer Integer.U32 1258 ]; - Value.Tuple [ Value.UnicodeChar 1261; Value.Integer Integer.U32 1260 ]; - Value.Tuple [ Value.UnicodeChar 1263; Value.Integer Integer.U32 1262 ]; - Value.Tuple [ Value.UnicodeChar 1265; Value.Integer Integer.U32 1264 ]; - Value.Tuple [ Value.UnicodeChar 1267; Value.Integer Integer.U32 1266 ]; - Value.Tuple [ Value.UnicodeChar 1269; Value.Integer Integer.U32 1268 ]; - Value.Tuple [ Value.UnicodeChar 1271; Value.Integer Integer.U32 1270 ]; - Value.Tuple [ Value.UnicodeChar 1273; Value.Integer Integer.U32 1272 ]; - Value.Tuple [ Value.UnicodeChar 1275; Value.Integer Integer.U32 1274 ]; - Value.Tuple [ Value.UnicodeChar 1277; Value.Integer Integer.U32 1276 ]; - Value.Tuple [ Value.UnicodeChar 1279; Value.Integer Integer.U32 1278 ]; - Value.Tuple [ Value.UnicodeChar 1281; Value.Integer Integer.U32 1280 ]; - Value.Tuple [ Value.UnicodeChar 1283; Value.Integer Integer.U32 1282 ]; - Value.Tuple [ Value.UnicodeChar 1285; Value.Integer Integer.U32 1284 ]; - Value.Tuple [ Value.UnicodeChar 1287; Value.Integer Integer.U32 1286 ]; - Value.Tuple [ Value.UnicodeChar 1289; Value.Integer Integer.U32 1288 ]; - Value.Tuple [ Value.UnicodeChar 1291; Value.Integer Integer.U32 1290 ]; - Value.Tuple [ Value.UnicodeChar 1293; Value.Integer Integer.U32 1292 ]; - Value.Tuple [ Value.UnicodeChar 1295; Value.Integer Integer.U32 1294 ]; - Value.Tuple [ Value.UnicodeChar 1297; Value.Integer Integer.U32 1296 ]; - Value.Tuple [ Value.UnicodeChar 1299; Value.Integer Integer.U32 1298 ]; - Value.Tuple [ Value.UnicodeChar 1301; Value.Integer Integer.U32 1300 ]; - Value.Tuple [ Value.UnicodeChar 1303; Value.Integer Integer.U32 1302 ]; - Value.Tuple [ Value.UnicodeChar 1305; Value.Integer Integer.U32 1304 ]; - Value.Tuple [ Value.UnicodeChar 1307; Value.Integer Integer.U32 1306 ]; - Value.Tuple [ Value.UnicodeChar 1309; Value.Integer Integer.U32 1308 ]; - Value.Tuple [ Value.UnicodeChar 1311; Value.Integer Integer.U32 1310 ]; - Value.Tuple [ Value.UnicodeChar 1313; Value.Integer Integer.U32 1312 ]; - Value.Tuple [ Value.UnicodeChar 1315; Value.Integer Integer.U32 1314 ]; - Value.Tuple [ Value.UnicodeChar 1317; Value.Integer Integer.U32 1316 ]; - Value.Tuple [ Value.UnicodeChar 1319; Value.Integer Integer.U32 1318 ]; - Value.Tuple [ Value.UnicodeChar 1321; Value.Integer Integer.U32 1320 ]; - Value.Tuple [ Value.UnicodeChar 1323; Value.Integer Integer.U32 1322 ]; - Value.Tuple [ Value.UnicodeChar 1325; Value.Integer Integer.U32 1324 ]; - Value.Tuple [ Value.UnicodeChar 1327; Value.Integer Integer.U32 1326 ]; - Value.Tuple [ Value.UnicodeChar 1377; Value.Integer Integer.U32 1329 ]; - Value.Tuple [ Value.UnicodeChar 1378; Value.Integer Integer.U32 1330 ]; - Value.Tuple [ Value.UnicodeChar 1379; Value.Integer Integer.U32 1331 ]; - Value.Tuple [ Value.UnicodeChar 1380; Value.Integer Integer.U32 1332 ]; - Value.Tuple [ Value.UnicodeChar 1381; Value.Integer Integer.U32 1333 ]; - Value.Tuple [ Value.UnicodeChar 1382; Value.Integer Integer.U32 1334 ]; - Value.Tuple [ Value.UnicodeChar 1383; Value.Integer Integer.U32 1335 ]; - Value.Tuple [ Value.UnicodeChar 1384; Value.Integer Integer.U32 1336 ]; - Value.Tuple [ Value.UnicodeChar 1385; Value.Integer Integer.U32 1337 ]; - Value.Tuple [ Value.UnicodeChar 1386; Value.Integer Integer.U32 1338 ]; - Value.Tuple [ Value.UnicodeChar 1387; Value.Integer Integer.U32 1339 ]; - Value.Tuple [ Value.UnicodeChar 1388; Value.Integer Integer.U32 1340 ]; - Value.Tuple [ Value.UnicodeChar 1389; Value.Integer Integer.U32 1341 ]; - Value.Tuple [ Value.UnicodeChar 1390; Value.Integer Integer.U32 1342 ]; - Value.Tuple [ Value.UnicodeChar 1391; Value.Integer Integer.U32 1343 ]; - Value.Tuple [ Value.UnicodeChar 1392; Value.Integer Integer.U32 1344 ]; - Value.Tuple [ Value.UnicodeChar 1393; Value.Integer Integer.U32 1345 ]; - Value.Tuple [ Value.UnicodeChar 1394; Value.Integer Integer.U32 1346 ]; - Value.Tuple [ Value.UnicodeChar 1395; Value.Integer Integer.U32 1347 ]; - Value.Tuple [ Value.UnicodeChar 1396; Value.Integer Integer.U32 1348 ]; - Value.Tuple [ Value.UnicodeChar 1397; Value.Integer Integer.U32 1349 ]; - Value.Tuple [ Value.UnicodeChar 1398; Value.Integer Integer.U32 1350 ]; - Value.Tuple [ Value.UnicodeChar 1399; Value.Integer Integer.U32 1351 ]; - Value.Tuple [ Value.UnicodeChar 1400; Value.Integer Integer.U32 1352 ]; - Value.Tuple [ Value.UnicodeChar 1401; Value.Integer Integer.U32 1353 ]; - Value.Tuple [ Value.UnicodeChar 1402; Value.Integer Integer.U32 1354 ]; - Value.Tuple [ Value.UnicodeChar 1403; Value.Integer Integer.U32 1355 ]; - Value.Tuple [ Value.UnicodeChar 1404; Value.Integer Integer.U32 1356 ]; - Value.Tuple [ Value.UnicodeChar 1405; Value.Integer Integer.U32 1357 ]; - Value.Tuple [ Value.UnicodeChar 1406; Value.Integer Integer.U32 1358 ]; - Value.Tuple [ Value.UnicodeChar 1407; Value.Integer Integer.U32 1359 ]; - Value.Tuple [ Value.UnicodeChar 1408; Value.Integer Integer.U32 1360 ]; - Value.Tuple [ Value.UnicodeChar 1409; Value.Integer Integer.U32 1361 ]; - Value.Tuple [ Value.UnicodeChar 1410; Value.Integer Integer.U32 1362 ]; - Value.Tuple [ Value.UnicodeChar 1411; Value.Integer Integer.U32 1363 ]; - Value.Tuple [ Value.UnicodeChar 1412; Value.Integer Integer.U32 1364 ]; - Value.Tuple [ Value.UnicodeChar 1413; Value.Integer Integer.U32 1365 ]; - Value.Tuple [ Value.UnicodeChar 1414; Value.Integer Integer.U32 1366 ]; - Value.Tuple [ Value.UnicodeChar 1415; Value.Integer Integer.U32 4194309 ]; - Value.Tuple [ Value.UnicodeChar 4304; Value.Integer Integer.U32 7312 ]; - Value.Tuple [ Value.UnicodeChar 4305; Value.Integer Integer.U32 7313 ]; - Value.Tuple [ Value.UnicodeChar 4306; Value.Integer Integer.U32 7314 ]; - Value.Tuple [ Value.UnicodeChar 4307; Value.Integer Integer.U32 7315 ]; - Value.Tuple [ Value.UnicodeChar 4308; Value.Integer Integer.U32 7316 ]; - Value.Tuple [ Value.UnicodeChar 4309; Value.Integer Integer.U32 7317 ]; - Value.Tuple [ Value.UnicodeChar 4310; Value.Integer Integer.U32 7318 ]; - Value.Tuple [ Value.UnicodeChar 4311; Value.Integer Integer.U32 7319 ]; - Value.Tuple [ Value.UnicodeChar 4312; Value.Integer Integer.U32 7320 ]; - Value.Tuple [ Value.UnicodeChar 4313; Value.Integer Integer.U32 7321 ]; - Value.Tuple [ Value.UnicodeChar 4314; Value.Integer Integer.U32 7322 ]; - Value.Tuple [ Value.UnicodeChar 4315; Value.Integer Integer.U32 7323 ]; - Value.Tuple [ Value.UnicodeChar 4316; Value.Integer Integer.U32 7324 ]; - Value.Tuple [ Value.UnicodeChar 4317; Value.Integer Integer.U32 7325 ]; - Value.Tuple [ Value.UnicodeChar 4318; Value.Integer Integer.U32 7326 ]; - Value.Tuple [ Value.UnicodeChar 4319; Value.Integer Integer.U32 7327 ]; - Value.Tuple [ Value.UnicodeChar 4320; Value.Integer Integer.U32 7328 ]; - Value.Tuple [ Value.UnicodeChar 4321; Value.Integer Integer.U32 7329 ]; - Value.Tuple [ Value.UnicodeChar 4322; Value.Integer Integer.U32 7330 ]; - Value.Tuple [ Value.UnicodeChar 4323; Value.Integer Integer.U32 7331 ]; - Value.Tuple [ Value.UnicodeChar 4324; Value.Integer Integer.U32 7332 ]; - Value.Tuple [ Value.UnicodeChar 4325; Value.Integer Integer.U32 7333 ]; - Value.Tuple [ Value.UnicodeChar 4326; Value.Integer Integer.U32 7334 ]; - Value.Tuple [ Value.UnicodeChar 4327; Value.Integer Integer.U32 7335 ]; - Value.Tuple [ Value.UnicodeChar 4328; Value.Integer Integer.U32 7336 ]; - Value.Tuple [ Value.UnicodeChar 4329; Value.Integer Integer.U32 7337 ]; - Value.Tuple [ Value.UnicodeChar 4330; Value.Integer Integer.U32 7338 ]; - Value.Tuple [ Value.UnicodeChar 4331; Value.Integer Integer.U32 7339 ]; - Value.Tuple [ Value.UnicodeChar 4332; Value.Integer Integer.U32 7340 ]; - Value.Tuple [ Value.UnicodeChar 4333; Value.Integer Integer.U32 7341 ]; - Value.Tuple [ Value.UnicodeChar 4334; Value.Integer Integer.U32 7342 ]; - Value.Tuple [ Value.UnicodeChar 4335; Value.Integer Integer.U32 7343 ]; - Value.Tuple [ Value.UnicodeChar 4336; Value.Integer Integer.U32 7344 ]; - Value.Tuple [ Value.UnicodeChar 4337; Value.Integer Integer.U32 7345 ]; - Value.Tuple [ Value.UnicodeChar 4338; Value.Integer Integer.U32 7346 ]; - Value.Tuple [ Value.UnicodeChar 4339; Value.Integer Integer.U32 7347 ]; - Value.Tuple [ Value.UnicodeChar 4340; Value.Integer Integer.U32 7348 ]; - Value.Tuple [ Value.UnicodeChar 4341; Value.Integer Integer.U32 7349 ]; - Value.Tuple [ Value.UnicodeChar 4342; Value.Integer Integer.U32 7350 ]; - Value.Tuple [ Value.UnicodeChar 4343; Value.Integer Integer.U32 7351 ]; - Value.Tuple [ Value.UnicodeChar 4344; Value.Integer Integer.U32 7352 ]; - Value.Tuple [ Value.UnicodeChar 4345; Value.Integer Integer.U32 7353 ]; - Value.Tuple [ Value.UnicodeChar 4346; Value.Integer Integer.U32 7354 ]; - Value.Tuple [ Value.UnicodeChar 4349; Value.Integer Integer.U32 7357 ]; - Value.Tuple [ Value.UnicodeChar 4350; Value.Integer Integer.U32 7358 ]; - Value.Tuple [ Value.UnicodeChar 4351; Value.Integer Integer.U32 7359 ]; - Value.Tuple [ Value.UnicodeChar 5112; Value.Integer Integer.U32 5104 ]; - Value.Tuple [ Value.UnicodeChar 5113; Value.Integer Integer.U32 5105 ]; - Value.Tuple [ Value.UnicodeChar 5114; Value.Integer Integer.U32 5106 ]; - Value.Tuple [ Value.UnicodeChar 5115; Value.Integer Integer.U32 5107 ]; - Value.Tuple [ Value.UnicodeChar 5116; Value.Integer Integer.U32 5108 ]; - Value.Tuple [ Value.UnicodeChar 5117; Value.Integer Integer.U32 5109 ]; - Value.Tuple [ Value.UnicodeChar 7296; Value.Integer Integer.U32 1042 ]; - Value.Tuple [ Value.UnicodeChar 7297; Value.Integer Integer.U32 1044 ]; - Value.Tuple [ Value.UnicodeChar 7298; Value.Integer Integer.U32 1054 ]; - Value.Tuple [ Value.UnicodeChar 7299; Value.Integer Integer.U32 1057 ]; - Value.Tuple [ Value.UnicodeChar 7300; Value.Integer Integer.U32 1058 ]; - Value.Tuple [ Value.UnicodeChar 7301; Value.Integer Integer.U32 1058 ]; - Value.Tuple [ Value.UnicodeChar 7302; Value.Integer Integer.U32 1066 ]; - Value.Tuple [ Value.UnicodeChar 7303; Value.Integer Integer.U32 1122 ]; - Value.Tuple [ Value.UnicodeChar 7304; Value.Integer Integer.U32 42570 ]; - Value.Tuple [ Value.UnicodeChar 7545; Value.Integer Integer.U32 42877 ]; - Value.Tuple [ Value.UnicodeChar 7549; Value.Integer Integer.U32 11363 ]; - Value.Tuple [ Value.UnicodeChar 7566; Value.Integer Integer.U32 42950 ]; - Value.Tuple [ Value.UnicodeChar 7681; Value.Integer Integer.U32 7680 ]; - Value.Tuple [ Value.UnicodeChar 7683; Value.Integer Integer.U32 7682 ]; - Value.Tuple [ Value.UnicodeChar 7685; Value.Integer Integer.U32 7684 ]; - Value.Tuple [ Value.UnicodeChar 7687; Value.Integer Integer.U32 7686 ]; - Value.Tuple [ Value.UnicodeChar 7689; Value.Integer Integer.U32 7688 ]; - Value.Tuple [ Value.UnicodeChar 7691; Value.Integer Integer.U32 7690 ]; - Value.Tuple [ Value.UnicodeChar 7693; Value.Integer Integer.U32 7692 ]; - Value.Tuple [ Value.UnicodeChar 7695; Value.Integer Integer.U32 7694 ]; - Value.Tuple [ Value.UnicodeChar 7697; Value.Integer Integer.U32 7696 ]; - Value.Tuple [ Value.UnicodeChar 7699; Value.Integer Integer.U32 7698 ]; - Value.Tuple [ Value.UnicodeChar 7701; Value.Integer Integer.U32 7700 ]; - Value.Tuple [ Value.UnicodeChar 7703; Value.Integer Integer.U32 7702 ]; - Value.Tuple [ Value.UnicodeChar 7705; Value.Integer Integer.U32 7704 ]; - Value.Tuple [ Value.UnicodeChar 7707; Value.Integer Integer.U32 7706 ]; - Value.Tuple [ Value.UnicodeChar 7709; Value.Integer Integer.U32 7708 ]; - Value.Tuple [ Value.UnicodeChar 7711; Value.Integer Integer.U32 7710 ]; - Value.Tuple [ Value.UnicodeChar 7713; Value.Integer Integer.U32 7712 ]; - Value.Tuple [ Value.UnicodeChar 7715; Value.Integer Integer.U32 7714 ]; - Value.Tuple [ Value.UnicodeChar 7717; Value.Integer Integer.U32 7716 ]; - Value.Tuple [ Value.UnicodeChar 7719; Value.Integer Integer.U32 7718 ]; - Value.Tuple [ Value.UnicodeChar 7721; Value.Integer Integer.U32 7720 ]; - Value.Tuple [ Value.UnicodeChar 7723; Value.Integer Integer.U32 7722 ]; - Value.Tuple [ Value.UnicodeChar 7725; Value.Integer Integer.U32 7724 ]; - Value.Tuple [ Value.UnicodeChar 7727; Value.Integer Integer.U32 7726 ]; - Value.Tuple [ Value.UnicodeChar 7729; Value.Integer Integer.U32 7728 ]; - Value.Tuple [ Value.UnicodeChar 7731; Value.Integer Integer.U32 7730 ]; - Value.Tuple [ Value.UnicodeChar 7733; Value.Integer Integer.U32 7732 ]; - Value.Tuple [ Value.UnicodeChar 7735; Value.Integer Integer.U32 7734 ]; - Value.Tuple [ Value.UnicodeChar 7737; Value.Integer Integer.U32 7736 ]; - Value.Tuple [ Value.UnicodeChar 7739; Value.Integer Integer.U32 7738 ]; - Value.Tuple [ Value.UnicodeChar 7741; Value.Integer Integer.U32 7740 ]; - Value.Tuple [ Value.UnicodeChar 7743; Value.Integer Integer.U32 7742 ]; - Value.Tuple [ Value.UnicodeChar 7745; Value.Integer Integer.U32 7744 ]; - Value.Tuple [ Value.UnicodeChar 7747; Value.Integer Integer.U32 7746 ]; - Value.Tuple [ Value.UnicodeChar 7749; Value.Integer Integer.U32 7748 ]; - Value.Tuple [ Value.UnicodeChar 7751; Value.Integer Integer.U32 7750 ]; - Value.Tuple [ Value.UnicodeChar 7753; Value.Integer Integer.U32 7752 ]; - Value.Tuple [ Value.UnicodeChar 7755; Value.Integer Integer.U32 7754 ]; - Value.Tuple [ Value.UnicodeChar 7757; Value.Integer Integer.U32 7756 ]; - Value.Tuple [ Value.UnicodeChar 7759; Value.Integer Integer.U32 7758 ]; - Value.Tuple [ Value.UnicodeChar 7761; Value.Integer Integer.U32 7760 ]; - Value.Tuple [ Value.UnicodeChar 7763; Value.Integer Integer.U32 7762 ]; - Value.Tuple [ Value.UnicodeChar 7765; Value.Integer Integer.U32 7764 ]; - Value.Tuple [ Value.UnicodeChar 7767; Value.Integer Integer.U32 7766 ]; - Value.Tuple [ Value.UnicodeChar 7769; Value.Integer Integer.U32 7768 ]; - Value.Tuple [ Value.UnicodeChar 7771; Value.Integer Integer.U32 7770 ]; - Value.Tuple [ Value.UnicodeChar 7773; Value.Integer Integer.U32 7772 ]; - Value.Tuple [ Value.UnicodeChar 7775; Value.Integer Integer.U32 7774 ]; - Value.Tuple [ Value.UnicodeChar 7777; Value.Integer Integer.U32 7776 ]; - Value.Tuple [ Value.UnicodeChar 7779; Value.Integer Integer.U32 7778 ]; - Value.Tuple [ Value.UnicodeChar 7781; Value.Integer Integer.U32 7780 ]; - Value.Tuple [ Value.UnicodeChar 7783; Value.Integer Integer.U32 7782 ]; - Value.Tuple [ Value.UnicodeChar 7785; Value.Integer Integer.U32 7784 ]; - Value.Tuple [ Value.UnicodeChar 7787; Value.Integer Integer.U32 7786 ]; - Value.Tuple [ Value.UnicodeChar 7789; Value.Integer Integer.U32 7788 ]; - Value.Tuple [ Value.UnicodeChar 7791; Value.Integer Integer.U32 7790 ]; - Value.Tuple [ Value.UnicodeChar 7793; Value.Integer Integer.U32 7792 ]; - Value.Tuple [ Value.UnicodeChar 7795; Value.Integer Integer.U32 7794 ]; - Value.Tuple [ Value.UnicodeChar 7797; Value.Integer Integer.U32 7796 ]; - Value.Tuple [ Value.UnicodeChar 7799; Value.Integer Integer.U32 7798 ]; - Value.Tuple [ Value.UnicodeChar 7801; Value.Integer Integer.U32 7800 ]; - Value.Tuple [ Value.UnicodeChar 7803; Value.Integer Integer.U32 7802 ]; - Value.Tuple [ Value.UnicodeChar 7805; Value.Integer Integer.U32 7804 ]; - Value.Tuple [ Value.UnicodeChar 7807; Value.Integer Integer.U32 7806 ]; - Value.Tuple [ Value.UnicodeChar 7809; Value.Integer Integer.U32 7808 ]; - Value.Tuple [ Value.UnicodeChar 7811; Value.Integer Integer.U32 7810 ]; - Value.Tuple [ Value.UnicodeChar 7813; Value.Integer Integer.U32 7812 ]; - Value.Tuple [ Value.UnicodeChar 7815; Value.Integer Integer.U32 7814 ]; - Value.Tuple [ Value.UnicodeChar 7817; Value.Integer Integer.U32 7816 ]; - Value.Tuple [ Value.UnicodeChar 7819; Value.Integer Integer.U32 7818 ]; - Value.Tuple [ Value.UnicodeChar 7821; Value.Integer Integer.U32 7820 ]; - Value.Tuple [ Value.UnicodeChar 7823; Value.Integer Integer.U32 7822 ]; - Value.Tuple [ Value.UnicodeChar 7825; Value.Integer Integer.U32 7824 ]; - Value.Tuple [ Value.UnicodeChar 7827; Value.Integer Integer.U32 7826 ]; - Value.Tuple [ Value.UnicodeChar 7829; Value.Integer Integer.U32 7828 ]; - Value.Tuple [ Value.UnicodeChar 7830; Value.Integer Integer.U32 4194310 ]; - Value.Tuple [ Value.UnicodeChar 7831; Value.Integer Integer.U32 4194311 ]; - Value.Tuple [ Value.UnicodeChar 7832; Value.Integer Integer.U32 4194312 ]; - Value.Tuple [ Value.UnicodeChar 7833; Value.Integer Integer.U32 4194313 ]; - Value.Tuple [ Value.UnicodeChar 7834; Value.Integer Integer.U32 4194314 ]; - Value.Tuple [ Value.UnicodeChar 7835; Value.Integer Integer.U32 7776 ]; - Value.Tuple [ Value.UnicodeChar 7841; Value.Integer Integer.U32 7840 ]; - Value.Tuple [ Value.UnicodeChar 7843; Value.Integer Integer.U32 7842 ]; - Value.Tuple [ Value.UnicodeChar 7845; Value.Integer Integer.U32 7844 ]; - Value.Tuple [ Value.UnicodeChar 7847; Value.Integer Integer.U32 7846 ]; - Value.Tuple [ Value.UnicodeChar 7849; Value.Integer Integer.U32 7848 ]; - Value.Tuple [ Value.UnicodeChar 7851; Value.Integer Integer.U32 7850 ]; - Value.Tuple [ Value.UnicodeChar 7853; Value.Integer Integer.U32 7852 ]; - Value.Tuple [ Value.UnicodeChar 7855; Value.Integer Integer.U32 7854 ]; - Value.Tuple [ Value.UnicodeChar 7857; Value.Integer Integer.U32 7856 ]; - Value.Tuple [ Value.UnicodeChar 7859; Value.Integer Integer.U32 7858 ]; - Value.Tuple [ Value.UnicodeChar 7861; Value.Integer Integer.U32 7860 ]; - Value.Tuple [ Value.UnicodeChar 7863; Value.Integer Integer.U32 7862 ]; - Value.Tuple [ Value.UnicodeChar 7865; Value.Integer Integer.U32 7864 ]; - Value.Tuple [ Value.UnicodeChar 7867; Value.Integer Integer.U32 7866 ]; - Value.Tuple [ Value.UnicodeChar 7869; Value.Integer Integer.U32 7868 ]; - Value.Tuple [ Value.UnicodeChar 7871; Value.Integer Integer.U32 7870 ]; - Value.Tuple [ Value.UnicodeChar 7873; Value.Integer Integer.U32 7872 ]; - Value.Tuple [ Value.UnicodeChar 7875; Value.Integer Integer.U32 7874 ]; - Value.Tuple [ Value.UnicodeChar 7877; Value.Integer Integer.U32 7876 ]; - Value.Tuple [ Value.UnicodeChar 7879; Value.Integer Integer.U32 7878 ]; - Value.Tuple [ Value.UnicodeChar 7881; Value.Integer Integer.U32 7880 ]; - Value.Tuple [ Value.UnicodeChar 7883; Value.Integer Integer.U32 7882 ]; - Value.Tuple [ Value.UnicodeChar 7885; Value.Integer Integer.U32 7884 ]; - Value.Tuple [ Value.UnicodeChar 7887; Value.Integer Integer.U32 7886 ]; - Value.Tuple [ Value.UnicodeChar 7889; Value.Integer Integer.U32 7888 ]; - Value.Tuple [ Value.UnicodeChar 7891; Value.Integer Integer.U32 7890 ]; - Value.Tuple [ Value.UnicodeChar 7893; Value.Integer Integer.U32 7892 ]; - Value.Tuple [ Value.UnicodeChar 7895; Value.Integer Integer.U32 7894 ]; - Value.Tuple [ Value.UnicodeChar 7897; Value.Integer Integer.U32 7896 ]; - Value.Tuple [ Value.UnicodeChar 7899; Value.Integer Integer.U32 7898 ]; - Value.Tuple [ Value.UnicodeChar 7901; Value.Integer Integer.U32 7900 ]; - Value.Tuple [ Value.UnicodeChar 7903; Value.Integer Integer.U32 7902 ]; - Value.Tuple [ Value.UnicodeChar 7905; Value.Integer Integer.U32 7904 ]; - Value.Tuple [ Value.UnicodeChar 7907; Value.Integer Integer.U32 7906 ]; - Value.Tuple [ Value.UnicodeChar 7909; Value.Integer Integer.U32 7908 ]; - Value.Tuple [ Value.UnicodeChar 7911; Value.Integer Integer.U32 7910 ]; - Value.Tuple [ Value.UnicodeChar 7913; Value.Integer Integer.U32 7912 ]; - Value.Tuple [ Value.UnicodeChar 7915; Value.Integer Integer.U32 7914 ]; - Value.Tuple [ Value.UnicodeChar 7917; Value.Integer Integer.U32 7916 ]; - Value.Tuple [ Value.UnicodeChar 7919; Value.Integer Integer.U32 7918 ]; - Value.Tuple [ Value.UnicodeChar 7921; Value.Integer Integer.U32 7920 ]; - Value.Tuple [ Value.UnicodeChar 7923; Value.Integer Integer.U32 7922 ]; - Value.Tuple [ Value.UnicodeChar 7925; Value.Integer Integer.U32 7924 ]; - Value.Tuple [ Value.UnicodeChar 7927; Value.Integer Integer.U32 7926 ]; - Value.Tuple [ Value.UnicodeChar 7929; Value.Integer Integer.U32 7928 ]; - Value.Tuple [ Value.UnicodeChar 7931; Value.Integer Integer.U32 7930 ]; - Value.Tuple [ Value.UnicodeChar 7933; Value.Integer Integer.U32 7932 ]; - Value.Tuple [ Value.UnicodeChar 7935; Value.Integer Integer.U32 7934 ]; - Value.Tuple [ Value.UnicodeChar 7936; Value.Integer Integer.U32 7944 ]; - Value.Tuple [ Value.UnicodeChar 7937; Value.Integer Integer.U32 7945 ]; - Value.Tuple [ Value.UnicodeChar 7938; Value.Integer Integer.U32 7946 ]; - Value.Tuple [ Value.UnicodeChar 7939; Value.Integer Integer.U32 7947 ]; - Value.Tuple [ Value.UnicodeChar 7940; Value.Integer Integer.U32 7948 ]; - Value.Tuple [ Value.UnicodeChar 7941; Value.Integer Integer.U32 7949 ]; - Value.Tuple [ Value.UnicodeChar 7942; Value.Integer Integer.U32 7950 ]; - Value.Tuple [ Value.UnicodeChar 7943; Value.Integer Integer.U32 7951 ]; - Value.Tuple [ Value.UnicodeChar 7952; Value.Integer Integer.U32 7960 ]; - Value.Tuple [ Value.UnicodeChar 7953; Value.Integer Integer.U32 7961 ]; - Value.Tuple [ Value.UnicodeChar 7954; Value.Integer Integer.U32 7962 ]; - Value.Tuple [ Value.UnicodeChar 7955; Value.Integer Integer.U32 7963 ]; - Value.Tuple [ Value.UnicodeChar 7956; Value.Integer Integer.U32 7964 ]; - Value.Tuple [ Value.UnicodeChar 7957; Value.Integer Integer.U32 7965 ]; - Value.Tuple [ Value.UnicodeChar 7968; Value.Integer Integer.U32 7976 ]; - Value.Tuple [ Value.UnicodeChar 7969; Value.Integer Integer.U32 7977 ]; - Value.Tuple [ Value.UnicodeChar 7970; Value.Integer Integer.U32 7978 ]; - Value.Tuple [ Value.UnicodeChar 7971; Value.Integer Integer.U32 7979 ]; - Value.Tuple [ Value.UnicodeChar 7972; Value.Integer Integer.U32 7980 ]; - Value.Tuple [ Value.UnicodeChar 7973; Value.Integer Integer.U32 7981 ]; - Value.Tuple [ Value.UnicodeChar 7974; Value.Integer Integer.U32 7982 ]; - Value.Tuple [ Value.UnicodeChar 7975; Value.Integer Integer.U32 7983 ]; - Value.Tuple [ Value.UnicodeChar 7984; Value.Integer Integer.U32 7992 ]; - Value.Tuple [ Value.UnicodeChar 7985; Value.Integer Integer.U32 7993 ]; - Value.Tuple [ Value.UnicodeChar 7986; Value.Integer Integer.U32 7994 ]; - Value.Tuple [ Value.UnicodeChar 7987; Value.Integer Integer.U32 7995 ]; - Value.Tuple [ Value.UnicodeChar 7988; Value.Integer Integer.U32 7996 ]; - Value.Tuple [ Value.UnicodeChar 7989; Value.Integer Integer.U32 7997 ]; - Value.Tuple [ Value.UnicodeChar 7990; Value.Integer Integer.U32 7998 ]; - Value.Tuple [ Value.UnicodeChar 7991; Value.Integer Integer.U32 7999 ]; - Value.Tuple [ Value.UnicodeChar 8000; Value.Integer Integer.U32 8008 ]; - Value.Tuple [ Value.UnicodeChar 8001; Value.Integer Integer.U32 8009 ]; - Value.Tuple [ Value.UnicodeChar 8002; Value.Integer Integer.U32 8010 ]; - Value.Tuple [ Value.UnicodeChar 8003; Value.Integer Integer.U32 8011 ]; - Value.Tuple [ Value.UnicodeChar 8004; Value.Integer Integer.U32 8012 ]; - Value.Tuple [ Value.UnicodeChar 8005; Value.Integer Integer.U32 8013 ]; - Value.Tuple [ Value.UnicodeChar 8016; Value.Integer Integer.U32 4194315 ]; - Value.Tuple [ Value.UnicodeChar 8017; Value.Integer Integer.U32 8025 ]; - Value.Tuple [ Value.UnicodeChar 8018; Value.Integer Integer.U32 4194316 ]; - Value.Tuple [ Value.UnicodeChar 8019; Value.Integer Integer.U32 8027 ]; - Value.Tuple [ Value.UnicodeChar 8020; Value.Integer Integer.U32 4194317 ]; - Value.Tuple [ Value.UnicodeChar 8021; Value.Integer Integer.U32 8029 ]; - Value.Tuple [ Value.UnicodeChar 8022; Value.Integer Integer.U32 4194318 ]; - Value.Tuple [ Value.UnicodeChar 8023; Value.Integer Integer.U32 8031 ]; - Value.Tuple [ Value.UnicodeChar 8032; Value.Integer Integer.U32 8040 ]; - Value.Tuple [ Value.UnicodeChar 8033; Value.Integer Integer.U32 8041 ]; - Value.Tuple [ Value.UnicodeChar 8034; Value.Integer Integer.U32 8042 ]; - Value.Tuple [ Value.UnicodeChar 8035; Value.Integer Integer.U32 8043 ]; - Value.Tuple [ Value.UnicodeChar 8036; Value.Integer Integer.U32 8044 ]; - Value.Tuple [ Value.UnicodeChar 8037; Value.Integer Integer.U32 8045 ]; - Value.Tuple [ Value.UnicodeChar 8038; Value.Integer Integer.U32 8046 ]; - Value.Tuple [ Value.UnicodeChar 8039; Value.Integer Integer.U32 8047 ]; - Value.Tuple [ Value.UnicodeChar 8048; Value.Integer Integer.U32 8122 ]; - Value.Tuple [ Value.UnicodeChar 8049; Value.Integer Integer.U32 8123 ]; - Value.Tuple [ Value.UnicodeChar 8050; Value.Integer Integer.U32 8136 ]; - Value.Tuple [ Value.UnicodeChar 8051; Value.Integer Integer.U32 8137 ]; - Value.Tuple [ Value.UnicodeChar 8052; Value.Integer Integer.U32 8138 ]; - Value.Tuple [ Value.UnicodeChar 8053; Value.Integer Integer.U32 8139 ]; - Value.Tuple [ Value.UnicodeChar 8054; Value.Integer Integer.U32 8154 ]; - Value.Tuple [ Value.UnicodeChar 8055; Value.Integer Integer.U32 8155 ]; - Value.Tuple [ Value.UnicodeChar 8056; Value.Integer Integer.U32 8184 ]; - Value.Tuple [ Value.UnicodeChar 8057; Value.Integer Integer.U32 8185 ]; - Value.Tuple [ Value.UnicodeChar 8058; Value.Integer Integer.U32 8170 ]; - Value.Tuple [ Value.UnicodeChar 8059; Value.Integer Integer.U32 8171 ]; - Value.Tuple [ Value.UnicodeChar 8060; Value.Integer Integer.U32 8186 ]; - Value.Tuple [ Value.UnicodeChar 8061; Value.Integer Integer.U32 8187 ]; - Value.Tuple [ Value.UnicodeChar 8064; Value.Integer Integer.U32 4194319 ]; - Value.Tuple [ Value.UnicodeChar 8065; Value.Integer Integer.U32 4194320 ]; - Value.Tuple [ Value.UnicodeChar 8066; Value.Integer Integer.U32 4194321 ]; - Value.Tuple [ Value.UnicodeChar 8067; Value.Integer Integer.U32 4194322 ]; - Value.Tuple [ Value.UnicodeChar 8068; Value.Integer Integer.U32 4194323 ]; - Value.Tuple [ Value.UnicodeChar 8069; Value.Integer Integer.U32 4194324 ]; - Value.Tuple [ Value.UnicodeChar 8070; Value.Integer Integer.U32 4194325 ]; - Value.Tuple [ Value.UnicodeChar 8071; Value.Integer Integer.U32 4194326 ]; - Value.Tuple [ Value.UnicodeChar 8072; Value.Integer Integer.U32 4194327 ]; - Value.Tuple [ Value.UnicodeChar 8073; Value.Integer Integer.U32 4194328 ]; - Value.Tuple [ Value.UnicodeChar 8074; Value.Integer Integer.U32 4194329 ]; - Value.Tuple [ Value.UnicodeChar 8075; Value.Integer Integer.U32 4194330 ]; - Value.Tuple [ Value.UnicodeChar 8076; Value.Integer Integer.U32 4194331 ]; - Value.Tuple [ Value.UnicodeChar 8077; Value.Integer Integer.U32 4194332 ]; - Value.Tuple [ Value.UnicodeChar 8078; Value.Integer Integer.U32 4194333 ]; - Value.Tuple [ Value.UnicodeChar 8079; Value.Integer Integer.U32 4194334 ]; - Value.Tuple [ Value.UnicodeChar 8080; Value.Integer Integer.U32 4194335 ]; - Value.Tuple [ Value.UnicodeChar 8081; Value.Integer Integer.U32 4194336 ]; - Value.Tuple [ Value.UnicodeChar 8082; Value.Integer Integer.U32 4194337 ]; - Value.Tuple [ Value.UnicodeChar 8083; Value.Integer Integer.U32 4194338 ]; - Value.Tuple [ Value.UnicodeChar 8084; Value.Integer Integer.U32 4194339 ]; - Value.Tuple [ Value.UnicodeChar 8085; Value.Integer Integer.U32 4194340 ]; - Value.Tuple [ Value.UnicodeChar 8086; Value.Integer Integer.U32 4194341 ]; - Value.Tuple [ Value.UnicodeChar 8087; Value.Integer Integer.U32 4194342 ]; - Value.Tuple [ Value.UnicodeChar 8088; Value.Integer Integer.U32 4194343 ]; - Value.Tuple [ Value.UnicodeChar 8089; Value.Integer Integer.U32 4194344 ]; - Value.Tuple [ Value.UnicodeChar 8090; Value.Integer Integer.U32 4194345 ]; - Value.Tuple [ Value.UnicodeChar 8091; Value.Integer Integer.U32 4194346 ]; - Value.Tuple [ Value.UnicodeChar 8092; Value.Integer Integer.U32 4194347 ]; - Value.Tuple [ Value.UnicodeChar 8093; Value.Integer Integer.U32 4194348 ]; - Value.Tuple [ Value.UnicodeChar 8094; Value.Integer Integer.U32 4194349 ]; - Value.Tuple [ Value.UnicodeChar 8095; Value.Integer Integer.U32 4194350 ]; - Value.Tuple [ Value.UnicodeChar 8096; Value.Integer Integer.U32 4194351 ]; - Value.Tuple [ Value.UnicodeChar 8097; Value.Integer Integer.U32 4194352 ]; - Value.Tuple [ Value.UnicodeChar 8098; Value.Integer Integer.U32 4194353 ]; - Value.Tuple [ Value.UnicodeChar 8099; Value.Integer Integer.U32 4194354 ]; - Value.Tuple [ Value.UnicodeChar 8100; Value.Integer Integer.U32 4194355 ]; - Value.Tuple [ Value.UnicodeChar 8101; Value.Integer Integer.U32 4194356 ]; - Value.Tuple [ Value.UnicodeChar 8102; Value.Integer Integer.U32 4194357 ]; - Value.Tuple [ Value.UnicodeChar 8103; Value.Integer Integer.U32 4194358 ]; - Value.Tuple [ Value.UnicodeChar 8104; Value.Integer Integer.U32 4194359 ]; - Value.Tuple [ Value.UnicodeChar 8105; Value.Integer Integer.U32 4194360 ]; - Value.Tuple [ Value.UnicodeChar 8106; Value.Integer Integer.U32 4194361 ]; - Value.Tuple [ Value.UnicodeChar 8107; Value.Integer Integer.U32 4194362 ]; - Value.Tuple [ Value.UnicodeChar 8108; Value.Integer Integer.U32 4194363 ]; - Value.Tuple [ Value.UnicodeChar 8109; Value.Integer Integer.U32 4194364 ]; - Value.Tuple [ Value.UnicodeChar 8110; Value.Integer Integer.U32 4194365 ]; - Value.Tuple [ Value.UnicodeChar 8111; Value.Integer Integer.U32 4194366 ]; - Value.Tuple [ Value.UnicodeChar 8112; Value.Integer Integer.U32 8120 ]; - Value.Tuple [ Value.UnicodeChar 8113; Value.Integer Integer.U32 8121 ]; - Value.Tuple [ Value.UnicodeChar 8114; Value.Integer Integer.U32 4194367 ]; - Value.Tuple [ Value.UnicodeChar 8115; Value.Integer Integer.U32 4194368 ]; - Value.Tuple [ Value.UnicodeChar 8116; Value.Integer Integer.U32 4194369 ]; - Value.Tuple [ Value.UnicodeChar 8118; Value.Integer Integer.U32 4194370 ]; - Value.Tuple [ Value.UnicodeChar 8119; Value.Integer Integer.U32 4194371 ]; - Value.Tuple [ Value.UnicodeChar 8124; Value.Integer Integer.U32 4194372 ]; - Value.Tuple [ Value.UnicodeChar 8126; Value.Integer Integer.U32 921 ]; - Value.Tuple [ Value.UnicodeChar 8130; Value.Integer Integer.U32 4194373 ]; - Value.Tuple [ Value.UnicodeChar 8131; Value.Integer Integer.U32 4194374 ]; - Value.Tuple [ Value.UnicodeChar 8132; Value.Integer Integer.U32 4194375 ]; - Value.Tuple [ Value.UnicodeChar 8134; Value.Integer Integer.U32 4194376 ]; - Value.Tuple [ Value.UnicodeChar 8135; Value.Integer Integer.U32 4194377 ]; - Value.Tuple [ Value.UnicodeChar 8140; Value.Integer Integer.U32 4194378 ]; - Value.Tuple [ Value.UnicodeChar 8144; Value.Integer Integer.U32 8152 ]; - Value.Tuple [ Value.UnicodeChar 8145; Value.Integer Integer.U32 8153 ]; - Value.Tuple [ Value.UnicodeChar 8146; Value.Integer Integer.U32 4194379 ]; - Value.Tuple [ Value.UnicodeChar 8147; Value.Integer Integer.U32 4194380 ]; - Value.Tuple [ Value.UnicodeChar 8150; Value.Integer Integer.U32 4194381 ]; - Value.Tuple [ Value.UnicodeChar 8151; Value.Integer Integer.U32 4194382 ]; - Value.Tuple [ Value.UnicodeChar 8160; Value.Integer Integer.U32 8168 ]; - Value.Tuple [ Value.UnicodeChar 8161; Value.Integer Integer.U32 8169 ]; - Value.Tuple [ Value.UnicodeChar 8162; Value.Integer Integer.U32 4194383 ]; - Value.Tuple [ Value.UnicodeChar 8163; Value.Integer Integer.U32 4194384 ]; - Value.Tuple [ Value.UnicodeChar 8164; Value.Integer Integer.U32 4194385 ]; - Value.Tuple [ Value.UnicodeChar 8165; Value.Integer Integer.U32 8172 ]; - Value.Tuple [ Value.UnicodeChar 8166; Value.Integer Integer.U32 4194386 ]; - Value.Tuple [ Value.UnicodeChar 8167; Value.Integer Integer.U32 4194387 ]; - Value.Tuple [ Value.UnicodeChar 8178; Value.Integer Integer.U32 4194388 ]; - Value.Tuple [ Value.UnicodeChar 8179; Value.Integer Integer.U32 4194389 ]; - Value.Tuple [ Value.UnicodeChar 8180; Value.Integer Integer.U32 4194390 ]; - Value.Tuple [ Value.UnicodeChar 8182; Value.Integer Integer.U32 4194391 ]; - Value.Tuple [ Value.UnicodeChar 8183; Value.Integer Integer.U32 4194392 ]; - Value.Tuple [ Value.UnicodeChar 8188; Value.Integer Integer.U32 4194393 ]; - Value.Tuple [ Value.UnicodeChar 8526; Value.Integer Integer.U32 8498 ]; - Value.Tuple [ Value.UnicodeChar 8560; Value.Integer Integer.U32 8544 ]; - Value.Tuple [ Value.UnicodeChar 8561; Value.Integer Integer.U32 8545 ]; - Value.Tuple [ Value.UnicodeChar 8562; Value.Integer Integer.U32 8546 ]; - Value.Tuple [ Value.UnicodeChar 8563; Value.Integer Integer.U32 8547 ]; - Value.Tuple [ Value.UnicodeChar 8564; Value.Integer Integer.U32 8548 ]; - Value.Tuple [ Value.UnicodeChar 8565; Value.Integer Integer.U32 8549 ]; - Value.Tuple [ Value.UnicodeChar 8566; Value.Integer Integer.U32 8550 ]; - Value.Tuple [ Value.UnicodeChar 8567; Value.Integer Integer.U32 8551 ]; - Value.Tuple [ Value.UnicodeChar 8568; Value.Integer Integer.U32 8552 ]; - Value.Tuple [ Value.UnicodeChar 8569; Value.Integer Integer.U32 8553 ]; - Value.Tuple [ Value.UnicodeChar 8570; Value.Integer Integer.U32 8554 ]; - Value.Tuple [ Value.UnicodeChar 8571; Value.Integer Integer.U32 8555 ]; - Value.Tuple [ Value.UnicodeChar 8572; Value.Integer Integer.U32 8556 ]; - Value.Tuple [ Value.UnicodeChar 8573; Value.Integer Integer.U32 8557 ]; - Value.Tuple [ Value.UnicodeChar 8574; Value.Integer Integer.U32 8558 ]; - Value.Tuple [ Value.UnicodeChar 8575; Value.Integer Integer.U32 8559 ]; - Value.Tuple [ Value.UnicodeChar 8580; Value.Integer Integer.U32 8579 ]; - Value.Tuple [ Value.UnicodeChar 9424; Value.Integer Integer.U32 9398 ]; - Value.Tuple [ Value.UnicodeChar 9425; Value.Integer Integer.U32 9399 ]; - Value.Tuple [ Value.UnicodeChar 9426; Value.Integer Integer.U32 9400 ]; - Value.Tuple [ Value.UnicodeChar 9427; Value.Integer Integer.U32 9401 ]; - Value.Tuple [ Value.UnicodeChar 9428; Value.Integer Integer.U32 9402 ]; - Value.Tuple [ Value.UnicodeChar 9429; Value.Integer Integer.U32 9403 ]; - Value.Tuple [ Value.UnicodeChar 9430; Value.Integer Integer.U32 9404 ]; - Value.Tuple [ Value.UnicodeChar 9431; Value.Integer Integer.U32 9405 ]; - Value.Tuple [ Value.UnicodeChar 9432; Value.Integer Integer.U32 9406 ]; - Value.Tuple [ Value.UnicodeChar 9433; Value.Integer Integer.U32 9407 ]; - Value.Tuple [ Value.UnicodeChar 9434; Value.Integer Integer.U32 9408 ]; - Value.Tuple [ Value.UnicodeChar 9435; Value.Integer Integer.U32 9409 ]; - Value.Tuple [ Value.UnicodeChar 9436; Value.Integer Integer.U32 9410 ]; - Value.Tuple [ Value.UnicodeChar 9437; Value.Integer Integer.U32 9411 ]; - Value.Tuple [ Value.UnicodeChar 9438; Value.Integer Integer.U32 9412 ]; - Value.Tuple [ Value.UnicodeChar 9439; Value.Integer Integer.U32 9413 ]; - Value.Tuple [ Value.UnicodeChar 9440; Value.Integer Integer.U32 9414 ]; - Value.Tuple [ Value.UnicodeChar 9441; Value.Integer Integer.U32 9415 ]; - Value.Tuple [ Value.UnicodeChar 9442; Value.Integer Integer.U32 9416 ]; - Value.Tuple [ Value.UnicodeChar 9443; Value.Integer Integer.U32 9417 ]; - Value.Tuple [ Value.UnicodeChar 9444; Value.Integer Integer.U32 9418 ]; - Value.Tuple [ Value.UnicodeChar 9445; Value.Integer Integer.U32 9419 ]; - Value.Tuple [ Value.UnicodeChar 9446; Value.Integer Integer.U32 9420 ]; - Value.Tuple [ Value.UnicodeChar 9447; Value.Integer Integer.U32 9421 ]; - Value.Tuple [ Value.UnicodeChar 9448; Value.Integer Integer.U32 9422 ]; - Value.Tuple [ Value.UnicodeChar 9449; Value.Integer Integer.U32 9423 ]; - Value.Tuple [ Value.UnicodeChar 11312; Value.Integer Integer.U32 11264 ]; - Value.Tuple [ Value.UnicodeChar 11313; Value.Integer Integer.U32 11265 ]; - Value.Tuple [ Value.UnicodeChar 11314; Value.Integer Integer.U32 11266 ]; - Value.Tuple [ Value.UnicodeChar 11315; Value.Integer Integer.U32 11267 ]; - Value.Tuple [ Value.UnicodeChar 11316; Value.Integer Integer.U32 11268 ]; - Value.Tuple [ Value.UnicodeChar 11317; Value.Integer Integer.U32 11269 ]; - Value.Tuple [ Value.UnicodeChar 11318; Value.Integer Integer.U32 11270 ]; - Value.Tuple [ Value.UnicodeChar 11319; Value.Integer Integer.U32 11271 ]; - Value.Tuple [ Value.UnicodeChar 11320; Value.Integer Integer.U32 11272 ]; - Value.Tuple [ Value.UnicodeChar 11321; Value.Integer Integer.U32 11273 ]; - Value.Tuple [ Value.UnicodeChar 11322; Value.Integer Integer.U32 11274 ]; - Value.Tuple [ Value.UnicodeChar 11323; Value.Integer Integer.U32 11275 ]; - Value.Tuple [ Value.UnicodeChar 11324; Value.Integer Integer.U32 11276 ]; - Value.Tuple [ Value.UnicodeChar 11325; Value.Integer Integer.U32 11277 ]; - Value.Tuple [ Value.UnicodeChar 11326; Value.Integer Integer.U32 11278 ]; - Value.Tuple [ Value.UnicodeChar 11327; Value.Integer Integer.U32 11279 ]; - Value.Tuple [ Value.UnicodeChar 11328; Value.Integer Integer.U32 11280 ]; - Value.Tuple [ Value.UnicodeChar 11329; Value.Integer Integer.U32 11281 ]; - Value.Tuple [ Value.UnicodeChar 11330; Value.Integer Integer.U32 11282 ]; - Value.Tuple [ Value.UnicodeChar 11331; Value.Integer Integer.U32 11283 ]; - Value.Tuple [ Value.UnicodeChar 11332; Value.Integer Integer.U32 11284 ]; - Value.Tuple [ Value.UnicodeChar 11333; Value.Integer Integer.U32 11285 ]; - Value.Tuple [ Value.UnicodeChar 11334; Value.Integer Integer.U32 11286 ]; - Value.Tuple [ Value.UnicodeChar 11335; Value.Integer Integer.U32 11287 ]; - Value.Tuple [ Value.UnicodeChar 11336; Value.Integer Integer.U32 11288 ]; - Value.Tuple [ Value.UnicodeChar 11337; Value.Integer Integer.U32 11289 ]; - Value.Tuple [ Value.UnicodeChar 11338; Value.Integer Integer.U32 11290 ]; - Value.Tuple [ Value.UnicodeChar 11339; Value.Integer Integer.U32 11291 ]; - Value.Tuple [ Value.UnicodeChar 11340; Value.Integer Integer.U32 11292 ]; - Value.Tuple [ Value.UnicodeChar 11341; Value.Integer Integer.U32 11293 ]; - Value.Tuple [ Value.UnicodeChar 11342; Value.Integer Integer.U32 11294 ]; - Value.Tuple [ Value.UnicodeChar 11343; Value.Integer Integer.U32 11295 ]; - Value.Tuple [ Value.UnicodeChar 11344; Value.Integer Integer.U32 11296 ]; - Value.Tuple [ Value.UnicodeChar 11345; Value.Integer Integer.U32 11297 ]; - Value.Tuple [ Value.UnicodeChar 11346; Value.Integer Integer.U32 11298 ]; - Value.Tuple [ Value.UnicodeChar 11347; Value.Integer Integer.U32 11299 ]; - Value.Tuple [ Value.UnicodeChar 11348; Value.Integer Integer.U32 11300 ]; - Value.Tuple [ Value.UnicodeChar 11349; Value.Integer Integer.U32 11301 ]; - Value.Tuple [ Value.UnicodeChar 11350; Value.Integer Integer.U32 11302 ]; - Value.Tuple [ Value.UnicodeChar 11351; Value.Integer Integer.U32 11303 ]; - Value.Tuple [ Value.UnicodeChar 11352; Value.Integer Integer.U32 11304 ]; - Value.Tuple [ Value.UnicodeChar 11353; Value.Integer Integer.U32 11305 ]; - Value.Tuple [ Value.UnicodeChar 11354; Value.Integer Integer.U32 11306 ]; - Value.Tuple [ Value.UnicodeChar 11355; Value.Integer Integer.U32 11307 ]; - Value.Tuple [ Value.UnicodeChar 11356; Value.Integer Integer.U32 11308 ]; - Value.Tuple [ Value.UnicodeChar 11357; Value.Integer Integer.U32 11309 ]; - Value.Tuple [ Value.UnicodeChar 11358; Value.Integer Integer.U32 11310 ]; - Value.Tuple [ Value.UnicodeChar 11359; Value.Integer Integer.U32 11311 ]; - Value.Tuple [ Value.UnicodeChar 11361; Value.Integer Integer.U32 11360 ]; - Value.Tuple [ Value.UnicodeChar 11365; Value.Integer Integer.U32 570 ]; - Value.Tuple [ Value.UnicodeChar 11366; Value.Integer Integer.U32 574 ]; - Value.Tuple [ Value.UnicodeChar 11368; Value.Integer Integer.U32 11367 ]; - Value.Tuple [ Value.UnicodeChar 11370; Value.Integer Integer.U32 11369 ]; - Value.Tuple [ Value.UnicodeChar 11372; Value.Integer Integer.U32 11371 ]; - Value.Tuple [ Value.UnicodeChar 11379; Value.Integer Integer.U32 11378 ]; - Value.Tuple [ Value.UnicodeChar 11382; Value.Integer Integer.U32 11381 ]; - Value.Tuple [ Value.UnicodeChar 11393; Value.Integer Integer.U32 11392 ]; - Value.Tuple [ Value.UnicodeChar 11395; Value.Integer Integer.U32 11394 ]; - Value.Tuple [ Value.UnicodeChar 11397; Value.Integer Integer.U32 11396 ]; - Value.Tuple [ Value.UnicodeChar 11399; Value.Integer Integer.U32 11398 ]; - Value.Tuple [ Value.UnicodeChar 11401; Value.Integer Integer.U32 11400 ]; - Value.Tuple [ Value.UnicodeChar 11403; Value.Integer Integer.U32 11402 ]; - Value.Tuple [ Value.UnicodeChar 11405; Value.Integer Integer.U32 11404 ]; - Value.Tuple [ Value.UnicodeChar 11407; Value.Integer Integer.U32 11406 ]; - Value.Tuple [ Value.UnicodeChar 11409; Value.Integer Integer.U32 11408 ]; - Value.Tuple [ Value.UnicodeChar 11411; Value.Integer Integer.U32 11410 ]; - Value.Tuple [ Value.UnicodeChar 11413; Value.Integer Integer.U32 11412 ]; - Value.Tuple [ Value.UnicodeChar 11415; Value.Integer Integer.U32 11414 ]; - Value.Tuple [ Value.UnicodeChar 11417; Value.Integer Integer.U32 11416 ]; - Value.Tuple [ Value.UnicodeChar 11419; Value.Integer Integer.U32 11418 ]; - Value.Tuple [ Value.UnicodeChar 11421; Value.Integer Integer.U32 11420 ]; - Value.Tuple [ Value.UnicodeChar 11423; Value.Integer Integer.U32 11422 ]; - Value.Tuple [ Value.UnicodeChar 11425; Value.Integer Integer.U32 11424 ]; - Value.Tuple [ Value.UnicodeChar 11427; Value.Integer Integer.U32 11426 ]; - Value.Tuple [ Value.UnicodeChar 11429; Value.Integer Integer.U32 11428 ]; - Value.Tuple [ Value.UnicodeChar 11431; Value.Integer Integer.U32 11430 ]; - Value.Tuple [ Value.UnicodeChar 11433; Value.Integer Integer.U32 11432 ]; - Value.Tuple [ Value.UnicodeChar 11435; Value.Integer Integer.U32 11434 ]; - Value.Tuple [ Value.UnicodeChar 11437; Value.Integer Integer.U32 11436 ]; - Value.Tuple [ Value.UnicodeChar 11439; Value.Integer Integer.U32 11438 ]; - Value.Tuple [ Value.UnicodeChar 11441; Value.Integer Integer.U32 11440 ]; - Value.Tuple [ Value.UnicodeChar 11443; Value.Integer Integer.U32 11442 ]; - Value.Tuple [ Value.UnicodeChar 11445; Value.Integer Integer.U32 11444 ]; - Value.Tuple [ Value.UnicodeChar 11447; Value.Integer Integer.U32 11446 ]; - Value.Tuple [ Value.UnicodeChar 11449; Value.Integer Integer.U32 11448 ]; - Value.Tuple [ Value.UnicodeChar 11451; Value.Integer Integer.U32 11450 ]; - Value.Tuple [ Value.UnicodeChar 11453; Value.Integer Integer.U32 11452 ]; - Value.Tuple [ Value.UnicodeChar 11455; Value.Integer Integer.U32 11454 ]; - Value.Tuple [ Value.UnicodeChar 11457; Value.Integer Integer.U32 11456 ]; - Value.Tuple [ Value.UnicodeChar 11459; Value.Integer Integer.U32 11458 ]; - Value.Tuple [ Value.UnicodeChar 11461; Value.Integer Integer.U32 11460 ]; - Value.Tuple [ Value.UnicodeChar 11463; Value.Integer Integer.U32 11462 ]; - Value.Tuple [ Value.UnicodeChar 11465; Value.Integer Integer.U32 11464 ]; - Value.Tuple [ Value.UnicodeChar 11467; Value.Integer Integer.U32 11466 ]; - Value.Tuple [ Value.UnicodeChar 11469; Value.Integer Integer.U32 11468 ]; - Value.Tuple [ Value.UnicodeChar 11471; Value.Integer Integer.U32 11470 ]; - Value.Tuple [ Value.UnicodeChar 11473; Value.Integer Integer.U32 11472 ]; - Value.Tuple [ Value.UnicodeChar 11475; Value.Integer Integer.U32 11474 ]; - Value.Tuple [ Value.UnicodeChar 11477; Value.Integer Integer.U32 11476 ]; - Value.Tuple [ Value.UnicodeChar 11479; Value.Integer Integer.U32 11478 ]; - Value.Tuple [ Value.UnicodeChar 11481; Value.Integer Integer.U32 11480 ]; - Value.Tuple [ Value.UnicodeChar 11483; Value.Integer Integer.U32 11482 ]; - Value.Tuple [ Value.UnicodeChar 11485; Value.Integer Integer.U32 11484 ]; - Value.Tuple [ Value.UnicodeChar 11487; Value.Integer Integer.U32 11486 ]; - Value.Tuple [ Value.UnicodeChar 11489; Value.Integer Integer.U32 11488 ]; - Value.Tuple [ Value.UnicodeChar 11491; Value.Integer Integer.U32 11490 ]; - Value.Tuple [ Value.UnicodeChar 11500; Value.Integer Integer.U32 11499 ]; - Value.Tuple [ Value.UnicodeChar 11502; Value.Integer Integer.U32 11501 ]; - Value.Tuple [ Value.UnicodeChar 11507; Value.Integer Integer.U32 11506 ]; - Value.Tuple [ Value.UnicodeChar 11520; Value.Integer Integer.U32 4256 ]; - Value.Tuple [ Value.UnicodeChar 11521; Value.Integer Integer.U32 4257 ]; - Value.Tuple [ Value.UnicodeChar 11522; Value.Integer Integer.U32 4258 ]; - Value.Tuple [ Value.UnicodeChar 11523; Value.Integer Integer.U32 4259 ]; - Value.Tuple [ Value.UnicodeChar 11524; Value.Integer Integer.U32 4260 ]; - Value.Tuple [ Value.UnicodeChar 11525; Value.Integer Integer.U32 4261 ]; - Value.Tuple [ Value.UnicodeChar 11526; Value.Integer Integer.U32 4262 ]; - Value.Tuple [ Value.UnicodeChar 11527; Value.Integer Integer.U32 4263 ]; - Value.Tuple [ Value.UnicodeChar 11528; Value.Integer Integer.U32 4264 ]; - Value.Tuple [ Value.UnicodeChar 11529; Value.Integer Integer.U32 4265 ]; - Value.Tuple [ Value.UnicodeChar 11530; Value.Integer Integer.U32 4266 ]; - Value.Tuple [ Value.UnicodeChar 11531; Value.Integer Integer.U32 4267 ]; - Value.Tuple [ Value.UnicodeChar 11532; Value.Integer Integer.U32 4268 ]; - Value.Tuple [ Value.UnicodeChar 11533; Value.Integer Integer.U32 4269 ]; - Value.Tuple [ Value.UnicodeChar 11534; Value.Integer Integer.U32 4270 ]; - Value.Tuple [ Value.UnicodeChar 11535; Value.Integer Integer.U32 4271 ]; - Value.Tuple [ Value.UnicodeChar 11536; Value.Integer Integer.U32 4272 ]; - Value.Tuple [ Value.UnicodeChar 11537; Value.Integer Integer.U32 4273 ]; - Value.Tuple [ Value.UnicodeChar 11538; Value.Integer Integer.U32 4274 ]; - Value.Tuple [ Value.UnicodeChar 11539; Value.Integer Integer.U32 4275 ]; - Value.Tuple [ Value.UnicodeChar 11540; Value.Integer Integer.U32 4276 ]; - Value.Tuple [ Value.UnicodeChar 11541; Value.Integer Integer.U32 4277 ]; - Value.Tuple [ Value.UnicodeChar 11542; Value.Integer Integer.U32 4278 ]; - Value.Tuple [ Value.UnicodeChar 11543; Value.Integer Integer.U32 4279 ]; - Value.Tuple [ Value.UnicodeChar 11544; Value.Integer Integer.U32 4280 ]; - Value.Tuple [ Value.UnicodeChar 11545; Value.Integer Integer.U32 4281 ]; - Value.Tuple [ Value.UnicodeChar 11546; Value.Integer Integer.U32 4282 ]; - Value.Tuple [ Value.UnicodeChar 11547; Value.Integer Integer.U32 4283 ]; - Value.Tuple [ Value.UnicodeChar 11548; Value.Integer Integer.U32 4284 ]; - Value.Tuple [ Value.UnicodeChar 11549; Value.Integer Integer.U32 4285 ]; - Value.Tuple [ Value.UnicodeChar 11550; Value.Integer Integer.U32 4286 ]; - Value.Tuple [ Value.UnicodeChar 11551; Value.Integer Integer.U32 4287 ]; - Value.Tuple [ Value.UnicodeChar 11552; Value.Integer Integer.U32 4288 ]; - Value.Tuple [ Value.UnicodeChar 11553; Value.Integer Integer.U32 4289 ]; - Value.Tuple [ Value.UnicodeChar 11554; Value.Integer Integer.U32 4290 ]; - Value.Tuple [ Value.UnicodeChar 11555; Value.Integer Integer.U32 4291 ]; - Value.Tuple [ Value.UnicodeChar 11556; Value.Integer Integer.U32 4292 ]; - Value.Tuple [ Value.UnicodeChar 11557; Value.Integer Integer.U32 4293 ]; - Value.Tuple [ Value.UnicodeChar 11559; Value.Integer Integer.U32 4295 ]; - Value.Tuple [ Value.UnicodeChar 11565; Value.Integer Integer.U32 4301 ]; - Value.Tuple [ Value.UnicodeChar 42561; Value.Integer Integer.U32 42560 ]; - Value.Tuple [ Value.UnicodeChar 42563; Value.Integer Integer.U32 42562 ]; - Value.Tuple [ Value.UnicodeChar 42565; Value.Integer Integer.U32 42564 ]; - Value.Tuple [ Value.UnicodeChar 42567; Value.Integer Integer.U32 42566 ]; - Value.Tuple [ Value.UnicodeChar 42569; Value.Integer Integer.U32 42568 ]; - Value.Tuple [ Value.UnicodeChar 42571; Value.Integer Integer.U32 42570 ]; - Value.Tuple [ Value.UnicodeChar 42573; Value.Integer Integer.U32 42572 ]; - Value.Tuple [ Value.UnicodeChar 42575; Value.Integer Integer.U32 42574 ]; - Value.Tuple [ Value.UnicodeChar 42577; Value.Integer Integer.U32 42576 ]; - Value.Tuple [ Value.UnicodeChar 42579; Value.Integer Integer.U32 42578 ]; - Value.Tuple [ Value.UnicodeChar 42581; Value.Integer Integer.U32 42580 ]; - Value.Tuple [ Value.UnicodeChar 42583; Value.Integer Integer.U32 42582 ]; - Value.Tuple [ Value.UnicodeChar 42585; Value.Integer Integer.U32 42584 ]; - Value.Tuple [ Value.UnicodeChar 42587; Value.Integer Integer.U32 42586 ]; - Value.Tuple [ Value.UnicodeChar 42589; Value.Integer Integer.U32 42588 ]; - Value.Tuple [ Value.UnicodeChar 42591; Value.Integer Integer.U32 42590 ]; - Value.Tuple [ Value.UnicodeChar 42593; Value.Integer Integer.U32 42592 ]; - Value.Tuple [ Value.UnicodeChar 42595; Value.Integer Integer.U32 42594 ]; - Value.Tuple [ Value.UnicodeChar 42597; Value.Integer Integer.U32 42596 ]; - Value.Tuple [ Value.UnicodeChar 42599; Value.Integer Integer.U32 42598 ]; - Value.Tuple [ Value.UnicodeChar 42601; Value.Integer Integer.U32 42600 ]; - Value.Tuple [ Value.UnicodeChar 42603; Value.Integer Integer.U32 42602 ]; - Value.Tuple [ Value.UnicodeChar 42605; Value.Integer Integer.U32 42604 ]; - Value.Tuple [ Value.UnicodeChar 42625; Value.Integer Integer.U32 42624 ]; - Value.Tuple [ Value.UnicodeChar 42627; Value.Integer Integer.U32 42626 ]; - Value.Tuple [ Value.UnicodeChar 42629; Value.Integer Integer.U32 42628 ]; - Value.Tuple [ Value.UnicodeChar 42631; Value.Integer Integer.U32 42630 ]; - Value.Tuple [ Value.UnicodeChar 42633; Value.Integer Integer.U32 42632 ]; - Value.Tuple [ Value.UnicodeChar 42635; Value.Integer Integer.U32 42634 ]; - Value.Tuple [ Value.UnicodeChar 42637; Value.Integer Integer.U32 42636 ]; - Value.Tuple [ Value.UnicodeChar 42639; Value.Integer Integer.U32 42638 ]; - Value.Tuple [ Value.UnicodeChar 42641; Value.Integer Integer.U32 42640 ]; - Value.Tuple [ Value.UnicodeChar 42643; Value.Integer Integer.U32 42642 ]; - Value.Tuple [ Value.UnicodeChar 42645; Value.Integer Integer.U32 42644 ]; - Value.Tuple [ Value.UnicodeChar 42647; Value.Integer Integer.U32 42646 ]; - Value.Tuple [ Value.UnicodeChar 42649; Value.Integer Integer.U32 42648 ]; - Value.Tuple [ Value.UnicodeChar 42651; Value.Integer Integer.U32 42650 ]; - Value.Tuple [ Value.UnicodeChar 42787; Value.Integer Integer.U32 42786 ]; - Value.Tuple [ Value.UnicodeChar 42789; Value.Integer Integer.U32 42788 ]; - Value.Tuple [ Value.UnicodeChar 42791; Value.Integer Integer.U32 42790 ]; - Value.Tuple [ Value.UnicodeChar 42793; Value.Integer Integer.U32 42792 ]; - Value.Tuple [ Value.UnicodeChar 42795; Value.Integer Integer.U32 42794 ]; - Value.Tuple [ Value.UnicodeChar 42797; Value.Integer Integer.U32 42796 ]; - Value.Tuple [ Value.UnicodeChar 42799; Value.Integer Integer.U32 42798 ]; - Value.Tuple [ Value.UnicodeChar 42803; Value.Integer Integer.U32 42802 ]; - Value.Tuple [ Value.UnicodeChar 42805; Value.Integer Integer.U32 42804 ]; - Value.Tuple [ Value.UnicodeChar 42807; Value.Integer Integer.U32 42806 ]; - Value.Tuple [ Value.UnicodeChar 42809; Value.Integer Integer.U32 42808 ]; - Value.Tuple [ Value.UnicodeChar 42811; Value.Integer Integer.U32 42810 ]; - Value.Tuple [ Value.UnicodeChar 42813; Value.Integer Integer.U32 42812 ]; - Value.Tuple [ Value.UnicodeChar 42815; Value.Integer Integer.U32 42814 ]; - Value.Tuple [ Value.UnicodeChar 42817; Value.Integer Integer.U32 42816 ]; - Value.Tuple [ Value.UnicodeChar 42819; Value.Integer Integer.U32 42818 ]; - Value.Tuple [ Value.UnicodeChar 42821; Value.Integer Integer.U32 42820 ]; - Value.Tuple [ Value.UnicodeChar 42823; Value.Integer Integer.U32 42822 ]; - Value.Tuple [ Value.UnicodeChar 42825; Value.Integer Integer.U32 42824 ]; - Value.Tuple [ Value.UnicodeChar 42827; Value.Integer Integer.U32 42826 ]; - Value.Tuple [ Value.UnicodeChar 42829; Value.Integer Integer.U32 42828 ]; - Value.Tuple [ Value.UnicodeChar 42831; Value.Integer Integer.U32 42830 ]; - Value.Tuple [ Value.UnicodeChar 42833; Value.Integer Integer.U32 42832 ]; - Value.Tuple [ Value.UnicodeChar 42835; Value.Integer Integer.U32 42834 ]; - Value.Tuple [ Value.UnicodeChar 42837; Value.Integer Integer.U32 42836 ]; - Value.Tuple [ Value.UnicodeChar 42839; Value.Integer Integer.U32 42838 ]; - Value.Tuple [ Value.UnicodeChar 42841; Value.Integer Integer.U32 42840 ]; - Value.Tuple [ Value.UnicodeChar 42843; Value.Integer Integer.U32 42842 ]; - Value.Tuple [ Value.UnicodeChar 42845; Value.Integer Integer.U32 42844 ]; - Value.Tuple [ Value.UnicodeChar 42847; Value.Integer Integer.U32 42846 ]; - Value.Tuple [ Value.UnicodeChar 42849; Value.Integer Integer.U32 42848 ]; - Value.Tuple [ Value.UnicodeChar 42851; Value.Integer Integer.U32 42850 ]; - Value.Tuple [ Value.UnicodeChar 42853; Value.Integer Integer.U32 42852 ]; - Value.Tuple [ Value.UnicodeChar 42855; Value.Integer Integer.U32 42854 ]; - Value.Tuple [ Value.UnicodeChar 42857; Value.Integer Integer.U32 42856 ]; - Value.Tuple [ Value.UnicodeChar 42859; Value.Integer Integer.U32 42858 ]; - Value.Tuple [ Value.UnicodeChar 42861; Value.Integer Integer.U32 42860 ]; - Value.Tuple [ Value.UnicodeChar 42863; Value.Integer Integer.U32 42862 ]; - Value.Tuple [ Value.UnicodeChar 42874; Value.Integer Integer.U32 42873 ]; - Value.Tuple [ Value.UnicodeChar 42876; Value.Integer Integer.U32 42875 ]; - Value.Tuple [ Value.UnicodeChar 42879; Value.Integer Integer.U32 42878 ]; - Value.Tuple [ Value.UnicodeChar 42881; Value.Integer Integer.U32 42880 ]; - Value.Tuple [ Value.UnicodeChar 42883; Value.Integer Integer.U32 42882 ]; - Value.Tuple [ Value.UnicodeChar 42885; Value.Integer Integer.U32 42884 ]; - Value.Tuple [ Value.UnicodeChar 42887; Value.Integer Integer.U32 42886 ]; - Value.Tuple [ Value.UnicodeChar 42892; Value.Integer Integer.U32 42891 ]; - Value.Tuple [ Value.UnicodeChar 42897; Value.Integer Integer.U32 42896 ]; - Value.Tuple [ Value.UnicodeChar 42899; Value.Integer Integer.U32 42898 ]; - Value.Tuple [ Value.UnicodeChar 42900; Value.Integer Integer.U32 42948 ]; - Value.Tuple [ Value.UnicodeChar 42903; Value.Integer Integer.U32 42902 ]; - Value.Tuple [ Value.UnicodeChar 42905; Value.Integer Integer.U32 42904 ]; - Value.Tuple [ Value.UnicodeChar 42907; Value.Integer Integer.U32 42906 ]; - Value.Tuple [ Value.UnicodeChar 42909; Value.Integer Integer.U32 42908 ]; - Value.Tuple [ Value.UnicodeChar 42911; Value.Integer Integer.U32 42910 ]; - Value.Tuple [ Value.UnicodeChar 42913; Value.Integer Integer.U32 42912 ]; - Value.Tuple [ Value.UnicodeChar 42915; Value.Integer Integer.U32 42914 ]; - Value.Tuple [ Value.UnicodeChar 42917; Value.Integer Integer.U32 42916 ]; - Value.Tuple [ Value.UnicodeChar 42919; Value.Integer Integer.U32 42918 ]; - Value.Tuple [ Value.UnicodeChar 42921; Value.Integer Integer.U32 42920 ]; - Value.Tuple [ Value.UnicodeChar 42933; Value.Integer Integer.U32 42932 ]; - Value.Tuple [ Value.UnicodeChar 42935; Value.Integer Integer.U32 42934 ]; - Value.Tuple [ Value.UnicodeChar 42937; Value.Integer Integer.U32 42936 ]; - Value.Tuple [ Value.UnicodeChar 42939; Value.Integer Integer.U32 42938 ]; - Value.Tuple [ Value.UnicodeChar 42941; Value.Integer Integer.U32 42940 ]; - Value.Tuple [ Value.UnicodeChar 42943; Value.Integer Integer.U32 42942 ]; - Value.Tuple [ Value.UnicodeChar 42945; Value.Integer Integer.U32 42944 ]; - Value.Tuple [ Value.UnicodeChar 42947; Value.Integer Integer.U32 42946 ]; - Value.Tuple [ Value.UnicodeChar 42952; Value.Integer Integer.U32 42951 ]; - Value.Tuple [ Value.UnicodeChar 42954; Value.Integer Integer.U32 42953 ]; - Value.Tuple [ Value.UnicodeChar 42961; Value.Integer Integer.U32 42960 ]; - Value.Tuple [ Value.UnicodeChar 42967; Value.Integer Integer.U32 42966 ]; - Value.Tuple [ Value.UnicodeChar 42969; Value.Integer Integer.U32 42968 ]; - Value.Tuple [ Value.UnicodeChar 42998; Value.Integer Integer.U32 42997 ]; - Value.Tuple [ Value.UnicodeChar 43859; Value.Integer Integer.U32 42931 ]; - Value.Tuple [ Value.UnicodeChar 43888; Value.Integer Integer.U32 5024 ]; - Value.Tuple [ Value.UnicodeChar 43889; Value.Integer Integer.U32 5025 ]; - Value.Tuple [ Value.UnicodeChar 43890; Value.Integer Integer.U32 5026 ]; - Value.Tuple [ Value.UnicodeChar 43891; Value.Integer Integer.U32 5027 ]; - Value.Tuple [ Value.UnicodeChar 43892; Value.Integer Integer.U32 5028 ]; - Value.Tuple [ Value.UnicodeChar 43893; Value.Integer Integer.U32 5029 ]; - Value.Tuple [ Value.UnicodeChar 43894; Value.Integer Integer.U32 5030 ]; - Value.Tuple [ Value.UnicodeChar 43895; Value.Integer Integer.U32 5031 ]; - Value.Tuple [ Value.UnicodeChar 43896; Value.Integer Integer.U32 5032 ]; - Value.Tuple [ Value.UnicodeChar 43897; Value.Integer Integer.U32 5033 ]; - Value.Tuple [ Value.UnicodeChar 43898; Value.Integer Integer.U32 5034 ]; - Value.Tuple [ Value.UnicodeChar 43899; Value.Integer Integer.U32 5035 ]; - Value.Tuple [ Value.UnicodeChar 43900; Value.Integer Integer.U32 5036 ]; - Value.Tuple [ Value.UnicodeChar 43901; Value.Integer Integer.U32 5037 ]; - Value.Tuple [ Value.UnicodeChar 43902; Value.Integer Integer.U32 5038 ]; - Value.Tuple [ Value.UnicodeChar 43903; Value.Integer Integer.U32 5039 ]; - Value.Tuple [ Value.UnicodeChar 43904; Value.Integer Integer.U32 5040 ]; - Value.Tuple [ Value.UnicodeChar 43905; Value.Integer Integer.U32 5041 ]; - Value.Tuple [ Value.UnicodeChar 43906; Value.Integer Integer.U32 5042 ]; - Value.Tuple [ Value.UnicodeChar 43907; Value.Integer Integer.U32 5043 ]; - Value.Tuple [ Value.UnicodeChar 43908; Value.Integer Integer.U32 5044 ]; - Value.Tuple [ Value.UnicodeChar 43909; Value.Integer Integer.U32 5045 ]; - Value.Tuple [ Value.UnicodeChar 43910; Value.Integer Integer.U32 5046 ]; - Value.Tuple [ Value.UnicodeChar 43911; Value.Integer Integer.U32 5047 ]; - Value.Tuple [ Value.UnicodeChar 43912; Value.Integer Integer.U32 5048 ]; - Value.Tuple [ Value.UnicodeChar 43913; Value.Integer Integer.U32 5049 ]; - Value.Tuple [ Value.UnicodeChar 43914; Value.Integer Integer.U32 5050 ]; - Value.Tuple [ Value.UnicodeChar 43915; Value.Integer Integer.U32 5051 ]; - Value.Tuple [ Value.UnicodeChar 43916; Value.Integer Integer.U32 5052 ]; - Value.Tuple [ Value.UnicodeChar 43917; Value.Integer Integer.U32 5053 ]; - Value.Tuple [ Value.UnicodeChar 43918; Value.Integer Integer.U32 5054 ]; - Value.Tuple [ Value.UnicodeChar 43919; Value.Integer Integer.U32 5055 ]; - Value.Tuple [ Value.UnicodeChar 43920; Value.Integer Integer.U32 5056 ]; - Value.Tuple [ Value.UnicodeChar 43921; Value.Integer Integer.U32 5057 ]; - Value.Tuple [ Value.UnicodeChar 43922; Value.Integer Integer.U32 5058 ]; - Value.Tuple [ Value.UnicodeChar 43923; Value.Integer Integer.U32 5059 ]; - Value.Tuple [ Value.UnicodeChar 43924; Value.Integer Integer.U32 5060 ]; - Value.Tuple [ Value.UnicodeChar 43925; Value.Integer Integer.U32 5061 ]; - Value.Tuple [ Value.UnicodeChar 43926; Value.Integer Integer.U32 5062 ]; - Value.Tuple [ Value.UnicodeChar 43927; Value.Integer Integer.U32 5063 ]; - Value.Tuple [ Value.UnicodeChar 43928; Value.Integer Integer.U32 5064 ]; - Value.Tuple [ Value.UnicodeChar 43929; Value.Integer Integer.U32 5065 ]; - Value.Tuple [ Value.UnicodeChar 43930; Value.Integer Integer.U32 5066 ]; - Value.Tuple [ Value.UnicodeChar 43931; Value.Integer Integer.U32 5067 ]; - Value.Tuple [ Value.UnicodeChar 43932; Value.Integer Integer.U32 5068 ]; - Value.Tuple [ Value.UnicodeChar 43933; Value.Integer Integer.U32 5069 ]; - Value.Tuple [ Value.UnicodeChar 43934; Value.Integer Integer.U32 5070 ]; - Value.Tuple [ Value.UnicodeChar 43935; Value.Integer Integer.U32 5071 ]; - Value.Tuple [ Value.UnicodeChar 43936; Value.Integer Integer.U32 5072 ]; - Value.Tuple [ Value.UnicodeChar 43937; Value.Integer Integer.U32 5073 ]; - Value.Tuple [ Value.UnicodeChar 43938; Value.Integer Integer.U32 5074 ]; - Value.Tuple [ Value.UnicodeChar 43939; Value.Integer Integer.U32 5075 ]; - Value.Tuple [ Value.UnicodeChar 43940; Value.Integer Integer.U32 5076 ]; - Value.Tuple [ Value.UnicodeChar 43941; Value.Integer Integer.U32 5077 ]; - Value.Tuple [ Value.UnicodeChar 43942; Value.Integer Integer.U32 5078 ]; - Value.Tuple [ Value.UnicodeChar 43943; Value.Integer Integer.U32 5079 ]; - Value.Tuple [ Value.UnicodeChar 43944; Value.Integer Integer.U32 5080 ]; - Value.Tuple [ Value.UnicodeChar 43945; Value.Integer Integer.U32 5081 ]; - Value.Tuple [ Value.UnicodeChar 43946; Value.Integer Integer.U32 5082 ]; - Value.Tuple [ Value.UnicodeChar 43947; Value.Integer Integer.U32 5083 ]; - Value.Tuple [ Value.UnicodeChar 43948; Value.Integer Integer.U32 5084 ]; - Value.Tuple [ Value.UnicodeChar 43949; Value.Integer Integer.U32 5085 ]; - Value.Tuple [ Value.UnicodeChar 43950; Value.Integer Integer.U32 5086 ]; - Value.Tuple [ Value.UnicodeChar 43951; Value.Integer Integer.U32 5087 ]; - Value.Tuple [ Value.UnicodeChar 43952; Value.Integer Integer.U32 5088 ]; - Value.Tuple [ Value.UnicodeChar 43953; Value.Integer Integer.U32 5089 ]; - Value.Tuple [ Value.UnicodeChar 43954; Value.Integer Integer.U32 5090 ]; - Value.Tuple [ Value.UnicodeChar 43955; Value.Integer Integer.U32 5091 ]; - Value.Tuple [ Value.UnicodeChar 43956; Value.Integer Integer.U32 5092 ]; - Value.Tuple [ Value.UnicodeChar 43957; Value.Integer Integer.U32 5093 ]; - Value.Tuple [ Value.UnicodeChar 43958; Value.Integer Integer.U32 5094 ]; - Value.Tuple [ Value.UnicodeChar 43959; Value.Integer Integer.U32 5095 ]; - Value.Tuple [ Value.UnicodeChar 43960; Value.Integer Integer.U32 5096 ]; - Value.Tuple [ Value.UnicodeChar 43961; Value.Integer Integer.U32 5097 ]; - Value.Tuple [ Value.UnicodeChar 43962; Value.Integer Integer.U32 5098 ]; - Value.Tuple [ Value.UnicodeChar 43963; Value.Integer Integer.U32 5099 ]; - Value.Tuple [ Value.UnicodeChar 43964; Value.Integer Integer.U32 5100 ]; - Value.Tuple [ Value.UnicodeChar 43965; Value.Integer Integer.U32 5101 ]; - Value.Tuple [ Value.UnicodeChar 43966; Value.Integer Integer.U32 5102 ]; - Value.Tuple [ Value.UnicodeChar 43967; Value.Integer Integer.U32 5103 ]; - Value.Tuple [ Value.UnicodeChar 64256; Value.Integer Integer.U32 4194394 ]; - Value.Tuple [ Value.UnicodeChar 64257; Value.Integer Integer.U32 4194395 ]; - Value.Tuple [ Value.UnicodeChar 64258; Value.Integer Integer.U32 4194396 ]; - Value.Tuple [ Value.UnicodeChar 64259; Value.Integer Integer.U32 4194397 ]; - Value.Tuple [ Value.UnicodeChar 64260; Value.Integer Integer.U32 4194398 ]; - Value.Tuple [ Value.UnicodeChar 64261; Value.Integer Integer.U32 4194399 ]; - Value.Tuple [ Value.UnicodeChar 64262; Value.Integer Integer.U32 4194400 ]; - Value.Tuple [ Value.UnicodeChar 64275; Value.Integer Integer.U32 4194401 ]; - Value.Tuple [ Value.UnicodeChar 64276; Value.Integer Integer.U32 4194402 ]; - Value.Tuple [ Value.UnicodeChar 64277; Value.Integer Integer.U32 4194403 ]; - Value.Tuple [ Value.UnicodeChar 64278; Value.Integer Integer.U32 4194404 ]; - Value.Tuple [ Value.UnicodeChar 64279; Value.Integer Integer.U32 4194405 ]; - Value.Tuple [ Value.UnicodeChar 65345; Value.Integer Integer.U32 65313 ]; - Value.Tuple [ Value.UnicodeChar 65346; Value.Integer Integer.U32 65314 ]; - Value.Tuple [ Value.UnicodeChar 65347; Value.Integer Integer.U32 65315 ]; - Value.Tuple [ Value.UnicodeChar 65348; Value.Integer Integer.U32 65316 ]; - Value.Tuple [ Value.UnicodeChar 65349; Value.Integer Integer.U32 65317 ]; - Value.Tuple [ Value.UnicodeChar 65350; Value.Integer Integer.U32 65318 ]; - Value.Tuple [ Value.UnicodeChar 65351; Value.Integer Integer.U32 65319 ]; - Value.Tuple [ Value.UnicodeChar 65352; Value.Integer Integer.U32 65320 ]; - Value.Tuple [ Value.UnicodeChar 65353; Value.Integer Integer.U32 65321 ]; - Value.Tuple [ Value.UnicodeChar 65354; Value.Integer Integer.U32 65322 ]; - Value.Tuple [ Value.UnicodeChar 65355; Value.Integer Integer.U32 65323 ]; - Value.Tuple [ Value.UnicodeChar 65356; Value.Integer Integer.U32 65324 ]; - Value.Tuple [ Value.UnicodeChar 65357; Value.Integer Integer.U32 65325 ]; - Value.Tuple [ Value.UnicodeChar 65358; Value.Integer Integer.U32 65326 ]; - Value.Tuple [ Value.UnicodeChar 65359; Value.Integer Integer.U32 65327 ]; - Value.Tuple [ Value.UnicodeChar 65360; Value.Integer Integer.U32 65328 ]; - Value.Tuple [ Value.UnicodeChar 65361; Value.Integer Integer.U32 65329 ]; - Value.Tuple [ Value.UnicodeChar 65362; Value.Integer Integer.U32 65330 ]; - Value.Tuple [ Value.UnicodeChar 65363; Value.Integer Integer.U32 65331 ]; - Value.Tuple [ Value.UnicodeChar 65364; Value.Integer Integer.U32 65332 ]; - Value.Tuple [ Value.UnicodeChar 65365; Value.Integer Integer.U32 65333 ]; - Value.Tuple [ Value.UnicodeChar 65366; Value.Integer Integer.U32 65334 ]; - Value.Tuple [ Value.UnicodeChar 65367; Value.Integer Integer.U32 65335 ]; - Value.Tuple [ Value.UnicodeChar 65368; Value.Integer Integer.U32 65336 ]; - Value.Tuple [ Value.UnicodeChar 65369; Value.Integer Integer.U32 65337 ]; - Value.Tuple [ Value.UnicodeChar 65370; Value.Integer Integer.U32 65338 ]; - Value.Tuple [ Value.UnicodeChar 66600; Value.Integer Integer.U32 66560 ]; - Value.Tuple [ Value.UnicodeChar 66601; Value.Integer Integer.U32 66561 ]; - Value.Tuple [ Value.UnicodeChar 66602; Value.Integer Integer.U32 66562 ]; - Value.Tuple [ Value.UnicodeChar 66603; Value.Integer Integer.U32 66563 ]; - Value.Tuple [ Value.UnicodeChar 66604; Value.Integer Integer.U32 66564 ]; - Value.Tuple [ Value.UnicodeChar 66605; Value.Integer Integer.U32 66565 ]; - Value.Tuple [ Value.UnicodeChar 66606; Value.Integer Integer.U32 66566 ]; - Value.Tuple [ Value.UnicodeChar 66607; Value.Integer Integer.U32 66567 ]; - Value.Tuple [ Value.UnicodeChar 66608; Value.Integer Integer.U32 66568 ]; - Value.Tuple [ Value.UnicodeChar 66609; Value.Integer Integer.U32 66569 ]; - Value.Tuple [ Value.UnicodeChar 66610; Value.Integer Integer.U32 66570 ]; - Value.Tuple [ Value.UnicodeChar 66611; Value.Integer Integer.U32 66571 ]; - Value.Tuple [ Value.UnicodeChar 66612; Value.Integer Integer.U32 66572 ]; - Value.Tuple [ Value.UnicodeChar 66613; Value.Integer Integer.U32 66573 ]; - Value.Tuple [ Value.UnicodeChar 66614; Value.Integer Integer.U32 66574 ]; - Value.Tuple [ Value.UnicodeChar 66615; Value.Integer Integer.U32 66575 ]; - Value.Tuple [ Value.UnicodeChar 66616; Value.Integer Integer.U32 66576 ]; - Value.Tuple [ Value.UnicodeChar 66617; Value.Integer Integer.U32 66577 ]; - Value.Tuple [ Value.UnicodeChar 66618; Value.Integer Integer.U32 66578 ]; - Value.Tuple [ Value.UnicodeChar 66619; Value.Integer Integer.U32 66579 ]; - Value.Tuple [ Value.UnicodeChar 66620; Value.Integer Integer.U32 66580 ]; - Value.Tuple [ Value.UnicodeChar 66621; Value.Integer Integer.U32 66581 ]; - Value.Tuple [ Value.UnicodeChar 66622; Value.Integer Integer.U32 66582 ]; - Value.Tuple [ Value.UnicodeChar 66623; Value.Integer Integer.U32 66583 ]; - Value.Tuple [ Value.UnicodeChar 66624; Value.Integer Integer.U32 66584 ]; - Value.Tuple [ Value.UnicodeChar 66625; Value.Integer Integer.U32 66585 ]; - Value.Tuple [ Value.UnicodeChar 66626; Value.Integer Integer.U32 66586 ]; - Value.Tuple [ Value.UnicodeChar 66627; Value.Integer Integer.U32 66587 ]; - Value.Tuple [ Value.UnicodeChar 66628; Value.Integer Integer.U32 66588 ]; - Value.Tuple [ Value.UnicodeChar 66629; Value.Integer Integer.U32 66589 ]; - Value.Tuple [ Value.UnicodeChar 66630; Value.Integer Integer.U32 66590 ]; - Value.Tuple [ Value.UnicodeChar 66631; Value.Integer Integer.U32 66591 ]; - Value.Tuple [ Value.UnicodeChar 66632; Value.Integer Integer.U32 66592 ]; - Value.Tuple [ Value.UnicodeChar 66633; Value.Integer Integer.U32 66593 ]; - Value.Tuple [ Value.UnicodeChar 66634; Value.Integer Integer.U32 66594 ]; - Value.Tuple [ Value.UnicodeChar 66635; Value.Integer Integer.U32 66595 ]; - Value.Tuple [ Value.UnicodeChar 66636; Value.Integer Integer.U32 66596 ]; - Value.Tuple [ Value.UnicodeChar 66637; Value.Integer Integer.U32 66597 ]; - Value.Tuple [ Value.UnicodeChar 66638; Value.Integer Integer.U32 66598 ]; - Value.Tuple [ Value.UnicodeChar 66639; Value.Integer Integer.U32 66599 ]; - Value.Tuple [ Value.UnicodeChar 66776; Value.Integer Integer.U32 66736 ]; - Value.Tuple [ Value.UnicodeChar 66777; Value.Integer Integer.U32 66737 ]; - Value.Tuple [ Value.UnicodeChar 66778; Value.Integer Integer.U32 66738 ]; - Value.Tuple [ Value.UnicodeChar 66779; Value.Integer Integer.U32 66739 ]; - Value.Tuple [ Value.UnicodeChar 66780; Value.Integer Integer.U32 66740 ]; - Value.Tuple [ Value.UnicodeChar 66781; Value.Integer Integer.U32 66741 ]; - Value.Tuple [ Value.UnicodeChar 66782; Value.Integer Integer.U32 66742 ]; - Value.Tuple [ Value.UnicodeChar 66783; Value.Integer Integer.U32 66743 ]; - Value.Tuple [ Value.UnicodeChar 66784; Value.Integer Integer.U32 66744 ]; - Value.Tuple [ Value.UnicodeChar 66785; Value.Integer Integer.U32 66745 ]; - Value.Tuple [ Value.UnicodeChar 66786; Value.Integer Integer.U32 66746 ]; - Value.Tuple [ Value.UnicodeChar 66787; Value.Integer Integer.U32 66747 ]; - Value.Tuple [ Value.UnicodeChar 66788; Value.Integer Integer.U32 66748 ]; - Value.Tuple [ Value.UnicodeChar 66789; Value.Integer Integer.U32 66749 ]; - Value.Tuple [ Value.UnicodeChar 66790; Value.Integer Integer.U32 66750 ]; - Value.Tuple [ Value.UnicodeChar 66791; Value.Integer Integer.U32 66751 ]; - Value.Tuple [ Value.UnicodeChar 66792; Value.Integer Integer.U32 66752 ]; - Value.Tuple [ Value.UnicodeChar 66793; Value.Integer Integer.U32 66753 ]; - Value.Tuple [ Value.UnicodeChar 66794; Value.Integer Integer.U32 66754 ]; - Value.Tuple [ Value.UnicodeChar 66795; Value.Integer Integer.U32 66755 ]; - Value.Tuple [ Value.UnicodeChar 66796; Value.Integer Integer.U32 66756 ]; - Value.Tuple [ Value.UnicodeChar 66797; Value.Integer Integer.U32 66757 ]; - Value.Tuple [ Value.UnicodeChar 66798; Value.Integer Integer.U32 66758 ]; - Value.Tuple [ Value.UnicodeChar 66799; Value.Integer Integer.U32 66759 ]; - Value.Tuple [ Value.UnicodeChar 66800; Value.Integer Integer.U32 66760 ]; - Value.Tuple [ Value.UnicodeChar 66801; Value.Integer Integer.U32 66761 ]; - Value.Tuple [ Value.UnicodeChar 66802; Value.Integer Integer.U32 66762 ]; - Value.Tuple [ Value.UnicodeChar 66803; Value.Integer Integer.U32 66763 ]; - Value.Tuple [ Value.UnicodeChar 66804; Value.Integer Integer.U32 66764 ]; - Value.Tuple [ Value.UnicodeChar 66805; Value.Integer Integer.U32 66765 ]; - Value.Tuple [ Value.UnicodeChar 66806; Value.Integer Integer.U32 66766 ]; - Value.Tuple [ Value.UnicodeChar 66807; Value.Integer Integer.U32 66767 ]; - Value.Tuple [ Value.UnicodeChar 66808; Value.Integer Integer.U32 66768 ]; - Value.Tuple [ Value.UnicodeChar 66809; Value.Integer Integer.U32 66769 ]; - Value.Tuple [ Value.UnicodeChar 66810; Value.Integer Integer.U32 66770 ]; - Value.Tuple [ Value.UnicodeChar 66811; Value.Integer Integer.U32 66771 ]; - Value.Tuple [ Value.UnicodeChar 66967; Value.Integer Integer.U32 66928 ]; - Value.Tuple [ Value.UnicodeChar 66968; Value.Integer Integer.U32 66929 ]; - Value.Tuple [ Value.UnicodeChar 66969; Value.Integer Integer.U32 66930 ]; - Value.Tuple [ Value.UnicodeChar 66970; Value.Integer Integer.U32 66931 ]; - Value.Tuple [ Value.UnicodeChar 66971; Value.Integer Integer.U32 66932 ]; - Value.Tuple [ Value.UnicodeChar 66972; Value.Integer Integer.U32 66933 ]; - Value.Tuple [ Value.UnicodeChar 66973; Value.Integer Integer.U32 66934 ]; - Value.Tuple [ Value.UnicodeChar 66974; Value.Integer Integer.U32 66935 ]; - Value.Tuple [ Value.UnicodeChar 66975; Value.Integer Integer.U32 66936 ]; - Value.Tuple [ Value.UnicodeChar 66976; Value.Integer Integer.U32 66937 ]; - Value.Tuple [ Value.UnicodeChar 66977; Value.Integer Integer.U32 66938 ]; - Value.Tuple [ Value.UnicodeChar 66979; Value.Integer Integer.U32 66940 ]; - Value.Tuple [ Value.UnicodeChar 66980; Value.Integer Integer.U32 66941 ]; - Value.Tuple [ Value.UnicodeChar 66981; Value.Integer Integer.U32 66942 ]; - Value.Tuple [ Value.UnicodeChar 66982; Value.Integer Integer.U32 66943 ]; - Value.Tuple [ Value.UnicodeChar 66983; Value.Integer Integer.U32 66944 ]; - Value.Tuple [ Value.UnicodeChar 66984; Value.Integer Integer.U32 66945 ]; - Value.Tuple [ Value.UnicodeChar 66985; Value.Integer Integer.U32 66946 ]; - Value.Tuple [ Value.UnicodeChar 66986; Value.Integer Integer.U32 66947 ]; - Value.Tuple [ Value.UnicodeChar 66987; Value.Integer Integer.U32 66948 ]; - Value.Tuple [ Value.UnicodeChar 66988; Value.Integer Integer.U32 66949 ]; - Value.Tuple [ Value.UnicodeChar 66989; Value.Integer Integer.U32 66950 ]; - Value.Tuple [ Value.UnicodeChar 66990; Value.Integer Integer.U32 66951 ]; - Value.Tuple [ Value.UnicodeChar 66991; Value.Integer Integer.U32 66952 ]; - Value.Tuple [ Value.UnicodeChar 66992; Value.Integer Integer.U32 66953 ]; - Value.Tuple [ Value.UnicodeChar 66993; Value.Integer Integer.U32 66954 ]; - Value.Tuple [ Value.UnicodeChar 66995; Value.Integer Integer.U32 66956 ]; - Value.Tuple [ Value.UnicodeChar 66996; Value.Integer Integer.U32 66957 ]; - Value.Tuple [ Value.UnicodeChar 66997; Value.Integer Integer.U32 66958 ]; - Value.Tuple [ Value.UnicodeChar 66998; Value.Integer Integer.U32 66959 ]; - Value.Tuple [ Value.UnicodeChar 66999; Value.Integer Integer.U32 66960 ]; - Value.Tuple [ Value.UnicodeChar 67000; Value.Integer Integer.U32 66961 ]; - Value.Tuple [ Value.UnicodeChar 67001; Value.Integer Integer.U32 66962 ]; - Value.Tuple [ Value.UnicodeChar 67003; Value.Integer Integer.U32 66964 ]; - Value.Tuple [ Value.UnicodeChar 67004; Value.Integer Integer.U32 66965 ]; - Value.Tuple [ Value.UnicodeChar 68800; Value.Integer Integer.U32 68736 ]; - Value.Tuple [ Value.UnicodeChar 68801; Value.Integer Integer.U32 68737 ]; - Value.Tuple [ Value.UnicodeChar 68802; Value.Integer Integer.U32 68738 ]; - Value.Tuple [ Value.UnicodeChar 68803; Value.Integer Integer.U32 68739 ]; - Value.Tuple [ Value.UnicodeChar 68804; Value.Integer Integer.U32 68740 ]; - Value.Tuple [ Value.UnicodeChar 68805; Value.Integer Integer.U32 68741 ]; - Value.Tuple [ Value.UnicodeChar 68806; Value.Integer Integer.U32 68742 ]; - Value.Tuple [ Value.UnicodeChar 68807; Value.Integer Integer.U32 68743 ]; - Value.Tuple [ Value.UnicodeChar 68808; Value.Integer Integer.U32 68744 ]; - Value.Tuple [ Value.UnicodeChar 68809; Value.Integer Integer.U32 68745 ]; - Value.Tuple [ Value.UnicodeChar 68810; Value.Integer Integer.U32 68746 ]; - Value.Tuple [ Value.UnicodeChar 68811; Value.Integer Integer.U32 68747 ]; - Value.Tuple [ Value.UnicodeChar 68812; Value.Integer Integer.U32 68748 ]; - Value.Tuple [ Value.UnicodeChar 68813; Value.Integer Integer.U32 68749 ]; - Value.Tuple [ Value.UnicodeChar 68814; Value.Integer Integer.U32 68750 ]; - Value.Tuple [ Value.UnicodeChar 68815; Value.Integer Integer.U32 68751 ]; - Value.Tuple [ Value.UnicodeChar 68816; Value.Integer Integer.U32 68752 ]; - Value.Tuple [ Value.UnicodeChar 68817; Value.Integer Integer.U32 68753 ]; - Value.Tuple [ Value.UnicodeChar 68818; Value.Integer Integer.U32 68754 ]; - Value.Tuple [ Value.UnicodeChar 68819; Value.Integer Integer.U32 68755 ]; - Value.Tuple [ Value.UnicodeChar 68820; Value.Integer Integer.U32 68756 ]; - Value.Tuple [ Value.UnicodeChar 68821; Value.Integer Integer.U32 68757 ]; - Value.Tuple [ Value.UnicodeChar 68822; Value.Integer Integer.U32 68758 ]; - Value.Tuple [ Value.UnicodeChar 68823; Value.Integer Integer.U32 68759 ]; - Value.Tuple [ Value.UnicodeChar 68824; Value.Integer Integer.U32 68760 ]; - Value.Tuple [ Value.UnicodeChar 68825; Value.Integer Integer.U32 68761 ]; - Value.Tuple [ Value.UnicodeChar 68826; Value.Integer Integer.U32 68762 ]; - Value.Tuple [ Value.UnicodeChar 68827; Value.Integer Integer.U32 68763 ]; - Value.Tuple [ Value.UnicodeChar 68828; Value.Integer Integer.U32 68764 ]; - Value.Tuple [ Value.UnicodeChar 68829; Value.Integer Integer.U32 68765 ]; - Value.Tuple [ Value.UnicodeChar 68830; Value.Integer Integer.U32 68766 ]; - Value.Tuple [ Value.UnicodeChar 68831; Value.Integer Integer.U32 68767 ]; - Value.Tuple [ Value.UnicodeChar 68832; Value.Integer Integer.U32 68768 ]; - Value.Tuple [ Value.UnicodeChar 68833; Value.Integer Integer.U32 68769 ]; - Value.Tuple [ Value.UnicodeChar 68834; Value.Integer Integer.U32 68770 ]; - Value.Tuple [ Value.UnicodeChar 68835; Value.Integer Integer.U32 68771 ]; - Value.Tuple [ Value.UnicodeChar 68836; Value.Integer Integer.U32 68772 ]; - Value.Tuple [ Value.UnicodeChar 68837; Value.Integer Integer.U32 68773 ]; - Value.Tuple [ Value.UnicodeChar 68838; Value.Integer Integer.U32 68774 ]; - Value.Tuple [ Value.UnicodeChar 68839; Value.Integer Integer.U32 68775 ]; - Value.Tuple [ Value.UnicodeChar 68840; Value.Integer Integer.U32 68776 ]; - Value.Tuple [ Value.UnicodeChar 68841; Value.Integer Integer.U32 68777 ]; - Value.Tuple [ Value.UnicodeChar 68842; Value.Integer Integer.U32 68778 ]; - Value.Tuple [ Value.UnicodeChar 68843; Value.Integer Integer.U32 68779 ]; - Value.Tuple [ Value.UnicodeChar 68844; Value.Integer Integer.U32 68780 ]; - Value.Tuple [ Value.UnicodeChar 68845; Value.Integer Integer.U32 68781 ]; - Value.Tuple [ Value.UnicodeChar 68846; Value.Integer Integer.U32 68782 ]; - Value.Tuple [ Value.UnicodeChar 68847; Value.Integer Integer.U32 68783 ]; - Value.Tuple [ Value.UnicodeChar 68848; Value.Integer Integer.U32 68784 ]; - Value.Tuple [ Value.UnicodeChar 68849; Value.Integer Integer.U32 68785 ]; - Value.Tuple [ Value.UnicodeChar 68850; Value.Integer Integer.U32 68786 ]; - Value.Tuple [ Value.UnicodeChar 71872; Value.Integer Integer.U32 71840 ]; - Value.Tuple [ Value.UnicodeChar 71873; Value.Integer Integer.U32 71841 ]; - Value.Tuple [ Value.UnicodeChar 71874; Value.Integer Integer.U32 71842 ]; - Value.Tuple [ Value.UnicodeChar 71875; Value.Integer Integer.U32 71843 ]; - Value.Tuple [ Value.UnicodeChar 71876; Value.Integer Integer.U32 71844 ]; - Value.Tuple [ Value.UnicodeChar 71877; Value.Integer Integer.U32 71845 ]; - Value.Tuple [ Value.UnicodeChar 71878; Value.Integer Integer.U32 71846 ]; - Value.Tuple [ Value.UnicodeChar 71879; Value.Integer Integer.U32 71847 ]; - Value.Tuple [ Value.UnicodeChar 71880; Value.Integer Integer.U32 71848 ]; - Value.Tuple [ Value.UnicodeChar 71881; Value.Integer Integer.U32 71849 ]; - Value.Tuple [ Value.UnicodeChar 71882; Value.Integer Integer.U32 71850 ]; - Value.Tuple [ Value.UnicodeChar 71883; Value.Integer Integer.U32 71851 ]; - Value.Tuple [ Value.UnicodeChar 71884; Value.Integer Integer.U32 71852 ]; - Value.Tuple [ Value.UnicodeChar 71885; Value.Integer Integer.U32 71853 ]; - Value.Tuple [ Value.UnicodeChar 71886; Value.Integer Integer.U32 71854 ]; - Value.Tuple [ Value.UnicodeChar 71887; Value.Integer Integer.U32 71855 ]; - Value.Tuple [ Value.UnicodeChar 71888; Value.Integer Integer.U32 71856 ]; - Value.Tuple [ Value.UnicodeChar 71889; Value.Integer Integer.U32 71857 ]; - Value.Tuple [ Value.UnicodeChar 71890; Value.Integer Integer.U32 71858 ]; - Value.Tuple [ Value.UnicodeChar 71891; Value.Integer Integer.U32 71859 ]; - Value.Tuple [ Value.UnicodeChar 71892; Value.Integer Integer.U32 71860 ]; - Value.Tuple [ Value.UnicodeChar 71893; Value.Integer Integer.U32 71861 ]; - Value.Tuple [ Value.UnicodeChar 71894; Value.Integer Integer.U32 71862 ]; - Value.Tuple [ Value.UnicodeChar 71895; Value.Integer Integer.U32 71863 ]; - Value.Tuple [ Value.UnicodeChar 71896; Value.Integer Integer.U32 71864 ]; - Value.Tuple [ Value.UnicodeChar 71897; Value.Integer Integer.U32 71865 ]; - Value.Tuple [ Value.UnicodeChar 71898; Value.Integer Integer.U32 71866 ]; - Value.Tuple [ Value.UnicodeChar 71899; Value.Integer Integer.U32 71867 ]; - Value.Tuple [ Value.UnicodeChar 71900; Value.Integer Integer.U32 71868 ]; - Value.Tuple [ Value.UnicodeChar 71901; Value.Integer Integer.U32 71869 ]; - Value.Tuple [ Value.UnicodeChar 71902; Value.Integer Integer.U32 71870 ]; - Value.Tuple [ Value.UnicodeChar 71903; Value.Integer Integer.U32 71871 ]; - Value.Tuple [ Value.UnicodeChar 93792; Value.Integer Integer.U32 93760 ]; - Value.Tuple [ Value.UnicodeChar 93793; Value.Integer Integer.U32 93761 ]; - Value.Tuple [ Value.UnicodeChar 93794; Value.Integer Integer.U32 93762 ]; - Value.Tuple [ Value.UnicodeChar 93795; Value.Integer Integer.U32 93763 ]; - Value.Tuple [ Value.UnicodeChar 93796; Value.Integer Integer.U32 93764 ]; - Value.Tuple [ Value.UnicodeChar 93797; Value.Integer Integer.U32 93765 ]; - Value.Tuple [ Value.UnicodeChar 93798; Value.Integer Integer.U32 93766 ]; - Value.Tuple [ Value.UnicodeChar 93799; Value.Integer Integer.U32 93767 ]; - Value.Tuple [ Value.UnicodeChar 93800; Value.Integer Integer.U32 93768 ]; - Value.Tuple [ Value.UnicodeChar 93801; Value.Integer Integer.U32 93769 ]; - Value.Tuple [ Value.UnicodeChar 93802; Value.Integer Integer.U32 93770 ]; - Value.Tuple [ Value.UnicodeChar 93803; Value.Integer Integer.U32 93771 ]; - Value.Tuple [ Value.UnicodeChar 93804; Value.Integer Integer.U32 93772 ]; - Value.Tuple [ Value.UnicodeChar 93805; Value.Integer Integer.U32 93773 ]; - Value.Tuple [ Value.UnicodeChar 93806; Value.Integer Integer.U32 93774 ]; - Value.Tuple [ Value.UnicodeChar 93807; Value.Integer Integer.U32 93775 ]; - Value.Tuple [ Value.UnicodeChar 93808; Value.Integer Integer.U32 93776 ]; - Value.Tuple [ Value.UnicodeChar 93809; Value.Integer Integer.U32 93777 ]; - Value.Tuple [ Value.UnicodeChar 93810; Value.Integer Integer.U32 93778 ]; - Value.Tuple [ Value.UnicodeChar 93811; Value.Integer Integer.U32 93779 ]; - Value.Tuple [ Value.UnicodeChar 93812; Value.Integer Integer.U32 93780 ]; - Value.Tuple [ Value.UnicodeChar 93813; Value.Integer Integer.U32 93781 ]; - Value.Tuple [ Value.UnicodeChar 93814; Value.Integer Integer.U32 93782 ]; - Value.Tuple [ Value.UnicodeChar 93815; Value.Integer Integer.U32 93783 ]; - Value.Tuple [ Value.UnicodeChar 93816; Value.Integer Integer.U32 93784 ]; - Value.Tuple [ Value.UnicodeChar 93817; Value.Integer Integer.U32 93785 ]; - Value.Tuple [ Value.UnicodeChar 93818; Value.Integer Integer.U32 93786 ]; - Value.Tuple [ Value.UnicodeChar 93819; Value.Integer Integer.U32 93787 ]; - Value.Tuple [ Value.UnicodeChar 93820; Value.Integer Integer.U32 93788 ]; - Value.Tuple [ Value.UnicodeChar 93821; Value.Integer Integer.U32 93789 ]; - Value.Tuple [ Value.UnicodeChar 93822; Value.Integer Integer.U32 93790 ]; - Value.Tuple [ Value.UnicodeChar 93823; Value.Integer Integer.U32 93791 ]; - Value.Tuple [ Value.UnicodeChar 125218; Value.Integer Integer.U32 125184 ]; - Value.Tuple [ Value.UnicodeChar 125219; Value.Integer Integer.U32 125185 ]; - Value.Tuple [ Value.UnicodeChar 125220; Value.Integer Integer.U32 125186 ]; - Value.Tuple [ Value.UnicodeChar 125221; Value.Integer Integer.U32 125187 ]; - Value.Tuple [ Value.UnicodeChar 125222; Value.Integer Integer.U32 125188 ]; - Value.Tuple [ Value.UnicodeChar 125223; Value.Integer Integer.U32 125189 ]; - Value.Tuple [ Value.UnicodeChar 125224; Value.Integer Integer.U32 125190 ]; - Value.Tuple [ Value.UnicodeChar 125225; Value.Integer Integer.U32 125191 ]; - Value.Tuple [ Value.UnicodeChar 125226; Value.Integer Integer.U32 125192 ]; - Value.Tuple [ Value.UnicodeChar 125227; Value.Integer Integer.U32 125193 ]; - Value.Tuple [ Value.UnicodeChar 125228; Value.Integer Integer.U32 125194 ]; - Value.Tuple [ Value.UnicodeChar 125229; Value.Integer Integer.U32 125195 ]; - Value.Tuple [ Value.UnicodeChar 125230; Value.Integer Integer.U32 125196 ]; - Value.Tuple [ Value.UnicodeChar 125231; Value.Integer Integer.U32 125197 ]; - Value.Tuple [ Value.UnicodeChar 125232; Value.Integer Integer.U32 125198 ]; - Value.Tuple [ Value.UnicodeChar 125233; Value.Integer Integer.U32 125199 ]; - Value.Tuple [ Value.UnicodeChar 125234; Value.Integer Integer.U32 125200 ]; - Value.Tuple [ Value.UnicodeChar 125235; Value.Integer Integer.U32 125201 ]; - Value.Tuple [ Value.UnicodeChar 125236; Value.Integer Integer.U32 125202 ]; - Value.Tuple [ Value.UnicodeChar 125237; Value.Integer Integer.U32 125203 ]; - Value.Tuple [ Value.UnicodeChar 125238; Value.Integer Integer.U32 125204 ]; - Value.Tuple [ Value.UnicodeChar 125239; Value.Integer Integer.U32 125205 ]; - Value.Tuple [ Value.UnicodeChar 125240; Value.Integer Integer.U32 125206 ]; - Value.Tuple [ Value.UnicodeChar 125241; Value.Integer Integer.U32 125207 ]; - Value.Tuple [ Value.UnicodeChar 125242; Value.Integer Integer.U32 125208 ]; - Value.Tuple [ Value.UnicodeChar 125243; Value.Integer Integer.U32 125209 ]; - Value.Tuple [ Value.UnicodeChar 125244; Value.Integer Integer.U32 125210 ]; - Value.Tuple [ Value.UnicodeChar 125245; Value.Integer Integer.U32 125211 ]; - Value.Tuple [ Value.UnicodeChar 125246; Value.Integer Integer.U32 125212 ]; - Value.Tuple [ Value.UnicodeChar 125247; Value.Integer Integer.U32 125213 ]; - Value.Tuple [ Value.UnicodeChar 125248; Value.Integer Integer.U32 125214 ]; - Value.Tuple [ Value.UnicodeChar 125249; Value.Integer Integer.U32 125215 ]; - Value.Tuple [ Value.UnicodeChar 125250; Value.Integer Integer.U32 125216 ]; - Value.Tuple [ Value.UnicodeChar 125251; Value.Integer Integer.U32 125217 ] - ] - |)) - |) - |))). - - Definition value_UPPERCASE_TABLE_MULTI : Value.t := - M.run - ltac:(M.monadic - (M.alloc (| - M.alloc (| - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - Value.Array - [ Value.UnicodeChar 83; Value.UnicodeChar 83; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 700; Value.UnicodeChar 78; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 74; Value.UnicodeChar 780; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 921; Value.UnicodeChar 776; Value.UnicodeChar 769 ]; - Value.Array - [ Value.UnicodeChar 933; Value.UnicodeChar 776; Value.UnicodeChar 769 ]; - Value.Array - [ Value.UnicodeChar 1333; Value.UnicodeChar 1362; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 72; Value.UnicodeChar 817; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 84; Value.UnicodeChar 776; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 87; Value.UnicodeChar 778; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 89; Value.UnicodeChar 778; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 65; Value.UnicodeChar 702; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 933; Value.UnicodeChar 787; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 933; Value.UnicodeChar 787; Value.UnicodeChar 768 ]; - Value.Array - [ Value.UnicodeChar 933; Value.UnicodeChar 787; Value.UnicodeChar 769 ]; - Value.Array - [ Value.UnicodeChar 933; Value.UnicodeChar 787; Value.UnicodeChar 834 ]; - Value.Array - [ Value.UnicodeChar 7944; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7945; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7946; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7947; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7948; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7949; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7950; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7951; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7944; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7945; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7946; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7947; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7948; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7949; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7950; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7951; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7976; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7977; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7978; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7979; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7980; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7981; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7982; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7983; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7976; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7977; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7978; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7979; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7980; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7981; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7982; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 7983; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8040; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8041; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8042; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8043; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8044; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8045; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8046; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8047; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8040; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8041; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8042; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8043; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8044; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8045; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8046; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8047; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8122; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 913; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 902; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 913; Value.UnicodeChar 834; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 913; Value.UnicodeChar 834; Value.UnicodeChar 921 ]; - Value.Array - [ Value.UnicodeChar 913; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 8138; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 919; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 905; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 919; Value.UnicodeChar 834; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 919; Value.UnicodeChar 834; Value.UnicodeChar 921 ]; - Value.Array - [ Value.UnicodeChar 919; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 921; Value.UnicodeChar 776; Value.UnicodeChar 768 ]; - Value.Array - [ Value.UnicodeChar 921; Value.UnicodeChar 776; Value.UnicodeChar 769 ]; - Value.Array - [ Value.UnicodeChar 921; Value.UnicodeChar 834; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 921; Value.UnicodeChar 776; Value.UnicodeChar 834 ]; - Value.Array - [ Value.UnicodeChar 933; Value.UnicodeChar 776; Value.UnicodeChar 768 ]; - Value.Array - [ Value.UnicodeChar 933; Value.UnicodeChar 776; Value.UnicodeChar 769 ]; - Value.Array - [ Value.UnicodeChar 929; Value.UnicodeChar 787; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 933; Value.UnicodeChar 834; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 933; Value.UnicodeChar 776; Value.UnicodeChar 834 ]; - Value.Array - [ Value.UnicodeChar 8186; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 937; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 911; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 937; Value.UnicodeChar 834; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 937; Value.UnicodeChar 834; Value.UnicodeChar 921 ]; - Value.Array - [ Value.UnicodeChar 937; Value.UnicodeChar 921; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 70; Value.UnicodeChar 70; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 70; Value.UnicodeChar 73; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 70; Value.UnicodeChar 76; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 70; Value.UnicodeChar 70; Value.UnicodeChar 73 ]; - Value.Array - [ Value.UnicodeChar 70; Value.UnicodeChar 70; Value.UnicodeChar 76 ]; - Value.Array - [ Value.UnicodeChar 83; Value.UnicodeChar 84; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 83; Value.UnicodeChar 84; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 1348; Value.UnicodeChar 1350; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 1348; Value.UnicodeChar 1333; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 1348; Value.UnicodeChar 1339; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 1358; Value.UnicodeChar 1350; Value.UnicodeChar 0 ]; - Value.Array - [ Value.UnicodeChar 1348; Value.UnicodeChar 1341; Value.UnicodeChar 0 ] - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 192 |)); + A.to_value (M.of_value (| Value.Integer 224 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 193 |)); + A.to_value (M.of_value (| Value.Integer 225 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 194 |)); + A.to_value (M.of_value (| Value.Integer 226 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 195 |)); + A.to_value (M.of_value (| Value.Integer 227 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 196 |)); + A.to_value (M.of_value (| Value.Integer 228 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 197 |)); + A.to_value (M.of_value (| Value.Integer 229 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 198 |)); + A.to_value (M.of_value (| Value.Integer 230 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 199 |)); + A.to_value (M.of_value (| Value.Integer 231 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 200 |)); + A.to_value (M.of_value (| Value.Integer 232 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 201 |)); + A.to_value (M.of_value (| Value.Integer 233 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 202 |)); + A.to_value (M.of_value (| Value.Integer 234 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 203 |)); + A.to_value (M.of_value (| Value.Integer 235 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 204 |)); + A.to_value (M.of_value (| Value.Integer 236 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 205 |)); + A.to_value (M.of_value (| Value.Integer 237 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 206 |)); + A.to_value (M.of_value (| Value.Integer 238 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 207 |)); + A.to_value (M.of_value (| Value.Integer 239 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 208 |)); + A.to_value (M.of_value (| Value.Integer 240 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 209 |)); + A.to_value (M.of_value (| Value.Integer 241 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 210 |)); + A.to_value (M.of_value (| Value.Integer 242 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 211 |)); + A.to_value (M.of_value (| Value.Integer 243 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 212 |)); + A.to_value (M.of_value (| Value.Integer 244 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 213 |)); + A.to_value (M.of_value (| Value.Integer 245 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 214 |)); + A.to_value (M.of_value (| Value.Integer 246 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 216 |)); + A.to_value (M.of_value (| Value.Integer 248 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 217 |)); + A.to_value (M.of_value (| Value.Integer 249 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 218 |)); + A.to_value (M.of_value (| Value.Integer 250 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 219 |)); + A.to_value (M.of_value (| Value.Integer 251 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 220 |)); + A.to_value (M.of_value (| Value.Integer 252 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 221 |)); + A.to_value (M.of_value (| Value.Integer 253 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 222 |)); + A.to_value (M.of_value (| Value.Integer 254 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 256 |)); + A.to_value (M.of_value (| Value.Integer 257 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 258 |)); + A.to_value (M.of_value (| Value.Integer 259 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 260 |)); + A.to_value (M.of_value (| Value.Integer 261 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 262 |)); + A.to_value (M.of_value (| Value.Integer 263 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 264 |)); + A.to_value (M.of_value (| Value.Integer 265 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 266 |)); + A.to_value (M.of_value (| Value.Integer 267 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 268 |)); + A.to_value (M.of_value (| Value.Integer 269 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 270 |)); + A.to_value (M.of_value (| Value.Integer 271 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 272 |)); + A.to_value (M.of_value (| Value.Integer 273 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 274 |)); + A.to_value (M.of_value (| Value.Integer 275 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 276 |)); + A.to_value (M.of_value (| Value.Integer 277 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 278 |)); + A.to_value (M.of_value (| Value.Integer 279 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 280 |)); + A.to_value (M.of_value (| Value.Integer 281 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 282 |)); + A.to_value (M.of_value (| Value.Integer 283 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 284 |)); + A.to_value (M.of_value (| Value.Integer 285 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 286 |)); + A.to_value (M.of_value (| Value.Integer 287 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 288 |)); + A.to_value (M.of_value (| Value.Integer 289 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 290 |)); + A.to_value (M.of_value (| Value.Integer 291 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 292 |)); + A.to_value (M.of_value (| Value.Integer 293 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 294 |)); + A.to_value (M.of_value (| Value.Integer 295 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 296 |)); + A.to_value (M.of_value (| Value.Integer 297 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 298 |)); + A.to_value (M.of_value (| Value.Integer 299 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 300 |)); + A.to_value (M.of_value (| Value.Integer 301 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 302 |)); + A.to_value (M.of_value (| Value.Integer 303 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 304 |)); + A.to_value (M.of_value (| Value.Integer 4194304 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 306 |)); + A.to_value (M.of_value (| Value.Integer 307 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 308 |)); + A.to_value (M.of_value (| Value.Integer 309 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 310 |)); + A.to_value (M.of_value (| Value.Integer 311 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 313 |)); + A.to_value (M.of_value (| Value.Integer 314 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 315 |)); + A.to_value (M.of_value (| Value.Integer 316 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 317 |)); + A.to_value (M.of_value (| Value.Integer 318 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 319 |)); + A.to_value (M.of_value (| Value.Integer 320 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 321 |)); + A.to_value (M.of_value (| Value.Integer 322 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 323 |)); + A.to_value (M.of_value (| Value.Integer 324 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 325 |)); + A.to_value (M.of_value (| Value.Integer 326 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 327 |)); + A.to_value (M.of_value (| Value.Integer 328 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 330 |)); + A.to_value (M.of_value (| Value.Integer 331 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 332 |)); + A.to_value (M.of_value (| Value.Integer 333 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 334 |)); + A.to_value (M.of_value (| Value.Integer 335 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 336 |)); + A.to_value (M.of_value (| Value.Integer 337 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 338 |)); + A.to_value (M.of_value (| Value.Integer 339 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 340 |)); + A.to_value (M.of_value (| Value.Integer 341 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 342 |)); + A.to_value (M.of_value (| Value.Integer 343 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 344 |)); + A.to_value (M.of_value (| Value.Integer 345 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 346 |)); + A.to_value (M.of_value (| Value.Integer 347 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 348 |)); + A.to_value (M.of_value (| Value.Integer 349 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 350 |)); + A.to_value (M.of_value (| Value.Integer 351 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 352 |)); + A.to_value (M.of_value (| Value.Integer 353 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 354 |)); + A.to_value (M.of_value (| Value.Integer 355 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 356 |)); + A.to_value (M.of_value (| Value.Integer 357 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 358 |)); + A.to_value (M.of_value (| Value.Integer 359 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 360 |)); + A.to_value (M.of_value (| Value.Integer 361 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 362 |)); + A.to_value (M.of_value (| Value.Integer 363 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 364 |)); + A.to_value (M.of_value (| Value.Integer 365 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 366 |)); + A.to_value (M.of_value (| Value.Integer 367 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 368 |)); + A.to_value (M.of_value (| Value.Integer 369 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 370 |)); + A.to_value (M.of_value (| Value.Integer 371 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 372 |)); + A.to_value (M.of_value (| Value.Integer 373 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 374 |)); + A.to_value (M.of_value (| Value.Integer 375 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 376 |)); + A.to_value (M.of_value (| Value.Integer 255 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 377 |)); + A.to_value (M.of_value (| Value.Integer 378 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 379 |)); + A.to_value (M.of_value (| Value.Integer 380 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 381 |)); + A.to_value (M.of_value (| Value.Integer 382 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 385 |)); + A.to_value (M.of_value (| Value.Integer 595 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 386 |)); + A.to_value (M.of_value (| Value.Integer 387 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 388 |)); + A.to_value (M.of_value (| Value.Integer 389 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 390 |)); + A.to_value (M.of_value (| Value.Integer 596 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 391 |)); + A.to_value (M.of_value (| Value.Integer 392 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 393 |)); + A.to_value (M.of_value (| Value.Integer 598 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 394 |)); + A.to_value (M.of_value (| Value.Integer 599 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 395 |)); + A.to_value (M.of_value (| Value.Integer 396 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 398 |)); + A.to_value (M.of_value (| Value.Integer 477 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 399 |)); + A.to_value (M.of_value (| Value.Integer 601 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 400 |)); + A.to_value (M.of_value (| Value.Integer 603 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 401 |)); + A.to_value (M.of_value (| Value.Integer 402 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 403 |)); + A.to_value (M.of_value (| Value.Integer 608 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 404 |)); + A.to_value (M.of_value (| Value.Integer 611 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 406 |)); + A.to_value (M.of_value (| Value.Integer 617 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 407 |)); + A.to_value (M.of_value (| Value.Integer 616 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 408 |)); + A.to_value (M.of_value (| Value.Integer 409 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 412 |)); + A.to_value (M.of_value (| Value.Integer 623 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 413 |)); + A.to_value (M.of_value (| Value.Integer 626 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 415 |)); + A.to_value (M.of_value (| Value.Integer 629 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 416 |)); + A.to_value (M.of_value (| Value.Integer 417 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 418 |)); + A.to_value (M.of_value (| Value.Integer 419 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 420 |)); + A.to_value (M.of_value (| Value.Integer 421 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 422 |)); + A.to_value (M.of_value (| Value.Integer 640 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 423 |)); + A.to_value (M.of_value (| Value.Integer 424 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 425 |)); + A.to_value (M.of_value (| Value.Integer 643 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 428 |)); + A.to_value (M.of_value (| Value.Integer 429 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 430 |)); + A.to_value (M.of_value (| Value.Integer 648 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 431 |)); + A.to_value (M.of_value (| Value.Integer 432 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 433 |)); + A.to_value (M.of_value (| Value.Integer 650 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 434 |)); + A.to_value (M.of_value (| Value.Integer 651 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 435 |)); + A.to_value (M.of_value (| Value.Integer 436 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 437 |)); + A.to_value (M.of_value (| Value.Integer 438 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 439 |)); + A.to_value (M.of_value (| Value.Integer 658 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 440 |)); + A.to_value (M.of_value (| Value.Integer 441 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 444 |)); + A.to_value (M.of_value (| Value.Integer 445 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 452 |)); + A.to_value (M.of_value (| Value.Integer 454 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 453 |)); + A.to_value (M.of_value (| Value.Integer 454 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 455 |)); + A.to_value (M.of_value (| Value.Integer 457 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 456 |)); + A.to_value (M.of_value (| Value.Integer 457 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 458 |)); + A.to_value (M.of_value (| Value.Integer 460 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 459 |)); + A.to_value (M.of_value (| Value.Integer 460 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 461 |)); + A.to_value (M.of_value (| Value.Integer 462 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 463 |)); + A.to_value (M.of_value (| Value.Integer 464 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 465 |)); + A.to_value (M.of_value (| Value.Integer 466 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 467 |)); + A.to_value (M.of_value (| Value.Integer 468 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 469 |)); + A.to_value (M.of_value (| Value.Integer 470 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 471 |)); + A.to_value (M.of_value (| Value.Integer 472 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 473 |)); + A.to_value (M.of_value (| Value.Integer 474 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 475 |)); + A.to_value (M.of_value (| Value.Integer 476 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 478 |)); + A.to_value (M.of_value (| Value.Integer 479 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 480 |)); + A.to_value (M.of_value (| Value.Integer 481 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 482 |)); + A.to_value (M.of_value (| Value.Integer 483 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 484 |)); + A.to_value (M.of_value (| Value.Integer 485 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 486 |)); + A.to_value (M.of_value (| Value.Integer 487 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 488 |)); + A.to_value (M.of_value (| Value.Integer 489 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 490 |)); + A.to_value (M.of_value (| Value.Integer 491 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 492 |)); + A.to_value (M.of_value (| Value.Integer 493 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 494 |)); + A.to_value (M.of_value (| Value.Integer 495 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 497 |)); + A.to_value (M.of_value (| Value.Integer 499 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 498 |)); + A.to_value (M.of_value (| Value.Integer 499 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 500 |)); + A.to_value (M.of_value (| Value.Integer 501 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 502 |)); + A.to_value (M.of_value (| Value.Integer 405 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 503 |)); + A.to_value (M.of_value (| Value.Integer 447 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 504 |)); + A.to_value (M.of_value (| Value.Integer 505 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 506 |)); + A.to_value (M.of_value (| Value.Integer 507 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 508 |)); + A.to_value (M.of_value (| Value.Integer 509 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 510 |)); + A.to_value (M.of_value (| Value.Integer 511 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 512 |)); + A.to_value (M.of_value (| Value.Integer 513 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 514 |)); + A.to_value (M.of_value (| Value.Integer 515 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 516 |)); + A.to_value (M.of_value (| Value.Integer 517 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 518 |)); + A.to_value (M.of_value (| Value.Integer 519 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 520 |)); + A.to_value (M.of_value (| Value.Integer 521 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 522 |)); + A.to_value (M.of_value (| Value.Integer 523 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 524 |)); + A.to_value (M.of_value (| Value.Integer 525 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 526 |)); + A.to_value (M.of_value (| Value.Integer 527 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 528 |)); + A.to_value (M.of_value (| Value.Integer 529 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 530 |)); + A.to_value (M.of_value (| Value.Integer 531 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 532 |)); + A.to_value (M.of_value (| Value.Integer 533 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 534 |)); + A.to_value (M.of_value (| Value.Integer 535 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 536 |)); + A.to_value (M.of_value (| Value.Integer 537 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 538 |)); + A.to_value (M.of_value (| Value.Integer 539 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 540 |)); + A.to_value (M.of_value (| Value.Integer 541 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 542 |)); + A.to_value (M.of_value (| Value.Integer 543 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 544 |)); + A.to_value (M.of_value (| Value.Integer 414 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 546 |)); + A.to_value (M.of_value (| Value.Integer 547 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 548 |)); + A.to_value (M.of_value (| Value.Integer 549 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 550 |)); + A.to_value (M.of_value (| Value.Integer 551 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 552 |)); + A.to_value (M.of_value (| Value.Integer 553 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 554 |)); + A.to_value (M.of_value (| Value.Integer 555 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 556 |)); + A.to_value (M.of_value (| Value.Integer 557 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 558 |)); + A.to_value (M.of_value (| Value.Integer 559 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 560 |)); + A.to_value (M.of_value (| Value.Integer 561 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 562 |)); + A.to_value (M.of_value (| Value.Integer 563 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 570 |)); + A.to_value (M.of_value (| Value.Integer 11365 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 571 |)); + A.to_value (M.of_value (| Value.Integer 572 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 573 |)); + A.to_value (M.of_value (| Value.Integer 410 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 574 |)); + A.to_value (M.of_value (| Value.Integer 11366 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 577 |)); + A.to_value (M.of_value (| Value.Integer 578 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 579 |)); + A.to_value (M.of_value (| Value.Integer 384 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 580 |)); + A.to_value (M.of_value (| Value.Integer 649 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 581 |)); + A.to_value (M.of_value (| Value.Integer 652 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 582 |)); + A.to_value (M.of_value (| Value.Integer 583 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 584 |)); + A.to_value (M.of_value (| Value.Integer 585 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 586 |)); + A.to_value (M.of_value (| Value.Integer 587 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 588 |)); + A.to_value (M.of_value (| Value.Integer 589 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 590 |)); + A.to_value (M.of_value (| Value.Integer 591 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 880 |)); + A.to_value (M.of_value (| Value.Integer 881 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 882 |)); + A.to_value (M.of_value (| Value.Integer 883 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 886 |)); + A.to_value (M.of_value (| Value.Integer 887 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 895 |)); + A.to_value (M.of_value (| Value.Integer 1011 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 902 |)); + A.to_value (M.of_value (| Value.Integer 940 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 904 |)); + A.to_value (M.of_value (| Value.Integer 941 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 905 |)); + A.to_value (M.of_value (| Value.Integer 942 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 906 |)); + A.to_value (M.of_value (| Value.Integer 943 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 908 |)); + A.to_value (M.of_value (| Value.Integer 972 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 910 |)); + A.to_value (M.of_value (| Value.Integer 973 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 911 |)); + A.to_value (M.of_value (| Value.Integer 974 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 913 |)); + A.to_value (M.of_value (| Value.Integer 945 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 914 |)); + A.to_value (M.of_value (| Value.Integer 946 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 915 |)); + A.to_value (M.of_value (| Value.Integer 947 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 916 |)); + A.to_value (M.of_value (| Value.Integer 948 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 917 |)); + A.to_value (M.of_value (| Value.Integer 949 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 918 |)); + A.to_value (M.of_value (| Value.Integer 950 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 919 |)); + A.to_value (M.of_value (| Value.Integer 951 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 920 |)); + A.to_value (M.of_value (| Value.Integer 952 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.Integer 953 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 922 |)); + A.to_value (M.of_value (| Value.Integer 954 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 923 |)); + A.to_value (M.of_value (| Value.Integer 955 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 924 |)); + A.to_value (M.of_value (| Value.Integer 956 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 925 |)); + A.to_value (M.of_value (| Value.Integer 957 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 926 |)); + A.to_value (M.of_value (| Value.Integer 958 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 927 |)); + A.to_value (M.of_value (| Value.Integer 959 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 928 |)); + A.to_value (M.of_value (| Value.Integer 960 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 929 |)); + A.to_value (M.of_value (| Value.Integer 961 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 931 |)); + A.to_value (M.of_value (| Value.Integer 963 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 932 |)); + A.to_value (M.of_value (| Value.Integer 964 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.Integer 965 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 934 |)); + A.to_value (M.of_value (| Value.Integer 966 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 935 |)); + A.to_value (M.of_value (| Value.Integer 967 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 936 |)); + A.to_value (M.of_value (| Value.Integer 968 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 937 |)); + A.to_value (M.of_value (| Value.Integer 969 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 938 |)); + A.to_value (M.of_value (| Value.Integer 970 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 939 |)); + A.to_value (M.of_value (| Value.Integer 971 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 975 |)); + A.to_value (M.of_value (| Value.Integer 983 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 984 |)); + A.to_value (M.of_value (| Value.Integer 985 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 986 |)); + A.to_value (M.of_value (| Value.Integer 987 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 988 |)); + A.to_value (M.of_value (| Value.Integer 989 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 990 |)); + A.to_value (M.of_value (| Value.Integer 991 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 992 |)); + A.to_value (M.of_value (| Value.Integer 993 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 994 |)); + A.to_value (M.of_value (| Value.Integer 995 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 996 |)); + A.to_value (M.of_value (| Value.Integer 997 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 998 |)); + A.to_value (M.of_value (| Value.Integer 999 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1000 |)); + A.to_value (M.of_value (| Value.Integer 1001 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1002 |)); + A.to_value (M.of_value (| Value.Integer 1003 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1004 |)); + A.to_value (M.of_value (| Value.Integer 1005 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1006 |)); + A.to_value (M.of_value (| Value.Integer 1007 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1012 |)); + A.to_value (M.of_value (| Value.Integer 952 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1015 |)); + A.to_value (M.of_value (| Value.Integer 1016 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1017 |)); + A.to_value (M.of_value (| Value.Integer 1010 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1018 |)); + A.to_value (M.of_value (| Value.Integer 1019 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1021 |)); + A.to_value (M.of_value (| Value.Integer 891 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1022 |)); + A.to_value (M.of_value (| Value.Integer 892 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1023 |)); + A.to_value (M.of_value (| Value.Integer 893 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1024 |)); + A.to_value (M.of_value (| Value.Integer 1104 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1025 |)); + A.to_value (M.of_value (| Value.Integer 1105 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1026 |)); + A.to_value (M.of_value (| Value.Integer 1106 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1027 |)); + A.to_value (M.of_value (| Value.Integer 1107 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1028 |)); + A.to_value (M.of_value (| Value.Integer 1108 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1029 |)); + A.to_value (M.of_value (| Value.Integer 1109 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1030 |)); + A.to_value (M.of_value (| Value.Integer 1110 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1031 |)); + A.to_value (M.of_value (| Value.Integer 1111 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1032 |)); + A.to_value (M.of_value (| Value.Integer 1112 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1033 |)); + A.to_value (M.of_value (| Value.Integer 1113 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1034 |)); + A.to_value (M.of_value (| Value.Integer 1114 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1035 |)); + A.to_value (M.of_value (| Value.Integer 1115 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1036 |)); + A.to_value (M.of_value (| Value.Integer 1116 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1037 |)); + A.to_value (M.of_value (| Value.Integer 1117 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1038 |)); + A.to_value (M.of_value (| Value.Integer 1118 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1039 |)); + A.to_value (M.of_value (| Value.Integer 1119 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1040 |)); + A.to_value (M.of_value (| Value.Integer 1072 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1041 |)); + A.to_value (M.of_value (| Value.Integer 1073 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1042 |)); + A.to_value (M.of_value (| Value.Integer 1074 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1043 |)); + A.to_value (M.of_value (| Value.Integer 1075 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1044 |)); + A.to_value (M.of_value (| Value.Integer 1076 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1045 |)); + A.to_value (M.of_value (| Value.Integer 1077 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1046 |)); + A.to_value (M.of_value (| Value.Integer 1078 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1047 |)); + A.to_value (M.of_value (| Value.Integer 1079 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1048 |)); + A.to_value (M.of_value (| Value.Integer 1080 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1049 |)); + A.to_value (M.of_value (| Value.Integer 1081 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1050 |)); + A.to_value (M.of_value (| Value.Integer 1082 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1051 |)); + A.to_value (M.of_value (| Value.Integer 1083 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1052 |)); + A.to_value (M.of_value (| Value.Integer 1084 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1053 |)); + A.to_value (M.of_value (| Value.Integer 1085 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1054 |)); + A.to_value (M.of_value (| Value.Integer 1086 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1055 |)); + A.to_value (M.of_value (| Value.Integer 1087 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1056 |)); + A.to_value (M.of_value (| Value.Integer 1088 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1057 |)); + A.to_value (M.of_value (| Value.Integer 1089 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1058 |)); + A.to_value (M.of_value (| Value.Integer 1090 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1059 |)); + A.to_value (M.of_value (| Value.Integer 1091 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1060 |)); + A.to_value (M.of_value (| Value.Integer 1092 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1061 |)); + A.to_value (M.of_value (| Value.Integer 1093 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1062 |)); + A.to_value (M.of_value (| Value.Integer 1094 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1063 |)); + A.to_value (M.of_value (| Value.Integer 1095 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1064 |)); + A.to_value (M.of_value (| Value.Integer 1096 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1065 |)); + A.to_value (M.of_value (| Value.Integer 1097 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1066 |)); + A.to_value (M.of_value (| Value.Integer 1098 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1067 |)); + A.to_value (M.of_value (| Value.Integer 1099 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1068 |)); + A.to_value (M.of_value (| Value.Integer 1100 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1069 |)); + A.to_value (M.of_value (| Value.Integer 1101 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1070 |)); + A.to_value (M.of_value (| Value.Integer 1102 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1071 |)); + A.to_value (M.of_value (| Value.Integer 1103 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1120 |)); + A.to_value (M.of_value (| Value.Integer 1121 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1122 |)); + A.to_value (M.of_value (| Value.Integer 1123 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1124 |)); + A.to_value (M.of_value (| Value.Integer 1125 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1126 |)); + A.to_value (M.of_value (| Value.Integer 1127 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1128 |)); + A.to_value (M.of_value (| Value.Integer 1129 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1130 |)); + A.to_value (M.of_value (| Value.Integer 1131 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1132 |)); + A.to_value (M.of_value (| Value.Integer 1133 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1134 |)); + A.to_value (M.of_value (| Value.Integer 1135 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1136 |)); + A.to_value (M.of_value (| Value.Integer 1137 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1138 |)); + A.to_value (M.of_value (| Value.Integer 1139 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1140 |)); + A.to_value (M.of_value (| Value.Integer 1141 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1142 |)); + A.to_value (M.of_value (| Value.Integer 1143 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1144 |)); + A.to_value (M.of_value (| Value.Integer 1145 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1146 |)); + A.to_value (M.of_value (| Value.Integer 1147 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1148 |)); + A.to_value (M.of_value (| Value.Integer 1149 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1150 |)); + A.to_value (M.of_value (| Value.Integer 1151 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1152 |)); + A.to_value (M.of_value (| Value.Integer 1153 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1162 |)); + A.to_value (M.of_value (| Value.Integer 1163 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1164 |)); + A.to_value (M.of_value (| Value.Integer 1165 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1166 |)); + A.to_value (M.of_value (| Value.Integer 1167 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1168 |)); + A.to_value (M.of_value (| Value.Integer 1169 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1170 |)); + A.to_value (M.of_value (| Value.Integer 1171 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1172 |)); + A.to_value (M.of_value (| Value.Integer 1173 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1174 |)); + A.to_value (M.of_value (| Value.Integer 1175 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1176 |)); + A.to_value (M.of_value (| Value.Integer 1177 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1178 |)); + A.to_value (M.of_value (| Value.Integer 1179 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1180 |)); + A.to_value (M.of_value (| Value.Integer 1181 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1182 |)); + A.to_value (M.of_value (| Value.Integer 1183 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1184 |)); + A.to_value (M.of_value (| Value.Integer 1185 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1186 |)); + A.to_value (M.of_value (| Value.Integer 1187 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1188 |)); + A.to_value (M.of_value (| Value.Integer 1189 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1190 |)); + A.to_value (M.of_value (| Value.Integer 1191 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1192 |)); + A.to_value (M.of_value (| Value.Integer 1193 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1194 |)); + A.to_value (M.of_value (| Value.Integer 1195 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1196 |)); + A.to_value (M.of_value (| Value.Integer 1197 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1198 |)); + A.to_value (M.of_value (| Value.Integer 1199 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1200 |)); + A.to_value (M.of_value (| Value.Integer 1201 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1202 |)); + A.to_value (M.of_value (| Value.Integer 1203 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1204 |)); + A.to_value (M.of_value (| Value.Integer 1205 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1206 |)); + A.to_value (M.of_value (| Value.Integer 1207 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1208 |)); + A.to_value (M.of_value (| Value.Integer 1209 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1210 |)); + A.to_value (M.of_value (| Value.Integer 1211 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1212 |)); + A.to_value (M.of_value (| Value.Integer 1213 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1214 |)); + A.to_value (M.of_value (| Value.Integer 1215 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1216 |)); + A.to_value (M.of_value (| Value.Integer 1231 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1217 |)); + A.to_value (M.of_value (| Value.Integer 1218 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1219 |)); + A.to_value (M.of_value (| Value.Integer 1220 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1221 |)); + A.to_value (M.of_value (| Value.Integer 1222 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1223 |)); + A.to_value (M.of_value (| Value.Integer 1224 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1225 |)); + A.to_value (M.of_value (| Value.Integer 1226 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1227 |)); + A.to_value (M.of_value (| Value.Integer 1228 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1229 |)); + A.to_value (M.of_value (| Value.Integer 1230 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1232 |)); + A.to_value (M.of_value (| Value.Integer 1233 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1234 |)); + A.to_value (M.of_value (| Value.Integer 1235 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1236 |)); + A.to_value (M.of_value (| Value.Integer 1237 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1238 |)); + A.to_value (M.of_value (| Value.Integer 1239 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1240 |)); + A.to_value (M.of_value (| Value.Integer 1241 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1242 |)); + A.to_value (M.of_value (| Value.Integer 1243 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1244 |)); + A.to_value (M.of_value (| Value.Integer 1245 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1246 |)); + A.to_value (M.of_value (| Value.Integer 1247 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1248 |)); + A.to_value (M.of_value (| Value.Integer 1249 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1250 |)); + A.to_value (M.of_value (| Value.Integer 1251 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1252 |)); + A.to_value (M.of_value (| Value.Integer 1253 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1254 |)); + A.to_value (M.of_value (| Value.Integer 1255 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1256 |)); + A.to_value (M.of_value (| Value.Integer 1257 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1258 |)); + A.to_value (M.of_value (| Value.Integer 1259 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1260 |)); + A.to_value (M.of_value (| Value.Integer 1261 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1262 |)); + A.to_value (M.of_value (| Value.Integer 1263 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1264 |)); + A.to_value (M.of_value (| Value.Integer 1265 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1266 |)); + A.to_value (M.of_value (| Value.Integer 1267 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1268 |)); + A.to_value (M.of_value (| Value.Integer 1269 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1270 |)); + A.to_value (M.of_value (| Value.Integer 1271 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1272 |)); + A.to_value (M.of_value (| Value.Integer 1273 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1274 |)); + A.to_value (M.of_value (| Value.Integer 1275 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1276 |)); + A.to_value (M.of_value (| Value.Integer 1277 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1278 |)); + A.to_value (M.of_value (| Value.Integer 1279 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1280 |)); + A.to_value (M.of_value (| Value.Integer 1281 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1282 |)); + A.to_value (M.of_value (| Value.Integer 1283 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1284 |)); + A.to_value (M.of_value (| Value.Integer 1285 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1286 |)); + A.to_value (M.of_value (| Value.Integer 1287 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1288 |)); + A.to_value (M.of_value (| Value.Integer 1289 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1290 |)); + A.to_value (M.of_value (| Value.Integer 1291 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1292 |)); + A.to_value (M.of_value (| Value.Integer 1293 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1294 |)); + A.to_value (M.of_value (| Value.Integer 1295 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1296 |)); + A.to_value (M.of_value (| Value.Integer 1297 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1298 |)); + A.to_value (M.of_value (| Value.Integer 1299 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1300 |)); + A.to_value (M.of_value (| Value.Integer 1301 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1302 |)); + A.to_value (M.of_value (| Value.Integer 1303 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1304 |)); + A.to_value (M.of_value (| Value.Integer 1305 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1306 |)); + A.to_value (M.of_value (| Value.Integer 1307 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1308 |)); + A.to_value (M.of_value (| Value.Integer 1309 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1310 |)); + A.to_value (M.of_value (| Value.Integer 1311 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1312 |)); + A.to_value (M.of_value (| Value.Integer 1313 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1314 |)); + A.to_value (M.of_value (| Value.Integer 1315 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1316 |)); + A.to_value (M.of_value (| Value.Integer 1317 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1318 |)); + A.to_value (M.of_value (| Value.Integer 1319 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1320 |)); + A.to_value (M.of_value (| Value.Integer 1321 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1322 |)); + A.to_value (M.of_value (| Value.Integer 1323 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1324 |)); + A.to_value (M.of_value (| Value.Integer 1325 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1326 |)); + A.to_value (M.of_value (| Value.Integer 1327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1329 |)); + A.to_value (M.of_value (| Value.Integer 1377 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1330 |)); + A.to_value (M.of_value (| Value.Integer 1378 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1331 |)); + A.to_value (M.of_value (| Value.Integer 1379 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1332 |)); + A.to_value (M.of_value (| Value.Integer 1380 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1333 |)); + A.to_value (M.of_value (| Value.Integer 1381 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1334 |)); + A.to_value (M.of_value (| Value.Integer 1382 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1335 |)); + A.to_value (M.of_value (| Value.Integer 1383 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1336 |)); + A.to_value (M.of_value (| Value.Integer 1384 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1337 |)); + A.to_value (M.of_value (| Value.Integer 1385 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1338 |)); + A.to_value (M.of_value (| Value.Integer 1386 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1339 |)); + A.to_value (M.of_value (| Value.Integer 1387 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1340 |)); + A.to_value (M.of_value (| Value.Integer 1388 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1341 |)); + A.to_value (M.of_value (| Value.Integer 1389 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1342 |)); + A.to_value (M.of_value (| Value.Integer 1390 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1343 |)); + A.to_value (M.of_value (| Value.Integer 1391 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1344 |)); + A.to_value (M.of_value (| Value.Integer 1392 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1345 |)); + A.to_value (M.of_value (| Value.Integer 1393 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1346 |)); + A.to_value (M.of_value (| Value.Integer 1394 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1347 |)); + A.to_value (M.of_value (| Value.Integer 1395 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1348 |)); + A.to_value (M.of_value (| Value.Integer 1396 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1349 |)); + A.to_value (M.of_value (| Value.Integer 1397 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1350 |)); + A.to_value (M.of_value (| Value.Integer 1398 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1351 |)); + A.to_value (M.of_value (| Value.Integer 1399 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1352 |)); + A.to_value (M.of_value (| Value.Integer 1400 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1353 |)); + A.to_value (M.of_value (| Value.Integer 1401 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1354 |)); + A.to_value (M.of_value (| Value.Integer 1402 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1355 |)); + A.to_value (M.of_value (| Value.Integer 1403 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1356 |)); + A.to_value (M.of_value (| Value.Integer 1404 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1357 |)); + A.to_value (M.of_value (| Value.Integer 1405 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1358 |)); + A.to_value (M.of_value (| Value.Integer 1406 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1359 |)); + A.to_value (M.of_value (| Value.Integer 1407 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1360 |)); + A.to_value (M.of_value (| Value.Integer 1408 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1361 |)); + A.to_value (M.of_value (| Value.Integer 1409 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1362 |)); + A.to_value (M.of_value (| Value.Integer 1410 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1363 |)); + A.to_value (M.of_value (| Value.Integer 1411 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1364 |)); + A.to_value (M.of_value (| Value.Integer 1412 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1365 |)); + A.to_value (M.of_value (| Value.Integer 1413 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1366 |)); + A.to_value (M.of_value (| Value.Integer 1414 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4256 |)); + A.to_value (M.of_value (| Value.Integer 11520 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4257 |)); + A.to_value (M.of_value (| Value.Integer 11521 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4258 |)); + A.to_value (M.of_value (| Value.Integer 11522 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4259 |)); + A.to_value (M.of_value (| Value.Integer 11523 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4260 |)); + A.to_value (M.of_value (| Value.Integer 11524 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4261 |)); + A.to_value (M.of_value (| Value.Integer 11525 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4262 |)); + A.to_value (M.of_value (| Value.Integer 11526 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4263 |)); + A.to_value (M.of_value (| Value.Integer 11527 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4264 |)); + A.to_value (M.of_value (| Value.Integer 11528 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4265 |)); + A.to_value (M.of_value (| Value.Integer 11529 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4266 |)); + A.to_value (M.of_value (| Value.Integer 11530 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4267 |)); + A.to_value (M.of_value (| Value.Integer 11531 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4268 |)); + A.to_value (M.of_value (| Value.Integer 11532 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4269 |)); + A.to_value (M.of_value (| Value.Integer 11533 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4270 |)); + A.to_value (M.of_value (| Value.Integer 11534 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4271 |)); + A.to_value (M.of_value (| Value.Integer 11535 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4272 |)); + A.to_value (M.of_value (| Value.Integer 11536 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4273 |)); + A.to_value (M.of_value (| Value.Integer 11537 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4274 |)); + A.to_value (M.of_value (| Value.Integer 11538 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4275 |)); + A.to_value (M.of_value (| Value.Integer 11539 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4276 |)); + A.to_value (M.of_value (| Value.Integer 11540 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4277 |)); + A.to_value (M.of_value (| Value.Integer 11541 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4278 |)); + A.to_value (M.of_value (| Value.Integer 11542 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4279 |)); + A.to_value (M.of_value (| Value.Integer 11543 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4280 |)); + A.to_value (M.of_value (| Value.Integer 11544 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4281 |)); + A.to_value (M.of_value (| Value.Integer 11545 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4282 |)); + A.to_value (M.of_value (| Value.Integer 11546 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4283 |)); + A.to_value (M.of_value (| Value.Integer 11547 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4284 |)); + A.to_value (M.of_value (| Value.Integer 11548 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4285 |)); + A.to_value (M.of_value (| Value.Integer 11549 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4286 |)); + A.to_value (M.of_value (| Value.Integer 11550 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4287 |)); + A.to_value (M.of_value (| Value.Integer 11551 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4288 |)); + A.to_value (M.of_value (| Value.Integer 11552 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4289 |)); + A.to_value (M.of_value (| Value.Integer 11553 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4290 |)); + A.to_value (M.of_value (| Value.Integer 11554 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4291 |)); + A.to_value (M.of_value (| Value.Integer 11555 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4292 |)); + A.to_value (M.of_value (| Value.Integer 11556 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4293 |)); + A.to_value (M.of_value (| Value.Integer 11557 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4295 |)); + A.to_value (M.of_value (| Value.Integer 11559 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4301 |)); + A.to_value (M.of_value (| Value.Integer 11565 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5024 |)); + A.to_value (M.of_value (| Value.Integer 43888 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5025 |)); + A.to_value (M.of_value (| Value.Integer 43889 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5026 |)); + A.to_value (M.of_value (| Value.Integer 43890 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5027 |)); + A.to_value (M.of_value (| Value.Integer 43891 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5028 |)); + A.to_value (M.of_value (| Value.Integer 43892 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5029 |)); + A.to_value (M.of_value (| Value.Integer 43893 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5030 |)); + A.to_value (M.of_value (| Value.Integer 43894 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5031 |)); + A.to_value (M.of_value (| Value.Integer 43895 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5032 |)); + A.to_value (M.of_value (| Value.Integer 43896 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5033 |)); + A.to_value (M.of_value (| Value.Integer 43897 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5034 |)); + A.to_value (M.of_value (| Value.Integer 43898 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5035 |)); + A.to_value (M.of_value (| Value.Integer 43899 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5036 |)); + A.to_value (M.of_value (| Value.Integer 43900 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5037 |)); + A.to_value (M.of_value (| Value.Integer 43901 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5038 |)); + A.to_value (M.of_value (| Value.Integer 43902 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5039 |)); + A.to_value (M.of_value (| Value.Integer 43903 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5040 |)); + A.to_value (M.of_value (| Value.Integer 43904 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5041 |)); + A.to_value (M.of_value (| Value.Integer 43905 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5042 |)); + A.to_value (M.of_value (| Value.Integer 43906 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5043 |)); + A.to_value (M.of_value (| Value.Integer 43907 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5044 |)); + A.to_value (M.of_value (| Value.Integer 43908 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5045 |)); + A.to_value (M.of_value (| Value.Integer 43909 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5046 |)); + A.to_value (M.of_value (| Value.Integer 43910 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5047 |)); + A.to_value (M.of_value (| Value.Integer 43911 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5048 |)); + A.to_value (M.of_value (| Value.Integer 43912 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5049 |)); + A.to_value (M.of_value (| Value.Integer 43913 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5050 |)); + A.to_value (M.of_value (| Value.Integer 43914 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5051 |)); + A.to_value (M.of_value (| Value.Integer 43915 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5052 |)); + A.to_value (M.of_value (| Value.Integer 43916 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5053 |)); + A.to_value (M.of_value (| Value.Integer 43917 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5054 |)); + A.to_value (M.of_value (| Value.Integer 43918 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5055 |)); + A.to_value (M.of_value (| Value.Integer 43919 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5056 |)); + A.to_value (M.of_value (| Value.Integer 43920 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5057 |)); + A.to_value (M.of_value (| Value.Integer 43921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5058 |)); + A.to_value (M.of_value (| Value.Integer 43922 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5059 |)); + A.to_value (M.of_value (| Value.Integer 43923 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5060 |)); + A.to_value (M.of_value (| Value.Integer 43924 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5061 |)); + A.to_value (M.of_value (| Value.Integer 43925 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5062 |)); + A.to_value (M.of_value (| Value.Integer 43926 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5063 |)); + A.to_value (M.of_value (| Value.Integer 43927 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5064 |)); + A.to_value (M.of_value (| Value.Integer 43928 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5065 |)); + A.to_value (M.of_value (| Value.Integer 43929 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5066 |)); + A.to_value (M.of_value (| Value.Integer 43930 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5067 |)); + A.to_value (M.of_value (| Value.Integer 43931 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5068 |)); + A.to_value (M.of_value (| Value.Integer 43932 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5069 |)); + A.to_value (M.of_value (| Value.Integer 43933 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5070 |)); + A.to_value (M.of_value (| Value.Integer 43934 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5071 |)); + A.to_value (M.of_value (| Value.Integer 43935 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5072 |)); + A.to_value (M.of_value (| Value.Integer 43936 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5073 |)); + A.to_value (M.of_value (| Value.Integer 43937 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5074 |)); + A.to_value (M.of_value (| Value.Integer 43938 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5075 |)); + A.to_value (M.of_value (| Value.Integer 43939 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5076 |)); + A.to_value (M.of_value (| Value.Integer 43940 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5077 |)); + A.to_value (M.of_value (| Value.Integer 43941 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5078 |)); + A.to_value (M.of_value (| Value.Integer 43942 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5079 |)); + A.to_value (M.of_value (| Value.Integer 43943 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5080 |)); + A.to_value (M.of_value (| Value.Integer 43944 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5081 |)); + A.to_value (M.of_value (| Value.Integer 43945 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5082 |)); + A.to_value (M.of_value (| Value.Integer 43946 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5083 |)); + A.to_value (M.of_value (| Value.Integer 43947 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5084 |)); + A.to_value (M.of_value (| Value.Integer 43948 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5085 |)); + A.to_value (M.of_value (| Value.Integer 43949 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5086 |)); + A.to_value (M.of_value (| Value.Integer 43950 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5087 |)); + A.to_value (M.of_value (| Value.Integer 43951 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5088 |)); + A.to_value (M.of_value (| Value.Integer 43952 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5089 |)); + A.to_value (M.of_value (| Value.Integer 43953 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5090 |)); + A.to_value (M.of_value (| Value.Integer 43954 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5091 |)); + A.to_value (M.of_value (| Value.Integer 43955 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5092 |)); + A.to_value (M.of_value (| Value.Integer 43956 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5093 |)); + A.to_value (M.of_value (| Value.Integer 43957 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5094 |)); + A.to_value (M.of_value (| Value.Integer 43958 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5095 |)); + A.to_value (M.of_value (| Value.Integer 43959 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5096 |)); + A.to_value (M.of_value (| Value.Integer 43960 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5097 |)); + A.to_value (M.of_value (| Value.Integer 43961 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5098 |)); + A.to_value (M.of_value (| Value.Integer 43962 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5099 |)); + A.to_value (M.of_value (| Value.Integer 43963 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5100 |)); + A.to_value (M.of_value (| Value.Integer 43964 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5101 |)); + A.to_value (M.of_value (| Value.Integer 43965 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5102 |)); + A.to_value (M.of_value (| Value.Integer 43966 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5103 |)); + A.to_value (M.of_value (| Value.Integer 43967 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5104 |)); + A.to_value (M.of_value (| Value.Integer 5112 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5105 |)); + A.to_value (M.of_value (| Value.Integer 5113 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5106 |)); + A.to_value (M.of_value (| Value.Integer 5114 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5107 |)); + A.to_value (M.of_value (| Value.Integer 5115 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5108 |)); + A.to_value (M.of_value (| Value.Integer 5116 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5109 |)); + A.to_value (M.of_value (| Value.Integer 5117 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7312 |)); + A.to_value (M.of_value (| Value.Integer 4304 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7313 |)); + A.to_value (M.of_value (| Value.Integer 4305 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7314 |)); + A.to_value (M.of_value (| Value.Integer 4306 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7315 |)); + A.to_value (M.of_value (| Value.Integer 4307 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7316 |)); + A.to_value (M.of_value (| Value.Integer 4308 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7317 |)); + A.to_value (M.of_value (| Value.Integer 4309 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7318 |)); + A.to_value (M.of_value (| Value.Integer 4310 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7319 |)); + A.to_value (M.of_value (| Value.Integer 4311 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7320 |)); + A.to_value (M.of_value (| Value.Integer 4312 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7321 |)); + A.to_value (M.of_value (| Value.Integer 4313 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7322 |)); + A.to_value (M.of_value (| Value.Integer 4314 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7323 |)); + A.to_value (M.of_value (| Value.Integer 4315 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7324 |)); + A.to_value (M.of_value (| Value.Integer 4316 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7325 |)); + A.to_value (M.of_value (| Value.Integer 4317 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7326 |)); + A.to_value (M.of_value (| Value.Integer 4318 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7327 |)); + A.to_value (M.of_value (| Value.Integer 4319 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7328 |)); + A.to_value (M.of_value (| Value.Integer 4320 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7329 |)); + A.to_value (M.of_value (| Value.Integer 4321 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7330 |)); + A.to_value (M.of_value (| Value.Integer 4322 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7331 |)); + A.to_value (M.of_value (| Value.Integer 4323 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7332 |)); + A.to_value (M.of_value (| Value.Integer 4324 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7333 |)); + A.to_value (M.of_value (| Value.Integer 4325 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7334 |)); + A.to_value (M.of_value (| Value.Integer 4326 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7335 |)); + A.to_value (M.of_value (| Value.Integer 4327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7336 |)); + A.to_value (M.of_value (| Value.Integer 4328 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7337 |)); + A.to_value (M.of_value (| Value.Integer 4329 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7338 |)); + A.to_value (M.of_value (| Value.Integer 4330 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7339 |)); + A.to_value (M.of_value (| Value.Integer 4331 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7340 |)); + A.to_value (M.of_value (| Value.Integer 4332 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7341 |)); + A.to_value (M.of_value (| Value.Integer 4333 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7342 |)); + A.to_value (M.of_value (| Value.Integer 4334 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7343 |)); + A.to_value (M.of_value (| Value.Integer 4335 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7344 |)); + A.to_value (M.of_value (| Value.Integer 4336 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7345 |)); + A.to_value (M.of_value (| Value.Integer 4337 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7346 |)); + A.to_value (M.of_value (| Value.Integer 4338 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7347 |)); + A.to_value (M.of_value (| Value.Integer 4339 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7348 |)); + A.to_value (M.of_value (| Value.Integer 4340 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7349 |)); + A.to_value (M.of_value (| Value.Integer 4341 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7350 |)); + A.to_value (M.of_value (| Value.Integer 4342 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7351 |)); + A.to_value (M.of_value (| Value.Integer 4343 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7352 |)); + A.to_value (M.of_value (| Value.Integer 4344 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7353 |)); + A.to_value (M.of_value (| Value.Integer 4345 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7354 |)); + A.to_value (M.of_value (| Value.Integer 4346 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7357 |)); + A.to_value (M.of_value (| Value.Integer 4349 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7358 |)); + A.to_value (M.of_value (| Value.Integer 4350 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7359 |)); + A.to_value (M.of_value (| Value.Integer 4351 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7680 |)); + A.to_value (M.of_value (| Value.Integer 7681 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7682 |)); + A.to_value (M.of_value (| Value.Integer 7683 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7684 |)); + A.to_value (M.of_value (| Value.Integer 7685 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7686 |)); + A.to_value (M.of_value (| Value.Integer 7687 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7688 |)); + A.to_value (M.of_value (| Value.Integer 7689 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7690 |)); + A.to_value (M.of_value (| Value.Integer 7691 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7692 |)); + A.to_value (M.of_value (| Value.Integer 7693 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7694 |)); + A.to_value (M.of_value (| Value.Integer 7695 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7696 |)); + A.to_value (M.of_value (| Value.Integer 7697 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7698 |)); + A.to_value (M.of_value (| Value.Integer 7699 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7700 |)); + A.to_value (M.of_value (| Value.Integer 7701 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7702 |)); + A.to_value (M.of_value (| Value.Integer 7703 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7704 |)); + A.to_value (M.of_value (| Value.Integer 7705 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7706 |)); + A.to_value (M.of_value (| Value.Integer 7707 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7708 |)); + A.to_value (M.of_value (| Value.Integer 7709 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7710 |)); + A.to_value (M.of_value (| Value.Integer 7711 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7712 |)); + A.to_value (M.of_value (| Value.Integer 7713 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7714 |)); + A.to_value (M.of_value (| Value.Integer 7715 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7716 |)); + A.to_value (M.of_value (| Value.Integer 7717 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7718 |)); + A.to_value (M.of_value (| Value.Integer 7719 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7720 |)); + A.to_value (M.of_value (| Value.Integer 7721 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7722 |)); + A.to_value (M.of_value (| Value.Integer 7723 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7724 |)); + A.to_value (M.of_value (| Value.Integer 7725 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7726 |)); + A.to_value (M.of_value (| Value.Integer 7727 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7728 |)); + A.to_value (M.of_value (| Value.Integer 7729 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7730 |)); + A.to_value (M.of_value (| Value.Integer 7731 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7732 |)); + A.to_value (M.of_value (| Value.Integer 7733 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7734 |)); + A.to_value (M.of_value (| Value.Integer 7735 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7736 |)); + A.to_value (M.of_value (| Value.Integer 7737 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7738 |)); + A.to_value (M.of_value (| Value.Integer 7739 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7740 |)); + A.to_value (M.of_value (| Value.Integer 7741 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7742 |)); + A.to_value (M.of_value (| Value.Integer 7743 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7744 |)); + A.to_value (M.of_value (| Value.Integer 7745 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7746 |)); + A.to_value (M.of_value (| Value.Integer 7747 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7748 |)); + A.to_value (M.of_value (| Value.Integer 7749 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7750 |)); + A.to_value (M.of_value (| Value.Integer 7751 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7752 |)); + A.to_value (M.of_value (| Value.Integer 7753 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7754 |)); + A.to_value (M.of_value (| Value.Integer 7755 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7756 |)); + A.to_value (M.of_value (| Value.Integer 7757 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7758 |)); + A.to_value (M.of_value (| Value.Integer 7759 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7760 |)); + A.to_value (M.of_value (| Value.Integer 7761 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7762 |)); + A.to_value (M.of_value (| Value.Integer 7763 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7764 |)); + A.to_value (M.of_value (| Value.Integer 7765 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7766 |)); + A.to_value (M.of_value (| Value.Integer 7767 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7768 |)); + A.to_value (M.of_value (| Value.Integer 7769 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7770 |)); + A.to_value (M.of_value (| Value.Integer 7771 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7772 |)); + A.to_value (M.of_value (| Value.Integer 7773 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7774 |)); + A.to_value (M.of_value (| Value.Integer 7775 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7776 |)); + A.to_value (M.of_value (| Value.Integer 7777 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7778 |)); + A.to_value (M.of_value (| Value.Integer 7779 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7780 |)); + A.to_value (M.of_value (| Value.Integer 7781 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7782 |)); + A.to_value (M.of_value (| Value.Integer 7783 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7784 |)); + A.to_value (M.of_value (| Value.Integer 7785 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7786 |)); + A.to_value (M.of_value (| Value.Integer 7787 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7788 |)); + A.to_value (M.of_value (| Value.Integer 7789 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7790 |)); + A.to_value (M.of_value (| Value.Integer 7791 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7792 |)); + A.to_value (M.of_value (| Value.Integer 7793 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7794 |)); + A.to_value (M.of_value (| Value.Integer 7795 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7796 |)); + A.to_value (M.of_value (| Value.Integer 7797 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7798 |)); + A.to_value (M.of_value (| Value.Integer 7799 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7800 |)); + A.to_value (M.of_value (| Value.Integer 7801 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7802 |)); + A.to_value (M.of_value (| Value.Integer 7803 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7804 |)); + A.to_value (M.of_value (| Value.Integer 7805 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7806 |)); + A.to_value (M.of_value (| Value.Integer 7807 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7808 |)); + A.to_value (M.of_value (| Value.Integer 7809 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7810 |)); + A.to_value (M.of_value (| Value.Integer 7811 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7812 |)); + A.to_value (M.of_value (| Value.Integer 7813 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7814 |)); + A.to_value (M.of_value (| Value.Integer 7815 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7816 |)); + A.to_value (M.of_value (| Value.Integer 7817 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7818 |)); + A.to_value (M.of_value (| Value.Integer 7819 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7820 |)); + A.to_value (M.of_value (| Value.Integer 7821 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7822 |)); + A.to_value (M.of_value (| Value.Integer 7823 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7824 |)); + A.to_value (M.of_value (| Value.Integer 7825 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7826 |)); + A.to_value (M.of_value (| Value.Integer 7827 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7828 |)); + A.to_value (M.of_value (| Value.Integer 7829 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7838 |)); + A.to_value (M.of_value (| Value.Integer 223 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7840 |)); + A.to_value (M.of_value (| Value.Integer 7841 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7842 |)); + A.to_value (M.of_value (| Value.Integer 7843 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7844 |)); + A.to_value (M.of_value (| Value.Integer 7845 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7846 |)); + A.to_value (M.of_value (| Value.Integer 7847 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7848 |)); + A.to_value (M.of_value (| Value.Integer 7849 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7850 |)); + A.to_value (M.of_value (| Value.Integer 7851 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7852 |)); + A.to_value (M.of_value (| Value.Integer 7853 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7854 |)); + A.to_value (M.of_value (| Value.Integer 7855 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7856 |)); + A.to_value (M.of_value (| Value.Integer 7857 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7858 |)); + A.to_value (M.of_value (| Value.Integer 7859 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7860 |)); + A.to_value (M.of_value (| Value.Integer 7861 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7862 |)); + A.to_value (M.of_value (| Value.Integer 7863 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7864 |)); + A.to_value (M.of_value (| Value.Integer 7865 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7866 |)); + A.to_value (M.of_value (| Value.Integer 7867 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7868 |)); + A.to_value (M.of_value (| Value.Integer 7869 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7870 |)); + A.to_value (M.of_value (| Value.Integer 7871 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7872 |)); + A.to_value (M.of_value (| Value.Integer 7873 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7874 |)); + A.to_value (M.of_value (| Value.Integer 7875 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7876 |)); + A.to_value (M.of_value (| Value.Integer 7877 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7878 |)); + A.to_value (M.of_value (| Value.Integer 7879 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7880 |)); + A.to_value (M.of_value (| Value.Integer 7881 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7882 |)); + A.to_value (M.of_value (| Value.Integer 7883 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7884 |)); + A.to_value (M.of_value (| Value.Integer 7885 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7886 |)); + A.to_value (M.of_value (| Value.Integer 7887 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7888 |)); + A.to_value (M.of_value (| Value.Integer 7889 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7890 |)); + A.to_value (M.of_value (| Value.Integer 7891 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7892 |)); + A.to_value (M.of_value (| Value.Integer 7893 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7894 |)); + A.to_value (M.of_value (| Value.Integer 7895 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7896 |)); + A.to_value (M.of_value (| Value.Integer 7897 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7898 |)); + A.to_value (M.of_value (| Value.Integer 7899 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7900 |)); + A.to_value (M.of_value (| Value.Integer 7901 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7902 |)); + A.to_value (M.of_value (| Value.Integer 7903 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7904 |)); + A.to_value (M.of_value (| Value.Integer 7905 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7906 |)); + A.to_value (M.of_value (| Value.Integer 7907 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7908 |)); + A.to_value (M.of_value (| Value.Integer 7909 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7910 |)); + A.to_value (M.of_value (| Value.Integer 7911 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7912 |)); + A.to_value (M.of_value (| Value.Integer 7913 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7914 |)); + A.to_value (M.of_value (| Value.Integer 7915 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7916 |)); + A.to_value (M.of_value (| Value.Integer 7917 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7918 |)); + A.to_value (M.of_value (| Value.Integer 7919 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7920 |)); + A.to_value (M.of_value (| Value.Integer 7921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7922 |)); + A.to_value (M.of_value (| Value.Integer 7923 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7924 |)); + A.to_value (M.of_value (| Value.Integer 7925 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7926 |)); + A.to_value (M.of_value (| Value.Integer 7927 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7928 |)); + A.to_value (M.of_value (| Value.Integer 7929 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7930 |)); + A.to_value (M.of_value (| Value.Integer 7931 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7932 |)); + A.to_value (M.of_value (| Value.Integer 7933 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7934 |)); + A.to_value (M.of_value (| Value.Integer 7935 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7944 |)); + A.to_value (M.of_value (| Value.Integer 7936 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7945 |)); + A.to_value (M.of_value (| Value.Integer 7937 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7946 |)); + A.to_value (M.of_value (| Value.Integer 7938 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7947 |)); + A.to_value (M.of_value (| Value.Integer 7939 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7948 |)); + A.to_value (M.of_value (| Value.Integer 7940 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7949 |)); + A.to_value (M.of_value (| Value.Integer 7941 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7950 |)); + A.to_value (M.of_value (| Value.Integer 7942 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7951 |)); + A.to_value (M.of_value (| Value.Integer 7943 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7960 |)); + A.to_value (M.of_value (| Value.Integer 7952 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7961 |)); + A.to_value (M.of_value (| Value.Integer 7953 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7962 |)); + A.to_value (M.of_value (| Value.Integer 7954 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7963 |)); + A.to_value (M.of_value (| Value.Integer 7955 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7964 |)); + A.to_value (M.of_value (| Value.Integer 7956 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7965 |)); + A.to_value (M.of_value (| Value.Integer 7957 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7976 |)); + A.to_value (M.of_value (| Value.Integer 7968 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7977 |)); + A.to_value (M.of_value (| Value.Integer 7969 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7978 |)); + A.to_value (M.of_value (| Value.Integer 7970 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7979 |)); + A.to_value (M.of_value (| Value.Integer 7971 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7980 |)); + A.to_value (M.of_value (| Value.Integer 7972 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7981 |)); + A.to_value (M.of_value (| Value.Integer 7973 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7982 |)); + A.to_value (M.of_value (| Value.Integer 7974 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7983 |)); + A.to_value (M.of_value (| Value.Integer 7975 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7992 |)); + A.to_value (M.of_value (| Value.Integer 7984 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7993 |)); + A.to_value (M.of_value (| Value.Integer 7985 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7994 |)); + A.to_value (M.of_value (| Value.Integer 7986 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7995 |)); + A.to_value (M.of_value (| Value.Integer 7987 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7996 |)); + A.to_value (M.of_value (| Value.Integer 7988 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7997 |)); + A.to_value (M.of_value (| Value.Integer 7989 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7998 |)); + A.to_value (M.of_value (| Value.Integer 7990 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7999 |)); + A.to_value (M.of_value (| Value.Integer 7991 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8008 |)); + A.to_value (M.of_value (| Value.Integer 8000 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8009 |)); + A.to_value (M.of_value (| Value.Integer 8001 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8010 |)); + A.to_value (M.of_value (| Value.Integer 8002 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8011 |)); + A.to_value (M.of_value (| Value.Integer 8003 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8012 |)); + A.to_value (M.of_value (| Value.Integer 8004 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8013 |)); + A.to_value (M.of_value (| Value.Integer 8005 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8025 |)); + A.to_value (M.of_value (| Value.Integer 8017 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8027 |)); + A.to_value (M.of_value (| Value.Integer 8019 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8029 |)); + A.to_value (M.of_value (| Value.Integer 8021 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8031 |)); + A.to_value (M.of_value (| Value.Integer 8023 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8040 |)); + A.to_value (M.of_value (| Value.Integer 8032 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8041 |)); + A.to_value (M.of_value (| Value.Integer 8033 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8042 |)); + A.to_value (M.of_value (| Value.Integer 8034 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8043 |)); + A.to_value (M.of_value (| Value.Integer 8035 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8044 |)); + A.to_value (M.of_value (| Value.Integer 8036 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8045 |)); + A.to_value (M.of_value (| Value.Integer 8037 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8046 |)); + A.to_value (M.of_value (| Value.Integer 8038 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8047 |)); + A.to_value (M.of_value (| Value.Integer 8039 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8072 |)); + A.to_value (M.of_value (| Value.Integer 8064 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8073 |)); + A.to_value (M.of_value (| Value.Integer 8065 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8074 |)); + A.to_value (M.of_value (| Value.Integer 8066 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8075 |)); + A.to_value (M.of_value (| Value.Integer 8067 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8076 |)); + A.to_value (M.of_value (| Value.Integer 8068 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8077 |)); + A.to_value (M.of_value (| Value.Integer 8069 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8078 |)); + A.to_value (M.of_value (| Value.Integer 8070 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8079 |)); + A.to_value (M.of_value (| Value.Integer 8071 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8088 |)); + A.to_value (M.of_value (| Value.Integer 8080 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8089 |)); + A.to_value (M.of_value (| Value.Integer 8081 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8090 |)); + A.to_value (M.of_value (| Value.Integer 8082 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8091 |)); + A.to_value (M.of_value (| Value.Integer 8083 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8092 |)); + A.to_value (M.of_value (| Value.Integer 8084 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8093 |)); + A.to_value (M.of_value (| Value.Integer 8085 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8094 |)); + A.to_value (M.of_value (| Value.Integer 8086 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8095 |)); + A.to_value (M.of_value (| Value.Integer 8087 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8104 |)); + A.to_value (M.of_value (| Value.Integer 8096 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8105 |)); + A.to_value (M.of_value (| Value.Integer 8097 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8106 |)); + A.to_value (M.of_value (| Value.Integer 8098 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8107 |)); + A.to_value (M.of_value (| Value.Integer 8099 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8108 |)); + A.to_value (M.of_value (| Value.Integer 8100 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8109 |)); + A.to_value (M.of_value (| Value.Integer 8101 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8110 |)); + A.to_value (M.of_value (| Value.Integer 8102 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8111 |)); + A.to_value (M.of_value (| Value.Integer 8103 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8120 |)); + A.to_value (M.of_value (| Value.Integer 8112 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8121 |)); + A.to_value (M.of_value (| Value.Integer 8113 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8122 |)); + A.to_value (M.of_value (| Value.Integer 8048 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8123 |)); + A.to_value (M.of_value (| Value.Integer 8049 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8124 |)); + A.to_value (M.of_value (| Value.Integer 8115 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8136 |)); + A.to_value (M.of_value (| Value.Integer 8050 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8137 |)); + A.to_value (M.of_value (| Value.Integer 8051 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8138 |)); + A.to_value (M.of_value (| Value.Integer 8052 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8139 |)); + A.to_value (M.of_value (| Value.Integer 8053 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8140 |)); + A.to_value (M.of_value (| Value.Integer 8131 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8152 |)); + A.to_value (M.of_value (| Value.Integer 8144 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8153 |)); + A.to_value (M.of_value (| Value.Integer 8145 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8154 |)); + A.to_value (M.of_value (| Value.Integer 8054 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8155 |)); + A.to_value (M.of_value (| Value.Integer 8055 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8168 |)); + A.to_value (M.of_value (| Value.Integer 8160 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8169 |)); + A.to_value (M.of_value (| Value.Integer 8161 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8170 |)); + A.to_value (M.of_value (| Value.Integer 8058 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8171 |)); + A.to_value (M.of_value (| Value.Integer 8059 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8172 |)); + A.to_value (M.of_value (| Value.Integer 8165 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8184 |)); + A.to_value (M.of_value (| Value.Integer 8056 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8185 |)); + A.to_value (M.of_value (| Value.Integer 8057 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8186 |)); + A.to_value (M.of_value (| Value.Integer 8060 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8187 |)); + A.to_value (M.of_value (| Value.Integer 8061 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8188 |)); + A.to_value (M.of_value (| Value.Integer 8179 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8486 |)); + A.to_value (M.of_value (| Value.Integer 969 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8490 |)); + A.to_value (M.of_value (| Value.Integer 107 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8491 |)); + A.to_value (M.of_value (| Value.Integer 229 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8498 |)); + A.to_value (M.of_value (| Value.Integer 8526 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8544 |)); + A.to_value (M.of_value (| Value.Integer 8560 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8545 |)); + A.to_value (M.of_value (| Value.Integer 8561 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8546 |)); + A.to_value (M.of_value (| Value.Integer 8562 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8547 |)); + A.to_value (M.of_value (| Value.Integer 8563 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8548 |)); + A.to_value (M.of_value (| Value.Integer 8564 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8549 |)); + A.to_value (M.of_value (| Value.Integer 8565 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8550 |)); + A.to_value (M.of_value (| Value.Integer 8566 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8551 |)); + A.to_value (M.of_value (| Value.Integer 8567 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8552 |)); + A.to_value (M.of_value (| Value.Integer 8568 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8553 |)); + A.to_value (M.of_value (| Value.Integer 8569 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8554 |)); + A.to_value (M.of_value (| Value.Integer 8570 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8555 |)); + A.to_value (M.of_value (| Value.Integer 8571 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8556 |)); + A.to_value (M.of_value (| Value.Integer 8572 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8557 |)); + A.to_value (M.of_value (| Value.Integer 8573 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8558 |)); + A.to_value (M.of_value (| Value.Integer 8574 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8559 |)); + A.to_value (M.of_value (| Value.Integer 8575 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8579 |)); + A.to_value (M.of_value (| Value.Integer 8580 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9398 |)); + A.to_value (M.of_value (| Value.Integer 9424 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9399 |)); + A.to_value (M.of_value (| Value.Integer 9425 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9400 |)); + A.to_value (M.of_value (| Value.Integer 9426 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9401 |)); + A.to_value (M.of_value (| Value.Integer 9427 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9402 |)); + A.to_value (M.of_value (| Value.Integer 9428 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9403 |)); + A.to_value (M.of_value (| Value.Integer 9429 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9404 |)); + A.to_value (M.of_value (| Value.Integer 9430 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9405 |)); + A.to_value (M.of_value (| Value.Integer 9431 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9406 |)); + A.to_value (M.of_value (| Value.Integer 9432 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9407 |)); + A.to_value (M.of_value (| Value.Integer 9433 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9408 |)); + A.to_value (M.of_value (| Value.Integer 9434 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9409 |)); + A.to_value (M.of_value (| Value.Integer 9435 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9410 |)); + A.to_value (M.of_value (| Value.Integer 9436 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9411 |)); + A.to_value (M.of_value (| Value.Integer 9437 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9412 |)); + A.to_value (M.of_value (| Value.Integer 9438 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9413 |)); + A.to_value (M.of_value (| Value.Integer 9439 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9414 |)); + A.to_value (M.of_value (| Value.Integer 9440 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9415 |)); + A.to_value (M.of_value (| Value.Integer 9441 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9416 |)); + A.to_value (M.of_value (| Value.Integer 9442 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9417 |)); + A.to_value (M.of_value (| Value.Integer 9443 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9418 |)); + A.to_value (M.of_value (| Value.Integer 9444 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9419 |)); + A.to_value (M.of_value (| Value.Integer 9445 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9420 |)); + A.to_value (M.of_value (| Value.Integer 9446 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9421 |)); + A.to_value (M.of_value (| Value.Integer 9447 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9422 |)); + A.to_value (M.of_value (| Value.Integer 9448 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9423 |)); + A.to_value (M.of_value (| Value.Integer 9449 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11264 |)); + A.to_value (M.of_value (| Value.Integer 11312 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11265 |)); + A.to_value (M.of_value (| Value.Integer 11313 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11266 |)); + A.to_value (M.of_value (| Value.Integer 11314 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11267 |)); + A.to_value (M.of_value (| Value.Integer 11315 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11268 |)); + A.to_value (M.of_value (| Value.Integer 11316 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11269 |)); + A.to_value (M.of_value (| Value.Integer 11317 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11270 |)); + A.to_value (M.of_value (| Value.Integer 11318 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11271 |)); + A.to_value (M.of_value (| Value.Integer 11319 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11272 |)); + A.to_value (M.of_value (| Value.Integer 11320 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11273 |)); + A.to_value (M.of_value (| Value.Integer 11321 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11274 |)); + A.to_value (M.of_value (| Value.Integer 11322 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11275 |)); + A.to_value (M.of_value (| Value.Integer 11323 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11276 |)); + A.to_value (M.of_value (| Value.Integer 11324 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11277 |)); + A.to_value (M.of_value (| Value.Integer 11325 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11278 |)); + A.to_value (M.of_value (| Value.Integer 11326 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11279 |)); + A.to_value (M.of_value (| Value.Integer 11327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11280 |)); + A.to_value (M.of_value (| Value.Integer 11328 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11281 |)); + A.to_value (M.of_value (| Value.Integer 11329 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11282 |)); + A.to_value (M.of_value (| Value.Integer 11330 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11283 |)); + A.to_value (M.of_value (| Value.Integer 11331 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11284 |)); + A.to_value (M.of_value (| Value.Integer 11332 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11285 |)); + A.to_value (M.of_value (| Value.Integer 11333 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11286 |)); + A.to_value (M.of_value (| Value.Integer 11334 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11287 |)); + A.to_value (M.of_value (| Value.Integer 11335 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11288 |)); + A.to_value (M.of_value (| Value.Integer 11336 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11289 |)); + A.to_value (M.of_value (| Value.Integer 11337 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11290 |)); + A.to_value (M.of_value (| Value.Integer 11338 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11291 |)); + A.to_value (M.of_value (| Value.Integer 11339 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11292 |)); + A.to_value (M.of_value (| Value.Integer 11340 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11293 |)); + A.to_value (M.of_value (| Value.Integer 11341 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11294 |)); + A.to_value (M.of_value (| Value.Integer 11342 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11295 |)); + A.to_value (M.of_value (| Value.Integer 11343 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11296 |)); + A.to_value (M.of_value (| Value.Integer 11344 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11297 |)); + A.to_value (M.of_value (| Value.Integer 11345 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11298 |)); + A.to_value (M.of_value (| Value.Integer 11346 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11299 |)); + A.to_value (M.of_value (| Value.Integer 11347 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11300 |)); + A.to_value (M.of_value (| Value.Integer 11348 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11301 |)); + A.to_value (M.of_value (| Value.Integer 11349 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11302 |)); + A.to_value (M.of_value (| Value.Integer 11350 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11303 |)); + A.to_value (M.of_value (| Value.Integer 11351 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11304 |)); + A.to_value (M.of_value (| Value.Integer 11352 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11305 |)); + A.to_value (M.of_value (| Value.Integer 11353 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11306 |)); + A.to_value (M.of_value (| Value.Integer 11354 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11307 |)); + A.to_value (M.of_value (| Value.Integer 11355 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11308 |)); + A.to_value (M.of_value (| Value.Integer 11356 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11309 |)); + A.to_value (M.of_value (| Value.Integer 11357 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11310 |)); + A.to_value (M.of_value (| Value.Integer 11358 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11311 |)); + A.to_value (M.of_value (| Value.Integer 11359 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11360 |)); + A.to_value (M.of_value (| Value.Integer 11361 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11362 |)); + A.to_value (M.of_value (| Value.Integer 619 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11363 |)); + A.to_value (M.of_value (| Value.Integer 7549 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11364 |)); + A.to_value (M.of_value (| Value.Integer 637 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11367 |)); + A.to_value (M.of_value (| Value.Integer 11368 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11369 |)); + A.to_value (M.of_value (| Value.Integer 11370 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11371 |)); + A.to_value (M.of_value (| Value.Integer 11372 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11373 |)); + A.to_value (M.of_value (| Value.Integer 593 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11374 |)); + A.to_value (M.of_value (| Value.Integer 625 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11375 |)); + A.to_value (M.of_value (| Value.Integer 592 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11376 |)); + A.to_value (M.of_value (| Value.Integer 594 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11378 |)); + A.to_value (M.of_value (| Value.Integer 11379 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11381 |)); + A.to_value (M.of_value (| Value.Integer 11382 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11390 |)); + A.to_value (M.of_value (| Value.Integer 575 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11391 |)); + A.to_value (M.of_value (| Value.Integer 576 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11392 |)); + A.to_value (M.of_value (| Value.Integer 11393 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11394 |)); + A.to_value (M.of_value (| Value.Integer 11395 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11396 |)); + A.to_value (M.of_value (| Value.Integer 11397 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11398 |)); + A.to_value (M.of_value (| Value.Integer 11399 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11400 |)); + A.to_value (M.of_value (| Value.Integer 11401 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11402 |)); + A.to_value (M.of_value (| Value.Integer 11403 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11404 |)); + A.to_value (M.of_value (| Value.Integer 11405 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11406 |)); + A.to_value (M.of_value (| Value.Integer 11407 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11408 |)); + A.to_value (M.of_value (| Value.Integer 11409 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11410 |)); + A.to_value (M.of_value (| Value.Integer 11411 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11412 |)); + A.to_value (M.of_value (| Value.Integer 11413 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11414 |)); + A.to_value (M.of_value (| Value.Integer 11415 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11416 |)); + A.to_value (M.of_value (| Value.Integer 11417 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11418 |)); + A.to_value (M.of_value (| Value.Integer 11419 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11420 |)); + A.to_value (M.of_value (| Value.Integer 11421 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11422 |)); + A.to_value (M.of_value (| Value.Integer 11423 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11424 |)); + A.to_value (M.of_value (| Value.Integer 11425 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11426 |)); + A.to_value (M.of_value (| Value.Integer 11427 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11428 |)); + A.to_value (M.of_value (| Value.Integer 11429 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11430 |)); + A.to_value (M.of_value (| Value.Integer 11431 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11432 |)); + A.to_value (M.of_value (| Value.Integer 11433 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11434 |)); + A.to_value (M.of_value (| Value.Integer 11435 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11436 |)); + A.to_value (M.of_value (| Value.Integer 11437 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11438 |)); + A.to_value (M.of_value (| Value.Integer 11439 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11440 |)); + A.to_value (M.of_value (| Value.Integer 11441 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11442 |)); + A.to_value (M.of_value (| Value.Integer 11443 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11444 |)); + A.to_value (M.of_value (| Value.Integer 11445 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11446 |)); + A.to_value (M.of_value (| Value.Integer 11447 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11448 |)); + A.to_value (M.of_value (| Value.Integer 11449 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11450 |)); + A.to_value (M.of_value (| Value.Integer 11451 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11452 |)); + A.to_value (M.of_value (| Value.Integer 11453 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11454 |)); + A.to_value (M.of_value (| Value.Integer 11455 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11456 |)); + A.to_value (M.of_value (| Value.Integer 11457 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11458 |)); + A.to_value (M.of_value (| Value.Integer 11459 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11460 |)); + A.to_value (M.of_value (| Value.Integer 11461 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11462 |)); + A.to_value (M.of_value (| Value.Integer 11463 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11464 |)); + A.to_value (M.of_value (| Value.Integer 11465 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11466 |)); + A.to_value (M.of_value (| Value.Integer 11467 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11468 |)); + A.to_value (M.of_value (| Value.Integer 11469 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11470 |)); + A.to_value (M.of_value (| Value.Integer 11471 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11472 |)); + A.to_value (M.of_value (| Value.Integer 11473 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11474 |)); + A.to_value (M.of_value (| Value.Integer 11475 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11476 |)); + A.to_value (M.of_value (| Value.Integer 11477 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11478 |)); + A.to_value (M.of_value (| Value.Integer 11479 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11480 |)); + A.to_value (M.of_value (| Value.Integer 11481 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11482 |)); + A.to_value (M.of_value (| Value.Integer 11483 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11484 |)); + A.to_value (M.of_value (| Value.Integer 11485 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11486 |)); + A.to_value (M.of_value (| Value.Integer 11487 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11488 |)); + A.to_value (M.of_value (| Value.Integer 11489 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11490 |)); + A.to_value (M.of_value (| Value.Integer 11491 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11499 |)); + A.to_value (M.of_value (| Value.Integer 11500 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11501 |)); + A.to_value (M.of_value (| Value.Integer 11502 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11506 |)); + A.to_value (M.of_value (| Value.Integer 11507 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42560 |)); + A.to_value (M.of_value (| Value.Integer 42561 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42562 |)); + A.to_value (M.of_value (| Value.Integer 42563 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42564 |)); + A.to_value (M.of_value (| Value.Integer 42565 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42566 |)); + A.to_value (M.of_value (| Value.Integer 42567 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42568 |)); + A.to_value (M.of_value (| Value.Integer 42569 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42570 |)); + A.to_value (M.of_value (| Value.Integer 42571 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42572 |)); + A.to_value (M.of_value (| Value.Integer 42573 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42574 |)); + A.to_value (M.of_value (| Value.Integer 42575 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42576 |)); + A.to_value (M.of_value (| Value.Integer 42577 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42578 |)); + A.to_value (M.of_value (| Value.Integer 42579 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42580 |)); + A.to_value (M.of_value (| Value.Integer 42581 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42582 |)); + A.to_value (M.of_value (| Value.Integer 42583 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42584 |)); + A.to_value (M.of_value (| Value.Integer 42585 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42586 |)); + A.to_value (M.of_value (| Value.Integer 42587 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42588 |)); + A.to_value (M.of_value (| Value.Integer 42589 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42590 |)); + A.to_value (M.of_value (| Value.Integer 42591 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42592 |)); + A.to_value (M.of_value (| Value.Integer 42593 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42594 |)); + A.to_value (M.of_value (| Value.Integer 42595 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42596 |)); + A.to_value (M.of_value (| Value.Integer 42597 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42598 |)); + A.to_value (M.of_value (| Value.Integer 42599 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42600 |)); + A.to_value (M.of_value (| Value.Integer 42601 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42602 |)); + A.to_value (M.of_value (| Value.Integer 42603 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42604 |)); + A.to_value (M.of_value (| Value.Integer 42605 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42624 |)); + A.to_value (M.of_value (| Value.Integer 42625 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42626 |)); + A.to_value (M.of_value (| Value.Integer 42627 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42628 |)); + A.to_value (M.of_value (| Value.Integer 42629 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42630 |)); + A.to_value (M.of_value (| Value.Integer 42631 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42632 |)); + A.to_value (M.of_value (| Value.Integer 42633 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42634 |)); + A.to_value (M.of_value (| Value.Integer 42635 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42636 |)); + A.to_value (M.of_value (| Value.Integer 42637 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42638 |)); + A.to_value (M.of_value (| Value.Integer 42639 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42640 |)); + A.to_value (M.of_value (| Value.Integer 42641 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42642 |)); + A.to_value (M.of_value (| Value.Integer 42643 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42644 |)); + A.to_value (M.of_value (| Value.Integer 42645 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42646 |)); + A.to_value (M.of_value (| Value.Integer 42647 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42648 |)); + A.to_value (M.of_value (| Value.Integer 42649 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42650 |)); + A.to_value (M.of_value (| Value.Integer 42651 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42786 |)); + A.to_value (M.of_value (| Value.Integer 42787 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42788 |)); + A.to_value (M.of_value (| Value.Integer 42789 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42790 |)); + A.to_value (M.of_value (| Value.Integer 42791 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42792 |)); + A.to_value (M.of_value (| Value.Integer 42793 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42794 |)); + A.to_value (M.of_value (| Value.Integer 42795 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42796 |)); + A.to_value (M.of_value (| Value.Integer 42797 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42798 |)); + A.to_value (M.of_value (| Value.Integer 42799 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42802 |)); + A.to_value (M.of_value (| Value.Integer 42803 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42804 |)); + A.to_value (M.of_value (| Value.Integer 42805 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42806 |)); + A.to_value (M.of_value (| Value.Integer 42807 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42808 |)); + A.to_value (M.of_value (| Value.Integer 42809 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42810 |)); + A.to_value (M.of_value (| Value.Integer 42811 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42812 |)); + A.to_value (M.of_value (| Value.Integer 42813 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42814 |)); + A.to_value (M.of_value (| Value.Integer 42815 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42816 |)); + A.to_value (M.of_value (| Value.Integer 42817 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42818 |)); + A.to_value (M.of_value (| Value.Integer 42819 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42820 |)); + A.to_value (M.of_value (| Value.Integer 42821 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42822 |)); + A.to_value (M.of_value (| Value.Integer 42823 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42824 |)); + A.to_value (M.of_value (| Value.Integer 42825 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42826 |)); + A.to_value (M.of_value (| Value.Integer 42827 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42828 |)); + A.to_value (M.of_value (| Value.Integer 42829 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42830 |)); + A.to_value (M.of_value (| Value.Integer 42831 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42832 |)); + A.to_value (M.of_value (| Value.Integer 42833 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42834 |)); + A.to_value (M.of_value (| Value.Integer 42835 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42836 |)); + A.to_value (M.of_value (| Value.Integer 42837 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42838 |)); + A.to_value (M.of_value (| Value.Integer 42839 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42840 |)); + A.to_value (M.of_value (| Value.Integer 42841 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42842 |)); + A.to_value (M.of_value (| Value.Integer 42843 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42844 |)); + A.to_value (M.of_value (| Value.Integer 42845 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42846 |)); + A.to_value (M.of_value (| Value.Integer 42847 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42848 |)); + A.to_value (M.of_value (| Value.Integer 42849 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42850 |)); + A.to_value (M.of_value (| Value.Integer 42851 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42852 |)); + A.to_value (M.of_value (| Value.Integer 42853 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42854 |)); + A.to_value (M.of_value (| Value.Integer 42855 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42856 |)); + A.to_value (M.of_value (| Value.Integer 42857 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42858 |)); + A.to_value (M.of_value (| Value.Integer 42859 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42860 |)); + A.to_value (M.of_value (| Value.Integer 42861 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42862 |)); + A.to_value (M.of_value (| Value.Integer 42863 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42873 |)); + A.to_value (M.of_value (| Value.Integer 42874 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42875 |)); + A.to_value (M.of_value (| Value.Integer 42876 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42877 |)); + A.to_value (M.of_value (| Value.Integer 7545 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42878 |)); + A.to_value (M.of_value (| Value.Integer 42879 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42880 |)); + A.to_value (M.of_value (| Value.Integer 42881 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42882 |)); + A.to_value (M.of_value (| Value.Integer 42883 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42884 |)); + A.to_value (M.of_value (| Value.Integer 42885 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42886 |)); + A.to_value (M.of_value (| Value.Integer 42887 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42891 |)); + A.to_value (M.of_value (| Value.Integer 42892 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42893 |)); + A.to_value (M.of_value (| Value.Integer 613 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42896 |)); + A.to_value (M.of_value (| Value.Integer 42897 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42898 |)); + A.to_value (M.of_value (| Value.Integer 42899 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42902 |)); + A.to_value (M.of_value (| Value.Integer 42903 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42904 |)); + A.to_value (M.of_value (| Value.Integer 42905 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42906 |)); + A.to_value (M.of_value (| Value.Integer 42907 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42908 |)); + A.to_value (M.of_value (| Value.Integer 42909 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42910 |)); + A.to_value (M.of_value (| Value.Integer 42911 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42912 |)); + A.to_value (M.of_value (| Value.Integer 42913 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42914 |)); + A.to_value (M.of_value (| Value.Integer 42915 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42916 |)); + A.to_value (M.of_value (| Value.Integer 42917 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42918 |)); + A.to_value (M.of_value (| Value.Integer 42919 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42920 |)); + A.to_value (M.of_value (| Value.Integer 42921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42922 |)); + A.to_value (M.of_value (| Value.Integer 614 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42923 |)); + A.to_value (M.of_value (| Value.Integer 604 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42924 |)); + A.to_value (M.of_value (| Value.Integer 609 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42925 |)); + A.to_value (M.of_value (| Value.Integer 620 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42926 |)); + A.to_value (M.of_value (| Value.Integer 618 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42928 |)); + A.to_value (M.of_value (| Value.Integer 670 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42929 |)); + A.to_value (M.of_value (| Value.Integer 647 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42930 |)); + A.to_value (M.of_value (| Value.Integer 669 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42931 |)); + A.to_value (M.of_value (| Value.Integer 43859 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42932 |)); + A.to_value (M.of_value (| Value.Integer 42933 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42934 |)); + A.to_value (M.of_value (| Value.Integer 42935 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42936 |)); + A.to_value (M.of_value (| Value.Integer 42937 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42938 |)); + A.to_value (M.of_value (| Value.Integer 42939 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42940 |)); + A.to_value (M.of_value (| Value.Integer 42941 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42942 |)); + A.to_value (M.of_value (| Value.Integer 42943 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42944 |)); + A.to_value (M.of_value (| Value.Integer 42945 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42946 |)); + A.to_value (M.of_value (| Value.Integer 42947 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42948 |)); + A.to_value (M.of_value (| Value.Integer 42900 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42949 |)); + A.to_value (M.of_value (| Value.Integer 642 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42950 |)); + A.to_value (M.of_value (| Value.Integer 7566 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42951 |)); + A.to_value (M.of_value (| Value.Integer 42952 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42953 |)); + A.to_value (M.of_value (| Value.Integer 42954 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42960 |)); + A.to_value (M.of_value (| Value.Integer 42961 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42966 |)); + A.to_value (M.of_value (| Value.Integer 42967 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42968 |)); + A.to_value (M.of_value (| Value.Integer 42969 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42997 |)); + A.to_value (M.of_value (| Value.Integer 42998 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65313 |)); + A.to_value (M.of_value (| Value.Integer 65345 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65314 |)); + A.to_value (M.of_value (| Value.Integer 65346 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65315 |)); + A.to_value (M.of_value (| Value.Integer 65347 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65316 |)); + A.to_value (M.of_value (| Value.Integer 65348 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65317 |)); + A.to_value (M.of_value (| Value.Integer 65349 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65318 |)); + A.to_value (M.of_value (| Value.Integer 65350 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65319 |)); + A.to_value (M.of_value (| Value.Integer 65351 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65320 |)); + A.to_value (M.of_value (| Value.Integer 65352 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65321 |)); + A.to_value (M.of_value (| Value.Integer 65353 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65322 |)); + A.to_value (M.of_value (| Value.Integer 65354 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65323 |)); + A.to_value (M.of_value (| Value.Integer 65355 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65324 |)); + A.to_value (M.of_value (| Value.Integer 65356 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65325 |)); + A.to_value (M.of_value (| Value.Integer 65357 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65326 |)); + A.to_value (M.of_value (| Value.Integer 65358 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65327 |)); + A.to_value (M.of_value (| Value.Integer 65359 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65328 |)); + A.to_value (M.of_value (| Value.Integer 65360 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65329 |)); + A.to_value (M.of_value (| Value.Integer 65361 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65330 |)); + A.to_value (M.of_value (| Value.Integer 65362 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65331 |)); + A.to_value (M.of_value (| Value.Integer 65363 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65332 |)); + A.to_value (M.of_value (| Value.Integer 65364 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65333 |)); + A.to_value (M.of_value (| Value.Integer 65365 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65334 |)); + A.to_value (M.of_value (| Value.Integer 65366 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65335 |)); + A.to_value (M.of_value (| Value.Integer 65367 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65336 |)); + A.to_value (M.of_value (| Value.Integer 65368 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65337 |)); + A.to_value (M.of_value (| Value.Integer 65369 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65338 |)); + A.to_value (M.of_value (| Value.Integer 65370 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66560 |)); + A.to_value (M.of_value (| Value.Integer 66600 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66561 |)); + A.to_value (M.of_value (| Value.Integer 66601 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66562 |)); + A.to_value (M.of_value (| Value.Integer 66602 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66563 |)); + A.to_value (M.of_value (| Value.Integer 66603 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66564 |)); + A.to_value (M.of_value (| Value.Integer 66604 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66565 |)); + A.to_value (M.of_value (| Value.Integer 66605 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66566 |)); + A.to_value (M.of_value (| Value.Integer 66606 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66567 |)); + A.to_value (M.of_value (| Value.Integer 66607 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66568 |)); + A.to_value (M.of_value (| Value.Integer 66608 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66569 |)); + A.to_value (M.of_value (| Value.Integer 66609 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66570 |)); + A.to_value (M.of_value (| Value.Integer 66610 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66571 |)); + A.to_value (M.of_value (| Value.Integer 66611 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66572 |)); + A.to_value (M.of_value (| Value.Integer 66612 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66573 |)); + A.to_value (M.of_value (| Value.Integer 66613 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66574 |)); + A.to_value (M.of_value (| Value.Integer 66614 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66575 |)); + A.to_value (M.of_value (| Value.Integer 66615 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66576 |)); + A.to_value (M.of_value (| Value.Integer 66616 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66577 |)); + A.to_value (M.of_value (| Value.Integer 66617 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66578 |)); + A.to_value (M.of_value (| Value.Integer 66618 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66579 |)); + A.to_value (M.of_value (| Value.Integer 66619 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66580 |)); + A.to_value (M.of_value (| Value.Integer 66620 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66581 |)); + A.to_value (M.of_value (| Value.Integer 66621 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66582 |)); + A.to_value (M.of_value (| Value.Integer 66622 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66583 |)); + A.to_value (M.of_value (| Value.Integer 66623 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66584 |)); + A.to_value (M.of_value (| Value.Integer 66624 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66585 |)); + A.to_value (M.of_value (| Value.Integer 66625 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66586 |)); + A.to_value (M.of_value (| Value.Integer 66626 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66587 |)); + A.to_value (M.of_value (| Value.Integer 66627 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66588 |)); + A.to_value (M.of_value (| Value.Integer 66628 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66589 |)); + A.to_value (M.of_value (| Value.Integer 66629 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66590 |)); + A.to_value (M.of_value (| Value.Integer 66630 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66591 |)); + A.to_value (M.of_value (| Value.Integer 66631 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66592 |)); + A.to_value (M.of_value (| Value.Integer 66632 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66593 |)); + A.to_value (M.of_value (| Value.Integer 66633 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66594 |)); + A.to_value (M.of_value (| Value.Integer 66634 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66595 |)); + A.to_value (M.of_value (| Value.Integer 66635 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66596 |)); + A.to_value (M.of_value (| Value.Integer 66636 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66597 |)); + A.to_value (M.of_value (| Value.Integer 66637 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66598 |)); + A.to_value (M.of_value (| Value.Integer 66638 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66599 |)); + A.to_value (M.of_value (| Value.Integer 66639 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66736 |)); + A.to_value (M.of_value (| Value.Integer 66776 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66737 |)); + A.to_value (M.of_value (| Value.Integer 66777 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66738 |)); + A.to_value (M.of_value (| Value.Integer 66778 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66739 |)); + A.to_value (M.of_value (| Value.Integer 66779 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66740 |)); + A.to_value (M.of_value (| Value.Integer 66780 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66741 |)); + A.to_value (M.of_value (| Value.Integer 66781 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66742 |)); + A.to_value (M.of_value (| Value.Integer 66782 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66743 |)); + A.to_value (M.of_value (| Value.Integer 66783 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66744 |)); + A.to_value (M.of_value (| Value.Integer 66784 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66745 |)); + A.to_value (M.of_value (| Value.Integer 66785 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66746 |)); + A.to_value (M.of_value (| Value.Integer 66786 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66747 |)); + A.to_value (M.of_value (| Value.Integer 66787 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66748 |)); + A.to_value (M.of_value (| Value.Integer 66788 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66749 |)); + A.to_value (M.of_value (| Value.Integer 66789 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66750 |)); + A.to_value (M.of_value (| Value.Integer 66790 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66751 |)); + A.to_value (M.of_value (| Value.Integer 66791 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66752 |)); + A.to_value (M.of_value (| Value.Integer 66792 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66753 |)); + A.to_value (M.of_value (| Value.Integer 66793 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66754 |)); + A.to_value (M.of_value (| Value.Integer 66794 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66755 |)); + A.to_value (M.of_value (| Value.Integer 66795 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66756 |)); + A.to_value (M.of_value (| Value.Integer 66796 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66757 |)); + A.to_value (M.of_value (| Value.Integer 66797 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66758 |)); + A.to_value (M.of_value (| Value.Integer 66798 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66759 |)); + A.to_value (M.of_value (| Value.Integer 66799 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66760 |)); + A.to_value (M.of_value (| Value.Integer 66800 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66761 |)); + A.to_value (M.of_value (| Value.Integer 66801 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66762 |)); + A.to_value (M.of_value (| Value.Integer 66802 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66763 |)); + A.to_value (M.of_value (| Value.Integer 66803 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66764 |)); + A.to_value (M.of_value (| Value.Integer 66804 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66765 |)); + A.to_value (M.of_value (| Value.Integer 66805 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66766 |)); + A.to_value (M.of_value (| Value.Integer 66806 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66767 |)); + A.to_value (M.of_value (| Value.Integer 66807 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66768 |)); + A.to_value (M.of_value (| Value.Integer 66808 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66769 |)); + A.to_value (M.of_value (| Value.Integer 66809 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66770 |)); + A.to_value (M.of_value (| Value.Integer 66810 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66771 |)); + A.to_value (M.of_value (| Value.Integer 66811 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66928 |)); + A.to_value (M.of_value (| Value.Integer 66967 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66929 |)); + A.to_value (M.of_value (| Value.Integer 66968 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66930 |)); + A.to_value (M.of_value (| Value.Integer 66969 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66931 |)); + A.to_value (M.of_value (| Value.Integer 66970 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66932 |)); + A.to_value (M.of_value (| Value.Integer 66971 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66933 |)); + A.to_value (M.of_value (| Value.Integer 66972 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66934 |)); + A.to_value (M.of_value (| Value.Integer 66973 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66935 |)); + A.to_value (M.of_value (| Value.Integer 66974 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66936 |)); + A.to_value (M.of_value (| Value.Integer 66975 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66937 |)); + A.to_value (M.of_value (| Value.Integer 66976 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66938 |)); + A.to_value (M.of_value (| Value.Integer 66977 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66940 |)); + A.to_value (M.of_value (| Value.Integer 66979 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66941 |)); + A.to_value (M.of_value (| Value.Integer 66980 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66942 |)); + A.to_value (M.of_value (| Value.Integer 66981 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66943 |)); + A.to_value (M.of_value (| Value.Integer 66982 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66944 |)); + A.to_value (M.of_value (| Value.Integer 66983 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66945 |)); + A.to_value (M.of_value (| Value.Integer 66984 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66946 |)); + A.to_value (M.of_value (| Value.Integer 66985 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66947 |)); + A.to_value (M.of_value (| Value.Integer 66986 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66948 |)); + A.to_value (M.of_value (| Value.Integer 66987 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66949 |)); + A.to_value (M.of_value (| Value.Integer 66988 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66950 |)); + A.to_value (M.of_value (| Value.Integer 66989 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66951 |)); + A.to_value (M.of_value (| Value.Integer 66990 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66952 |)); + A.to_value (M.of_value (| Value.Integer 66991 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66953 |)); + A.to_value (M.of_value (| Value.Integer 66992 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66954 |)); + A.to_value (M.of_value (| Value.Integer 66993 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66956 |)); + A.to_value (M.of_value (| Value.Integer 66995 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66957 |)); + A.to_value (M.of_value (| Value.Integer 66996 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66958 |)); + A.to_value (M.of_value (| Value.Integer 66997 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66959 |)); + A.to_value (M.of_value (| Value.Integer 66998 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66960 |)); + A.to_value (M.of_value (| Value.Integer 66999 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66961 |)); + A.to_value (M.of_value (| Value.Integer 67000 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66962 |)); + A.to_value (M.of_value (| Value.Integer 67001 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66964 |)); + A.to_value (M.of_value (| Value.Integer 67003 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66965 |)); + A.to_value (M.of_value (| Value.Integer 67004 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68736 |)); + A.to_value (M.of_value (| Value.Integer 68800 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68737 |)); + A.to_value (M.of_value (| Value.Integer 68801 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68738 |)); + A.to_value (M.of_value (| Value.Integer 68802 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68739 |)); + A.to_value (M.of_value (| Value.Integer 68803 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68740 |)); + A.to_value (M.of_value (| Value.Integer 68804 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68741 |)); + A.to_value (M.of_value (| Value.Integer 68805 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68742 |)); + A.to_value (M.of_value (| Value.Integer 68806 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68743 |)); + A.to_value (M.of_value (| Value.Integer 68807 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68744 |)); + A.to_value (M.of_value (| Value.Integer 68808 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68745 |)); + A.to_value (M.of_value (| Value.Integer 68809 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68746 |)); + A.to_value (M.of_value (| Value.Integer 68810 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68747 |)); + A.to_value (M.of_value (| Value.Integer 68811 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68748 |)); + A.to_value (M.of_value (| Value.Integer 68812 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68749 |)); + A.to_value (M.of_value (| Value.Integer 68813 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68750 |)); + A.to_value (M.of_value (| Value.Integer 68814 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68751 |)); + A.to_value (M.of_value (| Value.Integer 68815 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68752 |)); + A.to_value (M.of_value (| Value.Integer 68816 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68753 |)); + A.to_value (M.of_value (| Value.Integer 68817 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68754 |)); + A.to_value (M.of_value (| Value.Integer 68818 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68755 |)); + A.to_value (M.of_value (| Value.Integer 68819 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68756 |)); + A.to_value (M.of_value (| Value.Integer 68820 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68757 |)); + A.to_value (M.of_value (| Value.Integer 68821 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68758 |)); + A.to_value (M.of_value (| Value.Integer 68822 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68759 |)); + A.to_value (M.of_value (| Value.Integer 68823 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68760 |)); + A.to_value (M.of_value (| Value.Integer 68824 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68761 |)); + A.to_value (M.of_value (| Value.Integer 68825 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68762 |)); + A.to_value (M.of_value (| Value.Integer 68826 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68763 |)); + A.to_value (M.of_value (| Value.Integer 68827 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68764 |)); + A.to_value (M.of_value (| Value.Integer 68828 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68765 |)); + A.to_value (M.of_value (| Value.Integer 68829 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68766 |)); + A.to_value (M.of_value (| Value.Integer 68830 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68767 |)); + A.to_value (M.of_value (| Value.Integer 68831 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68768 |)); + A.to_value (M.of_value (| Value.Integer 68832 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68769 |)); + A.to_value (M.of_value (| Value.Integer 68833 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68770 |)); + A.to_value (M.of_value (| Value.Integer 68834 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68771 |)); + A.to_value (M.of_value (| Value.Integer 68835 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68772 |)); + A.to_value (M.of_value (| Value.Integer 68836 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68773 |)); + A.to_value (M.of_value (| Value.Integer 68837 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68774 |)); + A.to_value (M.of_value (| Value.Integer 68838 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68775 |)); + A.to_value (M.of_value (| Value.Integer 68839 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68776 |)); + A.to_value (M.of_value (| Value.Integer 68840 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68777 |)); + A.to_value (M.of_value (| Value.Integer 68841 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68778 |)); + A.to_value (M.of_value (| Value.Integer 68842 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68779 |)); + A.to_value (M.of_value (| Value.Integer 68843 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68780 |)); + A.to_value (M.of_value (| Value.Integer 68844 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68781 |)); + A.to_value (M.of_value (| Value.Integer 68845 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68782 |)); + A.to_value (M.of_value (| Value.Integer 68846 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68783 |)); + A.to_value (M.of_value (| Value.Integer 68847 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68784 |)); + A.to_value (M.of_value (| Value.Integer 68848 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68785 |)); + A.to_value (M.of_value (| Value.Integer 68849 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68786 |)); + A.to_value (M.of_value (| Value.Integer 68850 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71840 |)); + A.to_value (M.of_value (| Value.Integer 71872 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71841 |)); + A.to_value (M.of_value (| Value.Integer 71873 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71842 |)); + A.to_value (M.of_value (| Value.Integer 71874 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71843 |)); + A.to_value (M.of_value (| Value.Integer 71875 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71844 |)); + A.to_value (M.of_value (| Value.Integer 71876 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71845 |)); + A.to_value (M.of_value (| Value.Integer 71877 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71846 |)); + A.to_value (M.of_value (| Value.Integer 71878 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71847 |)); + A.to_value (M.of_value (| Value.Integer 71879 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71848 |)); + A.to_value (M.of_value (| Value.Integer 71880 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71849 |)); + A.to_value (M.of_value (| Value.Integer 71881 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71850 |)); + A.to_value (M.of_value (| Value.Integer 71882 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71851 |)); + A.to_value (M.of_value (| Value.Integer 71883 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71852 |)); + A.to_value (M.of_value (| Value.Integer 71884 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71853 |)); + A.to_value (M.of_value (| Value.Integer 71885 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71854 |)); + A.to_value (M.of_value (| Value.Integer 71886 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71855 |)); + A.to_value (M.of_value (| Value.Integer 71887 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71856 |)); + A.to_value (M.of_value (| Value.Integer 71888 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71857 |)); + A.to_value (M.of_value (| Value.Integer 71889 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71858 |)); + A.to_value (M.of_value (| Value.Integer 71890 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71859 |)); + A.to_value (M.of_value (| Value.Integer 71891 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71860 |)); + A.to_value (M.of_value (| Value.Integer 71892 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71861 |)); + A.to_value (M.of_value (| Value.Integer 71893 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71862 |)); + A.to_value (M.of_value (| Value.Integer 71894 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71863 |)); + A.to_value (M.of_value (| Value.Integer 71895 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71864 |)); + A.to_value (M.of_value (| Value.Integer 71896 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71865 |)); + A.to_value (M.of_value (| Value.Integer 71897 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71866 |)); + A.to_value (M.of_value (| Value.Integer 71898 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71867 |)); + A.to_value (M.of_value (| Value.Integer 71899 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71868 |)); + A.to_value (M.of_value (| Value.Integer 71900 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71869 |)); + A.to_value (M.of_value (| Value.Integer 71901 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71870 |)); + A.to_value (M.of_value (| Value.Integer 71902 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71871 |)); + A.to_value (M.of_value (| Value.Integer 71903 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93760 |)); + A.to_value (M.of_value (| Value.Integer 93792 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93761 |)); + A.to_value (M.of_value (| Value.Integer 93793 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93762 |)); + A.to_value (M.of_value (| Value.Integer 93794 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93763 |)); + A.to_value (M.of_value (| Value.Integer 93795 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93764 |)); + A.to_value (M.of_value (| Value.Integer 93796 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93765 |)); + A.to_value (M.of_value (| Value.Integer 93797 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93766 |)); + A.to_value (M.of_value (| Value.Integer 93798 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93767 |)); + A.to_value (M.of_value (| Value.Integer 93799 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93768 |)); + A.to_value (M.of_value (| Value.Integer 93800 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93769 |)); + A.to_value (M.of_value (| Value.Integer 93801 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93770 |)); + A.to_value (M.of_value (| Value.Integer 93802 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93771 |)); + A.to_value (M.of_value (| Value.Integer 93803 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93772 |)); + A.to_value (M.of_value (| Value.Integer 93804 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93773 |)); + A.to_value (M.of_value (| Value.Integer 93805 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93774 |)); + A.to_value (M.of_value (| Value.Integer 93806 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93775 |)); + A.to_value (M.of_value (| Value.Integer 93807 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93776 |)); + A.to_value (M.of_value (| Value.Integer 93808 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93777 |)); + A.to_value (M.of_value (| Value.Integer 93809 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93778 |)); + A.to_value (M.of_value (| Value.Integer 93810 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93779 |)); + A.to_value (M.of_value (| Value.Integer 93811 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93780 |)); + A.to_value (M.of_value (| Value.Integer 93812 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93781 |)); + A.to_value (M.of_value (| Value.Integer 93813 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93782 |)); + A.to_value (M.of_value (| Value.Integer 93814 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93783 |)); + A.to_value (M.of_value (| Value.Integer 93815 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93784 |)); + A.to_value (M.of_value (| Value.Integer 93816 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93785 |)); + A.to_value (M.of_value (| Value.Integer 93817 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93786 |)); + A.to_value (M.of_value (| Value.Integer 93818 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93787 |)); + A.to_value (M.of_value (| Value.Integer 93819 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93788 |)); + A.to_value (M.of_value (| Value.Integer 93820 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93789 |)); + A.to_value (M.of_value (| Value.Integer 93821 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93790 |)); + A.to_value (M.of_value (| Value.Integer 93822 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93791 |)); + A.to_value (M.of_value (| Value.Integer 93823 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125184 |)); + A.to_value (M.of_value (| Value.Integer 125218 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125185 |)); + A.to_value (M.of_value (| Value.Integer 125219 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125186 |)); + A.to_value (M.of_value (| Value.Integer 125220 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125187 |)); + A.to_value (M.of_value (| Value.Integer 125221 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125188 |)); + A.to_value (M.of_value (| Value.Integer 125222 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125189 |)); + A.to_value (M.of_value (| Value.Integer 125223 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125190 |)); + A.to_value (M.of_value (| Value.Integer 125224 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125191 |)); + A.to_value (M.of_value (| Value.Integer 125225 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125192 |)); + A.to_value (M.of_value (| Value.Integer 125226 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125193 |)); + A.to_value (M.of_value (| Value.Integer 125227 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125194 |)); + A.to_value (M.of_value (| Value.Integer 125228 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125195 |)); + A.to_value (M.of_value (| Value.Integer 125229 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125196 |)); + A.to_value (M.of_value (| Value.Integer 125230 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125197 |)); + A.to_value (M.of_value (| Value.Integer 125231 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125198 |)); + A.to_value (M.of_value (| Value.Integer 125232 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125199 |)); + A.to_value (M.of_value (| Value.Integer 125233 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125200 |)); + A.to_value (M.of_value (| Value.Integer 125234 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125201 |)); + A.to_value (M.of_value (| Value.Integer 125235 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125202 |)); + A.to_value (M.of_value (| Value.Integer 125236 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125203 |)); + A.to_value (M.of_value (| Value.Integer 125237 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125204 |)); + A.to_value (M.of_value (| Value.Integer 125238 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125205 |)); + A.to_value (M.of_value (| Value.Integer 125239 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125206 |)); + A.to_value (M.of_value (| Value.Integer 125240 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125207 |)); + A.to_value (M.of_value (| Value.Integer 125241 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125208 |)); + A.to_value (M.of_value (| Value.Integer 125242 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125209 |)); + A.to_value (M.of_value (| Value.Integer 125243 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125210 |)); + A.to_value (M.of_value (| Value.Integer 125244 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125211 |)); + A.to_value (M.of_value (| Value.Integer 125245 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125212 |)); + A.to_value (M.of_value (| Value.Integer 125246 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125213 |)); + A.to_value (M.of_value (| Value.Integer 125247 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125214 |)); + A.to_value (M.of_value (| Value.Integer 125248 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125215 |)); + A.to_value (M.of_value (| Value.Integer 125249 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125216 |)); + A.to_value (M.of_value (| Value.Integer 125250 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125217 |)); + A.to_value (M.of_value (| Value.Integer 125251 |)) + ] + |)) + ] + |) + |) + |) + |) + |))). + + Definition value_LOWERCASE_TABLE_MULTI : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 105 |)); + A.to_value (M.of_value (| Value.UnicodeChar 775 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)) + ] + |) + |) + |) + |) + |))). + + Definition value_UPPERCASE_TABLE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 181 |)); + A.to_value (M.of_value (| Value.Integer 924 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 223 |)); + A.to_value (M.of_value (| Value.Integer 4194304 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 224 |)); + A.to_value (M.of_value (| Value.Integer 192 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 225 |)); + A.to_value (M.of_value (| Value.Integer 193 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 226 |)); + A.to_value (M.of_value (| Value.Integer 194 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 227 |)); + A.to_value (M.of_value (| Value.Integer 195 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 228 |)); + A.to_value (M.of_value (| Value.Integer 196 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 229 |)); + A.to_value (M.of_value (| Value.Integer 197 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 230 |)); + A.to_value (M.of_value (| Value.Integer 198 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 231 |)); + A.to_value (M.of_value (| Value.Integer 199 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 232 |)); + A.to_value (M.of_value (| Value.Integer 200 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 233 |)); + A.to_value (M.of_value (| Value.Integer 201 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 234 |)); + A.to_value (M.of_value (| Value.Integer 202 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 235 |)); + A.to_value (M.of_value (| Value.Integer 203 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 236 |)); + A.to_value (M.of_value (| Value.Integer 204 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 237 |)); + A.to_value (M.of_value (| Value.Integer 205 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 238 |)); + A.to_value (M.of_value (| Value.Integer 206 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 239 |)); + A.to_value (M.of_value (| Value.Integer 207 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 240 |)); + A.to_value (M.of_value (| Value.Integer 208 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 241 |)); + A.to_value (M.of_value (| Value.Integer 209 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 242 |)); + A.to_value (M.of_value (| Value.Integer 210 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 243 |)); + A.to_value (M.of_value (| Value.Integer 211 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 244 |)); + A.to_value (M.of_value (| Value.Integer 212 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 245 |)); + A.to_value (M.of_value (| Value.Integer 213 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 246 |)); + A.to_value (M.of_value (| Value.Integer 214 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 248 |)); + A.to_value (M.of_value (| Value.Integer 216 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 249 |)); + A.to_value (M.of_value (| Value.Integer 217 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 250 |)); + A.to_value (M.of_value (| Value.Integer 218 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 251 |)); + A.to_value (M.of_value (| Value.Integer 219 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 252 |)); + A.to_value (M.of_value (| Value.Integer 220 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 253 |)); + A.to_value (M.of_value (| Value.Integer 221 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 254 |)); + A.to_value (M.of_value (| Value.Integer 222 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 255 |)); + A.to_value (M.of_value (| Value.Integer 376 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 257 |)); + A.to_value (M.of_value (| Value.Integer 256 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 259 |)); + A.to_value (M.of_value (| Value.Integer 258 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 261 |)); + A.to_value (M.of_value (| Value.Integer 260 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 263 |)); + A.to_value (M.of_value (| Value.Integer 262 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 265 |)); + A.to_value (M.of_value (| Value.Integer 264 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 267 |)); + A.to_value (M.of_value (| Value.Integer 266 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 269 |)); + A.to_value (M.of_value (| Value.Integer 268 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 271 |)); + A.to_value (M.of_value (| Value.Integer 270 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 273 |)); + A.to_value (M.of_value (| Value.Integer 272 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 275 |)); + A.to_value (M.of_value (| Value.Integer 274 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 277 |)); + A.to_value (M.of_value (| Value.Integer 276 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 279 |)); + A.to_value (M.of_value (| Value.Integer 278 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 281 |)); + A.to_value (M.of_value (| Value.Integer 280 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 283 |)); + A.to_value (M.of_value (| Value.Integer 282 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 285 |)); + A.to_value (M.of_value (| Value.Integer 284 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 287 |)); + A.to_value (M.of_value (| Value.Integer 286 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 289 |)); + A.to_value (M.of_value (| Value.Integer 288 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 291 |)); + A.to_value (M.of_value (| Value.Integer 290 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 293 |)); + A.to_value (M.of_value (| Value.Integer 292 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 295 |)); + A.to_value (M.of_value (| Value.Integer 294 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 297 |)); + A.to_value (M.of_value (| Value.Integer 296 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 299 |)); + A.to_value (M.of_value (| Value.Integer 298 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 301 |)); + A.to_value (M.of_value (| Value.Integer 300 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 303 |)); + A.to_value (M.of_value (| Value.Integer 302 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 305 |)); + A.to_value (M.of_value (| Value.Integer 73 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 307 |)); + A.to_value (M.of_value (| Value.Integer 306 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 309 |)); + A.to_value (M.of_value (| Value.Integer 308 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 311 |)); + A.to_value (M.of_value (| Value.Integer 310 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 314 |)); + A.to_value (M.of_value (| Value.Integer 313 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 316 |)); + A.to_value (M.of_value (| Value.Integer 315 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 318 |)); + A.to_value (M.of_value (| Value.Integer 317 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 320 |)); + A.to_value (M.of_value (| Value.Integer 319 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 322 |)); + A.to_value (M.of_value (| Value.Integer 321 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 324 |)); + A.to_value (M.of_value (| Value.Integer 323 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 326 |)); + A.to_value (M.of_value (| Value.Integer 325 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 328 |)); + A.to_value (M.of_value (| Value.Integer 327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 329 |)); + A.to_value (M.of_value (| Value.Integer 4194305 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 331 |)); + A.to_value (M.of_value (| Value.Integer 330 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 333 |)); + A.to_value (M.of_value (| Value.Integer 332 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 335 |)); + A.to_value (M.of_value (| Value.Integer 334 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 337 |)); + A.to_value (M.of_value (| Value.Integer 336 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 339 |)); + A.to_value (M.of_value (| Value.Integer 338 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 341 |)); + A.to_value (M.of_value (| Value.Integer 340 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 343 |)); + A.to_value (M.of_value (| Value.Integer 342 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 345 |)); + A.to_value (M.of_value (| Value.Integer 344 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 347 |)); + A.to_value (M.of_value (| Value.Integer 346 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 349 |)); + A.to_value (M.of_value (| Value.Integer 348 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 351 |)); + A.to_value (M.of_value (| Value.Integer 350 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 353 |)); + A.to_value (M.of_value (| Value.Integer 352 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 355 |)); + A.to_value (M.of_value (| Value.Integer 354 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 357 |)); + A.to_value (M.of_value (| Value.Integer 356 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 359 |)); + A.to_value (M.of_value (| Value.Integer 358 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 361 |)); + A.to_value (M.of_value (| Value.Integer 360 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 363 |)); + A.to_value (M.of_value (| Value.Integer 362 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 365 |)); + A.to_value (M.of_value (| Value.Integer 364 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 367 |)); + A.to_value (M.of_value (| Value.Integer 366 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 369 |)); + A.to_value (M.of_value (| Value.Integer 368 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 371 |)); + A.to_value (M.of_value (| Value.Integer 370 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 373 |)); + A.to_value (M.of_value (| Value.Integer 372 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 375 |)); + A.to_value (M.of_value (| Value.Integer 374 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 378 |)); + A.to_value (M.of_value (| Value.Integer 377 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 380 |)); + A.to_value (M.of_value (| Value.Integer 379 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 382 |)); + A.to_value (M.of_value (| Value.Integer 381 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 383 |)); + A.to_value (M.of_value (| Value.Integer 83 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 384 |)); + A.to_value (M.of_value (| Value.Integer 579 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 387 |)); + A.to_value (M.of_value (| Value.Integer 386 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 389 |)); + A.to_value (M.of_value (| Value.Integer 388 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 392 |)); + A.to_value (M.of_value (| Value.Integer 391 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 396 |)); + A.to_value (M.of_value (| Value.Integer 395 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 402 |)); + A.to_value (M.of_value (| Value.Integer 401 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 405 |)); + A.to_value (M.of_value (| Value.Integer 502 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 409 |)); + A.to_value (M.of_value (| Value.Integer 408 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 410 |)); + A.to_value (M.of_value (| Value.Integer 573 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 414 |)); + A.to_value (M.of_value (| Value.Integer 544 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 417 |)); + A.to_value (M.of_value (| Value.Integer 416 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 419 |)); + A.to_value (M.of_value (| Value.Integer 418 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 421 |)); + A.to_value (M.of_value (| Value.Integer 420 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 424 |)); + A.to_value (M.of_value (| Value.Integer 423 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 429 |)); + A.to_value (M.of_value (| Value.Integer 428 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 432 |)); + A.to_value (M.of_value (| Value.Integer 431 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 436 |)); + A.to_value (M.of_value (| Value.Integer 435 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 438 |)); + A.to_value (M.of_value (| Value.Integer 437 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 441 |)); + A.to_value (M.of_value (| Value.Integer 440 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 445 |)); + A.to_value (M.of_value (| Value.Integer 444 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 447 |)); + A.to_value (M.of_value (| Value.Integer 503 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 453 |)); + A.to_value (M.of_value (| Value.Integer 452 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 454 |)); + A.to_value (M.of_value (| Value.Integer 452 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 456 |)); + A.to_value (M.of_value (| Value.Integer 455 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 457 |)); + A.to_value (M.of_value (| Value.Integer 455 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 459 |)); + A.to_value (M.of_value (| Value.Integer 458 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 460 |)); + A.to_value (M.of_value (| Value.Integer 458 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 462 |)); + A.to_value (M.of_value (| Value.Integer 461 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 464 |)); + A.to_value (M.of_value (| Value.Integer 463 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 466 |)); + A.to_value (M.of_value (| Value.Integer 465 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 468 |)); + A.to_value (M.of_value (| Value.Integer 467 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 470 |)); + A.to_value (M.of_value (| Value.Integer 469 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 472 |)); + A.to_value (M.of_value (| Value.Integer 471 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 474 |)); + A.to_value (M.of_value (| Value.Integer 473 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 476 |)); + A.to_value (M.of_value (| Value.Integer 475 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 477 |)); + A.to_value (M.of_value (| Value.Integer 398 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 479 |)); + A.to_value (M.of_value (| Value.Integer 478 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 481 |)); + A.to_value (M.of_value (| Value.Integer 480 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 483 |)); + A.to_value (M.of_value (| Value.Integer 482 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 485 |)); + A.to_value (M.of_value (| Value.Integer 484 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 487 |)); + A.to_value (M.of_value (| Value.Integer 486 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 489 |)); + A.to_value (M.of_value (| Value.Integer 488 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 491 |)); + A.to_value (M.of_value (| Value.Integer 490 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 493 |)); + A.to_value (M.of_value (| Value.Integer 492 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 495 |)); + A.to_value (M.of_value (| Value.Integer 494 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 496 |)); + A.to_value (M.of_value (| Value.Integer 4194306 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 498 |)); + A.to_value (M.of_value (| Value.Integer 497 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 499 |)); + A.to_value (M.of_value (| Value.Integer 497 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 501 |)); + A.to_value (M.of_value (| Value.Integer 500 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 505 |)); + A.to_value (M.of_value (| Value.Integer 504 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 507 |)); + A.to_value (M.of_value (| Value.Integer 506 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 509 |)); + A.to_value (M.of_value (| Value.Integer 508 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 511 |)); + A.to_value (M.of_value (| Value.Integer 510 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 513 |)); + A.to_value (M.of_value (| Value.Integer 512 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 515 |)); + A.to_value (M.of_value (| Value.Integer 514 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 517 |)); + A.to_value (M.of_value (| Value.Integer 516 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 519 |)); + A.to_value (M.of_value (| Value.Integer 518 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 521 |)); + A.to_value (M.of_value (| Value.Integer 520 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 523 |)); + A.to_value (M.of_value (| Value.Integer 522 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 525 |)); + A.to_value (M.of_value (| Value.Integer 524 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 527 |)); + A.to_value (M.of_value (| Value.Integer 526 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 529 |)); + A.to_value (M.of_value (| Value.Integer 528 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 531 |)); + A.to_value (M.of_value (| Value.Integer 530 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 533 |)); + A.to_value (M.of_value (| Value.Integer 532 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 535 |)); + A.to_value (M.of_value (| Value.Integer 534 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 537 |)); + A.to_value (M.of_value (| Value.Integer 536 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 539 |)); + A.to_value (M.of_value (| Value.Integer 538 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 541 |)); + A.to_value (M.of_value (| Value.Integer 540 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 543 |)); + A.to_value (M.of_value (| Value.Integer 542 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 547 |)); + A.to_value (M.of_value (| Value.Integer 546 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 549 |)); + A.to_value (M.of_value (| Value.Integer 548 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 551 |)); + A.to_value (M.of_value (| Value.Integer 550 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 553 |)); + A.to_value (M.of_value (| Value.Integer 552 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 555 |)); + A.to_value (M.of_value (| Value.Integer 554 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 557 |)); + A.to_value (M.of_value (| Value.Integer 556 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 559 |)); + A.to_value (M.of_value (| Value.Integer 558 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 561 |)); + A.to_value (M.of_value (| Value.Integer 560 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 563 |)); + A.to_value (M.of_value (| Value.Integer 562 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 572 |)); + A.to_value (M.of_value (| Value.Integer 571 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 575 |)); + A.to_value (M.of_value (| Value.Integer 11390 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 576 |)); + A.to_value (M.of_value (| Value.Integer 11391 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 578 |)); + A.to_value (M.of_value (| Value.Integer 577 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 583 |)); + A.to_value (M.of_value (| Value.Integer 582 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 585 |)); + A.to_value (M.of_value (| Value.Integer 584 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 587 |)); + A.to_value (M.of_value (| Value.Integer 586 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 589 |)); + A.to_value (M.of_value (| Value.Integer 588 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 591 |)); + A.to_value (M.of_value (| Value.Integer 590 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 592 |)); + A.to_value (M.of_value (| Value.Integer 11375 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 593 |)); + A.to_value (M.of_value (| Value.Integer 11373 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 594 |)); + A.to_value (M.of_value (| Value.Integer 11376 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 595 |)); + A.to_value (M.of_value (| Value.Integer 385 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 596 |)); + A.to_value (M.of_value (| Value.Integer 390 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 598 |)); + A.to_value (M.of_value (| Value.Integer 393 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 599 |)); + A.to_value (M.of_value (| Value.Integer 394 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 601 |)); + A.to_value (M.of_value (| Value.Integer 399 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 603 |)); + A.to_value (M.of_value (| Value.Integer 400 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 604 |)); + A.to_value (M.of_value (| Value.Integer 42923 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 608 |)); + A.to_value (M.of_value (| Value.Integer 403 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 609 |)); + A.to_value (M.of_value (| Value.Integer 42924 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 611 |)); + A.to_value (M.of_value (| Value.Integer 404 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 613 |)); + A.to_value (M.of_value (| Value.Integer 42893 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 614 |)); + A.to_value (M.of_value (| Value.Integer 42922 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 616 |)); + A.to_value (M.of_value (| Value.Integer 407 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 617 |)); + A.to_value (M.of_value (| Value.Integer 406 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 618 |)); + A.to_value (M.of_value (| Value.Integer 42926 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 619 |)); + A.to_value (M.of_value (| Value.Integer 11362 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 620 |)); + A.to_value (M.of_value (| Value.Integer 42925 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 623 |)); + A.to_value (M.of_value (| Value.Integer 412 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 625 |)); + A.to_value (M.of_value (| Value.Integer 11374 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 626 |)); + A.to_value (M.of_value (| Value.Integer 413 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 629 |)); + A.to_value (M.of_value (| Value.Integer 415 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 637 |)); + A.to_value (M.of_value (| Value.Integer 11364 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 640 |)); + A.to_value (M.of_value (| Value.Integer 422 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 642 |)); + A.to_value (M.of_value (| Value.Integer 42949 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 643 |)); + A.to_value (M.of_value (| Value.Integer 425 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 647 |)); + A.to_value (M.of_value (| Value.Integer 42929 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 648 |)); + A.to_value (M.of_value (| Value.Integer 430 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 649 |)); + A.to_value (M.of_value (| Value.Integer 580 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 650 |)); + A.to_value (M.of_value (| Value.Integer 433 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 651 |)); + A.to_value (M.of_value (| Value.Integer 434 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 652 |)); + A.to_value (M.of_value (| Value.Integer 581 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 658 |)); + A.to_value (M.of_value (| Value.Integer 439 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 669 |)); + A.to_value (M.of_value (| Value.Integer 42930 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 670 |)); + A.to_value (M.of_value (| Value.Integer 42928 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 837 |)); + A.to_value (M.of_value (| Value.Integer 921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 881 |)); + A.to_value (M.of_value (| Value.Integer 880 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 883 |)); + A.to_value (M.of_value (| Value.Integer 882 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 887 |)); + A.to_value (M.of_value (| Value.Integer 886 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 891 |)); + A.to_value (M.of_value (| Value.Integer 1021 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 892 |)); + A.to_value (M.of_value (| Value.Integer 1022 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 893 |)); + A.to_value (M.of_value (| Value.Integer 1023 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 912 |)); + A.to_value (M.of_value (| Value.Integer 4194307 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 940 |)); + A.to_value (M.of_value (| Value.Integer 902 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 941 |)); + A.to_value (M.of_value (| Value.Integer 904 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 942 |)); + A.to_value (M.of_value (| Value.Integer 905 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 943 |)); + A.to_value (M.of_value (| Value.Integer 906 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 944 |)); + A.to_value (M.of_value (| Value.Integer 4194308 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 945 |)); + A.to_value (M.of_value (| Value.Integer 913 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 946 |)); + A.to_value (M.of_value (| Value.Integer 914 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 947 |)); + A.to_value (M.of_value (| Value.Integer 915 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 948 |)); + A.to_value (M.of_value (| Value.Integer 916 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 949 |)); + A.to_value (M.of_value (| Value.Integer 917 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 950 |)); + A.to_value (M.of_value (| Value.Integer 918 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 951 |)); + A.to_value (M.of_value (| Value.Integer 919 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 952 |)); + A.to_value (M.of_value (| Value.Integer 920 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 953 |)); + A.to_value (M.of_value (| Value.Integer 921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 954 |)); + A.to_value (M.of_value (| Value.Integer 922 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 955 |)); + A.to_value (M.of_value (| Value.Integer 923 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 956 |)); + A.to_value (M.of_value (| Value.Integer 924 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 957 |)); + A.to_value (M.of_value (| Value.Integer 925 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 958 |)); + A.to_value (M.of_value (| Value.Integer 926 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 959 |)); + A.to_value (M.of_value (| Value.Integer 927 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 960 |)); + A.to_value (M.of_value (| Value.Integer 928 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 961 |)); + A.to_value (M.of_value (| Value.Integer 929 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 962 |)); + A.to_value (M.of_value (| Value.Integer 931 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 963 |)); + A.to_value (M.of_value (| Value.Integer 931 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 964 |)); + A.to_value (M.of_value (| Value.Integer 932 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 965 |)); + A.to_value (M.of_value (| Value.Integer 933 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 966 |)); + A.to_value (M.of_value (| Value.Integer 934 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 967 |)); + A.to_value (M.of_value (| Value.Integer 935 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 968 |)); + A.to_value (M.of_value (| Value.Integer 936 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 969 |)); + A.to_value (M.of_value (| Value.Integer 937 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 970 |)); + A.to_value (M.of_value (| Value.Integer 938 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 971 |)); + A.to_value (M.of_value (| Value.Integer 939 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 972 |)); + A.to_value (M.of_value (| Value.Integer 908 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 973 |)); + A.to_value (M.of_value (| Value.Integer 910 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 974 |)); + A.to_value (M.of_value (| Value.Integer 911 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 976 |)); + A.to_value (M.of_value (| Value.Integer 914 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 977 |)); + A.to_value (M.of_value (| Value.Integer 920 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 981 |)); + A.to_value (M.of_value (| Value.Integer 934 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 982 |)); + A.to_value (M.of_value (| Value.Integer 928 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 983 |)); + A.to_value (M.of_value (| Value.Integer 975 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 985 |)); + A.to_value (M.of_value (| Value.Integer 984 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 987 |)); + A.to_value (M.of_value (| Value.Integer 986 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 989 |)); + A.to_value (M.of_value (| Value.Integer 988 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 991 |)); + A.to_value (M.of_value (| Value.Integer 990 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 993 |)); + A.to_value (M.of_value (| Value.Integer 992 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 995 |)); + A.to_value (M.of_value (| Value.Integer 994 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 997 |)); + A.to_value (M.of_value (| Value.Integer 996 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 999 |)); + A.to_value (M.of_value (| Value.Integer 998 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1001 |)); + A.to_value (M.of_value (| Value.Integer 1000 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1003 |)); + A.to_value (M.of_value (| Value.Integer 1002 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1005 |)); + A.to_value (M.of_value (| Value.Integer 1004 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1007 |)); + A.to_value (M.of_value (| Value.Integer 1006 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1008 |)); + A.to_value (M.of_value (| Value.Integer 922 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1009 |)); + A.to_value (M.of_value (| Value.Integer 929 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1010 |)); + A.to_value (M.of_value (| Value.Integer 1017 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1011 |)); + A.to_value (M.of_value (| Value.Integer 895 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1013 |)); + A.to_value (M.of_value (| Value.Integer 917 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1016 |)); + A.to_value (M.of_value (| Value.Integer 1015 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1019 |)); + A.to_value (M.of_value (| Value.Integer 1018 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1072 |)); + A.to_value (M.of_value (| Value.Integer 1040 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1073 |)); + A.to_value (M.of_value (| Value.Integer 1041 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1074 |)); + A.to_value (M.of_value (| Value.Integer 1042 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1075 |)); + A.to_value (M.of_value (| Value.Integer 1043 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1076 |)); + A.to_value (M.of_value (| Value.Integer 1044 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1077 |)); + A.to_value (M.of_value (| Value.Integer 1045 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1078 |)); + A.to_value (M.of_value (| Value.Integer 1046 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1079 |)); + A.to_value (M.of_value (| Value.Integer 1047 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1080 |)); + A.to_value (M.of_value (| Value.Integer 1048 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1081 |)); + A.to_value (M.of_value (| Value.Integer 1049 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1082 |)); + A.to_value (M.of_value (| Value.Integer 1050 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1083 |)); + A.to_value (M.of_value (| Value.Integer 1051 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1084 |)); + A.to_value (M.of_value (| Value.Integer 1052 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1085 |)); + A.to_value (M.of_value (| Value.Integer 1053 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1086 |)); + A.to_value (M.of_value (| Value.Integer 1054 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1087 |)); + A.to_value (M.of_value (| Value.Integer 1055 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1088 |)); + A.to_value (M.of_value (| Value.Integer 1056 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1089 |)); + A.to_value (M.of_value (| Value.Integer 1057 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1090 |)); + A.to_value (M.of_value (| Value.Integer 1058 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1091 |)); + A.to_value (M.of_value (| Value.Integer 1059 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1092 |)); + A.to_value (M.of_value (| Value.Integer 1060 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1093 |)); + A.to_value (M.of_value (| Value.Integer 1061 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1094 |)); + A.to_value (M.of_value (| Value.Integer 1062 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1095 |)); + A.to_value (M.of_value (| Value.Integer 1063 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1096 |)); + A.to_value (M.of_value (| Value.Integer 1064 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1097 |)); + A.to_value (M.of_value (| Value.Integer 1065 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1098 |)); + A.to_value (M.of_value (| Value.Integer 1066 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1099 |)); + A.to_value (M.of_value (| Value.Integer 1067 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1100 |)); + A.to_value (M.of_value (| Value.Integer 1068 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1101 |)); + A.to_value (M.of_value (| Value.Integer 1069 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1102 |)); + A.to_value (M.of_value (| Value.Integer 1070 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1103 |)); + A.to_value (M.of_value (| Value.Integer 1071 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1104 |)); + A.to_value (M.of_value (| Value.Integer 1024 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1105 |)); + A.to_value (M.of_value (| Value.Integer 1025 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1106 |)); + A.to_value (M.of_value (| Value.Integer 1026 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1107 |)); + A.to_value (M.of_value (| Value.Integer 1027 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1108 |)); + A.to_value (M.of_value (| Value.Integer 1028 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1109 |)); + A.to_value (M.of_value (| Value.Integer 1029 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1110 |)); + A.to_value (M.of_value (| Value.Integer 1030 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1111 |)); + A.to_value (M.of_value (| Value.Integer 1031 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1112 |)); + A.to_value (M.of_value (| Value.Integer 1032 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1113 |)); + A.to_value (M.of_value (| Value.Integer 1033 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1114 |)); + A.to_value (M.of_value (| Value.Integer 1034 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1115 |)); + A.to_value (M.of_value (| Value.Integer 1035 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1116 |)); + A.to_value (M.of_value (| Value.Integer 1036 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1117 |)); + A.to_value (M.of_value (| Value.Integer 1037 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1118 |)); + A.to_value (M.of_value (| Value.Integer 1038 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1119 |)); + A.to_value (M.of_value (| Value.Integer 1039 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1121 |)); + A.to_value (M.of_value (| Value.Integer 1120 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1123 |)); + A.to_value (M.of_value (| Value.Integer 1122 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1125 |)); + A.to_value (M.of_value (| Value.Integer 1124 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1127 |)); + A.to_value (M.of_value (| Value.Integer 1126 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1129 |)); + A.to_value (M.of_value (| Value.Integer 1128 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1131 |)); + A.to_value (M.of_value (| Value.Integer 1130 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1133 |)); + A.to_value (M.of_value (| Value.Integer 1132 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1135 |)); + A.to_value (M.of_value (| Value.Integer 1134 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1137 |)); + A.to_value (M.of_value (| Value.Integer 1136 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1139 |)); + A.to_value (M.of_value (| Value.Integer 1138 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1141 |)); + A.to_value (M.of_value (| Value.Integer 1140 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1143 |)); + A.to_value (M.of_value (| Value.Integer 1142 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1145 |)); + A.to_value (M.of_value (| Value.Integer 1144 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1147 |)); + A.to_value (M.of_value (| Value.Integer 1146 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1149 |)); + A.to_value (M.of_value (| Value.Integer 1148 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1151 |)); + A.to_value (M.of_value (| Value.Integer 1150 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1153 |)); + A.to_value (M.of_value (| Value.Integer 1152 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1163 |)); + A.to_value (M.of_value (| Value.Integer 1162 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1165 |)); + A.to_value (M.of_value (| Value.Integer 1164 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1167 |)); + A.to_value (M.of_value (| Value.Integer 1166 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1169 |)); + A.to_value (M.of_value (| Value.Integer 1168 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1171 |)); + A.to_value (M.of_value (| Value.Integer 1170 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1173 |)); + A.to_value (M.of_value (| Value.Integer 1172 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1175 |)); + A.to_value (M.of_value (| Value.Integer 1174 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1177 |)); + A.to_value (M.of_value (| Value.Integer 1176 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1179 |)); + A.to_value (M.of_value (| Value.Integer 1178 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1181 |)); + A.to_value (M.of_value (| Value.Integer 1180 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1183 |)); + A.to_value (M.of_value (| Value.Integer 1182 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1185 |)); + A.to_value (M.of_value (| Value.Integer 1184 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1187 |)); + A.to_value (M.of_value (| Value.Integer 1186 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1189 |)); + A.to_value (M.of_value (| Value.Integer 1188 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1191 |)); + A.to_value (M.of_value (| Value.Integer 1190 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1193 |)); + A.to_value (M.of_value (| Value.Integer 1192 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1195 |)); + A.to_value (M.of_value (| Value.Integer 1194 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1197 |)); + A.to_value (M.of_value (| Value.Integer 1196 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1199 |)); + A.to_value (M.of_value (| Value.Integer 1198 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1201 |)); + A.to_value (M.of_value (| Value.Integer 1200 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1203 |)); + A.to_value (M.of_value (| Value.Integer 1202 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1205 |)); + A.to_value (M.of_value (| Value.Integer 1204 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1207 |)); + A.to_value (M.of_value (| Value.Integer 1206 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1209 |)); + A.to_value (M.of_value (| Value.Integer 1208 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1211 |)); + A.to_value (M.of_value (| Value.Integer 1210 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1213 |)); + A.to_value (M.of_value (| Value.Integer 1212 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1215 |)); + A.to_value (M.of_value (| Value.Integer 1214 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1218 |)); + A.to_value (M.of_value (| Value.Integer 1217 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1220 |)); + A.to_value (M.of_value (| Value.Integer 1219 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1222 |)); + A.to_value (M.of_value (| Value.Integer 1221 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1224 |)); + A.to_value (M.of_value (| Value.Integer 1223 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1226 |)); + A.to_value (M.of_value (| Value.Integer 1225 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1228 |)); + A.to_value (M.of_value (| Value.Integer 1227 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1230 |)); + A.to_value (M.of_value (| Value.Integer 1229 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1231 |)); + A.to_value (M.of_value (| Value.Integer 1216 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1233 |)); + A.to_value (M.of_value (| Value.Integer 1232 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1235 |)); + A.to_value (M.of_value (| Value.Integer 1234 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1237 |)); + A.to_value (M.of_value (| Value.Integer 1236 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1239 |)); + A.to_value (M.of_value (| Value.Integer 1238 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1241 |)); + A.to_value (M.of_value (| Value.Integer 1240 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1243 |)); + A.to_value (M.of_value (| Value.Integer 1242 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1245 |)); + A.to_value (M.of_value (| Value.Integer 1244 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1247 |)); + A.to_value (M.of_value (| Value.Integer 1246 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1249 |)); + A.to_value (M.of_value (| Value.Integer 1248 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1251 |)); + A.to_value (M.of_value (| Value.Integer 1250 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1253 |)); + A.to_value (M.of_value (| Value.Integer 1252 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1255 |)); + A.to_value (M.of_value (| Value.Integer 1254 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1257 |)); + A.to_value (M.of_value (| Value.Integer 1256 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1259 |)); + A.to_value (M.of_value (| Value.Integer 1258 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1261 |)); + A.to_value (M.of_value (| Value.Integer 1260 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1263 |)); + A.to_value (M.of_value (| Value.Integer 1262 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1265 |)); + A.to_value (M.of_value (| Value.Integer 1264 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1267 |)); + A.to_value (M.of_value (| Value.Integer 1266 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1269 |)); + A.to_value (M.of_value (| Value.Integer 1268 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1271 |)); + A.to_value (M.of_value (| Value.Integer 1270 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1273 |)); + A.to_value (M.of_value (| Value.Integer 1272 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1275 |)); + A.to_value (M.of_value (| Value.Integer 1274 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1277 |)); + A.to_value (M.of_value (| Value.Integer 1276 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1279 |)); + A.to_value (M.of_value (| Value.Integer 1278 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1281 |)); + A.to_value (M.of_value (| Value.Integer 1280 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1283 |)); + A.to_value (M.of_value (| Value.Integer 1282 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1285 |)); + A.to_value (M.of_value (| Value.Integer 1284 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1287 |)); + A.to_value (M.of_value (| Value.Integer 1286 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1289 |)); + A.to_value (M.of_value (| Value.Integer 1288 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1291 |)); + A.to_value (M.of_value (| Value.Integer 1290 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1293 |)); + A.to_value (M.of_value (| Value.Integer 1292 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1295 |)); + A.to_value (M.of_value (| Value.Integer 1294 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1297 |)); + A.to_value (M.of_value (| Value.Integer 1296 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1299 |)); + A.to_value (M.of_value (| Value.Integer 1298 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1301 |)); + A.to_value (M.of_value (| Value.Integer 1300 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1303 |)); + A.to_value (M.of_value (| Value.Integer 1302 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1305 |)); + A.to_value (M.of_value (| Value.Integer 1304 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1307 |)); + A.to_value (M.of_value (| Value.Integer 1306 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1309 |)); + A.to_value (M.of_value (| Value.Integer 1308 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1311 |)); + A.to_value (M.of_value (| Value.Integer 1310 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1313 |)); + A.to_value (M.of_value (| Value.Integer 1312 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1315 |)); + A.to_value (M.of_value (| Value.Integer 1314 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1317 |)); + A.to_value (M.of_value (| Value.Integer 1316 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1319 |)); + A.to_value (M.of_value (| Value.Integer 1318 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1321 |)); + A.to_value (M.of_value (| Value.Integer 1320 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1323 |)); + A.to_value (M.of_value (| Value.Integer 1322 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1325 |)); + A.to_value (M.of_value (| Value.Integer 1324 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1327 |)); + A.to_value (M.of_value (| Value.Integer 1326 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1377 |)); + A.to_value (M.of_value (| Value.Integer 1329 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1378 |)); + A.to_value (M.of_value (| Value.Integer 1330 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1379 |)); + A.to_value (M.of_value (| Value.Integer 1331 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1380 |)); + A.to_value (M.of_value (| Value.Integer 1332 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1381 |)); + A.to_value (M.of_value (| Value.Integer 1333 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1382 |)); + A.to_value (M.of_value (| Value.Integer 1334 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1383 |)); + A.to_value (M.of_value (| Value.Integer 1335 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1384 |)); + A.to_value (M.of_value (| Value.Integer 1336 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1385 |)); + A.to_value (M.of_value (| Value.Integer 1337 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1386 |)); + A.to_value (M.of_value (| Value.Integer 1338 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1387 |)); + A.to_value (M.of_value (| Value.Integer 1339 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1388 |)); + A.to_value (M.of_value (| Value.Integer 1340 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1389 |)); + A.to_value (M.of_value (| Value.Integer 1341 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1390 |)); + A.to_value (M.of_value (| Value.Integer 1342 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1391 |)); + A.to_value (M.of_value (| Value.Integer 1343 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1392 |)); + A.to_value (M.of_value (| Value.Integer 1344 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1393 |)); + A.to_value (M.of_value (| Value.Integer 1345 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1394 |)); + A.to_value (M.of_value (| Value.Integer 1346 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1395 |)); + A.to_value (M.of_value (| Value.Integer 1347 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1396 |)); + A.to_value (M.of_value (| Value.Integer 1348 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1397 |)); + A.to_value (M.of_value (| Value.Integer 1349 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1398 |)); + A.to_value (M.of_value (| Value.Integer 1350 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1399 |)); + A.to_value (M.of_value (| Value.Integer 1351 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1400 |)); + A.to_value (M.of_value (| Value.Integer 1352 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1401 |)); + A.to_value (M.of_value (| Value.Integer 1353 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1402 |)); + A.to_value (M.of_value (| Value.Integer 1354 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1403 |)); + A.to_value (M.of_value (| Value.Integer 1355 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1404 |)); + A.to_value (M.of_value (| Value.Integer 1356 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1405 |)); + A.to_value (M.of_value (| Value.Integer 1357 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1406 |)); + A.to_value (M.of_value (| Value.Integer 1358 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1407 |)); + A.to_value (M.of_value (| Value.Integer 1359 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1408 |)); + A.to_value (M.of_value (| Value.Integer 1360 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1409 |)); + A.to_value (M.of_value (| Value.Integer 1361 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1410 |)); + A.to_value (M.of_value (| Value.Integer 1362 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1411 |)); + A.to_value (M.of_value (| Value.Integer 1363 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1412 |)); + A.to_value (M.of_value (| Value.Integer 1364 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1413 |)); + A.to_value (M.of_value (| Value.Integer 1365 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1414 |)); + A.to_value (M.of_value (| Value.Integer 1366 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 1415 |)); + A.to_value (M.of_value (| Value.Integer 4194309 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4304 |)); + A.to_value (M.of_value (| Value.Integer 7312 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4305 |)); + A.to_value (M.of_value (| Value.Integer 7313 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4306 |)); + A.to_value (M.of_value (| Value.Integer 7314 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4307 |)); + A.to_value (M.of_value (| Value.Integer 7315 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4308 |)); + A.to_value (M.of_value (| Value.Integer 7316 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4309 |)); + A.to_value (M.of_value (| Value.Integer 7317 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4310 |)); + A.to_value (M.of_value (| Value.Integer 7318 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4311 |)); + A.to_value (M.of_value (| Value.Integer 7319 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4312 |)); + A.to_value (M.of_value (| Value.Integer 7320 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4313 |)); + A.to_value (M.of_value (| Value.Integer 7321 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4314 |)); + A.to_value (M.of_value (| Value.Integer 7322 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4315 |)); + A.to_value (M.of_value (| Value.Integer 7323 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4316 |)); + A.to_value (M.of_value (| Value.Integer 7324 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4317 |)); + A.to_value (M.of_value (| Value.Integer 7325 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4318 |)); + A.to_value (M.of_value (| Value.Integer 7326 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4319 |)); + A.to_value (M.of_value (| Value.Integer 7327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4320 |)); + A.to_value (M.of_value (| Value.Integer 7328 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4321 |)); + A.to_value (M.of_value (| Value.Integer 7329 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4322 |)); + A.to_value (M.of_value (| Value.Integer 7330 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4323 |)); + A.to_value (M.of_value (| Value.Integer 7331 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4324 |)); + A.to_value (M.of_value (| Value.Integer 7332 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4325 |)); + A.to_value (M.of_value (| Value.Integer 7333 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4326 |)); + A.to_value (M.of_value (| Value.Integer 7334 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4327 |)); + A.to_value (M.of_value (| Value.Integer 7335 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4328 |)); + A.to_value (M.of_value (| Value.Integer 7336 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4329 |)); + A.to_value (M.of_value (| Value.Integer 7337 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4330 |)); + A.to_value (M.of_value (| Value.Integer 7338 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4331 |)); + A.to_value (M.of_value (| Value.Integer 7339 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4332 |)); + A.to_value (M.of_value (| Value.Integer 7340 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4333 |)); + A.to_value (M.of_value (| Value.Integer 7341 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4334 |)); + A.to_value (M.of_value (| Value.Integer 7342 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4335 |)); + A.to_value (M.of_value (| Value.Integer 7343 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4336 |)); + A.to_value (M.of_value (| Value.Integer 7344 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4337 |)); + A.to_value (M.of_value (| Value.Integer 7345 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4338 |)); + A.to_value (M.of_value (| Value.Integer 7346 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4339 |)); + A.to_value (M.of_value (| Value.Integer 7347 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4340 |)); + A.to_value (M.of_value (| Value.Integer 7348 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4341 |)); + A.to_value (M.of_value (| Value.Integer 7349 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4342 |)); + A.to_value (M.of_value (| Value.Integer 7350 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4343 |)); + A.to_value (M.of_value (| Value.Integer 7351 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4344 |)); + A.to_value (M.of_value (| Value.Integer 7352 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4345 |)); + A.to_value (M.of_value (| Value.Integer 7353 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4346 |)); + A.to_value (M.of_value (| Value.Integer 7354 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4349 |)); + A.to_value (M.of_value (| Value.Integer 7357 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4350 |)); + A.to_value (M.of_value (| Value.Integer 7358 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 4351 |)); + A.to_value (M.of_value (| Value.Integer 7359 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5112 |)); + A.to_value (M.of_value (| Value.Integer 5104 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5113 |)); + A.to_value (M.of_value (| Value.Integer 5105 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5114 |)); + A.to_value (M.of_value (| Value.Integer 5106 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5115 |)); + A.to_value (M.of_value (| Value.Integer 5107 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5116 |)); + A.to_value (M.of_value (| Value.Integer 5108 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 5117 |)); + A.to_value (M.of_value (| Value.Integer 5109 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7296 |)); + A.to_value (M.of_value (| Value.Integer 1042 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7297 |)); + A.to_value (M.of_value (| Value.Integer 1044 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7298 |)); + A.to_value (M.of_value (| Value.Integer 1054 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7299 |)); + A.to_value (M.of_value (| Value.Integer 1057 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7300 |)); + A.to_value (M.of_value (| Value.Integer 1058 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7301 |)); + A.to_value (M.of_value (| Value.Integer 1058 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7302 |)); + A.to_value (M.of_value (| Value.Integer 1066 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7303 |)); + A.to_value (M.of_value (| Value.Integer 1122 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7304 |)); + A.to_value (M.of_value (| Value.Integer 42570 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7545 |)); + A.to_value (M.of_value (| Value.Integer 42877 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7549 |)); + A.to_value (M.of_value (| Value.Integer 11363 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7566 |)); + A.to_value (M.of_value (| Value.Integer 42950 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7681 |)); + A.to_value (M.of_value (| Value.Integer 7680 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7683 |)); + A.to_value (M.of_value (| Value.Integer 7682 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7685 |)); + A.to_value (M.of_value (| Value.Integer 7684 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7687 |)); + A.to_value (M.of_value (| Value.Integer 7686 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7689 |)); + A.to_value (M.of_value (| Value.Integer 7688 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7691 |)); + A.to_value (M.of_value (| Value.Integer 7690 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7693 |)); + A.to_value (M.of_value (| Value.Integer 7692 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7695 |)); + A.to_value (M.of_value (| Value.Integer 7694 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7697 |)); + A.to_value (M.of_value (| Value.Integer 7696 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7699 |)); + A.to_value (M.of_value (| Value.Integer 7698 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7701 |)); + A.to_value (M.of_value (| Value.Integer 7700 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7703 |)); + A.to_value (M.of_value (| Value.Integer 7702 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7705 |)); + A.to_value (M.of_value (| Value.Integer 7704 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7707 |)); + A.to_value (M.of_value (| Value.Integer 7706 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7709 |)); + A.to_value (M.of_value (| Value.Integer 7708 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7711 |)); + A.to_value (M.of_value (| Value.Integer 7710 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7713 |)); + A.to_value (M.of_value (| Value.Integer 7712 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7715 |)); + A.to_value (M.of_value (| Value.Integer 7714 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7717 |)); + A.to_value (M.of_value (| Value.Integer 7716 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7719 |)); + A.to_value (M.of_value (| Value.Integer 7718 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7721 |)); + A.to_value (M.of_value (| Value.Integer 7720 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7723 |)); + A.to_value (M.of_value (| Value.Integer 7722 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7725 |)); + A.to_value (M.of_value (| Value.Integer 7724 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7727 |)); + A.to_value (M.of_value (| Value.Integer 7726 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7729 |)); + A.to_value (M.of_value (| Value.Integer 7728 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7731 |)); + A.to_value (M.of_value (| Value.Integer 7730 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7733 |)); + A.to_value (M.of_value (| Value.Integer 7732 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7735 |)); + A.to_value (M.of_value (| Value.Integer 7734 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7737 |)); + A.to_value (M.of_value (| Value.Integer 7736 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7739 |)); + A.to_value (M.of_value (| Value.Integer 7738 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7741 |)); + A.to_value (M.of_value (| Value.Integer 7740 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7743 |)); + A.to_value (M.of_value (| Value.Integer 7742 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7745 |)); + A.to_value (M.of_value (| Value.Integer 7744 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7747 |)); + A.to_value (M.of_value (| Value.Integer 7746 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7749 |)); + A.to_value (M.of_value (| Value.Integer 7748 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7751 |)); + A.to_value (M.of_value (| Value.Integer 7750 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7753 |)); + A.to_value (M.of_value (| Value.Integer 7752 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7755 |)); + A.to_value (M.of_value (| Value.Integer 7754 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7757 |)); + A.to_value (M.of_value (| Value.Integer 7756 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7759 |)); + A.to_value (M.of_value (| Value.Integer 7758 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7761 |)); + A.to_value (M.of_value (| Value.Integer 7760 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7763 |)); + A.to_value (M.of_value (| Value.Integer 7762 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7765 |)); + A.to_value (M.of_value (| Value.Integer 7764 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7767 |)); + A.to_value (M.of_value (| Value.Integer 7766 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7769 |)); + A.to_value (M.of_value (| Value.Integer 7768 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7771 |)); + A.to_value (M.of_value (| Value.Integer 7770 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7773 |)); + A.to_value (M.of_value (| Value.Integer 7772 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7775 |)); + A.to_value (M.of_value (| Value.Integer 7774 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7777 |)); + A.to_value (M.of_value (| Value.Integer 7776 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7779 |)); + A.to_value (M.of_value (| Value.Integer 7778 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7781 |)); + A.to_value (M.of_value (| Value.Integer 7780 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7783 |)); + A.to_value (M.of_value (| Value.Integer 7782 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7785 |)); + A.to_value (M.of_value (| Value.Integer 7784 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7787 |)); + A.to_value (M.of_value (| Value.Integer 7786 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7789 |)); + A.to_value (M.of_value (| Value.Integer 7788 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7791 |)); + A.to_value (M.of_value (| Value.Integer 7790 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7793 |)); + A.to_value (M.of_value (| Value.Integer 7792 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7795 |)); + A.to_value (M.of_value (| Value.Integer 7794 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7797 |)); + A.to_value (M.of_value (| Value.Integer 7796 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7799 |)); + A.to_value (M.of_value (| Value.Integer 7798 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7801 |)); + A.to_value (M.of_value (| Value.Integer 7800 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7803 |)); + A.to_value (M.of_value (| Value.Integer 7802 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7805 |)); + A.to_value (M.of_value (| Value.Integer 7804 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7807 |)); + A.to_value (M.of_value (| Value.Integer 7806 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7809 |)); + A.to_value (M.of_value (| Value.Integer 7808 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7811 |)); + A.to_value (M.of_value (| Value.Integer 7810 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7813 |)); + A.to_value (M.of_value (| Value.Integer 7812 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7815 |)); + A.to_value (M.of_value (| Value.Integer 7814 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7817 |)); + A.to_value (M.of_value (| Value.Integer 7816 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7819 |)); + A.to_value (M.of_value (| Value.Integer 7818 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7821 |)); + A.to_value (M.of_value (| Value.Integer 7820 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7823 |)); + A.to_value (M.of_value (| Value.Integer 7822 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7825 |)); + A.to_value (M.of_value (| Value.Integer 7824 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7827 |)); + A.to_value (M.of_value (| Value.Integer 7826 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7829 |)); + A.to_value (M.of_value (| Value.Integer 7828 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7830 |)); + A.to_value (M.of_value (| Value.Integer 4194310 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7831 |)); + A.to_value (M.of_value (| Value.Integer 4194311 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7832 |)); + A.to_value (M.of_value (| Value.Integer 4194312 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7833 |)); + A.to_value (M.of_value (| Value.Integer 4194313 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7834 |)); + A.to_value (M.of_value (| Value.Integer 4194314 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7835 |)); + A.to_value (M.of_value (| Value.Integer 7776 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7841 |)); + A.to_value (M.of_value (| Value.Integer 7840 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7843 |)); + A.to_value (M.of_value (| Value.Integer 7842 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7845 |)); + A.to_value (M.of_value (| Value.Integer 7844 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7847 |)); + A.to_value (M.of_value (| Value.Integer 7846 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7849 |)); + A.to_value (M.of_value (| Value.Integer 7848 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7851 |)); + A.to_value (M.of_value (| Value.Integer 7850 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7853 |)); + A.to_value (M.of_value (| Value.Integer 7852 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7855 |)); + A.to_value (M.of_value (| Value.Integer 7854 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7857 |)); + A.to_value (M.of_value (| Value.Integer 7856 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7859 |)); + A.to_value (M.of_value (| Value.Integer 7858 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7861 |)); + A.to_value (M.of_value (| Value.Integer 7860 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7863 |)); + A.to_value (M.of_value (| Value.Integer 7862 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7865 |)); + A.to_value (M.of_value (| Value.Integer 7864 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7867 |)); + A.to_value (M.of_value (| Value.Integer 7866 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7869 |)); + A.to_value (M.of_value (| Value.Integer 7868 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7871 |)); + A.to_value (M.of_value (| Value.Integer 7870 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7873 |)); + A.to_value (M.of_value (| Value.Integer 7872 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7875 |)); + A.to_value (M.of_value (| Value.Integer 7874 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7877 |)); + A.to_value (M.of_value (| Value.Integer 7876 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7879 |)); + A.to_value (M.of_value (| Value.Integer 7878 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7881 |)); + A.to_value (M.of_value (| Value.Integer 7880 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7883 |)); + A.to_value (M.of_value (| Value.Integer 7882 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7885 |)); + A.to_value (M.of_value (| Value.Integer 7884 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7887 |)); + A.to_value (M.of_value (| Value.Integer 7886 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7889 |)); + A.to_value (M.of_value (| Value.Integer 7888 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7891 |)); + A.to_value (M.of_value (| Value.Integer 7890 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7893 |)); + A.to_value (M.of_value (| Value.Integer 7892 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7895 |)); + A.to_value (M.of_value (| Value.Integer 7894 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7897 |)); + A.to_value (M.of_value (| Value.Integer 7896 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7899 |)); + A.to_value (M.of_value (| Value.Integer 7898 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7901 |)); + A.to_value (M.of_value (| Value.Integer 7900 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7903 |)); + A.to_value (M.of_value (| Value.Integer 7902 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7905 |)); + A.to_value (M.of_value (| Value.Integer 7904 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7907 |)); + A.to_value (M.of_value (| Value.Integer 7906 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7909 |)); + A.to_value (M.of_value (| Value.Integer 7908 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7911 |)); + A.to_value (M.of_value (| Value.Integer 7910 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7913 |)); + A.to_value (M.of_value (| Value.Integer 7912 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7915 |)); + A.to_value (M.of_value (| Value.Integer 7914 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7917 |)); + A.to_value (M.of_value (| Value.Integer 7916 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7919 |)); + A.to_value (M.of_value (| Value.Integer 7918 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7921 |)); + A.to_value (M.of_value (| Value.Integer 7920 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7923 |)); + A.to_value (M.of_value (| Value.Integer 7922 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7925 |)); + A.to_value (M.of_value (| Value.Integer 7924 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7927 |)); + A.to_value (M.of_value (| Value.Integer 7926 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7929 |)); + A.to_value (M.of_value (| Value.Integer 7928 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7931 |)); + A.to_value (M.of_value (| Value.Integer 7930 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7933 |)); + A.to_value (M.of_value (| Value.Integer 7932 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7935 |)); + A.to_value (M.of_value (| Value.Integer 7934 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7936 |)); + A.to_value (M.of_value (| Value.Integer 7944 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7937 |)); + A.to_value (M.of_value (| Value.Integer 7945 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7938 |)); + A.to_value (M.of_value (| Value.Integer 7946 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7939 |)); + A.to_value (M.of_value (| Value.Integer 7947 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7940 |)); + A.to_value (M.of_value (| Value.Integer 7948 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7941 |)); + A.to_value (M.of_value (| Value.Integer 7949 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7942 |)); + A.to_value (M.of_value (| Value.Integer 7950 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7943 |)); + A.to_value (M.of_value (| Value.Integer 7951 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7952 |)); + A.to_value (M.of_value (| Value.Integer 7960 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7953 |)); + A.to_value (M.of_value (| Value.Integer 7961 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7954 |)); + A.to_value (M.of_value (| Value.Integer 7962 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7955 |)); + A.to_value (M.of_value (| Value.Integer 7963 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7956 |)); + A.to_value (M.of_value (| Value.Integer 7964 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7957 |)); + A.to_value (M.of_value (| Value.Integer 7965 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7968 |)); + A.to_value (M.of_value (| Value.Integer 7976 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7969 |)); + A.to_value (M.of_value (| Value.Integer 7977 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7970 |)); + A.to_value (M.of_value (| Value.Integer 7978 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7971 |)); + A.to_value (M.of_value (| Value.Integer 7979 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7972 |)); + A.to_value (M.of_value (| Value.Integer 7980 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7973 |)); + A.to_value (M.of_value (| Value.Integer 7981 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7974 |)); + A.to_value (M.of_value (| Value.Integer 7982 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7975 |)); + A.to_value (M.of_value (| Value.Integer 7983 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7984 |)); + A.to_value (M.of_value (| Value.Integer 7992 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7985 |)); + A.to_value (M.of_value (| Value.Integer 7993 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7986 |)); + A.to_value (M.of_value (| Value.Integer 7994 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7987 |)); + A.to_value (M.of_value (| Value.Integer 7995 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7988 |)); + A.to_value (M.of_value (| Value.Integer 7996 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7989 |)); + A.to_value (M.of_value (| Value.Integer 7997 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7990 |)); + A.to_value (M.of_value (| Value.Integer 7998 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 7991 |)); + A.to_value (M.of_value (| Value.Integer 7999 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8000 |)); + A.to_value (M.of_value (| Value.Integer 8008 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8001 |)); + A.to_value (M.of_value (| Value.Integer 8009 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8002 |)); + A.to_value (M.of_value (| Value.Integer 8010 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8003 |)); + A.to_value (M.of_value (| Value.Integer 8011 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8004 |)); + A.to_value (M.of_value (| Value.Integer 8012 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8005 |)); + A.to_value (M.of_value (| Value.Integer 8013 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8016 |)); + A.to_value (M.of_value (| Value.Integer 4194315 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8017 |)); + A.to_value (M.of_value (| Value.Integer 8025 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8018 |)); + A.to_value (M.of_value (| Value.Integer 4194316 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8019 |)); + A.to_value (M.of_value (| Value.Integer 8027 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8020 |)); + A.to_value (M.of_value (| Value.Integer 4194317 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8021 |)); + A.to_value (M.of_value (| Value.Integer 8029 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8022 |)); + A.to_value (M.of_value (| Value.Integer 4194318 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8023 |)); + A.to_value (M.of_value (| Value.Integer 8031 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8032 |)); + A.to_value (M.of_value (| Value.Integer 8040 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8033 |)); + A.to_value (M.of_value (| Value.Integer 8041 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8034 |)); + A.to_value (M.of_value (| Value.Integer 8042 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8035 |)); + A.to_value (M.of_value (| Value.Integer 8043 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8036 |)); + A.to_value (M.of_value (| Value.Integer 8044 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8037 |)); + A.to_value (M.of_value (| Value.Integer 8045 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8038 |)); + A.to_value (M.of_value (| Value.Integer 8046 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8039 |)); + A.to_value (M.of_value (| Value.Integer 8047 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8048 |)); + A.to_value (M.of_value (| Value.Integer 8122 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8049 |)); + A.to_value (M.of_value (| Value.Integer 8123 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8050 |)); + A.to_value (M.of_value (| Value.Integer 8136 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8051 |)); + A.to_value (M.of_value (| Value.Integer 8137 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8052 |)); + A.to_value (M.of_value (| Value.Integer 8138 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8053 |)); + A.to_value (M.of_value (| Value.Integer 8139 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8054 |)); + A.to_value (M.of_value (| Value.Integer 8154 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8055 |)); + A.to_value (M.of_value (| Value.Integer 8155 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8056 |)); + A.to_value (M.of_value (| Value.Integer 8184 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8057 |)); + A.to_value (M.of_value (| Value.Integer 8185 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8058 |)); + A.to_value (M.of_value (| Value.Integer 8170 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8059 |)); + A.to_value (M.of_value (| Value.Integer 8171 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8060 |)); + A.to_value (M.of_value (| Value.Integer 8186 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8061 |)); + A.to_value (M.of_value (| Value.Integer 8187 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8064 |)); + A.to_value (M.of_value (| Value.Integer 4194319 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8065 |)); + A.to_value (M.of_value (| Value.Integer 4194320 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8066 |)); + A.to_value (M.of_value (| Value.Integer 4194321 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8067 |)); + A.to_value (M.of_value (| Value.Integer 4194322 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8068 |)); + A.to_value (M.of_value (| Value.Integer 4194323 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8069 |)); + A.to_value (M.of_value (| Value.Integer 4194324 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8070 |)); + A.to_value (M.of_value (| Value.Integer 4194325 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8071 |)); + A.to_value (M.of_value (| Value.Integer 4194326 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8072 |)); + A.to_value (M.of_value (| Value.Integer 4194327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8073 |)); + A.to_value (M.of_value (| Value.Integer 4194328 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8074 |)); + A.to_value (M.of_value (| Value.Integer 4194329 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8075 |)); + A.to_value (M.of_value (| Value.Integer 4194330 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8076 |)); + A.to_value (M.of_value (| Value.Integer 4194331 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8077 |)); + A.to_value (M.of_value (| Value.Integer 4194332 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8078 |)); + A.to_value (M.of_value (| Value.Integer 4194333 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8079 |)); + A.to_value (M.of_value (| Value.Integer 4194334 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8080 |)); + A.to_value (M.of_value (| Value.Integer 4194335 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8081 |)); + A.to_value (M.of_value (| Value.Integer 4194336 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8082 |)); + A.to_value (M.of_value (| Value.Integer 4194337 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8083 |)); + A.to_value (M.of_value (| Value.Integer 4194338 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8084 |)); + A.to_value (M.of_value (| Value.Integer 4194339 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8085 |)); + A.to_value (M.of_value (| Value.Integer 4194340 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8086 |)); + A.to_value (M.of_value (| Value.Integer 4194341 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8087 |)); + A.to_value (M.of_value (| Value.Integer 4194342 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8088 |)); + A.to_value (M.of_value (| Value.Integer 4194343 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8089 |)); + A.to_value (M.of_value (| Value.Integer 4194344 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8090 |)); + A.to_value (M.of_value (| Value.Integer 4194345 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8091 |)); + A.to_value (M.of_value (| Value.Integer 4194346 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8092 |)); + A.to_value (M.of_value (| Value.Integer 4194347 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8093 |)); + A.to_value (M.of_value (| Value.Integer 4194348 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8094 |)); + A.to_value (M.of_value (| Value.Integer 4194349 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8095 |)); + A.to_value (M.of_value (| Value.Integer 4194350 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8096 |)); + A.to_value (M.of_value (| Value.Integer 4194351 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8097 |)); + A.to_value (M.of_value (| Value.Integer 4194352 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8098 |)); + A.to_value (M.of_value (| Value.Integer 4194353 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8099 |)); + A.to_value (M.of_value (| Value.Integer 4194354 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8100 |)); + A.to_value (M.of_value (| Value.Integer 4194355 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8101 |)); + A.to_value (M.of_value (| Value.Integer 4194356 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8102 |)); + A.to_value (M.of_value (| Value.Integer 4194357 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8103 |)); + A.to_value (M.of_value (| Value.Integer 4194358 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8104 |)); + A.to_value (M.of_value (| Value.Integer 4194359 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8105 |)); + A.to_value (M.of_value (| Value.Integer 4194360 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8106 |)); + A.to_value (M.of_value (| Value.Integer 4194361 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8107 |)); + A.to_value (M.of_value (| Value.Integer 4194362 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8108 |)); + A.to_value (M.of_value (| Value.Integer 4194363 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8109 |)); + A.to_value (M.of_value (| Value.Integer 4194364 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8110 |)); + A.to_value (M.of_value (| Value.Integer 4194365 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8111 |)); + A.to_value (M.of_value (| Value.Integer 4194366 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8112 |)); + A.to_value (M.of_value (| Value.Integer 8120 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8113 |)); + A.to_value (M.of_value (| Value.Integer 8121 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8114 |)); + A.to_value (M.of_value (| Value.Integer 4194367 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8115 |)); + A.to_value (M.of_value (| Value.Integer 4194368 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8116 |)); + A.to_value (M.of_value (| Value.Integer 4194369 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8118 |)); + A.to_value (M.of_value (| Value.Integer 4194370 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8119 |)); + A.to_value (M.of_value (| Value.Integer 4194371 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8124 |)); + A.to_value (M.of_value (| Value.Integer 4194372 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8126 |)); + A.to_value (M.of_value (| Value.Integer 921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8130 |)); + A.to_value (M.of_value (| Value.Integer 4194373 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8131 |)); + A.to_value (M.of_value (| Value.Integer 4194374 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8132 |)); + A.to_value (M.of_value (| Value.Integer 4194375 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8134 |)); + A.to_value (M.of_value (| Value.Integer 4194376 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8135 |)); + A.to_value (M.of_value (| Value.Integer 4194377 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8140 |)); + A.to_value (M.of_value (| Value.Integer 4194378 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8144 |)); + A.to_value (M.of_value (| Value.Integer 8152 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8145 |)); + A.to_value (M.of_value (| Value.Integer 8153 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8146 |)); + A.to_value (M.of_value (| Value.Integer 4194379 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8147 |)); + A.to_value (M.of_value (| Value.Integer 4194380 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8150 |)); + A.to_value (M.of_value (| Value.Integer 4194381 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8151 |)); + A.to_value (M.of_value (| Value.Integer 4194382 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8160 |)); + A.to_value (M.of_value (| Value.Integer 8168 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8161 |)); + A.to_value (M.of_value (| Value.Integer 8169 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8162 |)); + A.to_value (M.of_value (| Value.Integer 4194383 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8163 |)); + A.to_value (M.of_value (| Value.Integer 4194384 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8164 |)); + A.to_value (M.of_value (| Value.Integer 4194385 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8165 |)); + A.to_value (M.of_value (| Value.Integer 8172 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8166 |)); + A.to_value (M.of_value (| Value.Integer 4194386 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8167 |)); + A.to_value (M.of_value (| Value.Integer 4194387 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8178 |)); + A.to_value (M.of_value (| Value.Integer 4194388 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8179 |)); + A.to_value (M.of_value (| Value.Integer 4194389 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8180 |)); + A.to_value (M.of_value (| Value.Integer 4194390 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8182 |)); + A.to_value (M.of_value (| Value.Integer 4194391 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8183 |)); + A.to_value (M.of_value (| Value.Integer 4194392 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8188 |)); + A.to_value (M.of_value (| Value.Integer 4194393 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8526 |)); + A.to_value (M.of_value (| Value.Integer 8498 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8560 |)); + A.to_value (M.of_value (| Value.Integer 8544 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8561 |)); + A.to_value (M.of_value (| Value.Integer 8545 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8562 |)); + A.to_value (M.of_value (| Value.Integer 8546 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8563 |)); + A.to_value (M.of_value (| Value.Integer 8547 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8564 |)); + A.to_value (M.of_value (| Value.Integer 8548 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8565 |)); + A.to_value (M.of_value (| Value.Integer 8549 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8566 |)); + A.to_value (M.of_value (| Value.Integer 8550 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8567 |)); + A.to_value (M.of_value (| Value.Integer 8551 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8568 |)); + A.to_value (M.of_value (| Value.Integer 8552 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8569 |)); + A.to_value (M.of_value (| Value.Integer 8553 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8570 |)); + A.to_value (M.of_value (| Value.Integer 8554 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8571 |)); + A.to_value (M.of_value (| Value.Integer 8555 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8572 |)); + A.to_value (M.of_value (| Value.Integer 8556 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8573 |)); + A.to_value (M.of_value (| Value.Integer 8557 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8574 |)); + A.to_value (M.of_value (| Value.Integer 8558 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8575 |)); + A.to_value (M.of_value (| Value.Integer 8559 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 8580 |)); + A.to_value (M.of_value (| Value.Integer 8579 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9424 |)); + A.to_value (M.of_value (| Value.Integer 9398 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9425 |)); + A.to_value (M.of_value (| Value.Integer 9399 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9426 |)); + A.to_value (M.of_value (| Value.Integer 9400 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9427 |)); + A.to_value (M.of_value (| Value.Integer 9401 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9428 |)); + A.to_value (M.of_value (| Value.Integer 9402 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9429 |)); + A.to_value (M.of_value (| Value.Integer 9403 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9430 |)); + A.to_value (M.of_value (| Value.Integer 9404 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9431 |)); + A.to_value (M.of_value (| Value.Integer 9405 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9432 |)); + A.to_value (M.of_value (| Value.Integer 9406 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9433 |)); + A.to_value (M.of_value (| Value.Integer 9407 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9434 |)); + A.to_value (M.of_value (| Value.Integer 9408 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9435 |)); + A.to_value (M.of_value (| Value.Integer 9409 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9436 |)); + A.to_value (M.of_value (| Value.Integer 9410 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9437 |)); + A.to_value (M.of_value (| Value.Integer 9411 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9438 |)); + A.to_value (M.of_value (| Value.Integer 9412 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9439 |)); + A.to_value (M.of_value (| Value.Integer 9413 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9440 |)); + A.to_value (M.of_value (| Value.Integer 9414 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9441 |)); + A.to_value (M.of_value (| Value.Integer 9415 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9442 |)); + A.to_value (M.of_value (| Value.Integer 9416 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9443 |)); + A.to_value (M.of_value (| Value.Integer 9417 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9444 |)); + A.to_value (M.of_value (| Value.Integer 9418 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9445 |)); + A.to_value (M.of_value (| Value.Integer 9419 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9446 |)); + A.to_value (M.of_value (| Value.Integer 9420 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9447 |)); + A.to_value (M.of_value (| Value.Integer 9421 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9448 |)); + A.to_value (M.of_value (| Value.Integer 9422 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 9449 |)); + A.to_value (M.of_value (| Value.Integer 9423 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11312 |)); + A.to_value (M.of_value (| Value.Integer 11264 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11313 |)); + A.to_value (M.of_value (| Value.Integer 11265 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11314 |)); + A.to_value (M.of_value (| Value.Integer 11266 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11315 |)); + A.to_value (M.of_value (| Value.Integer 11267 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11316 |)); + A.to_value (M.of_value (| Value.Integer 11268 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11317 |)); + A.to_value (M.of_value (| Value.Integer 11269 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11318 |)); + A.to_value (M.of_value (| Value.Integer 11270 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11319 |)); + A.to_value (M.of_value (| Value.Integer 11271 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11320 |)); + A.to_value (M.of_value (| Value.Integer 11272 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11321 |)); + A.to_value (M.of_value (| Value.Integer 11273 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11322 |)); + A.to_value (M.of_value (| Value.Integer 11274 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11323 |)); + A.to_value (M.of_value (| Value.Integer 11275 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11324 |)); + A.to_value (M.of_value (| Value.Integer 11276 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11325 |)); + A.to_value (M.of_value (| Value.Integer 11277 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11326 |)); + A.to_value (M.of_value (| Value.Integer 11278 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11327 |)); + A.to_value (M.of_value (| Value.Integer 11279 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11328 |)); + A.to_value (M.of_value (| Value.Integer 11280 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11329 |)); + A.to_value (M.of_value (| Value.Integer 11281 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11330 |)); + A.to_value (M.of_value (| Value.Integer 11282 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11331 |)); + A.to_value (M.of_value (| Value.Integer 11283 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11332 |)); + A.to_value (M.of_value (| Value.Integer 11284 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11333 |)); + A.to_value (M.of_value (| Value.Integer 11285 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11334 |)); + A.to_value (M.of_value (| Value.Integer 11286 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11335 |)); + A.to_value (M.of_value (| Value.Integer 11287 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11336 |)); + A.to_value (M.of_value (| Value.Integer 11288 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11337 |)); + A.to_value (M.of_value (| Value.Integer 11289 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11338 |)); + A.to_value (M.of_value (| Value.Integer 11290 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11339 |)); + A.to_value (M.of_value (| Value.Integer 11291 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11340 |)); + A.to_value (M.of_value (| Value.Integer 11292 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11341 |)); + A.to_value (M.of_value (| Value.Integer 11293 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11342 |)); + A.to_value (M.of_value (| Value.Integer 11294 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11343 |)); + A.to_value (M.of_value (| Value.Integer 11295 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11344 |)); + A.to_value (M.of_value (| Value.Integer 11296 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11345 |)); + A.to_value (M.of_value (| Value.Integer 11297 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11346 |)); + A.to_value (M.of_value (| Value.Integer 11298 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11347 |)); + A.to_value (M.of_value (| Value.Integer 11299 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11348 |)); + A.to_value (M.of_value (| Value.Integer 11300 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11349 |)); + A.to_value (M.of_value (| Value.Integer 11301 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11350 |)); + A.to_value (M.of_value (| Value.Integer 11302 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11351 |)); + A.to_value (M.of_value (| Value.Integer 11303 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11352 |)); + A.to_value (M.of_value (| Value.Integer 11304 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11353 |)); + A.to_value (M.of_value (| Value.Integer 11305 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11354 |)); + A.to_value (M.of_value (| Value.Integer 11306 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11355 |)); + A.to_value (M.of_value (| Value.Integer 11307 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11356 |)); + A.to_value (M.of_value (| Value.Integer 11308 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11357 |)); + A.to_value (M.of_value (| Value.Integer 11309 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11358 |)); + A.to_value (M.of_value (| Value.Integer 11310 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11359 |)); + A.to_value (M.of_value (| Value.Integer 11311 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11361 |)); + A.to_value (M.of_value (| Value.Integer 11360 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11365 |)); + A.to_value (M.of_value (| Value.Integer 570 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11366 |)); + A.to_value (M.of_value (| Value.Integer 574 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11368 |)); + A.to_value (M.of_value (| Value.Integer 11367 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11370 |)); + A.to_value (M.of_value (| Value.Integer 11369 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11372 |)); + A.to_value (M.of_value (| Value.Integer 11371 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11379 |)); + A.to_value (M.of_value (| Value.Integer 11378 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11382 |)); + A.to_value (M.of_value (| Value.Integer 11381 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11393 |)); + A.to_value (M.of_value (| Value.Integer 11392 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11395 |)); + A.to_value (M.of_value (| Value.Integer 11394 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11397 |)); + A.to_value (M.of_value (| Value.Integer 11396 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11399 |)); + A.to_value (M.of_value (| Value.Integer 11398 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11401 |)); + A.to_value (M.of_value (| Value.Integer 11400 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11403 |)); + A.to_value (M.of_value (| Value.Integer 11402 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11405 |)); + A.to_value (M.of_value (| Value.Integer 11404 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11407 |)); + A.to_value (M.of_value (| Value.Integer 11406 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11409 |)); + A.to_value (M.of_value (| Value.Integer 11408 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11411 |)); + A.to_value (M.of_value (| Value.Integer 11410 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11413 |)); + A.to_value (M.of_value (| Value.Integer 11412 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11415 |)); + A.to_value (M.of_value (| Value.Integer 11414 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11417 |)); + A.to_value (M.of_value (| Value.Integer 11416 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11419 |)); + A.to_value (M.of_value (| Value.Integer 11418 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11421 |)); + A.to_value (M.of_value (| Value.Integer 11420 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11423 |)); + A.to_value (M.of_value (| Value.Integer 11422 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11425 |)); + A.to_value (M.of_value (| Value.Integer 11424 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11427 |)); + A.to_value (M.of_value (| Value.Integer 11426 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11429 |)); + A.to_value (M.of_value (| Value.Integer 11428 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11431 |)); + A.to_value (M.of_value (| Value.Integer 11430 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11433 |)); + A.to_value (M.of_value (| Value.Integer 11432 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11435 |)); + A.to_value (M.of_value (| Value.Integer 11434 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11437 |)); + A.to_value (M.of_value (| Value.Integer 11436 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11439 |)); + A.to_value (M.of_value (| Value.Integer 11438 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11441 |)); + A.to_value (M.of_value (| Value.Integer 11440 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11443 |)); + A.to_value (M.of_value (| Value.Integer 11442 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11445 |)); + A.to_value (M.of_value (| Value.Integer 11444 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11447 |)); + A.to_value (M.of_value (| Value.Integer 11446 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11449 |)); + A.to_value (M.of_value (| Value.Integer 11448 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11451 |)); + A.to_value (M.of_value (| Value.Integer 11450 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11453 |)); + A.to_value (M.of_value (| Value.Integer 11452 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11455 |)); + A.to_value (M.of_value (| Value.Integer 11454 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11457 |)); + A.to_value (M.of_value (| Value.Integer 11456 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11459 |)); + A.to_value (M.of_value (| Value.Integer 11458 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11461 |)); + A.to_value (M.of_value (| Value.Integer 11460 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11463 |)); + A.to_value (M.of_value (| Value.Integer 11462 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11465 |)); + A.to_value (M.of_value (| Value.Integer 11464 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11467 |)); + A.to_value (M.of_value (| Value.Integer 11466 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11469 |)); + A.to_value (M.of_value (| Value.Integer 11468 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11471 |)); + A.to_value (M.of_value (| Value.Integer 11470 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11473 |)); + A.to_value (M.of_value (| Value.Integer 11472 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11475 |)); + A.to_value (M.of_value (| Value.Integer 11474 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11477 |)); + A.to_value (M.of_value (| Value.Integer 11476 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11479 |)); + A.to_value (M.of_value (| Value.Integer 11478 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11481 |)); + A.to_value (M.of_value (| Value.Integer 11480 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11483 |)); + A.to_value (M.of_value (| Value.Integer 11482 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11485 |)); + A.to_value (M.of_value (| Value.Integer 11484 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11487 |)); + A.to_value (M.of_value (| Value.Integer 11486 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11489 |)); + A.to_value (M.of_value (| Value.Integer 11488 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11491 |)); + A.to_value (M.of_value (| Value.Integer 11490 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11500 |)); + A.to_value (M.of_value (| Value.Integer 11499 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11502 |)); + A.to_value (M.of_value (| Value.Integer 11501 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11507 |)); + A.to_value (M.of_value (| Value.Integer 11506 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11520 |)); + A.to_value (M.of_value (| Value.Integer 4256 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11521 |)); + A.to_value (M.of_value (| Value.Integer 4257 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11522 |)); + A.to_value (M.of_value (| Value.Integer 4258 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11523 |)); + A.to_value (M.of_value (| Value.Integer 4259 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11524 |)); + A.to_value (M.of_value (| Value.Integer 4260 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11525 |)); + A.to_value (M.of_value (| Value.Integer 4261 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11526 |)); + A.to_value (M.of_value (| Value.Integer 4262 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11527 |)); + A.to_value (M.of_value (| Value.Integer 4263 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11528 |)); + A.to_value (M.of_value (| Value.Integer 4264 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11529 |)); + A.to_value (M.of_value (| Value.Integer 4265 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11530 |)); + A.to_value (M.of_value (| Value.Integer 4266 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11531 |)); + A.to_value (M.of_value (| Value.Integer 4267 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11532 |)); + A.to_value (M.of_value (| Value.Integer 4268 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11533 |)); + A.to_value (M.of_value (| Value.Integer 4269 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11534 |)); + A.to_value (M.of_value (| Value.Integer 4270 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11535 |)); + A.to_value (M.of_value (| Value.Integer 4271 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11536 |)); + A.to_value (M.of_value (| Value.Integer 4272 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11537 |)); + A.to_value (M.of_value (| Value.Integer 4273 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11538 |)); + A.to_value (M.of_value (| Value.Integer 4274 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11539 |)); + A.to_value (M.of_value (| Value.Integer 4275 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11540 |)); + A.to_value (M.of_value (| Value.Integer 4276 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11541 |)); + A.to_value (M.of_value (| Value.Integer 4277 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11542 |)); + A.to_value (M.of_value (| Value.Integer 4278 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11543 |)); + A.to_value (M.of_value (| Value.Integer 4279 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11544 |)); + A.to_value (M.of_value (| Value.Integer 4280 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11545 |)); + A.to_value (M.of_value (| Value.Integer 4281 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11546 |)); + A.to_value (M.of_value (| Value.Integer 4282 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11547 |)); + A.to_value (M.of_value (| Value.Integer 4283 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11548 |)); + A.to_value (M.of_value (| Value.Integer 4284 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11549 |)); + A.to_value (M.of_value (| Value.Integer 4285 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11550 |)); + A.to_value (M.of_value (| Value.Integer 4286 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11551 |)); + A.to_value (M.of_value (| Value.Integer 4287 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11552 |)); + A.to_value (M.of_value (| Value.Integer 4288 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11553 |)); + A.to_value (M.of_value (| Value.Integer 4289 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11554 |)); + A.to_value (M.of_value (| Value.Integer 4290 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11555 |)); + A.to_value (M.of_value (| Value.Integer 4291 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11556 |)); + A.to_value (M.of_value (| Value.Integer 4292 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11557 |)); + A.to_value (M.of_value (| Value.Integer 4293 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11559 |)); + A.to_value (M.of_value (| Value.Integer 4295 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 11565 |)); + A.to_value (M.of_value (| Value.Integer 4301 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42561 |)); + A.to_value (M.of_value (| Value.Integer 42560 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42563 |)); + A.to_value (M.of_value (| Value.Integer 42562 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42565 |)); + A.to_value (M.of_value (| Value.Integer 42564 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42567 |)); + A.to_value (M.of_value (| Value.Integer 42566 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42569 |)); + A.to_value (M.of_value (| Value.Integer 42568 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42571 |)); + A.to_value (M.of_value (| Value.Integer 42570 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42573 |)); + A.to_value (M.of_value (| Value.Integer 42572 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42575 |)); + A.to_value (M.of_value (| Value.Integer 42574 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42577 |)); + A.to_value (M.of_value (| Value.Integer 42576 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42579 |)); + A.to_value (M.of_value (| Value.Integer 42578 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42581 |)); + A.to_value (M.of_value (| Value.Integer 42580 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42583 |)); + A.to_value (M.of_value (| Value.Integer 42582 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42585 |)); + A.to_value (M.of_value (| Value.Integer 42584 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42587 |)); + A.to_value (M.of_value (| Value.Integer 42586 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42589 |)); + A.to_value (M.of_value (| Value.Integer 42588 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42591 |)); + A.to_value (M.of_value (| Value.Integer 42590 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42593 |)); + A.to_value (M.of_value (| Value.Integer 42592 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42595 |)); + A.to_value (M.of_value (| Value.Integer 42594 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42597 |)); + A.to_value (M.of_value (| Value.Integer 42596 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42599 |)); + A.to_value (M.of_value (| Value.Integer 42598 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42601 |)); + A.to_value (M.of_value (| Value.Integer 42600 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42603 |)); + A.to_value (M.of_value (| Value.Integer 42602 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42605 |)); + A.to_value (M.of_value (| Value.Integer 42604 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42625 |)); + A.to_value (M.of_value (| Value.Integer 42624 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42627 |)); + A.to_value (M.of_value (| Value.Integer 42626 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42629 |)); + A.to_value (M.of_value (| Value.Integer 42628 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42631 |)); + A.to_value (M.of_value (| Value.Integer 42630 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42633 |)); + A.to_value (M.of_value (| Value.Integer 42632 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42635 |)); + A.to_value (M.of_value (| Value.Integer 42634 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42637 |)); + A.to_value (M.of_value (| Value.Integer 42636 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42639 |)); + A.to_value (M.of_value (| Value.Integer 42638 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42641 |)); + A.to_value (M.of_value (| Value.Integer 42640 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42643 |)); + A.to_value (M.of_value (| Value.Integer 42642 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42645 |)); + A.to_value (M.of_value (| Value.Integer 42644 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42647 |)); + A.to_value (M.of_value (| Value.Integer 42646 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42649 |)); + A.to_value (M.of_value (| Value.Integer 42648 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42651 |)); + A.to_value (M.of_value (| Value.Integer 42650 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42787 |)); + A.to_value (M.of_value (| Value.Integer 42786 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42789 |)); + A.to_value (M.of_value (| Value.Integer 42788 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42791 |)); + A.to_value (M.of_value (| Value.Integer 42790 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42793 |)); + A.to_value (M.of_value (| Value.Integer 42792 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42795 |)); + A.to_value (M.of_value (| Value.Integer 42794 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42797 |)); + A.to_value (M.of_value (| Value.Integer 42796 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42799 |)); + A.to_value (M.of_value (| Value.Integer 42798 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42803 |)); + A.to_value (M.of_value (| Value.Integer 42802 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42805 |)); + A.to_value (M.of_value (| Value.Integer 42804 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42807 |)); + A.to_value (M.of_value (| Value.Integer 42806 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42809 |)); + A.to_value (M.of_value (| Value.Integer 42808 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42811 |)); + A.to_value (M.of_value (| Value.Integer 42810 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42813 |)); + A.to_value (M.of_value (| Value.Integer 42812 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42815 |)); + A.to_value (M.of_value (| Value.Integer 42814 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42817 |)); + A.to_value (M.of_value (| Value.Integer 42816 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42819 |)); + A.to_value (M.of_value (| Value.Integer 42818 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42821 |)); + A.to_value (M.of_value (| Value.Integer 42820 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42823 |)); + A.to_value (M.of_value (| Value.Integer 42822 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42825 |)); + A.to_value (M.of_value (| Value.Integer 42824 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42827 |)); + A.to_value (M.of_value (| Value.Integer 42826 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42829 |)); + A.to_value (M.of_value (| Value.Integer 42828 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42831 |)); + A.to_value (M.of_value (| Value.Integer 42830 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42833 |)); + A.to_value (M.of_value (| Value.Integer 42832 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42835 |)); + A.to_value (M.of_value (| Value.Integer 42834 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42837 |)); + A.to_value (M.of_value (| Value.Integer 42836 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42839 |)); + A.to_value (M.of_value (| Value.Integer 42838 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42841 |)); + A.to_value (M.of_value (| Value.Integer 42840 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42843 |)); + A.to_value (M.of_value (| Value.Integer 42842 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42845 |)); + A.to_value (M.of_value (| Value.Integer 42844 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42847 |)); + A.to_value (M.of_value (| Value.Integer 42846 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42849 |)); + A.to_value (M.of_value (| Value.Integer 42848 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42851 |)); + A.to_value (M.of_value (| Value.Integer 42850 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42853 |)); + A.to_value (M.of_value (| Value.Integer 42852 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42855 |)); + A.to_value (M.of_value (| Value.Integer 42854 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42857 |)); + A.to_value (M.of_value (| Value.Integer 42856 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42859 |)); + A.to_value (M.of_value (| Value.Integer 42858 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42861 |)); + A.to_value (M.of_value (| Value.Integer 42860 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42863 |)); + A.to_value (M.of_value (| Value.Integer 42862 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42874 |)); + A.to_value (M.of_value (| Value.Integer 42873 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42876 |)); + A.to_value (M.of_value (| Value.Integer 42875 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42879 |)); + A.to_value (M.of_value (| Value.Integer 42878 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42881 |)); + A.to_value (M.of_value (| Value.Integer 42880 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42883 |)); + A.to_value (M.of_value (| Value.Integer 42882 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42885 |)); + A.to_value (M.of_value (| Value.Integer 42884 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42887 |)); + A.to_value (M.of_value (| Value.Integer 42886 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42892 |)); + A.to_value (M.of_value (| Value.Integer 42891 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42897 |)); + A.to_value (M.of_value (| Value.Integer 42896 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42899 |)); + A.to_value (M.of_value (| Value.Integer 42898 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42900 |)); + A.to_value (M.of_value (| Value.Integer 42948 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42903 |)); + A.to_value (M.of_value (| Value.Integer 42902 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42905 |)); + A.to_value (M.of_value (| Value.Integer 42904 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42907 |)); + A.to_value (M.of_value (| Value.Integer 42906 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42909 |)); + A.to_value (M.of_value (| Value.Integer 42908 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42911 |)); + A.to_value (M.of_value (| Value.Integer 42910 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42913 |)); + A.to_value (M.of_value (| Value.Integer 42912 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42915 |)); + A.to_value (M.of_value (| Value.Integer 42914 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42917 |)); + A.to_value (M.of_value (| Value.Integer 42916 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42919 |)); + A.to_value (M.of_value (| Value.Integer 42918 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42921 |)); + A.to_value (M.of_value (| Value.Integer 42920 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42933 |)); + A.to_value (M.of_value (| Value.Integer 42932 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42935 |)); + A.to_value (M.of_value (| Value.Integer 42934 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42937 |)); + A.to_value (M.of_value (| Value.Integer 42936 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42939 |)); + A.to_value (M.of_value (| Value.Integer 42938 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42941 |)); + A.to_value (M.of_value (| Value.Integer 42940 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42943 |)); + A.to_value (M.of_value (| Value.Integer 42942 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42945 |)); + A.to_value (M.of_value (| Value.Integer 42944 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42947 |)); + A.to_value (M.of_value (| Value.Integer 42946 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42952 |)); + A.to_value (M.of_value (| Value.Integer 42951 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42954 |)); + A.to_value (M.of_value (| Value.Integer 42953 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42961 |)); + A.to_value (M.of_value (| Value.Integer 42960 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42967 |)); + A.to_value (M.of_value (| Value.Integer 42966 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42969 |)); + A.to_value (M.of_value (| Value.Integer 42968 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 42998 |)); + A.to_value (M.of_value (| Value.Integer 42997 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43859 |)); + A.to_value (M.of_value (| Value.Integer 42931 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43888 |)); + A.to_value (M.of_value (| Value.Integer 5024 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43889 |)); + A.to_value (M.of_value (| Value.Integer 5025 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43890 |)); + A.to_value (M.of_value (| Value.Integer 5026 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43891 |)); + A.to_value (M.of_value (| Value.Integer 5027 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43892 |)); + A.to_value (M.of_value (| Value.Integer 5028 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43893 |)); + A.to_value (M.of_value (| Value.Integer 5029 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43894 |)); + A.to_value (M.of_value (| Value.Integer 5030 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43895 |)); + A.to_value (M.of_value (| Value.Integer 5031 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43896 |)); + A.to_value (M.of_value (| Value.Integer 5032 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43897 |)); + A.to_value (M.of_value (| Value.Integer 5033 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43898 |)); + A.to_value (M.of_value (| Value.Integer 5034 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43899 |)); + A.to_value (M.of_value (| Value.Integer 5035 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43900 |)); + A.to_value (M.of_value (| Value.Integer 5036 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43901 |)); + A.to_value (M.of_value (| Value.Integer 5037 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43902 |)); + A.to_value (M.of_value (| Value.Integer 5038 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43903 |)); + A.to_value (M.of_value (| Value.Integer 5039 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43904 |)); + A.to_value (M.of_value (| Value.Integer 5040 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43905 |)); + A.to_value (M.of_value (| Value.Integer 5041 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43906 |)); + A.to_value (M.of_value (| Value.Integer 5042 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43907 |)); + A.to_value (M.of_value (| Value.Integer 5043 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43908 |)); + A.to_value (M.of_value (| Value.Integer 5044 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43909 |)); + A.to_value (M.of_value (| Value.Integer 5045 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43910 |)); + A.to_value (M.of_value (| Value.Integer 5046 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43911 |)); + A.to_value (M.of_value (| Value.Integer 5047 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43912 |)); + A.to_value (M.of_value (| Value.Integer 5048 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43913 |)); + A.to_value (M.of_value (| Value.Integer 5049 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43914 |)); + A.to_value (M.of_value (| Value.Integer 5050 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43915 |)); + A.to_value (M.of_value (| Value.Integer 5051 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43916 |)); + A.to_value (M.of_value (| Value.Integer 5052 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43917 |)); + A.to_value (M.of_value (| Value.Integer 5053 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43918 |)); + A.to_value (M.of_value (| Value.Integer 5054 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43919 |)); + A.to_value (M.of_value (| Value.Integer 5055 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43920 |)); + A.to_value (M.of_value (| Value.Integer 5056 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43921 |)); + A.to_value (M.of_value (| Value.Integer 5057 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43922 |)); + A.to_value (M.of_value (| Value.Integer 5058 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43923 |)); + A.to_value (M.of_value (| Value.Integer 5059 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43924 |)); + A.to_value (M.of_value (| Value.Integer 5060 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43925 |)); + A.to_value (M.of_value (| Value.Integer 5061 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43926 |)); + A.to_value (M.of_value (| Value.Integer 5062 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43927 |)); + A.to_value (M.of_value (| Value.Integer 5063 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43928 |)); + A.to_value (M.of_value (| Value.Integer 5064 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43929 |)); + A.to_value (M.of_value (| Value.Integer 5065 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43930 |)); + A.to_value (M.of_value (| Value.Integer 5066 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43931 |)); + A.to_value (M.of_value (| Value.Integer 5067 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43932 |)); + A.to_value (M.of_value (| Value.Integer 5068 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43933 |)); + A.to_value (M.of_value (| Value.Integer 5069 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43934 |)); + A.to_value (M.of_value (| Value.Integer 5070 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43935 |)); + A.to_value (M.of_value (| Value.Integer 5071 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43936 |)); + A.to_value (M.of_value (| Value.Integer 5072 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43937 |)); + A.to_value (M.of_value (| Value.Integer 5073 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43938 |)); + A.to_value (M.of_value (| Value.Integer 5074 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43939 |)); + A.to_value (M.of_value (| Value.Integer 5075 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43940 |)); + A.to_value (M.of_value (| Value.Integer 5076 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43941 |)); + A.to_value (M.of_value (| Value.Integer 5077 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43942 |)); + A.to_value (M.of_value (| Value.Integer 5078 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43943 |)); + A.to_value (M.of_value (| Value.Integer 5079 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43944 |)); + A.to_value (M.of_value (| Value.Integer 5080 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43945 |)); + A.to_value (M.of_value (| Value.Integer 5081 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43946 |)); + A.to_value (M.of_value (| Value.Integer 5082 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43947 |)); + A.to_value (M.of_value (| Value.Integer 5083 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43948 |)); + A.to_value (M.of_value (| Value.Integer 5084 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43949 |)); + A.to_value (M.of_value (| Value.Integer 5085 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43950 |)); + A.to_value (M.of_value (| Value.Integer 5086 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43951 |)); + A.to_value (M.of_value (| Value.Integer 5087 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43952 |)); + A.to_value (M.of_value (| Value.Integer 5088 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43953 |)); + A.to_value (M.of_value (| Value.Integer 5089 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43954 |)); + A.to_value (M.of_value (| Value.Integer 5090 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43955 |)); + A.to_value (M.of_value (| Value.Integer 5091 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43956 |)); + A.to_value (M.of_value (| Value.Integer 5092 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43957 |)); + A.to_value (M.of_value (| Value.Integer 5093 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43958 |)); + A.to_value (M.of_value (| Value.Integer 5094 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43959 |)); + A.to_value (M.of_value (| Value.Integer 5095 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43960 |)); + A.to_value (M.of_value (| Value.Integer 5096 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43961 |)); + A.to_value (M.of_value (| Value.Integer 5097 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43962 |)); + A.to_value (M.of_value (| Value.Integer 5098 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43963 |)); + A.to_value (M.of_value (| Value.Integer 5099 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43964 |)); + A.to_value (M.of_value (| Value.Integer 5100 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43965 |)); + A.to_value (M.of_value (| Value.Integer 5101 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43966 |)); + A.to_value (M.of_value (| Value.Integer 5102 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 43967 |)); + A.to_value (M.of_value (| Value.Integer 5103 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64256 |)); + A.to_value (M.of_value (| Value.Integer 4194394 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64257 |)); + A.to_value (M.of_value (| Value.Integer 4194395 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64258 |)); + A.to_value (M.of_value (| Value.Integer 4194396 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64259 |)); + A.to_value (M.of_value (| Value.Integer 4194397 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64260 |)); + A.to_value (M.of_value (| Value.Integer 4194398 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64261 |)); + A.to_value (M.of_value (| Value.Integer 4194399 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64262 |)); + A.to_value (M.of_value (| Value.Integer 4194400 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64275 |)); + A.to_value (M.of_value (| Value.Integer 4194401 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64276 |)); + A.to_value (M.of_value (| Value.Integer 4194402 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64277 |)); + A.to_value (M.of_value (| Value.Integer 4194403 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64278 |)); + A.to_value (M.of_value (| Value.Integer 4194404 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 64279 |)); + A.to_value (M.of_value (| Value.Integer 4194405 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65345 |)); + A.to_value (M.of_value (| Value.Integer 65313 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65346 |)); + A.to_value (M.of_value (| Value.Integer 65314 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65347 |)); + A.to_value (M.of_value (| Value.Integer 65315 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65348 |)); + A.to_value (M.of_value (| Value.Integer 65316 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65349 |)); + A.to_value (M.of_value (| Value.Integer 65317 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65350 |)); + A.to_value (M.of_value (| Value.Integer 65318 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65351 |)); + A.to_value (M.of_value (| Value.Integer 65319 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65352 |)); + A.to_value (M.of_value (| Value.Integer 65320 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65353 |)); + A.to_value (M.of_value (| Value.Integer 65321 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65354 |)); + A.to_value (M.of_value (| Value.Integer 65322 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65355 |)); + A.to_value (M.of_value (| Value.Integer 65323 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65356 |)); + A.to_value (M.of_value (| Value.Integer 65324 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65357 |)); + A.to_value (M.of_value (| Value.Integer 65325 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65358 |)); + A.to_value (M.of_value (| Value.Integer 65326 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65359 |)); + A.to_value (M.of_value (| Value.Integer 65327 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65360 |)); + A.to_value (M.of_value (| Value.Integer 65328 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65361 |)); + A.to_value (M.of_value (| Value.Integer 65329 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65362 |)); + A.to_value (M.of_value (| Value.Integer 65330 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65363 |)); + A.to_value (M.of_value (| Value.Integer 65331 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65364 |)); + A.to_value (M.of_value (| Value.Integer 65332 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65365 |)); + A.to_value (M.of_value (| Value.Integer 65333 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65366 |)); + A.to_value (M.of_value (| Value.Integer 65334 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65367 |)); + A.to_value (M.of_value (| Value.Integer 65335 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65368 |)); + A.to_value (M.of_value (| Value.Integer 65336 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65369 |)); + A.to_value (M.of_value (| Value.Integer 65337 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 65370 |)); + A.to_value (M.of_value (| Value.Integer 65338 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66600 |)); + A.to_value (M.of_value (| Value.Integer 66560 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66601 |)); + A.to_value (M.of_value (| Value.Integer 66561 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66602 |)); + A.to_value (M.of_value (| Value.Integer 66562 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66603 |)); + A.to_value (M.of_value (| Value.Integer 66563 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66604 |)); + A.to_value (M.of_value (| Value.Integer 66564 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66605 |)); + A.to_value (M.of_value (| Value.Integer 66565 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66606 |)); + A.to_value (M.of_value (| Value.Integer 66566 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66607 |)); + A.to_value (M.of_value (| Value.Integer 66567 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66608 |)); + A.to_value (M.of_value (| Value.Integer 66568 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66609 |)); + A.to_value (M.of_value (| Value.Integer 66569 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66610 |)); + A.to_value (M.of_value (| Value.Integer 66570 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66611 |)); + A.to_value (M.of_value (| Value.Integer 66571 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66612 |)); + A.to_value (M.of_value (| Value.Integer 66572 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66613 |)); + A.to_value (M.of_value (| Value.Integer 66573 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66614 |)); + A.to_value (M.of_value (| Value.Integer 66574 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66615 |)); + A.to_value (M.of_value (| Value.Integer 66575 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66616 |)); + A.to_value (M.of_value (| Value.Integer 66576 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66617 |)); + A.to_value (M.of_value (| Value.Integer 66577 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66618 |)); + A.to_value (M.of_value (| Value.Integer 66578 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66619 |)); + A.to_value (M.of_value (| Value.Integer 66579 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66620 |)); + A.to_value (M.of_value (| Value.Integer 66580 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66621 |)); + A.to_value (M.of_value (| Value.Integer 66581 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66622 |)); + A.to_value (M.of_value (| Value.Integer 66582 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66623 |)); + A.to_value (M.of_value (| Value.Integer 66583 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66624 |)); + A.to_value (M.of_value (| Value.Integer 66584 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66625 |)); + A.to_value (M.of_value (| Value.Integer 66585 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66626 |)); + A.to_value (M.of_value (| Value.Integer 66586 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66627 |)); + A.to_value (M.of_value (| Value.Integer 66587 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66628 |)); + A.to_value (M.of_value (| Value.Integer 66588 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66629 |)); + A.to_value (M.of_value (| Value.Integer 66589 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66630 |)); + A.to_value (M.of_value (| Value.Integer 66590 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66631 |)); + A.to_value (M.of_value (| Value.Integer 66591 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66632 |)); + A.to_value (M.of_value (| Value.Integer 66592 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66633 |)); + A.to_value (M.of_value (| Value.Integer 66593 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66634 |)); + A.to_value (M.of_value (| Value.Integer 66594 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66635 |)); + A.to_value (M.of_value (| Value.Integer 66595 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66636 |)); + A.to_value (M.of_value (| Value.Integer 66596 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66637 |)); + A.to_value (M.of_value (| Value.Integer 66597 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66638 |)); + A.to_value (M.of_value (| Value.Integer 66598 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66639 |)); + A.to_value (M.of_value (| Value.Integer 66599 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66776 |)); + A.to_value (M.of_value (| Value.Integer 66736 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66777 |)); + A.to_value (M.of_value (| Value.Integer 66737 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66778 |)); + A.to_value (M.of_value (| Value.Integer 66738 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66779 |)); + A.to_value (M.of_value (| Value.Integer 66739 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66780 |)); + A.to_value (M.of_value (| Value.Integer 66740 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66781 |)); + A.to_value (M.of_value (| Value.Integer 66741 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66782 |)); + A.to_value (M.of_value (| Value.Integer 66742 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66783 |)); + A.to_value (M.of_value (| Value.Integer 66743 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66784 |)); + A.to_value (M.of_value (| Value.Integer 66744 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66785 |)); + A.to_value (M.of_value (| Value.Integer 66745 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66786 |)); + A.to_value (M.of_value (| Value.Integer 66746 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66787 |)); + A.to_value (M.of_value (| Value.Integer 66747 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66788 |)); + A.to_value (M.of_value (| Value.Integer 66748 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66789 |)); + A.to_value (M.of_value (| Value.Integer 66749 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66790 |)); + A.to_value (M.of_value (| Value.Integer 66750 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66791 |)); + A.to_value (M.of_value (| Value.Integer 66751 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66792 |)); + A.to_value (M.of_value (| Value.Integer 66752 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66793 |)); + A.to_value (M.of_value (| Value.Integer 66753 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66794 |)); + A.to_value (M.of_value (| Value.Integer 66754 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66795 |)); + A.to_value (M.of_value (| Value.Integer 66755 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66796 |)); + A.to_value (M.of_value (| Value.Integer 66756 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66797 |)); + A.to_value (M.of_value (| Value.Integer 66757 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66798 |)); + A.to_value (M.of_value (| Value.Integer 66758 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66799 |)); + A.to_value (M.of_value (| Value.Integer 66759 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66800 |)); + A.to_value (M.of_value (| Value.Integer 66760 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66801 |)); + A.to_value (M.of_value (| Value.Integer 66761 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66802 |)); + A.to_value (M.of_value (| Value.Integer 66762 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66803 |)); + A.to_value (M.of_value (| Value.Integer 66763 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66804 |)); + A.to_value (M.of_value (| Value.Integer 66764 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66805 |)); + A.to_value (M.of_value (| Value.Integer 66765 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66806 |)); + A.to_value (M.of_value (| Value.Integer 66766 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66807 |)); + A.to_value (M.of_value (| Value.Integer 66767 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66808 |)); + A.to_value (M.of_value (| Value.Integer 66768 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66809 |)); + A.to_value (M.of_value (| Value.Integer 66769 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66810 |)); + A.to_value (M.of_value (| Value.Integer 66770 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66811 |)); + A.to_value (M.of_value (| Value.Integer 66771 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66967 |)); + A.to_value (M.of_value (| Value.Integer 66928 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66968 |)); + A.to_value (M.of_value (| Value.Integer 66929 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66969 |)); + A.to_value (M.of_value (| Value.Integer 66930 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66970 |)); + A.to_value (M.of_value (| Value.Integer 66931 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66971 |)); + A.to_value (M.of_value (| Value.Integer 66932 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66972 |)); + A.to_value (M.of_value (| Value.Integer 66933 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66973 |)); + A.to_value (M.of_value (| Value.Integer 66934 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66974 |)); + A.to_value (M.of_value (| Value.Integer 66935 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66975 |)); + A.to_value (M.of_value (| Value.Integer 66936 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66976 |)); + A.to_value (M.of_value (| Value.Integer 66937 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66977 |)); + A.to_value (M.of_value (| Value.Integer 66938 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66979 |)); + A.to_value (M.of_value (| Value.Integer 66940 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66980 |)); + A.to_value (M.of_value (| Value.Integer 66941 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66981 |)); + A.to_value (M.of_value (| Value.Integer 66942 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66982 |)); + A.to_value (M.of_value (| Value.Integer 66943 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66983 |)); + A.to_value (M.of_value (| Value.Integer 66944 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66984 |)); + A.to_value (M.of_value (| Value.Integer 66945 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66985 |)); + A.to_value (M.of_value (| Value.Integer 66946 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66986 |)); + A.to_value (M.of_value (| Value.Integer 66947 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66987 |)); + A.to_value (M.of_value (| Value.Integer 66948 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66988 |)); + A.to_value (M.of_value (| Value.Integer 66949 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66989 |)); + A.to_value (M.of_value (| Value.Integer 66950 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66990 |)); + A.to_value (M.of_value (| Value.Integer 66951 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66991 |)); + A.to_value (M.of_value (| Value.Integer 66952 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66992 |)); + A.to_value (M.of_value (| Value.Integer 66953 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66993 |)); + A.to_value (M.of_value (| Value.Integer 66954 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66995 |)); + A.to_value (M.of_value (| Value.Integer 66956 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66996 |)); + A.to_value (M.of_value (| Value.Integer 66957 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66997 |)); + A.to_value (M.of_value (| Value.Integer 66958 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66998 |)); + A.to_value (M.of_value (| Value.Integer 66959 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 66999 |)); + A.to_value (M.of_value (| Value.Integer 66960 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 67000 |)); + A.to_value (M.of_value (| Value.Integer 66961 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 67001 |)); + A.to_value (M.of_value (| Value.Integer 66962 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 67003 |)); + A.to_value (M.of_value (| Value.Integer 66964 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 67004 |)); + A.to_value (M.of_value (| Value.Integer 66965 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68800 |)); + A.to_value (M.of_value (| Value.Integer 68736 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68801 |)); + A.to_value (M.of_value (| Value.Integer 68737 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68802 |)); + A.to_value (M.of_value (| Value.Integer 68738 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68803 |)); + A.to_value (M.of_value (| Value.Integer 68739 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68804 |)); + A.to_value (M.of_value (| Value.Integer 68740 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68805 |)); + A.to_value (M.of_value (| Value.Integer 68741 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68806 |)); + A.to_value (M.of_value (| Value.Integer 68742 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68807 |)); + A.to_value (M.of_value (| Value.Integer 68743 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68808 |)); + A.to_value (M.of_value (| Value.Integer 68744 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68809 |)); + A.to_value (M.of_value (| Value.Integer 68745 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68810 |)); + A.to_value (M.of_value (| Value.Integer 68746 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68811 |)); + A.to_value (M.of_value (| Value.Integer 68747 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68812 |)); + A.to_value (M.of_value (| Value.Integer 68748 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68813 |)); + A.to_value (M.of_value (| Value.Integer 68749 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68814 |)); + A.to_value (M.of_value (| Value.Integer 68750 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68815 |)); + A.to_value (M.of_value (| Value.Integer 68751 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68816 |)); + A.to_value (M.of_value (| Value.Integer 68752 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68817 |)); + A.to_value (M.of_value (| Value.Integer 68753 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68818 |)); + A.to_value (M.of_value (| Value.Integer 68754 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68819 |)); + A.to_value (M.of_value (| Value.Integer 68755 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68820 |)); + A.to_value (M.of_value (| Value.Integer 68756 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68821 |)); + A.to_value (M.of_value (| Value.Integer 68757 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68822 |)); + A.to_value (M.of_value (| Value.Integer 68758 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68823 |)); + A.to_value (M.of_value (| Value.Integer 68759 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68824 |)); + A.to_value (M.of_value (| Value.Integer 68760 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68825 |)); + A.to_value (M.of_value (| Value.Integer 68761 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68826 |)); + A.to_value (M.of_value (| Value.Integer 68762 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68827 |)); + A.to_value (M.of_value (| Value.Integer 68763 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68828 |)); + A.to_value (M.of_value (| Value.Integer 68764 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68829 |)); + A.to_value (M.of_value (| Value.Integer 68765 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68830 |)); + A.to_value (M.of_value (| Value.Integer 68766 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68831 |)); + A.to_value (M.of_value (| Value.Integer 68767 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68832 |)); + A.to_value (M.of_value (| Value.Integer 68768 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68833 |)); + A.to_value (M.of_value (| Value.Integer 68769 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68834 |)); + A.to_value (M.of_value (| Value.Integer 68770 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68835 |)); + A.to_value (M.of_value (| Value.Integer 68771 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68836 |)); + A.to_value (M.of_value (| Value.Integer 68772 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68837 |)); + A.to_value (M.of_value (| Value.Integer 68773 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68838 |)); + A.to_value (M.of_value (| Value.Integer 68774 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68839 |)); + A.to_value (M.of_value (| Value.Integer 68775 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68840 |)); + A.to_value (M.of_value (| Value.Integer 68776 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68841 |)); + A.to_value (M.of_value (| Value.Integer 68777 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68842 |)); + A.to_value (M.of_value (| Value.Integer 68778 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68843 |)); + A.to_value (M.of_value (| Value.Integer 68779 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68844 |)); + A.to_value (M.of_value (| Value.Integer 68780 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68845 |)); + A.to_value (M.of_value (| Value.Integer 68781 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68846 |)); + A.to_value (M.of_value (| Value.Integer 68782 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68847 |)); + A.to_value (M.of_value (| Value.Integer 68783 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68848 |)); + A.to_value (M.of_value (| Value.Integer 68784 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68849 |)); + A.to_value (M.of_value (| Value.Integer 68785 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 68850 |)); + A.to_value (M.of_value (| Value.Integer 68786 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71872 |)); + A.to_value (M.of_value (| Value.Integer 71840 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71873 |)); + A.to_value (M.of_value (| Value.Integer 71841 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71874 |)); + A.to_value (M.of_value (| Value.Integer 71842 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71875 |)); + A.to_value (M.of_value (| Value.Integer 71843 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71876 |)); + A.to_value (M.of_value (| Value.Integer 71844 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71877 |)); + A.to_value (M.of_value (| Value.Integer 71845 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71878 |)); + A.to_value (M.of_value (| Value.Integer 71846 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71879 |)); + A.to_value (M.of_value (| Value.Integer 71847 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71880 |)); + A.to_value (M.of_value (| Value.Integer 71848 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71881 |)); + A.to_value (M.of_value (| Value.Integer 71849 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71882 |)); + A.to_value (M.of_value (| Value.Integer 71850 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71883 |)); + A.to_value (M.of_value (| Value.Integer 71851 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71884 |)); + A.to_value (M.of_value (| Value.Integer 71852 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71885 |)); + A.to_value (M.of_value (| Value.Integer 71853 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71886 |)); + A.to_value (M.of_value (| Value.Integer 71854 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71887 |)); + A.to_value (M.of_value (| Value.Integer 71855 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71888 |)); + A.to_value (M.of_value (| Value.Integer 71856 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71889 |)); + A.to_value (M.of_value (| Value.Integer 71857 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71890 |)); + A.to_value (M.of_value (| Value.Integer 71858 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71891 |)); + A.to_value (M.of_value (| Value.Integer 71859 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71892 |)); + A.to_value (M.of_value (| Value.Integer 71860 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71893 |)); + A.to_value (M.of_value (| Value.Integer 71861 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71894 |)); + A.to_value (M.of_value (| Value.Integer 71862 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71895 |)); + A.to_value (M.of_value (| Value.Integer 71863 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71896 |)); + A.to_value (M.of_value (| Value.Integer 71864 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71897 |)); + A.to_value (M.of_value (| Value.Integer 71865 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71898 |)); + A.to_value (M.of_value (| Value.Integer 71866 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71899 |)); + A.to_value (M.of_value (| Value.Integer 71867 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71900 |)); + A.to_value (M.of_value (| Value.Integer 71868 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71901 |)); + A.to_value (M.of_value (| Value.Integer 71869 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71902 |)); + A.to_value (M.of_value (| Value.Integer 71870 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 71903 |)); + A.to_value (M.of_value (| Value.Integer 71871 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93792 |)); + A.to_value (M.of_value (| Value.Integer 93760 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93793 |)); + A.to_value (M.of_value (| Value.Integer 93761 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93794 |)); + A.to_value (M.of_value (| Value.Integer 93762 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93795 |)); + A.to_value (M.of_value (| Value.Integer 93763 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93796 |)); + A.to_value (M.of_value (| Value.Integer 93764 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93797 |)); + A.to_value (M.of_value (| Value.Integer 93765 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93798 |)); + A.to_value (M.of_value (| Value.Integer 93766 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93799 |)); + A.to_value (M.of_value (| Value.Integer 93767 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93800 |)); + A.to_value (M.of_value (| Value.Integer 93768 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93801 |)); + A.to_value (M.of_value (| Value.Integer 93769 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93802 |)); + A.to_value (M.of_value (| Value.Integer 93770 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93803 |)); + A.to_value (M.of_value (| Value.Integer 93771 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93804 |)); + A.to_value (M.of_value (| Value.Integer 93772 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93805 |)); + A.to_value (M.of_value (| Value.Integer 93773 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93806 |)); + A.to_value (M.of_value (| Value.Integer 93774 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93807 |)); + A.to_value (M.of_value (| Value.Integer 93775 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93808 |)); + A.to_value (M.of_value (| Value.Integer 93776 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93809 |)); + A.to_value (M.of_value (| Value.Integer 93777 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93810 |)); + A.to_value (M.of_value (| Value.Integer 93778 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93811 |)); + A.to_value (M.of_value (| Value.Integer 93779 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93812 |)); + A.to_value (M.of_value (| Value.Integer 93780 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93813 |)); + A.to_value (M.of_value (| Value.Integer 93781 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93814 |)); + A.to_value (M.of_value (| Value.Integer 93782 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93815 |)); + A.to_value (M.of_value (| Value.Integer 93783 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93816 |)); + A.to_value (M.of_value (| Value.Integer 93784 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93817 |)); + A.to_value (M.of_value (| Value.Integer 93785 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93818 |)); + A.to_value (M.of_value (| Value.Integer 93786 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93819 |)); + A.to_value (M.of_value (| Value.Integer 93787 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93820 |)); + A.to_value (M.of_value (| Value.Integer 93788 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93821 |)); + A.to_value (M.of_value (| Value.Integer 93789 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93822 |)); + A.to_value (M.of_value (| Value.Integer 93790 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 93823 |)); + A.to_value (M.of_value (| Value.Integer 93791 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125218 |)); + A.to_value (M.of_value (| Value.Integer 125184 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125219 |)); + A.to_value (M.of_value (| Value.Integer 125185 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125220 |)); + A.to_value (M.of_value (| Value.Integer 125186 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125221 |)); + A.to_value (M.of_value (| Value.Integer 125187 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125222 |)); + A.to_value (M.of_value (| Value.Integer 125188 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125223 |)); + A.to_value (M.of_value (| Value.Integer 125189 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125224 |)); + A.to_value (M.of_value (| Value.Integer 125190 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125225 |)); + A.to_value (M.of_value (| Value.Integer 125191 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125226 |)); + A.to_value (M.of_value (| Value.Integer 125192 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125227 |)); + A.to_value (M.of_value (| Value.Integer 125193 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125228 |)); + A.to_value (M.of_value (| Value.Integer 125194 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125229 |)); + A.to_value (M.of_value (| Value.Integer 125195 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125230 |)); + A.to_value (M.of_value (| Value.Integer 125196 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125231 |)); + A.to_value (M.of_value (| Value.Integer 125197 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125232 |)); + A.to_value (M.of_value (| Value.Integer 125198 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125233 |)); + A.to_value (M.of_value (| Value.Integer 125199 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125234 |)); + A.to_value (M.of_value (| Value.Integer 125200 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125235 |)); + A.to_value (M.of_value (| Value.Integer 125201 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125236 |)); + A.to_value (M.of_value (| Value.Integer 125202 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125237 |)); + A.to_value (M.of_value (| Value.Integer 125203 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125238 |)); + A.to_value (M.of_value (| Value.Integer 125204 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125239 |)); + A.to_value (M.of_value (| Value.Integer 125205 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125240 |)); + A.to_value (M.of_value (| Value.Integer 125206 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125241 |)); + A.to_value (M.of_value (| Value.Integer 125207 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125242 |)); + A.to_value (M.of_value (| Value.Integer 125208 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125243 |)); + A.to_value (M.of_value (| Value.Integer 125209 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125244 |)); + A.to_value (M.of_value (| Value.Integer 125210 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125245 |)); + A.to_value (M.of_value (| Value.Integer 125211 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125246 |)); + A.to_value (M.of_value (| Value.Integer 125212 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125247 |)); + A.to_value (M.of_value (| Value.Integer 125213 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125248 |)); + A.to_value (M.of_value (| Value.Integer 125214 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125249 |)); + A.to_value (M.of_value (| Value.Integer 125215 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125250 |)); + A.to_value (M.of_value (| Value.Integer 125216 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.UnicodeChar 125251 |)); + A.to_value (M.of_value (| Value.Integer 125217 |)) + ] + |)) + ] + |) + |) + |) + |) + |))). + + Definition value_UPPERCASE_TABLE_MULTI : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 83 |)); + A.to_value (M.of_value (| Value.UnicodeChar 83 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 700 |)); + A.to_value (M.of_value (| Value.UnicodeChar 78 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 74 |)); + A.to_value (M.of_value (| Value.UnicodeChar 780 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 776 |)); + A.to_value (M.of_value (| Value.UnicodeChar 769 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.UnicodeChar 776 |)); + A.to_value (M.of_value (| Value.UnicodeChar 769 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 1333 |)); + A.to_value (M.of_value (| Value.UnicodeChar 1362 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 72 |)); + A.to_value (M.of_value (| Value.UnicodeChar 817 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 84 |)); + A.to_value (M.of_value (| Value.UnicodeChar 776 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 87 |)); + A.to_value (M.of_value (| Value.UnicodeChar 778 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 89 |)); + A.to_value (M.of_value (| Value.UnicodeChar 778 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 65 |)); + A.to_value (M.of_value (| Value.UnicodeChar 702 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.UnicodeChar 787 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.UnicodeChar 787 |)); + A.to_value (M.of_value (| Value.UnicodeChar 768 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.UnicodeChar 787 |)); + A.to_value (M.of_value (| Value.UnicodeChar 769 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.UnicodeChar 787 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7944 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7945 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7946 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7947 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7948 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7949 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7950 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7951 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7944 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7945 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7946 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7947 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7948 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7949 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7950 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7951 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7976 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7977 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7978 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7979 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7980 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7981 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7982 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7983 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7976 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7977 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7978 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7979 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7980 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7981 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7982 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 7983 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8040 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8041 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8042 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8043 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8044 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8045 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8046 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8047 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8040 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8041 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8042 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8043 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8044 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8045 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8046 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8047 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8122 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 913 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 902 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 913 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 913 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 913 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8138 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 919 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 905 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 919 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 919 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 919 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 776 |)); + A.to_value (M.of_value (| Value.UnicodeChar 768 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 776 |)); + A.to_value (M.of_value (| Value.UnicodeChar 769 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 776 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.UnicodeChar 776 |)); + A.to_value (M.of_value (| Value.UnicodeChar 768 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.UnicodeChar 776 |)); + A.to_value (M.of_value (| Value.UnicodeChar 769 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 929 |)); + A.to_value (M.of_value (| Value.UnicodeChar 787 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 933 |)); + A.to_value (M.of_value (| Value.UnicodeChar 776 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 8186 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 937 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 911 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 937 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 937 |)); + A.to_value (M.of_value (| Value.UnicodeChar 834 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 937 |)); + A.to_value (M.of_value (| Value.UnicodeChar 921 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 70 |)); + A.to_value (M.of_value (| Value.UnicodeChar 70 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 70 |)); + A.to_value (M.of_value (| Value.UnicodeChar 73 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 70 |)); + A.to_value (M.of_value (| Value.UnicodeChar 76 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 70 |)); + A.to_value (M.of_value (| Value.UnicodeChar 70 |)); + A.to_value (M.of_value (| Value.UnicodeChar 73 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 70 |)); + A.to_value (M.of_value (| Value.UnicodeChar 70 |)); + A.to_value (M.of_value (| Value.UnicodeChar 76 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 83 |)); + A.to_value (M.of_value (| Value.UnicodeChar 84 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 83 |)); + A.to_value (M.of_value (| Value.UnicodeChar 84 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 1348 |)); + A.to_value (M.of_value (| Value.UnicodeChar 1350 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 1348 |)); + A.to_value (M.of_value (| Value.UnicodeChar 1333 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 1348 |)); + A.to_value (M.of_value (| Value.UnicodeChar 1339 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 1358 |)); + A.to_value (M.of_value (| Value.UnicodeChar 1350 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 1348 |)); + A.to_value (M.of_value (| Value.UnicodeChar 1341 |)); + A.to_value (M.of_value (| Value.UnicodeChar 0 |)) + ] + |)) + ] + |) + |) + |) |) |))). End conversions. diff --git a/CoqOfRust/core/unit.v b/CoqOfRust/core/unit.v index aaf61c500..40c62784f 100644 --- a/CoqOfRust/core/unit.v +++ b/CoqOfRust/core/unit.v @@ -10,7 +10,7 @@ Module unit_. iter.into_iter().for_each(|()| {}) } *) - Definition from_iter (τ : list Ty.t) (α : list Value.t) : M := + Definition from_iter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ _ as I ], [ iter ] => ltac:(M.monadic @@ -34,17 +34,18 @@ Module unit_. |), [ M.read (| iter |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => M.match_operator (| M.alloc (| α0 |), - [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/axiomatized/examples/custom/add_one.v b/CoqOfRust/examples/axiomatized/examples/custom/add_one.v index 986d5675c..1196453a5 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/add_one.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/add_one.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter add_one : (list Ty.t) -> (list Value.t) -> M. +Parameter add_one : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/custom/constructor_as_function.v b/CoqOfRust/examples/axiomatized/examples/custom/constructor_as_function.v index 2120daa08..5f7fcf7ed 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/constructor_as_function.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/constructor_as_function.v @@ -1,7 +1,7 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter matching : (list Ty.t) -> (list Value.t) -> M. +Parameter matching : (list Ty.t) -> (list A.t) -> M. (* StructTuple { @@ -13,7 +13,7 @@ Parameter matching : (list Ty.t) -> (list Value.t) -> M. Module Impl_core_fmt_Debug_for_constructor_as_function_Constructor. Definition Self : Ty.t := Ty.path "constructor_as_function::Constructor". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -23,4 +23,4 @@ Module Impl_core_fmt_Debug_for_constructor_as_function_Constructor. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_constructor_as_function_Constructor. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/custom/hello_world.v b/CoqOfRust/examples/axiomatized/examples/custom/hello_world.v index 15a7f815c..a1e9d23c1 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/hello_world.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/hello_world.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter message : Value.t. +Parameter message : A.t. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/custom/if_let.v b/CoqOfRust/examples/axiomatized/examples/custom/if_let.v index a22c93b58..2915c77e0 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/if_let.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/if_let.v @@ -1,7 +1,7 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter order : (list Ty.t) -> (list Value.t) -> M. +Parameter order : (list Ty.t) -> (list A.t) -> M. (* Enum Container @@ -28,6 +28,6 @@ Enum Container } *) -Parameter extract_value : (list Ty.t) -> (list Value.t) -> M. +Parameter extract_value : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/custom/impl_param.v b/CoqOfRust/examples/axiomatized/examples/custom/impl_param.v index a7fa611ee..7c577dc5e 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/impl_param.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/impl_param.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter with_impls : (list Ty.t) -> (list Value.t) -> M. +Parameter with_impls : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/custom/module_duplicate.v b/CoqOfRust/examples/axiomatized/examples/custom/module_duplicate.v index 9bc0b2494..785071b01 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/module_duplicate.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/module_duplicate.v @@ -3,10 +3,10 @@ Require Import CoqOfRust.CoqOfRust. Module foo. Module gre. - Parameter f_foo_gre : (list Ty.t) -> (list Value.t) -> M. + Parameter f_foo_gre : (list Ty.t) -> (list A.t) -> M. End gre. - Parameter f_foo : (list Ty.t) -> (list Value.t) -> M. + Parameter f_foo : (list Ty.t) -> (list A.t) -> M. End foo. -Parameter f : (list Ty.t) -> (list Value.t) -> M. +Parameter f : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/custom/mutual_loop.v b/CoqOfRust/examples/axiomatized/examples/custom/mutual_loop.v index 70eb1dc21..a8c6e48d1 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/mutual_loop.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/mutual_loop.v @@ -11,11 +11,11 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_mutual_loop_LoopA. Definition Self : Ty.t := Ty.path "mutual_loop::LoopA". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter start_loop : (list Ty.t) -> (list Value.t) -> M. + Parameter start_loop : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_start_loop : M.IsAssociatedFunction Self "start_loop" start_loop. End Impl_mutual_loop_LoopA. @@ -38,9 +38,9 @@ Enum LoopB Module Impl_mutual_loop_LoopB. Definition Self : Ty.t := Ty.path "mutual_loop::LoopB". - Parameter start_loop : (list Ty.t) -> (list Value.t) -> M. + Parameter start_loop : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_start_loop : M.IsAssociatedFunction Self "start_loop" start_loop. End Impl_mutual_loop_LoopB. -Parameter start_loop : (list Ty.t) -> (list Value.t) -> M. +Parameter start_loop : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/custom/pattern_in_function_parameters.v b/CoqOfRust/examples/axiomatized/examples/custom/pattern_in_function_parameters.v index 7fdc7ae38..369de4fe3 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/pattern_in_function_parameters.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/pattern_in_function_parameters.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter sum : (list Ty.t) -> (list Value.t) -> M. +Parameter sum : (list Ty.t) -> (list A.t) -> M. -Parameter steps_between : (list Ty.t) -> (list Value.t) -> M. +Parameter steps_between : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/custom/polymorphic_associated_function.v b/CoqOfRust/examples/axiomatized/examples/custom/polymorphic_associated_function.v index 62b3f0f0c..3b263d6de 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/polymorphic_associated_function.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/polymorphic_associated_function.v @@ -12,11 +12,11 @@ Module Impl_polymorphic_associated_function_Foo_A. Definition Self (A : Ty.t) : Ty.t := Ty.apply (Ty.path "polymorphic_associated_function::Foo") [ A ]. - Parameter convert : forall (A : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter convert : forall (A : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_convert : forall (A : Ty.t), M.IsAssociatedFunction (Self A) "convert" (convert A). End Impl_polymorphic_associated_function_Foo_A. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/custom/provided_method.v b/CoqOfRust/examples/axiomatized/examples/custom/provided_method.v index 3113a0148..6db0180e8 100644 --- a/CoqOfRust/examples/axiomatized/examples/custom/provided_method.v +++ b/CoqOfRust/examples/axiomatized/examples/custom/provided_method.v @@ -3,7 +3,7 @@ Require Import CoqOfRust.CoqOfRust. (* Trait *) Module ProvidedAndRequired. - Parameter provided : (list Ty.t) -> (list Value.t) -> M. + Parameter provided : (list Ty.t) -> (list A.t) -> M. Axiom ProvidedMethod_provided : M.IsProvidedMethod "provided_method::ProvidedAndRequired" "provided" provided. @@ -12,7 +12,7 @@ End ProvidedAndRequired. Module Impl_provided_method_ProvidedAndRequired_for_i32. Definition Self : Ty.t := Ty.path "i32". - Parameter required : (list Ty.t) -> (list Value.t) -> M. + Parameter required : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -25,9 +25,9 @@ End Impl_provided_method_ProvidedAndRequired_for_i32. Module Impl_provided_method_ProvidedAndRequired_for_u32. Definition Self : Ty.t := Ty.path "u32". - Parameter required : (list Ty.t) -> (list Value.t) -> M. + Parameter required : (list Ty.t) -> (list A.t) -> M. - Parameter provided : (list Ty.t) -> (list Value.t) -> M. + Parameter provided : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -38,4 +38,4 @@ Module Impl_provided_method_ProvidedAndRequired_for_u32. [ ("required", InstanceField.Method required); ("provided", InstanceField.Method provided) ]. End Impl_provided_method_ProvidedAndRequired_for_u32. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/basic_contract_caller.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/basic_contract_caller.v index b5d950909..c187cec8a 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/basic_contract_caller.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/basic_contract_caller.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_basic_contract_caller_AccountId. Definition Self : Ty.t := Ty.path "basic_contract_caller::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_basic_contract_caller_AccountId. Module Impl_core_clone_Clone_for_basic_contract_caller_AccountId. Definition Self : Ty.t := Ty.path "basic_contract_caller::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -62,15 +62,15 @@ Enum Error Module Impl_basic_contract_caller_OtherContract. Definition Self : Ty.t := Ty.path "basic_contract_caller::OtherContract". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter flip : (list Ty.t) -> (list Value.t) -> M. + Parameter flip : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_flip : M.IsAssociatedFunction Self "flip" flip. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. End Impl_basic_contract_caller_OtherContract. @@ -85,11 +85,11 @@ End Impl_basic_contract_caller_OtherContract. Module Impl_basic_contract_caller_BasicContractCaller. Definition Self : Ty.t := Ty.path "basic_contract_caller::BasicContractCaller". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter flip_and_get : (list Ty.t) -> (list Value.t) -> M. + Parameter flip_and_get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_flip_and_get : M.IsAssociatedFunction Self "flip_and_get" flip_and_get. End Impl_basic_contract_caller_BasicContractCaller. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/call_runtime.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/call_runtime.v index d5dd62699..bb0fe319d 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/call_runtime.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/call_runtime.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_call_runtime_AccountId. Definition Self : Ty.t := Ty.path "call_runtime::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_call_runtime_AccountId. Module Impl_core_clone_Clone_for_call_runtime_AccountId. Definition Self : Ty.t := Ty.path "call_runtime::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -64,7 +64,7 @@ Module Impl_core_convert_From_call_runtime_AccountId_for_call_runtime_MultiAddre (Ty.path "call_runtime::MultiAddress") [ Ty.path "call_runtime::AccountId"; Ty.tuple [] ]. - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -122,7 +122,7 @@ Enum RuntimeCall Module Impl_core_default_Default_for_call_runtime_RuntimeCaller. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeCaller". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -150,7 +150,7 @@ Enum RuntimeError Module Impl_core_fmt_Debug_for_call_runtime_RuntimeError. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -174,7 +174,7 @@ End Impl_core_marker_StructuralPartialEq_for_call_runtime_RuntimeError. Module Impl_core_cmp_PartialEq_for_call_runtime_RuntimeError. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeError". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -198,7 +198,7 @@ End Impl_core_marker_StructuralEq_for_call_runtime_RuntimeError. Module Impl_core_cmp_Eq_for_call_runtime_RuntimeError. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeError". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -232,7 +232,7 @@ Enum EnvError Module Impl_core_convert_From_call_runtime_EnvError_for_call_runtime_RuntimeError. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeError". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -245,7 +245,7 @@ End Impl_core_convert_From_call_runtime_EnvError_for_call_runtime_RuntimeError. Module Impl_call_runtime_Env. Definition Self : Ty.t := Ty.path "call_runtime::Env". - Parameter call_runtime : (list Ty.t) -> (list Value.t) -> M. + Parameter call_runtime : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_call_runtime : M.IsAssociatedFunction Self "call_runtime" call_runtime. End Impl_call_runtime_Env. @@ -253,24 +253,24 @@ End Impl_call_runtime_Env. Module Impl_call_runtime_RuntimeCaller. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeCaller". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter transfer_through_runtime : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer_through_runtime : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer_through_runtime : M.IsAssociatedFunction Self "transfer_through_runtime" transfer_through_runtime. - Parameter call_nonexistent_extrinsic : (list Ty.t) -> (list Value.t) -> M. + Parameter call_nonexistent_extrinsic : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_call_nonexistent_extrinsic : M.IsAssociatedFunction Self "call_nonexistent_extrinsic" call_nonexistent_extrinsic. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/conditional_compilation.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/conditional_compilation.v index 320e0abf8..94944eb47 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/conditional_compilation.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/conditional_compilation.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_conditional_compilation_AccountId. Definition Self : Ty.t := Ty.path "conditional_compilation::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_conditional_compilation_AccountId. Module Impl_core_clone_Clone_for_conditional_compilation_AccountId. Definition Self : Ty.t := Ty.path "conditional_compilation::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -98,15 +98,15 @@ Enum Event Module Impl_conditional_compilation_Env. Definition Self : Ty.t := Ty.path "conditional_compilation::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. - Parameter block_number : (list Ty.t) -> (list Value.t) -> M. + Parameter block_number : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_block_number : M.IsAssociatedFunction Self "block_number" block_number. End Impl_conditional_compilation_Env. @@ -121,36 +121,36 @@ End Impl_conditional_compilation_Env. Module Impl_conditional_compilation_ConditionalCompilation. Definition Self : Ty.t := Ty.path "conditional_compilation::ConditionalCompilation". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter new_foo : (list Ty.t) -> (list Value.t) -> M. + Parameter new_foo : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new_foo : M.IsAssociatedFunction Self "new_foo" new_foo. - Parameter new_bar : (list Ty.t) -> (list Value.t) -> M. + Parameter new_bar : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new_bar : M.IsAssociatedFunction Self "new_bar" new_bar. - Parameter new_foo_bar : (list Ty.t) -> (list Value.t) -> M. + Parameter new_foo_bar : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new_foo_bar : M.IsAssociatedFunction Self "new_foo_bar" new_foo_bar. - Parameter inherent_flip_foo : (list Ty.t) -> (list Value.t) -> M. + Parameter inherent_flip_foo : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_inherent_flip_foo : M.IsAssociatedFunction Self "inherent_flip_foo" inherent_flip_foo. - Parameter inherent_flip_bar : (list Ty.t) -> (list Value.t) -> M. + Parameter inherent_flip_bar : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_inherent_flip_bar : M.IsAssociatedFunction Self "inherent_flip_bar" inherent_flip_bar. @@ -159,11 +159,11 @@ End Impl_conditional_compilation_ConditionalCompilation. Module Impl_conditional_compilation_Flip_for_conditional_compilation_ConditionalCompilation. Definition Self : Ty.t := Ty.path "conditional_compilation::ConditionalCompilation". - Parameter flip : (list Ty.t) -> (list Value.t) -> M. + Parameter flip : (list Ty.t) -> (list A.t) -> M. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. - Parameter push_foo : (list Ty.t) -> (list Value.t) -> M. + Parameter push_foo : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_terminate.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_terminate.v index 9665cef03..696ab448b 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_terminate.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_terminate.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_contract_terminate_AccountId. Definition Self : Ty.t := Ty.path "contract_terminate::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_contract_terminate_AccountId. Module Impl_core_clone_Clone_for_contract_terminate_AccountId. Definition Self : Ty.t := Ty.path "contract_terminate::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -51,11 +51,11 @@ End Impl_core_marker_Copy_for_contract_terminate_AccountId. Module Impl_contract_terminate_Env. Definition Self : Ty.t := Ty.path "contract_terminate::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter terminate_contract : (list Ty.t) -> (list Value.t) -> M. + Parameter terminate_contract : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_terminate_contract : M.IsAssociatedFunction Self "terminate_contract" terminate_contract. @@ -71,19 +71,19 @@ End Impl_contract_terminate_Env. Module Impl_contract_terminate_JustTerminate. Definition Self : Ty.t := Ty.path "contract_terminate::JustTerminate". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter terminate_me : (list Ty.t) -> (list Value.t) -> M. + Parameter terminate_me : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_terminate_me : M.IsAssociatedFunction Self "terminate_me" terminate_me. End Impl_contract_terminate_JustTerminate. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_transfer.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_transfer.v index ebe681bb9..c2e6fac15 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_transfer.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_transfer.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_contract_transfer_AccountId. Definition Self : Ty.t := Ty.path "contract_transfer::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_contract_transfer_AccountId. Module Impl_core_clone_Clone_for_contract_transfer_AccountId. Definition Self : Ty.t := Ty.path "contract_transfer::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -53,19 +53,19 @@ Axiom Balance : (Ty.path "contract_transfer::Balance") = (Ty.path "u128"). Module Impl_contract_transfer_Env. Definition Self : Ty.t := Ty.path "contract_transfer::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter balance : (list Ty.t) -> (list Value.t) -> M. + Parameter balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_balance : M.IsAssociatedFunction Self "balance" balance. - Parameter transfer : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer. - Parameter transferred_value : (list Ty.t) -> (list Value.t) -> M. + Parameter transferred_value : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transferred_value : M.IsAssociatedFunction Self "transferred_value" transferred_value. @@ -81,23 +81,23 @@ End Impl_contract_transfer_Env. Module Impl_contract_transfer_GiveMe. Definition Self : Ty.t := Ty.path "contract_transfer::GiveMe". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter give_me : (list Ty.t) -> (list Value.t) -> M. + Parameter give_me : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_give_me : M.IsAssociatedFunction Self "give_me" give_me. - Parameter was_it_ten : (list Ty.t) -> (list Value.t) -> M. + Parameter was_it_ten : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_was_it_ten : M.IsAssociatedFunction Self "was_it_ten" was_it_ten. End Impl_contract_transfer_GiveMe. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_allocator.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_allocator.v index a3556d5c5..b016e4a8d 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_allocator.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_allocator.v @@ -15,19 +15,19 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_custom_allocator_CustomAllocator. Definition Self : Ty.t := Ty.path "custom_allocator::CustomAllocator". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_default : M.IsAssociatedFunction Self "default" default. - Parameter flip : (list Ty.t) -> (list Value.t) -> M. + Parameter flip : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_flip : M.IsAssociatedFunction Self "flip" flip. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. End Impl_custom_allocator_CustomAllocator. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_environment.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_environment.v index 7ab5cf2a8..58701835b 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_environment.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_environment.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_custom_environment_AccountId. Definition Self : Ty.t := Ty.path "custom_environment::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_custom_environment_AccountId. Module Impl_core_clone_Clone_for_custom_environment_AccountId. Definition Self : Ty.t := Ty.path "custom_environment::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -60,7 +60,7 @@ Axiom Balance : (Ty.path "custom_environment::Balance") = (Ty.path "u128"). Module Impl_core_default_Default_for_custom_environment_Topics. Definition Self : Ty.t := Ty.path "custom_environment::Topics". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -87,7 +87,7 @@ End Impl_core_default_Default_for_custom_environment_Topics. Module Impl_core_default_Default_for_custom_environment_EventWithTopics. Definition Self : Ty.t := Ty.path "custom_environment::EventWithTopics". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -115,11 +115,11 @@ Enum Event Module Impl_custom_environment_Env. Definition Self : Ty.t := Ty.path "custom_environment::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_custom_environment_Env. @@ -127,19 +127,19 @@ End Impl_custom_environment_Env. Module Impl_custom_environment_Topics. Definition Self : Ty.t := Ty.path "custom_environment::Topics". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter trigger : (list Ty.t) -> (list Value.t) -> M. + Parameter trigger : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_trigger : M.IsAssociatedFunction Self "trigger" trigger. End Impl_custom_environment_Topics. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/dns.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/dns.v index 311284135..7208d761b 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/dns.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/dns.v @@ -15,7 +15,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_where_core_default_Default_K_where_core_default_Default_V_for_dns_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "dns::Mapping") [ K; V ]. - Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (K V : Ty.t), @@ -29,43 +29,43 @@ End Impl_core_default_Default_where_core_default_Default_K_where_core_default_De Module Impl_dns_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "dns::Mapping") [ K; V ]. - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_contains : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "contains" (contains K V). - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "get" (get K V). - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_insert : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "insert" (insert K V). - Parameter new : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter new : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "new" (new K V). - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_remove : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "remove" (remove K V). - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_size : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "size" (size K V). - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -82,7 +82,7 @@ End Impl_dns_Mapping_K_V. Module Impl_core_default_Default_for_dns_AccountId. Definition Self : Ty.t := Ty.path "dns::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -95,7 +95,7 @@ End Impl_core_default_Default_for_dns_AccountId. Module Impl_core_clone_Clone_for_dns_AccountId. Definition Self : Ty.t := Ty.path "dns::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -126,7 +126,7 @@ End Impl_core_marker_StructuralPartialEq_for_dns_AccountId. Module Impl_core_cmp_PartialEq_for_dns_AccountId. Definition Self : Ty.t := Ty.path "dns::AccountId". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -139,7 +139,7 @@ End Impl_core_cmp_PartialEq_for_dns_AccountId. Module Impl_core_convert_From_array_u8_for_dns_AccountId. Definition Self : Ty.t := Ty.path "dns::AccountId". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -222,11 +222,11 @@ Enum Event Module Impl_dns_Env. Definition Self : Ty.t := Ty.path "dns::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_dns_Env. @@ -249,12 +249,12 @@ End Impl_dns_Env. ]; } *) -Parameter zero_address : (list Ty.t) -> (list Value.t) -> M. +Parameter zero_address : (list Ty.t) -> (list A.t) -> M. Module Impl_core_default_Default_for_dns_DomainNameService. Definition Self : Ty.t := Ty.path "dns::DomainNameService". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -298,7 +298,7 @@ End Impl_core_marker_StructuralPartialEq_for_dns_Error. Module Impl_core_cmp_PartialEq_for_dns_Error. Definition Self : Ty.t := Ty.path "dns::Error". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -322,7 +322,7 @@ End Impl_core_marker_StructuralEq_for_dns_Error. Module Impl_core_cmp_Eq_for_dns_Error. Definition Self : Ty.t := Ty.path "dns::Error". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -341,45 +341,45 @@ Axiom Result : Module Impl_dns_DomainNameService. Definition Self : Ty.t := Ty.path "dns::DomainNameService". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter register : (list Ty.t) -> (list Value.t) -> M. + Parameter register : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_register : M.IsAssociatedFunction Self "register" register. - Parameter get_owner_or_default : (list Ty.t) -> (list Value.t) -> M. + Parameter get_owner_or_default : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_owner_or_default : M.IsAssociatedFunction Self "get_owner_or_default" get_owner_or_default. - Parameter set_address : (list Ty.t) -> (list Value.t) -> M. + Parameter set_address : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_set_address : M.IsAssociatedFunction Self "set_address" set_address. - Parameter transfer : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer. - Parameter get_address_or_default : (list Ty.t) -> (list Value.t) -> M. + Parameter get_address_or_default : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_address_or_default : M.IsAssociatedFunction Self "get_address_or_default" get_address_or_default. - Parameter get_address : (list Ty.t) -> (list Value.t) -> M. + Parameter get_address : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_address : M.IsAssociatedFunction Self "get_address" get_address. - Parameter get_owner : (list Ty.t) -> (list Value.t) -> M. + Parameter get_owner : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_owner : M.IsAssociatedFunction Self "get_owner" get_owner. End Impl_dns_DomainNameService. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/e2e_call_runtime.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/e2e_call_runtime.v index e410b0226..725635799 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/e2e_call_runtime.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/e2e_call_runtime.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_e2e_call_runtime_AccountId. Definition Self : Ty.t := Ty.path "e2e_call_runtime::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_e2e_call_runtime_AccountId. Module Impl_core_clone_Clone_for_e2e_call_runtime_AccountId. Definition Self : Ty.t := Ty.path "e2e_call_runtime::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -53,7 +53,7 @@ Axiom Balance : (Ty.path "e2e_call_runtime::Balance") = (Ty.path "u128"). Module Impl_e2e_call_runtime_Env. Definition Self : Ty.t := Ty.path "e2e_call_runtime::Env". - Parameter balance : (list Ty.t) -> (list Value.t) -> M. + Parameter balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_balance : M.IsAssociatedFunction Self "balance" balance. End Impl_e2e_call_runtime_Env. @@ -68,7 +68,7 @@ End Impl_e2e_call_runtime_Env. Module Impl_core_default_Default_for_e2e_call_runtime_Contract. Definition Self : Ty.t := Ty.path "e2e_call_runtime::Contract". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -81,19 +81,19 @@ End Impl_core_default_Default_for_e2e_call_runtime_Contract. Module Impl_e2e_call_runtime_Contract. Definition Self : Ty.t := Ty.path "e2e_call_runtime::Contract". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter get_contract_balance : (list Ty.t) -> (list Value.t) -> M. + Parameter get_contract_balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_contract_balance : M.IsAssociatedFunction Self "get_contract_balance" get_contract_balance. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc1155.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc1155.v index 2e198bb7d..73d6c8b1e 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc1155.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc1155.v @@ -15,7 +15,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_where_core_default_Default_K_where_core_default_Default_V_for_erc1155_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc1155::Mapping") [ K; V ]. - Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (K V : Ty.t), @@ -29,37 +29,37 @@ End Impl_core_default_Default_where_core_default_Default_K_where_core_default_De Module Impl_erc1155_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc1155::Mapping") [ K; V ]. - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_contains : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "contains" (contains K V). - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "get" (get K V). - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_insert : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "insert" (insert K V). - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_remove : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "remove" (remove K V). - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_size : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "size" (size K V). - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -76,7 +76,7 @@ End Impl_erc1155_Mapping_K_V. Module Impl_core_default_Default_for_erc1155_AccountId. Definition Self : Ty.t := Ty.path "erc1155::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -89,7 +89,7 @@ End Impl_core_default_Default_for_erc1155_AccountId. Module Impl_core_clone_Clone_for_erc1155_AccountId. Definition Self : Ty.t := Ty.path "erc1155::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -120,7 +120,7 @@ End Impl_core_marker_StructuralPartialEq_for_erc1155_AccountId. Module Impl_core_cmp_PartialEq_for_erc1155_AccountId. Definition Self : Ty.t := Ty.path "erc1155::AccountId". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -133,7 +133,7 @@ End Impl_core_cmp_PartialEq_for_erc1155_AccountId. Module Impl_core_convert_From_array_u8_for_erc1155_AccountId. Definition Self : Ty.t := Ty.path "erc1155::AccountId". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -152,11 +152,11 @@ Axiom Balance : (Ty.path "erc1155::Balance") = (Ty.path "u128"). fields := [ ("caller", Ty.path "erc1155::AccountId") ]; } *) -Parameter zero_address : (list Ty.t) -> (list Value.t) -> M. +Parameter zero_address : (list Ty.t) -> (list A.t) -> M. -Parameter value_ON_ERC_1155_RECEIVED_SELECTOR : Value.t. +Parameter value_ON_ERC_1155_RECEIVED_SELECTOR : A.t. -Parameter _ON_ERC_1155_BATCH_RECEIVED_SELECTOR : Value.t. +Parameter _ON_ERC_1155_BATCH_RECEIVED_SELECTOR : A.t. Axiom TokenId : (Ty.path "erc1155::TokenId") = (Ty.path "u128"). @@ -214,7 +214,7 @@ End Impl_core_marker_StructuralPartialEq_for_erc1155_Error. Module Impl_core_cmp_PartialEq_for_erc1155_Error. Definition Self : Ty.t := Ty.path "erc1155::Error". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -238,7 +238,7 @@ End Impl_core_marker_StructuralEq_for_erc1155_Error. Module Impl_core_cmp_Eq_for_erc1155_Error. Definition Self : Ty.t := Ty.path "erc1155::Error". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -325,11 +325,11 @@ Enum Event Module Impl_erc1155_Env. Definition Self : Ty.t := Ty.path "erc1155::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_erc1155_Env. @@ -356,7 +356,7 @@ End Impl_erc1155_Env. Module Impl_core_default_Default_for_erc1155_Contract. Definition Self : Ty.t := Ty.path "erc1155::Contract". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -369,32 +369,32 @@ End Impl_core_default_Default_for_erc1155_Contract. Module Impl_erc1155_Contract. Definition Self : Ty.t := Ty.path "erc1155::Contract". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter create : (list Ty.t) -> (list Value.t) -> M. + Parameter create : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_create : M.IsAssociatedFunction Self "create" create. - Parameter mint : (list Ty.t) -> (list Value.t) -> M. + Parameter mint : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_mint : M.IsAssociatedFunction Self "mint" mint. - Parameter perform_transfer : (list Ty.t) -> (list Value.t) -> M. + Parameter perform_transfer : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_perform_transfer : M.IsAssociatedFunction Self "perform_transfer" perform_transfer. - Parameter transfer_acceptance_check : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer_acceptance_check : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer_acceptance_check : M.IsAssociatedFunction Self "transfer_acceptance_check" transfer_acceptance_check. @@ -403,17 +403,17 @@ End Impl_erc1155_Contract. Module Impl_erc1155_Erc1155_for_erc1155_Contract. Definition Self : Ty.t := Ty.path "erc1155::Contract". - Parameter is_approved_for_all : (list Ty.t) -> (list Value.t) -> M. + Parameter is_approved_for_all : (list Ty.t) -> (list A.t) -> M. - Parameter balance_of : (list Ty.t) -> (list Value.t) -> M. + Parameter balance_of : (list Ty.t) -> (list A.t) -> M. - Parameter safe_transfer_from : (list Ty.t) -> (list Value.t) -> M. + Parameter safe_transfer_from : (list Ty.t) -> (list A.t) -> M. - Parameter safe_batch_transfer_from : (list Ty.t) -> (list Value.t) -> M. + Parameter safe_batch_transfer_from : (list Ty.t) -> (list A.t) -> M. - Parameter balance_of_batch : (list Ty.t) -> (list Value.t) -> M. + Parameter balance_of_batch : (list Ty.t) -> (list A.t) -> M. - Parameter set_approval_for_all : (list Ty.t) -> (list Value.t) -> M. + Parameter set_approval_for_all : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -434,9 +434,9 @@ End Impl_erc1155_Erc1155_for_erc1155_Contract. Module Impl_erc1155_Erc1155TokenReceiver_for_erc1155_Contract. Definition Self : Ty.t := Ty.path "erc1155::Contract". - Parameter on_received : (list Ty.t) -> (list Value.t) -> M. + Parameter on_received : (list Ty.t) -> (list A.t) -> M. - Parameter on_batch_received : (list Ty.t) -> (list Value.t) -> M. + Parameter on_batch_received : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc20.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc20.v index 144fc78ef..94868ea29 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc20.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc20.v @@ -15,7 +15,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_where_core_default_Default_K_where_core_default_Default_V_for_erc20_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc20::Mapping") [ K; V ]. - Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (K V : Ty.t), @@ -29,13 +29,13 @@ End Impl_core_default_Default_where_core_default_Default_K_where_core_default_De Module Impl_erc20_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc20::Mapping") [ K; V ]. - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "get" (get K V). - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -52,7 +52,7 @@ End Impl_erc20_Mapping_K_V. Module Impl_core_default_Default_for_erc20_AccountId. Definition Self : Ty.t := Ty.path "erc20::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -65,7 +65,7 @@ End Impl_core_default_Default_for_erc20_AccountId. Module Impl_core_clone_Clone_for_erc20_AccountId. Definition Self : Ty.t := Ty.path "erc20::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -110,7 +110,7 @@ Axiom Balance : (Ty.path "erc20::Balance") = (Ty.path "u128"). Module Impl_core_default_Default_for_erc20_Erc20. Definition Self : Ty.t := Ty.path "erc20::Erc20". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -192,11 +192,11 @@ Axiom Result : Module Impl_erc20_Env. Definition Self : Ty.t := Ty.path "erc20::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_erc20_Env. @@ -204,53 +204,53 @@ End Impl_erc20_Env. Module Impl_erc20_Erc20. Definition Self : Ty.t := Ty.path "erc20::Erc20". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter total_supply : (list Ty.t) -> (list Value.t) -> M. + Parameter total_supply : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_total_supply : M.IsAssociatedFunction Self "total_supply" total_supply. - Parameter balance_of_impl : (list Ty.t) -> (list Value.t) -> M. + Parameter balance_of_impl : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_balance_of_impl : M.IsAssociatedFunction Self "balance_of_impl" balance_of_impl. - Parameter balance_of : (list Ty.t) -> (list Value.t) -> M. + Parameter balance_of : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_balance_of : M.IsAssociatedFunction Self "balance_of" balance_of. - Parameter allowance_impl : (list Ty.t) -> (list Value.t) -> M. + Parameter allowance_impl : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_allowance_impl : M.IsAssociatedFunction Self "allowance_impl" allowance_impl. - Parameter allowance : (list Ty.t) -> (list Value.t) -> M. + Parameter allowance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_allowance : M.IsAssociatedFunction Self "allowance" allowance. - Parameter transfer_from_to : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer_from_to : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer_from_to : M.IsAssociatedFunction Self "transfer_from_to" transfer_from_to. - Parameter transfer : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer. - Parameter approve : (list Ty.t) -> (list Value.t) -> M. + Parameter approve : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_approve : M.IsAssociatedFunction Self "approve" approve. - Parameter transfer_from : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer_from : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer_from : M.IsAssociatedFunction Self "transfer_from" transfer_from. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc721.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc721.v index 2425a2ad4..75cadc36d 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc721.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/erc721.v @@ -15,7 +15,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_where_core_default_Default_K_where_core_default_Default_V_for_erc721_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc721::Mapping") [ K; V ]. - Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (K V : Ty.t), @@ -29,37 +29,37 @@ End Impl_core_default_Default_where_core_default_Default_K_where_core_default_De Module Impl_erc721_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc721::Mapping") [ K; V ]. - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_contains : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "contains" (contains K V). - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "get" (get K V). - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_insert : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "insert" (insert K V). - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_remove : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "remove" (remove K V). - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_size : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "size" (size K V). - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -76,7 +76,7 @@ End Impl_erc721_Mapping_K_V. Module Impl_core_default_Default_for_erc721_AccountId. Definition Self : Ty.t := Ty.path "erc721::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -89,7 +89,7 @@ End Impl_core_default_Default_for_erc721_AccountId. Module Impl_core_clone_Clone_for_erc721_AccountId. Definition Self : Ty.t := Ty.path "erc721::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -120,7 +120,7 @@ End Impl_core_marker_StructuralPartialEq_for_erc721_AccountId. Module Impl_core_cmp_PartialEq_for_erc721_AccountId. Definition Self : Ty.t := Ty.path "erc721::AccountId". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -133,7 +133,7 @@ End Impl_core_cmp_PartialEq_for_erc721_AccountId. Module Impl_core_convert_From_array_u8_for_erc721_AccountId. Definition Self : Ty.t := Ty.path "erc721::AccountId". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -176,7 +176,7 @@ Axiom TokenId : (Ty.path "erc721::TokenId") = (Ty.path "u32"). Module Impl_core_default_Default_for_erc721_Erc721. Definition Self : Ty.t := Ty.path "erc721::Erc721". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -245,7 +245,7 @@ End Impl_core_marker_StructuralPartialEq_for_erc721_Error. Module Impl_core_cmp_PartialEq_for_erc721_Error. Definition Self : Ty.t := Ty.path "erc721::Error". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -269,7 +269,7 @@ End Impl_core_marker_StructuralEq_for_erc721_Error. Module Impl_core_cmp_Eq_for_erc721_Error. Definition Self : Ty.t := Ty.path "erc721::Error". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -283,7 +283,7 @@ End Impl_core_cmp_Eq_for_erc721_Error. Module Impl_core_clone_Clone_for_erc721_Error. Definition Self : Ty.t := Ty.path "erc721::Error". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -364,11 +364,11 @@ Enum Event Module Impl_erc721_Env. Definition Self : Ty.t := Ty.path "erc721::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_erc721_Env. @@ -376,105 +376,105 @@ End Impl_erc721_Env. Module Impl_erc721_Erc721. Definition Self : Ty.t := Ty.path "erc721::Erc721". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter balance_of_or_zero : (list Ty.t) -> (list Value.t) -> M. + Parameter balance_of_or_zero : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_balance_of_or_zero : M.IsAssociatedFunction Self "balance_of_or_zero" balance_of_or_zero. - Parameter clear_approval : (list Ty.t) -> (list Value.t) -> M. + Parameter clear_approval : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_clear_approval : M.IsAssociatedFunction Self "clear_approval" clear_approval. - Parameter approved_for_all : (list Ty.t) -> (list Value.t) -> M. + Parameter approved_for_all : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_approved_for_all : M.IsAssociatedFunction Self "approved_for_all" approved_for_all. - Parameter owner_of : (list Ty.t) -> (list Value.t) -> M. + Parameter owner_of : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_owner_of : M.IsAssociatedFunction Self "owner_of" owner_of. - Parameter approved_or_owner : (list Ty.t) -> (list Value.t) -> M. + Parameter approved_or_owner : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_approved_or_owner : M.IsAssociatedFunction Self "approved_or_owner" approved_or_owner. - Parameter exists_ : (list Ty.t) -> (list Value.t) -> M. + Parameter exists_ : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_exists_ : M.IsAssociatedFunction Self "exists_" exists_. - Parameter balance_of : (list Ty.t) -> (list Value.t) -> M. + Parameter balance_of : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_balance_of : M.IsAssociatedFunction Self "balance_of" balance_of. - Parameter get_approved : (list Ty.t) -> (list Value.t) -> M. + Parameter get_approved : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_approved : M.IsAssociatedFunction Self "get_approved" get_approved. - Parameter is_approved_for_all : (list Ty.t) -> (list Value.t) -> M. + Parameter is_approved_for_all : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_is_approved_for_all : M.IsAssociatedFunction Self "is_approved_for_all" is_approved_for_all. - Parameter approve_for_all : (list Ty.t) -> (list Value.t) -> M. + Parameter approve_for_all : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_approve_for_all : M.IsAssociatedFunction Self "approve_for_all" approve_for_all. - Parameter set_approval_for_all : (list Ty.t) -> (list Value.t) -> M. + Parameter set_approval_for_all : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_set_approval_for_all : M.IsAssociatedFunction Self "set_approval_for_all" set_approval_for_all. - Parameter approve_for : (list Ty.t) -> (list Value.t) -> M. + Parameter approve_for : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_approve_for : M.IsAssociatedFunction Self "approve_for" approve_for. - Parameter approve : (list Ty.t) -> (list Value.t) -> M. + Parameter approve : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_approve : M.IsAssociatedFunction Self "approve" approve. - Parameter remove_token_from : (list Ty.t) -> (list Value.t) -> M. + Parameter remove_token_from : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_remove_token_from : M.IsAssociatedFunction Self "remove_token_from" remove_token_from. - Parameter add_token_to : (list Ty.t) -> (list Value.t) -> M. + Parameter add_token_to : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_add_token_to : M.IsAssociatedFunction Self "add_token_to" add_token_to. - Parameter transfer_token_from : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer_token_from : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer_token_from : M.IsAssociatedFunction Self "transfer_token_from" transfer_token_from. - Parameter transfer : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer. - Parameter transfer_from : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer_from : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer_from : M.IsAssociatedFunction Self "transfer_from" transfer_from. - Parameter mint : (list Ty.t) -> (list Value.t) -> M. + Parameter mint : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_mint : M.IsAssociatedFunction Self "mint" mint. - Parameter burn : (list Ty.t) -> (list Value.t) -> M. + Parameter burn : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_burn : M.IsAssociatedFunction Self "burn" burn. End Impl_erc721_Erc721. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/flipper.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/flipper.v index ad9be484a..0ec793d9c 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/flipper.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/flipper.v @@ -11,19 +11,19 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_flipper_Flipper. Definition Self : Ty.t := Ty.path "flipper::Flipper". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter new_default : (list Ty.t) -> (list Value.t) -> M. + Parameter new_default : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new_default : M.IsAssociatedFunction Self "new_default" new_default. - Parameter flip : (list Ty.t) -> (list Value.t) -> M. + Parameter flip : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_flip : M.IsAssociatedFunction Self "flip" flip. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. End Impl_flipper_Flipper. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/incrementer.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/incrementer.v index f67051ae7..11d290252 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/incrementer.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/incrementer.v @@ -11,19 +11,19 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_incrementer_Incrementer. Definition Self : Ty.t := Ty.path "incrementer::Incrementer". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter new_default : (list Ty.t) -> (list Value.t) -> M. + Parameter new_default : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new_default : M.IsAssociatedFunction Self "new_default" new_default. - Parameter inc : (list Ty.t) -> (list Value.t) -> M. + Parameter inc : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_inc : M.IsAssociatedFunction Self "inc" inc. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. End Impl_incrementer_Incrementer. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/call_builder.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/call_builder.v index 673e9ed1e..d514838de 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/call_builder.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/call_builder.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_call_builder_AccountId. Definition Self : Ty.t := Ty.path "call_builder::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_call_builder_AccountId. Module Impl_core_clone_Clone_for_call_builder_AccountId. Definition Self : Ty.t := Ty.path "call_builder::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -75,7 +75,7 @@ Enum LangError Module Impl_call_builder_Selector. Definition Self : Ty.t := Ty.path "call_builder::Selector". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. End Impl_call_builder_Selector. @@ -90,7 +90,7 @@ End Impl_call_builder_Selector. Module Impl_core_default_Default_for_call_builder_CallBuilderTest. Definition Self : Ty.t := Ty.path "call_builder::CallBuilderTest". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -103,24 +103,24 @@ End Impl_core_default_Default_for_call_builder_CallBuilderTest. Module Impl_call_builder_CallBuilderTest. Definition Self : Ty.t := Ty.path "call_builder::CallBuilderTest". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter call : (list Ty.t) -> (list Value.t) -> M. + Parameter call : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_call : M.IsAssociatedFunction Self "call" call. - Parameter invoke : (list Ty.t) -> (list Value.t) -> M. + Parameter invoke : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_invoke : M.IsAssociatedFunction Self "invoke" invoke. - Parameter call_instantiate : (list Ty.t) -> (list Value.t) -> M. + Parameter call_instantiate : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_call_instantiate : M.IsAssociatedFunction Self "call_instantiate" call_instantiate. - Parameter call_instantiate_fallible : (list Ty.t) -> (list Value.t) -> M. + Parameter call_instantiate_fallible : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_call_instantiate_fallible : M.IsAssociatedFunction Self "call_instantiate_fallible" call_instantiate_fallible. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/call_builder_delegate.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/call_builder_delegate.v index 69f472490..ebef1e8e7 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/call_builder_delegate.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/call_builder_delegate.v @@ -29,7 +29,7 @@ Enum LangError Module Impl_core_default_Default_for_call_builder_delegate_CallBuilderDelegateTest. Definition Self : Ty.t := Ty.path "call_builder_delegate::CallBuilderDelegateTest". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -42,15 +42,15 @@ End Impl_core_default_Default_for_call_builder_delegate_CallBuilderDelegateTest. Module Impl_call_builder_delegate_CallBuilderDelegateTest. Definition Self : Ty.t := Ty.path "call_builder_delegate::CallBuilderDelegateTest". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter delegate : (list Ty.t) -> (list Value.t) -> M. + Parameter delegate : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_delegate : M.IsAssociatedFunction Self "delegate" delegate. - Parameter invoke : (list Ty.t) -> (list Value.t) -> M. + Parameter invoke : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_invoke : M.IsAssociatedFunction Self "invoke" invoke. End Impl_call_builder_delegate_CallBuilderDelegateTest. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/constructors_return_value.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/constructors_return_value.v index 637329d57..dc743fcb0 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/constructors_return_value.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/constructors_return_value.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_constructors_return_value_AccountId. Definition Self : Ty.t := Ty.path "constructors_return_value::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_constructors_return_value_AccountId. Module Impl_core_clone_Clone_for_constructors_return_value_AccountId. Definition Self : Ty.t := Ty.path "constructors_return_value::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -44,7 +44,7 @@ End Impl_core_marker_Copy_for_constructors_return_value_AccountId. Module Impl_core_convert_From_array_u8_for_constructors_return_value_AccountId. Definition Self : Ty.t := Ty.path "constructors_return_value::AccountId". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -95,7 +95,7 @@ Axiom ConstructorResult : Module Impl_core_fmt_Debug_for_constructors_return_value_ConstructorError. Definition Self : Ty.t := Ty.path "constructors_return_value::ConstructorError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -115,35 +115,35 @@ End Impl_core_fmt_Debug_for_constructors_return_value_ConstructorError. Module Impl_constructors_return_value_ReturnFlags. Definition Self : Ty.t := Ty.path "constructors_return_value::ReturnFlags". - Parameter new_with_reverted : (list Ty.t) -> (list Value.t) -> M. + Parameter new_with_reverted : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new_with_reverted : M.IsAssociatedFunction Self "new_with_reverted" new_with_reverted. End Impl_constructors_return_value_ReturnFlags. -Parameter return_value : (list Ty.t) -> (list Value.t) -> M. +Parameter return_value : (list Ty.t) -> (list A.t) -> M. Module Impl_constructors_return_value_ConstructorsReturnValue. Definition Self : Ty.t := Ty.path "constructors_return_value::ConstructorsReturnValue". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter try_new : (list Ty.t) -> (list Value.t) -> M. + Parameter try_new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_try_new : M.IsAssociatedFunction Self "try_new" try_new. - Parameter revert_new : (list Ty.t) -> (list Value.t) -> M. + Parameter revert_new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_revert_new : M.IsAssociatedFunction Self "revert_new" revert_new. - Parameter try_revert_new : (list Ty.t) -> (list Value.t) -> M. + Parameter try_revert_new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_try_revert_new : M.IsAssociatedFunction Self "try_revert_new" try_revert_new. - Parameter get_value : (list Ty.t) -> (list Value.t) -> M. + Parameter get_value : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_value : M.IsAssociatedFunction Self "get_value" get_value. End Impl_constructors_return_value_ConstructorsReturnValue. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/contract_ref.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/contract_ref.v index 6b0e22145..67d9cf042 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/contract_ref.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/contract_ref.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_contract_ref_AccountId. Definition Self : Ty.t := Ty.path "contract_ref::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_contract_ref_AccountId. Module Impl_core_clone_Clone_for_contract_ref_AccountId. Definition Self : Ty.t := Ty.path "contract_ref::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -69,7 +69,7 @@ Axiom Hash : (Ty.path "contract_ref::Hash") = (Ty.apply (Ty.path "array") [ Ty.p Module Impl_core_fmt_Debug_for_contract_ref_FlipperError. Definition Self : Ty.t := Ty.path "contract_ref::FlipperError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -82,31 +82,31 @@ End Impl_core_fmt_Debug_for_contract_ref_FlipperError. Module Impl_contract_ref_FlipperRef. Definition Self : Ty.t := Ty.path "contract_ref::FlipperRef". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter new_default : (list Ty.t) -> (list Value.t) -> M. + Parameter new_default : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new_default : M.IsAssociatedFunction Self "new_default" new_default. - Parameter try_new : (list Ty.t) -> (list Value.t) -> M. + Parameter try_new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_try_new : M.IsAssociatedFunction Self "try_new" try_new. - Parameter flip : (list Ty.t) -> (list Value.t) -> M. + Parameter flip : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_flip : M.IsAssociatedFunction Self "flip" flip. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. End Impl_contract_ref_FlipperRef. @@ -121,19 +121,19 @@ End Impl_contract_ref_FlipperRef. Module Impl_contract_ref_ContractRef. Definition Self : Ty.t := Ty.path "contract_ref::ContractRef". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter try_new : (list Ty.t) -> (list Value.t) -> M. + Parameter try_new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_try_new : M.IsAssociatedFunction Self "try_new" try_new. - Parameter flip : (list Ty.t) -> (list Value.t) -> M. + Parameter flip : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_flip : M.IsAssociatedFunction Self "flip" flip. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. End Impl_contract_ref_ContractRef. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/integration_flipper.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/integration_flipper.v index 56dc5246f..b3a151584 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/integration_flipper.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/lang_err_integration_tests/integration_flipper.v @@ -18,7 +18,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_integration_flipper_FlipperError. Definition Self : Ty.t := Ty.path "integration_flipper::FlipperError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -31,27 +31,27 @@ End Impl_core_fmt_Debug_for_integration_flipper_FlipperError. Module Impl_integration_flipper_Flipper. Definition Self : Ty.t := Ty.path "integration_flipper::Flipper". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter new_default : (list Ty.t) -> (list Value.t) -> M. + Parameter new_default : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new_default : M.IsAssociatedFunction Self "new_default" new_default. - Parameter try_new : (list Ty.t) -> (list Value.t) -> M. + Parameter try_new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_try_new : M.IsAssociatedFunction Self "try_new" try_new. - Parameter flip : (list Ty.t) -> (list Value.t) -> M. + Parameter flip : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_flip : M.IsAssociatedFunction Self "flip" flip. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. - Parameter err_flip : (list Ty.t) -> (list Value.t) -> M. + Parameter err_flip : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_err_flip : M.IsAssociatedFunction Self "err_flip" err_flip. End Impl_integration_flipper_Flipper. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/mapping_integration_tests.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/mapping_integration_tests.v index 012c95204..3ff7e0d1d 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/mapping_integration_tests.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/mapping_integration_tests.v @@ -16,7 +16,7 @@ Module Impl_core_default_Default_where_core_default_Default_K_where_core_default Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "mapping_integration_tests::Mapping") [ K; V ]. - Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (K V : Ty.t), @@ -31,43 +31,43 @@ Module Impl_mapping_integration_tests_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "mapping_integration_tests::Mapping") [ K; V ]. - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_contains : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "contains" (contains K V). - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "get" (get K V). - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_insert : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "insert" (insert K V). - Parameter new : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter new : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "new" (new K V). - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_remove : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "remove" (remove K V). - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_size : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "size" (size K V). - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -84,7 +84,7 @@ End Impl_mapping_integration_tests_Mapping_K_V. Module Impl_core_default_Default_for_mapping_integration_tests_AccountId. Definition Self : Ty.t := Ty.path "mapping_integration_tests::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -97,7 +97,7 @@ End Impl_core_default_Default_for_mapping_integration_tests_AccountId. Module Impl_core_clone_Clone_for_mapping_integration_tests_AccountId. Definition Self : Ty.t := Ty.path "mapping_integration_tests::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -126,7 +126,7 @@ Axiom Balance : (Ty.path "mapping_integration_tests::Balance") = (Ty.path "u128" Module Impl_mapping_integration_tests_Env. Definition Self : Ty.t := Ty.path "mapping_integration_tests::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. End Impl_mapping_integration_tests_Env. @@ -147,7 +147,7 @@ End Impl_mapping_integration_tests_Env. Module Impl_core_default_Default_for_mapping_integration_tests_Mappings. Definition Self : Ty.t := Ty.path "mapping_integration_tests::Mappings". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -160,42 +160,42 @@ End Impl_core_default_Default_for_mapping_integration_tests_Mappings. Module Impl_mapping_integration_tests_Mappings. Definition Self : Ty.t := Ty.path "mapping_integration_tests::Mappings". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter get_balance : (list Ty.t) -> (list Value.t) -> M. + Parameter get_balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_balance : M.IsAssociatedFunction Self "get_balance" get_balance. - Parameter insert_balance : (list Ty.t) -> (list Value.t) -> M. + Parameter insert_balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_insert_balance : M.IsAssociatedFunction Self "insert_balance" insert_balance. - Parameter size_balance : (list Ty.t) -> (list Value.t) -> M. + Parameter size_balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_size_balance : M.IsAssociatedFunction Self "size_balance" size_balance. - Parameter contains_balance : (list Ty.t) -> (list Value.t) -> M. + Parameter contains_balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_contains_balance : M.IsAssociatedFunction Self "contains_balance" contains_balance. - Parameter remove_balance : (list Ty.t) -> (list Value.t) -> M. + Parameter remove_balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_remove_balance : M.IsAssociatedFunction Self "remove_balance" remove_balance. - Parameter take_balance : (list Ty.t) -> (list Value.t) -> M. + Parameter take_balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_take_balance : M.IsAssociatedFunction Self "take_balance" take_balance. End Impl_mapping_integration_tests_Mappings. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/mother.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/mother.v index d113ef885..3bbad3262 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/mother.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/mother.v @@ -15,7 +15,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_where_core_default_Default_K_where_core_default_Default_V_for_mother_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "mother::Mapping") [ K; V ]. - Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (K V : Ty.t), @@ -29,13 +29,13 @@ End Impl_core_default_Default_where_core_default_Default_K_where_core_default_De Module Impl_mother_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "mother::Mapping") [ K; V ]. - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "get" (get K V). - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -52,7 +52,7 @@ End Impl_mother_Mapping_K_V. Module Impl_core_default_Default_for_mother_AccountId. Definition Self : Ty.t := Ty.path "mother::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -65,7 +65,7 @@ End Impl_core_default_Default_for_mother_AccountId. Module Impl_core_clone_Clone_for_mother_AccountId. Definition Self : Ty.t := Ty.path "mother::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -96,7 +96,7 @@ End Impl_core_marker_StructuralPartialEq_for_mother_AccountId. Module Impl_core_cmp_PartialEq_for_mother_AccountId. Definition Self : Ty.t := Ty.path "mother::AccountId". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -120,7 +120,7 @@ End Impl_core_marker_StructuralEq_for_mother_AccountId. Module Impl_core_cmp_Eq_for_mother_AccountId. Definition Self : Ty.t := Ty.path "mother::AccountId". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -169,7 +169,7 @@ Axiom Hash : (Ty.path "mother::Hash") = (Ty.apply (Ty.path "array") [ Ty.path "u Module Impl_core_default_Default_for_mother_Bids. Definition Self : Ty.t := Ty.path "mother::Bids". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -193,7 +193,7 @@ End Impl_core_marker_StructuralPartialEq_for_mother_Bids. Module Impl_core_cmp_PartialEq_for_mother_Bids. Definition Self : Ty.t := Ty.path "mother::Bids". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -217,7 +217,7 @@ End Impl_core_marker_StructuralEq_for_mother_Bids. Module Impl_core_cmp_Eq_for_mother_Bids. Definition Self : Ty.t := Ty.path "mother::Bids". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -231,7 +231,7 @@ End Impl_core_cmp_Eq_for_mother_Bids. Module Impl_core_clone_Clone_for_mother_Bids. Definition Self : Ty.t := Ty.path "mother::Bids". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -280,7 +280,7 @@ End Impl_core_marker_StructuralPartialEq_for_mother_Outline. Module Impl_core_cmp_PartialEq_for_mother_Outline. Definition Self : Ty.t := Ty.path "mother::Outline". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -304,7 +304,7 @@ End Impl_core_marker_StructuralEq_for_mother_Outline. Module Impl_core_cmp_Eq_for_mother_Outline. Definition Self : Ty.t := Ty.path "mother::Outline". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -318,7 +318,7 @@ End Impl_core_cmp_Eq_for_mother_Outline. Module Impl_core_clone_Clone_for_mother_Outline. Definition Self : Ty.t := Ty.path "mother::Outline". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -377,7 +377,7 @@ End Impl_core_marker_StructuralPartialEq_for_mother_Status. Module Impl_core_cmp_PartialEq_for_mother_Status. Definition Self : Ty.t := Ty.path "mother::Status". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -401,7 +401,7 @@ End Impl_core_marker_StructuralEq_for_mother_Status. Module Impl_core_cmp_Eq_for_mother_Status. Definition Self : Ty.t := Ty.path "mother::Status". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -415,7 +415,7 @@ End Impl_core_cmp_Eq_for_mother_Status. Module Impl_core_clone_Clone_for_mother_Status. Definition Self : Ty.t := Ty.path "mother::Status". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -456,7 +456,7 @@ End Impl_core_marker_StructuralPartialEq_for_mother_Auction. Module Impl_core_cmp_PartialEq_for_mother_Auction. Definition Self : Ty.t := Ty.path "mother::Auction". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -480,7 +480,7 @@ End Impl_core_marker_StructuralEq_for_mother_Auction. Module Impl_core_cmp_Eq_for_mother_Auction. Definition Self : Ty.t := Ty.path "mother::Auction". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -494,7 +494,7 @@ End Impl_core_cmp_Eq_for_mother_Auction. Module Impl_core_clone_Clone_for_mother_Auction. Definition Self : Ty.t := Ty.path "mother::Auction". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -507,7 +507,7 @@ End Impl_core_clone_Clone_for_mother_Auction. Module Impl_core_default_Default_for_mother_Auction. Definition Self : Ty.t := Ty.path "mother::Auction". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -551,7 +551,7 @@ End Impl_core_marker_StructuralPartialEq_for_mother_Failure. Module Impl_core_cmp_PartialEq_for_mother_Failure. Definition Self : Ty.t := Ty.path "mother::Failure". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -575,7 +575,7 @@ End Impl_core_marker_StructuralEq_for_mother_Failure. Module Impl_core_cmp_Eq_for_mother_Failure. Definition Self : Ty.t := Ty.path "mother::Failure". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -611,11 +611,11 @@ Enum Event Module Impl_mother_Env. Definition Self : Ty.t := Ty.path "mother::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_mother_Env. @@ -635,7 +635,7 @@ End Impl_mother_Env. Module Impl_core_default_Default_for_mother_Mother. Definition Self : Ty.t := Ty.path "mother::Mother". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -648,36 +648,36 @@ End Impl_core_default_Default_for_mother_Mother. Module Impl_mother_Mother. Definition Self : Ty.t := Ty.path "mother::Mother". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter new_default : (list Ty.t) -> (list Value.t) -> M. + Parameter new_default : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new_default : M.IsAssociatedFunction Self "new_default" new_default. - Parameter failed_new : (list Ty.t) -> (list Value.t) -> M. + Parameter failed_new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_failed_new : M.IsAssociatedFunction Self "failed_new" failed_new. - Parameter echo_auction : (list Ty.t) -> (list Value.t) -> M. + Parameter echo_auction : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_echo_auction : M.IsAssociatedFunction Self "echo_auction" echo_auction. - Parameter revert_or_trap : (list Ty.t) -> (list Value.t) -> M. + Parameter revert_or_trap : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_revert_or_trap : M.IsAssociatedFunction Self "revert_or_trap" revert_or_trap. - Parameter debug_log : (list Ty.t) -> (list Value.t) -> M. + Parameter debug_log : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_debug_log : M.IsAssociatedFunction Self "debug_log" debug_log. End Impl_mother_Mother. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/multisig.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/multisig.v index 1ff8fa0a0..777091bd7 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/multisig.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/multisig.v @@ -15,7 +15,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_where_core_default_Default_K_where_core_default_Default_V_for_multisig_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "multisig::Mapping") [ K; V ]. - Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (K V : Ty.t), @@ -29,37 +29,37 @@ End Impl_core_default_Default_where_core_default_Default_K_where_core_default_De Module Impl_multisig_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "multisig::Mapping") [ K; V ]. - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_contains : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "contains" (contains K V). - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "get" (get K V). - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_insert : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "insert" (insert K V). - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_remove : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "remove" (remove K V). - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_size : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "size" (size K V). - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -76,7 +76,7 @@ End Impl_multisig_Mapping_K_V. Module Impl_core_default_Default_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -89,7 +89,7 @@ End Impl_core_default_Default_for_multisig_AccountId. Module Impl_core_fmt_Debug_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -102,7 +102,7 @@ End Impl_core_fmt_Debug_for_multisig_AccountId. Module Impl_core_clone_Clone_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -133,7 +133,7 @@ End Impl_core_marker_StructuralPartialEq_for_multisig_AccountId. Module Impl_core_cmp_PartialEq_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -157,7 +157,7 @@ End Impl_core_marker_StructuralEq_for_multisig_AccountId. Module Impl_core_cmp_Eq_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -171,7 +171,7 @@ End Impl_core_cmp_Eq_for_multisig_AccountId. Module Impl_core_cmp_PartialOrd_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". - Parameter partial_cmp : (list Ty.t) -> (list Value.t) -> M. + Parameter partial_cmp : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -184,7 +184,7 @@ End Impl_core_cmp_PartialOrd_for_multisig_AccountId. Module Impl_core_cmp_Ord_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". - Parameter cmp : (list Ty.t) -> (list Value.t) -> M. + Parameter cmp : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -203,11 +203,11 @@ Axiom Balance : (Ty.path "multisig::Balance") = (Ty.path "u128"). fields := [ ("caller", Ty.path "multisig::AccountId") ]; } *) -Parameter value_MAX_OWNERS : Value.t. +Parameter value_MAX_OWNERS : A.t. Axiom TransactionId : (Ty.path "multisig::TransactionId") = (Ty.path "u32"). -Parameter value_WRONG_TRANSACTION_ID : Value.t. +Parameter value_WRONG_TRANSACTION_ID : A.t. (* StructTuple { @@ -239,7 +239,7 @@ Enum ConfirmationStatus Module Impl_core_clone_Clone_for_multisig_ConfirmationStatus. Definition Self : Ty.t := Ty.path "multisig::ConfirmationStatus". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -275,7 +275,7 @@ End Impl_core_marker_Copy_for_multisig_ConfirmationStatus. Module Impl_core_default_Default_for_multisig_Transaction. Definition Self : Ty.t := Ty.path "multisig::Transaction". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -303,7 +303,7 @@ Enum Error Module Impl_core_clone_Clone_for_multisig_Error. Definition Self : Ty.t := Ty.path "multisig::Error". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -334,7 +334,7 @@ End Impl_core_marker_StructuralPartialEq_for_multisig_Error. Module Impl_core_cmp_PartialEq_for_multisig_Error. Definition Self : Ty.t := Ty.path "multisig::Error". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -358,7 +358,7 @@ End Impl_core_marker_StructuralEq_for_multisig_Error. Module Impl_core_cmp_Eq_for_multisig_Error. Definition Self : Ty.t := Ty.path "multisig::Error". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -384,7 +384,7 @@ End Impl_core_cmp_Eq_for_multisig_Error. Module Impl_core_default_Default_for_multisig_Transactions. Definition Self : Ty.t := Ty.path "multisig::Transactions". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -524,20 +524,20 @@ Enum Event Module Impl_multisig_Env. Definition Self : Ty.t := Ty.path "multisig::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. - Parameter transferred_value : (list Ty.t) -> (list Value.t) -> M. + Parameter transferred_value : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transferred_value : M.IsAssociatedFunction Self "transferred_value" transferred_value. - Parameter account_id : (list Ty.t) -> (list Value.t) -> M. + Parameter account_id : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_account_id : M.IsAssociatedFunction Self "account_id" account_id. End Impl_multisig_Env. @@ -572,7 +572,7 @@ End Impl_multisig_Env. Module Impl_core_default_Default_for_multisig_Multisig. Definition Self : Ty.t := Ty.path "multisig::Multisig". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -582,115 +582,115 @@ Module Impl_core_default_Default_for_multisig_Multisig. (* Instance *) [ ("default", InstanceField.Method default) ]. End Impl_core_default_Default_for_multisig_Multisig. -Parameter ensure_requirement_is_valid : (list Ty.t) -> (list Value.t) -> M. +Parameter ensure_requirement_is_valid : (list Ty.t) -> (list A.t) -> M. Module Impl_multisig_Multisig. Definition Self : Ty.t := Ty.path "multisig::Multisig". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter ensure_confirmed : (list Ty.t) -> (list Value.t) -> M. + Parameter ensure_confirmed : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_ensure_confirmed : M.IsAssociatedFunction Self "ensure_confirmed" ensure_confirmed. - Parameter ensure_transaction_exists : (list Ty.t) -> (list Value.t) -> M. + Parameter ensure_transaction_exists : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_ensure_transaction_exists : M.IsAssociatedFunction Self "ensure_transaction_exists" ensure_transaction_exists. - Parameter ensure_owner : (list Ty.t) -> (list Value.t) -> M. + Parameter ensure_owner : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_ensure_owner : M.IsAssociatedFunction Self "ensure_owner" ensure_owner. - Parameter ensure_caller_is_owner : (list Ty.t) -> (list Value.t) -> M. + Parameter ensure_caller_is_owner : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_ensure_caller_is_owner : M.IsAssociatedFunction Self "ensure_caller_is_owner" ensure_caller_is_owner. - Parameter ensure_from_wallet : (list Ty.t) -> (list Value.t) -> M. + Parameter ensure_from_wallet : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_ensure_from_wallet : M.IsAssociatedFunction Self "ensure_from_wallet" ensure_from_wallet. - Parameter ensure_no_owner : (list Ty.t) -> (list Value.t) -> M. + Parameter ensure_no_owner : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_ensure_no_owner : M.IsAssociatedFunction Self "ensure_no_owner" ensure_no_owner. - Parameter add_owner : (list Ty.t) -> (list Value.t) -> M. + Parameter add_owner : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_add_owner : M.IsAssociatedFunction Self "add_owner" add_owner. - Parameter owner_index : (list Ty.t) -> (list Value.t) -> M. + Parameter owner_index : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_owner_index : M.IsAssociatedFunction Self "owner_index" owner_index. - Parameter clean_owner_confirmations : (list Ty.t) -> (list Value.t) -> M. + Parameter clean_owner_confirmations : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_clean_owner_confirmations : M.IsAssociatedFunction Self "clean_owner_confirmations" clean_owner_confirmations. - Parameter remove_owner : (list Ty.t) -> (list Value.t) -> M. + Parameter remove_owner : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_remove_owner : M.IsAssociatedFunction Self "remove_owner" remove_owner. - Parameter replace_owner : (list Ty.t) -> (list Value.t) -> M. + Parameter replace_owner : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_replace_owner : M.IsAssociatedFunction Self "replace_owner" replace_owner. - Parameter change_requirement : (list Ty.t) -> (list Value.t) -> M. + Parameter change_requirement : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_change_requirement : M.IsAssociatedFunction Self "change_requirement" change_requirement. - Parameter confirm_by_caller : (list Ty.t) -> (list Value.t) -> M. + Parameter confirm_by_caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_confirm_by_caller : M.IsAssociatedFunction Self "confirm_by_caller" confirm_by_caller. - Parameter submit_transaction : (list Ty.t) -> (list Value.t) -> M. + Parameter submit_transaction : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_submit_transaction : M.IsAssociatedFunction Self "submit_transaction" submit_transaction. - Parameter take_transaction : (list Ty.t) -> (list Value.t) -> M. + Parameter take_transaction : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_take_transaction : M.IsAssociatedFunction Self "take_transaction" take_transaction. - Parameter cancel_transaction : (list Ty.t) -> (list Value.t) -> M. + Parameter cancel_transaction : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_cancel_transaction : M.IsAssociatedFunction Self "cancel_transaction" cancel_transaction. - Parameter confirm_transaction : (list Ty.t) -> (list Value.t) -> M. + Parameter confirm_transaction : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_confirm_transaction : M.IsAssociatedFunction Self "confirm_transaction" confirm_transaction. - Parameter revoke_confirmation : (list Ty.t) -> (list Value.t) -> M. + Parameter revoke_confirmation : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_revoke_confirmation : M.IsAssociatedFunction Self "revoke_confirmation" revoke_confirmation. - Parameter invoke_transaction : (list Ty.t) -> (list Value.t) -> M. + Parameter invoke_transaction : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_invoke_transaction : M.IsAssociatedFunction Self "invoke_transaction" invoke_transaction. - Parameter eval_transaction : (list Ty.t) -> (list Value.t) -> M. + Parameter eval_transaction : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_eval_transaction : M.IsAssociatedFunction Self "eval_transaction" eval_transaction. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/payment_channel.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/payment_channel.v index 6077c79cb..2458d4f82 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/payment_channel.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/payment_channel.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_payment_channel_AccountId. Definition Self : Ty.t := Ty.path "payment_channel::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_payment_channel_AccountId. Module Impl_core_clone_Clone_for_payment_channel_AccountId. Definition Self : Ty.t := Ty.path "payment_channel::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -55,7 +55,7 @@ End Impl_core_marker_StructuralPartialEq_for_payment_channel_AccountId. Module Impl_core_cmp_PartialEq_for_payment_channel_AccountId. Definition Self : Ty.t := Ty.path "payment_channel::AccountId". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -79,7 +79,7 @@ End Impl_core_marker_StructuralEq_for_payment_channel_AccountId. Module Impl_core_cmp_Eq_for_payment_channel_AccountId. Definition Self : Ty.t := Ty.path "payment_channel::AccountId". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -93,7 +93,7 @@ End Impl_core_cmp_Eq_for_payment_channel_AccountId. Module Impl_core_convert_From_array_u8_for_payment_channel_AccountId. Definition Self : Ty.t := Ty.path "payment_channel::AccountId". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -182,7 +182,7 @@ End Impl_core_marker_StructuralPartialEq_for_payment_channel_Error. Module Impl_core_cmp_PartialEq_for_payment_channel_Error. Definition Self : Ty.t := Ty.path "payment_channel::Error". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -206,7 +206,7 @@ End Impl_core_marker_StructuralEq_for_payment_channel_Error. Module Impl_core_cmp_Eq_for_payment_channel_Error. Definition Self : Ty.t := Ty.path "payment_channel::Error". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -247,33 +247,33 @@ Enum Event Module Impl_payment_channel_Env. Definition Self : Ty.t := Ty.path "payment_channel::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. - Parameter terminate_contract : (list Ty.t) -> (list Value.t) -> M. + Parameter terminate_contract : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_terminate_contract : M.IsAssociatedFunction Self "terminate_contract" terminate_contract. - Parameter transfer : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer. - Parameter block_timestamp : (list Ty.t) -> (list Value.t) -> M. + Parameter block_timestamp : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_block_timestamp : M.IsAssociatedFunction Self "block_timestamp" block_timestamp. - Parameter balance : (list Ty.t) -> (list Value.t) -> M. + Parameter balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_balance : M.IsAssociatedFunction Self "balance" balance. - Parameter account_id : (list Ty.t) -> (list Value.t) -> M. + Parameter account_id : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_account_id : M.IsAssociatedFunction Self "account_id" account_id. End Impl_payment_channel_Env. @@ -284,9 +284,9 @@ End Impl_payment_channel_Env. (* Trait *) (* Empty module 'CryptoHash' *) -Parameter hash_encoded : (list Ty.t) -> (list Value.t) -> M. +Parameter hash_encoded : (list Ty.t) -> (list A.t) -> M. -Parameter ecdsa_recover : (list Ty.t) -> (list Value.t) -> M. +Parameter ecdsa_recover : (list Ty.t) -> (list A.t) -> M. (* Enum Sha2x256 @@ -375,7 +375,7 @@ End Impl_payment_channel_HashOutput_for_payment_channel_Blake2x128. Module Impl_payment_channel_CryptoHash_for_payment_channel_Sha2x256. Definition Self : Ty.t := Ty.path "payment_channel::Sha2x256". - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Parameter hash : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -388,7 +388,7 @@ End Impl_payment_channel_CryptoHash_for_payment_channel_Sha2x256. Module Impl_payment_channel_CryptoHash_for_payment_channel_Keccak256. Definition Self : Ty.t := Ty.path "payment_channel::Keccak256". - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Parameter hash : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -401,7 +401,7 @@ End Impl_payment_channel_CryptoHash_for_payment_channel_Keccak256. Module Impl_payment_channel_CryptoHash_for_payment_channel_Blake2x256. Definition Self : Ty.t := Ty.path "payment_channel::Blake2x256". - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Parameter hash : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -414,7 +414,7 @@ End Impl_payment_channel_CryptoHash_for_payment_channel_Blake2x256. Module Impl_payment_channel_CryptoHash_for_payment_channel_Blake2x128. Definition Self : Ty.t := Ty.path "payment_channel::Blake2x128". - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Parameter hash : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -427,70 +427,70 @@ End Impl_payment_channel_CryptoHash_for_payment_channel_Blake2x128. Module Impl_payment_channel_PaymentChannel. Definition Self : Ty.t := Ty.path "payment_channel::PaymentChannel". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter is_signature_valid : (list Ty.t) -> (list Value.t) -> M. + Parameter is_signature_valid : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_is_signature_valid : M.IsAssociatedFunction Self "is_signature_valid" is_signature_valid. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter close_inner : (list Ty.t) -> (list Value.t) -> M. + Parameter close_inner : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_close_inner : M.IsAssociatedFunction Self "close_inner" close_inner. - Parameter close : (list Ty.t) -> (list Value.t) -> M. + Parameter close : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_close : M.IsAssociatedFunction Self "close" close. - Parameter start_sender_close : (list Ty.t) -> (list Value.t) -> M. + Parameter start_sender_close : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_start_sender_close : M.IsAssociatedFunction Self "start_sender_close" start_sender_close. - Parameter claim_timeout : (list Ty.t) -> (list Value.t) -> M. + Parameter claim_timeout : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_claim_timeout : M.IsAssociatedFunction Self "claim_timeout" claim_timeout. - Parameter withdraw : (list Ty.t) -> (list Value.t) -> M. + Parameter withdraw : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_withdraw : M.IsAssociatedFunction Self "withdraw" withdraw. - Parameter get_sender : (list Ty.t) -> (list Value.t) -> M. + Parameter get_sender : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_sender : M.IsAssociatedFunction Self "get_sender" get_sender. - Parameter get_recipient : (list Ty.t) -> (list Value.t) -> M. + Parameter get_recipient : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_recipient : M.IsAssociatedFunction Self "get_recipient" get_recipient. - Parameter get_expiration : (list Ty.t) -> (list Value.t) -> M. + Parameter get_expiration : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_expiration : M.IsAssociatedFunction Self "get_expiration" get_expiration. - Parameter get_withdrawn : (list Ty.t) -> (list Value.t) -> M. + Parameter get_withdrawn : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_withdrawn : M.IsAssociatedFunction Self "get_withdrawn" get_withdrawn. - Parameter get_close_duration : (list Ty.t) -> (list Value.t) -> M. + Parameter get_close_duration : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_close_duration : M.IsAssociatedFunction Self "get_close_duration" get_close_duration. - Parameter get_balance : (list Ty.t) -> (list Value.t) -> M. + Parameter get_balance : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_balance : M.IsAssociatedFunction Self "get_balance" get_balance. End Impl_payment_channel_PaymentChannel. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/set_code_hash.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/set_code_hash.v index 6e601253c..46768bc8f 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/set_code_hash.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/set_code_hash.v @@ -9,7 +9,7 @@ Enum Error } *) -Parameter set_code_hash : (list Ty.t) -> (list Value.t) -> M. +Parameter set_code_hash : (list Ty.t) -> (list A.t) -> M. (* StructRecord { @@ -21,7 +21,7 @@ Parameter set_code_hash : (list Ty.t) -> (list Value.t) -> M. Module Impl_core_default_Default_for_set_code_hash_Incrementer. Definition Self : Ty.t := Ty.path "set_code_hash::Incrementer". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -34,19 +34,19 @@ End Impl_core_default_Default_for_set_code_hash_Incrementer. Module Impl_set_code_hash_Incrementer. Definition Self : Ty.t := Ty.path "set_code_hash::Incrementer". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter inc : (list Ty.t) -> (list Value.t) -> M. + Parameter inc : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_inc : M.IsAssociatedFunction Self "inc" inc. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. - Parameter set_code : (list Ty.t) -> (list Value.t) -> M. + Parameter set_code : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_set_code : M.IsAssociatedFunction Self "set_code" set_code. End Impl_set_code_hash_Incrementer. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/set_code_hash/updated_incrementer.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/set_code_hash/updated_incrementer.v index 5fb12b769..7aa31e508 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/set_code_hash/updated_incrementer.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/set_code_hash/updated_incrementer.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_for_updated_incrementer_AccountId. Definition Self : Ty.t := Ty.path "updated_incrementer::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_default_Default_for_updated_incrementer_AccountId. Module Impl_core_clone_Clone_for_updated_incrementer_AccountId. Definition Self : Ty.t := Ty.path "updated_incrementer::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -61,7 +61,7 @@ Enum Error Module Impl_updated_incrementer_Env. Definition Self : Ty.t := Ty.path "updated_incrementer::Env". - Parameter set_code_hash : (list Ty.t) -> (list Value.t) -> M. + Parameter set_code_hash : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_set_code_hash : M.IsAssociatedFunction Self "set_code_hash" set_code_hash. @@ -77,27 +77,27 @@ End Impl_updated_incrementer_Env. Module Impl_updated_incrementer_Incrementer. Definition Self : Ty.t := Ty.path "updated_incrementer::Incrementer". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter inc : (list Ty.t) -> (list Value.t) -> M. + Parameter inc : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_inc : M.IsAssociatedFunction Self "inc" inc. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. - Parameter set_code : (list Ty.t) -> (list Value.t) -> M. + Parameter set_code : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_set_code : M.IsAssociatedFunction Self "set_code" set_code. End Impl_updated_incrementer_Incrementer. diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_erc20.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_erc20.v index 9ce0910b2..dff2c6e7a 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_erc20.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_erc20.v @@ -15,7 +15,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_default_Default_where_core_default_Default_K_where_core_default_Default_V_for_trait_erc20_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "trait_erc20::Mapping") [ K; V ]. - Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter default : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (K V : Ty.t), @@ -29,13 +29,13 @@ End Impl_core_default_Default_where_core_default_Default_K_where_core_default_De Module Impl_trait_erc20_Mapping_K_V. Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "trait_erc20::Mapping") [ K; V ]. - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get : forall (K V : Ty.t), M.IsAssociatedFunction (Self K V) "get" (get K V). - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -52,7 +52,7 @@ End Impl_trait_erc20_Mapping_K_V. Module Impl_core_default_Default_for_trait_erc20_AccountId. Definition Self : Ty.t := Ty.path "trait_erc20::AccountId". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -65,7 +65,7 @@ End Impl_core_default_Default_for_trait_erc20_AccountId. Module Impl_core_clone_Clone_for_trait_erc20_AccountId. Definition Self : Ty.t := Ty.path "trait_erc20::AccountId". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -114,7 +114,7 @@ Enum Error Module Impl_core_fmt_Debug_for_trait_erc20_Error. Definition Self : Ty.t := Ty.path "trait_erc20::Error". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -138,7 +138,7 @@ End Impl_core_marker_StructuralPartialEq_for_trait_erc20_Error. Module Impl_core_cmp_PartialEq_for_trait_erc20_Error. Definition Self : Ty.t := Ty.path "trait_erc20::Error". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -162,7 +162,7 @@ End Impl_core_marker_StructuralEq_for_trait_erc20_Error. Module Impl_core_cmp_Eq_for_trait_erc20_Error. Definition Self : Ty.t := Ty.path "trait_erc20::Error". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -205,7 +205,7 @@ Axiom Result : Module Impl_core_default_Default_for_trait_erc20_Erc20. Definition Self : Ty.t := Ty.path "trait_erc20::Erc20". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -262,11 +262,11 @@ Enum Event Module Impl_trait_erc20_Env. Definition Self : Ty.t := Ty.path "trait_erc20::Env". - Parameter caller : (list Ty.t) -> (list Value.t) -> M. + Parameter caller : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_caller : M.IsAssociatedFunction Self "caller" caller. - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Parameter emit_event : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_trait_erc20_Env. @@ -274,29 +274,29 @@ End Impl_trait_erc20_Env. Module Impl_trait_erc20_Erc20. Definition Self : Ty.t := Ty.path "trait_erc20::Erc20". - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Parameter init_env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Parameter env : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter balance_of_impl : (list Ty.t) -> (list Value.t) -> M. + Parameter balance_of_impl : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_balance_of_impl : M.IsAssociatedFunction Self "balance_of_impl" balance_of_impl. - Parameter allowance_impl : (list Ty.t) -> (list Value.t) -> M. + Parameter allowance_impl : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_allowance_impl : M.IsAssociatedFunction Self "allowance_impl" allowance_impl. - Parameter transfer_from_to : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer_from_to : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer_from_to : M.IsAssociatedFunction Self "transfer_from_to" transfer_from_to. @@ -305,17 +305,17 @@ End Impl_trait_erc20_Erc20. Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. Definition Self : Ty.t := Ty.path "trait_erc20::Erc20". - Parameter total_supply : (list Ty.t) -> (list Value.t) -> M. + Parameter total_supply : (list Ty.t) -> (list A.t) -> M. - Parameter balance_of : (list Ty.t) -> (list Value.t) -> M. + Parameter balance_of : (list Ty.t) -> (list A.t) -> M. - Parameter allowance : (list Ty.t) -> (list Value.t) -> M. + Parameter allowance : (list Ty.t) -> (list A.t) -> M. - Parameter transfer : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer : (list Ty.t) -> (list A.t) -> M. - Parameter approve : (list Ty.t) -> (list Value.t) -> M. + Parameter approve : (list Ty.t) -> (list A.t) -> M. - Parameter transfer_from : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer_from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_flipper.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_flipper.v index 6505e5214..b609fcb1d 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_flipper.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_flipper.v @@ -14,7 +14,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_trait_flipper_Flipper. Definition Self : Ty.t := Ty.path "trait_flipper::Flipper". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. End Impl_trait_flipper_Flipper. @@ -22,9 +22,9 @@ End Impl_trait_flipper_Flipper. Module Impl_trait_flipper_Flip_for_trait_flipper_Flipper. Definition Self : Ty.t := Ty.path "trait_flipper::Flipper". - Parameter flip : (list Ty.t) -> (list Value.t) -> M. + Parameter flip : (list Ty.t) -> (list A.t) -> M. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_incrementer.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_incrementer.v index 1da3518a1..7a2f8eb3c 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_incrementer.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/trait_incrementer.v @@ -17,11 +17,11 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_trait_incrementer_Incrementer. Definition Self : Ty.t := Ty.path "trait_incrementer::Incrementer". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter inc_by : (list Ty.t) -> (list Value.t) -> M. + Parameter inc_by : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_inc_by : M.IsAssociatedFunction Self "inc_by" inc_by. End Impl_trait_incrementer_Incrementer. @@ -29,9 +29,9 @@ End Impl_trait_incrementer_Incrementer. Module Impl_trait_incrementer_Increment_for_trait_incrementer_Incrementer. Definition Self : Ty.t := Ty.path "trait_incrementer::Incrementer". - Parameter inc : (list Ty.t) -> (list Value.t) -> M. + Parameter inc : (list Ty.t) -> (list A.t) -> M. - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -44,7 +44,7 @@ End Impl_trait_incrementer_Increment_for_trait_incrementer_Incrementer. Module Impl_trait_incrementer_Reset_for_trait_incrementer_Incrementer. Definition Self : Ty.t := Ty.path "trait_incrementer::Incrementer". - Parameter reset : (list Ty.t) -> (list Value.t) -> M. + Parameter reset : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/axiomatized/examples/ink_contracts/wildcard_selector.v b/CoqOfRust/examples/axiomatized/examples/ink_contracts/wildcard_selector.v index 935cb0544..7f7b745a3 100644 --- a/CoqOfRust/examples/axiomatized/examples/ink_contracts/wildcard_selector.v +++ b/CoqOfRust/examples/axiomatized/examples/ink_contracts/wildcard_selector.v @@ -1,7 +1,7 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter decode_input : (list Ty.t) -> (list Value.t) -> M. +Parameter decode_input : (list Ty.t) -> (list A.t) -> M. (* StructTuple { @@ -13,15 +13,15 @@ Parameter decode_input : (list Ty.t) -> (list Value.t) -> M. Module Impl_wildcard_selector_WildcardSelector. Definition Self : Ty.t := Ty.path "wildcard_selector::WildcardSelector". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter wildcard : (list Ty.t) -> (list Value.t) -> M. + Parameter wildcard : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_wildcard : M.IsAssociatedFunction Self "wildcard" wildcard. - Parameter wildcard_complement : (list Ty.t) -> (list Value.t) -> M. + Parameter wildcard_complement : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_wildcard_complement : M.IsAssociatedFunction Self "wildcard_complement" wildcard_complement. diff --git a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example01.v b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example01.v index 67b04ee02..e7fe52be0 100644 --- a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example01.v +++ b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example01.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter id : (list Ty.t) -> (list Value.t) -> M. +Parameter id : (list Ty.t) -> (list A.t) -> M. -Parameter tri : (list Ty.t) -> (list Value.t) -> M. +Parameter tri : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example02.v b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example02.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example02.v +++ b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example02.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example03.v b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example03.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example03.v +++ b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example03.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example04.v b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example04.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example04.v +++ b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example04.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example05.v b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example05.v index 31338a555..a2b894c7b 100644 --- a/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example05.v +++ b/CoqOfRust/examples/axiomatized/examples/monadic_transformation/example05.v @@ -11,9 +11,9 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_example05_Foo. Definition Self : Ty.t := Ty.path "example05::Foo". - Parameter plus1 : (list Ty.t) -> (list Value.t) -> M. + Parameter plus1 : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_plus1 : M.IsAssociatedFunction Self "plus1" plus1. End Impl_example05_Foo. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/attributes/dead_code.v b/CoqOfRust/examples/axiomatized/examples/rust_book/attributes/dead_code.v index a5bc42ca5..46f5291a8 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/attributes/dead_code.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/attributes/dead_code.v @@ -1,10 +1,10 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter used_function : (list Ty.t) -> (list Value.t) -> M. +Parameter used_function : (list Ty.t) -> (list A.t) -> M. -Parameter unused_function : (list Ty.t) -> (list Value.t) -> M. +Parameter unused_function : (list Ty.t) -> (list A.t) -> M. -Parameter noisy_unused_function : (list Ty.t) -> (list Value.t) -> M. +Parameter noisy_unused_function : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/cargo/concurrent_tests.v b/CoqOfRust/examples/axiomatized/examples/rust_book/cargo/concurrent_tests.v index 208727c5b..6edac8030 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/cargo/concurrent_tests.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/cargo/concurrent_tests.v @@ -1,10 +1,10 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter foo : (list Ty.t) -> (list Value.t) -> M. +Parameter foo : (list Ty.t) -> (list A.t) -> M. Module tests. - Parameter test_file : (list Ty.t) -> (list Value.t) -> M. + Parameter test_file : (list Ty.t) -> (list A.t) -> M. - Parameter test_file_also : (list Ty.t) -> (list Value.t) -> M. + Parameter test_file_also : (list Ty.t) -> (list A.t) -> M. End tests. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/converting_to_string.v b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/converting_to_string.v index 920a6bfdc..03c333e03 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/converting_to_string.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/converting_to_string.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Display_for_converting_to_string_Circle. Definition Self : Ty.t := Ty.path "converting_to_string::Circle". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -21,4 +21,4 @@ Module Impl_core_fmt_Display_for_converting_to_string_Circle. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Display_for_converting_to_string_Circle. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/from.v b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/from.v index f36791ccf..7d19b56d3 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/from.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/from.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_convert_From_i32_for_from_Number. Definition Self : Ty.t := Ty.path "from::Number". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -21,4 +21,4 @@ Module Impl_core_convert_From_i32_for_from_Number. (* Instance *) [ ("from", InstanceField.Method from) ]. End Impl_core_convert_From_i32_for_from_Number. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/into.v b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/into.v index 933a6f150..0f712edeb 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/into.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/into.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_convert_From_i32_for_into_Number. Definition Self : Ty.t := Ty.path "into::Number". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -21,4 +21,4 @@ Module Impl_core_convert_From_i32_for_into_Number. (* Instance *) [ ("from", InstanceField.Method from) ]. End Impl_core_convert_From_i32_for_into_Number. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/parsing_a_string.v b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/parsing_a_string.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/parsing_a_string.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/parsing_a_string.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/try_from_and_try_into.v b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/try_from_and_try_into.v index 196332e41..7f46942bd 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/try_from_and_try_into.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/conversion/try_from_and_try_into.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_try_from_and_try_into_EvenNumber. Definition Self : Ty.t := Ty.path "try_from_and_try_into::EvenNumber". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -35,7 +35,7 @@ End Impl_core_marker_StructuralPartialEq_for_try_from_and_try_into_EvenNumber. Module Impl_core_cmp_PartialEq_for_try_from_and_try_into_EvenNumber. Definition Self : Ty.t := Ty.path "try_from_and_try_into::EvenNumber". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -50,7 +50,7 @@ Module Impl_core_convert_TryFrom_i32_for_try_from_and_try_into_EvenNumber. Definition _Error : Ty.t := Ty.tuple []. - Parameter try_from : (list Ty.t) -> (list Value.t) -> M. + Parameter try_from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -61,4 +61,4 @@ Module Impl_core_convert_TryFrom_i32_for_try_from_and_try_into_EvenNumber. [ ("Error", InstanceField.Ty _Error); ("try_from", InstanceField.Method try_from) ]. End Impl_core_convert_TryFrom_i32_for_try_from_and_try_into_EvenNumber. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/constants.v b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/constants.v index c91d36a03..f7ac51be3 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/constants.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/constants.v @@ -1,10 +1,10 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter value_LANGUAGE : Value.t. +Parameter value_LANGUAGE : A.t. -Parameter value_THRESHOLD : Value.t. +Parameter value_THRESHOLD : A.t. -Parameter is_big : (list Ty.t) -> (list Value.t) -> M. +Parameter is_big : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums.v b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums.v index 18e53c016..744ead3f7 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums.v @@ -36,6 +36,6 @@ Enum WebEvent } *) -Parameter inspect : (list Ty.t) -> (list Value.t) -> M. +Parameter inspect : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_c_like.v b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_c_like.v index 3c386b8a9..891e23c89 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_c_like.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_c_like.v @@ -51,4 +51,4 @@ Enum Color } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_testcase_linked_list.v b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_testcase_linked_list.v index d083eabc2..176858622 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_testcase_linked_list.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_testcase_linked_list.v @@ -31,21 +31,21 @@ Enum List Module Impl_enums_testcase_linked_list_List. Definition Self : Ty.t := Ty.path "enums_testcase_linked_list::List". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. - Parameter prepend : (list Ty.t) -> (list Value.t) -> M. + Parameter prepend : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_prepend : M.IsAssociatedFunction Self "prepend" prepend. - Parameter len : (list Ty.t) -> (list Value.t) -> M. + Parameter len : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_len : M.IsAssociatedFunction Self "len" len. - Parameter stringify : (list Ty.t) -> (list Value.t) -> M. + Parameter stringify : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_stringify : M.IsAssociatedFunction Self "stringify" stringify. End Impl_enums_testcase_linked_list_List. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_type_aliases_v1.v b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_type_aliases_v1.v index 4da1b914f..c7240cb57 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_type_aliases_v1.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_type_aliases_v1.v @@ -25,4 +25,4 @@ Axiom Operations : (Ty.path "enums_type_aliases_v1::Operations") = (Ty.path "enums_type_aliases_v1::VeryVerboseEnumOfThingsToDoWithNumbers"). -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_type_aliases_v2.v b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_type_aliases_v2.v index 81943e55f..1cffca5b4 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_type_aliases_v2.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_type_aliases_v2.v @@ -24,7 +24,7 @@ Enum VeryVerboseEnumOfThingsToDoWithNumbers Module Impl_enums_type_aliases_v2_VeryVerboseEnumOfThingsToDoWithNumbers. Definition Self : Ty.t := Ty.path "enums_type_aliases_v2::VeryVerboseEnumOfThingsToDoWithNumbers". - Parameter run : (list Ty.t) -> (list Value.t) -> M. + Parameter run : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_run : M.IsAssociatedFunction Self "run" run. End Impl_enums_type_aliases_v2_VeryVerboseEnumOfThingsToDoWithNumbers. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_use.v b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_use.v index a9c2f2f55..9f26de42f 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_use.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/enums_use.v @@ -41,4 +41,4 @@ Enum Work } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/structures.v b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/structures.v index 7659d8cec..bd464ac00 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/structures.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/custom_types/structures.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_structures_Person. Definition Self : Ty.t := Ty.path "structures::Person". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -50,4 +50,4 @@ End Impl_core_fmt_Debug_for_structures_Person. [ ("top_left", Ty.path "structures::Point"); ("bottom_right", Ty.path "structures::Point") ]; } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/aliases_for_result.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/aliases_for_result.v index 6701feff3..8e9af4218 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/aliases_for_result.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/aliases_for_result.v @@ -6,8 +6,8 @@ Axiom AliasedResult : (Ty.apply (Ty.path "aliases_for_result::AliasedResult") [ T ]) = (Ty.apply (Ty.path "core::result::Result") [ T; Ty.path "core::num::error::ParseIntError" ]). -Parameter multiply : (list Ty.t) -> (list Value.t) -> M. +Parameter multiply : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/boxing_errors.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/boxing_errors.v index 2e45f3557..dd41dcf32 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/boxing_errors.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/boxing_errors.v @@ -23,7 +23,7 @@ Axiom Result : Module Impl_core_fmt_Debug_for_boxing_errors_EmptyVec. Definition Self : Ty.t := Ty.path "boxing_errors::EmptyVec". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -36,7 +36,7 @@ End Impl_core_fmt_Debug_for_boxing_errors_EmptyVec. Module Impl_core_clone_Clone_for_boxing_errors_EmptyVec. Definition Self : Ty.t := Ty.path "boxing_errors::EmptyVec". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -49,7 +49,7 @@ End Impl_core_clone_Clone_for_boxing_errors_EmptyVec. Module Impl_core_fmt_Display_for_boxing_errors_EmptyVec. Definition Self : Ty.t := Ty.path "boxing_errors::EmptyVec". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -66,8 +66,8 @@ Module Impl_core_error_Error_for_boxing_errors_EmptyVec. M.IsTraitInstance "core::error::Error" Self (* Trait polymorphic types *) [] (* Instance *) []. End Impl_core_error_Error_for_boxing_errors_EmptyVec. -Parameter double_first : (list Ty.t) -> (list Value.t) -> M. +Parameter double_first : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/combinators_and_then.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/combinators_and_then.v index 128adb766..c836a37b6 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/combinators_and_then.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/combinators_and_then.v @@ -29,7 +29,7 @@ Enum Food Module Impl_core_fmt_Debug_for_combinators_and_then_Food. Definition Self : Ty.t := Ty.path "combinators_and_then::Food". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -67,7 +67,7 @@ Enum Day Module Impl_core_fmt_Debug_for_combinators_and_then_Day. Definition Self : Ty.t := Ty.path "combinators_and_then::Day". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -77,14 +77,14 @@ Module Impl_core_fmt_Debug_for_combinators_and_then_Day. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_combinators_and_then_Day. -Parameter have_ingredients : (list Ty.t) -> (list Value.t) -> M. +Parameter have_ingredients : (list Ty.t) -> (list A.t) -> M. -Parameter have_recipe : (list Ty.t) -> (list Value.t) -> M. +Parameter have_recipe : (list Ty.t) -> (list A.t) -> M. -Parameter cookable_v1 : (list Ty.t) -> (list Value.t) -> M. +Parameter cookable_v1 : (list Ty.t) -> (list A.t) -> M. -Parameter cookable_v2 : (list Ty.t) -> (list Value.t) -> M. +Parameter cookable_v2 : (list Ty.t) -> (list A.t) -> M. -Parameter eat : (list Ty.t) -> (list Value.t) -> M. +Parameter eat : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/combinators_map.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/combinators_map.v index 76e7fb1b7..8e51546a5 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/combinators_map.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/combinators_map.v @@ -29,7 +29,7 @@ Enum Food Module Impl_core_fmt_Debug_for_combinators_map_Food. Definition Self : Ty.t := Ty.path "combinators_map::Food". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -49,7 +49,7 @@ End Impl_core_fmt_Debug_for_combinators_map_Food. Module Impl_core_fmt_Debug_for_combinators_map_Peeled. Definition Self : Ty.t := Ty.path "combinators_map::Peeled". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -69,7 +69,7 @@ End Impl_core_fmt_Debug_for_combinators_map_Peeled. Module Impl_core_fmt_Debug_for_combinators_map_Chopped. Definition Self : Ty.t := Ty.path "combinators_map::Chopped". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -89,7 +89,7 @@ End Impl_core_fmt_Debug_for_combinators_map_Chopped. Module Impl_core_fmt_Debug_for_combinators_map_Cooked. Definition Self : Ty.t := Ty.path "combinators_map::Cooked". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -99,14 +99,14 @@ Module Impl_core_fmt_Debug_for_combinators_map_Cooked. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_combinators_map_Cooked. -Parameter peel : (list Ty.t) -> (list Value.t) -> M. +Parameter peel : (list Ty.t) -> (list A.t) -> M. -Parameter chop : (list Ty.t) -> (list Value.t) -> M. +Parameter chop : (list Ty.t) -> (list A.t) -> M. -Parameter cook : (list Ty.t) -> (list Value.t) -> M. +Parameter cook : (list Ty.t) -> (list A.t) -> M. -Parameter process : (list Ty.t) -> (list Value.t) -> M. +Parameter process : (list Ty.t) -> (list A.t) -> M. -Parameter eat : (list Ty.t) -> (list Value.t) -> M. +Parameter eat : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/defining_an_error_type.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/defining_an_error_type.v index 96697bafe..0dc4bfbde 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/defining_an_error_type.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/defining_an_error_type.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_defining_an_error_type_DoubleError. Definition Self : Ty.t := Ty.path "defining_an_error_type::DoubleError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_fmt_Debug_for_defining_an_error_type_DoubleError. Module Impl_core_clone_Clone_for_defining_an_error_type_DoubleError. Definition Self : Ty.t := Ty.path "defining_an_error_type::DoubleError". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -44,7 +44,7 @@ Axiom Result : Module Impl_core_fmt_Display_for_defining_an_error_type_DoubleError. Definition Self : Ty.t := Ty.path "defining_an_error_type::DoubleError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -54,8 +54,8 @@ Module Impl_core_fmt_Display_for_defining_an_error_type_DoubleError. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Display_for_defining_an_error_type_DoubleError. -Parameter double_first : (list Ty.t) -> (list Value.t) -> M. +Parameter double_first : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/early_returns.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/early_returns.v index a4eee29c7..d25f23fc3 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/early_returns.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/early_returns.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter multiply : (list Ty.t) -> (list Value.t) -> M. +Parameter multiply : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/introducing_question_mark.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/introducing_question_mark.v index a4eee29c7..d25f23fc3 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/introducing_question_mark.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/introducing_question_mark.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter multiply : (list Ty.t) -> (list Value.t) -> M. +Parameter multiply : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/introducing_question_mark_is_an_replacement_for_deprecated_try.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/introducing_question_mark_is_an_replacement_for_deprecated_try.v index a4eee29c7..d25f23fc3 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/introducing_question_mark_is_an_replacement_for_deprecated_try.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/introducing_question_mark_is_an_replacement_for_deprecated_try.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter multiply : (list Ty.t) -> (list Value.t) -> M. +Parameter multiply : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition_unwrapped.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition_unwrapped.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition_unwrapped.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition_unwrapped.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_via_map_err_and_filter_map.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_via_map_err_and_filter_map.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_via_map_err_and_filter_map.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_collect_via_map_err_and_filter_map.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_fail_entire_operation_via_collect.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_fail_entire_operation_via_collect.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_fail_entire_operation_via_collect.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_fail_entire_operation_via_collect.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_failed.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_failed.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_failed.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_failed.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_handle_via_filter_map.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_handle_via_filter_map.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_handle_via_filter_map.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/iterating_over_results_handle_via_filter_map.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/map_in_result_via_combinators.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/map_in_result_via_combinators.v index a4eee29c7..d25f23fc3 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/map_in_result_via_combinators.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/map_in_result_via_combinators.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter multiply : (list Ty.t) -> (list Value.t) -> M. +Parameter multiply : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/map_in_result_via_match.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/map_in_result_via_match.v index a4eee29c7..d25f23fc3 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/map_in_result_via_match.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/map_in_result_via_match.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter multiply : (list Ty.t) -> (list Value.t) -> M. +Parameter multiply : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/multiple_error_types.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/multiple_error_types.v index f8e090a30..a9a22c7b7 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/multiple_error_types.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/multiple_error_types.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter double_first : (list Ty.t) -> (list Value.t) -> M. +Parameter double_first : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/option_and_unwrap.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/option_and_unwrap.v index 3796a020e..63315e315 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/option_and_unwrap.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/option_and_unwrap.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter give_adult : (list Ty.t) -> (list Value.t) -> M. +Parameter give_adult : (list Ty.t) -> (list A.t) -> M. -Parameter drink : (list Ty.t) -> (list Value.t) -> M. +Parameter drink : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/other_uses_of_question_mark.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/other_uses_of_question_mark.v index 6f686a606..0e8dda444 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/other_uses_of_question_mark.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/other_uses_of_question_mark.v @@ -23,7 +23,7 @@ Axiom Result : Module Impl_core_fmt_Debug_for_other_uses_of_question_mark_EmptyVec. Definition Self : Ty.t := Ty.path "other_uses_of_question_mark::EmptyVec". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -36,7 +36,7 @@ End Impl_core_fmt_Debug_for_other_uses_of_question_mark_EmptyVec. Module Impl_core_fmt_Display_for_other_uses_of_question_mark_EmptyVec. Definition Self : Ty.t := Ty.path "other_uses_of_question_mark::EmptyVec". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -53,8 +53,8 @@ Module Impl_core_error_Error_for_other_uses_of_question_mark_EmptyVec. M.IsTraitInstance "core::error::Error" Self (* Trait polymorphic types *) [] (* Instance *) []. End Impl_core_error_Error_for_other_uses_of_question_mark_EmptyVec. -Parameter double_first : (list Ty.t) -> (list Value.t) -> M. +Parameter double_first : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/panic.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/panic.v index 0cca8ff89..a64d64e7f 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/panic.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/panic.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter drink : (list Ty.t) -> (list Value.t) -> M. +Parameter drink : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/pulling_results_out_of_options.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/pulling_results_out_of_options.v index f8e090a30..a9a22c7b7 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/pulling_results_out_of_options.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/pulling_results_out_of_options.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter double_first : (list Ty.t) -> (list Value.t) -> M. +Parameter double_first : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/pulling_results_out_of_options_with_stop_error_processing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/pulling_results_out_of_options_with_stop_error_processing.v index f8e090a30..a9a22c7b7 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/pulling_results_out_of_options_with_stop_error_processing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/pulling_results_out_of_options_with_stop_error_processing.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter double_first : (list Ty.t) -> (list Value.t) -> M. +Parameter double_first : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/result_use_in_main.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/result_use_in_main.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/result_use_in_main.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/result_use_in_main.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert.v index b934512b1..31e6a4cd6 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert.v @@ -39,7 +39,7 @@ Enum Fruit Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_Fruit. Definition Self : Ty.t := Ty.path "unpacking_options_and_defaults_via_get_or_insert::Fruit". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -49,4 +49,4 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_ (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_Fruit. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert_with.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert_with.v index 85383ebd3..b1c27526b 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert_with.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert_with.v @@ -39,7 +39,7 @@ Enum Fruit Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_with_Fruit. Definition Self : Ty.t := Ty.path "unpacking_options_and_defaults_via_get_or_insert_with::Fruit". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -49,4 +49,4 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_ (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_with_Fruit. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or.v index 619c03891..0c5c7ec29 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or.v @@ -39,7 +39,7 @@ Enum Fruit Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_Fruit. Definition Self : Ty.t := Ty.path "unpacking_options_and_defaults_via_or::Fruit". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -49,4 +49,4 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_Fruit. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_Fruit. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or_else.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or_else.v index fda9cd4ad..4c67c5dc6 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or_else.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or_else.v @@ -39,7 +39,7 @@ Enum Fruit Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_else_Fruit. Definition Self : Ty.t := Ty.path "unpacking_options_and_defaults_via_or_else::Fruit". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -49,4 +49,4 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_else_Fruit. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_else_Fruit. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_via_question_mark.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_via_question_mark.v index bfc17fe38..770cde81b 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_via_question_mark.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/unpacking_options_via_question_mark.v @@ -15,7 +15,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_clone_Clone_for_unpacking_options_via_question_mark_PhoneNumber. Definition Self : Ty.t := Ty.path "unpacking_options_via_question_mark::PhoneNumber". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -48,7 +48,7 @@ End Impl_core_marker_Copy_for_unpacking_options_via_question_mark_PhoneNumber. Module Impl_core_clone_Clone_for_unpacking_options_via_question_mark_Job. Definition Self : Ty.t := Ty.path "unpacking_options_via_question_mark::Job". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -81,10 +81,10 @@ End Impl_core_marker_Copy_for_unpacking_options_via_question_mark_Job. Module Impl_unpacking_options_via_question_mark_Person. Definition Self : Ty.t := Ty.path "unpacking_options_via_question_mark::Person". - Parameter work_phone_area_code : (list Ty.t) -> (list Value.t) -> M. + Parameter work_phone_area_code : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_work_phone_area_code : M.IsAssociatedFunction Self "work_phone_area_code" work_phone_area_code. End Impl_unpacking_options_via_question_mark_Person. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/wrapping_errors.v b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/wrapping_errors.v index 3b57a5579..fc4907377 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/wrapping_errors.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/error_handling/wrapping_errors.v @@ -24,7 +24,7 @@ Enum DoubleError Module Impl_core_fmt_Debug_for_wrapping_errors_DoubleError. Definition Self : Ty.t := Ty.path "wrapping_errors::DoubleError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -42,7 +42,7 @@ Axiom Result : Module Impl_core_fmt_Display_for_wrapping_errors_DoubleError. Definition Self : Ty.t := Ty.path "wrapping_errors::DoubleError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -55,7 +55,7 @@ End Impl_core_fmt_Display_for_wrapping_errors_DoubleError. Module Impl_core_error_Error_for_wrapping_errors_DoubleError. Definition Self : Ty.t := Ty.path "wrapping_errors::DoubleError". - Parameter source : (list Ty.t) -> (list Value.t) -> M. + Parameter source : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -68,7 +68,7 @@ End Impl_core_error_Error_for_wrapping_errors_DoubleError. Module Impl_core_convert_From_core_num_error_ParseIntError_for_wrapping_errors_DoubleError. Definition Self : Ty.t := Ty.path "wrapping_errors::DoubleError". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -78,8 +78,8 @@ Module Impl_core_convert_From_core_num_error_ParseIntError_for_wrapping_errors_D (* Instance *) [ ("from", InstanceField.Method from) ]. End Impl_core_convert_From_core_num_error_ParseIntError_for_wrapping_errors_DoubleError. -Parameter double_first : (list Ty.t) -> (list Value.t) -> M. +Parameter double_first : (list Ty.t) -> (list A.t) -> M. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/blocks.v b/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/blocks.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/blocks.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/blocks.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/const_underscore_expression.v b/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/const_underscore_expression.v index b0113a251..08047fe11 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/const_underscore_expression.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/const_underscore_expression.v @@ -11,7 +11,7 @@ Module underscore. Module Impl_const_underscore_expression_BarTrait_for_const_underscore_expression_Bar. Definition Self : Ty.t := Ty.path "const_underscore_expression::Bar". - Parameter show : (list Ty.t) -> (list Value.t) -> M. + Parameter show : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/statement.v b/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/statement.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/statement.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/statement.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/variable_binding_and_expression.v b/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/variable_binding_and_expression.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/variable_binding_and_expression.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/expressions/variable_binding_and_expression.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_into_iter.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_into_iter.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_into_iter.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_into_iter.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_iter.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_iter.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_iter.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_iter.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_iter_mut.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_iter_mut.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_iter_mut.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_iterators_iter_mut.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_range_completely_inclusive.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_range_completely_inclusive.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_range_completely_inclusive.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_range_completely_inclusive.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_range_inclusive_to_exclusive.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_range_inclusive_to_exclusive.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_range_inclusive_to_exclusive.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/for_and_range_inclusive_to_exclusive.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_else.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_else.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_else.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_else.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_challenge.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_challenge.v index a11c00561..1dd65a9b5 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_challenge.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_challenge.v @@ -16,4 +16,4 @@ Enum Foo } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_dont_use_match.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_dont_use_match.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_dont_use_match.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_dont_use_match.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_match_enum_values.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_match_enum_values.v index 6324b6e9d..db97afdda 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_match_enum_values.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/if_let_match_enum_values.v @@ -26,4 +26,4 @@ Enum Foo } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/infinite_loop.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/infinite_loop.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/infinite_loop.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/infinite_loop.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/loop_nesting_and_labels.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/loop_nesting_and_labels.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/loop_nesting_and_labels.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/loop_nesting_and_labels.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/loop_returning_from_loops.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/loop_returning_from_loops.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/loop_returning_from_loops.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/loop_returning_from_loops.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_binding.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_binding.v index d69257563..747324db9 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_binding.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_binding.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter age : (list Ty.t) -> (list Value.t) -> M. +Parameter age : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_binding_destructure_enum_variants.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_binding_destructure_enum_variants.v index 3290a1718..70a2927a5 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_binding_destructure_enum_variants.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_binding_destructure_enum_variants.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter some_number : (list Ty.t) -> (list Value.t) -> M. +Parameter some_number : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_arrays_slices.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_arrays_slices.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_arrays_slices.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_arrays_slices.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_enums.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_enums.v index 02e7cf5bc..4499de049 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_enums.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_enums.v @@ -51,4 +51,4 @@ Enum Color } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_pointers_ref.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_pointers_ref.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_pointers_ref.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_pointers_ref.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_structs.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_structs.v index 945c40403..b0d9283dd 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_structs.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_structs.v @@ -8,4 +8,4 @@ Require Import CoqOfRust.CoqOfRust. fields := [ ("x", Ty.tuple [ Ty.path "u32"; Ty.path "u32" ]); ("y", Ty.path "u32") ]; } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_tuples.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_tuples.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_tuples.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_tuples.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_tuples_fixed.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_tuples_fixed.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_tuples_fixed.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_destructuring_tuples_fixed.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_guards.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_guards.v index 0ee0a5b86..dc54828d2 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_guards.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_guards.v @@ -21,4 +21,4 @@ Enum Temperature } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_guards_unreachable.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_guards_unreachable.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_guards_unreachable.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/match_guards_unreachable.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while_let.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while_let.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while_let.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while_let.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while_let_match_is_weird.v b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while_let_match_is_weird.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while_let_match_is_weird.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/flow_of_control/while_let_match_is_weird.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/associated_functions_and_methods.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/associated_functions_and_methods.v index 812e8c734..f4d76004a 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/associated_functions_and_methods.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/associated_functions_and_methods.v @@ -11,11 +11,11 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_associated_functions_and_methods_Point. Definition Self : Ty.t := Ty.path "associated_functions_and_methods::Point". - Parameter origin : (list Ty.t) -> (list Value.t) -> M. + Parameter origin : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_origin : M.IsAssociatedFunction Self "origin" origin. - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. End Impl_associated_functions_and_methods_Point. @@ -34,19 +34,19 @@ End Impl_associated_functions_and_methods_Point. Module Impl_associated_functions_and_methods_Rectangle. Definition Self : Ty.t := Ty.path "associated_functions_and_methods::Rectangle". - Parameter get_p1 : (list Ty.t) -> (list Value.t) -> M. + Parameter get_p1 : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_get_p1 : M.IsAssociatedFunction Self "get_p1" get_p1. - Parameter area : (list Ty.t) -> (list Value.t) -> M. + Parameter area : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_area : M.IsAssociatedFunction Self "area" area. - Parameter perimeter : (list Ty.t) -> (list Value.t) -> M. + Parameter perimeter : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_perimeter : M.IsAssociatedFunction Self "perimeter" perimeter. - Parameter translate : (list Ty.t) -> (list Value.t) -> M. + Parameter translate : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_translate : M.IsAssociatedFunction Self "translate" translate. End Impl_associated_functions_and_methods_Rectangle. @@ -65,9 +65,9 @@ End Impl_associated_functions_and_methods_Rectangle. Module Impl_associated_functions_and_methods_Pair. Definition Self : Ty.t := Ty.path "associated_functions_and_methods::Pair". - Parameter destroy : (list Ty.t) -> (list Value.t) -> M. + Parameter destroy : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_destroy : M.IsAssociatedFunction Self "destroy" destroy. End Impl_associated_functions_and_methods_Pair. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions.v index d7603def4..75d08d5fb 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. Module main. - Parameter foo : (list Ty.t) -> (list Value.t) -> M. + Parameter foo : (list Ty.t) -> (list A.t) -> M. End main. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions_example_sum_odd_numbers.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions_example_sum_odd_numbers.v index b9cc8953a..0ba233607 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions_example_sum_odd_numbers.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions_example_sum_odd_numbers.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. Module main. - Parameter sum_odd_numbers : (list Ty.t) -> (list Value.t) -> M. + Parameter sum_odd_numbers : (list Ty.t) -> (list A.t) -> M. End main. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions_no_info_in_return_type.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions_no_info_in_return_type.v index bd9a6c068..89eddef4e 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions_no_info_in_return_type.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/diverging_functions_no_info_in_return_type.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter some_fn : (list Ty.t) -> (list Value.t) -> M. +Parameter some_fn : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions.v index c5db5b551..239826110 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions.v @@ -1,10 +1,10 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter is_divisible_by : (list Ty.t) -> (list Value.t) -> M. +Parameter is_divisible_by : (list Ty.t) -> (list A.t) -> M. -Parameter fizzbuzz : (list Ty.t) -> (list Value.t) -> M. +Parameter fizzbuzz : (list Ty.t) -> (list A.t) -> M. -Parameter fizzbuzz_to : (list Ty.t) -> (list Value.t) -> M. +Parameter fizzbuzz_to : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_as_input_parameters.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_as_input_parameters.v index 01910e6c5..d7c502e71 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_as_input_parameters.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_as_input_parameters.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter apply : (list Ty.t) -> (list Value.t) -> M. +Parameter apply : (list Ty.t) -> (list A.t) -> M. -Parameter apply_to_3 : (list Ty.t) -> (list Value.t) -> M. +Parameter apply_to_3 : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_as_output_parameters.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_as_output_parameters.v index 1baf2a0d0..1d9366c22 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_as_output_parameters.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_as_output_parameters.v @@ -1,22 +1,22 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter create_fn : (list Ty.t) -> (list Value.t) -> M. +Parameter create_fn : (list Ty.t) -> (list A.t) -> M. Module create_fn. (* Error OpaqueTy *) End create_fn. -Parameter create_fnmut : (list Ty.t) -> (list Value.t) -> M. +Parameter create_fnmut : (list Ty.t) -> (list A.t) -> M. Module create_fnmut. (* Error OpaqueTy *) End create_fnmut. -Parameter create_fnonce : (list Ty.t) -> (list Value.t) -> M. +Parameter create_fnonce : (list Ty.t) -> (list A.t) -> M. Module create_fnonce. (* Error OpaqueTy *) End create_fnonce. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_capturing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_capturing.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_capturing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_capturing.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_Iterator_any.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_Iterator_any.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_Iterator_any.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_Iterator_any.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_find.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_find.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_find.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_find.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_position.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_position.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_position.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_position.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_forced_capturing_with_move.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_forced_capturing_with_move.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_forced_capturing_with_move.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_forced_capturing_with_move.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_input_functions.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_input_functions.v index d7259e22e..ad2ab13d1 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_input_functions.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_input_functions.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter call_me : (list Ty.t) -> (list Value.t) -> M. +Parameter call_me : (list Ty.t) -> (list A.t) -> M. -Parameter function : (list Ty.t) -> (list Value.t) -> M. +Parameter function : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_type_anonymity_define.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_type_anonymity_define.v index a494e03e2..0c14dcf16 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_type_anonymity_define.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_type_anonymity_define.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. Module main. - Parameter apply : (list Ty.t) -> (list Value.t) -> M. + Parameter apply : (list Ty.t) -> (list A.t) -> M. End main. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_type_anonymity_define_and_use.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_type_anonymity_define_and_use.v index 893a21d57..cc1af62f7 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_type_anonymity_define_and_use.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_closures_type_anonymity_define_and_use.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter apply : (list Ty.t) -> (list Value.t) -> M. +Parameter apply : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_order.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_order.v index 981261918..b2731aeb1 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_order.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/functions_order.v @@ -18,16 +18,16 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_functions_order_SomeType. Definition Self : Ty.t := Ty.path "functions_order::SomeType". - Parameter meth1 : (list Ty.t) -> (list Value.t) -> M. + Parameter meth1 : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_meth1 : M.IsAssociatedFunction Self "meth1" meth1. - Parameter meth2 : (list Ty.t) -> (list Value.t) -> M. + Parameter meth2 : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_meth2 : M.IsAssociatedFunction Self "meth2" meth2. End Impl_functions_order_SomeType. -Parameter depends_on_trait_impl : (list Ty.t) -> (list Value.t) -> M. +Parameter depends_on_trait_impl : (list Ty.t) -> (list A.t) -> M. (* Trait *) (* Empty module 'SomeTrait' *) @@ -35,9 +35,9 @@ Parameter depends_on_trait_impl : (list Ty.t) -> (list Value.t) -> M. Module Impl_functions_order_SomeTrait_for_functions_order_SomeType. Definition Self : Ty.t := Ty.path "functions_order::SomeType". - Parameter some_trait_foo : (list Ty.t) -> (list Value.t) -> M. + Parameter some_trait_foo : (list Ty.t) -> (list A.t) -> M. - Parameter some_trait_bar : (list Ty.t) -> (list Value.t) -> M. + Parameter some_trait_bar : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -54,9 +54,9 @@ End Impl_functions_order_SomeTrait_for_functions_order_SomeType. Module Impl_functions_order_SomeTrait_for_functions_order_OtherType. Definition Self : Ty.t := Ty.path "functions_order::OtherType". - Parameter some_trait_foo : (list Ty.t) -> (list Value.t) -> M. + Parameter some_trait_foo : (list Ty.t) -> (list A.t) -> M. - Parameter some_trait_bar : (list Ty.t) -> (list Value.t) -> M. + Parameter some_trait_bar : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -71,17 +71,17 @@ Module Impl_functions_order_SomeTrait_for_functions_order_OtherType. End Impl_functions_order_SomeTrait_for_functions_order_OtherType. Module inner_mod. - Parameter bar : (list Ty.t) -> (list Value.t) -> M. + Parameter bar : (list Ty.t) -> (list A.t) -> M. - Parameter tar : (list Ty.t) -> (list Value.t) -> M. + Parameter tar : (list Ty.t) -> (list A.t) -> M. Module nested_mod. - Parameter tick : (list Ty.t) -> (list Value.t) -> M. + Parameter tick : (list Ty.t) -> (list A.t) -> M. - Parameter tack : (list Ty.t) -> (list Value.t) -> M. + Parameter tack : (list Ty.t) -> (list A.t) -> M. End nested_mod. End inner_mod. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. -Parameter foo : (list Ty.t) -> (list Value.t) -> M. +Parameter foo : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/higher_order_functions.v b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/higher_order_functions.v index 2456ea501..aacc914ba 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/functions/higher_order_functions.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/functions/higher_order_functions.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter is_odd : (list Ty.t) -> (list Value.t) -> M. +Parameter is_odd : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics.v index a7f58b346..5deab4c91 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics.v @@ -22,4 +22,4 @@ Require Import CoqOfRust.CoqOfRust. fields := [ T ]; } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_associated_types_problem.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_associated_types_problem.v index 4466decd2..19d6dcb82 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_associated_types_problem.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_associated_types_problem.v @@ -14,11 +14,11 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_generics_associated_types_problem_Contains_i32_i32_for_generics_associated_types_problem_Container. Definition Self : Ty.t := Ty.path "generics_associated_types_problem::Container". - Parameter contains : (list Ty.t) -> (list Value.t) -> M. + Parameter contains : (list Ty.t) -> (list A.t) -> M. - Parameter first : (list Ty.t) -> (list Value.t) -> M. + Parameter first : (list Ty.t) -> (list A.t) -> M. - Parameter last : (list Ty.t) -> (list Value.t) -> M. + Parameter last : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -33,6 +33,6 @@ Module Impl_generics_associated_types_problem_Contains_i32_i32_for_generics_asso ]. End Impl_generics_associated_types_problem_Contains_i32_i32_for_generics_associated_types_problem_Container. -Parameter difference : (list Ty.t) -> (list Value.t) -> M. +Parameter difference : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_associated_types_solution.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_associated_types_solution.v index 947002dcd..2109ee6f7 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_associated_types_solution.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_associated_types_solution.v @@ -18,13 +18,13 @@ Module Impl_generics_associated_types_solution_Contains_for_generics_associated_ Definition _B : Ty.t := Ty.path "i32". - Parameter contains : (list Ty.t) -> (list Value.t) -> M. + Parameter contains : (list Ty.t) -> (list A.t) -> M. - Parameter first : (list Ty.t) -> (list Value.t) -> M. + Parameter first : (list Ty.t) -> (list A.t) -> M. - Parameter last : (list Ty.t) -> (list Value.t) -> M. + Parameter last : (list Ty.t) -> (list A.t) -> M. - Parameter a : (list Ty.t) -> (list Value.t) -> M. + Parameter a : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -42,8 +42,8 @@ Module Impl_generics_associated_types_solution_Contains_for_generics_associated_ ]. End Impl_generics_associated_types_solution_Contains_for_generics_associated_types_solution_Container. -Parameter difference : (list Ty.t) -> (list Value.t) -> M. +Parameter difference : (list Ty.t) -> (list A.t) -> M. -Parameter get_a : (list Ty.t) -> (list Value.t) -> M. +Parameter get_a : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_bounds.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_bounds.v index 2b4802ea4..07c059d5f 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_bounds.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_bounds.v @@ -14,7 +14,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_generics_bounds_Rectangle. Definition Self : Ty.t := Ty.path "generics_bounds::Rectangle". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -34,7 +34,7 @@ End Impl_core_fmt_Debug_for_generics_bounds_Rectangle. Module Impl_generics_bounds_HasArea_for_generics_bounds_Rectangle. Definition Self : Ty.t := Ty.path "generics_bounds::Rectangle". - Parameter area : (list Ty.t) -> (list Value.t) -> M. + Parameter area : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -44,8 +44,8 @@ Module Impl_generics_bounds_HasArea_for_generics_bounds_Rectangle. (* Instance *) [ ("area", InstanceField.Method area) ]. End Impl_generics_bounds_HasArea_for_generics_bounds_Rectangle. -Parameter print_debug : (list Ty.t) -> (list Value.t) -> M. +Parameter print_debug : (list Ty.t) -> (list A.t) -> M. -Parameter area : (list Ty.t) -> (list Value.t) -> M. +Parameter area : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_bounds_test_case_empty_bounds.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_bounds_test_case_empty_bounds.v index b9a9bdc9d..d651730bd 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_bounds_test_case_empty_bounds.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_bounds_test_case_empty_bounds.v @@ -50,8 +50,8 @@ Module Impl_generics_bounds_test_case_empty_bounds_Blue_for_generics_bounds_test (* Instance *) []. End Impl_generics_bounds_test_case_empty_bounds_Blue_for_generics_bounds_test_case_empty_bounds_BlueJay. -Parameter red : (list Ty.t) -> (list Value.t) -> M. +Parameter red : (list Ty.t) -> (list A.t) -> M. -Parameter blue : (list Ty.t) -> (list Value.t) -> M. +Parameter blue : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_functions.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_functions.v index ee273b20e..6e951b63a 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_functions.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_functions.v @@ -22,12 +22,12 @@ Require Import CoqOfRust.CoqOfRust. fields := [ T ]; } *) -Parameter reg_fn : (list Ty.t) -> (list Value.t) -> M. +Parameter reg_fn : (list Ty.t) -> (list A.t) -> M. -Parameter gen_spec_t : (list Ty.t) -> (list Value.t) -> M. +Parameter gen_spec_t : (list Ty.t) -> (list A.t) -> M. -Parameter gen_spec_i32 : (list Ty.t) -> (list Value.t) -> M. +Parameter gen_spec_i32 : (list Ty.t) -> (list A.t) -> M. -Parameter generic : (list Ty.t) -> (list Value.t) -> M. +Parameter generic : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_implementation.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_implementation.v index 420d27974..77c1f2d45 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_implementation.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_implementation.v @@ -18,7 +18,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_generics_implementation_Val. Definition Self : Ty.t := Ty.path "generics_implementation::Val". - Parameter value : (list Ty.t) -> (list Value.t) -> M. + Parameter value : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_value : M.IsAssociatedFunction Self "value" value. End Impl_generics_implementation_Val. @@ -26,11 +26,11 @@ End Impl_generics_implementation_Val. Module Impl_generics_implementation_GenVal_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "generics_implementation::GenVal") [ T ]. - Parameter value : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter value : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_value : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "value" (value T). End Impl_generics_implementation_GenVal_T. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_multiple_bounds.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_multiple_bounds.v index c20f858d8..e19e5a7f6 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_multiple_bounds.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_multiple_bounds.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter compare_prints : (list Ty.t) -> (list Value.t) -> M. +Parameter compare_prints : (list Ty.t) -> (list A.t) -> M. -Parameter compare_types : (list Ty.t) -> (list Value.t) -> M. +Parameter compare_types : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_new_type_idiom.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_new_type_idiom.v index d6777da25..73a48fc51 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_new_type_idiom.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_new_type_idiom.v @@ -18,7 +18,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_generics_new_type_idiom_Years. Definition Self : Ty.t := Ty.path "generics_new_type_idiom::Years". - Parameter to_days : (list Ty.t) -> (list Value.t) -> M. + Parameter to_days : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_to_days : M.IsAssociatedFunction Self "to_days" to_days. End Impl_generics_new_type_idiom_Years. @@ -26,11 +26,11 @@ End Impl_generics_new_type_idiom_Years. Module Impl_generics_new_type_idiom_Days. Definition Self : Ty.t := Ty.path "generics_new_type_idiom::Days". - Parameter to_years : (list Ty.t) -> (list Value.t) -> M. + Parameter to_years : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_to_years : M.IsAssociatedFunction Self "to_years" to_years. End Impl_generics_new_type_idiom_Days. -Parameter old_enough : (list Ty.t) -> (list Value.t) -> M. +Parameter old_enough : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_new_type_idiom_as_base_type.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_new_type_idiom_as_base_type.v index 50f990080..de9bba65c 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_new_type_idiom_as_base_type.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_new_type_idiom_as_base_type.v @@ -8,4 +8,4 @@ Require Import CoqOfRust.CoqOfRust. fields := [ Ty.path "i64" ]; } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_phantom_type.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_phantom_type.v index 4de541c7b..675a4f0c7 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_phantom_type.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_phantom_type.v @@ -25,7 +25,7 @@ Module Impl_core_cmp_PartialEq_where_core_cmp_PartialEq_A_where_core_cmp_Partial Definition Self (A B : Ty.t) : Ty.t := Ty.apply (Ty.path "generics_phantom_type::PhantomTuple") [ A; B ]. - Parameter eq : forall (A B : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter eq : forall (A B : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (A B : Ty.t), @@ -60,7 +60,7 @@ Module Impl_core_cmp_PartialEq_where_core_cmp_PartialEq_A_where_core_cmp_Partial Definition Self (A B : Ty.t) : Ty.t := Ty.apply (Ty.path "generics_phantom_type::PhantomStruct") [ A; B ]. - Parameter eq : forall (A B : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter eq : forall (A B : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (A B : Ty.t), @@ -71,4 +71,4 @@ Module Impl_core_cmp_PartialEq_where_core_cmp_PartialEq_A_where_core_cmp_Partial (* Instance *) [ ("eq", InstanceField.Method (eq A B)) ]. End Impl_core_cmp_PartialEq_where_core_cmp_PartialEq_A_where_core_cmp_PartialEq_B_for_generics_phantom_type_PhantomStruct_A_B. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.v index 8de494de0..f7fb4535c 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.v @@ -12,7 +12,7 @@ Enum Inch Module Impl_core_fmt_Debug_for_generics_phantom_type_test_case_unit_clarification_Inch. Definition Self : Ty.t := Ty.path "generics_phantom_type_test_case_unit_clarification::Inch". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -25,7 +25,7 @@ End Impl_core_fmt_Debug_for_generics_phantom_type_test_case_unit_clarification_I Module Impl_core_clone_Clone_for_generics_phantom_type_test_case_unit_clarification_Inch. Definition Self : Ty.t := Ty.path "generics_phantom_type_test_case_unit_clarification::Inch". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -53,7 +53,7 @@ Enum Mm Module Impl_core_fmt_Debug_for_generics_phantom_type_test_case_unit_clarification_Mm. Definition Self : Ty.t := Ty.path "generics_phantom_type_test_case_unit_clarification::Mm". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -66,7 +66,7 @@ End Impl_core_fmt_Debug_for_generics_phantom_type_test_case_unit_clarification_M Module Impl_core_clone_Clone_for_generics_phantom_type_test_case_unit_clarification_Mm. Definition Self : Ty.t := Ty.path "generics_phantom_type_test_case_unit_clarification::Mm". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -94,7 +94,7 @@ Module Impl_core_fmt_Debug_where_core_fmt_Debug_Unit_for_generics_phantom_type_t Definition Self (Unit : Ty.t) : Ty.t := Ty.apply (Ty.path "generics_phantom_type_test_case_unit_clarification::Length") [ Unit ]. - Parameter fmt : forall (Unit : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : forall (Unit : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (Unit : Ty.t), @@ -109,7 +109,7 @@ Module Impl_core_clone_Clone_where_core_clone_Clone_Unit_for_generics_phantom_ty Definition Self (Unit : Ty.t) : Ty.t := Ty.apply (Ty.path "generics_phantom_type_test_case_unit_clarification::Length") [ Unit ]. - Parameter clone : forall (Unit : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter clone : forall (Unit : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (Unit : Ty.t), @@ -140,7 +140,7 @@ Module Impl_core_ops_arith_Add_for_generics_phantom_type_test_case_unit_clarific Definition _Output (Unit : Ty.t) : Ty.t := Ty.apply (Ty.path "generics_phantom_type_test_case_unit_clarification::Length") [ Unit ]. - Parameter add : forall (Unit : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter add : forall (Unit : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (Unit : Ty.t), @@ -152,4 +152,4 @@ Module Impl_core_ops_arith_Add_for_generics_phantom_type_test_case_unit_clarific [ ("Output", InstanceField.Ty (_Output Unit)); ("add", InstanceField.Method (add Unit)) ]. End Impl_core_ops_arith_Add_for_generics_phantom_type_test_case_unit_clarification_Length_Unit. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_traits.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_traits.v index 2da248e88..17bbfbf2b 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_traits.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_traits.v @@ -21,7 +21,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_generics_traits_DoubleDrop_T_for_U. Definition Self (T U : Ty.t) : Ty.t := U. - Parameter double_drop : forall (T U : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter double_drop : forall (T U : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T U : Ty.t), @@ -32,4 +32,4 @@ Module Impl_generics_traits_DoubleDrop_T_for_U. (* Instance *) [ ("double_drop", InstanceField.Method (double_drop T U)) ]. End Impl_generics_traits_DoubleDrop_T_for_U. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_where_clauses.v b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_where_clauses.v index 1efaab50c..fb62f2268 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_where_clauses.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/generics/generics_where_clauses.v @@ -7,7 +7,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_generics_where_clauses_PrintInOption_where_core_fmt_Debug_core_option_Option_T_for_T. Definition Self (T : Ty.t) : Ty.t := T. - Parameter print_in_option : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter print_in_option : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T : Ty.t), @@ -18,4 +18,4 @@ Module Impl_generics_where_clauses_PrintInOption_where_core_fmt_Debug_core_optio (* Instance *) [ ("print_in_option", InstanceField.Method (print_in_option T)) ]. End Impl_generics_where_clauses_PrintInOption_where_core_fmt_Debug_core_option_Option_T_for_T. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/guessing_game/guessing_game.v b/CoqOfRust/examples/axiomatized/examples/rust_book/guessing_game/guessing_game.v index 35f5dddfe..c91e36b9f 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/guessing_game/guessing_game.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/guessing_game/guessing_game.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter gen_range : (list Ty.t) -> (list Value.t) -> M. +Parameter gen_range : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/hello_world/formatted_print.v b/CoqOfRust/examples/axiomatized/examples/rust_book/hello_world/formatted_print.v index 561a7290c..ea5efaf85 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/hello_world/formatted_print.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/hello_world/formatted_print.v @@ -1,7 +1,7 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. Module main. (* StructTuple diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/hello_world/hello_world.v b/CoqOfRust/examples/axiomatized/examples/rust_book/hello_world/hello_world.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/hello_world/hello_world.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/hello_world/hello_world.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_example.v b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_example.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_example.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_example.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_designators.v b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_designators.v index d2812c0d7..7ab30f186 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_designators.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_designators.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter foo : (list Ty.t) -> (list Value.t) -> M. +Parameter foo : (list Ty.t) -> (list A.t) -> M. -Parameter bar : (list Ty.t) -> (list Value.t) -> M. +Parameter bar : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_dsl.v b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_dsl.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_dsl.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_dsl.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_overload.v b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_overload.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_overload.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_overload.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_repeat.v b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_repeat.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_repeat.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_repeat.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_variadic_interfaces.v b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_variadic_interfaces.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_variadic_interfaces.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/macro_rules/macro_rules_variadic_interfaces.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/modules/struct_visibility.v b/CoqOfRust/examples/axiomatized/examples/rust_book/modules/struct_visibility.v index d37e0fb61..2c79bd70c 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/modules/struct_visibility.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/modules/struct_visibility.v @@ -20,10 +20,10 @@ Module my. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "struct_visibility::my::ClosedBox") [ T ]. - Parameter new : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter new : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "new" (new T). End Impl_struct_visibility_my_ClosedBox_T. End my. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/modules/super_and_self.v b/CoqOfRust/examples/axiomatized/examples/rust_book/modules/super_and_self.v index 6b41ba686..eb755ae5a 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/modules/super_and_self.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/modules/super_and_self.v @@ -1,20 +1,20 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter function : (list Ty.t) -> (list Value.t) -> M. +Parameter function : (list Ty.t) -> (list A.t) -> M. Module cool. - Parameter function : (list Ty.t) -> (list Value.t) -> M. + Parameter function : (list Ty.t) -> (list A.t) -> M. End cool. Module my. - Parameter function : (list Ty.t) -> (list Value.t) -> M. + Parameter function : (list Ty.t) -> (list A.t) -> M. Module cool. - Parameter function : (list Ty.t) -> (list Value.t) -> M. + Parameter function : (list Ty.t) -> (list A.t) -> M. End cool. - Parameter indirect_call : (list Ty.t) -> (list Value.t) -> M. + Parameter indirect_call : (list Ty.t) -> (list A.t) -> M. End my. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/modules/the_use_as_declaration.v b/CoqOfRust/examples/axiomatized/examples/rust_book/modules/the_use_as_declaration.v index 0fa9a2673..a4ecaa947 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/modules/the_use_as_declaration.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/modules/the_use_as_declaration.v @@ -1,12 +1,12 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter function : (list Ty.t) -> (list Value.t) -> M. +Parameter function : (list Ty.t) -> (list A.t) -> M. Module deeply. Module nested. - Parameter function : (list Ty.t) -> (list Value.t) -> M. + Parameter function : (list Ty.t) -> (list A.t) -> M. End nested. End deeply. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/modules/visibility.v b/CoqOfRust/examples/axiomatized/examples/rust_book/modules/visibility.v index 841e44901..03e298d58 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/modules/visibility.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/modules/visibility.v @@ -2,35 +2,35 @@ Require Import CoqOfRust.CoqOfRust. Module my_mod. - Parameter private_function : (list Ty.t) -> (list Value.t) -> M. + Parameter private_function : (list Ty.t) -> (list A.t) -> M. - Parameter function : (list Ty.t) -> (list Value.t) -> M. + Parameter function : (list Ty.t) -> (list A.t) -> M. - Parameter indirect_access : (list Ty.t) -> (list Value.t) -> M. + Parameter indirect_access : (list Ty.t) -> (list A.t) -> M. Module nested. - Parameter function : (list Ty.t) -> (list Value.t) -> M. + Parameter function : (list Ty.t) -> (list A.t) -> M. - Parameter private_function : (list Ty.t) -> (list Value.t) -> M. + Parameter private_function : (list Ty.t) -> (list A.t) -> M. - Parameter public_function_in_my_mod : (list Ty.t) -> (list Value.t) -> M. + Parameter public_function_in_my_mod : (list Ty.t) -> (list A.t) -> M. - Parameter public_function_in_nested : (list Ty.t) -> (list Value.t) -> M. + Parameter public_function_in_nested : (list Ty.t) -> (list A.t) -> M. - Parameter public_function_in_super_mod : (list Ty.t) -> (list Value.t) -> M. + Parameter public_function_in_super_mod : (list Ty.t) -> (list A.t) -> M. End nested. - Parameter call_public_function_in_my_mod : (list Ty.t) -> (list Value.t) -> M. + Parameter call_public_function_in_my_mod : (list Ty.t) -> (list A.t) -> M. - Parameter public_function_in_crate : (list Ty.t) -> (list Value.t) -> M. + Parameter public_function_in_crate : (list Ty.t) -> (list A.t) -> M. Module private_nested. - Parameter function : (list Ty.t) -> (list Value.t) -> M. + Parameter function : (list Ty.t) -> (list A.t) -> M. - Parameter restricted_function : (list Ty.t) -> (list Value.t) -> M. + Parameter restricted_function : (list Ty.t) -> (list A.t) -> M. End private_nested. End my_mod. -Parameter function : (list Ty.t) -> (list Value.t) -> M. +Parameter function : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/arrays_and_slices.v b/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/arrays_and_slices.v index cd1e4ad4a..87b7d5ad8 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/arrays_and_slices.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/arrays_and_slices.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter analyze_slice : (list Ty.t) -> (list Value.t) -> M. +Parameter analyze_slice : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/compound_types.v b/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/compound_types.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/compound_types.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/compound_types.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/literals_operators.v b/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/literals_operators.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/literals_operators.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/literals_operators.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/tuples.v b/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/tuples.v index e4f3a827b..c1e40a583 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/tuples.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/primitives/tuples.v @@ -1,7 +1,7 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter reverse : (list Ty.t) -> (list Value.t) -> M. +Parameter reverse : (list Ty.t) -> (list A.t) -> M. (* StructTuple { @@ -13,7 +13,7 @@ Parameter reverse : (list Ty.t) -> (list Value.t) -> M. Module Impl_core_fmt_Debug_for_tuples_Matrix. Definition Self : Ty.t := Ty.path "tuples::Matrix". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -23,4 +23,4 @@ Module Impl_core_fmt_Debug_for_tuples_Matrix. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_tuples_Matrix. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing.v index 655dce63d..b6e61f967 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter eat_box_i32 : (list Ty.t) -> (list Value.t) -> M. +Parameter eat_box_i32 : (list Ty.t) -> (list A.t) -> M. -Parameter borrow_i32 : (list Ty.t) -> (list Value.t) -> M. +Parameter borrow_i32 : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_aliasing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_aliasing.v index 6c232c5a8..0b17b586d 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_aliasing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_aliasing.v @@ -8,4 +8,4 @@ Require Import CoqOfRust.CoqOfRust. fields := [ ("x", Ty.path "i32"); ("y", Ty.path "i32"); ("z", Ty.path "i32") ]; } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_mutablity.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_mutablity.v index 04dfbcfd9..42601cbdc 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_mutablity.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_mutablity.v @@ -16,7 +16,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_clone_Clone_for_scoping_rules_borrowing_mutablity_Book. Definition Self : Ty.t := Ty.path "scoping_rules_borrowing_mutablity::Book". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -33,8 +33,8 @@ Module Impl_core_marker_Copy_for_scoping_rules_borrowing_mutablity_Book. M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) []. End Impl_core_marker_Copy_for_scoping_rules_borrowing_mutablity_Book. -Parameter borrow_book : (list Ty.t) -> (list Value.t) -> M. +Parameter borrow_book : (list Ty.t) -> (list A.t) -> M. -Parameter new_edition : (list Ty.t) -> (list Value.t) -> M. +Parameter new_edition : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_the_ref_pattern.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_the_ref_pattern.v index 78e76eaf3..9040f124e 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_the_ref_pattern.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_borrowing_the_ref_pattern.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_clone_Clone_for_scoping_rules_borrowing_the_ref_pattern_Point. Definition Self : Ty.t := Ty.path "scoping_rules_borrowing_the_ref_pattern::Point". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -28,4 +28,4 @@ Module Impl_core_marker_Copy_for_scoping_rules_borrowing_the_ref_pattern_Point. M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) []. End Impl_core_marker_Copy_for_scoping_rules_borrowing_the_ref_pattern_Point. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_bounds.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_bounds.v index 78d89c3c0..b42e64327 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_bounds.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_bounds.v @@ -12,7 +12,7 @@ Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_scoping_rules_lifetimes_bo Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "scoping_rules_lifetimes_bounds::Ref") [ T ]. - Parameter fmt : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T : Ty.t), @@ -23,8 +23,8 @@ Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_scoping_rules_lifetimes_bo (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ]. End Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_scoping_rules_lifetimes_bounds_Ref_T. -Parameter print : (list Ty.t) -> (list Value.t) -> M. +Parameter print : (list Ty.t) -> (list A.t) -> M. -Parameter print_ref : (list Ty.t) -> (list Value.t) -> M. +Parameter print_ref : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_coercion.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_coercion.v index 1b8e7700e..c94d460b7 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_coercion.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_coercion.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter multiply : (list Ty.t) -> (list Value.t) -> M. +Parameter multiply : (list Ty.t) -> (list A.t) -> M. -Parameter choose_first : (list Ty.t) -> (list Value.t) -> M. +Parameter choose_first : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_elision.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_elision.v index 2d3e1f433..fc006c7c5 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_elision.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_elision.v @@ -1,12 +1,12 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter elided_input : (list Ty.t) -> (list Value.t) -> M. +Parameter elided_input : (list Ty.t) -> (list A.t) -> M. -Parameter annotated_input : (list Ty.t) -> (list Value.t) -> M. +Parameter annotated_input : (list Ty.t) -> (list A.t) -> M. -Parameter elided_pass : (list Ty.t) -> (list Value.t) -> M. +Parameter elided_pass : (list Ty.t) -> (list A.t) -> M. -Parameter annotated_pass : (list Ty.t) -> (list Value.t) -> M. +Parameter annotated_pass : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_functions.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_functions.v index 7b3dd52d8..4226fd229 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_functions.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_functions.v @@ -1,12 +1,12 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter print_one : (list Ty.t) -> (list Value.t) -> M. +Parameter print_one : (list Ty.t) -> (list A.t) -> M. -Parameter add_one : (list Ty.t) -> (list Value.t) -> M. +Parameter add_one : (list Ty.t) -> (list A.t) -> M. -Parameter print_multi : (list Ty.t) -> (list Value.t) -> M. +Parameter print_multi : (list Ty.t) -> (list A.t) -> M. -Parameter pass_x : (list Ty.t) -> (list Value.t) -> M. +Parameter pass_x : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_methods.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_methods.v index 589147a0a..4ce7fc2ee 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_methods.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_methods.v @@ -11,13 +11,13 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_scoping_rules_lifetimes_methods_Owner. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_methods::Owner". - Parameter add_one : (list Ty.t) -> (list Value.t) -> M. + Parameter add_one : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_add_one : M.IsAssociatedFunction Self "add_one" add_one. - Parameter print : (list Ty.t) -> (list Value.t) -> M. + Parameter print : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_print : M.IsAssociatedFunction Self "print" print. End Impl_scoping_rules_lifetimes_methods_Owner. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_reference_lifetime_static.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_reference_lifetime_static.v index 529acb278..617f13d8a 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_reference_lifetime_static.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_reference_lifetime_static.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter value_NUM : Value.t. +Parameter value_NUM : A.t. -Parameter coerce_static : (list Ty.t) -> (list Value.t) -> M. +Parameter coerce_static : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_structs.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_structs.v index bd1358155..a265b030b 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_structs.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_structs.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Borrowed. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_structs::Borrowed". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -35,7 +35,7 @@ End Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Borrowed. Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_NamedBorrowed. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_structs::NamedBorrowed". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -68,7 +68,7 @@ Enum Either Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Either. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_structs::Either". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -78,4 +78,4 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Either. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Either. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_traits.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_traits.v index 0f6934780..03cc307ee 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_traits.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_lifetimes_traits.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_traits_Borrowed. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_traits::Borrowed". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_fmt_Debug_for_scoping_rules_lifetimes_traits_Borrowed. Module Impl_core_default_Default_for_scoping_rules_lifetimes_traits_Borrowed. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_traits::Borrowed". - Parameter default : (list Ty.t) -> (list Value.t) -> M. + Parameter default : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -34,4 +34,4 @@ Module Impl_core_default_Default_for_scoping_rules_lifetimes_traits_Borrowed. (* Instance *) [ ("default", InstanceField.Method default) ]. End Impl_core_default_Default_for_scoping_rules_lifetimes_traits_Borrowed. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules.v index 30ebc2e3f..a3a48eb67 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter destroy_box : (list Ty.t) -> (list Value.t) -> M. +Parameter destroy_box : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_mutablity.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_mutablity.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_mutablity.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_mutablity.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_partial_moves.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_partial_moves.v index 743408cc1..637a5ef1f 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_partial_moves.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_partial_moves.v @@ -1,7 +1,7 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. Module main. (* StructRecord @@ -20,7 +20,7 @@ Module main. Definition Self : Ty.t := Ty.path "scoping_rules_ownership_and_rules_partial_moves::main::Person". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_raii.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_raii.v index 8ad20f92b..bbb8eeb2e 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_raii.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_raii.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter create_box : (list Ty.t) -> (list Value.t) -> M. +Parameter create_box : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_raii_desctructor.v b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_raii_desctructor.v index 30ffcf011..492e42104 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_raii_desctructor.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/scoping_rules/scoping_rules_raii_desctructor.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_ops_drop_Drop_for_scoping_rules_raii_desctructor_ToDrop. Definition Self : Ty.t := Ty.path "scoping_rules_raii_desctructor::ToDrop". - Parameter drop : (list Ty.t) -> (list Value.t) -> M. + Parameter drop : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -21,4 +21,4 @@ Module Impl_core_ops_drop_Drop_for_scoping_rules_raii_desctructor_ToDrop. (* Instance *) [ ("drop", InstanceField.Method drop) ]. End Impl_core_ops_drop_Drop_for_scoping_rules_raii_desctructor_ToDrop. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/arc.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/arc.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/arc.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/arc.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/box_stack_heap.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/box_stack_heap.v index 41e971168..c43789da3 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/box_stack_heap.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/box_stack_heap.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_box_stack_heap_Point. Definition Self : Ty.t := Ty.path "box_stack_heap::Point". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_fmt_Debug_for_box_stack_heap_Point. Module Impl_core_clone_Clone_for_box_stack_heap_Point. Definition Self : Ty.t := Ty.path "box_stack_heap::Point". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -52,8 +52,8 @@ End Impl_core_marker_Copy_for_box_stack_heap_Point. ]; } *) -Parameter origin : (list Ty.t) -> (list Value.t) -> M. +Parameter origin : (list Ty.t) -> (list A.t) -> M. -Parameter boxed_origin : (list Ty.t) -> (list Value.t) -> M. +Parameter boxed_origin : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map.v index 774d40789..ae05cfdb1 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter call : (list Ty.t) -> (list Value.t) -> M. +Parameter call : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map_alternate_or_custom_key_types.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map_alternate_or_custom_key_types.v index 36b98776a..da89e53db 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map_alternate_or_custom_key_types.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map_alternate_or_custom_key_types.v @@ -26,7 +26,7 @@ End Impl_core_marker_StructuralPartialEq_for_hash_map_alternate_or_custom_key_ty Module Impl_core_cmp_PartialEq_for_hash_map_alternate_or_custom_key_types_Account. Definition Self : Ty.t := Ty.path "hash_map_alternate_or_custom_key_types::Account". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -50,7 +50,7 @@ End Impl_core_marker_StructuralEq_for_hash_map_alternate_or_custom_key_types_Acc Module Impl_core_cmp_Eq_for_hash_map_alternate_or_custom_key_types_Account. Definition Self : Ty.t := Ty.path "hash_map_alternate_or_custom_key_types::Account". - Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter assert_receiver_is_total_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -64,7 +64,7 @@ End Impl_core_cmp_Eq_for_hash_map_alternate_or_custom_key_types_Account. Module Impl_core_hash_Hash_for_hash_map_alternate_or_custom_key_types_Account. Definition Self : Ty.t := Ty.path "hash_map_alternate_or_custom_key_types::Account". - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Parameter hash : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -95,6 +95,6 @@ Axiom Accounts : Ty.path "std::hash::random::RandomState" ]). -Parameter try_logon : (list Ty.t) -> (list Value.t) -> M. +Parameter try_logon : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map_hash_set.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map_hash_set.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map_hash_set.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/hash_map_hash_set.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/option.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/option.v index a0a043304..ff4ce5ee5 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/option.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/option.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter checked_division : (list Ty.t) -> (list Value.t) -> M. +Parameter checked_division : (list Ty.t) -> (list A.t) -> M. -Parameter try_division : (list Ty.t) -> (list Value.t) -> M. +Parameter try_division : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/panic.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/panic.v index 0d561a349..39e256651 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/panic.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/panic.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter division : (list Ty.t) -> (list Value.t) -> M. +Parameter division : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/rc.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/rc.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/rc.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/rc.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/result.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/result.v index 4e432da29..ea34484a1 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/result.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/result.v @@ -30,7 +30,7 @@ Module checked. Module Impl_core_fmt_Debug_for_result_checked_MathError. Definition Self : Ty.t := Ty.path "result::checked::MathError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -46,13 +46,13 @@ Module checked. (Ty.path "core::result::Result") [ Ty.path "f64"; Ty.path "result::checked::MathError" ]). - Parameter div : (list Ty.t) -> (list Value.t) -> M. + Parameter div : (list Ty.t) -> (list A.t) -> M. - Parameter sqrt : (list Ty.t) -> (list Value.t) -> M. + Parameter sqrt : (list Ty.t) -> (list A.t) -> M. - Parameter ln : (list Ty.t) -> (list Value.t) -> M. + Parameter ln : (list Ty.t) -> (list A.t) -> M. End checked. -Parameter op : (list Ty.t) -> (list Value.t) -> M. +Parameter op : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/result_chaining_with_question_mark.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/result_chaining_with_question_mark.v index 71f533fd7..3d0316cec 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/result_chaining_with_question_mark.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/result_chaining_with_question_mark.v @@ -30,7 +30,7 @@ Module checked. Module Impl_core_fmt_Debug_for_result_chaining_with_question_mark_checked_MathError. Definition Self : Ty.t := Ty.path "result_chaining_with_question_mark::checked::MathError". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -46,15 +46,15 @@ Module checked. (Ty.path "core::result::Result") [ Ty.path "f64"; Ty.path "result_chaining_with_question_mark::checked::MathError" ]). - Parameter div : (list Ty.t) -> (list Value.t) -> M. + Parameter div : (list Ty.t) -> (list A.t) -> M. - Parameter sqrt : (list Ty.t) -> (list Value.t) -> M. + Parameter sqrt : (list Ty.t) -> (list A.t) -> M. - Parameter ln : (list Ty.t) -> (list Value.t) -> M. + Parameter ln : (list Ty.t) -> (list A.t) -> M. - Parameter op_ : (list Ty.t) -> (list Value.t) -> M. + Parameter op_ : (list Ty.t) -> (list A.t) -> M. - Parameter op : (list Ty.t) -> (list Value.t) -> M. + Parameter op : (list Ty.t) -> (list A.t) -> M. End checked. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_byte_strings_as_non_utf8.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_byte_strings_as_non_utf8.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_byte_strings_as_non_utf8.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_byte_strings_as_non_utf8.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_literals_and_escapes.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_literals_and_escapes.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_literals_and_escapes.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_literals_and_escapes.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_raw_string_literals.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_raw_string_literals.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_raw_string_literals.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/strings_raw_string_literals.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/vectors.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/vectors.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/vectors.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_library_types/vectors.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/channels.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/channels.v index 078b67d5a..366509fdd 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/channels.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/channels.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter value_NTHREADS : Value.t. +Parameter value_NTHREADS : A.t. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes_pipes.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes_pipes.v index 146ae9caa..08b8ccdc9 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes_pipes.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes_pipes.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter value_PANGRAM : Value.t. +Parameter value_PANGRAM : A.t. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes_wait.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes_wait.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes_wait.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/child_processes_wait.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_create.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_create.v index c53119360..48ede2750 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_create.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_create.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter value_LOREM_IPSUM : Value.t. +Parameter value_LOREM_IPSUM : A.t. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_open.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_open.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_open.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_open.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_read_lines.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_read_lines.v index 73847250a..6c2342da9 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_read_lines.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_read_lines.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter read_lines : (list Ty.t) -> (list Value.t) -> M. +Parameter read_lines : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_read_lines_efficient_method.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_read_lines_efficient_method.v index 73847250a..6c2342da9 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_read_lines_efficient_method.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/file_io_read_lines_efficient_method.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter read_lines : (list Ty.t) -> (list Value.t) -> M. +Parameter read_lines : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/filesystem_operations.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/filesystem_operations.v index 97580ab1b..746076d14 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/filesystem_operations.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/filesystem_operations.v @@ -1,10 +1,10 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter cat : (list Ty.t) -> (list Value.t) -> M. +Parameter cat : (list Ty.t) -> (list A.t) -> M. -Parameter echo : (list Ty.t) -> (list Value.t) -> M. +Parameter echo : (list Ty.t) -> (list A.t) -> M. -Parameter touch : (list Ty.t) -> (list Value.t) -> M. +Parameter touch : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/foreign_function_interface.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/foreign_function_interface.v index 70da26a20..49b7da536 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/foreign_function_interface.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/foreign_function_interface.v @@ -3,9 +3,9 @@ Require Import CoqOfRust.CoqOfRust. (* Unhandled foreign module here *) -Parameter cos : (list Ty.t) -> (list Value.t) -> M. +Parameter cos : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. (* StructRecord { @@ -17,7 +17,7 @@ Parameter main : (list Ty.t) -> (list Value.t) -> M. Module Impl_core_clone_Clone_for_foreign_function_interface_Complex. Definition Self : Ty.t := Ty.path "foreign_function_interface::Complex". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -37,7 +37,7 @@ End Impl_core_marker_Copy_for_foreign_function_interface_Complex. Module Impl_core_fmt_Debug_for_foreign_function_interface_Complex. Definition Self : Ty.t := Ty.path "foreign_function_interface::Complex". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/path.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/path.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/path.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/path.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/program_arguments.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/program_arguments.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/program_arguments.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/program_arguments.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/program_arguments_parsing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/program_arguments_parsing.v index d54ec7172..918d0a701 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/program_arguments_parsing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/program_arguments_parsing.v @@ -1,10 +1,10 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter increase : (list Ty.t) -> (list Value.t) -> M. +Parameter increase : (list Ty.t) -> (list A.t) -> M. -Parameter decrease : (list Ty.t) -> (list Value.t) -> M. +Parameter decrease : (list Ty.t) -> (list A.t) -> M. -Parameter help : (list Ty.t) -> (list Value.t) -> M. +Parameter help : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/threads.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/threads.v index 078b67d5a..366509fdd 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/threads.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/threads.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter value_NTHREADS : Value.t. +Parameter value_NTHREADS : A.t. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/threads_test_case_map_reduce.v b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/threads_test_case_map_reduce.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/threads_test_case_map_reduce.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/std_misc/threads_test_case_map_reduce.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/testing/documentation_testing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/testing/documentation_testing.v index c6a606ada..22146c591 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/testing/documentation_testing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/testing/documentation_testing.v @@ -1,6 +1,6 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter add : (list Ty.t) -> (list Value.t) -> M. +Parameter add : (list Ty.t) -> (list A.t) -> M. -Parameter div : (list Ty.t) -> (list Value.t) -> M. +Parameter div : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/testing/unit_testing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/testing/unit_testing.v index dd3b6359d..e6a3bd907 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/testing/unit_testing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/testing/unit_testing.v @@ -1,12 +1,12 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter add : (list Ty.t) -> (list Value.t) -> M. +Parameter add : (list Ty.t) -> (list A.t) -> M. -Parameter bad_add : (list Ty.t) -> (list Value.t) -> M. +Parameter bad_add : (list Ty.t) -> (list A.t) -> M. Module tests. - Parameter test_add : (list Ty.t) -> (list Value.t) -> M. + Parameter test_add : (list Ty.t) -> (list A.t) -> M. - Parameter test_bad_add : (list Ty.t) -> (list Value.t) -> M. + Parameter test_bad_add : (list Ty.t) -> (list A.t) -> M. End tests. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/clone.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/clone.v index 0eba4b298..0f68dfa66 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/clone.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/clone.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_clone_Unit. Definition Self : Ty.t := Ty.path "clone::Unit". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -24,7 +24,7 @@ End Impl_core_fmt_Debug_for_clone_Unit. Module Impl_core_clone_Clone_for_clone_Unit. Definition Self : Ty.t := Ty.path "clone::Unit". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -55,7 +55,7 @@ End Impl_core_marker_Copy_for_clone_Unit. Module Impl_core_clone_Clone_for_clone_Pair. Definition Self : Ty.t := Ty.path "clone::Pair". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -68,7 +68,7 @@ End Impl_core_clone_Clone_for_clone_Pair. Module Impl_core_fmt_Debug_for_clone_Pair. Definition Self : Ty.t := Ty.path "clone::Pair". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -78,4 +78,4 @@ Module Impl_core_fmt_Debug_for_clone_Pair. (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. End Impl_core_fmt_Debug_for_clone_Pair. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/derive.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/derive.v index 081936625..3f76fc49d 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/derive.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/derive.v @@ -22,7 +22,7 @@ End Impl_core_marker_StructuralPartialEq_for_derive_Centimeters. Module Impl_core_cmp_PartialEq_for_derive_Centimeters. Definition Self : Ty.t := Ty.path "derive::Centimeters". - Parameter eq : (list Ty.t) -> (list Value.t) -> M. + Parameter eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -35,7 +35,7 @@ End Impl_core_cmp_PartialEq_for_derive_Centimeters. Module Impl_core_cmp_PartialOrd_for_derive_Centimeters. Definition Self : Ty.t := Ty.path "derive::Centimeters". - Parameter partial_cmp : (list Ty.t) -> (list Value.t) -> M. + Parameter partial_cmp : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -55,7 +55,7 @@ End Impl_core_cmp_PartialOrd_for_derive_Centimeters. Module Impl_core_fmt_Debug_for_derive_Inches. Definition Self : Ty.t := Ty.path "derive::Inches". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -68,7 +68,7 @@ End Impl_core_fmt_Debug_for_derive_Inches. Module Impl_derive_Inches. Definition Self : Ty.t := Ty.path "derive::Inches". - Parameter to_centimeters : (list Ty.t) -> (list Value.t) -> M. + Parameter to_centimeters : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_to_centimeters : M.IsAssociatedFunction Self "to_centimeters" to_centimeters. @@ -81,4 +81,4 @@ End Impl_derive_Inches. fields := [ Ty.path "i32" ]; } *) -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/disambiguating_overlapping_traits.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/disambiguating_overlapping_traits.v index 12b3475a9..8996336f3 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/disambiguating_overlapping_traits.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/disambiguating_overlapping_traits.v @@ -17,7 +17,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_disambiguating_overlapping_traits_UsernameWidget_for_disambiguating_overlapping_traits_Form. Definition Self : Ty.t := Ty.path "disambiguating_overlapping_traits::Form". - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -30,7 +30,7 @@ End Impl_disambiguating_overlapping_traits_UsernameWidget_for_disambiguating_ove Module Impl_disambiguating_overlapping_traits_AgeWidget_for_disambiguating_overlapping_traits_Form. Definition Self : Ty.t := Ty.path "disambiguating_overlapping_traits::Form". - Parameter get : (list Ty.t) -> (list Value.t) -> M. + Parameter get : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -40,4 +40,4 @@ Module Impl_disambiguating_overlapping_traits_AgeWidget_for_disambiguating_overl (* Instance *) [ ("get", InstanceField.Method get) ]. End Impl_disambiguating_overlapping_traits_AgeWidget_for_disambiguating_overlapping_traits_Form. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/drop.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/drop.v index 75fc1f013..fe0641854 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/drop.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/drop.v @@ -11,7 +11,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_ops_drop_Drop_for_drop_Droppable. Definition Self : Ty.t := Ty.path "drop::Droppable". - Parameter drop : (list Ty.t) -> (list Value.t) -> M. + Parameter drop : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -21,4 +21,4 @@ Module Impl_core_ops_drop_Drop_for_drop_Droppable. (* Instance *) [ ("drop", InstanceField.Method drop) ]. End Impl_core_ops_drop_Drop_for_drop_Droppable. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/hash.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/hash.v index 55a299105..b086ea32d 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/hash.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/hash.v @@ -13,7 +13,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_hash_Hash_for_hash_Person. Definition Self : Ty.t := Ty.path "hash::Person". - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Parameter hash : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -23,6 +23,6 @@ Module Impl_core_hash_Hash_for_hash_Person. (* Instance *) [ ("hash", InstanceField.Method hash) ]. End Impl_core_hash_Hash_for_hash_Person. -Parameter calculate_hash : (list Ty.t) -> (list Value.t) -> M. +Parameter calculate_hash : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/impl_trait_as_return_type.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/impl_trait_as_return_type.v index 79e3c7930..36600aba8 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/impl_trait_as_return_type.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/impl_trait_as_return_type.v @@ -1,12 +1,12 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter combine_vecs_explicit_return_type : (list Ty.t) -> (list Value.t) -> M. +Parameter combine_vecs_explicit_return_type : (list Ty.t) -> (list A.t) -> M. -Parameter combine_vecs : (list Ty.t) -> (list Value.t) -> M. +Parameter combine_vecs : (list Ty.t) -> (list A.t) -> M. Module combine_vecs. (* Error OpaqueTy *) End combine_vecs. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/iterators.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/iterators.v index 38b593180..9e41caa99 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/iterators.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/iterators.v @@ -13,7 +13,7 @@ Module Impl_core_iter_traits_iterator_Iterator_for_iterators_Fibonacci. Definition _Item : Ty.t := Ty.path "u32". - Parameter next : (list Ty.t) -> (list Value.t) -> M. + Parameter next : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -23,6 +23,6 @@ Module Impl_core_iter_traits_iterator_Iterator_for_iterators_Fibonacci. (* Instance *) [ ("Item", InstanceField.Ty _Item); ("next", InstanceField.Method next) ]. End Impl_core_iter_traits_iterator_Iterator_for_iterators_Fibonacci. -Parameter fibonacci : (list Ty.t) -> (list Value.t) -> M. +Parameter fibonacci : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/operator_overloading.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/operator_overloading.v index c67709f5e..ac4982f57 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/operator_overloading.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/operator_overloading.v @@ -25,7 +25,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_core_fmt_Debug_for_operator_overloading_FooBar. Definition Self : Ty.t := Ty.path "operator_overloading::FooBar". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -45,7 +45,7 @@ End Impl_core_fmt_Debug_for_operator_overloading_FooBar. Module Impl_core_fmt_Debug_for_operator_overloading_BarFoo. Definition Self : Ty.t := Ty.path "operator_overloading::BarFoo". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -60,7 +60,7 @@ Module Impl_core_ops_arith_Add_operator_overloading_Bar_for_operator_overloading Definition _Output : Ty.t := Ty.path "operator_overloading::FooBar". - Parameter add : (list Ty.t) -> (list Value.t) -> M. + Parameter add : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -75,7 +75,7 @@ Module Impl_core_ops_arith_Add_operator_overloading_Foo_for_operator_overloading Definition _Output : Ty.t := Ty.path "operator_overloading::BarFoo". - Parameter add : (list Ty.t) -> (list Value.t) -> M. + Parameter add : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -85,4 +85,4 @@ Module Impl_core_ops_arith_Add_operator_overloading_Foo_for_operator_overloading (* Instance *) [ ("Output", InstanceField.Ty _Output); ("add", InstanceField.Method add) ]. End Impl_core_ops_arith_Add_operator_overloading_Foo_for_operator_overloading_Bar. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/returning_traits_with_dyn.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/returning_traits_with_dyn.v index f02cb5ca7..3da70a24f 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/returning_traits_with_dyn.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/returning_traits_with_dyn.v @@ -21,7 +21,7 @@ Require Import CoqOfRust.CoqOfRust. Module Impl_returning_traits_with_dyn_Animal_for_returning_traits_with_dyn_Sheep. Definition Self : Ty.t := Ty.path "returning_traits_with_dyn::Sheep". - Parameter noise : (list Ty.t) -> (list Value.t) -> M. + Parameter noise : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -34,7 +34,7 @@ End Impl_returning_traits_with_dyn_Animal_for_returning_traits_with_dyn_Sheep. Module Impl_returning_traits_with_dyn_Animal_for_returning_traits_with_dyn_Cow. Definition Self : Ty.t := Ty.path "returning_traits_with_dyn::Cow". - Parameter noise : (list Ty.t) -> (list Value.t) -> M. + Parameter noise : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -44,6 +44,6 @@ Module Impl_returning_traits_with_dyn_Animal_for_returning_traits_with_dyn_Cow. (* Instance *) [ ("noise", InstanceField.Method noise) ]. End Impl_returning_traits_with_dyn_Animal_for_returning_traits_with_dyn_Cow. -Parameter random_animal : (list Ty.t) -> (list Value.t) -> M. +Parameter random_animal : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/supertraits.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/supertraits.v index a0866c821..59c2bfd84 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/supertraits.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/supertraits.v @@ -13,6 +13,6 @@ Require Import CoqOfRust.CoqOfRust. (* Trait *) (* Empty module 'CompSciStudent' *) -Parameter comp_sci_student_greeting : (list Ty.t) -> (list Value.t) -> M. +Parameter comp_sci_student_greeting : (list Ty.t) -> (list A.t) -> M. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/traits.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/traits.v index 004a3910a..e749570a0 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/traits.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/traits.v @@ -10,7 +10,7 @@ Require Import CoqOfRust.CoqOfRust. (* Trait *) Module Animal. - Parameter talk : (list Ty.t) -> (list Value.t) -> M. + Parameter talk : (list Ty.t) -> (list A.t) -> M. Axiom ProvidedMethod_talk : M.IsProvidedMethod "traits::Animal" "talk" talk. End Animal. @@ -18,10 +18,10 @@ End Animal. Module Impl_traits_Sheep. Definition Self : Ty.t := Ty.path "traits::Sheep". - Parameter is_naked : (list Ty.t) -> (list Value.t) -> M. + Parameter is_naked : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_is_naked : M.IsAssociatedFunction Self "is_naked" is_naked. - Parameter shear : (list Ty.t) -> (list Value.t) -> M. + Parameter shear : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_shear : M.IsAssociatedFunction Self "shear" shear. End Impl_traits_Sheep. @@ -29,13 +29,13 @@ End Impl_traits_Sheep. Module Impl_traits_Animal_for_traits_Sheep. Definition Self : Ty.t := Ty.path "traits::Sheep". - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Parameter new : (list Ty.t) -> (list A.t) -> M. - Parameter name : (list Ty.t) -> (list Value.t) -> M. + Parameter name : (list Ty.t) -> (list A.t) -> M. - Parameter noise : (list Ty.t) -> (list Value.t) -> M. + Parameter noise : (list Ty.t) -> (list A.t) -> M. - Parameter talk : (list Ty.t) -> (list Value.t) -> M. + Parameter talk : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -52,4 +52,4 @@ Module Impl_traits_Animal_for_traits_Sheep. End Impl_traits_Animal_for_traits_Sheep. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/traits_parms.v b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/traits_parms.v index 1b69243ac..436712523 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/traits/traits_parms.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/traits/traits_parms.v @@ -46,7 +46,7 @@ Module Impl_traits_parms_SomeTrait_for_traits_parms_SomeOtherType. Definition _SomeType : Ty.t := Ty.path "traits_parms::SomeOtherType". - Parameter some_fn : (list Ty.t) -> (list Value.t) -> M. + Parameter some_fn : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/types/aliasing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/types/aliasing.v index 627462428..0f466fdbf 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/types/aliasing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/types/aliasing.v @@ -7,4 +7,4 @@ Axiom Inch : (Ty.path "aliasing::Inch") = (Ty.path "u64"). Axiom U64 : (Ty.path "aliasing::U64") = (Ty.path "u64"). -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/types/casting.v b/CoqOfRust/examples/axiomatized/examples/rust_book/types/casting.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/types/casting.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/types/casting.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/types/inference.v b/CoqOfRust/examples/axiomatized/examples/rust_book/types/inference.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/types/inference.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/types/inference.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/types/literals.v b/CoqOfRust/examples/axiomatized/examples/rust_book/types/literals.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/types/literals.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/types/literals.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/calling_unsafe_functions.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/calling_unsafe_functions.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/calling_unsafe_functions.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/calling_unsafe_functions.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_clobbered_registers.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_clobbered_registers.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_clobbered_registers.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_clobbered_registers.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_explicit_register_operands.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_explicit_register_operands.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_explicit_register_operands.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_explicit_register_operands.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_implemented.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_implemented.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_implemented.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_implemented.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_non_used.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_non_used.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_non_used.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_non_used.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_mul.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_mul.v index ad481d140..55809e901 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_mul.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inlateout_mul.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. Module main. - Parameter mul : (list Ty.t) -> (list Value.t) -> M. + Parameter mul : (list Ty.t) -> (list A.t) -> M. End main. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inout.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inout.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inout.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inout.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example_without_mov.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example_without_mov.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example_without_mov.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example_without_mov.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_labels.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_labels.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_labels.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_labels.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_memory_address_operands.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_memory_address_operands.v index 4bf2c70c6..c9b913c2c 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_memory_address_operands.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_memory_address_operands.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. Module main. - Parameter load_fpu_control_word : (list Ty.t) -> (list Value.t) -> M. + Parameter load_fpu_control_word : (list Ty.t) -> (list A.t) -> M. End main. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_options.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_options.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_options.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_options.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_register_template_modifiers.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_register_template_modifiers.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_register_template_modifiers.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_register_template_modifiers.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_scratch_register.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_scratch_register.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_scratch_register.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_scratch_register.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_symbol_operands_and_abi_clobbers.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_symbol_operands_and_abi_clobbers.v index 7731fb2af..d241e09ef 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_symbol_operands_and_abi_clobbers.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/inline_assembly_symbol_operands_and_abi_clobbers.v @@ -1,10 +1,10 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. Module main. - Parameter foo : (list Ty.t) -> (list Value.t) -> M. + Parameter foo : (list Ty.t) -> (list A.t) -> M. - Parameter call_foo : (list Ty.t) -> (list Value.t) -> M. + Parameter call_foo : (list Ty.t) -> (list A.t) -> M. End main. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/raw_pointers.v b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/raw_pointers.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/raw_pointers.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/unsafe_operations/raw_pointers.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/declare_first.v b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/declare_first.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/declare_first.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/declare_first.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/freezing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/freezing.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/freezing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/freezing.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/mutability.v b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/mutability.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/mutability.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/mutability.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/scope.v b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/scope.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/scope.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/scope.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/variable_bindings.v b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/variable_bindings.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/variable_bindings.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/variable_bindings.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/variable_shadowing.v b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/variable_shadowing.v index cb8f119b6..dd1e38c21 100644 --- a/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/variable_shadowing.v +++ b/CoqOfRust/examples/axiomatized/examples/rust_book/variable_bindings/variable_shadowing.v @@ -1,4 +1,4 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Parameter main : (list Ty.t) -> (list Value.t) -> M. +Parameter main : (list Ty.t) -> (list A.t) -> M. diff --git a/CoqOfRust/examples/axiomatized/examples/subtle.v b/CoqOfRust/examples/axiomatized/examples/subtle.v index 7ef7b576d..001a8e888 100644 --- a/CoqOfRust/examples/axiomatized/examples/subtle.v +++ b/CoqOfRust/examples/axiomatized/examples/subtle.v @@ -18,7 +18,7 @@ End Impl_core_marker_Copy_for_subtle_Choice. Module Impl_core_clone_Clone_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". - Parameter clone : (list Ty.t) -> (list Value.t) -> M. + Parameter clone : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -31,7 +31,7 @@ End Impl_core_clone_Clone_for_subtle_Choice. Module Impl_core_fmt_Debug_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". - Parameter fmt : (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -44,7 +44,7 @@ End Impl_core_fmt_Debug_for_subtle_Choice. Module Impl_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". - Parameter unwrap_u8 : (list Ty.t) -> (list Value.t) -> M. + Parameter unwrap_u8 : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_unwrap_u8 : M.IsAssociatedFunction Self "unwrap_u8" unwrap_u8. End Impl_subtle_Choice. @@ -52,7 +52,7 @@ End Impl_subtle_Choice. Module Impl_core_convert_From_subtle_Choice_for_bool. Definition Self : Ty.t := Ty.path "bool". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -67,7 +67,7 @@ Module Impl_core_ops_bit_BitAnd_for_subtle_Choice. Definition _Output : Ty.t := Ty.path "subtle::Choice". - Parameter bitand : (list Ty.t) -> (list Value.t) -> M. + Parameter bitand : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -81,7 +81,7 @@ End Impl_core_ops_bit_BitAnd_for_subtle_Choice. Module Impl_core_ops_bit_BitAndAssign_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". - Parameter bitand_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter bitand_assign : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -96,7 +96,7 @@ Module Impl_core_ops_bit_BitOr_for_subtle_Choice. Definition _Output : Ty.t := Ty.path "subtle::Choice". - Parameter bitor : (list Ty.t) -> (list Value.t) -> M. + Parameter bitor : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -110,7 +110,7 @@ End Impl_core_ops_bit_BitOr_for_subtle_Choice. Module Impl_core_ops_bit_BitOrAssign_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". - Parameter bitor_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter bitor_assign : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -125,7 +125,7 @@ Module Impl_core_ops_bit_BitXor_for_subtle_Choice. Definition _Output : Ty.t := Ty.path "subtle::Choice". - Parameter bitxor : (list Ty.t) -> (list Value.t) -> M. + Parameter bitxor : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -139,7 +139,7 @@ End Impl_core_ops_bit_BitXor_for_subtle_Choice. Module Impl_core_ops_bit_BitXorAssign_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". - Parameter bitxor_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter bitxor_assign : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -154,7 +154,7 @@ Module Impl_core_ops_bit_Not_for_subtle_Choice. Definition _Output : Ty.t := Ty.path "subtle::Choice". - Parameter not : (list Ty.t) -> (list Value.t) -> M. + Parameter not : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -164,12 +164,12 @@ Module Impl_core_ops_bit_Not_for_subtle_Choice. (* Instance *) [ ("Output", InstanceField.Ty _Output); ("not", InstanceField.Method not) ]. End Impl_core_ops_bit_Not_for_subtle_Choice. -Parameter black_box : (list Ty.t) -> (list Value.t) -> M. +Parameter black_box : (list Ty.t) -> (list A.t) -> M. Module Impl_core_convert_From_u8_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Parameter from : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -181,7 +181,7 @@ End Impl_core_convert_From_u8_for_subtle_Choice. (* Trait *) Module ConstantTimeEq. - Parameter ct_ne : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_ne : (list Ty.t) -> (list A.t) -> M. Axiom ProvidedMethod_ct_ne : M.IsProvidedMethod "subtle::ConstantTimeEq" "ct_ne" ct_ne. End ConstantTimeEq. @@ -189,7 +189,7 @@ End ConstantTimeEq. Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "slice") [ T ]. - Parameter ct_eq : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T : Ty.t), @@ -203,7 +203,7 @@ End Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. Module Impl_subtle_ConstantTimeEq_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -216,7 +216,7 @@ End Impl_subtle_ConstantTimeEq_for_subtle_Choice. Module Impl_subtle_ConstantTimeEq_for_u8. Definition Self : Ty.t := Ty.path "u8". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -229,7 +229,7 @@ End Impl_subtle_ConstantTimeEq_for_u8. Module Impl_subtle_ConstantTimeEq_for_i8. Definition Self : Ty.t := Ty.path "i8". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -242,7 +242,7 @@ End Impl_subtle_ConstantTimeEq_for_i8. Module Impl_subtle_ConstantTimeEq_for_u16. Definition Self : Ty.t := Ty.path "u16". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -255,7 +255,7 @@ End Impl_subtle_ConstantTimeEq_for_u16. Module Impl_subtle_ConstantTimeEq_for_i16. Definition Self : Ty.t := Ty.path "i16". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -268,7 +268,7 @@ End Impl_subtle_ConstantTimeEq_for_i16. Module Impl_subtle_ConstantTimeEq_for_u32. Definition Self : Ty.t := Ty.path "u32". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -281,7 +281,7 @@ End Impl_subtle_ConstantTimeEq_for_u32. Module Impl_subtle_ConstantTimeEq_for_i32. Definition Self : Ty.t := Ty.path "i32". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -294,7 +294,7 @@ End Impl_subtle_ConstantTimeEq_for_i32. Module Impl_subtle_ConstantTimeEq_for_u64. Definition Self : Ty.t := Ty.path "u64". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -307,7 +307,7 @@ End Impl_subtle_ConstantTimeEq_for_u64. Module Impl_subtle_ConstantTimeEq_for_i64. Definition Self : Ty.t := Ty.path "i64". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -320,7 +320,7 @@ End Impl_subtle_ConstantTimeEq_for_i64. Module Impl_subtle_ConstantTimeEq_for_usize. Definition Self : Ty.t := Ty.path "usize". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -333,7 +333,7 @@ End Impl_subtle_ConstantTimeEq_for_usize. Module Impl_subtle_ConstantTimeEq_for_isize. Definition Self : Ty.t := Ty.path "isize". - Parameter ct_eq : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -345,11 +345,11 @@ End Impl_subtle_ConstantTimeEq_for_isize. (* Trait *) Module ConditionallySelectable. - Parameter conditional_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_assign : (list Ty.t) -> (list A.t) -> M. Axiom ProvidedMethod_conditional_assign : M.IsProvidedMethod "subtle::ConditionallySelectable" "conditional_assign" conditional_assign. - Parameter conditional_swap : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_swap : (list Ty.t) -> (list A.t) -> M. Axiom ProvidedMethod_conditional_swap : M.IsProvidedMethod "subtle::ConditionallySelectable" "conditional_swap" conditional_swap. @@ -358,11 +358,11 @@ End ConditionallySelectable. Module Impl_subtle_ConditionallySelectable_for_u8. Definition Self : Ty.t := Ty.path "u8". - Parameter conditional_select : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_assign : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_swap : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_swap : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -380,11 +380,11 @@ End Impl_subtle_ConditionallySelectable_for_u8. Module Impl_subtle_ConditionallySelectable_for_i8. Definition Self : Ty.t := Ty.path "i8". - Parameter conditional_select : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_assign : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_swap : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_swap : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -402,11 +402,11 @@ End Impl_subtle_ConditionallySelectable_for_i8. Module Impl_subtle_ConditionallySelectable_for_u16. Definition Self : Ty.t := Ty.path "u16". - Parameter conditional_select : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_assign : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_swap : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_swap : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -424,11 +424,11 @@ End Impl_subtle_ConditionallySelectable_for_u16. Module Impl_subtle_ConditionallySelectable_for_i16. Definition Self : Ty.t := Ty.path "i16". - Parameter conditional_select : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_assign : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_swap : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_swap : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -446,11 +446,11 @@ End Impl_subtle_ConditionallySelectable_for_i16. Module Impl_subtle_ConditionallySelectable_for_u32. Definition Self : Ty.t := Ty.path "u32". - Parameter conditional_select : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_assign : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_swap : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_swap : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -468,11 +468,11 @@ End Impl_subtle_ConditionallySelectable_for_u32. Module Impl_subtle_ConditionallySelectable_for_i32. Definition Self : Ty.t := Ty.path "i32". - Parameter conditional_select : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_assign : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_swap : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_swap : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -490,11 +490,11 @@ End Impl_subtle_ConditionallySelectable_for_i32. Module Impl_subtle_ConditionallySelectable_for_u64. Definition Self : Ty.t := Ty.path "u64". - Parameter conditional_select : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_assign : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_swap : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_swap : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -512,11 +512,11 @@ End Impl_subtle_ConditionallySelectable_for_u64. Module Impl_subtle_ConditionallySelectable_for_i64. Definition Self : Ty.t := Ty.path "i64". - Parameter conditional_select : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_assign : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_assign : (list Ty.t) -> (list A.t) -> M. - Parameter conditional_swap : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_swap : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -534,7 +534,7 @@ End Impl_subtle_ConditionallySelectable_for_i64. Module Impl_subtle_ConditionallySelectable_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". - Parameter conditional_select : (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -550,7 +550,7 @@ End Impl_subtle_ConditionallySelectable_for_subtle_Choice. Module Impl_subtle_ConditionallyNegatable_where_subtle_ConditionallySelectable_T_where_core_ops_arith_Neg_ref__T_for_T. Definition Self (T : Ty.t) : Ty.t := T. - Parameter conditional_negate : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_negate : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T : Ty.t), @@ -571,7 +571,7 @@ End Impl_subtle_ConditionallyNegatable_where_subtle_ConditionallySelectable_T_wh Module Impl_core_clone_Clone_where_core_clone_Clone_T_for_subtle_CtOption_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "subtle::CtOption") [ T ]. - Parameter clone : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter clone : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T : Ty.t), @@ -597,7 +597,7 @@ End Impl_core_marker_Copy_where_core_marker_Copy_T_for_subtle_CtOption_T. Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_subtle_CtOption_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "subtle::CtOption") [ T ]. - Parameter fmt : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter fmt : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T : Ty.t), @@ -611,7 +611,7 @@ End Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_subtle_CtOption_T. Module Impl_core_convert_From_subtle_CtOption_T_for_core_option_Option_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "core::option::Option") [ T ]. - Parameter from : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter from : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T : Ty.t), @@ -625,57 +625,57 @@ End Impl_core_convert_From_subtle_CtOption_T_for_core_option_Option_T. Module Impl_subtle_CtOption_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "subtle::CtOption") [ T ]. - Parameter new : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter new : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_new : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "new" (new T). - Parameter expect : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter expect : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_expect : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "expect" (expect T). - Parameter unwrap : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter unwrap : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_unwrap : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "unwrap" (unwrap T). - Parameter unwrap_or : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter unwrap_or : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_unwrap_or : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "unwrap_or" (unwrap_or T). - Parameter unwrap_or_else : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter unwrap_or_else : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_unwrap_or_else : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "unwrap_or_else" (unwrap_or_else T). - Parameter is_some : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter is_some : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_is_some : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "is_some" (is_some T). - Parameter is_none : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter is_none : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_is_none : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "is_none" (is_none T). - Parameter map : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter map : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_map : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "map" (map T). - Parameter and_then : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter and_then : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_and_then : forall (T : Ty.t), M.IsAssociatedFunction (Self T) "and_then" (and_then T). - Parameter or_else : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter or_else : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_or_else : forall (T : Ty.t), @@ -685,7 +685,7 @@ End Impl_subtle_CtOption_T. Module Impl_subtle_ConditionallySelectable_where_subtle_ConditionallySelectable_T_for_subtle_CtOption_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "subtle::CtOption") [ T ]. - Parameter conditional_select : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter conditional_select : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T : Ty.t), @@ -699,7 +699,7 @@ End Impl_subtle_ConditionallySelectable_where_subtle_ConditionallySelectable_T_f Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_subtle_CtOption_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "subtle::CtOption") [ T ]. - Parameter ct_eq : forall (T : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Parameter ct_eq : forall (T : Ty.t), (list Ty.t) -> (list A.t) -> M. Axiom Implements : forall (T : Ty.t), @@ -716,7 +716,7 @@ End Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_subtle_CtOption Module Impl_subtle_ConstantTimeGreater_for_u8. Definition Self : Ty.t := Ty.path "u8". - Parameter ct_gt : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_gt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -729,7 +729,7 @@ End Impl_subtle_ConstantTimeGreater_for_u8. Module Impl_subtle_ConstantTimeGreater_for_u16. Definition Self : Ty.t := Ty.path "u16". - Parameter ct_gt : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_gt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -742,7 +742,7 @@ End Impl_subtle_ConstantTimeGreater_for_u16. Module Impl_subtle_ConstantTimeGreater_for_u32. Definition Self : Ty.t := Ty.path "u32". - Parameter ct_gt : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_gt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -755,7 +755,7 @@ End Impl_subtle_ConstantTimeGreater_for_u32. Module Impl_subtle_ConstantTimeGreater_for_u64. Definition Self : Ty.t := Ty.path "u64". - Parameter ct_gt : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_gt : (list Ty.t) -> (list A.t) -> M. Axiom Implements : M.IsTraitInstance @@ -767,7 +767,7 @@ End Impl_subtle_ConstantTimeGreater_for_u64. (* Trait *) Module ConstantTimeLess. - Parameter ct_lt : (list Ty.t) -> (list Value.t) -> M. + Parameter ct_lt : (list Ty.t) -> (list A.t) -> M. Axiom ProvidedMethod_ct_lt : M.IsProvidedMethod "subtle::ConstantTimeLess" "ct_lt" ct_lt. End ConstantTimeLess. diff --git a/CoqOfRust/examples/default/examples/custom/add_one.v b/CoqOfRust/examples/default/examples/custom/add_one.v index 5002081aa..8b8db39cd 100644 --- a/CoqOfRust/examples/default/examples/custom/add_one.v +++ b/CoqOfRust/examples/default/examples/custom/add_one.v @@ -6,11 +6,11 @@ fn add_one(x: u32) -> u32 { x + 1 } *) -Definition add_one (τ : list Ty.t) (α : list Value.t) : M := +Definition add_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - BinOp.Panic.add (| M.read (| x |), Value.Integer Integer.U32 1 |))) + BinOp.Panic.add (| Integer.U32, M.read (| x |), M.of_value (| 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 9686ac20d..4406e5ce4 100644 --- a/CoqOfRust/examples/default/examples/custom/constructor_as_function.v +++ b/CoqOfRust/examples/default/examples/custom/constructor_as_function.v @@ -9,7 +9,7 @@ fn matching(tuple: (i32, i32)) -> i32 { } } *) -Definition matching (τ : list Ty.t) (α : list Value.t) : M := +Definition matching (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ tuple ] => ltac:(M.monadic @@ -22,22 +22,14 @@ Definition matching (τ : list Ty.t) (α : list Value.t) : M := 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_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 0 - |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_1 |), - Value.Integer Integer.I32 0 - |) in - M.alloc (| Value.Integer Integer.I32 0 |))); + let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Integer 0 |) in + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in - M.alloc (| Value.Integer Integer.I32 1 |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |) |))) @@ -55,7 +47,7 @@ Module Impl_core_fmt_Debug_for_constructor_as_function_Constructor. Definition Self : Ty.t := Ty.path "constructor_as_function::Constructor". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -69,16 +61,17 @@ Module Impl_core_fmt_Debug_for_constructor_as_function_Constructor. |), [ M.read (| f |); - M.read (| Value.String "Constructor" |); + M.read (| M.of_value (| Value.String "Constructor" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "constructor_as_function::Constructor", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -99,7 +92,7 @@ fn main() { println!("{v:?}"); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -160,8 +153,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -175,21 +168,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) ] |); - M.constructor_as_closure "constructor_as_function::Constructor" + M.constructor_as_closure (| "constructor_as_function::Constructor" |) ] |) ] @@ -205,41 +201,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path "constructor_as_function::Constructor"; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "constructor_as_function::Constructor"; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ v ] - |) - ] - |)) + |), + [ v ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/custom/hello_world.v b/CoqOfRust/examples/default/examples/custom/hello_world.v index 257f51d4d..fa5c72b05 100644 --- a/CoqOfRust/examples/default/examples/custom/hello_world.v +++ b/CoqOfRust/examples/default/examples/custom/hello_world.v @@ -1,7 +1,7 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Definition message : Value.t := M.run ltac:(M.monadic (Value.String "Hello, World!")). +Definition message : A.t := M.run ltac:(M.monadic (M.of_value (| Value.String "Hello, World!" |))). (* fn main() { @@ -42,7 +42,7 @@ fn main() { } " *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -57,42 +57,58 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ M.get_constant (| "hello_world::message" |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ M.get_constant (| "hello_world::message" |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let number := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 7 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| 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 letter := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in + let emoticon := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -114,43 +130,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Matched " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Matched " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -172,37 +197,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Matched " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Matched " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ j ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ j ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -219,29 +253,35 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "Didn't match a number. Let's go with a letter! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Didn't match a number. Let's go with a letter! " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let i_like_letters := M.alloc (| Value.Bool false |) in + let i_like_letters := M.alloc (| M.of_value (| Value.Bool false |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -263,41 +303,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Matched " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Matched " |) |)); + A.to_value (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -318,24 +366,30 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "Didn't match a number. Let's go with a letter! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Didn't match a number. Let's go with a letter! " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -352,24 +406,30 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "I don't like letters. Let's go with an emoticon :)! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "I don't like letters. Let's go with an emoticon :)! " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] diff --git a/CoqOfRust/examples/default/examples/custom/if_let.v b/CoqOfRust/examples/default/examples/custom/if_let.v index 967702630..839c74052 100644 --- a/CoqOfRust/examples/default/examples/custom/if_let.v +++ b/CoqOfRust/examples/default/examples/custom/if_let.v @@ -6,7 +6,7 @@ fn order(b1: bool, b2: bool, b3: bool, b4: bool) -> bool { b1 && b2 && b3 && b4 } *) -Definition order (τ : list Ty.t) (α : list Value.t) : M := +Definition order (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ b1; b2; b3; b4 ] => ltac:(M.monadic @@ -57,7 +57,7 @@ fn extract_value(container: Container) -> i32 { } } *) -Definition extract_value (τ : list Ty.t) (α : list Value.t) : M := +Definition extract_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ container ] => ltac:(M.monadic @@ -80,7 +80,7 @@ Definition extract_value (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let value := M.copy (| γ0_0 |) in - Value.Tuple [ value ])); + M.of_value (| Value.Tuple [ A.to_value value ] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -90,14 +90,15 @@ Definition extract_value (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let value := M.copy (| γ0_0 |) in - Value.Tuple [ value ])) + M.of_value (| Value.Tuple [ A.to_value value ] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic - match γ with | [ value ] => value | _ => M.impossible (||) end)) + match γ with | [ value ] => value | _ => M.impossible (||) end) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -136,18 +137,22 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let x := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 5 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 5 |)) ] + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -169,38 +174,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "if: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "if: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ y ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ y ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -228,42 +242,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "match: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "match: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ y ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ y ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -274,7 +296,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| y |)) (Value.Integer Integer.I32 3) + BinOp.Pure.gt (| M.read (| y |), M.of_value (| Value.Integer 3 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let γ := x in @@ -295,47 +317,58 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "if and: " |); - M.read (| Value.String " " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "if and: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ y ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ z ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ y ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ z ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -350,7 +383,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let y := M.copy (| γ0_0 |) in let γ := - M.alloc (| BinOp.Pure.gt (M.read (| y |)) (Value.Integer Integer.I32 3) |) in + M.alloc (| + BinOp.Pure.gt (| M.read (| y |), M.of_value (| Value.Integer 3 |) |) + |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let γ := x in let γ0_0 := @@ -369,46 +404,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "match and: " |); - M.read (| Value.String " " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "match and: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ y ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ z ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ y ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ z ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) diff --git a/CoqOfRust/examples/default/examples/custom/impl_param.v b/CoqOfRust/examples/default/examples/custom/impl_param.v index acc3f942b..33935a4d3 100644 --- a/CoqOfRust/examples/default/examples/custom/impl_param.v +++ b/CoqOfRust/examples/default/examples/custom/impl_param.v @@ -14,7 +14,7 @@ fn with_impls(func: impl Default, func2: impl Default, foo: A) { let b = Box::new((x, y, z)); } *) -Definition with_impls (τ : list Ty.t) (α : list Value.t) : M := +Definition with_impls (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A; impl_Default; impl_Default'1 ], [ func; func2; foo ] => ltac:(M.monadic @@ -51,10 +51,19 @@ Definition with_impls (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Tuple [ M.read (| x |); M.read (| y |); M.read (| z |) ] ] + [ + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| x |)); + A.to_value (M.read (| y |)); + A.to_value (M.read (| z |)) + ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/custom/module_duplicate.v b/CoqOfRust/examples/default/examples/custom/module_duplicate.v index 132c0a3f3..1aea64b54 100644 --- a/CoqOfRust/examples/default/examples/custom/module_duplicate.v +++ b/CoqOfRust/examples/default/examples/custom/module_duplicate.v @@ -8,7 +8,7 @@ Module foo. println!("foo::gre::bar"); } *) - Definition f_foo_gre (τ : list Ty.t) (α : list Value.t) : M := + Definition f_foo_gre (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -27,18 +27,25 @@ Module foo. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "foo::gre::bar -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "foo::gre::bar +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -50,7 +57,7 @@ Module foo. gre::f_foo_gre(); } *) - Definition f_foo (τ : list Ty.t) (α : list Value.t) : M := + Definition f_foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -69,15 +76,24 @@ Module foo. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "foo::bar -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "foo::bar +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -85,7 +101,7 @@ Module foo. [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -96,7 +112,7 @@ fn f() { foo::f_foo(); } *) -Definition f (τ : list Ty.t) (α : list Value.t) : M := +Definition f (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -105,7 +121,7 @@ Definition f (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "module_duplicate::foo::f_foo", [] |), [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/custom/mutual_loop.v b/CoqOfRust/examples/default/examples/custom/mutual_loop.v index 975d66d5f..0ff6829a1 100644 --- a/CoqOfRust/examples/default/examples/custom/mutual_loop.v +++ b/CoqOfRust/examples/default/examples/custom/mutual_loop.v @@ -16,9 +16,9 @@ Module Impl_mutual_loop_LoopA. LoopA {} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "mutual_loop::LoopA" [])) + | [], [] => ltac:(M.monadic (M.of_value (| Value.StructTuple "mutual_loop::LoopA" [] |))) | _, _ => M.impossible end. @@ -29,7 +29,7 @@ Module Impl_mutual_loop_LoopA. LoopB::start_loop() } *) - Definition start_loop (τ : list Ty.t) (α : list Value.t) : M := + Definition start_loop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -69,19 +69,22 @@ Module Impl_mutual_loop_LoopB. } } *) - Definition start_loop (τ : list Ty.t) (α : list Value.t) : M := + Definition start_loop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "mutual_loop::LoopB::Item" - [ - ("ident", - M.call_closure (| - M.get_associated_function (| Ty.path "mutual_loop::LoopA", "new", [] |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "mutual_loop::LoopB::Item" + [ + ("ident", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "mutual_loop::LoopA", "new", [] |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -95,7 +98,7 @@ pub fn start_loop() { let lb = la.start_loop(); } *) -Definition start_loop (τ : list Ty.t) (α : list Value.t) : M := +Definition start_loop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -114,7 +117,7 @@ Definition start_loop (τ : list Ty.t) (α : list Value.t) : M := [ la ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 3ef4e6241..9b3ea3dcc 100644 --- a/CoqOfRust/examples/default/examples/custom/pattern_in_function_parameters.v +++ b/CoqOfRust/examples/default/examples/custom/pattern_in_function_parameters.v @@ -6,7 +6,7 @@ fn sum((x, y): (i32, i32)) -> i32 { x + y } *) -Definition sum (τ : list Ty.t) (α : list Value.t) : M := +Definition sum (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0 ] => ltac:(M.monadic @@ -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 (| M.read (| x |), M.read (| y |) |))) + BinOp.Panic.add (| Integer.I32, M.read (| x |), M.read (| y |) |))) ] |))) | _, _ => M.impossible @@ -42,7 +42,7 @@ fn steps_between(&start: &char, &end: &char) -> Option { } } *) -Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := +Definition steps_between (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0; β1 ] => ltac:(M.monadic @@ -63,17 +63,17 @@ 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 [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| start |)) (M.read (| end_ |)) + BinOp.Pure.le (| M.read (| start |), M.read (| end_ |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -82,10 +82,14 @@ Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := |) in let count := M.alloc (| - BinOp.Panic.sub (| M.read (| end_ |), M.read (| start |) |) + BinOp.Panic.sub (| + Integer.U32, + M.read (| end_ |), + M.read (| start |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -93,13 +97,15 @@ Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt - (M.read (| start |)) - (Value.Integer Integer.U32 55296), + BinOp.Pure.lt (| + M.read (| start |), + M.of_value (| Value.Integer 55296 |) + |), ltac:(M.monadic - (BinOp.Pure.le - (Value.Integer Integer.U32 57344) - (M.read (| end_ |)))) + (BinOp.Pure.le (| + M.of_value (| Value.Integer 57344 |), + M.read (| end_ |) + |))) |) |)) in let _ := @@ -130,8 +136,9 @@ Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := |), [ BinOp.Panic.sub (| + Integer.U32, M.read (| count |), - Value.Integer Integer.U32 2048 + M.of_value (| Value.Integer 2048 |) |) ] |) @@ -170,7 +177,9 @@ Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) diff --git a/CoqOfRust/examples/default/examples/custom/polymorphic_associated_function.v b/CoqOfRust/examples/default/examples/custom/polymorphic_associated_function.v index 0acda54b0..30c2d230f 100644 --- a/CoqOfRust/examples/default/examples/custom/polymorphic_associated_function.v +++ b/CoqOfRust/examples/default/examples/custom/polymorphic_associated_function.v @@ -19,29 +19,32 @@ Module Impl_polymorphic_associated_function_Foo_A. } } *) - Definition convert (A : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition convert (A : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A in match τ, α with | [ B ], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "polymorphic_associated_function::Foo" - [ - ("data", - M.call_closure (| - M.get_trait_method (| "core::convert::Into", A, [ B ], "into", [] |), - [ - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "polymorphic_associated_function::Foo", - "data" - |) - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "polymorphic_associated_function::Foo" + [ + ("data", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::convert::Into", A, [ B ], "into", [] |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "polymorphic_associated_function::Foo", + "data" + |) + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -58,16 +61,18 @@ fn main() { assert_eq!(bar.data, 42.0); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let foo := M.alloc (| - Value.StructRecord - "polymorphic_associated_function::Foo" - [ ("data", Value.Integer Integer.I32 42) ] + M.of_value (| + Value.StructRecord + "polymorphic_associated_function::Foo" + [ ("data", A.to_value (M.of_value (| Value.Integer 42 |))) ] + |) |) in let bar := M.alloc (| @@ -83,15 +88,18 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.SubPointer.get_struct_record_field (| - bar, - "polymorphic_associated_function::Foo", - "data" - |); - UnsupportedLiteral - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.SubPointer.get_struct_record_field (| + bar, + "polymorphic_associated_function::Foo", + "data" + |)); + A.to_value (M.of_value (| UnsupportedLiteral |)) + ] + |) |), [ fun γ => @@ -101,17 +109,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -120,7 +130,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -132,19 +144,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/custom/provided_method.v b/CoqOfRust/examples/default/examples/custom/provided_method.v index 5a6addb92..44d55b116 100644 --- a/CoqOfRust/examples/default/examples/custom/provided_method.v +++ b/CoqOfRust/examples/default/examples/custom/provided_method.v @@ -3,13 +3,14 @@ Require Import CoqOfRust.CoqOfRust. (* Trait *) Module ProvidedAndRequired. - Definition provided (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition provided (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.add (| - Value.Integer Integer.I32 42, + Integer.I32, + M.of_value (| Value.Integer 42 |), M.call_closure (| M.get_trait_method (| "provided_method::ProvidedAndRequired", @@ -36,7 +37,7 @@ Module Impl_provided_method_ProvidedAndRequired_for_i32. *self } *) - Definition required (τ : list Ty.t) (α : list Value.t) : M := + Definition required (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -61,12 +62,12 @@ Module Impl_provided_method_ProvidedAndRequired_for_u32. *self as i32 } *) - Definition required (τ : list Ty.t) (α : list Value.t) : M := + Definition required (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.rust_cast (M.read (| M.read (| self |) |)))) + M.rust_cast (| M.read (| M.read (| self |) |) |))) | _, _ => M.impossible end. @@ -75,12 +76,12 @@ Module Impl_provided_method_ProvidedAndRequired_for_u32. 0 } *) - Definition provided (τ : list Ty.t) (α : list Value.t) : M := + Definition provided (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Integer Integer.I32 0)) + M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. @@ -101,31 +102,34 @@ fn main() { assert_eq!(y.provided(), 0); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.I32 5 |) in + let x := M.alloc (| M.of_value (| Value.Integer 5 |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "provided_method::ProvidedAndRequired", - Ty.path "i32", - [], - "provided", - [] - |), - [ x ] - |) - |); - M.alloc (| Value.Integer Integer.I32 47 |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "provided_method::ProvidedAndRequired", + Ty.path "i32", + [], + "provided", + [] + |), + [ x ] + |) + |)); + A.to_value (M.alloc (| M.of_value (| Value.Integer 47 |) |)) + ] + |) |), [ fun γ => @@ -135,17 +139,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -154,7 +160,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -166,38 +174,43 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - let y := M.alloc (| Value.Integer Integer.U32 5 |) in + let y := M.alloc (| M.of_value (| Value.Integer 5 |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "provided_method::ProvidedAndRequired", - Ty.path "u32", - [], - "provided", - [] - |), - [ y ] - |) - |); - M.alloc (| Value.Integer Integer.I32 0 |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "provided_method::ProvidedAndRequired", + Ty.path "u32", + [], + "provided", + [] + |), + [ y ] + |) + |)); + A.to_value (M.alloc (| M.of_value (| Value.Integer 0 |) |)) + ] + |) |), [ fun γ => @@ -207,17 +220,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -226,7 +241,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -238,19 +255,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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..caf449570 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/basic_contract_caller.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/basic_contract_caller.v @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_basic_contract_caller_AccountId. Definition Self : Ty.t := Ty.path "basic_contract_caller::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "basic_contract_caller::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "basic_contract_caller::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_basic_contract_caller_AccountId. Definition Self : Ty.t := Ty.path "basic_contract_caller::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -94,14 +103,16 @@ Module Impl_basic_contract_caller_OtherContract. Self { value: init_value } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ init_value ] => ltac:(M.monadic (let init_value := M.alloc (| init_value |) in - Value.StructRecord - "basic_contract_caller::OtherContract" - [ ("value", M.read (| init_value |)) ])) + M.of_value (| + Value.StructRecord + "basic_contract_caller::OtherContract" + [ ("value", A.to_value (M.read (| init_value |))) ] + |))) | _, _ => M.impossible end. @@ -112,7 +123,7 @@ Module Impl_basic_contract_caller_OtherContract. self.value = !self.value; } *) - Definition flip (τ : list Ty.t) (α : list Value.t) : M := + Definition flip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -125,16 +136,17 @@ Module Impl_basic_contract_caller_OtherContract. "basic_contract_caller::OtherContract", "value" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "basic_contract_caller::OtherContract", "value" |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -146,7 +158,7 @@ Module Impl_basic_contract_caller_OtherContract. self.value } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -186,7 +198,7 @@ Module Impl_basic_contract_caller_BasicContractCaller. Self { other_contract } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ other_contract_code_hash ] => ltac:(M.monadic @@ -197,14 +209,16 @@ Module Impl_basic_contract_caller_BasicContractCaller. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "not yet implemented" |) ] + [ M.read (| M.of_value (| Value.String "not yet implemented" |) |) ] |) |) |) in M.alloc (| - Value.StructRecord - "basic_contract_caller::BasicContractCaller" - [ ("other_contract", M.read (| other_contract |)) ] + M.of_value (| + Value.StructRecord + "basic_contract_caller::BasicContractCaller" + [ ("other_contract", A.to_value (M.read (| other_contract |))) ] + |) |) |))) | _, _ => M.impossible @@ -218,7 +232,7 @@ Module Impl_basic_contract_caller_BasicContractCaller. self.other_contract.get() } *) - Definition flip_and_get (τ : list Ty.t) (α : list Value.t) : M := + Definition flip_and_get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/examples/default/examples/ink_contracts/call_runtime.v b/CoqOfRust/examples/default/examples/ink_contracts/call_runtime.v index b4f34be5f..215ff80c4 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/call_runtime.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/call_runtime.v @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_call_runtime_AccountId. Definition Self : Ty.t := Ty.path "call_runtime::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "call_runtime::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "call_runtime::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_call_runtime_AccountId. Definition Self : Ty.t := Ty.path "call_runtime::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -96,7 +105,19 @@ Module Impl_core_convert_From_call_runtime_AccountId_for_call_runtime_MultiAddre unimplemented!() } *) - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ _value ] => + ltac:(M.monadic + (let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -155,9 +176,10 @@ Module Impl_core_default_Default_for_call_runtime_RuntimeCaller. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeCaller". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "call_runtime::RuntimeCaller" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "call_runtime::RuntimeCaller" [] |))) | _, _ => M.impossible end. @@ -188,7 +210,7 @@ Module Impl_core_fmt_Debug_for_call_runtime_RuntimeError. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -196,7 +218,7 @@ Module Impl_core_fmt_Debug_for_call_runtime_RuntimeError. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "CallRuntimeFailed" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "CallRuntimeFailed" |) |) ] |))) | _, _ => M.impossible end. @@ -224,13 +246,13 @@ Module Impl_core_cmp_PartialEq_for_call_runtime_RuntimeError. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeError". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -257,12 +279,12 @@ Module Impl_core_cmp_Eq_for_call_runtime_RuntimeError. Definition Self : Ty.t := Ty.path "call_runtime::RuntimeError". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -306,7 +328,7 @@ Module Impl_core_convert_From_call_runtime_EnvError_for_call_runtime_RuntimeErro } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ e ] => ltac:(M.monadic @@ -318,7 +340,9 @@ Module Impl_core_convert_From_call_runtime_EnvError_for_call_runtime_RuntimeErro fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "call_runtime::RuntimeError::CallRuntimeFailed" [] + M.of_value (| + Value.StructTuple "call_runtime::RuntimeError::CallRuntimeFailed" [] + |) |))); fun γ => ltac:(M.monadic @@ -329,7 +353,13 @@ Module Impl_core_convert_From_call_runtime_EnvError_for_call_runtime_RuntimeErro "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "Unexpected error from `pallet-contracts`." |) ] + [ + M.read (| + M.of_value (| + Value.String "Unexpected error from `pallet-contracts`." + |) + |) + ] |) |) |))) @@ -355,7 +385,20 @@ Module Impl_call_runtime_Env. unimplemented!() } *) - Parameter call_runtime : (list Ty.t) -> (list Value.t) -> M. + Definition call_runtime (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ Call ], [ self; _call ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _call := M.alloc (| _call |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_call_runtime : M.IsAssociatedFunction Self "call_runtime" call_runtime. End Impl_call_runtime_Env. @@ -368,7 +411,18 @@ Module Impl_call_runtime_RuntimeCaller. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -377,7 +431,7 @@ Module Impl_call_runtime_RuntimeCaller. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -396,7 +450,7 @@ Module Impl_call_runtime_RuntimeCaller. Default::default() } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -429,7 +483,7 @@ Module Impl_call_runtime_RuntimeCaller. .map_err(Into::into) } *) - Definition transfer_through_runtime (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer_through_runtime (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; receiver; value ] => ltac:(M.monadic @@ -468,30 +522,36 @@ Module Impl_call_runtime_RuntimeCaller. |) |); M.alloc (| - Value.StructTuple - "call_runtime::RuntimeCall::Balances" - [ - Value.StructRecord - "call_runtime::BalancesCall::Transfer" - [ - ("dest", - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "call_runtime::AccountId", - [ - Ty.apply - (Ty.path "call_runtime::MultiAddress") - [ Ty.path "call_runtime::AccountId"; Ty.tuple [] ] - ], - "into", - [] - |), - [ M.read (| receiver |) ] - |)); - ("value", M.read (| value |)) - ] - ] + M.of_value (| + Value.StructTuple + "call_runtime::RuntimeCall::Balances" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "call_runtime::BalancesCall::Transfer" + [ + ("dest", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "call_runtime::AccountId", + [ + Ty.apply + (Ty.path "call_runtime::MultiAddress") + [ Ty.path "call_runtime::AccountId"; Ty.tuple [] ] + ], + "into", + [] + |), + [ M.read (| receiver |) ] + |))); + ("value", A.to_value (M.read (| value |))) + ] + |)) + ] + |) |) ] |); @@ -515,7 +575,7 @@ Module Impl_call_runtime_RuntimeCaller. self.env().call_runtime(&()).map_err(Into::into) } *) - Definition call_nonexistent_extrinsic (τ : list Ty.t) (α : list Value.t) : M := + Definition call_nonexistent_extrinsic (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -551,7 +611,7 @@ Module Impl_call_runtime_RuntimeCaller. [ M.read (| self |) ] |) |); - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) ] |); M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/ink_contracts/conditional_compilation.v b/CoqOfRust/examples/default/examples/ink_contracts/conditional_compilation.v index 84019aba9..22f3c959a 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/conditional_compilation.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/conditional_compilation.v @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_conditional_compilation_AccountId. Definition Self : Ty.t := Ty.path "conditional_compilation::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "conditional_compilation::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "conditional_compilation::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_conditional_compilation_AccountId. Definition Self : Ty.t := Ty.path "conditional_compilation::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -130,7 +139,7 @@ Module Impl_conditional_compilation_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -152,7 +161,20 @@ Module Impl_conditional_compilation_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. @@ -161,7 +183,19 @@ Module Impl_conditional_compilation_Env. unimplemented!() } *) - Parameter block_number : (list Ty.t) -> (list Value.t) -> M. + Definition block_number (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_block_number : M.IsAssociatedFunction Self "block_number" block_number. End Impl_conditional_compilation_Env. @@ -181,7 +215,18 @@ Module Impl_conditional_compilation_ConditionalCompilation. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -190,7 +235,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -215,25 +260,28 @@ Module Impl_conditional_compilation_ConditionalCompilation. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "conditional_compilation::ConditionalCompilation" - [ - ("value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "bool", - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "conditional_compilation::ConditionalCompilation" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -244,14 +292,16 @@ Module Impl_conditional_compilation_ConditionalCompilation. Self { value } } *) - Definition new_foo (τ : list Ty.t) (α : list Value.t) : M := + Definition new_foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "conditional_compilation::ConditionalCompilation" - [ ("value", M.read (| value |)) ])) + M.of_value (| + Value.StructRecord + "conditional_compilation::ConditionalCompilation" + [ ("value", A.to_value (M.read (| value |))) ] + |))) | _, _ => M.impossible end. @@ -262,14 +312,16 @@ Module Impl_conditional_compilation_ConditionalCompilation. Self { value } } *) - Definition new_bar (τ : list Ty.t) (α : list Value.t) : M := + Definition new_bar (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "conditional_compilation::ConditionalCompilation" - [ ("value", M.read (| value |)) ])) + M.of_value (| + Value.StructRecord + "conditional_compilation::ConditionalCompilation" + [ ("value", A.to_value (M.read (| value |))) ] + |))) | _, _ => M.impossible end. @@ -280,14 +332,16 @@ Module Impl_conditional_compilation_ConditionalCompilation. Self { value } } *) - Definition new_foo_bar (τ : list Ty.t) (α : list Value.t) : M := + Definition new_foo_bar (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "conditional_compilation::ConditionalCompilation" - [ ("value", M.read (| value |)) ])) + M.of_value (| + Value.StructRecord + "conditional_compilation::ConditionalCompilation" + [ ("value", A.to_value (M.read (| value |))) ] + |))) | _, _ => M.impossible end. @@ -303,7 +357,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. })); } *) - Definition inherent_flip_foo (τ : list Ty.t) (α : list Value.t) : M := + Definition inherent_flip_foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -316,14 +370,15 @@ Module Impl_conditional_compilation_ConditionalCompilation. "conditional_compilation::ConditionalCompilation", "value" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "conditional_compilation::ConditionalCompilation", "value" |) - |)) + |) + |) |) in let caller := M.alloc (| @@ -366,27 +421,33 @@ Module Impl_conditional_compilation_ConditionalCompilation. [] |) |); - Value.StructTuple - "conditional_compilation::Event::Changes" - [ - Value.StructRecord - "conditional_compilation::Changes" - [ - ("new_value", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "conditional_compilation::ConditionalCompilation", - "value" - |) - |)); - ("by_", M.read (| caller |)) - ] - ] + M.of_value (| + Value.StructTuple + "conditional_compilation::Event::Changes" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "conditional_compilation::Changes" + [ + ("new_value", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "conditional_compilation::ConditionalCompilation", + "value" + |) + |))); + ("by_", A.to_value (M.read (| caller |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -406,7 +467,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. })); } *) - Definition inherent_flip_bar (τ : list Ty.t) (α : list Value.t) : M := + Definition inherent_flip_bar (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -463,14 +524,15 @@ Module Impl_conditional_compilation_ConditionalCompilation. "conditional_compilation::ConditionalCompilation", "value" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "conditional_compilation::ConditionalCompilation", "value" |) - |)) + |) + |) |) in let _ := M.alloc (| @@ -491,28 +553,34 @@ Module Impl_conditional_compilation_ConditionalCompilation. [] |) |); - Value.StructTuple - "conditional_compilation::Event::ChangesDated" - [ - Value.StructRecord - "conditional_compilation::ChangesDated" - [ - ("new_value", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "conditional_compilation::ConditionalCompilation", - "value" - |) - |)); - ("by_", M.read (| caller |)); - ("when", M.read (| block_number |)) - ] - ] + M.of_value (| + Value.StructTuple + "conditional_compilation::Event::ChangesDated" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "conditional_compilation::ChangesDated" + [ + ("new_value", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "conditional_compilation::ConditionalCompilation", + "value" + |) + |))); + ("by_", A.to_value (M.read (| caller |))); + ("when", A.to_value (M.read (| block_number |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -529,7 +597,7 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional self.value = !self.value; } *) - Definition flip (τ : list Ty.t) (α : list Value.t) : M := + Definition flip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -542,16 +610,17 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional "conditional_compilation::ConditionalCompilation", "value" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "conditional_compilation::ConditionalCompilation", "value" |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -561,7 +630,7 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional self.value } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -586,7 +655,7 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional self.value = value; } *) - Definition push_foo (τ : list Ty.t) (α : list Value.t) : M := + Definition push_foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; value ] => ltac:(M.monadic @@ -634,13 +703,21 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional [] |) |); - Value.StructTuple - "conditional_compilation::Event::Changes" - [ - Value.StructRecord - "conditional_compilation::Changes" - [ ("new_value", M.read (| value |)); ("by_", M.read (| caller |)) ] - ] + M.of_value (| + Value.StructTuple + "conditional_compilation::Event::Changes" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "conditional_compilation::Changes" + [ + ("new_value", A.to_value (M.read (| value |))); + ("by_", A.to_value (M.read (| caller |))) + ] + |)) + ] + |) ] |) |) in @@ -653,7 +730,7 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional |), M.read (| value |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/contract_terminate.v b/CoqOfRust/examples/default/examples/ink_contracts/contract_terminate.v index 5c3492ab0..42aa94dbd 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/contract_terminate.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/contract_terminate.v @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_contract_terminate_AccountId. Definition Self : Ty.t := Ty.path "contract_terminate::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "contract_terminate::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "contract_terminate::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_contract_terminate_AccountId. Definition Self : Ty.t := Ty.path "contract_terminate::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -83,7 +92,7 @@ Module Impl_contract_terminate_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -105,7 +114,20 @@ Module Impl_contract_terminate_Env. unimplemented!() } *) - Parameter terminate_contract : (list Ty.t) -> (list Value.t) -> M. + Definition terminate_contract (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _account ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _account := M.alloc (| _account |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_terminate_contract : M.IsAssociatedFunction Self "terminate_contract" terminate_contract. @@ -126,7 +148,18 @@ Module Impl_contract_terminate_JustTerminate. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -135,7 +168,7 @@ Module Impl_contract_terminate_JustTerminate. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -158,9 +191,10 @@ Module Impl_contract_terminate_JustTerminate. Self {} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "contract_terminate::JustTerminate" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "contract_terminate::JustTerminate" [] |))) | _, _ => M.impossible end. @@ -171,7 +205,7 @@ Module Impl_contract_terminate_JustTerminate. self.env().terminate_contract(self.env().caller()); } *) - Definition terminate_me (τ : list Ty.t) (α : list Value.t) : M := + Definition terminate_me (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -214,7 +248,7 @@ Module Impl_contract_terminate_JustTerminate. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/contract_transfer.v b/CoqOfRust/examples/default/examples/ink_contracts/contract_transfer.v index 585a1d1c2..3bc1289a9 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/contract_transfer.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/contract_transfer.v @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_contract_transfer_AccountId. Definition Self : Ty.t := Ty.path "contract_transfer::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "contract_transfer::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "contract_transfer::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_contract_transfer_AccountId. Definition Self : Ty.t := Ty.path "contract_transfer::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -85,7 +94,7 @@ Module Impl_contract_transfer_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -107,7 +116,19 @@ Module Impl_contract_transfer_Env. unimplemented!() } *) - Parameter balance : (list Ty.t) -> (list Value.t) -> M. + Definition balance (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_balance : M.IsAssociatedFunction Self "balance" balance. @@ -116,7 +137,21 @@ Module Impl_contract_transfer_Env. unimplemented!() } *) - Parameter transfer : (list Ty.t) -> (list Value.t) -> M. + Definition transfer (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _to; _value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _to := M.alloc (| _to |) in + let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer. @@ -125,7 +160,19 @@ Module Impl_contract_transfer_Env. unimplemented!() } *) - Parameter transferred_value : (list Ty.t) -> (list Value.t) -> M. + Definition transferred_value (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_transferred_value : M.IsAssociatedFunction Self "transferred_value" transferred_value. @@ -146,7 +193,18 @@ Module Impl_contract_transfer_GiveMe. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -155,7 +213,7 @@ Module Impl_contract_transfer_GiveMe. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -174,9 +232,9 @@ Module Impl_contract_transfer_GiveMe. Self {} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "contract_transfer::GiveMe" [])) + | [], [] => ltac:(M.monadic (M.of_value (| Value.StructTuple "contract_transfer::GiveMe" [] |))) | _, _ => M.impossible end. @@ -198,7 +256,7 @@ Module Impl_contract_transfer_GiveMe. } } *) - Definition give_me (τ : list Ty.t) (α : list Value.t) : M := + Definition give_me (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; value ] => ltac:(M.monadic @@ -215,36 +273,46 @@ Module Impl_contract_transfer_GiveMe. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "requested value: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "requested value: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u128" ] - |), - [ value ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u128" ] + |), + [ value ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -255,71 +323,81 @@ Module Impl_contract_transfer_GiveMe. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "contract balance: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "contract balance: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u128" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "contract_transfer::Env", - "balance", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "contract_transfer::GiveMe", - "env", - [] - |), - [ M.read (| self |) ] - |) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u128" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "contract_transfer::Env", + "balance", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "contract_transfer::GiveMe", + "env", + [] + |), + [ M.read (| self |) ] + |) + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| value |)) - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| value |), + M.call_closure (| M.get_associated_function (| Ty.path "contract_transfer::Env", "balance", @@ -337,7 +415,9 @@ Module Impl_contract_transfer_GiveMe. |) |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -347,15 +427,15 @@ Module Impl_contract_transfer_GiveMe. "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "insufficient funds!" |) ] + [ M.read (| M.of_value (| Value.String "insufficient funds!" |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -423,14 +503,16 @@ Module Impl_contract_transfer_GiveMe. |), [ M.read (| - Value.String - "requested transfer failed. this can be the case if the contract does nothave sufficient free funds or if the transfer would have brought thecontract's balance below minimum balance." + M.of_value (| + Value.String + "requested transfer failed. this can be the case if the contract does nothave sufficient free funds or if the transfer would have brought thecontract's balance below minimum balance." + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -445,7 +527,7 @@ Module Impl_contract_transfer_GiveMe. assert!(self.env().transferred_value() == 10, "payment was not ten"); } *) - Definition was_it_ten (τ : list Ty.t) (α : list Value.t) : M := + Definition was_it_ten (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -461,70 +543,80 @@ Module Impl_contract_transfer_GiveMe. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "received payment: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "received payment: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u128" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "contract_transfer::Env", - "transferred_value", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "contract_transfer::GiveMe", - "env", - [] - |), - [ M.read (| self |) ] - |) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u128" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "contract_transfer::Env", + "transferred_value", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "contract_transfer::GiveMe", + "env", + [] + |), + [ M.read (| self |) ] + |) + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "contract_transfer::Env", "transferred_value", @@ -542,8 +634,10 @@ Module Impl_contract_transfer_GiveMe. |) |) ] - |)) - (Value.Integer Integer.U128 10)) + |), + M.of_value (| Value.Integer 10 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -553,14 +647,14 @@ Module Impl_contract_transfer_GiveMe. "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "payment was not ten" |) ] + [ M.read (| M.of_value (| Value.String "payment was not ten" |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/custom_allocator.v b/CoqOfRust/examples/default/examples/ink_contracts/custom_allocator.v index 495205105..9171af54a 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/custom_allocator.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/custom_allocator.v @@ -22,42 +22,52 @@ Module Impl_custom_allocator_CustomAllocator. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ init_value ] => ltac:(M.monadic (let init_value := M.alloc (| init_value |) in - Value.StructRecord - "custom_allocator::CustomAllocator" - [ - ("value", - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "bool" ], - "into_vec", - [ Ty.path "alloc::alloc::Global" ] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.read (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") + M.of_value (| + Value.StructRecord + "custom_allocator::CustomAllocator" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "bool" ], + "into_vec", + [ Ty.path "alloc::alloc::Global" ] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "array") [ Ty.path "bool" ]; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), [ - Ty.apply (Ty.path "array") [ Ty.path "bool" ]; - Ty.path "alloc::alloc::Global" - ], - "new", - [] - |), - [ M.alloc (| Value.Array [ M.read (| init_value |) ] |) ] + M.alloc (| + M.of_value (| + Value.Array [ A.to_value (M.read (| init_value |)) ] + |) + |) + ] + |) + |) |) - |)) - ] - |)) - ])) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -68,7 +78,7 @@ Module Impl_custom_allocator_CustomAllocator. Self::new(Default::default()) } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -91,7 +101,7 @@ Module Impl_custom_allocator_CustomAllocator. self.value[0] = !self.value[0]; } *) - Definition flip (τ : list Ty.t) (α : list Value.t) : M := + Definition flip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -115,11 +125,11 @@ Module Impl_custom_allocator_CustomAllocator. "custom_allocator::CustomAllocator", "value" |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.call_closure (| M.get_trait_method (| "core::ops::index::Index", @@ -136,12 +146,13 @@ Module Impl_custom_allocator_CustomAllocator. "custom_allocator::CustomAllocator", "value" |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -153,7 +164,7 @@ Module Impl_custom_allocator_CustomAllocator. self.value[0] } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -175,7 +186,7 @@ Module Impl_custom_allocator_CustomAllocator. "custom_allocator::CustomAllocator", "value" |); - Value.Integer Integer.Usize 0 + M.of_value (| Value.Integer 0 |) ] |) |))) diff --git a/CoqOfRust/examples/default/examples/ink_contracts/custom_environment.v b/CoqOfRust/examples/default/examples/ink_contracts/custom_environment.v index ff94e483c..21ade697f 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/custom_environment.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/custom_environment.v @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_custom_environment_AccountId. Definition Self : Ty.t := Ty.path "custom_environment::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "custom_environment::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "custom_environment::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_custom_environment_AccountId. Definition Self : Ty.t := Ty.path "custom_environment::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -88,9 +97,10 @@ Module Impl_core_default_Default_for_custom_environment_Topics. Definition Self : Ty.t := Ty.path "custom_environment::Topics". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "custom_environment::Topics" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "custom_environment::Topics" [] |))) | _, _ => M.impossible end. @@ -120,69 +130,76 @@ Module Impl_core_default_Default_for_custom_environment_EventWithTopics. Definition Self : Ty.t := Ty.path "custom_environment::EventWithTopics". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "custom_environment::EventWithTopics" - [ - ("first_topic", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u128", - [], - "default", - [] - |), - [] - |)); - ("second_topic", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u128", - [], - "default", - [] - |), - [] - |)); - ("third_topic", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u128", - [], - "default", - [] - |), - [] - |)); - ("fourth_topic", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u128", - [], - "default", - [] - |), - [] - |)); - ("fifth_topic", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u128", - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "custom_environment::EventWithTopics" + [ + ("first_topic", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |))); + ("second_topic", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |))); + ("third_topic", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |))); + ("fourth_topic", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |))); + ("fifth_topic", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -217,7 +234,7 @@ Module Impl_custom_environment_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -239,7 +256,20 @@ Module Impl_custom_environment_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_custom_environment_Env. @@ -252,7 +282,18 @@ Module Impl_custom_environment_Topics. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -261,7 +302,7 @@ Module Impl_custom_environment_Topics. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -280,7 +321,7 @@ Module Impl_custom_environment_Topics. Default::default() } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -305,7 +346,7 @@ Module Impl_custom_environment_Topics. .emit_event(Event::EventWithTopics(EventWithTopics::default())); } *) - Definition trigger (τ : list Ty.t) (α : list Value.t) : M := + Definition trigger (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -326,24 +367,27 @@ Module Impl_custom_environment_Topics. [ M.read (| self |) ] |) |); - Value.StructTuple - "custom_environment::Event::EventWithTopics" - [ - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "custom_environment::EventWithTopics", - [], - "default", - [] - |), - [] - |) - ] + M.of_value (| + Value.StructTuple + "custom_environment::Event::EventWithTopics" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "custom_environment::EventWithTopics", + [], + "default", + [] + |), + [] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/dns.v b/CoqOfRust/examples/default/examples/ink_contracts/dns.v index 380dd8239..aadc2c510 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/dns.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/dns.v @@ -16,37 +16,41 @@ Module Impl_core_default_Default_where_core_default_Default_K_where_core_default Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "dns::Mapping") [ K; V ]. (* Default *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "dns::Mapping" - [ - ("_key", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ K ], - [], - "default", - [] - |), - [] - |)); - ("_value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "dns::Mapping" + [ + ("_key", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ K ], + [], + "default", + [] + |), + [] + |))); + ("_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -67,7 +71,21 @@ Module Impl_dns_Mapping_K_V. unimplemented!() } *) - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition contains (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_contains : forall (K V : Ty.t), @@ -78,7 +96,21 @@ Module Impl_dns_Mapping_K_V. unimplemented!() } *) - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition get (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_get : forall (K V : Ty.t), @@ -89,7 +121,22 @@ Module Impl_dns_Mapping_K_V. unimplemented!() } *) - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key; _value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -100,7 +147,19 @@ Module Impl_dns_Mapping_K_V. unimplemented!() } *) - Parameter new : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition new (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_new : forall (K V : Ty.t), @@ -111,7 +170,21 @@ Module Impl_dns_Mapping_K_V. unimplemented!() } *) - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition remove (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_remove : forall (K V : Ty.t), @@ -122,7 +195,21 @@ Module Impl_dns_Mapping_K_V. unimplemented!() } *) - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition size (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_size : forall (K V : Ty.t), @@ -133,7 +220,21 @@ Module Impl_dns_Mapping_K_V. unimplemented!() } *) - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition take (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -151,18 +252,27 @@ Module Impl_core_default_Default_for_dns_AccountId. Definition Self : Ty.t := Ty.path "dns::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "dns::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "dns::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -178,14 +288,14 @@ Module Impl_core_clone_Clone_for_dns_AccountId. Definition Self : Ty.t := Ty.path "dns::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -222,19 +332,20 @@ Module Impl_core_cmp_PartialEq_for_dns_AccountId. Definition Self : Ty.t := Ty.path "dns::AccountId". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "dns::AccountId", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "dns::AccountId", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -254,7 +365,19 @@ Module Impl_core_convert_From_array_u8_for_dns_AccountId. unimplemented!() } *) - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ _value ] => + ltac:(M.monadic + (let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -342,7 +465,7 @@ Module Impl_dns_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -360,7 +483,20 @@ Module Impl_dns_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_dns_Env. @@ -388,7 +524,7 @@ fn zero_address() -> AccountId { [0u8; 32].into() } *) -Definition zero_address (τ : list Ty.t) (α : list Value.t) : M := +Definition zero_address (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -400,7 +536,7 @@ Definition zero_address (τ : list Ty.t) (α : list Value.t) : M := "into", [] |), - [ repeat (Value.Integer Integer.U8 0) 32 ] + [ repeat (| M.of_value (| Value.Integer 0 |), 32 |) ] |))) | _, _ => M.impossible end. @@ -422,7 +558,7 @@ Module Impl_core_default_Default_for_dns_DomainNameService. } } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -506,14 +642,17 @@ Module Impl_core_default_Default_for_dns_DomainNameService. |) |) in M.alloc (| - Value.StructRecord - "dns::DomainNameService" - [ - ("name_to_address", M.read (| name_to_address |)); - ("name_to_owner", M.read (| name_to_owner |)); - ("default_address", - M.call_closure (| M.get_function (| "dns::zero_address", [] |), [] |)) - ] + M.of_value (| + Value.StructRecord + "dns::DomainNameService" + [ + ("name_to_address", A.to_value (M.read (| name_to_address |))); + ("name_to_owner", A.to_value (M.read (| name_to_owner |))); + ("default_address", + A.to_value + (M.call_closure (| M.get_function (| "dns::zero_address", [] |), [] |))) + ] + |) |) |))) | _, _ => M.impossible @@ -562,7 +701,7 @@ Module Impl_core_cmp_PartialEq_for_dns_Error. Definition Self : Ty.t := Ty.path "dns::Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -589,7 +728,7 @@ Module Impl_core_cmp_PartialEq_for_dns_Error. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -617,12 +756,12 @@ Module Impl_core_cmp_Eq_for_dns_Error. Definition Self : Ty.t := Ty.path "dns::Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -648,7 +787,18 @@ Module Impl_dns_DomainNameService. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -657,7 +807,7 @@ Module Impl_dns_DomainNameService. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -676,7 +826,7 @@ Module Impl_dns_DomainNameService. Default::default() } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -709,7 +859,7 @@ Module Impl_dns_DomainNameService. Ok(()) } *) - Definition register (τ : list Ty.t) (α : list Value.t) : M := + Definition register (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name ] => ltac:(M.monadic @@ -738,7 +888,7 @@ Module Impl_dns_DomainNameService. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -772,14 +922,21 @@ Module Impl_dns_DomainNameService. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "dns::Error::NameAlreadyExists" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "dns::Error::NameAlreadyExists" [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -818,17 +975,31 @@ Module Impl_dns_DomainNameService. [ M.read (| self |) ] |) |); - Value.StructTuple - "dns::Event::Register" - [ - Value.StructRecord - "dns::Register" - [ ("name", M.read (| name |)); ("from", M.read (| caller |)) ] - ] + M.of_value (| + Value.StructTuple + "dns::Event::Register" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "dns::Register" + [ + ("name", A.to_value (M.read (| name |))); + ("from", A.to_value (M.read (| caller |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -843,7 +1014,7 @@ Module Impl_dns_DomainNameService. .unwrap_or(self.default_address) } *) - Definition get_owner_or_default (τ : list Ty.t) (α : list Value.t) : M := + Definition get_owner_or_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name ] => ltac:(M.monadic @@ -908,7 +1079,7 @@ Module Impl_dns_DomainNameService. Ok(()) } *) - Definition set_address (τ : list Ty.t) (α : list Value.t) : M := + Definition set_address (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; new_address ] => ltac:(M.monadic @@ -949,7 +1120,7 @@ Module Impl_dns_DomainNameService. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -973,14 +1144,21 @@ Module Impl_dns_DomainNameService. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "dns::Error::CallerIsNotOwner" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "dns::Error::CallerIsNotOwner" [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let old_address := @@ -1039,22 +1217,33 @@ Module Impl_dns_DomainNameService. [ M.read (| self |) ] |) |); - Value.StructTuple - "dns::Event::SetAddress" - [ - Value.StructRecord - "dns::SetAddress" - [ - ("name", M.read (| name |)); - ("from", M.read (| caller |)); - ("old_address", M.read (| old_address |)); - ("new_address", M.read (| new_address |)) - ] - ] + M.of_value (| + Value.StructTuple + "dns::Event::SetAddress" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "dns::SetAddress" + [ + ("name", A.to_value (M.read (| name |))); + ("from", A.to_value (M.read (| caller |))); + ("old_address", A.to_value (M.read (| old_address |))); + ("new_address", A.to_value (M.read (| new_address |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1083,7 +1272,7 @@ Module Impl_dns_DomainNameService. Ok(()) } *) - Definition transfer (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name; to ] => ltac:(M.monadic @@ -1124,7 +1313,7 @@ Module Impl_dns_DomainNameService. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1148,14 +1337,21 @@ Module Impl_dns_DomainNameService. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "dns::Error::CallerIsNotOwner" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "dns::Error::CallerIsNotOwner" [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let old_owner := @@ -1214,22 +1410,33 @@ Module Impl_dns_DomainNameService. [ M.read (| self |) ] |) |); - Value.StructTuple - "dns::Event::Transfer" - [ - Value.StructRecord - "dns::Transfer" - [ - ("name", M.read (| name |)); - ("from", M.read (| caller |)); - ("old_owner", M.read (| old_owner |)); - ("new_owner", M.read (| to |)) - ] - ] + M.of_value (| + Value.StructTuple + "dns::Event::Transfer" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "dns::Transfer" + [ + ("name", A.to_value (M.read (| name |))); + ("from", A.to_value (M.read (| caller |))); + ("old_owner", A.to_value (M.read (| old_owner |))); + ("new_owner", A.to_value (M.read (| to |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1244,7 +1451,7 @@ Module Impl_dns_DomainNameService. .unwrap_or(self.default_address) } *) - Definition get_address_or_default (τ : list Ty.t) (α : list Value.t) : M := + Definition get_address_or_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name ] => ltac:(M.monadic @@ -1294,7 +1501,7 @@ Module Impl_dns_DomainNameService. self.get_address_or_default(name) } *) - Definition get_address (τ : list Ty.t) (α : list Value.t) : M := + Definition get_address (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name ] => ltac:(M.monadic @@ -1318,7 +1525,7 @@ Module Impl_dns_DomainNameService. self.get_owner_or_default(name) } *) - Definition get_owner (τ : list Ty.t) (α : list Value.t) : M := + Definition get_owner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; name ] => ltac:(M.monadic diff --git a/CoqOfRust/examples/default/examples/ink_contracts/e2e_call_runtime.v b/CoqOfRust/examples/default/examples/ink_contracts/e2e_call_runtime.v index b06407de6..a2c411042 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/e2e_call_runtime.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/e2e_call_runtime.v @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_e2e_call_runtime_AccountId. Definition Self : Ty.t := Ty.path "e2e_call_runtime::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "e2e_call_runtime::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "e2e_call_runtime::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_e2e_call_runtime_AccountId. Definition Self : Ty.t := Ty.path "e2e_call_runtime::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -85,7 +94,19 @@ Module Impl_e2e_call_runtime_Env. unimplemented!() } *) - Parameter balance : (list Ty.t) -> (list Value.t) -> M. + Definition balance (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_balance : M.IsAssociatedFunction Self "balance" balance. End Impl_e2e_call_runtime_Env. @@ -101,9 +122,10 @@ Module Impl_core_default_Default_for_e2e_call_runtime_Contract. Definition Self : Ty.t := Ty.path "e2e_call_runtime::Contract". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "e2e_call_runtime::Contract" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "e2e_call_runtime::Contract" [] |))) | _, _ => M.impossible end. @@ -123,7 +145,18 @@ Module Impl_e2e_call_runtime_Contract. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -132,7 +165,7 @@ Module Impl_e2e_call_runtime_Contract. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -151,9 +184,10 @@ Module Impl_e2e_call_runtime_Contract. Self {} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "e2e_call_runtime::Contract" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "e2e_call_runtime::Contract" [] |))) | _, _ => M.impossible end. @@ -164,7 +198,7 @@ Module Impl_e2e_call_runtime_Contract. self.env().balance() } *) - Definition get_contract_balance (τ : list Ty.t) (α : list Value.t) : M := + Definition get_contract_balance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/examples/default/examples/ink_contracts/erc1155.v b/CoqOfRust/examples/default/examples/ink_contracts/erc1155.v index 498fd5b3d..11f38b4e1 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/erc1155.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/erc1155.v @@ -16,37 +16,41 @@ Module Impl_core_default_Default_where_core_default_Default_K_where_core_default Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc1155::Mapping") [ K; V ]. (* Default *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "erc1155::Mapping" - [ - ("_key", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ K ], - [], - "default", - [] - |), - [] - |)); - ("_value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "erc1155::Mapping" + [ + ("_key", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ K ], + [], + "default", + [] + |), + [] + |))); + ("_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -67,7 +71,21 @@ Module Impl_erc1155_Mapping_K_V. unimplemented!() } *) - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition contains (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_contains : forall (K V : Ty.t), @@ -78,7 +96,21 @@ Module Impl_erc1155_Mapping_K_V. unimplemented!() } *) - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition get (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_get : forall (K V : Ty.t), @@ -89,7 +121,22 @@ Module Impl_erc1155_Mapping_K_V. unimplemented!() } *) - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key; _value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -100,7 +147,21 @@ Module Impl_erc1155_Mapping_K_V. unimplemented!() } *) - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition remove (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_remove : forall (K V : Ty.t), @@ -111,7 +172,21 @@ Module Impl_erc1155_Mapping_K_V. unimplemented!() } *) - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition size (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_size : forall (K V : Ty.t), @@ -122,7 +197,21 @@ Module Impl_erc1155_Mapping_K_V. unimplemented!() } *) - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition take (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -140,18 +229,27 @@ Module Impl_core_default_Default_for_erc1155_AccountId. Definition Self : Ty.t := Ty.path "erc1155::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "erc1155::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "erc1155::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -167,14 +265,14 @@ Module Impl_core_clone_Clone_for_erc1155_AccountId. Definition Self : Ty.t := Ty.path "erc1155::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -211,19 +309,20 @@ Module Impl_core_cmp_PartialEq_for_erc1155_AccountId. Definition Self : Ty.t := Ty.path "erc1155::AccountId". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "erc1155::AccountId", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "erc1155::AccountId", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -243,7 +342,19 @@ Module Impl_core_convert_From_array_u8_for_erc1155_AccountId. unimplemented!() } *) - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ _v ] => + ltac:(M.monadic + (let _v := M.alloc (| _v |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -267,7 +378,7 @@ fn zero_address() -> AccountId { [0u8; 32].into() } *) -Definition zero_address (τ : list Ty.t) (α : list Value.t) : M := +Definition zero_address (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -279,35 +390,39 @@ Definition zero_address (τ : list Ty.t) (α : list Value.t) : M := "into", [] |), - [ repeat (Value.Integer Integer.U8 0) 32 ] + [ repeat (| M.of_value (| Value.Integer 0 |), 32 |) ] |))) | _, _ => M.impossible end. -Definition value_ON_ERC_1155_RECEIVED_SELECTOR : Value.t := +Definition value_ON_ERC_1155_RECEIVED_SELECTOR : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 242; - Value.Integer Integer.U8 58; - Value.Integer Integer.U8 110; - Value.Integer Integer.U8 97 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 242 |)); + A.to_value (M.of_value (| Value.Integer 58 |)); + A.to_value (M.of_value (| Value.Integer 110 |)); + A.to_value (M.of_value (| Value.Integer 97 |)) + ] + |) |))). -Definition _ON_ERC_1155_BATCH_RECEIVED_SELECTOR : Value.t := +Definition _ON_ERC_1155_BATCH_RECEIVED_SELECTOR : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.Array - [ - Value.Integer Integer.U8 188; - Value.Integer Integer.U8 25; - Value.Integer Integer.U8 124; - Value.Integer Integer.U8 129 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 188 |)); + A.to_value (M.of_value (| Value.Integer 25 |)); + A.to_value (M.of_value (| Value.Integer 124 |)); + A.to_value (M.of_value (| Value.Integer 129 |)) + ] + |) |))). Axiom TokenId : (Ty.path "erc1155::TokenId") = (Ty.path "u128"). @@ -367,7 +482,7 @@ Module Impl_core_cmp_PartialEq_for_erc1155_Error. Definition Self : Ty.t := Ty.path "erc1155::Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -394,7 +509,7 @@ Module Impl_core_cmp_PartialEq_for_erc1155_Error. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -422,12 +537,12 @@ Module Impl_core_cmp_Eq_for_erc1155_Error. Definition Self : Ty.t := Ty.path "erc1155::Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -521,7 +636,7 @@ Module Impl_erc1155_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -539,7 +654,20 @@ Module Impl_erc1155_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_erc1155_Env. @@ -567,54 +695,60 @@ Module Impl_core_default_Default_for_erc1155_Contract. Definition Self : Ty.t := Ty.path "erc1155::Contract". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "erc1155::Contract" - [ - ("balances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "erc1155::Mapping") - [ Ty.tuple [ Ty.path "erc1155::AccountId"; Ty.path "u128" ]; Ty.path "u128" ], - [], - "default", - [] - |), - [] - |)); - ("approvals", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "erc1155::Mapping") - [ - Ty.tuple [ Ty.path "erc1155::AccountId"; Ty.path "erc1155::AccountId" ]; - Ty.tuple [] - ], - [], - "default", - [] - |), - [] - |)); - ("token_id_nonce", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u128", - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "erc1155::Contract" + [ + ("balances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "erc1155::Mapping") + [ Ty.tuple [ Ty.path "erc1155::AccountId"; Ty.path "u128" ]; Ty.path "u128" + ], + [], + "default", + [] + |), + [] + |))); + ("approvals", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "erc1155::Mapping") + [ + Ty.tuple [ Ty.path "erc1155::AccountId"; Ty.path "erc1155::AccountId" ]; + Ty.tuple [] + ], + [], + "default", + [] + |), + [] + |))); + ("token_id_nonce", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -634,7 +768,18 @@ Module Impl_erc1155_Contract. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -643,7 +788,7 @@ Module Impl_erc1155_Contract. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -662,7 +807,7 @@ Module Impl_erc1155_Contract. Default::default() } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -702,7 +847,7 @@ Module Impl_erc1155_Contract. self.token_id_nonce } *) - Definition create (τ : list Ty.t) (α : list Value.t) : M := + Definition create (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; value ] => ltac:(M.monadic @@ -730,7 +875,10 @@ Module Impl_erc1155_Contract. "erc1155::Contract", "token_id_nonce" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U128 1 |) |) in + M.write (| + β, + BinOp.Panic.add (| Integer.U128, M.read (| β |), M.of_value (| Value.Integer 1 |) |) + |) in let _ := M.alloc (| M.call_closure (| @@ -747,17 +895,20 @@ Module Impl_erc1155_Contract. "erc1155::Contract", "balances" |); - Value.Tuple - [ - M.read (| caller |); - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "erc1155::Contract", - "token_id_nonce" - |) - |) - ]; + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| caller |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "erc1155::Contract", + "token_id_nonce" + |) + |)) + ] + |); M.read (| value |) ] |) @@ -773,58 +924,79 @@ Module Impl_erc1155_Contract. [ M.read (| self |) ] |) |); - Value.StructTuple - "erc1155::Event::TransferSingle" - [ - Value.StructRecord - "erc1155::TransferSingle" - [ - ("operator", - Value.StructTuple "core::option::Option::Some" [ M.read (| caller |) ]); - ("from", Value.StructTuple "core::option::Option::None" []); - ("to", - M.read (| - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := - M.use - (M.alloc (| - BinOp.Pure.eq - (M.read (| value |)) - (Value.Integer Integer.U128 0) - |)) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.alloc (| - Value.StructTuple "core::option::Option::None" [] - |))); - fun γ => - ltac:(M.monadic - (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| caller |) ] - |))) - ] - |) - |)); - ("token_id", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "erc1155::Contract", - "token_id_nonce" - |) - |)); - ("value", M.read (| value |)) - ] - ] + M.of_value (| + Value.StructTuple + "erc1155::Event::TransferSingle" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc1155::TransferSingle" + [ + ("operator", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| caller |)) ] + |))); + ("from", + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |))); + ("to", + A.to_value + (M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| value |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| caller |)) ] + |) + |))) + ] + |) + |))); + ("token_id", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "erc1155::Contract", + "token_id_nonce" + |) + |))); + ("value", A.to_value (M.read (| value |))) + ] + |)) + ] + |) ] |) |) in @@ -858,7 +1030,7 @@ Module Impl_erc1155_Contract. Ok(()) } *) - Definition mint (τ : list Ty.t) (α : list Value.t) : M := + Definition mint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; token_id; value ] => ltac:(M.monadic @@ -870,23 +1042,25 @@ Module Impl_erc1155_Contract. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.le - (M.read (| token_id |)) - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.le (| + M.read (| token_id |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "erc1155::Contract", "token_id_nonce" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -894,25 +1068,32 @@ Module Impl_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ Value.StructTuple "erc1155::Error::UnexistentToken" [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple "erc1155::Error::UnexistentToken" [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let caller := @@ -946,7 +1127,10 @@ Module Impl_erc1155_Contract. "erc1155::Contract", "balances" |); - Value.Tuple [ M.read (| caller |); M.read (| token_id |) ]; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| caller |)); A.to_value (M.read (| token_id |)) ] + |); M.read (| value |) ] |) @@ -962,29 +1146,50 @@ Module Impl_erc1155_Contract. [ M.read (| self |) ] |) |); - Value.StructTuple - "erc1155::Event::TransferSingle" - [ - Value.StructRecord - "erc1155::TransferSingle" - [ - ("operator", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| caller |) ]); - ("from", Value.StructTuple "core::option::Option::None" []); - ("to", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| caller |) ]); - ("token_id", M.read (| token_id |)); - ("value", M.read (| value |)) - ] - ] + M.of_value (| + Value.StructTuple + "erc1155::Event::TransferSingle" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc1155::TransferSingle" + [ + ("operator", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| caller |)) ] + |))); + ("from", + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |))); + ("to", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| caller |)) ] + |))); + ("token_id", A.to_value (M.read (| token_id |))); + ("value", A.to_value (M.read (| value |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1021,7 +1226,7 @@ Module Impl_erc1155_Contract. })); } *) - Definition perform_transfer (τ : list Ty.t) (α : list Value.t) : M := + Definition perform_transfer (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; to; token_id; value ] => ltac:(M.monadic @@ -1055,18 +1260,28 @@ Module Impl_erc1155_Contract. "erc1155::Contract", "balances" |); - M.alloc (| Value.Tuple [ M.read (| from |); M.read (| token_id |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| from |)); A.to_value (M.read (| token_id |)) ] + |) + |) ] |); M.read (| - Value.String "Caller should have ensured that `from` holds `token_id`." + M.of_value (| + Value.String "Caller should have ensured that `from` holds `token_id`." + |) |) ] |) |) in let _ := let β := sender_balance in - M.write (| β, BinOp.Panic.sub (| M.read (| β |), M.read (| value |) |) |) in + M.write (| + β, + BinOp.Panic.sub (| Integer.U128, M.read (| β |), M.read (| value |) |) + |) in let _ := M.alloc (| M.call_closure (| @@ -1083,7 +1298,10 @@ Module Impl_erc1155_Contract. "erc1155::Contract", "balances" |); - Value.Tuple [ M.read (| from |); M.read (| token_id |) ]; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| from |)); A.to_value (M.read (| token_id |)) ] + |); M.read (| sender_balance |) ] |) @@ -1112,16 +1330,24 @@ Module Impl_erc1155_Contract. "erc1155::Contract", "balances" |); - M.alloc (| Value.Tuple [ M.read (| to |); M.read (| token_id |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| to |)); A.to_value (M.read (| token_id |)) ] + |) + |) ] |); - M.read (| M.use (M.alloc (| Value.Integer Integer.U128 0 |)) |) + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |) ] |) |) in let _ := let β := recipient_balance in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| value |) |) |) in + M.write (| + β, + BinOp.Panic.add (| Integer.U128, M.read (| β |), M.read (| value |) |) + |) in let _ := M.alloc (| M.call_closure (| @@ -1138,7 +1364,9 @@ Module Impl_erc1155_Contract. "erc1155::Contract", "balances" |); - Value.Tuple [ M.read (| to |); M.read (| token_id |) ]; + M.of_value (| + Value.Tuple [ A.to_value (M.read (| to |)); A.to_value (M.read (| token_id |)) ] + |); M.read (| recipient_balance |) ] |) @@ -1168,26 +1396,46 @@ Module Impl_erc1155_Contract. [ M.read (| self |) ] |) |); - Value.StructTuple - "erc1155::Event::TransferSingle" - [ - Value.StructRecord - "erc1155::TransferSingle" - [ - ("operator", - Value.StructTuple "core::option::Option::Some" [ M.read (| caller |) ]); - ("from", - Value.StructTuple "core::option::Option::Some" [ M.read (| from |) ]); - ("to", - Value.StructTuple "core::option::Option::Some" [ M.read (| to |) ]); - ("token_id", M.read (| token_id |)); - ("value", M.read (| value |)) - ] - ] + M.of_value (| + Value.StructTuple + "erc1155::Event::TransferSingle" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc1155::TransferSingle" + [ + ("operator", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| caller |)) ] + |))); + ("from", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| from |)) ] + |))); + ("to", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| to |)) ] + |))); + ("token_id", A.to_value (M.read (| token_id |))); + ("value", A.to_value (M.read (| value |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1268,7 +1516,7 @@ Module Impl_erc1155_Contract. } } *) - Definition transfer_acceptance_check (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer_acceptance_check (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; caller; from; to; token_id; value; data ] => ltac:(M.monadic @@ -1279,7 +1527,7 @@ Module Impl_erc1155_Contract. let token_id := M.alloc (| token_id |) in let value := M.alloc (| value |) in let data := M.alloc (| data |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -1295,7 +1543,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. self.approvals.contains(&(owner, operator)) } *) - Definition is_approved_for_all (τ : list Ty.t) (α : list Value.t) : M := + Definition is_approved_for_all (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner; operator ] => ltac:(M.monadic @@ -1317,7 +1565,11 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. "erc1155::Contract", "approvals" |); - M.alloc (| Value.Tuple [ M.read (| owner |); M.read (| operator |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| owner |)); A.to_value (M.read (| operator |)) ] + |) + |) ] |))) | _, _ => M.impossible @@ -1328,7 +1580,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. self.balances.get(&(owner, token_id)).unwrap_or(0 as u128) } *) - Definition balance_of (τ : list Ty.t) (α : list Value.t) : M := + Definition balance_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner; token_id ] => ltac:(M.monadic @@ -1356,10 +1608,15 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. "erc1155::Contract", "balances" |); - M.alloc (| Value.Tuple [ M.read (| owner |); M.read (| token_id |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| owner |)); A.to_value (M.read (| token_id |)) ] + |) + |) ] |); - M.read (| M.use (M.alloc (| Value.Integer Integer.U128 0 |)) |) + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |) ] |))) | _, _ => M.impossible @@ -1390,7 +1647,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. Ok(()) } *) - Definition safe_transfer_from (τ : list Ty.t) (α : list Value.t) : M := + Definition safe_transfer_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; to; token_id; value; data ] => ltac:(M.monadic @@ -1419,7 +1676,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1441,15 +1698,15 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "erc1155::Erc1155", Ty.path "erc1155::Contract", @@ -1462,7 +1719,8 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.read (| from |); M.read (| caller |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1473,43 +1731,52 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ Value.StructTuple "erc1155::Error::NotApproved" [] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "erc1155::Error::NotApproved" + [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.path "erc1155::AccountId", @@ -1526,7 +1793,8 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1534,25 +1802,34 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ Value.StructTuple "erc1155::Error::ZeroAddressTransfer" [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "erc1155::Error::ZeroAddressTransfer" + [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let balance := @@ -1570,15 +1847,16 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge (M.read (| balance |)) (M.read (| value |))) + UnOp.Pure.not (| + BinOp.Pure.ge (| M.read (| balance |), M.read (| value |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1586,25 +1864,34 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ Value.StructTuple "erc1155::Error::InsufficientBalance" [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "erc1155::Error::InsufficientBalance" + [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1643,7 +1930,13 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1687,7 +1980,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. Ok(()) } *) - Definition safe_batch_transfer_from (τ : list Ty.t) (α : list Value.t) : M := + Definition safe_batch_transfer_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; to; token_ids; values; data ] => ltac:(M.monadic @@ -1716,7 +2009,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1738,15 +2031,15 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "erc1155::Erc1155", Ty.path "erc1155::Contract", @@ -1759,7 +2052,8 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.read (| from |); M.read (| caller |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1770,43 +2064,52 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ Value.StructTuple "erc1155::Error::NotApproved" [] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "erc1155::Error::NotApproved" + [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.path "erc1155::AccountId", @@ -1823,7 +2126,8 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |) |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1831,39 +2135,48 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ Value.StructTuple "erc1155::Error::ZeroAddressTransfer" [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "erc1155::Error::ZeroAddressTransfer" + [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -1872,7 +2185,9 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [] |), [ token_ids ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1880,40 +2195,48 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ Value.StructTuple "erc1155::Error::BatchTransferMismatch" [] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "erc1155::Error::BatchTransferMismatch" + [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -1922,8 +2245,8 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [] |), [ token_ids ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -1932,7 +2255,9 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [] |), [ values ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1940,26 +2265,34 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ Value.StructTuple "erc1155::Error::BatchTransferMismatch" [] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "erc1155::Error::BatchTransferMismatch" + [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let transfers := @@ -2122,17 +2455,19 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.read (| balance |)) - (M.read (| v |))) + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.read (| balance |), + M.read (| v |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -2143,36 +2478,42 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ - Value.StructTuple - "erc1155::Error::InsufficientBalance" - [] - ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple + "erc1155::Error::InsufficientBalance" + [] + |) + ] + |)) + ] + |) |) |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2262,10 +2603,10 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2293,7 +2634,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. "index", [] |), - [ token_ids; Value.Integer Integer.Usize 0 ] + [ token_ids; M.of_value (| Value.Integer 0 |) ] |) |); M.read (| @@ -2307,14 +2648,20 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. "index", [] |), - [ values; Value.Integer Integer.Usize 0 ] + [ values; M.of_value (| Value.Integer 0 |) ] |) |); M.read (| data |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2332,7 +2679,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. output } *) - Definition balance_of_batch (τ : list Ty.t) (α : list Value.t) : M := + Definition balance_of_batch (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owners; token_ids ] => ltac:(M.monadic @@ -2503,16 +2850,18 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [ output; M.read (| amount |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -2541,7 +2890,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. Ok(()) } *) - Definition set_approval_for_all (τ : list Ty.t) (α : list Value.t) : M := + Definition set_approval_for_all (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; operator; approved ] => ltac:(M.monadic @@ -2567,15 +2916,15 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.path "erc1155::AccountId", @@ -2584,7 +2933,8 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [] |), [ operator; caller ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -2592,30 +2942,37 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::Into", - Ty.path "erc1155::Error", - [ Ty.path "erc1155::Error" ], - "into", - [] - |), - [ Value.StructTuple "erc1155::Error::SelfApproval" [] ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "erc1155::Error", + [ Ty.path "erc1155::Error" ], + "into", + [] + |), + [ + M.of_value (| + Value.StructTuple "erc1155::Error::SelfApproval" [] + |) + ] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2643,12 +3000,18 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. "erc1155::Contract", "approvals" |); - Value.Tuple [ M.read (| caller |); M.read (| operator |) ]; - Value.Tuple [] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| caller |)); + A.to_value (M.read (| operator |)) + ] + |); + M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -2672,11 +3035,17 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. "erc1155::Contract", "approvals" |); - Value.Tuple [ M.read (| caller |); M.read (| operator |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| caller |)); + A.to_value (M.read (| operator |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -2690,21 +3059,32 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [ M.read (| self |) ] |) |); - Value.StructTuple - "erc1155::Event::ApprovalForAll" - [ - Value.StructRecord - "erc1155::ApprovalForAll" - [ - ("owner", M.read (| caller |)); - ("operator", M.read (| operator |)); - ("approved", M.read (| approved |)) - ] - ] + M.of_value (| + Value.StructTuple + "erc1155::Event::ApprovalForAll" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc1155::ApprovalForAll" + [ + ("owner", A.to_value (M.read (| caller |))); + ("operator", A.to_value (M.read (| operator |))); + ("approved", A.to_value (M.read (| approved |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2752,7 +3132,7 @@ Module Impl_erc1155_Erc1155TokenReceiver_for_erc1155_Contract. unimplemented!("This smart contract does not accept token transfer.") } *) - Definition on_received (τ : list Ty.t) (α : list Value.t) : M := + Definition on_received (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _operator; _from; _token_id; _value; _data ] => ltac:(M.monadic @@ -2770,19 +3150,25 @@ Module Impl_erc1155_Erc1155TokenReceiver_for_erc1155_Contract. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "not implemented: This smart contract does not accept token transfer." - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "not implemented: This smart contract does not accept token transfer." + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -2791,7 +3177,8 @@ Module Impl_erc1155_Erc1155TokenReceiver_for_erc1155_Contract. |), [] |) - |)) + |) + |) ] |) ] @@ -2823,7 +3210,7 @@ Module Impl_erc1155_Erc1155TokenReceiver_for_erc1155_Contract. unimplemented!("This smart contract does not accept batch token transfers.") } *) - Definition on_batch_received (τ : list Ty.t) (α : list Value.t) : M := + Definition on_batch_received (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _operator; _from; _token_ids; _values; _data ] => ltac:(M.monadic @@ -2841,19 +3228,25 @@ Module Impl_erc1155_Erc1155TokenReceiver_for_erc1155_Contract. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "not implemented: This smart contract does not accept batch token transfers." - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "not implemented: This smart contract does not accept batch token transfers." + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -2862,7 +3255,8 @@ Module Impl_erc1155_Erc1155TokenReceiver_for_erc1155_Contract. |), [] |) - |)) + |) + |) ] |) ] diff --git a/CoqOfRust/examples/default/examples/ink_contracts/erc20.v b/CoqOfRust/examples/default/examples/ink_contracts/erc20.v index e3c6751e8..a679dfe34 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/erc20.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/erc20.v @@ -16,37 +16,41 @@ Module Impl_core_default_Default_where_core_default_Default_K_where_core_default Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc20::Mapping") [ K; V ]. (* Default *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "erc20::Mapping" - [ - ("_key", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ K ], - [], - "default", - [] - |), - [] - |)); - ("_value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "erc20::Mapping" + [ + ("_key", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ K ], + [], + "default", + [] + |), + [] + |))); + ("_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -67,7 +71,21 @@ Module Impl_erc20_Mapping_K_V. unimplemented!() } *) - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition get (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_get : forall (K V : Ty.t), @@ -78,7 +96,22 @@ Module Impl_erc20_Mapping_K_V. unimplemented!() } *) - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key; _value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -96,18 +129,27 @@ Module Impl_core_default_Default_for_erc20_AccountId. Definition Self : Ty.t := Ty.path "erc20::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "erc20::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "erc20::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -123,14 +165,14 @@ Module Impl_core_clone_Clone_for_erc20_AccountId. Definition Self : Ty.t := Ty.path "erc20::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -181,54 +223,59 @@ Module Impl_core_default_Default_for_erc20_Erc20. Definition Self : Ty.t := Ty.path "erc20::Erc20". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "erc20::Erc20" - [ - ("total_supply", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u128", - [], - "default", - [] - |), - [] - |)); - ("balances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "erc20::Mapping") - [ Ty.path "erc20::AccountId"; Ty.path "u128" ], - [], - "default", - [] - |), - [] - |)); - ("allowances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "erc20::Mapping") - [ - Ty.tuple [ Ty.path "erc20::AccountId"; Ty.path "erc20::AccountId" ]; - Ty.path "u128" - ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "erc20::Erc20" + [ + ("total_supply", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |))); + ("balances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "erc20::Mapping") + [ Ty.path "erc20::AccountId"; Ty.path "u128" ], + [], + "default", + [] + |), + [] + |))); + ("allowances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "erc20::Mapping") + [ + Ty.tuple [ Ty.path "erc20::AccountId"; Ty.path "erc20::AccountId" ]; + Ty.path "u128" + ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -317,7 +364,7 @@ Module Impl_erc20_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -335,7 +382,20 @@ Module Impl_erc20_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_erc20_Env. @@ -348,7 +408,18 @@ Module Impl_erc20_Erc20. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -357,7 +428,7 @@ Module Impl_erc20_Erc20. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -387,7 +458,7 @@ Module Impl_erc20_Erc20. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ total_supply ] => ltac:(M.monadic @@ -446,44 +517,61 @@ Module Impl_erc20_Erc20. [] |) |); - Value.StructTuple - "erc20::Event::Transfer" - [ - Value.StructRecord - "erc20::Transfer" - [ - ("from", Value.StructTuple "core::option::Option::None" []); - ("to", - Value.StructTuple "core::option::Option::Some" [ M.read (| caller |) ]); - ("value", M.read (| total_supply |)) - ] - ] + M.of_value (| + Value.StructTuple + "erc20::Event::Transfer" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc20::Transfer" + [ + ("from", + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |))); + ("to", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| caller |)) ] + |))); + ("value", A.to_value (M.read (| total_supply |))) + ] + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "erc20::Erc20" - [ - ("total_supply", M.read (| total_supply |)); - ("balances", M.read (| balances |)); - ("allowances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "erc20::Mapping") - [ - Ty.tuple [ Ty.path "erc20::AccountId"; Ty.path "erc20::AccountId" ]; - Ty.path "u128" - ], - [], - "default", - [] - |), - [] - |)) - ] + M.of_value (| + Value.StructRecord + "erc20::Erc20" + [ + ("total_supply", A.to_value (M.read (| total_supply |))); + ("balances", A.to_value (M.read (| balances |))); + ("allowances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "erc20::Mapping") + [ + Ty.tuple [ Ty.path "erc20::AccountId"; Ty.path "erc20::AccountId" ]; + Ty.path "u128" + ], + [], + "default", + [] + |), + [] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -496,7 +584,7 @@ Module Impl_erc20_Erc20. self.total_supply } *) - Definition total_supply (τ : list Ty.t) (α : list Value.t) : M := + Definition total_supply (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -518,7 +606,7 @@ Module Impl_erc20_Erc20. self.balances.get(owner).unwrap_or_default() } *) - Definition balance_of_impl (τ : list Ty.t) (α : list Value.t) : M := + Definition balance_of_impl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic @@ -559,7 +647,7 @@ Module Impl_erc20_Erc20. self.balance_of_impl(&owner) } *) - Definition balance_of (τ : list Ty.t) (α : list Value.t) : M := + Definition balance_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic @@ -579,7 +667,7 @@ Module Impl_erc20_Erc20. self.allowances.get(&( *owner, *spender)).unwrap_or_default() } *) - Definition allowance_impl (τ : list Ty.t) (α : list Value.t) : M := + Definition allowance_impl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner; spender ] => ltac:(M.monadic @@ -611,7 +699,13 @@ Module Impl_erc20_Erc20. "allowances" |); M.alloc (| - Value.Tuple [ M.read (| M.read (| owner |) |); M.read (| M.read (| spender |) |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.read (| owner |) |)); + A.to_value (M.read (| M.read (| spender |) |)) + ] + |) |) ] |) @@ -628,7 +722,7 @@ Module Impl_erc20_Erc20. self.allowance_impl(&owner, &spender) } *) - Definition allowance (τ : list Ty.t) (α : list Value.t) : M := + Definition allowance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner; spender ] => ltac:(M.monadic @@ -662,7 +756,7 @@ Module Impl_erc20_Erc20. Ok(()) } *) - Definition transfer_from_to (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer_from_to (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; to; value ] => ltac:(M.monadic @@ -682,14 +776,14 @@ Module Impl_erc20_Erc20. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| from_balance |)) (M.read (| value |)) + BinOp.Pure.lt (| M.read (| from_balance |), M.read (| value |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -697,14 +791,21 @@ Module Impl_erc20_Erc20. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "erc20::Error::InsufficientBalance" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "erc20::Error::InsufficientBalance" [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -724,7 +825,11 @@ Module Impl_erc20_Erc20. "balances" |); M.read (| M.read (| from |) |); - BinOp.Panic.sub (| M.read (| from_balance |), M.read (| value |) |) + BinOp.Panic.sub (| + Integer.U128, + M.read (| from_balance |), + M.read (| value |) + |) ] |) |) in @@ -752,7 +857,11 @@ Module Impl_erc20_Erc20. "balances" |); M.read (| M.read (| to |) |); - BinOp.Panic.add (| M.read (| to_balance |), M.read (| value |) |) + BinOp.Panic.add (| + Integer.U128, + M.read (| to_balance |), + M.read (| value |) + |) ] |) |) in @@ -767,27 +876,44 @@ Module Impl_erc20_Erc20. [ M.read (| self |) ] |) |); - Value.StructTuple - "erc20::Event::Transfer" - [ - Value.StructRecord - "erc20::Transfer" - [ - ("from", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| M.read (| from |) |) ]); - ("to", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| M.read (| to |) |) ]); - ("value", M.read (| value |)) - ] - ] + M.of_value (| + Value.StructTuple + "erc20::Event::Transfer" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc20::Transfer" + [ + ("from", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.read (| from |) |)) ] + |))); + ("to", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.read (| to |) |)) ] + |))); + ("value", A.to_value (M.read (| value |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -802,7 +928,7 @@ Module Impl_erc20_Erc20. self.transfer_from_to(&from, &to, value) } *) - Definition transfer (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; to; value ] => ltac:(M.monadic @@ -848,7 +974,7 @@ Module Impl_erc20_Erc20. Ok(()) } *) - Definition approve (τ : list Ty.t) (α : list Value.t) : M := + Definition approve (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; spender; value ] => ltac:(M.monadic @@ -889,7 +1015,10 @@ Module Impl_erc20_Erc20. "erc20::Erc20", "allowances" |); - Value.Tuple [ M.read (| owner |); M.read (| spender |) ]; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| owner |)); A.to_value (M.read (| spender |)) ] + |); M.read (| value |) ] |) @@ -905,21 +1034,32 @@ Module Impl_erc20_Erc20. [ M.read (| self |) ] |) |); - Value.StructTuple - "erc20::Event::Approval" - [ - Value.StructRecord - "erc20::Approval" - [ - ("owner", M.read (| owner |)); - ("spender", M.read (| spender |)); - ("value", M.read (| value |)) - ] - ] + M.of_value (| + Value.StructTuple + "erc20::Event::Approval" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc20::Approval" + [ + ("owner", A.to_value (M.read (| owner |))); + ("spender", A.to_value (M.read (| spender |))); + ("value", A.to_value (M.read (| value |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -938,7 +1078,7 @@ Module Impl_erc20_Erc20. Ok(()) } *) - Definition transfer_from (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; to; value ] => ltac:(M.monadic @@ -972,14 +1112,14 @@ Module Impl_erc20_Erc20. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| allowance |)) (M.read (| value |)) + BinOp.Pure.lt (| M.read (| allowance |), M.read (| value |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -987,14 +1127,21 @@ Module Impl_erc20_Erc20. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "erc20::Error::InsufficientAllowance" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "erc20::Error::InsufficientAllowance" [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1090,12 +1237,21 @@ Module Impl_erc20_Erc20. "erc20::Erc20", "allowances" |); - Value.Tuple [ M.read (| from |); M.read (| caller |) ]; - BinOp.Panic.sub (| M.read (| allowance |), M.read (| value |) |) + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| from |)); A.to_value (M.read (| caller |)) ] + |); + BinOp.Panic.sub (| Integer.U128, M.read (| allowance |), M.read (| value |) |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/ink_contracts/erc721.v b/CoqOfRust/examples/default/examples/ink_contracts/erc721.v index fad7ff955..41e6b1622 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/erc721.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/erc721.v @@ -16,37 +16,41 @@ Module Impl_core_default_Default_where_core_default_Default_K_where_core_default Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "erc721::Mapping") [ K; V ]. (* Default *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "erc721::Mapping" - [ - ("_key", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ K ], - [], - "default", - [] - |), - [] - |)); - ("_value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "erc721::Mapping" + [ + ("_key", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ K ], + [], + "default", + [] + |), + [] + |))); + ("_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -67,7 +71,21 @@ Module Impl_erc721_Mapping_K_V. unimplemented!() } *) - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition contains (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_contains : forall (K V : Ty.t), @@ -78,7 +96,21 @@ Module Impl_erc721_Mapping_K_V. unimplemented!() } *) - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition get (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_get : forall (K V : Ty.t), @@ -89,7 +121,22 @@ Module Impl_erc721_Mapping_K_V. unimplemented!() } *) - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key; _value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -100,7 +147,21 @@ Module Impl_erc721_Mapping_K_V. unimplemented!() } *) - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition remove (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_remove : forall (K V : Ty.t), @@ -111,7 +172,21 @@ Module Impl_erc721_Mapping_K_V. unimplemented!() } *) - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition size (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_size : forall (K V : Ty.t), @@ -122,7 +197,21 @@ Module Impl_erc721_Mapping_K_V. unimplemented!() } *) - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition take (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -140,18 +229,27 @@ Module Impl_core_default_Default_for_erc721_AccountId. Definition Self : Ty.t := Ty.path "erc721::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "erc721::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "erc721::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -167,14 +265,14 @@ Module Impl_core_clone_Clone_for_erc721_AccountId. Definition Self : Ty.t := Ty.path "erc721::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -211,19 +309,20 @@ Module Impl_core_cmp_PartialEq_for_erc721_AccountId. Definition Self : Ty.t := Ty.path "erc721::AccountId". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "erc721::AccountId", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "erc721::AccountId", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -243,7 +342,19 @@ Module Impl_core_convert_From_array_u8_for_erc721_AccountId. unimplemented!() } *) - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ _value ] => + ltac:(M.monadic + (let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -287,69 +398,75 @@ Module Impl_core_default_Default_for_erc721_Erc721. Definition Self : Ty.t := Ty.path "erc721::Erc721". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "erc721::Erc721" - [ - ("token_owner", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "erc721::Mapping") - [ Ty.path "u32"; Ty.path "erc721::AccountId" ], - [], - "default", - [] - |), - [] - |)); - ("token_approvals", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "erc721::Mapping") - [ Ty.path "u32"; Ty.path "erc721::AccountId" ], - [], - "default", - [] - |), - [] - |)); - ("owned_tokens_count", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "erc721::Mapping") - [ Ty.path "erc721::AccountId"; Ty.path "u32" ], - [], - "default", - [] - |), - [] - |)); - ("operator_approvals", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "erc721::Mapping") - [ - Ty.tuple [ Ty.path "erc721::AccountId"; Ty.path "erc721::AccountId" ]; - Ty.tuple [] - ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "erc721::Erc721" + [ + ("token_owner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "erc721::Mapping") + [ Ty.path "u32"; Ty.path "erc721::AccountId" ], + [], + "default", + [] + |), + [] + |))); + ("token_approvals", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "erc721::Mapping") + [ Ty.path "u32"; Ty.path "erc721::AccountId" ], + [], + "default", + [] + |), + [] + |))); + ("owned_tokens_count", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "erc721::Mapping") + [ Ty.path "erc721::AccountId"; Ty.path "u32" ], + [], + "default", + [] + |), + [] + |))); + ("operator_approvals", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "erc721::Mapping") + [ + Ty.tuple [ Ty.path "erc721::AccountId"; Ty.path "erc721::AccountId" ]; + Ty.tuple [] + ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -421,7 +538,7 @@ Module Impl_core_cmp_PartialEq_for_erc721_Error. Definition Self : Ty.t := Ty.path "erc721::Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -448,7 +565,7 @@ Module Impl_core_cmp_PartialEq_for_erc721_Error. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -476,12 +593,12 @@ Module Impl_core_cmp_Eq_for_erc721_Error. Definition Self : Ty.t := Ty.path "erc721::Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -498,7 +615,7 @@ Module Impl_core_clone_Clone_for_erc721_Error. Definition Self : Ty.t := Ty.path "erc721::Error". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -591,7 +708,7 @@ Module Impl_erc721_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -609,7 +726,20 @@ Module Impl_erc721_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_erc721_Env. @@ -622,7 +752,18 @@ Module Impl_erc721_Erc721. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -631,7 +772,7 @@ Module Impl_erc721_Erc721. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -650,7 +791,7 @@ Module Impl_erc721_Erc721. Default::default() } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -674,7 +815,7 @@ Module Impl_erc721_Erc721. self.owned_tokens_count.get(of).unwrap_or(0 as u32) } *) - Definition balance_of_or_zero (τ : list Ty.t) (α : list Value.t) : M := + Definition balance_of_or_zero (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; of ] => ltac:(M.monadic @@ -702,7 +843,7 @@ Module Impl_erc721_Erc721. M.read (| of |) ] |); - M.read (| M.use (M.alloc (| Value.Integer Integer.U32 0 |)) |) + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |) ] |))) | _, _ => M.impossible @@ -716,7 +857,7 @@ Module Impl_erc721_Erc721. self.token_approvals.remove(id); } *) - Definition clear_approval (τ : list Ty.t) (α : list Value.t) : M := + Definition clear_approval (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; id ] => ltac:(M.monadic @@ -743,7 +884,7 @@ Module Impl_erc721_Erc721. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -756,7 +897,7 @@ Module Impl_erc721_Erc721. self.operator_approvals.contains(&(owner, operator)) } *) - Definition approved_for_all (τ : list Ty.t) (α : list Value.t) : M := + Definition approved_for_all (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner; operator ] => ltac:(M.monadic @@ -778,7 +919,11 @@ Module Impl_erc721_Erc721. "erc721::Erc721", "operator_approvals" |); - M.alloc (| Value.Tuple [ M.read (| owner |); M.read (| operator |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| owner |)); A.to_value (M.read (| operator |)) ] + |) + |) ] |))) | _, _ => M.impossible @@ -792,7 +937,7 @@ Module Impl_erc721_Erc721. self.token_owner.get(&id) } *) - Definition owner_of (τ : list Ty.t) (α : list Value.t) : M := + Definition owner_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; id ] => ltac:(M.monadic @@ -830,7 +975,7 @@ Module Impl_erc721_Erc721. )) } *) - Definition approved_or_owner (τ : list Ty.t) (α : list Value.t) : M := + Definition approved_or_owner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; id ] => ltac:(M.monadic @@ -858,20 +1003,23 @@ Module Impl_erc721_Erc721. [ from; M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "erc721::AccountId", - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], - "from", - [] - |), - [ repeat (Value.Integer Integer.U8 0) 32 ] - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "erc721::AccountId", + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], + "from", + [] + |), + [ repeat (| M.of_value (| Value.Integer 0 |), 32 |) ] + |)) + ] + |) |) ] |), @@ -943,7 +1091,10 @@ Module Impl_erc721_Erc721. "expect", [] |), - [ M.read (| owner |); M.read (| Value.String "Error with AccountId" |) ] + [ + M.read (| owner |); + M.read (| M.of_value (| Value.String "Error with AccountId" |) |) + ] |); M.call_closure (| M.get_associated_function (| @@ -953,7 +1104,10 @@ Module Impl_erc721_Erc721. "expect", [] |), - [ M.read (| from |); M.read (| Value.String "Error with AccountId" |) ] + [ + M.read (| from |); + M.read (| M.of_value (| Value.String "Error with AccountId" |) |) + ] |) ] |))) @@ -972,7 +1126,7 @@ Module Impl_erc721_Erc721. self.token_owner.contains(&id) } *) - Definition exists_ (τ : list Ty.t) (α : list Value.t) : M := + Definition exists_ (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; id ] => ltac:(M.monadic @@ -1003,7 +1157,7 @@ Module Impl_erc721_Erc721. self.balance_of_or_zero(&owner) } *) - Definition balance_of (τ : list Ty.t) (α : list Value.t) : M := + Definition balance_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic @@ -1023,7 +1177,7 @@ Module Impl_erc721_Erc721. self.token_approvals.get(&id) } *) - Definition get_approved (τ : list Ty.t) (α : list Value.t) : M := + Definition get_approved (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; id ] => ltac:(M.monadic @@ -1054,7 +1208,7 @@ Module Impl_erc721_Erc721. self.approved_for_all(owner, operator) } *) - Definition is_approved_for_all (τ : list Ty.t) (α : list Value.t) : M := + Definition is_approved_for_all (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner; operator ] => ltac:(M.monadic @@ -1092,7 +1246,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Definition approve_for_all (τ : list Ty.t) (α : list Value.t) : M := + Definition approve_for_all (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; to; approved ] => ltac:(M.monadic @@ -1118,7 +1272,7 @@ Module Impl_erc721_Erc721. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1142,14 +1296,21 @@ Module Impl_erc721_Erc721. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "erc721::Error::NotAllowed" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "erc721::Error::NotAllowed" [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1163,23 +1324,28 @@ Module Impl_erc721_Erc721. [ M.read (| self |) ] |) |); - Value.StructTuple - "erc721::Event::ApprovalForAll" - [ - Value.StructRecord - "erc721::ApprovalForAll" - [ - ("owner", M.read (| caller |)); - ("operator", M.read (| to |)); - ("approved", M.read (| approved |)) - ] - ] + M.of_value (| + Value.StructTuple + "erc721::Event::ApprovalForAll" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc721::ApprovalForAll" + [ + ("owner", A.to_value (M.read (| caller |))); + ("operator", A.to_value (M.read (| to |))); + ("approved", A.to_value (M.read (| approved |))) + ] + |)) + ] + |) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1206,12 +1372,16 @@ Module Impl_erc721_Erc721. "erc721::Erc721", "operator_approvals" |); - Value.Tuple [ M.read (| caller |); M.read (| to |) ]; - Value.Tuple [] + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| caller |)); A.to_value (M.read (| to |)) + ] + |); + M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -1234,14 +1404,24 @@ Module Impl_erc721_Erc721. "erc721::Erc721", "operator_approvals" |); - Value.Tuple [ M.read (| caller |); M.read (| to |) ] + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| caller |)); A.to_value (M.read (| to |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1256,7 +1436,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Definition set_approval_for_all (τ : list Ty.t) (α : list Value.t) : M := + Definition set_approval_for_all (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; to; approved ] => ltac:(M.monadic @@ -1340,7 +1520,13 @@ Module Impl_erc721_Erc721. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1378,7 +1564,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Definition approve_for (τ : list Ty.t) (α : list Value.t) : M := + Definition approve_for (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; to; id ] => ltac:(M.monadic @@ -1411,15 +1597,15 @@ Module Impl_erc721_Erc721. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.or (| + UnOp.Pure.not (| + LogicalOp.or (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", @@ -1437,9 +1623,11 @@ Module Impl_erc721_Erc721. [ owner; M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| caller |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| caller |)) ] + |) |) ] |), @@ -1462,13 +1650,16 @@ Module Impl_erc721_Erc721. |), [ M.read (| owner |); - M.read (| Value.String "Error with AccountId" |) + M.read (| + M.of_value (| Value.String "Error with AccountId" |) + |) ] |); M.read (| caller |) ] |))) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1476,19 +1667,26 @@ Module Impl_erc721_Erc721. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "erc721::Error::NotAllowed" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "erc721::Error::NotAllowed" [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1514,7 +1712,7 @@ Module Impl_erc721_Erc721. "from", [] |), - [ repeat (Value.Integer Integer.U8 0) 32 ] + [ repeat (| M.of_value (| Value.Integer 0 |), 32 |) ] |) |) ] @@ -1526,19 +1724,26 @@ Module Impl_erc721_Erc721. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "erc721::Error::NotAllowed" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "erc721::Error::NotAllowed" [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1569,9 +1774,16 @@ Module Impl_erc721_Erc721. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "erc721::Error::CannotInsert" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "erc721::Error::CannotInsert" [] + |)) + ] + |) |) |) |) @@ -1599,7 +1811,7 @@ Module Impl_erc721_Erc721. ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1613,21 +1825,32 @@ Module Impl_erc721_Erc721. [ M.read (| self |) ] |) |); - Value.StructTuple - "erc721::Event::Approval" - [ - Value.StructRecord - "erc721::Approval" - [ - ("from", M.read (| caller |)); - ("to", M.read (| M.read (| to |) |)); - ("id", M.read (| id |)) - ] - ] + M.of_value (| + Value.StructTuple + "erc721::Event::Approval" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc721::Approval" + [ + ("from", A.to_value (M.read (| caller |))); + ("to", A.to_value (M.read (| M.read (| to |) |))); + ("id", A.to_value (M.read (| id |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1641,7 +1864,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Definition approve (τ : list Ty.t) (α : list Value.t) : M := + Definition approve (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; to; id ] => ltac:(M.monadic @@ -1725,7 +1948,13 @@ Module Impl_erc721_Erc721. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1755,7 +1984,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Definition remove_token_from (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_token_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; id ] => ltac:(M.monadic @@ -1787,15 +2016,15 @@ Module Impl_erc721_Erc721. let owned_tokens_count := M.alloc (| γ1_1 |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "erc721::Mapping") @@ -1804,7 +2033,8 @@ Module Impl_erc721_Erc721. [] |), [ M.read (| token_owner |); id ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -1815,14 +2045,24 @@ Module Impl_erc721_Erc721. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "erc721::Error::TokenNotFound" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "erc721::Error::TokenNotFound" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let count := @@ -1871,8 +2111,8 @@ Module Impl_erc721_Erc721. |), [ M.read (| owned_tokens_count |); M.read (| from |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1883,21 +2123,25 @@ Module Impl_erc721_Erc721. ltac:(M.monadic (let c := M.copy (| γ |) in BinOp.Panic.sub (| + Integer.U32, M.read (| c |), M.read (| M.use (M.alloc (| - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |)) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - Value.StructTuple "erc721::Error::CannotFetchValue" [] + M.of_value (| + Value.StructTuple "erc721::Error::CannotFetchValue" [] + |) ] |) ] @@ -1984,7 +2228,11 @@ Module Impl_erc721_Erc721. |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))) ] |) @@ -2023,7 +2271,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Parameter add_token_to : (list Ty.t) -> (list Value.t) -> M. + Parameter add_token_to : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_add_token_to : M.IsAssociatedFunction Self "add_token_to" add_token_to. @@ -2052,7 +2300,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Parameter transfer_token_from : (list Ty.t) -> (list Value.t) -> M. + Parameter transfer_token_from : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_transfer_token_from : M.IsAssociatedFunction Self "transfer_token_from" transfer_token_from. @@ -2064,7 +2312,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Definition transfer (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; destination; id ] => ltac:(M.monadic @@ -2162,7 +2410,13 @@ Module Impl_erc721_Erc721. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2181,7 +2435,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Definition transfer_from (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; to; id ] => ltac:(M.monadic @@ -2266,7 +2520,13 @@ Module Impl_erc721_Erc721. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2287,7 +2547,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Definition mint (τ : list Ty.t) (α : list Value.t) : M := + Definition mint (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; id ] => ltac:(M.monadic @@ -2395,38 +2655,61 @@ Module Impl_erc721_Erc721. [ M.read (| self |) ] |) |); - Value.StructTuple - "erc721::Event::Transfer" - [ - Value.StructRecord - "erc721::Transfer" - [ - ("from", - Value.StructTuple - "core::option::Option::Some" + M.of_value (| + Value.StructTuple + "erc721::Event::Transfer" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "erc721::Transfer" [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "erc721::AccountId", - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], - "from", - [] - |), - [ repeat (Value.Integer Integer.U8 0) 32 ] - |) - ]); - ("to", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| caller |) ]); - ("id", M.read (| id |)) - ] - ] + ("from", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "erc721::AccountId", + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], + "from", + [] + |), + [ + repeat (| + M.of_value (| Value.Integer 0 |), + 32 + |) + ] + |)) + ] + |))); + ("to", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| caller |)) ] + |))); + ("id", A.to_value (M.read (| id |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -2464,7 +2747,7 @@ Module Impl_erc721_Erc721. Ok(()) } *) - Parameter burn : (list Ty.t) -> (list Value.t) -> M. + Parameter burn : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_burn : M.IsAssociatedFunction Self "burn" burn. End Impl_erc721_Erc721. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/flipper.v b/CoqOfRust/examples/default/examples/ink_contracts/flipper.v index 9858b2e83..f64831d76 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/flipper.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/flipper.v @@ -16,12 +16,14 @@ Module Impl_flipper_Flipper. Self { value: init_value } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ init_value ] => ltac:(M.monadic (let init_value := M.alloc (| init_value |) in - Value.StructRecord "flipper::Flipper" [ ("value", M.read (| init_value |)) ])) + M.of_value (| + Value.StructRecord "flipper::Flipper" [ ("value", A.to_value (M.read (| init_value |))) ] + |))) | _, _ => M.impossible end. @@ -32,7 +34,7 @@ Module Impl_flipper_Flipper. Self::new(Default::default()) } *) - Definition new_default (τ : list Ty.t) (α : list Value.t) : M := + Definition new_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -55,7 +57,7 @@ Module Impl_flipper_Flipper. self.value = !self.value; } *) - Definition flip (τ : list Ty.t) (α : list Value.t) : M := + Definition flip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -68,16 +70,17 @@ Module Impl_flipper_Flipper. "flipper::Flipper", "value" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "flipper::Flipper", "value" |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -89,7 +92,7 @@ Module Impl_flipper_Flipper. self.value } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/examples/default/examples/ink_contracts/incrementer.v b/CoqOfRust/examples/default/examples/ink_contracts/incrementer.v index bdbbacf0e..739c22d10 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/incrementer.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/incrementer.v @@ -16,12 +16,16 @@ Module Impl_incrementer_Incrementer. Self { value: init_value } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ init_value ] => ltac:(M.monadic (let init_value := M.alloc (| init_value |) in - Value.StructRecord "incrementer::Incrementer" [ ("value", M.read (| init_value |)) ])) + M.of_value (| + Value.StructRecord + "incrementer::Incrementer" + [ ("value", A.to_value (M.read (| init_value |))) ] + |))) | _, _ => M.impossible end. @@ -32,7 +36,7 @@ Module Impl_incrementer_Incrementer. Self::new(Default::default()) } *) - Definition new_default (τ : list Ty.t) (α : list Value.t) : M := + Definition new_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -55,7 +59,7 @@ Module Impl_incrementer_Incrementer. self.value += by; } *) - Definition inc (τ : list Ty.t) (α : list Value.t) : M := + Definition inc (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; by_ ] => ltac:(M.monadic @@ -69,8 +73,8 @@ Module Impl_incrementer_Incrementer. "incrementer::Incrementer", "value" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| by_ |) |) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| by_ |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -82,7 +86,7 @@ Module Impl_incrementer_Incrementer. self.value } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic 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..7ee055a32 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 @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_call_builder_AccountId. Definition Self : Ty.t := Ty.path "call_builder::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "call_builder::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "call_builder::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_call_builder_AccountId. Definition Self : Ty.t := Ty.path "call_builder::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -107,7 +116,19 @@ Module Impl_call_builder_Selector. unimplemented!() } *) - Parameter new : (list Ty.t) -> (list Value.t) -> M. + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ bytes ] => + ltac:(M.monadic + (let bytes := M.alloc (| bytes |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. End Impl_call_builder_Selector. @@ -123,9 +144,10 @@ Module Impl_core_default_Default_for_call_builder_CallBuilderTest. Definition Self : Ty.t := Ty.path "call_builder::CallBuilderTest". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "call_builder::CallBuilderTest" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "call_builder::CallBuilderTest" [] |))) | _, _ => M.impossible end. @@ -145,7 +167,7 @@ Module Impl_call_builder_CallBuilderTest. Default::default() } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -183,7 +205,7 @@ Module Impl_call_builder_CallBuilderTest. } } *) - Definition call (τ : list Ty.t) (α : list Value.t) : M := + Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; address; selector ] => ltac:(M.monadic @@ -196,7 +218,7 @@ Module Impl_call_builder_CallBuilderTest. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "not yet implemented" |) ] + [ M.read (| M.of_value (| Value.String "not yet implemented" |) |) ] |) |) |) in @@ -207,13 +229,19 @@ Module Impl_call_builder_CallBuilderTest. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| e |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| e |)) ] + |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -231,19 +259,25 @@ Module Impl_call_builder_CallBuilderTest. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "not implemented: No other `LangError` variants exist at the moment." - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "not implemented: No other `LangError` variants exist at the moment." + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -252,7 +286,8 @@ Module Impl_call_builder_CallBuilderTest. |), [] |) - |)) + |) + |) ] |) ] @@ -278,14 +313,14 @@ Module Impl_call_builder_CallBuilderTest. // .invoke() } *) - Definition invoke (τ : list Ty.t) (α : list Value.t) : M := + Definition invoke (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; address; selector ] => ltac:(M.monadic (let self := M.alloc (| self |) in let address := M.alloc (| address |) in let selector := M.alloc (| selector |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -321,7 +356,7 @@ Module Impl_call_builder_CallBuilderTest. None } *) - Definition call_instantiate (τ : list Ty.t) (α : list Value.t) : M := + Definition call_instantiate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; code_hash; selector; init_value ] => ltac:(M.monadic @@ -329,7 +364,7 @@ Module Impl_call_builder_CallBuilderTest. let code_hash := M.alloc (| code_hash |) in let selector := M.alloc (| selector |) in let init_value := M.alloc (| init_value |) in - Value.StructTuple "core::option::Option::None" [])) + M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) | _, _ => M.impossible end. @@ -363,7 +398,7 @@ Module Impl_call_builder_CallBuilderTest. None } *) - Definition call_instantiate_fallible (τ : list Ty.t) (α : list Value.t) : M := + Definition call_instantiate_fallible (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; code_hash; selector; init_value ] => ltac:(M.monadic @@ -371,7 +406,7 @@ Module Impl_call_builder_CallBuilderTest. let code_hash := M.alloc (| code_hash |) in let selector := M.alloc (| selector |) in let init_value := M.alloc (| init_value |) in - Value.StructTuple "core::option::Option::None" [])) + M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/call_builder_delegate.v b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/call_builder_delegate.v index d327eb561..95acba804 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/call_builder_delegate.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/call_builder_delegate.v @@ -30,19 +30,28 @@ Module Impl_core_default_Default_for_call_builder_delegate_CallBuilderDelegateTe Definition Self : Ty.t := Ty.path "call_builder_delegate::CallBuilderDelegateTest". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "call_builder_delegate::CallBuilderDelegateTest" - [ - ("value", - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "i32", [], "default", [] |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "call_builder_delegate::CallBuilderDelegateTest" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "i32", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -62,14 +71,16 @@ Module Impl_call_builder_delegate_CallBuilderDelegateTest. Self { value } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in - Value.StructRecord - "call_builder_delegate::CallBuilderDelegateTest" - [ ("value", M.read (| value |)) ])) + M.of_value (| + Value.StructRecord + "call_builder_delegate::CallBuilderDelegateTest" + [ ("value", A.to_value (M.read (| value |))) ] + |))) | _, _ => M.impossible end. @@ -94,14 +105,14 @@ Module Impl_call_builder_delegate_CallBuilderDelegateTest. None } *) - Definition delegate (τ : list Ty.t) (α : list Value.t) : M := + Definition delegate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; code_hash; selector ] => ltac:(M.monadic (let self := M.alloc (| self |) in let code_hash := M.alloc (| code_hash |) in let selector := M.alloc (| selector |) in - Value.StructTuple "core::option::Option::None" [])) + M.of_value (| Value.StructTuple "core::option::Option::None" [] |))) | _, _ => M.impossible end. @@ -119,14 +130,14 @@ Module Impl_call_builder_delegate_CallBuilderDelegateTest. 0 } *) - Definition invoke (τ : list Ty.t) (α : list Value.t) : M := + Definition invoke (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; code_hash; selector ] => ltac:(M.monadic (let self := M.alloc (| self |) in let code_hash := M.alloc (| code_hash |) in let selector := M.alloc (| selector |) in - Value.Integer Integer.I32 0)) + M.of_value (| Value.Integer 0 |))) | _, _ => M.impossible end. 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 3ab7924b1..25efbe33a 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 @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_constructors_return_value_AccountId. Definition Self : Ty.t := Ty.path "constructors_return_value::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "constructors_return_value::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "constructors_return_value::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_constructors_return_value_AccountId. Definition Self : Ty.t := Ty.path "constructors_return_value::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -76,7 +85,19 @@ Module Impl_core_convert_From_array_u8_for_constructors_return_value_AccountId. unimplemented!() } *) - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ _value ] => + ltac:(M.monadic + (let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -128,7 +149,7 @@ Module Impl_core_fmt_Debug_for_constructors_return_value_ConstructorError. Definition Self : Ty.t := Ty.path "constructors_return_value::ConstructorError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -136,7 +157,7 @@ Module Impl_core_fmt_Debug_for_constructors_return_value_ConstructorError. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "ConstructorError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "ConstructorError" |) |) ] |))) | _, _ => M.impossible end. @@ -164,7 +185,19 @@ Module Impl_constructors_return_value_ReturnFlags. unimplemented!() } *) - Parameter new_with_reverted : (list Ty.t) -> (list Value.t) -> M. + Definition new_with_reverted (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ has_reverted ] => + ltac:(M.monadic + (let has_reverted := M.alloc (| has_reverted |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_new_with_reverted : M.IsAssociatedFunction Self "new_with_reverted" new_with_reverted. @@ -175,7 +208,7 @@ fn return_value(return_flags: ReturnFlags, return_value: &R) -> ! { unimplemented!() } *) -Definition return_value (τ : list Ty.t) (α : list Value.t) : M := +Definition return_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ R ], [ return_flags; return_value ] => ltac:(M.monadic @@ -183,7 +216,7 @@ Definition return_value (τ : list Ty.t) (α : list Value.t) : M := let return_value := M.alloc (| return_value |) in M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "not implemented" |) ] + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] |))) | _, _ => M.impossible end. @@ -196,14 +229,16 @@ Module Impl_constructors_return_value_ConstructorsReturnValue. Self { value: init_value } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ init_value ] => ltac:(M.monadic (let init_value := M.alloc (| init_value |) in - Value.StructRecord - "constructors_return_value::ConstructorsReturnValue" - [ ("value", M.read (| init_value |)) ])) + M.of_value (| + Value.StructRecord + "constructors_return_value::ConstructorsReturnValue" + [ ("value", A.to_value (M.read (| init_value |))) ] + |))) | _, _ => M.impossible end. @@ -218,39 +253,49 @@ Module Impl_constructors_return_value_ConstructorsReturnValue. } } *) - Definition try_new (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ succeed ] => ltac:(M.monadic (let succeed := M.alloc (| succeed |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use succeed in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "constructors_return_value::ConstructorsReturnValue", - "new", - [] - |), - [ Value.Bool true ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "constructors_return_value::ConstructorsReturnValue", + "new", + [] + |), + [ M.of_value (| Value.Bool true |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "constructors_return_value::ConstructorError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "constructors_return_value::ConstructorError" [] + |)) + ] + |) |))) ] |) @@ -268,7 +313,7 @@ Module Impl_constructors_return_value_ConstructorsReturnValue. ) } *) - Definition revert_new (τ : list Ty.t) (α : list Value.t) : M := + Definition revert_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ _init_value ] => ltac:(M.monadic @@ -293,23 +338,26 @@ Module Impl_constructors_return_value_ConstructorsReturnValue. "new_with_reverted", [] |), - [ Value.Bool true ] + [ M.of_value (| Value.Bool true |) ] |); M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "constructors_return_value::AccountId", - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], - "from", - [] - |), - [ repeat (Value.Integer Integer.U8 0) 32 ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "constructors_return_value::AccountId", + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], + "from", + [] + |), + [ repeat (| M.of_value (| Value.Integer 0 |), 32 |) ] + |)) + ] + |) |) ] |) @@ -333,7 +381,7 @@ Module Impl_constructors_return_value_ConstructorsReturnValue. ) } *) - Definition try_revert_new (τ : list Ty.t) (α : list Value.t) : M := + Definition try_revert_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ init_value ] => ltac:(M.monadic @@ -342,42 +390,53 @@ Module Impl_constructors_return_value_ConstructorsReturnValue. let value := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use init_value in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "constructors_return_value::AccountId", - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], - "from", - [] - |), - [ repeat (Value.Integer Integer.U8 0) 32 ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "constructors_return_value::AccountId", + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], + "from", + [] + |), + [ repeat (| M.of_value (| Value.Integer 0 |), 32 |) ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "constructors_return_value::LangError::CouldNotReadInput" - [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "constructors_return_value::LangError::CouldNotReadInput" + [] + |)) + ] + |) |))) ] |) @@ -408,7 +467,7 @@ Module Impl_constructors_return_value_ConstructorsReturnValue. "new_with_reverted", [] |), - [ Value.Bool true ] + [ M.of_value (| Value.Bool true |) ] |); value ] @@ -427,7 +486,7 @@ Module Impl_constructors_return_value_ConstructorsReturnValue. self.value } *) - Definition get_value (τ : list Ty.t) (α : list Value.t) : M := + Definition get_value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic 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..d40a96685 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 @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_contract_ref_AccountId. Definition Self : Ty.t := Ty.path "contract_ref::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "contract_ref::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "contract_ref::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_contract_ref_AccountId. Definition Self : Ty.t := Ty.path "contract_ref::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -97,7 +106,7 @@ Module Impl_core_fmt_Debug_for_contract_ref_FlipperError. Definition Self : Ty.t := Ty.path "contract_ref::FlipperError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -105,7 +114,7 @@ Module Impl_core_fmt_Debug_for_contract_ref_FlipperError. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "FlipperError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "FlipperError" |) |) ] |))) | _, _ => M.impossible end. @@ -126,7 +135,18 @@ Module Impl_contract_ref_FlipperRef. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -135,7 +155,7 @@ Module Impl_contract_ref_FlipperRef. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -154,12 +174,16 @@ Module Impl_contract_ref_FlipperRef. Self { value: init_value } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ init_value ] => ltac:(M.monadic (let init_value := M.alloc (| init_value |) in - Value.StructRecord "contract_ref::FlipperRef" [ ("value", M.read (| init_value |)) ])) + M.of_value (| + Value.StructRecord + "contract_ref::FlipperRef" + [ ("value", A.to_value (M.read (| init_value |))) ] + |))) | _, _ => M.impossible end. @@ -170,7 +194,7 @@ Module Impl_contract_ref_FlipperRef. Self::new(Default::default()) } *) - Definition new_default (τ : list Ty.t) (α : list Value.t) : M := + Definition new_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -197,39 +221,47 @@ Module Impl_contract_ref_FlipperRef. } } *) - Definition try_new (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ succeed ] => ltac:(M.monadic (let succeed := M.alloc (| succeed |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use succeed in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "contract_ref::FlipperRef", - "new", - [] - |), - [ Value.Bool true ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "contract_ref::FlipperRef", + "new", + [] + |), + [ M.of_value (| Value.Bool true |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "contract_ref::FlipperError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| Value.StructTuple "contract_ref::FlipperError" [] |)) + ] + |) |))) ] |) @@ -244,7 +276,7 @@ Module Impl_contract_ref_FlipperRef. self.value = !self.value; } *) - Definition flip (τ : list Ty.t) (α : list Value.t) : M := + Definition flip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -257,16 +289,17 @@ Module Impl_contract_ref_FlipperRef. "contract_ref::FlipperRef", "value" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "contract_ref::FlipperRef", "value" |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -278,7 +311,7 @@ Module Impl_contract_ref_FlipperRef. self.value } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -318,7 +351,7 @@ Module Impl_contract_ref_ContractRef. Self { flipper } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ version; flipper_code_hash ] => ltac:(M.monadic @@ -344,7 +377,11 @@ Module Impl_contract_ref_ContractRef. |) |) in M.alloc (| - Value.StructRecord "contract_ref::ContractRef" [ ("flipper", M.read (| flipper |)) ] + M.of_value (| + Value.StructRecord + "contract_ref::ContractRef" + [ ("flipper", A.to_value (M.read (| flipper |))) ] + |) |) |))) | _, _ => M.impossible @@ -370,7 +407,7 @@ Module Impl_contract_ref_ContractRef. Self { flipper } } *) - Definition try_new (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ version; flipper_code_hash; succeed ] => ltac:(M.monadic @@ -408,7 +445,11 @@ Module Impl_contract_ref_ContractRef. |) |) in M.alloc (| - Value.StructRecord "contract_ref::ContractRef" [ ("flipper", M.read (| flipper |)) ] + M.of_value (| + Value.StructRecord + "contract_ref::ContractRef" + [ ("flipper", A.to_value (M.read (| flipper |))) ] + |) |) |))) | _, _ => M.impossible @@ -421,7 +462,7 @@ Module Impl_contract_ref_ContractRef. self.flipper.flip(); } *) - Definition flip (τ : list Ty.t) (α : list Value.t) : M := + Definition flip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -440,7 +481,7 @@ Module Impl_contract_ref_ContractRef. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -452,7 +493,7 @@ Module Impl_contract_ref_ContractRef. self.flipper.get() } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic 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..e51e4abd8 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 @@ -19,7 +19,7 @@ Module Impl_core_fmt_Debug_for_integration_flipper_FlipperError. Definition Self : Ty.t := Ty.path "integration_flipper::FlipperError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -27,7 +27,7 @@ Module Impl_core_fmt_Debug_for_integration_flipper_FlipperError. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "FlipperError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "FlipperError" |) |) ] |))) | _, _ => M.impossible end. @@ -48,12 +48,16 @@ Module Impl_integration_flipper_Flipper. Self { value: init_value } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ init_value ] => ltac:(M.monadic (let init_value := M.alloc (| init_value |) in - Value.StructRecord "integration_flipper::Flipper" [ ("value", M.read (| init_value |)) ])) + M.of_value (| + Value.StructRecord + "integration_flipper::Flipper" + [ ("value", A.to_value (M.read (| init_value |))) ] + |))) | _, _ => M.impossible end. @@ -64,7 +68,7 @@ Module Impl_integration_flipper_Flipper. Self::new(Default::default()) } *) - Definition new_default (τ : list Ty.t) (α : list Value.t) : M := + Definition new_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -91,39 +95,49 @@ Module Impl_integration_flipper_Flipper. } } *) - Definition try_new (τ : list Ty.t) (α : list Value.t) : M := + Definition try_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ succeed ] => ltac:(M.monadic (let succeed := M.alloc (| succeed |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use succeed in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "integration_flipper::Flipper", - "new", - [] - |), - [ Value.Bool true ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "integration_flipper::Flipper", + "new", + [] + |), + [ M.of_value (| Value.Bool true |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "integration_flipper::FlipperError" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "integration_flipper::FlipperError" [] + |)) + ] + |) |))) ] |) @@ -138,7 +152,7 @@ Module Impl_integration_flipper_Flipper. self.value = !self.value; } *) - Definition flip (τ : list Ty.t) (α : list Value.t) : M := + Definition flip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -151,16 +165,17 @@ Module Impl_integration_flipper_Flipper. "integration_flipper::Flipper", "value" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "integration_flipper::Flipper", "value" |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -172,7 +187,7 @@ Module Impl_integration_flipper_Flipper. self.value } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -195,7 +210,7 @@ Module Impl_integration_flipper_Flipper. Err(()) } *) - Definition err_flip (τ : list Ty.t) (α : list Value.t) : M := + Definition err_flip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -208,7 +223,13 @@ Module Impl_integration_flipper_Flipper. [ M.read (| self |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/lib.v b/CoqOfRust/examples/default/examples/ink_contracts/lib.v index 003f089cf..3d0cdb24f 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/lib.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/lib.v @@ -21,13 +21,13 @@ Module Impl_Mapping_t_K_V. Ty.apply (Ty.path "erc20::Mapping") [ K; V ]. (** fn get(&self, key: &K) -> Option *) - Definition get (K V : Ty.t) (𝜏 : list Ty.t) (α : list Value.t) : M := + Definition get (K V : Ty.t) (𝜏 : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match 𝜏, α with | [], [ self; key ] => let* self := M.read self in let* key := M.read key in - M.pure (Mapping.get key self) + M.of_value (Mapping.get (A.to_value key) (A.to_value self)) | _, _ => M.impossible end. @@ -37,14 +37,16 @@ Module Impl_Mapping_t_K_V. (** fn insert(&mut self, key: K, value: V) *) Definition insert - (K V : Ty.t) (𝜏 : list Ty.t) (α : list Value.t) : M := + (K V : Ty.t) (𝜏 : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match 𝜏, α with | [], [ self; key; value ] => let* self_content := M.read self in - let new_self_content := Mapping.insert key value self_content in + let* new_self_content := M.of_value ( + Mapping.insert (A.to_value key) (A.to_value value) (A.to_value self_content) + ) in let* _ := assign self new_self_content in - M.pure (Value.Tuple []) + M.of_value (Value.Tuple []) | _, _ => M.impossible end. 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..62c07309f 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/mapping_integration_tests.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/mapping_integration_tests.v @@ -17,37 +17,41 @@ Module Impl_core_default_Default_where_core_default_Default_K_where_core_default Ty.apply (Ty.path "mapping_integration_tests::Mapping") [ K; V ]. (* Default *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "mapping_integration_tests::Mapping" - [ - ("_key", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ K ], - [], - "default", - [] - |), - [] - |)); - ("_value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "mapping_integration_tests::Mapping" + [ + ("_key", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ K ], + [], + "default", + [] + |), + [] + |))); + ("_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -69,7 +73,21 @@ Module Impl_mapping_integration_tests_Mapping_K_V. unimplemented!() } *) - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition contains (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_contains : forall (K V : Ty.t), @@ -80,7 +98,21 @@ Module Impl_mapping_integration_tests_Mapping_K_V. unimplemented!() } *) - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition get (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_get : forall (K V : Ty.t), @@ -91,7 +123,22 @@ Module Impl_mapping_integration_tests_Mapping_K_V. unimplemented!() } *) - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key; _value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -102,7 +149,19 @@ Module Impl_mapping_integration_tests_Mapping_K_V. unimplemented!() } *) - Parameter new : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition new (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_new : forall (K V : Ty.t), @@ -113,7 +172,21 @@ Module Impl_mapping_integration_tests_Mapping_K_V. unimplemented!() } *) - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition remove (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_remove : forall (K V : Ty.t), @@ -124,7 +197,21 @@ Module Impl_mapping_integration_tests_Mapping_K_V. unimplemented!() } *) - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition size (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_size : forall (K V : Ty.t), @@ -135,7 +222,21 @@ Module Impl_mapping_integration_tests_Mapping_K_V. unimplemented!() } *) - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition take (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -153,18 +254,27 @@ Module Impl_core_default_Default_for_mapping_integration_tests_AccountId. Definition Self : Ty.t := Ty.path "mapping_integration_tests::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "mapping_integration_tests::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "mapping_integration_tests::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -180,14 +290,14 @@ Module Impl_core_clone_Clone_for_mapping_integration_tests_AccountId. Definition Self : Ty.t := Ty.path "mapping_integration_tests::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -226,7 +336,7 @@ Module Impl_mapping_integration_tests_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -261,27 +371,30 @@ Module Impl_core_default_Default_for_mapping_integration_tests_Mappings. Definition Self : Ty.t := Ty.path "mapping_integration_tests::Mappings". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "mapping_integration_tests::Mappings" - [ - ("balances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "mapping_integration_tests::Mapping") - [ Ty.path "mapping_integration_tests::AccountId"; Ty.path "u128" ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "mapping_integration_tests::Mappings" + [ + ("balances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "mapping_integration_tests::Mapping") + [ Ty.path "mapping_integration_tests::AccountId"; Ty.path "u128" ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -301,7 +414,18 @@ Module Impl_mapping_integration_tests_Mappings. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -310,7 +434,18 @@ Module Impl_mapping_integration_tests_Mappings. unimplemented!() } *) - Parameter env : (list Ty.t) -> (list Value.t) -> M. + Definition env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_env : M.IsAssociatedFunction Self "env" env. @@ -320,7 +455,7 @@ Module Impl_mapping_integration_tests_Mappings. Self { balances } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -341,9 +476,11 @@ Module Impl_mapping_integration_tests_Mappings. |) |) in M.alloc (| - Value.StructRecord - "mapping_integration_tests::Mappings" - [ ("balances", M.read (| balances |)) ] + M.of_value (| + Value.StructRecord + "mapping_integration_tests::Mappings" + [ ("balances", A.to_value (M.read (| balances |))) ] + |) |) |))) | _, _ => M.impossible @@ -357,7 +494,7 @@ Module Impl_mapping_integration_tests_Mappings. self.balances.get(&caller) } *) - Definition get_balance (τ : list Ty.t) (α : list Value.t) : M := + Definition get_balance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -416,7 +553,7 @@ Module Impl_mapping_integration_tests_Mappings. self.balances.insert(caller, value) } *) - Definition insert_balance (τ : list Ty.t) (α : list Value.t) : M := + Definition insert_balance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; value ] => ltac:(M.monadic @@ -478,7 +615,7 @@ Module Impl_mapping_integration_tests_Mappings. self.balances.size(caller) } *) - Definition size_balance (τ : list Ty.t) (α : list Value.t) : M := + Definition size_balance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -537,7 +674,7 @@ Module Impl_mapping_integration_tests_Mappings. self.balances.contains(&caller) } *) - Definition contains_balance (τ : list Ty.t) (α : list Value.t) : M := + Definition contains_balance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -597,7 +734,7 @@ Module Impl_mapping_integration_tests_Mappings. self.balances.remove(caller); } *) - Definition remove_balance (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_balance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -645,7 +782,7 @@ Module Impl_mapping_integration_tests_Mappings. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -659,7 +796,7 @@ Module Impl_mapping_integration_tests_Mappings. self.balances.take(caller) } *) - Definition take_balance (τ : list Ty.t) (α : list Value.t) : M := + Definition take_balance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/examples/default/examples/ink_contracts/mother.v b/CoqOfRust/examples/default/examples/ink_contracts/mother.v index 48e207863..c5fb6bec5 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/mother.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/mother.v @@ -16,37 +16,41 @@ Module Impl_core_default_Default_where_core_default_Default_K_where_core_default Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "mother::Mapping") [ K; V ]. (* Default *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "mother::Mapping" - [ - ("_key", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ K ], - [], - "default", - [] - |), - [] - |)); - ("_value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "mother::Mapping" + [ + ("_key", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ K ], + [], + "default", + [] + |), + [] + |))); + ("_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -67,7 +71,21 @@ Module Impl_mother_Mapping_K_V. unimplemented!() } *) - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition get (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_get : forall (K V : Ty.t), @@ -78,7 +96,22 @@ Module Impl_mother_Mapping_K_V. unimplemented!() } *) - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key; _value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -96,18 +129,27 @@ Module Impl_core_default_Default_for_mother_AccountId. Definition Self : Ty.t := Ty.path "mother::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "mother::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "mother::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -123,14 +165,14 @@ Module Impl_core_clone_Clone_for_mother_AccountId. Definition Self : Ty.t := Ty.path "mother::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -167,19 +209,20 @@ Module Impl_core_cmp_PartialEq_for_mother_AccountId. Definition Self : Ty.t := Ty.path "mother::AccountId". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "mother::AccountId", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "mother::AccountId", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -206,15 +249,15 @@ Module Impl_core_cmp_Eq_for_mother_AccountId. Definition Self : Ty.t := Ty.path "mother::AccountId". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -268,36 +311,39 @@ Module Impl_core_default_Default_for_mother_Bids. Definition Self : Ty.t := Ty.path "mother::Bids". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "mother::Bids" - [ - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ + (M.of_value (| + Value.StructTuple + "mother::Bids" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", Ty.apply (Ty.path "alloc::vec::Vec") [ Ty.apply - (Ty.path "core::option::Option") - [ Ty.tuple [ Ty.path "mother::AccountId"; Ty.path "u128" ] ]; + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.tuple [ Ty.path "mother::AccountId"; Ty.path "u128" ] ]; + Ty.path "alloc::alloc::Global" + ]; Ty.path "alloc::alloc::Global" - ]; - Ty.path "alloc::alloc::Global" - ], - [], - "default", - [] - |), - [] - |) - ])) + ], + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -324,7 +370,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Bids. Definition Self : Ty.t := Ty.path "mother::Bids". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -395,15 +441,15 @@ Module Impl_core_cmp_Eq_for_mother_Bids. Definition Self : Ty.t := Ty.path "mother::Bids". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -422,37 +468,40 @@ Module Impl_core_clone_Clone_for_mother_Bids. Definition Self : Ty.t := Ty.path "mother::Bids". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "mother::Bids" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ + M.of_value (| + Value.StructTuple + "mother::Bids" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", Ty.apply (Ty.path "alloc::vec::Vec") [ Ty.apply - (Ty.path "core::option::Option") - [ Ty.tuple [ Ty.path "mother::AccountId"; Ty.path "u128" ] ]; + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.tuple [ Ty.path "mother::AccountId"; Ty.path "u128" ] ]; + Ty.path "alloc::alloc::Global" + ]; Ty.path "alloc::alloc::Global" - ]; - Ty.path "alloc::alloc::Global" - ], - [], - "clone", - [] - |), - [ M.SubPointer.get_struct_tuple_field (| M.read (| self |), "mother::Bids", 0 |) ] - |) - ])) + ], + [], + "clone", + [] + |), + [ M.SubPointer.get_struct_tuple_field (| M.read (| self |), "mother::Bids", 0 |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -504,7 +553,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Outline. Definition Self : Ty.t := Ty.path "mother::Outline". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -531,7 +580,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Outline. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -559,12 +608,12 @@ Module Impl_core_cmp_Eq_for_mother_Outline. Definition Self : Ty.t := Ty.path "mother::Outline". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -581,7 +630,7 @@ Module Impl_core_clone_Clone_for_mother_Outline. Definition Self : Ty.t := Ty.path "mother::Outline". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -593,15 +642,19 @@ Module Impl_core_clone_Clone_for_mother_Outline. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "mother::Outline::NoWinner" [] |))); + M.alloc (| M.of_value (| Value.StructTuple "mother::Outline::NoWinner" [] |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "mother::Outline::WinnerDetected" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "mother::Outline::WinnerDetected" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "mother::Outline::PayoutCompleted" [] |))) + M.alloc (| + M.of_value (| Value.StructTuple "mother::Outline::PayoutCompleted" [] |) + |))) ] |) |))) @@ -666,7 +719,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Status. Definition Self : Ty.t := Ty.path "mother::Status". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -695,11 +748,16 @@ Module Impl_core_cmp_PartialEq_for_mother_Status. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -722,9 +780,10 @@ Module Impl_core_cmp_PartialEq_for_mother_Status. |) in let __arg1_0 := M.alloc (| γ2_0 |) in M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| __self_0 |) |)) - (M.read (| M.read (| __arg1_0 |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| __self_0 |) |), + M.read (| M.read (| __arg1_0 |) |) + |) |))); fun γ => ltac:(M.monadic @@ -779,11 +838,12 @@ Module Impl_core_cmp_PartialEq_for_mother_Status. |) in let __arg1_0 := M.alloc (| γ2_0 |) in M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| __self_0 |) |)) - (M.read (| M.read (| __arg1_0 |) |)) + BinOp.Pure.eq (| + M.read (| M.read (| __self_0 |) |), + M.read (| M.read (| __arg1_0 |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -816,20 +876,20 @@ Module Impl_core_cmp_Eq_for_mother_Status. Definition Self : Ty.t := Ty.path "mother::Status". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) @@ -850,7 +910,7 @@ Module Impl_core_clone_Clone_for_mother_Status. Definition Self : Ty.t := Ty.path "mother::Status". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -862,11 +922,15 @@ Module Impl_core_clone_Clone_for_mother_Status. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "mother::Status::NotStarted" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "mother::Status::NotStarted" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| Value.StructTuple "mother::Status::OpeningPeriod" [] |))); + M.alloc (| + M.of_value (| Value.StructTuple "mother::Status::OpeningPeriod" [] |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in @@ -878,20 +942,23 @@ Module Impl_core_clone_Clone_for_mother_Status. |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "mother::Status::EndingPeriod" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "u32", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "mother::Status::EndingPeriod" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "u32", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -900,20 +967,23 @@ Module Impl_core_clone_Clone_for_mother_Status. M.SubPointer.get_struct_tuple_field (| γ, "mother::Status::Ended", 0 |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "mother::Status::Ended" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "mother::Outline", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "mother::Status::Ended" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "mother::Outline", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -922,20 +992,23 @@ Module Impl_core_clone_Clone_for_mother_Status. M.SubPointer.get_struct_tuple_field (| γ, "mother::Status::RfDelay", 0 |) in let __self_0 := M.alloc (| γ1_0 |) in M.alloc (| - Value.StructTuple - "mother::Status::RfDelay" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "u32", - [], - "clone", - [] - |), - [ M.read (| __self_0 |) ] - |) - ] + M.of_value (| + Value.StructTuple + "mother::Status::RfDelay" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "u32", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) |))) ] |) @@ -983,7 +1056,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Auction. Definition Self : Ty.t := Ty.path "mother::Auction". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1109,21 +1182,22 @@ Module Impl_core_cmp_PartialEq_for_mother_Auction. |))) |), ltac:(M.monadic - (BinOp.Pure.eq - (M.read (| + (BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "mother::Auction", "finalized" |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "mother::Auction", "finalized" |) - |)))) + |) + |))) |), ltac:(M.monadic (M.call_closure (| @@ -1180,48 +1254,52 @@ Module Impl_core_cmp_Eq_for_mother_Auction. Definition Self : Ty.t := Ty.path "mother::Auction". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| + Value.DeclaredButUndefined + |), [ fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] @@ -1253,130 +1331,139 @@ Module Impl_core_clone_Clone_for_mother_Auction. Definition Self : Ty.t := Ty.path "mother::Auction". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "mother::Auction" - [ - ("name", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "alloc::string::String", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "mother::Auction", - "name" - |) - ] - |)); - ("subject", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "array") [ Ty.path "u8" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "mother::Auction", - "subject" - |) - ] - |)); - ("bids", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "mother::Bids", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "mother::Auction", - "bids" - |) - ] - |)); - ("terms", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "array") [ Ty.path "u32" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "mother::Auction", - "terms" - |) - ] - |)); - ("status", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "mother::Status", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "mother::Auction", - "status" - |) - ] - |)); - ("finalized", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "bool", [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "mother::Auction", - "finalized" - |) - ] - |)); - ("vector", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "mother::Auction", - "vector" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "mother::Auction" + [ + ("name", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloc::string::String", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "mother::Auction", + "name" + |) + ] + |))); + ("subject", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "mother::Auction", + "subject" + |) + ] + |))); + ("bids", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "mother::Bids", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "mother::Auction", + "bids" + |) + ] + |))); + ("terms", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "array") [ Ty.path "u32" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "mother::Auction", + "terms" + |) + ] + |))); + ("status", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "mother::Status", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "mother::Auction", + "status" + |) + ] + |))); + ("finalized", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Ty.path "bool", [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "mother::Auction", + "finalized" + |) + ] + |))); + ("vector", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "mother::Auction", + "vector" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1404,73 +1491,81 @@ Module Impl_core_default_Default_for_mother_Auction. } } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "mother::Auction" - [ - ("name", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "alloc::string::String", - [], - "default", - [] - |), - [] - |)); - ("subject", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "array") [ Ty.path "u8" ], - [], - "default", - [] - |), - [] - |)); - ("bids", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "mother::Bids", - [], - "default", - [] - |), - [] - |)); - ("terms", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "array") [ Ty.path "u32" ], - [], - "default", - [] - |), - [] - |)); - ("status", Value.StructTuple "mother::Status::OpeningPeriod" []); - ("finalized", Value.Bool false); - ("vector", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "mother::Auction" + [ + ("name", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "alloc::string::String", + [], + "default", + [] + |), + [] + |))); + ("subject", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [], + "default", + [] + |), + [] + |))); + ("bids", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "mother::Bids", + [], + "default", + [] + |), + [] + |))); + ("terms", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "array") [ Ty.path "u32" ], + [], + "default", + [] + |), + [] + |))); + ("status", + A.to_value (M.of_value (| Value.StructTuple "mother::Status::OpeningPeriod" [] |))); + ("finalized", A.to_value (M.of_value (| Value.Bool false |))); + ("vector", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1517,7 +1612,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Failure. Definition Self : Ty.t := Ty.path "mother::Failure". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1546,11 +1641,16 @@ Module Impl_core_cmp_PartialEq_for_mother_Failure. |) in M.alloc (| LogicalOp.and (| - BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)), + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -1584,7 +1684,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Failure. [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) |))) @@ -1617,15 +1717,15 @@ Module Impl_core_cmp_Eq_for_mother_Failure. Definition Self : Ty.t := Ty.path "mother::Failure". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -1670,7 +1770,7 @@ Module Impl_mother_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1688,7 +1788,20 @@ Module Impl_mother_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_mother_Env. @@ -1709,38 +1822,42 @@ Module Impl_core_default_Default_for_mother_Mother. Definition Self : Ty.t := Ty.path "mother::Mother". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "mother::Mother" - [ - ("auction", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "mother::Auction", - [], - "default", - [] - |), - [] - |)); - ("balances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "mother::Mapping") - [ Ty.path "mother::AccountId"; Ty.path "u128" ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "mother::Mother" + [ + ("auction", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "mother::Auction", + [], + "default", + [] + |), + [] + |))); + ("balances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "mother::Mapping") + [ Ty.path "mother::AccountId"; Ty.path "u128" ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1760,7 +1877,18 @@ Module Impl_mother_Mother. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -1769,7 +1897,7 @@ Module Impl_mother_Mother. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1791,29 +1919,32 @@ Module Impl_mother_Mother. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ auction ] => ltac:(M.monadic (let auction := M.alloc (| auction |) in - Value.StructRecord - "mother::Mother" - [ - ("balances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "mother::Mapping") - [ Ty.path "mother::AccountId"; Ty.path "u128" ], - [], - "default", - [] - |), - [] - |)); - ("auction", M.read (| auction |)) - ])) + M.of_value (| + Value.StructRecord + "mother::Mother" + [ + ("balances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "mother::Mapping") + [ Ty.path "mother::AccountId"; Ty.path "u128" ], + [], + "default", + [] + |), + [] + |))); + ("auction", A.to_value (M.read (| auction |))) + ] + |))) | _, _ => M.impossible end. @@ -1824,7 +1955,7 @@ Module Impl_mother_Mother. Default::default() } *) - Definition new_default (τ : list Ty.t) (α : list Value.t) : M := + Definition new_default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -1852,56 +1983,69 @@ Module Impl_mother_Mother. } } *) - Definition failed_new (τ : list Ty.t) (α : list Value.t) : M := + Definition failed_new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ fail ] => ltac:(M.monadic (let fail := M.alloc (| fail |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use fail in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "mother::Failure::Revert" - [ - M.call_closure (| - M.get_trait_method (| - "alloc::string::ToString", - Ty.path "str", - [], - "to_string", - [] - |), - [ M.read (| Value.String "Reverting instantiation" |) ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "mother::Failure::Revert" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "alloc::string::ToString", + Ty.path "str", + [], + "to_string", + [] + |), + [ + M.read (| + M.of_value (| Value.String "Reverting instantiation" |) + |) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "mother::Mother", - [], - "default", - [] - |), - [] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "mother::Mother", + [], + "default", + [] + |), + [] + |)) + ] + |) |))) ] |) @@ -1919,7 +2063,7 @@ Module Impl_mother_Mother. auction } *) - Definition echo_auction (τ : list Ty.t) (α : list Value.t) : M := + Definition echo_auction (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; auction ] => ltac:(M.monadic @@ -1937,25 +2081,31 @@ Module Impl_mother_Mother. [ M.read (| self |) ] |) |); - Value.StructTuple - "mother::Event::AuctionEchoed" - [ - Value.StructRecord - "mother::AuctionEchoed" - [ - ("auction", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "mother::Auction", - [], - "clone", - [] - |), - [ auction ] - |)) - ] - ] + M.of_value (| + Value.StructTuple + "mother::Event::AuctionEchoed" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "mother::AuctionEchoed" + [ + ("auction", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "mother::Auction", + [], + "clone", + [] + |), + [ auction ] + |))) + ] + |)) + ] + |) ] |) |) in @@ -1979,7 +2129,7 @@ Module Impl_mother_Mother. } } *) - Definition revert_or_trap (τ : list Ty.t) (α : list Value.t) : M := + Definition revert_or_trap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; fail ] => ltac:(M.monadic @@ -1996,24 +2146,34 @@ Module Impl_mother_Mother. let γ1_0 := M.SubPointer.get_struct_tuple_field (| γ0_0, "mother::Failure::Revert", 0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "mother::Failure::Revert" - [ - M.call_closure (| - M.get_trait_method (| - "alloc::string::ToString", - Ty.path "str", - [], - "to_string", - [] - |), - [ M.read (| Value.String "Reverting on user demand!" |) ] - |) - ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "mother::Failure::Revert" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "alloc::string::ToString", + Ty.path "str", + [], + "to_string", + [] + |), + [ + M.read (| + M.of_value (| Value.String "Reverting on user demand!" |) + |) + ] + |)) + ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -2026,13 +2186,19 @@ Module Impl_mother_Mother. "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "Trapping on user demand!" |) ] + [ M.read (| M.of_value (| Value.String "Trapping on user demand!" |) |) ] |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |))) + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |))) ] |) |))) @@ -2047,7 +2213,7 @@ Module Impl_mother_Mother. println!("debug_log: {}", _message); } *) - Definition debug_log (τ : list Ty.t) (α : list Value.t) : M := + Definition debug_log (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _message ] => ltac:(M.monadic @@ -2064,37 +2230,45 @@ Module Impl_mother_Mother. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "debug_log: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "debug_log: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ _message ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ _message ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/multisig.v b/CoqOfRust/examples/default/examples/ink_contracts/multisig.v index 1eb3374b4..b8e388dd5 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/multisig.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/multisig.v @@ -16,37 +16,41 @@ Module Impl_core_default_Default_where_core_default_Default_K_where_core_default Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "multisig::Mapping") [ K; V ]. (* Default *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "multisig::Mapping" - [ - ("_key", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ K ], - [], - "default", - [] - |), - [] - |)); - ("_value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "multisig::Mapping" + [ + ("_key", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ K ], + [], + "default", + [] + |), + [] + |))); + ("_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -67,7 +71,21 @@ Module Impl_multisig_Mapping_K_V. unimplemented!() } *) - Parameter contains : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition contains (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_contains : forall (K V : Ty.t), @@ -78,7 +96,21 @@ Module Impl_multisig_Mapping_K_V. unimplemented!() } *) - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition get (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_get : forall (K V : Ty.t), @@ -89,7 +121,22 @@ Module Impl_multisig_Mapping_K_V. unimplemented!() } *) - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key; _value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -100,7 +147,21 @@ Module Impl_multisig_Mapping_K_V. unimplemented!() } *) - Parameter remove : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition remove (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_remove : forall (K V : Ty.t), @@ -111,7 +172,21 @@ Module Impl_multisig_Mapping_K_V. unimplemented!() } *) - Parameter size : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition size (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_size : forall (K V : Ty.t), @@ -122,7 +197,21 @@ Module Impl_multisig_Mapping_K_V. unimplemented!() } *) - Parameter take : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition take (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_take : forall (K V : Ty.t), @@ -140,18 +229,27 @@ Module Impl_core_default_Default_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "multisig::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "multisig::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -167,7 +265,7 @@ Module Impl_core_fmt_Debug_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -181,16 +279,17 @@ Module Impl_core_fmt_Debug_for_multisig_AccountId. |), [ M.read (| f |); - M.read (| Value.String "AccountId" |); + M.read (| M.of_value (| Value.String "AccountId" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "multisig::AccountId", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -208,14 +307,14 @@ Module Impl_core_clone_Clone_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -252,19 +351,20 @@ Module Impl_core_cmp_PartialEq_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "multisig::AccountId", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "multisig::AccountId", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -291,15 +391,15 @@ Module Impl_core_cmp_Eq_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -318,7 +418,7 @@ Module Impl_core_cmp_PartialOrd_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -352,7 +452,7 @@ Module Impl_core_cmp_Ord_for_multisig_AccountId. Definition Self : Ty.t := Ty.path "multisig::AccountId". (* Ord *) - Definition cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -385,13 +485,15 @@ Axiom Balance : (Ty.path "multisig::Balance") = (Ty.path "u128"). fields := [ ("caller", Ty.path "multisig::AccountId") ]; } *) -Definition value_MAX_OWNERS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 50 |))). +Definition value_MAX_OWNERS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 50 |) |))). Axiom TransactionId : (Ty.path "multisig::TransactionId") = (Ty.path "u32"). -Definition value_WRONG_TRANSACTION_ID : Value.t := - M.run ltac:(M.monadic (Value.String "The user specified an invalid transaction id. Abort.")). +Definition value_WRONG_TRANSACTION_ID : A.t := + M.run + ltac:(M.monadic + (M.of_value (| Value.String "The user specified an invalid transaction id. Abort." |))). (* StructTuple { @@ -424,14 +526,14 @@ Module Impl_core_clone_Clone_for_multisig_ConfirmationStatus. Definition Self : Ty.t := Ty.path "multisig::ConfirmationStatus". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -473,76 +575,90 @@ Module Impl_core_default_Default_for_multisig_Transaction. Definition Self : Ty.t := Ty.path "multisig::Transaction". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "multisig::Transaction" - [ - ("callee", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "multisig::AccountId", - [], - "default", - [] - |), - [] - |)); - ("selector", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "array") [ Ty.path "u8" ], - [], - "default", - [] - |), - [] - |)); - ("input", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - [], - "default", - [] - |), - [] - |)); - ("transferred_value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u128", - [], - "default", - [] - |), - [] - |)); - ("gas_limit", - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u64", [], "default", [] |), - [] - |)); - ("allow_reentry", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "bool", - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "multisig::Transaction" + [ + ("callee", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "multisig::AccountId", + [], + "default", + [] + |), + [] + |))); + ("selector", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [], + "default", + [] + |), + [] + |))); + ("input", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "default", + [] + |), + [] + |))); + ("transferred_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |))); + ("gas_limit", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u64", + [], + "default", + [] + |), + [] + |))); + ("allow_reentry", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -573,7 +689,7 @@ Module Impl_core_clone_Clone_for_multisig_Error. Definition Self : Ty.t := Ty.path "multisig::Error". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -612,13 +728,13 @@ Module Impl_core_cmp_PartialEq_for_multisig_Error. Definition Self : Ty.t := Ty.path "multisig::Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - Value.Bool true)) + M.of_value (| Value.Bool true |))) | _, _ => M.impossible end. @@ -645,12 +761,12 @@ Module Impl_core_cmp_Eq_for_multisig_Error. Definition Self : Ty.t := Ty.path "multisig::Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -679,32 +795,42 @@ Module Impl_core_default_Default_for_multisig_Transactions. Definition Self : Ty.t := Ty.path "multisig::Transactions". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "multisig::Transactions" - [ - ("transactions", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ], - [], - "default", - [] - |), - [] - |)); - ("next_id", - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u32", [], "default", [] |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "multisig::Transactions" + [ + ("transactions", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ], + [], + "default", + [] + |), + [] + |))); + ("next_id", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u32", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -851,7 +977,7 @@ Module Impl_multisig_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -869,7 +995,20 @@ Module Impl_multisig_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. @@ -878,7 +1017,19 @@ Module Impl_multisig_Env. unimplemented!() } *) - Parameter transferred_value : (list Ty.t) -> (list Value.t) -> M. + Definition transferred_value (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_transferred_value : M.IsAssociatedFunction Self "transferred_value" transferred_value. @@ -888,7 +1039,19 @@ Module Impl_multisig_Env. unimplemented!() } *) - Parameter account_id : (list Ty.t) -> (list Value.t) -> M. + Definition account_id (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_account_id : M.IsAssociatedFunction Self "account_id" account_id. End Impl_multisig_Env. @@ -924,93 +1087,108 @@ Module Impl_core_default_Default_for_multisig_Multisig. Definition Self : Ty.t := Ty.path "multisig::Multisig". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "multisig::Multisig" - [ - ("confirmations", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "multisig::Mapping") - [ Ty.tuple [ Ty.path "u32"; Ty.path "multisig::AccountId" ]; Ty.tuple [] ], - [], - "default", - [] - |), - [] - |)); - ("confirmation_count", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "multisig::Mapping") [ Ty.path "u32"; Ty.path "u32" ], - [], - "default", - [] - |), - [] - |)); - ("transactions", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "multisig::Mapping") - [ Ty.path "u32"; Ty.path "multisig::Transaction" ], - [], - "default", - [] - |), - [] - |)); - ("transaction_list", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "multisig::Transactions", - [], - "default", - [] - |), - [] - |)); - ("owners", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "multisig::AccountId"; Ty.path "alloc::alloc::Global" ], - [], - "default", - [] - |), - [] - |)); - ("is_owner", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "multisig::Mapping") - [ Ty.path "multisig::AccountId"; Ty.tuple [] ], - [], - "default", - [] - |), - [] - |)); - ("requirement", - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u32", [], "default", [] |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "multisig::Multisig" + [ + ("confirmations", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "multisig::Mapping") + [ Ty.tuple [ Ty.path "u32"; Ty.path "multisig::AccountId" ]; Ty.tuple [] ], + [], + "default", + [] + |), + [] + |))); + ("confirmation_count", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "multisig::Mapping") [ Ty.path "u32"; Ty.path "u32" ], + [], + "default", + [] + |), + [] + |))); + ("transactions", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "multisig::Mapping") + [ Ty.path "u32"; Ty.path "multisig::Transaction" ], + [], + "default", + [] + |), + [] + |))); + ("transaction_list", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "multisig::Transactions", + [], + "default", + [] + |), + [] + |))); + ("owners", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "multisig::AccountId"; Ty.path "alloc::alloc::Global" ], + [], + "default", + [] + |), + [] + |))); + ("is_owner", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "multisig::Mapping") + [ Ty.path "multisig::AccountId"; Ty.tuple [] ], + [], + "default", + [] + |), + [] + |))); + ("requirement", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u32", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -1027,7 +1205,7 @@ fn ensure_requirement_is_valid(owners: u32, requirement: u32) { assert!(0 < requirement && requirement <= owners && owners <= MAX_OWNERS); } *) -Definition ensure_requirement_is_valid (τ : list Ty.t) (α : list Value.t) : M := +Definition ensure_requirement_is_valid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ owners; requirement ] => ltac:(M.monadic @@ -1036,27 +1214,30 @@ Definition ensure_requirement_is_valid (τ : list Ty.t) (α : list Value.t) : M M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (LogicalOp.and (| + UnOp.Pure.not (| + LogicalOp.and (| LogicalOp.and (| - BinOp.Pure.lt - (Value.Integer Integer.U32 0) - (M.read (| requirement |)), + BinOp.Pure.lt (| + M.of_value (| Value.Integer 0 |), + M.read (| requirement |) + |), ltac:(M.monadic - (BinOp.Pure.le (M.read (| requirement |)) (M.read (| owners |)))) + (BinOp.Pure.le (| M.read (| requirement |), M.read (| owners |) |))) |), ltac:(M.monadic - (BinOp.Pure.le - (M.read (| owners |)) - (M.read (| M.get_constant (| "multisig::MAX_OWNERS" |) |)))) - |)) + (BinOp.Pure.le (| + M.read (| owners |), + M.read (| M.get_constant (| "multisig::MAX_OWNERS" |) |) + |))) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1065,17 +1246,19 @@ Definition ensure_requirement_is_valid (τ : list Ty.t) (α : list Value.t) : M M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: 0 < requirement && requirement <= owners && owners <= MAX_OWNERS" + M.of_value (| + Value.String + "assertion failed: 0 < requirement && requirement <= owners && owners <= MAX_OWNERS" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1088,7 +1271,18 @@ Module Impl_multisig_Multisig. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -1097,7 +1291,7 @@ Module Impl_multisig_Multisig. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1128,7 +1322,7 @@ Module Impl_multisig_Multisig. contract } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ requirement; owners ] => ltac:(M.monadic @@ -1190,8 +1384,8 @@ Module Impl_multisig_Multisig. M.call_closure (| M.get_function (| "multisig::ensure_requirement_is_valid", [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -1200,7 +1394,8 @@ Module Impl_multisig_Multisig. [] |), [ owners ] - |)); + |) + |); M.read (| requirement |) ] |) @@ -1278,14 +1473,14 @@ Module Impl_multisig_Multisig. "is_owner" |); M.read (| M.read (| owner |) |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -1338,7 +1533,7 @@ Module Impl_multisig_Multisig. ); } *) - Definition ensure_confirmed (τ : list Ty.t) (α : list Value.t) : M := + Definition ensure_confirmed (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; trans_id ] => ltac:(M.monadic @@ -1347,16 +1542,16 @@ Module Impl_multisig_Multisig. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ge - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ge (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "u32" ], "expect", @@ -1382,14 +1577,16 @@ Module Impl_multisig_Multisig. |); M.read (| M.get_constant (| "multisig::WRONG_TRANSACTION_ID" |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "multisig::Multisig", "requirement" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1398,18 +1595,20 @@ Module Impl_multisig_Multisig. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.confirmation_count.get(&trans_id).expect(WRONG_TRANSACTION_ID) >= + M.of_value (| + Value.String + "assertion failed: self.confirmation_count.get(&trans_id).expect(WRONG_TRANSACTION_ID) >= self.requirement" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1424,7 +1623,7 @@ Module Impl_multisig_Multisig. .expect(WRONG_TRANSACTION_ID); } *) - Definition ensure_transaction_exists (τ : list Ty.t) (α : list Value.t) : M := + Definition ensure_transaction_exists (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; trans_id ] => ltac:(M.monadic @@ -1461,7 +1660,7 @@ Module Impl_multisig_Multisig. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1474,7 +1673,7 @@ Module Impl_multisig_Multisig. assert!(self.is_owner.contains(owner)); } *) - Definition ensure_owner (τ : list Ty.t) (α : list Value.t) : M := + Definition ensure_owner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic @@ -1483,15 +1682,15 @@ Module Impl_multisig_Multisig. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "multisig::Mapping") @@ -1507,7 +1706,8 @@ Module Impl_multisig_Multisig. |); M.read (| owner |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1516,16 +1716,18 @@ Module Impl_multisig_Multisig. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: self.is_owner.contains(owner)" + M.of_value (| + Value.String "assertion failed: self.is_owner.contains(owner)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1537,7 +1739,7 @@ Module Impl_multisig_Multisig. self.ensure_owner(&self.env().caller()); } *) - Definition ensure_caller_is_owner (τ : list Ty.t) (α : list Value.t) : M := + Definition ensure_caller_is_owner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1565,7 +1767,7 @@ Module Impl_multisig_Multisig. ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1578,7 +1780,7 @@ Module Impl_multisig_Multisig. assert_eq!(self.env().caller(), self.env().account_id()); } *) - Definition ensure_from_wallet (τ : list Ty.t) (α : list Value.t) : M := + Definition ensure_from_wallet (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1587,43 +1789,51 @@ Module Impl_multisig_Multisig. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "multisig::Env", "caller", [] |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "multisig::Multisig", - "env", - [] - |), - [ M.read (| self |) ] - |) + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "multisig::Env", "caller", [] |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "multisig::Multisig", + "env", + [] + |), + [ M.read (| self |) ] + |) + |) + ] |) - ] - |) - |); - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "multisig::Env", "account_id", [] |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "multisig::Multisig", - "env", - [] - |), - [ M.read (| self |) ] - |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "multisig::Env", + "account_id", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "multisig::Multisig", + "env", + [] + |), + [ M.read (| self |) ] + |) + |) + ] |) - ] - |) - |) - ] + |)) + ] + |) |), [ fun γ => @@ -1633,15 +1843,15 @@ Module Impl_multisig_Multisig. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.path "multisig::AccountId", @@ -1650,7 +1860,8 @@ Module Impl_multisig_Multisig. [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1659,7 +1870,9 @@ Module Impl_multisig_Multisig. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -1674,19 +1887,21 @@ Module Impl_multisig_Multisig. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1699,7 +1914,7 @@ Module Impl_multisig_Multisig. assert!(!self.is_owner.contains(owner)); } *) - Definition ensure_no_owner (τ : list Ty.t) (α : list Value.t) : M := + Definition ensure_no_owner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic @@ -1708,16 +1923,16 @@ Module Impl_multisig_Multisig. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "multisig::Mapping") @@ -1733,7 +1948,9 @@ Module Impl_multisig_Multisig. |); M.read (| owner |) ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1742,16 +1959,18 @@ Module Impl_multisig_Multisig. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String "assertion failed: !self.is_owner.contains(owner)" + M.of_value (| + Value.String "assertion failed: !self.is_owner.contains(owner)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1770,7 +1989,7 @@ Module Impl_multisig_Multisig. .emit_event(Event::OwnerAddition(OwnerAddition { owner: new_owner })); } *) - Definition add_owner (τ : list Ty.t) (α : list Value.t) : M := + Definition add_owner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_owner ] => ltac:(M.monadic @@ -1801,8 +2020,9 @@ Module Impl_multisig_Multisig. M.get_function (| "multisig::ensure_requirement_is_valid", [] |), [ BinOp.Panic.add (| - M.rust_cast - (M.call_closure (| + Integer.U32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -1817,8 +2037,9 @@ Module Impl_multisig_Multisig. "owners" |) ] - |)), - Value.Integer Integer.U32 1 + |) + |), + M.of_value (| Value.Integer 1 |) |); M.read (| M.SubPointer.get_struct_record_field (| @@ -1847,7 +2068,7 @@ Module Impl_multisig_Multisig. "is_owner" |); M.read (| new_owner |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |) |) in @@ -1882,17 +2103,22 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::OwnerAddition" - [ - Value.StructRecord - "multisig::OwnerAddition" - [ ("owner", M.read (| new_owner |)) ] - ] + M.of_value (| + Value.StructTuple + "multisig::Event::OwnerAddition" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::OwnerAddition" + [ ("owner", A.to_value (M.read (| new_owner |))) ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1907,14 +2133,14 @@ Module Impl_multisig_Multisig. ) as u32 } *) - Definition owner_index (τ : list Ty.t) (α : list Value.t) : M := + Definition owner_index (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic (let self := M.alloc (| self |) in let owner := M.alloc (| owner |) in - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], "expect", @@ -1963,8 +2189,8 @@ Module Impl_multisig_Multisig. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1987,16 +2213,20 @@ Module Impl_multisig_Multisig. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.read (| - Value.String - "This is only called after it was already verified that the id is + M.of_value (| + Value.String + "This is only called after it was already verified that the id is actually an owner." + |) |) ] - |)))) + |) + |))) | _, _ => M.impossible end. @@ -2015,7 +2245,7 @@ Module Impl_multisig_Multisig. } } *) - Definition clean_owner_confirmations (τ : list Ty.t) (α : list Value.t) : M := + Definition clean_owner_confirmations (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic @@ -2087,14 +2317,16 @@ Module Impl_multisig_Multisig. let trans_id := M.copy (| γ0_0 |) in let key := M.alloc (| - Value.Tuple - [ - M.read (| M.read (| trans_id |) |); - M.read (| M.read (| owner |) |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.read (| trans_id |) |)); + A.to_value (M.read (| M.read (| owner |) |)) + ] + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2188,7 +2420,9 @@ Module Impl_multisig_Multisig. |); M.read (| M.use - (M.alloc (| Value.Integer Integer.U32 0 |)) + (M.alloc (| + M.of_value (| Value.Integer 0 |) + |)) |) ] |) @@ -2198,8 +2432,9 @@ Module Impl_multisig_Multisig. M.write (| β, BinOp.Panic.sub (| + Integer.U32, M.read (| β |), - Value.Integer Integer.U32 1 + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -2223,13 +2458,15 @@ Module Impl_multisig_Multisig. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -2256,7 +2493,7 @@ Module Impl_multisig_Multisig. .emit_event(Event::OwnerRemoval(OwnerRemoval { owner })); } *) - Definition remove_owner (τ : list Ty.t) (α : list Value.t) : M := + Definition remove_owner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic @@ -2284,8 +2521,9 @@ Module Impl_multisig_Multisig. let len := M.alloc (| BinOp.Panic.sub (| - M.rust_cast - (M.call_closure (| + Integer.U32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -2300,8 +2538,9 @@ Module Impl_multisig_Multisig. "owners" |) ] - |)), - Value.Integer Integer.U32 1 + |) + |), + M.of_value (| Value.Integer 1 |) |) |) in let requirement := @@ -2329,11 +2568,12 @@ Module Impl_multisig_Multisig. |) in let owner_index := M.alloc (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "multisig::Multisig", "owner_index", [] |), [ M.read (| self |); owner ] - |)) + |) + |) |) in let _ := M.alloc (| @@ -2406,14 +2646,22 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::OwnerRemoval" - [ Value.StructRecord "multisig::OwnerRemoval" [ ("owner", M.read (| owner |)) ] - ] + M.of_value (| + Value.StructTuple + "multisig::Event::OwnerRemoval" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::OwnerRemoval" + [ ("owner", A.to_value (M.read (| owner |))) ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2436,7 +2684,7 @@ Module Impl_multisig_Multisig. .emit_event(Event::OwnerAddition(OwnerAddition { owner: new_owner })); } *) - Definition replace_owner (τ : list Ty.t) (α : list Value.t) : M := + Definition replace_owner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; old_owner; new_owner ] => ltac:(M.monadic @@ -2494,7 +2742,7 @@ Module Impl_multisig_Multisig. "multisig::Multisig", "owners" |); - M.rust_cast (M.read (| owner_index |)) + M.rust_cast (| M.read (| owner_index |) |) ] |), M.read (| new_owner |) @@ -2536,7 +2784,7 @@ Module Impl_multisig_Multisig. "is_owner" |); M.read (| new_owner |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |) |) in @@ -2562,13 +2810,18 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::OwnerRemoval" - [ - Value.StructRecord - "multisig::OwnerRemoval" - [ ("owner", M.read (| old_owner |)) ] - ] + M.of_value (| + Value.StructTuple + "multisig::Event::OwnerRemoval" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::OwnerRemoval" + [ ("owner", A.to_value (M.read (| old_owner |))) ] + |)) + ] + |) ] |) |) in @@ -2583,17 +2836,22 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::OwnerAddition" - [ - Value.StructRecord - "multisig::OwnerAddition" - [ ("owner", M.read (| new_owner |)) ] - ] + M.of_value (| + Value.StructTuple + "multisig::Event::OwnerAddition" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::OwnerAddition" + [ ("owner", A.to_value (M.read (| new_owner |))) ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2612,7 +2870,7 @@ Module Impl_multisig_Multisig. })); } *) - Definition change_requirement (τ : list Ty.t) (α : list Value.t) : M := + Definition change_requirement (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; new_requirement ] => ltac:(M.monadic @@ -2635,8 +2893,8 @@ Module Impl_multisig_Multisig. M.call_closure (| M.get_function (| "multisig::ensure_requirement_is_valid", [] |), [ - M.rust_cast - (M.call_closure (| + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -2651,7 +2909,8 @@ Module Impl_multisig_Multisig. "owners" |) ] - |)); + |) + |); M.read (| new_requirement |) ] |) @@ -2676,17 +2935,22 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::RequirementChange" - [ - Value.StructRecord - "multisig::RequirementChange" - [ ("new_requirement", M.read (| new_requirement |)) ] - ] + M.of_value (| + Value.StructTuple + "multisig::Event::RequirementChange" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::RequirementChange" + [ ("new_requirement", A.to_value (M.read (| new_requirement |))) ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2728,7 +2992,7 @@ Module Impl_multisig_Multisig. status } *) - Definition confirm_by_caller (τ : list Ty.t) (α : list Value.t) : M := + Definition confirm_by_caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; confirmer; transaction ] => ltac:(M.monadic @@ -2760,16 +3024,21 @@ Module Impl_multisig_Multisig. transaction ] |); - M.read (| M.use (M.alloc (| Value.Integer Integer.U32 0 |)) |) + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 0 |) |)) |) ] |) |) in let key := - M.alloc (| Value.Tuple [ M.read (| transaction |); M.read (| confirmer |) ] |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| transaction |)); A.to_value (M.read (| confirmer |)) ] + |) + |) in let new_confirmation := M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "multisig::Mapping") @@ -2785,11 +3054,12 @@ Module Impl_multisig_Multisig. |); key ] - |)) + |) + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2799,7 +3069,11 @@ Module Impl_multisig_Multisig. let β := count in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U32 1 |) + BinOp.Panic.add (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.alloc (| @@ -2821,7 +3095,7 @@ Module Impl_multisig_Multisig. "confirmations" |); M.read (| key |); - Value.Tuple [] + M.of_value (| Value.Tuple [] |) ] |) |) in @@ -2844,58 +3118,65 @@ Module Impl_multisig_Multisig. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let status := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| count |)) - (M.read (| + BinOp.Pure.ge (| + M.read (| count |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "multisig::Multisig", "requirement" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple "multisig::ConfirmationStatus::Confirmed" [] + M.of_value (| + Value.StructTuple "multisig::ConfirmationStatus::Confirmed" [] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "multisig::ConfirmationStatus::ConfirmationsNeeded" - [ - BinOp.Panic.sub (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "multisig::Multisig", - "requirement" - |) - |), - M.read (| count |) - |) - ] + M.of_value (| + Value.StructTuple + "multisig::ConfirmationStatus::ConfirmationsNeeded" + [ + A.to_value + (BinOp.Panic.sub (| + Integer.U32, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "multisig::Multisig", + "requirement" + |) + |), + M.read (| count |) + |)) + ] + |) |))) ] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -2916,22 +3197,27 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::Confirmation" - [ - Value.StructRecord - "multisig::Confirmation" - [ - ("transaction", M.read (| transaction |)); - ("from", M.read (| confirmer |)); - ("status", M.read (| status |)) - ] - ] + M.of_value (| + Value.StructTuple + "multisig::Event::Confirmation" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::Confirmation" + [ + ("transaction", A.to_value (M.read (| transaction |))); + ("from", A.to_value (M.read (| confirmer |))); + ("status", A.to_value (M.read (| status |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in status @@ -2963,7 +3249,7 @@ Module Impl_multisig_Multisig. ) } *) - Definition submit_transaction (τ : list Ty.t) (α : list Value.t) : M := + Definition submit_transaction (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; transaction ] => ltac:(M.monadic @@ -3015,10 +3301,10 @@ Module Impl_multisig_Multisig. M.get_associated_function (| Ty.path "u32", "checked_add", [] |), [ M.read (| trans_id |); - M.read (| M.use (M.alloc (| Value.Integer Integer.U32 1 |)) |) + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 1 |) |)) |) ] |); - M.read (| Value.String "Transaction ids exhausted." |) + M.read (| M.of_value (| Value.String "Transaction ids exhausted." |) |) ] |) |) in @@ -3078,43 +3364,55 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::Submission" - [ - Value.StructRecord - "multisig::Submission" - [ ("transaction", M.read (| trans_id |)) ] - ] + M.of_value (| + Value.StructTuple + "multisig::Event::Submission" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::Submission" + [ ("transaction", A.to_value (M.read (| trans_id |))) ] + |)) + ] + |) ] |) |) in M.alloc (| - Value.Tuple - [ - M.read (| trans_id |); - M.call_closure (| - M.get_associated_function (| - Ty.path "multisig::Multisig", - "confirm_by_caller", - [] - |), - [ - M.read (| self |); - M.call_closure (| - M.get_associated_function (| Ty.path "multisig::Env", "caller", [] |), + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| trans_id |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "multisig::Multisig", + "confirm_by_caller", + [] + |), [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "multisig::Multisig", "env", [] |), - [ M.read (| self |) ] - |) - |) + M.read (| self |); + M.call_closure (| + M.get_associated_function (| Ty.path "multisig::Env", "caller", [] |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "multisig::Multisig", + "env", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |); + M.read (| trans_id |) ] - |); - M.read (| trans_id |) - ] - |) - ] + |)) + ] + |) |) |))) | _, _ => M.impossible @@ -3143,7 +3441,7 @@ Module Impl_multisig_Multisig. transaction } *) - Definition take_transaction (τ : list Ty.t) (α : list Value.t) : M := + Definition take_transaction (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; trans_id ] => ltac:(M.monadic @@ -3172,7 +3470,7 @@ Module Impl_multisig_Multisig. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3266,8 +3564,8 @@ Module Impl_multisig_Multisig. ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -3290,12 +3588,15 @@ Module Impl_multisig_Multisig. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.read (| - Value.String - "The transaction exists hence it must also be in the list." + M.of_value (| + Value.String + "The transaction exists hence it must also be in the list." + |) |) ] |) @@ -3432,18 +3733,21 @@ Module Impl_multisig_Multisig. "multisig::Multisig", "confirmations" |); - Value.Tuple - [ - M.read (| trans_id |); - M.read (| M.read (| owner |) |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| trans_id |)); + A.to_value + (M.read (| M.read (| owner |) |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -3465,8 +3769,8 @@ Module Impl_multisig_Multisig. ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in transaction @@ -3487,7 +3791,7 @@ Module Impl_multisig_Multisig. } } *) - Definition cancel_transaction (τ : list Ty.t) (α : list Value.t) : M := + Definition cancel_transaction (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; trans_id ] => ltac:(M.monadic @@ -3506,7 +3810,7 @@ Module Impl_multisig_Multisig. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3551,18 +3855,23 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::Cancellation" - [ - Value.StructRecord - "multisig::Cancellation" - [ ("transaction", M.read (| trans_id |)) ] - ] + M.of_value (| + Value.StructTuple + "multisig::Event::Cancellation" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::Cancellation" + [ ("transaction", A.to_value (M.read (| trans_id |))) ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3579,7 +3888,7 @@ Module Impl_multisig_Multisig. self.confirm_by_caller(self.env().caller(), trans_id) } *) - Definition confirm_transaction (τ : list Ty.t) (α : list Value.t) : M := + Definition confirm_transaction (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; trans_id ] => ltac:(M.monadic @@ -3655,7 +3964,7 @@ Module Impl_multisig_Multisig. } } *) - Definition revoke_confirmation (τ : list Ty.t) (α : list Value.t) : M := + Definition revoke_confirmation (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; trans_id ] => ltac:(M.monadic @@ -3688,7 +3997,7 @@ Module Impl_multisig_Multisig. |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -3712,7 +4021,15 @@ Module Impl_multisig_Multisig. "multisig::Multisig", "confirmations" |); - M.alloc (| Value.Tuple [ M.read (| trans_id |); M.read (| caller |) ] |) + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| trans_id |)); + A.to_value (M.read (| caller |)) + ] + |) + |) ] |) |)) in @@ -3734,7 +4051,11 @@ Module Impl_multisig_Multisig. "multisig::Multisig", "confirmations" |); - Value.Tuple [ M.read (| trans_id |); M.read (| caller |) ] + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| trans_id |)); A.to_value (M.read (| caller |)) + ] + |) ] |) |) in @@ -3765,8 +4086,10 @@ Module Impl_multisig_Multisig. ] |); M.read (| - Value.String - "There is a entry in `self.confirmations`. Hence a count must exit." + M.of_value (| + Value.String + "There is a entry in `self.confirmations`. Hence a count must exit." + |) |) ] |) @@ -3775,7 +4098,11 @@ Module Impl_multisig_Multisig. let β := confirmation_count in M.write (| β, - BinOp.Panic.sub (| M.read (| β |), Value.Integer Integer.U32 1 |) + BinOp.Panic.sub (| + Integer.U32, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := M.alloc (| @@ -3811,21 +4138,26 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::Revocation" - [ - Value.StructRecord - "multisig::Revocation" - [ - ("transaction", M.read (| trans_id |)); - ("from", M.read (| caller |)) - ] - ] + M.of_value (| + Value.StructTuple + "multisig::Event::Revocation" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::Revocation" + [ + ("transaction", A.to_value (M.read (| trans_id |))); + ("from", A.to_value (M.read (| caller |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -3862,7 +4194,7 @@ Module Impl_multisig_Multisig. result } *) - Definition invoke_transaction (τ : list Ty.t) (α : list Value.t) : M := + Definition invoke_transaction (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; trans_id ] => ltac:(M.monadic @@ -3903,16 +4235,16 @@ Module Impl_multisig_Multisig. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "transferred_value", @@ -3930,14 +4262,16 @@ Module Impl_multisig_Multisig. |) |) ] - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_record_field (| t, "multisig::Transaction", "transferred_value" |) - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -3946,14 +4280,16 @@ Module Impl_multisig_Multisig. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: self.env().transferred_value() == t.transferred_value" + M.of_value (| + Value.String + "assertion failed: self.env().transferred_value() == t.transferred_value" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let result := @@ -3961,7 +4297,7 @@ Module Impl_multisig_Multisig. M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "not yet implemented" |) ] + [ M.read (| M.of_value (| Value.String "not yet implemented" |) |) ] |) |) |) in @@ -3985,14 +4321,25 @@ Module Impl_multisig_Multisig. 0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "multisig::Error::TransactionFailed" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "multisig::Error::TransactionFailed" [] + |)) + ] + |) |))) ] |) @@ -4008,60 +4355,71 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |); - Value.StructTuple - "multisig::Event::Execution" - [ - Value.StructRecord - "multisig::Execution" - [ - ("transaction", M.read (| trans_id |)); - ("result", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::result::Result") - [ Ty.tuple []; Ty.path "multisig::Error" ], - "map", - [ - Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] - ]; - Ty.function - [ Ty.tuple [ Ty.tuple [] ] ] - (Ty.apply - (Ty.path "core::option::Option") - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] - ]) - ] - |), + M.of_value (| + Value.StructTuple + "multisig::Event::Execution" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "multisig::Execution" [ - M.read (| result |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (Value.StructTuple "core::option::Option::None" [])) - ] + ("transaction", A.to_value (M.read (| trans_id |))); + ("result", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.tuple []; Ty.path "multisig::Error" ], + "map", + [ + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] + ]; + Ty.function + [ Ty.tuple [ Ty.tuple [] ] ] + (Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] + ]) + ] + |), + [ + M.read (| result |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |))) + ] + |) + | _ => M.impossible (||) + end) |) - | _ => M.impossible (||) - end)) + ] + |))) ] - |)) - ] - ] + |)) + ] + |) ] |) |) in @@ -4099,7 +4457,7 @@ Module Impl_multisig_Multisig. result } *) - Parameter eval_transaction : (list Ty.t) -> (list Value.t) -> M. + Parameter eval_transaction : (list Ty.t) -> (list A.t) -> M. Axiom AssociatedFunction_eval_transaction : M.IsAssociatedFunction Self "eval_transaction" eval_transaction. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/payment_channel.v b/CoqOfRust/examples/default/examples/ink_contracts/payment_channel.v index 9e4b74b94..efc07d4f4 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/payment_channel.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/payment_channel.v @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_payment_channel_AccountId. Definition Self : Ty.t := Ty.path "payment_channel::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "payment_channel::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "payment_channel::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_payment_channel_AccountId. Definition Self : Ty.t := Ty.path "payment_channel::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -83,27 +92,28 @@ Module Impl_core_cmp_PartialEq_for_payment_channel_AccountId. Definition Self : Ty.t := Ty.path "payment_channel::AccountId". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "payment_channel::AccountId", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "payment_channel::AccountId", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -130,15 +140,15 @@ Module Impl_core_cmp_Eq_for_payment_channel_AccountId. Definition Self : Ty.t := Ty.path "payment_channel::AccountId". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) | _, _ => M.impossible @@ -161,7 +171,19 @@ Module Impl_core_convert_From_array_u8_for_payment_channel_AccountId. unimplemented!() } *) - Parameter from : (list Ty.t) -> (list Value.t) -> M. + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ value ] => + ltac:(M.monadic + (let value := M.alloc (| value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -251,7 +273,7 @@ Module Impl_core_cmp_PartialEq_for_payment_channel_Error. Definition Self : Ty.t := Ty.path "payment_channel::Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -278,7 +300,7 @@ Module Impl_core_cmp_PartialEq_for_payment_channel_Error. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -306,12 +328,12 @@ Module Impl_core_cmp_Eq_for_payment_channel_Error. Definition Self : Ty.t := Ty.path "payment_channel::Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -359,7 +381,7 @@ Module Impl_payment_channel_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -381,7 +403,20 @@ Module Impl_payment_channel_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. @@ -390,7 +425,20 @@ Module Impl_payment_channel_Env. unimplemented!() } *) - Parameter terminate_contract : (list Ty.t) -> (list Value.t) -> M. + Definition terminate_contract (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; sender ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let sender := M.alloc (| sender |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_terminate_contract : M.IsAssociatedFunction Self "terminate_contract" terminate_contract. @@ -400,7 +448,21 @@ Module Impl_payment_channel_Env. unimplemented!() } *) - Parameter transfer : (list Ty.t) -> (list Value.t) -> M. + Definition transfer (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; recipient; amount ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let recipient := M.alloc (| recipient |) in + let amount := M.alloc (| amount |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer. @@ -409,7 +471,19 @@ Module Impl_payment_channel_Env. unimplemented!() } *) - Parameter block_timestamp : (list Ty.t) -> (list Value.t) -> M. + Definition block_timestamp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_block_timestamp : M.IsAssociatedFunction Self "block_timestamp" block_timestamp. @@ -419,7 +493,19 @@ Module Impl_payment_channel_Env. unimplemented!() } *) - Parameter balance : (list Ty.t) -> (list Value.t) -> M. + Definition balance (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_balance : M.IsAssociatedFunction Self "balance" balance. @@ -428,7 +514,19 @@ Module Impl_payment_channel_Env. unimplemented!() } *) - Parameter account_id : (list Ty.t) -> (list Value.t) -> M. + Definition account_id (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_account_id : M.IsAssociatedFunction Self "account_id" account_id. End Impl_payment_channel_Env. @@ -447,7 +545,20 @@ where unimplemented!() } *) -Parameter hash_encoded : (list Ty.t) -> (list Value.t) -> M. +Definition hash_encoded (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; T ], [ input; output ] => + ltac:(M.monadic + (let input := M.alloc (| input |) in + let output := M.alloc (| output |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. (* pub fn ecdsa_recover( @@ -458,7 +569,21 @@ pub fn ecdsa_recover( unimplemented!() } *) -Parameter ecdsa_recover : (list Ty.t) -> (list Value.t) -> M. +Definition ecdsa_recover (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ signature; message_hash; output ] => + ltac:(M.monadic + (let signature := M.alloc (| signature |) in + let message_hash := M.alloc (| message_hash |) in + let output := M.alloc (| output |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. (* Enum Sha2x256 @@ -556,7 +681,20 @@ Module Impl_payment_channel_CryptoHash_for_payment_channel_Sha2x256. unimplemented!() } *) - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ input; output ] => + ltac:(M.monadic + (let input := M.alloc (| input |) in + let output := M.alloc (| output |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -574,7 +712,20 @@ Module Impl_payment_channel_CryptoHash_for_payment_channel_Keccak256. unimplemented!() } *) - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ input; output ] => + ltac:(M.monadic + (let input := M.alloc (| input |) in + let output := M.alloc (| output |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -592,7 +743,20 @@ Module Impl_payment_channel_CryptoHash_for_payment_channel_Blake2x256. unimplemented!() } *) - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ input; output ] => + ltac:(M.monadic + (let input := M.alloc (| input |) in + let output := M.alloc (| output |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -610,7 +774,20 @@ Module Impl_payment_channel_CryptoHash_for_payment_channel_Blake2x128. unimplemented!() } *) - Parameter hash : (list Ty.t) -> (list Value.t) -> M. + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ input; output ] => + ltac:(M.monadic + (let input := M.alloc (| input |) in + let output := M.alloc (| output |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance @@ -628,7 +805,18 @@ Module Impl_payment_channel_PaymentChannel. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -637,7 +825,7 @@ Module Impl_payment_channel_PaymentChannel. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -666,7 +854,7 @@ Module Impl_payment_channel_PaymentChannel. self.recipient == signature_account_id.into() } *) - Definition is_signature_valid (τ : list Ty.t) (α : list Value.t) : M := + Definition is_signature_valid (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; amount; signature ] => ltac:(M.monadic @@ -676,29 +864,32 @@ Module Impl_payment_channel_PaymentChannel. M.read (| let encodable := M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "payment_channel::Env", - "account_id", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "payment_channel::PaymentChannel", - "env", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |); - M.read (| amount |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "payment_channel::Env", + "account_id", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "payment_channel::PaymentChannel", + "env", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)); + A.to_value (M.read (| amount |)) + ] + |) |) in let message := M.alloc (| @@ -726,7 +917,7 @@ Module Impl_payment_channel_PaymentChannel. [ encodable; message ] |) |) in - let pub_key := M.alloc (| repeat (Value.Integer Integer.U8 0) 33 |) in + let pub_key := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 33 |) |) in let _ := M.alloc (| M.call_closure (| @@ -742,8 +933,8 @@ Module Impl_payment_channel_PaymentChannel. M.get_function (| "payment_channel::ecdsa_recover", [] |), [ signature; message; pub_key ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -759,17 +950,23 @@ Module Impl_payment_channel_PaymentChannel. "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "recover failed: {err:?}" |) ] + [ + M.read (| + M.of_value (| Value.String "recover failed: {err:?}" |) + |) + ] |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - let signature_account_id := M.alloc (| repeat (Value.Integer Integer.U8 0) 32 |) in + let signature_account_id := + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 32 |) |) in let _ := M.alloc (| M.call_closure (| @@ -780,7 +977,7 @@ Module Impl_payment_channel_PaymentChannel. "hash", [] |), - [ (* Unsize *) M.pointer_coercion pub_key; signature_account_id ] + [ (* Unsize *) M.pointer_coercion (| pub_key |); signature_account_id ] |) |) in M.alloc (| @@ -831,36 +1028,40 @@ Module Impl_payment_channel_PaymentChannel. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ recipient; close_duration ] => ltac:(M.monadic (let recipient := M.alloc (| recipient |) in let close_duration := M.alloc (| close_duration |) in - Value.StructRecord - "payment_channel::PaymentChannel" - [ - ("sender", - M.call_closure (| - M.get_associated_function (| Ty.path "payment_channel::Env", "caller", [] |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "payment_channel::PaymentChannel", - "init_env", - [] - |), - [] - |) - |) - ] - |)); - ("recipient", M.read (| recipient |)); - ("expiration", Value.StructTuple "core::option::Option::None" []); - ("withdrawn", Value.Integer Integer.U128 0); - ("close_duration", M.read (| close_duration |)) - ])) + M.of_value (| + Value.StructRecord + "payment_channel::PaymentChannel" + [ + ("sender", + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "payment_channel::Env", "caller", [] |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "payment_channel::PaymentChannel", + "init_env", + [] + |), + [] + |) + |) + ] + |))); + ("recipient", A.to_value (M.read (| recipient |))); + ("expiration", + A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |))); + ("withdrawn", A.to_value (M.of_value (| Value.Integer 0 |))); + ("close_duration", A.to_value (M.read (| close_duration |))) + ] + |))) | _, _ => M.impossible end. @@ -888,7 +1089,7 @@ Module Impl_payment_channel_PaymentChannel. Ok(()) } *) - Definition close_inner (τ : list Ty.t) (α : list Value.t) : M := + Definition close_inner (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; amount; signature ] => ltac:(M.monadic @@ -900,7 +1101,7 @@ Module Impl_payment_channel_PaymentChannel. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -951,38 +1152,44 @@ Module Impl_payment_channel_PaymentChannel. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "payment_channel::Error::CallerIsNotRecipient" - [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "payment_channel::Error::CallerIsNotRecipient" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| amount |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| amount |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "payment_channel::PaymentChannel", "withdrawn" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -990,38 +1197,44 @@ Module Impl_payment_channel_PaymentChannel. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "payment_channel::Error::AmountIsLessThanWithdrawn" - [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "payment_channel::Error::AmountIsLessThanWithdrawn" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "payment_channel::PaymentChannel", "is_signature_valid", [] |), [ M.read (| self |); M.read (| amount |); M.read (| signature |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1029,15 +1242,23 @@ Module Impl_payment_channel_PaymentChannel. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "payment_channel::Error::InvalidSignature" [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "payment_channel::Error::InvalidSignature" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1093,6 +1314,7 @@ Module Impl_payment_channel_PaymentChannel. |) |); BinOp.Panic.sub (| + Integer.U128, M.read (| amount |), M.read (| M.SubPointer.get_struct_record_field (| @@ -1104,8 +1326,8 @@ Module Impl_payment_channel_PaymentChannel. |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1114,13 +1336,16 @@ Module Impl_payment_channel_PaymentChannel. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "payment_channel::Error::TransferFailed" - [])) + (M.of_value (| + Value.StructTuple + "payment_channel::Error::TransferFailed" + [] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -1175,7 +1400,13 @@ Module Impl_payment_channel_PaymentChannel. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1191,7 +1422,7 @@ Module Impl_payment_channel_PaymentChannel. Ok(()) } *) - Definition close (τ : list Ty.t) (α : list Value.t) : M := + Definition close (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; amount; signature ] => ltac:(M.monadic @@ -1304,7 +1535,13 @@ Module Impl_payment_channel_PaymentChannel. ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1332,7 +1569,7 @@ Module Impl_payment_channel_PaymentChannel. Ok(()) } *) - Definition start_sender_close (τ : list Ty.t) (α : list Value.t) : M := + Definition start_sender_close (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1342,7 +1579,7 @@ Module Impl_payment_channel_PaymentChannel. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1393,15 +1630,23 @@ Module Impl_payment_channel_PaymentChannel. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "payment_channel::Error::CallerIsNotSender" [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "payment_channel::Error::CallerIsNotSender" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let now := @@ -1429,6 +1674,7 @@ Module Impl_payment_channel_PaymentChannel. let expiration := M.alloc (| BinOp.Panic.add (| + Integer.U64, M.read (| now |), M.read (| M.SubPointer.get_struct_record_field (| @@ -1458,23 +1704,29 @@ Module Impl_payment_channel_PaymentChannel. [ M.read (| self |) ] |) |); - Value.StructTuple - "payment_channel::Event::SenderCloseStarted" - [ - Value.StructRecord - "payment_channel::SenderCloseStarted" - [ - ("expiration", M.read (| expiration |)); - ("close_duration", - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "payment_channel::PaymentChannel", - "close_duration" - |) - |)) - ] - ] + M.of_value (| + Value.StructTuple + "payment_channel::Event::SenderCloseStarted" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "payment_channel::SenderCloseStarted" + [ + ("expiration", A.to_value (M.read (| expiration |))); + ("close_duration", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "payment_channel::PaymentChannel", + "close_duration" + |) + |))) + ] + |)) + ] + |) ] |) |) in @@ -1485,9 +1737,19 @@ Module Impl_payment_channel_PaymentChannel. "payment_channel::PaymentChannel", "expiration" |), - Value.StructTuple "core::option::Option::Some" [ M.read (| expiration |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| expiration |)) ] + |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1516,7 +1778,7 @@ Module Impl_payment_channel_PaymentChannel. } } *) - Definition claim_timeout (τ : list Ty.t) (α : list Value.t) : M := + Definition claim_timeout (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -1564,14 +1826,14 @@ Module Impl_payment_channel_PaymentChannel. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| now |)) (M.read (| expiration |)) + BinOp.Pure.lt (| M.read (| now |), M.read (| expiration |) |) |)) in let _ := M.is_constant_or_break_match (| @@ -1582,18 +1844,24 @@ Module Impl_payment_channel_PaymentChannel. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "payment_channel::Error::NotYetExpired" - [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "payment_channel::Error::NotYetExpired" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1626,14 +1894,25 @@ Module Impl_payment_channel_PaymentChannel. |) |) in M.alloc (| - Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "payment_channel::Error::NotYetExpired" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "payment_channel::Error::NotYetExpired" [] + |)) + ] + |) |))) ] |) @@ -1671,7 +1950,7 @@ Module Impl_payment_channel_PaymentChannel. Ok(()) } *) - Definition withdraw (τ : list Ty.t) (α : list Value.t) : M := + Definition withdraw (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; amount; signature ] => ltac:(M.monadic @@ -1683,7 +1962,7 @@ Module Impl_payment_channel_PaymentChannel. (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -1734,38 +2013,44 @@ Module Impl_payment_channel_PaymentChannel. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "payment_channel::Error::CallerIsNotRecipient" - [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "payment_channel::Error::CallerIsNotRecipient" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.path "payment_channel::PaymentChannel", "is_signature_valid", [] |), [ M.read (| self |); M.read (| amount |); M.read (| signature |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1773,35 +2058,44 @@ Module Impl_payment_channel_PaymentChannel. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "payment_channel::Error::InvalidSignature" [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "payment_channel::Error::InvalidSignature" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| amount |)) - (M.read (| + BinOp.Pure.lt (| + M.read (| amount |), + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "payment_channel::PaymentChannel", "withdrawn" |) - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1809,23 +2103,29 @@ Module Impl_payment_channel_PaymentChannel. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "payment_channel::Error::AmountIsLessThanWithdrawn" - [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "payment_channel::Error::AmountIsLessThanWithdrawn" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let amount_to_withdraw := M.alloc (| BinOp.Panic.sub (| + Integer.U128, M.read (| amount |), M.read (| M.SubPointer.get_struct_record_field (| @@ -1845,7 +2145,11 @@ Module Impl_payment_channel_PaymentChannel. |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| amount_to_withdraw |) |) + BinOp.Panic.add (| + Integer.U128, + M.read (| β |), + M.read (| amount_to_withdraw |) + |) |) in let _ := M.match_operator (| @@ -1902,8 +2206,8 @@ Module Impl_payment_channel_PaymentChannel. M.read (| amount_to_withdraw |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1912,13 +2216,16 @@ Module Impl_payment_channel_PaymentChannel. [ fun γ => ltac:(M.monadic - (Value.StructTuple - "payment_channel::Error::TransferFailed" - [])) + (M.of_value (| + Value.StructTuple + "payment_channel::Error::TransferFailed" + [] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -1973,7 +2280,13 @@ Module Impl_payment_channel_PaymentChannel. val)) ] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -1986,7 +2299,7 @@ Module Impl_payment_channel_PaymentChannel. self.sender } *) - Definition get_sender (τ : list Ty.t) (α : list Value.t) : M := + Definition get_sender (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2008,7 +2321,7 @@ Module Impl_payment_channel_PaymentChannel. self.recipient } *) - Definition get_recipient (τ : list Ty.t) (α : list Value.t) : M := + Definition get_recipient (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2031,7 +2344,7 @@ Module Impl_payment_channel_PaymentChannel. self.expiration } *) - Definition get_expiration (τ : list Ty.t) (α : list Value.t) : M := + Definition get_expiration (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2054,7 +2367,7 @@ Module Impl_payment_channel_PaymentChannel. self.withdrawn } *) - Definition get_withdrawn (τ : list Ty.t) (α : list Value.t) : M := + Definition get_withdrawn (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2077,7 +2390,7 @@ Module Impl_payment_channel_PaymentChannel. self.close_duration } *) - Definition get_close_duration (τ : list Ty.t) (α : list Value.t) : M := + Definition get_close_duration (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -2100,7 +2413,7 @@ Module Impl_payment_channel_PaymentChannel. self.env().balance() } *) - Definition get_balance (τ : list Ty.t) (α : list Value.t) : M := + Definition get_balance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/examples/default/examples/ink_contracts/proofs/erc20.v b/CoqOfRust/examples/default/examples/ink_contracts/proofs/erc20.v index ff087a0cb..d8b11c1f9 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/proofs/erc20.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/proofs/erc20.v @@ -2,7 +2,6 @@ Require Import CoqOfRust.CoqOfRust. Require Import CoqOfRust.proofs.M. Require Import CoqOfRust.simulations.M. Require Import CoqOfRust.lib.proofs.lib. -Require Import CoqOfRust.lib.simulations.lib. Require CoqOfRust.core.convert.mod. Require CoqOfRust.core.default. Require CoqOfRust.core.result. @@ -16,15 +15,15 @@ Import simulations.M.Notations. Import Run. Definition sum_of_money (storage : erc20.Erc20.t) : Z := - simulations.lib.Mapping.sum u128.get storage.(erc20.Erc20.balances). + simulations.lib.Mapping.sum id storage.(erc20.Erc20.balances). Module Balance. Module Valid. Definition t (x : erc20.Balance.t) : Prop := - Integer.Valid.t Integer.U128 (u128.get x). + Integer.Valid.t Integer.U128 x. End Valid. - Lemma run_Default : default.Default.TraitHasRun erc20.Balance.t. + Lemma run_Default : default.Default.TraitHasRun erc20.Balance.t (Ty.path "u128"). Proof. constructor. eexists; split. @@ -62,9 +61,7 @@ Module Erc20. Module Valid. Record t (storage : erc20.Erc20.t) : Prop := { valid_without_sum : Valid_without_sum.t storage; - sum : - storage.(erc20.Erc20.total_supply) = - u128.Make (sum_of_money storage); + sum : storage.(erc20.Erc20.total_supply) = sum_of_money storage; }. End Valid. @@ -93,7 +90,7 @@ Module AccountId. Lemma eq_or_neq (x y : erc20.AccountId.t) : x = y \/ x <> y. Proof. - destruct x as [[x]], y as [[y]]. + destruct x as [x], y as [y]. destruct (Z.eq_dec x y); sfirstorder. Qed. @@ -324,7 +321,6 @@ Proof. } rewrite proofs.lib.Mapping.run_get. eapply Run.CallClosure. { - replace (Ty.path "u128") with (Φ erc20.Balance.t) by reflexivity. apply core.proofs.option.Impl_Option_T.run_unwrap_or_default. apply Balance.run_Default. } @@ -341,7 +337,7 @@ Lemma balance_of_impl_is_valid Balance.Valid.t (simulations.erc20.balance_of_impl state.(erc20.MState.storage) owner). Proof. destruct state; intros. - unfold simulations.erc20.balance_of_impl, Balance.Valid.t, Integer.Valid.t, u128.get. + unfold simulations.erc20.balance_of_impl, Balance.Valid.t, Integer.Valid.t. destruct simulations.lib.Mapping.get eqn:H_get; cbn. { destruct H_storage. unfold lib.Mapping.Forall in *. @@ -412,7 +408,6 @@ Proof. eapply Run.CallClosure. { replace (Value.Tuple _) with (φ (owner, spender)) by reflexivity. rewrite proofs.lib.Mapping.run_get. - replace (Ty.path "u128") with (Φ erc20.Balance.t) by reflexivity. apply core.proofs.option.Impl_Option_T.run_unwrap_or_default. apply Balance.run_Default. } @@ -475,9 +470,9 @@ Lemma sub_eq_optimistic (v1 v2 : Z) : Integer.Valid.t Integer.U128 v1 -> Integer.Valid.t Integer.U128 v2 -> v1 - let v1 := Value.Integer Integer.U128 v1 in - let v2 := Value.Integer Integer.U128 v2 in - BinOp.Panic.make_arithmetic Z.sub v1 v2 = + let v1 := Value.Integer v1 in + let v2 := Value.Integer v2 in + BinOp.Panic.make_arithmetic Z.sub Integer.U128 v1 v2 = M.pure (BinOp.Optimistic.sub v1 v2). Proof. unfold Integer.Valid.t. @@ -547,9 +542,6 @@ Proof. apply run_balance_of_impl. } run_symbolic. - destruct erc20.balance_of_impl as [balance_from] eqn:H_eq_balance_from. - destruct value as [value]. - cbn. destruct (_ + | |- context[simulations.lib.Mapping.insert _ ?diff_value _] => set (diff := diff_value) end. assert (H_diff : Integer.Valid.t Integer.U128 diff). { unfold diff; clear diff. pose proof (balance_of_impl_is_valid state from). - destruct erc20.balance_of_impl as [balance]. - destruct value as [value]. unfold Balance.Valid.t, Integer.Valid.t in *; cbn in *. sauto lq: on solve: lia. } - destruct erc20.balance_of_impl as [to_balance] in |- *. destruct Integer.normalize_with_error as [sum |] eqn:H_sum_eq; cbn; [|easy]. constructor; cbn. destruct state. assert (H_sum : Integer.Valid.t Integer.U128 sum). { + set (balance := erc20.balance_of_impl _ _) in H_sum_eq. unfold Integer.normalize_with_error in H_sum_eq. unfold Integer.Valid.t; cbn in *. repeat destruct (_ (code_hash: &E) -> Result<(), Error> { unimplemented!() } *) -Parameter set_code_hash : (list Ty.t) -> (list Value.t) -> M. +Definition set_code_hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ E ], [ code_hash ] => + ltac:(M.monadic + (let code_hash := M.alloc (| code_hash |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. (* StructRecord { @@ -27,19 +39,28 @@ Module Impl_core_default_Default_for_set_code_hash_Incrementer. Definition Self : Ty.t := Ty.path "set_code_hash::Incrementer". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "set_code_hash::Incrementer" - [ - ("count", - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u32", [], "default", [] |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "set_code_hash::Incrementer" + [ + ("count", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u32", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -59,7 +80,7 @@ Module Impl_set_code_hash_Incrementer. Default::default() } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -87,7 +108,7 @@ Module Impl_set_code_hash_Incrementer. ); } *) - Definition inc (τ : list Ty.t) (α : list Value.t) : M := + Definition inc (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -100,7 +121,10 @@ Module Impl_set_code_hash_Incrementer. "set_code_hash::Incrementer", "count" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U32 1 |) |) in + M.write (| + β, + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.of_value (| Value.Integer 1 |) |) + |) in let _ := let _ := M.alloc (| @@ -111,46 +135,59 @@ Module Impl_set_code_hash_Incrementer. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The new count is " |); - M.read (| - Value.String - ", it was modified using the original contract code. + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The new count is " |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + ", it was modified using the original contract code. " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "set_code_hash::Incrementer", - "count" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "set_code_hash::Incrementer", + "count" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -162,7 +199,7 @@ Module Impl_set_code_hash_Incrementer. self.count } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -187,7 +224,7 @@ Module Impl_set_code_hash_Incrementer. println!("Switched code hash to {:?}.", code_hash); } *) - Definition set_code (τ : list Ty.t) (α : list Value.t) : M := + Definition set_code (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; code_hash ] => ltac:(M.monadic @@ -212,8 +249,8 @@ Module Impl_set_code_hash_Incrementer. |), [ code_hash ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -231,8 +268,10 @@ Module Impl_set_code_hash_Incrementer. |), [ M.read (| - Value.String - "Failed to `set_code_hash` to {code_hash:?} due to {err:?}" + M.of_value (| + Value.String + "Failed to `set_code_hash` to {code_hash:?} due to {err:?}" + |) |) ] |) @@ -240,7 +279,8 @@ Module Impl_set_code_hash_Incrementer. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -254,37 +294,47 @@ Module Impl_set_code_hash_Incrementer. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Switched code hash to " |); - M.read (| Value.String ". -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Switched code hash to " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ". +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] - |), - [ code_hash ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] + |), + [ code_hash ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 e4706dfeb..3935ed8c9 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 @@ -12,18 +12,27 @@ Module Impl_core_default_Default_for_updated_incrementer_AccountId. Definition Self : Ty.t := Ty.path "updated_incrementer::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "updated_incrementer::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "updated_incrementer::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -39,14 +48,14 @@ Module Impl_core_clone_Clone_for_updated_incrementer_AccountId. Definition Self : Ty.t := Ty.path "updated_incrementer::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -93,7 +102,20 @@ Module Impl_updated_incrementer_Env. unimplemented!() } *) - Parameter set_code_hash : (list Ty.t) -> (list Value.t) -> M. + Definition set_code_hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ E ], [ self; code_hash ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let code_hash := M.alloc (| code_hash |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_set_code_hash : M.IsAssociatedFunction Self "set_code_hash" set_code_hash. @@ -114,7 +136,18 @@ Module Impl_updated_incrementer_Incrementer. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -123,7 +156,7 @@ Module Impl_updated_incrementer_Incrementer. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -146,7 +179,7 @@ Module Impl_updated_incrementer_Incrementer. unreachable!("Constructors are not called when upgrading using `set_code_hash`.") } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -156,7 +189,11 @@ Module Impl_updated_incrementer_Incrementer. "core::panicking::unreachable_display", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ Value.String "Constructors are not called when upgrading using `set_code_hash`." ] + [ + M.of_value (| + Value.String "Constructors are not called when upgrading using `set_code_hash`." + |) + ] |) |))) | _, _ => M.impossible @@ -173,7 +210,7 @@ Module Impl_updated_incrementer_Incrementer. ); } *) - Definition inc (τ : list Ty.t) (α : list Value.t) : M := + Definition inc (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -186,7 +223,10 @@ Module Impl_updated_incrementer_Incrementer. "updated_incrementer::Incrementer", "count" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U32 4 |) |) in + M.write (| + β, + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.of_value (| Value.Integer 4 |) |) + |) in let _ := let _ := M.alloc (| @@ -197,46 +237,59 @@ Module Impl_updated_incrementer_Incrementer. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The new count is " |); - M.read (| - Value.String - ", it was modified using the updated `new_incrementer` code. + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The new count is " |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + ", it was modified using the updated `new_incrementer` code. " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "updated_incrementer::Incrementer", - "count" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "updated_incrementer::Incrementer", + "count" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -248,7 +301,7 @@ Module Impl_updated_incrementer_Incrementer. self.count } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -273,7 +326,7 @@ Module Impl_updated_incrementer_Incrementer. println!("Switched code hash to {:?}.", code_hash); } *) - Definition set_code (τ : list Ty.t) (α : list Value.t) : M := + Definition set_code (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; code_hash ] => ltac:(M.monadic @@ -312,8 +365,8 @@ Module Impl_updated_incrementer_Incrementer. code_hash ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -331,8 +384,10 @@ Module Impl_updated_incrementer_Incrementer. |), [ M.read (| - Value.String - "Failed to `set_code_hash` to {code_hash:?} due to {err:?}" + M.of_value (| + Value.String + "Failed to `set_code_hash` to {code_hash:?} due to {err:?}" + |) |) ] |) @@ -340,7 +395,8 @@ Module Impl_updated_incrementer_Incrementer. ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -354,37 +410,47 @@ Module Impl_updated_incrementer_Incrementer. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Switched code hash to " |); - M.read (| Value.String ". -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Switched code hash to " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ". +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] - |), - [ code_hash ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] + |), + [ code_hash ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/simulations/erc20.v b/CoqOfRust/examples/default/examples/ink_contracts/simulations/erc20.v index 8f5e0644d..ebac7aa67 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/simulations/erc20.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/simulations/erc20.v @@ -2,7 +2,6 @@ Require Import CoqOfRust.CoqOfRust. Require CoqOfRust.core.simulations.default. Require CoqOfRust.core.simulations.option. Require CoqOfRust.examples.default.examples.ink_contracts.simulations.lib. -Require Import CoqOfRust.lib.simulations.lib. Require Import CoqOfRust.simulations.M. Import simulations.M.Notations. @@ -10,21 +9,24 @@ Import simulations.M.Notations. (** ** Primitives *) Module Balance. - Definition t : Set := u128.t. + Definition t : Set := Z. End Balance. Module Impl_Default_for_Balance. Global Instance I : core.simulations.default.Default.Trait Balance.t := { - default := u128.Make 0; + default := 0; }. End Impl_Default_for_Balance. Module AccountId. Inductive t : Set := - | Make (account_id : u128.t). + | Make (account_id : Z). - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc20::AccountId"; + }. + + Global Instance IsToValue : ToValue t := { φ '(Make x) := Value.StructTuple "erc20::AccountId" [φ x]; }. End AccountId. @@ -36,8 +38,11 @@ Module Transfer. value : Balance.t; }. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc20::Transfer"; + }. + + Global Instance IsToValue : ToValue t := { φ x := Value.StructRecord "erc20::Transfer" [ ("from", φ x.(from)); @@ -54,8 +59,11 @@ Module Approval. value : Balance.t; }. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc20::Approval"; + }. + + Global Instance IsToValue : ToValue t := { φ x := Value.StructRecord "erc20::Approval" [ ("owner", φ x.(owner)); @@ -70,8 +78,11 @@ Module Event. | Transfer : erc20.Transfer.t -> t | Approval : erc20.Approval.t -> t. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc20::Event"; + }. + + Global Instance IsToValue : ToValue t := { φ x := match x with | Transfer x => Value.StructTuple "erc20::Event::Transfer" [φ x] @@ -85,8 +96,11 @@ Module Env. caller : AccountId.t; }. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc20::Env"; + }. + + Global Instance IsToValue : ToValue t := { φ x := Value.StructRecord "erc20::Env" [ ("caller", φ x.(caller)) @@ -105,8 +119,11 @@ Module Error. | InsufficientBalance | InsufficientAllowance. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc20::Error"; + }. + + Global Instance IsToValue : ToValue t := { φ x := match x with | InsufficientBalance => Value.StructTuple "erc20::Error::InsufficientBalance" [] @@ -133,8 +150,11 @@ Module Erc20. simulations.lib.Mapping.t (AccountId.t * AccountId.t) Balance.t; }. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc20::Erc20"; + }. + + Global Instance IsToValue : ToValue t := { φ x := Value.StructRecord "erc20::Erc20" [ ("total_supply", φ x.(total_supply)); @@ -177,7 +197,7 @@ Definition balance_of_impl erc20.Balance.t := match simulations.lib.Mapping.get owner storage.(erc20.Erc20.balances) with | Some balance => balance - | None => u128.Make 0 + | None => 0 end. Definition balance_of @@ -197,7 +217,7 @@ Definition allowance_impl storage.(erc20.Erc20.allowances) with | Some allowance => allowance - | None => u128.Make 0 + | None => 0 end. Definition allowance @@ -222,11 +242,11 @@ Definition transfer_from_to (value : erc20.Balance.t) : MS? MState.t string (erc20.Result.t unit) := letS? '{| MState.storage := storage; MState.events := events |} := readS? in - let from_balance := u128.get (balance_of_impl storage from) in - if from_balance ; MState.events := event :: events; |} in @@ -290,16 +307,15 @@ Definition transfer_from MS? MState.t string (erc20.Result.t unit) := let caller := Env.caller env in letS? '{| MState.storage := storage; MState.events := events |} := readS? in - let 'u128.Make value := value in - let 'u128.Make allowance := allowance_impl storage from caller in + let allowance := allowance_impl storage from caller in if allowance returnS? result_from_to | inl _ => - let new_allowance := u128.Make (allowance - value) in + let new_allowance := allowance - value in letS? '{| MState.storage := storage; MState.events := events |} := readS? in letS? _ := writeS? {| MState.storage := storage <| erc20.Erc20.allowances := diff --git a/CoqOfRust/examples/default/examples/ink_contracts/simulations/erc721.v b/CoqOfRust/examples/default/examples/ink_contracts/simulations/erc721.v index 9bf849963..efbe597d2 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/simulations/erc721.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/simulations/erc721.v @@ -2,7 +2,6 @@ Require Import CoqOfRust.CoqOfRust. Require CoqOfRust.core.simulations.default. Require Import CoqOfRust.core.simulations.option. Require Import CoqOfRust.core.simulations.result. -Require Import CoqOfRust.core.simulations.integer. Require Import CoqOfRust.core.simulations.bool. Require CoqOfRust.examples.default.examples.ink_contracts.simulations.lib. Require Import CoqOfRust.simulations.M. @@ -13,18 +12,12 @@ Import simulations.bool.Notations. (** ** Primitives *) Module Balance. - Inductive t : Set := - | Make (balance : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "erc721::Balance"; - φ '(Make x) := Value.Integer Integer.U128 x; - }. + Definition t : Set := Z. End Balance. Module Impl_Default_for_Balance. Global Instance I : core.simulations.default.Default.Trait Balance.t := { - default := Balance.Make 0; + default := 0; }. End Impl_Default_for_Balance. @@ -32,17 +25,20 @@ Module AccountId. Inductive t : Set := | Make (account_id : Z). - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc721::AccountId"; + }. + + Global Instance IsToValue : ToValue t := { φ '(Make x) := - Value.StructTuple "erc721::AccountId" [Value.Integer Integer.U128 x]; + Value.StructTuple "erc721::AccountId" [Value.Integer x]; }. Parameter eq : t -> t -> bool. Parameter neq : t -> t -> bool. Parameter option_eq : option t -> option t -> bool. Parameter option_neq : option t -> option t -> bool. - Parameter from : list U8.t -> t. + Parameter from : list Z -> t. Parameter from_zero : t. End AccountId. @@ -50,10 +46,13 @@ Module TokenId. Inductive t : Set := | Make (account_id : Z). + Global Instance IsToTy : ToTy t := { + Φ := Ty.path "erc721::TokenId"; + }. + Global Instance IsToValue : ToValue t := { - Φ := Ty.path "erc721::AccountId"; φ '(Make x) := - Value.StructTuple "erc721::TokenId" [Value.Integer Integer.U32 x]; + Value.StructTuple "erc721::TokenId" [Value.Integer x]; }. End TokenId. @@ -64,8 +63,11 @@ Module Transfer. id : TokenId.t; }. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc721::Transfer"; + }. + + Global Instance IsToValue : ToValue t := { φ x := Value.StructRecord "erc721::Transfer" [ ("from", φ x.(from)); @@ -82,8 +84,11 @@ Module Approval. id : TokenId.t; }. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc721::Approval"; + }. + + Global Instance IsToValue : ToValue t := { φ x := Value.StructRecord "erc721::Approval" [ ("from", φ x.(from)); @@ -100,8 +105,11 @@ Module ApprovalForAll. approved : bool; }. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc721::ApprovalForAll"; + }. + + Global Instance IsToValue : ToValue t := { φ x := Value.StructRecord "erc721::ApprovalForAll" [ ("from", φ x.(owner)); @@ -117,8 +125,11 @@ Module Event. | Approval : erc721.Approval.t -> t | ApprovalForAll : erc721.ApprovalForAll.t -> t. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc721::Event"; + }. + + Global Instance IsToValue : ToValue t := { φ x := match x with | Transfer x => Value.StructTuple "erc721::Event::Transfer" [φ x] @@ -133,8 +144,11 @@ Module Env. caller : AccountId.t; }. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc721::Env"; + }. + + Global Instance IsToValue : ToValue t := { φ x := Value.StructRecord "erc721::Env" [ ("caller", φ x.(caller)) @@ -158,8 +172,11 @@ Module Error. | CannotFetchValue | NotAllowed. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc721::Error"; + }. + + Global Instance IsToValue : ToValue t := { φ x := match x with | NotOwner => Value.StructTuple "erc721::Error::NotOwner" [] @@ -183,12 +200,15 @@ Module Erc721. Record t : Set := { token_owner : simulations.lib.Mapping.t TokenId.t AccountId.t; token_approvals : simulations.lib.Mapping.t TokenId.t AccountId.t; - owned_tokens_count : simulations.lib.Mapping.t AccountId.t integer.U32.t; + owned_tokens_count : simulations.lib.Mapping.t AccountId.t Z; operator_approvals : simulations.lib.Mapping.t (AccountId.t * AccountId.t) unit; }. - Global Instance IsToValue : ToValue t := { + Global Instance IsToTy : ToTy t := { Φ := Ty.path "erc721::Erc721"; + }. + + Global Instance IsToValue : ToValue t := { φ x := Value.StructRecord "erc721::Erc721" [ ("token_owner", φ x.(token_owner)); @@ -204,10 +224,10 @@ End Erc721. Definition balance_of_or_zero (storage : erc721.Erc721.t) (owner : erc721.AccountId.t) : - U32.t := + Z := match simulations.lib.Mapping.get owner storage.(erc721.Erc721.owned_tokens_count) with | Some count => count - | None => U32.Make 0 + | None => 0 end. Definition approved_for_all @@ -232,7 +252,7 @@ Definition exists_ Definition balance_of (storage : erc721.Erc721.t) (owner : erc721.AccountId.t) : - U32.t := + Z := balance_of_or_zero storage owner. Definition get_approved @@ -375,8 +395,8 @@ Definition remove_token_from else match simulations.lib.Mapping.get from owned_tokens_count with | None => returnS? (inl erc721.Error.CannotFetchValue) - | Some (U32.Make c) => - let count := U32.Make (c - 1) in + | Some c => + let count := c - 1 in letS? _ := writeS? ( storage <| erc721.Erc721.owned_tokens_count := @@ -411,8 +431,8 @@ Definition add_token_to else let count := match simulations.lib.Mapping.get to owned_tokens_count with - | None => U32.Make 1 - | Some (U32.Make c) => U32.Make (c + 1) + | None => 1 + | Some c => (c + 1)%Z end in letS? _ := writeS? ( storage <| @@ -506,8 +526,8 @@ Definition burn else match simulations.lib.Mapping.get owner owned_tokens_count with | None => returnS? (inl erc721.Error.CannotFetchValue) - | Some (U32.Make c) => - let count := U32.Make (c - 1) in + | Some c => + let count := (c - 1)%Z in letS? _ := writeS? ( storage <| erc721.Erc721.owned_tokens_count := @@ -529,4 +549,3 @@ Definition burn returnS? (inr tt) end end. - diff --git a/CoqOfRust/examples/default/examples/ink_contracts/simulations/lib.v b/CoqOfRust/examples/default/examples/ink_contracts/simulations/lib.v index b57586224..6228f4851 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/simulations/lib.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/simulations/lib.v @@ -7,10 +7,12 @@ Section Mapping. Context {K V : Set}. - #[refine] - Global Instance IsToValue (_ : ToValue K) (_ : ToValue V) : - ToValue (t K V) := { + Global Instance IsToTy (_ : ToTy K) (_ : ToTy V) : ToTy (t K V) := { Φ := Ty.apply (Ty.path "erc20::Mapping") [ Φ K; Φ V ]; + }. + + #[refine] + Global Instance IsToValue (_ : ToValue K) (_ : ToValue V) : ToValue (t K V) := { φ x := _; }. Admitted. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/trait_erc20.v b/CoqOfRust/examples/default/examples/ink_contracts/trait_erc20.v index 27bb09d9f..4e0e33e3d 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/trait_erc20.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/trait_erc20.v @@ -16,37 +16,41 @@ Module Impl_core_default_Default_where_core_default_Default_K_where_core_default Definition Self (K V : Ty.t) : Ty.t := Ty.apply (Ty.path "trait_erc20::Mapping") [ K; V ]. (* Default *) - Definition default (K V : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition default (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self K V in match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "trait_erc20::Mapping" - [ - ("_key", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ K ], - [], - "default", - [] - |), - [] - |)); - ("_value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply (Ty.path "core::marker::PhantomData") [ V ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "trait_erc20::Mapping" + [ + ("_key", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ K ], + [], + "default", + [] + |), + [] + |))); + ("_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::marker::PhantomData") [ V ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -67,7 +71,21 @@ Module Impl_trait_erc20_Mapping_K_V. unimplemented!() } *) - Parameter get : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition get (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_get : forall (K V : Ty.t), @@ -78,7 +96,22 @@ Module Impl_trait_erc20_Mapping_K_V. unimplemented!() } *) - Parameter insert : forall (K V : Ty.t), (list Ty.t) -> (list Value.t) -> M. + Definition insert (K V : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self K V in + match τ, α with + | [], [ self; _key; _value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _key := M.alloc (| _key |) in + let _value := M.alloc (| _value |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_insert : forall (K V : Ty.t), @@ -96,18 +129,27 @@ Module Impl_core_default_Default_for_trait_erc20_AccountId. Definition Self : Ty.t := Ty.path "trait_erc20::AccountId". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple - "trait_erc20::AccountId" - [ - M.call_closure (| - M.get_trait_method (| "core::default::Default", Ty.path "u128", [], "default", [] |), - [] - |) - ])) + (M.of_value (| + Value.StructTuple + "trait_erc20::AccountId" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |)) + ] + |))) | _, _ => M.impossible end. @@ -123,14 +165,14 @@ Module Impl_core_clone_Clone_for_trait_erc20_AccountId. Definition Self : Ty.t := Ty.path "trait_erc20::AccountId". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -185,7 +227,7 @@ Module Impl_core_fmt_Debug_for_trait_erc20_Error. Definition Self : Ty.t := Ty.path "trait_erc20::Error". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -202,11 +244,15 @@ Module Impl_core_fmt_Debug_for_trait_erc20_Error. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "InsufficientBalance" |) |))); + M.alloc (| + M.read (| M.of_value (| Value.String "InsufficientBalance" |) |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "InsufficientAllowance" |) |))) + M.alloc (| + M.read (| M.of_value (| Value.String "InsufficientAllowance" |) |) + |))) ] |) |) @@ -238,7 +284,7 @@ Module Impl_core_cmp_PartialEq_for_trait_erc20_Error. Definition Self : Ty.t := Ty.path "trait_erc20::Error". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -265,7 +311,7 @@ Module Impl_core_cmp_PartialEq_for_trait_erc20_Error. [ M.read (| other |) ] |) |) in - M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |) + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) |))) | _, _ => M.impossible end. @@ -293,12 +339,12 @@ Module Impl_core_cmp_Eq_for_trait_erc20_Error. Definition Self : Ty.t := Ty.path "trait_erc20::Error". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -344,55 +390,60 @@ Module Impl_core_default_Default_for_trait_erc20_Erc20. Definition Self : Ty.t := Ty.path "trait_erc20::Erc20". (* Default *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "trait_erc20::Erc20" - [ - ("total_supply", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "u128", - [], - "default", - [] - |), - [] - |)); - ("balances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "trait_erc20::Mapping") - [ Ty.path "trait_erc20::AccountId"; Ty.path "u128" ], - [], - "default", - [] - |), - [] - |)); - ("allowances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "trait_erc20::Mapping") - [ - Ty.tuple - [ Ty.path "trait_erc20::AccountId"; Ty.path "trait_erc20::AccountId" ]; - Ty.path "u128" - ], - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "trait_erc20::Erc20" + [ + ("total_supply", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u128", + [], + "default", + [] + |), + [] + |))); + ("balances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "trait_erc20::Mapping") + [ Ty.path "trait_erc20::AccountId"; Ty.path "u128" ], + [], + "default", + [] + |), + [] + |))); + ("allowances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "trait_erc20::Mapping") + [ + Ty.tuple + [ Ty.path "trait_erc20::AccountId"; Ty.path "trait_erc20::AccountId" ]; + Ty.path "u128" + ], + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -456,7 +507,7 @@ Module Impl_trait_erc20_Env. self.caller } *) - Definition caller (τ : list Ty.t) (α : list Value.t) : M := + Definition caller (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -474,7 +525,20 @@ Module Impl_trait_erc20_Env. unimplemented!() } *) - Parameter emit_event : (list Ty.t) -> (list Value.t) -> M. + Definition emit_event (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _event ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _event := M.alloc (| _event |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event. End Impl_trait_erc20_Env. @@ -487,7 +551,18 @@ Module Impl_trait_erc20_Erc20. unimplemented!() } *) - Parameter init_env : (list Ty.t) -> (list Value.t) -> M. + Definition init_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env. @@ -496,7 +571,7 @@ Module Impl_trait_erc20_Erc20. Self::init_env() } *) - Definition env (τ : list Ty.t) (α : list Value.t) : M := + Definition env (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -527,7 +602,7 @@ Module Impl_trait_erc20_Erc20. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ total_supply ] => ltac:(M.monadic @@ -586,45 +661,63 @@ Module Impl_trait_erc20_Erc20. [] |) |); - Value.StructTuple - "trait_erc20::Event::Transfer" - [ - Value.StructRecord - "trait_erc20::Transfer" - [ - ("from", Value.StructTuple "core::option::Option::None" []); - ("to", - Value.StructTuple "core::option::Option::Some" [ M.read (| caller |) ]); - ("value", M.read (| total_supply |)) - ] - ] + M.of_value (| + Value.StructTuple + "trait_erc20::Event::Transfer" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "trait_erc20::Transfer" + [ + ("from", + A.to_value + (M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |))); + ("to", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| caller |)) ] + |))); + ("value", A.to_value (M.read (| total_supply |))) + ] + |)) + ] + |) ] |) |) in M.alloc (| - Value.StructRecord - "trait_erc20::Erc20" - [ - ("total_supply", M.read (| total_supply |)); - ("balances", M.read (| balances |)); - ("allowances", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.apply - (Ty.path "trait_erc20::Mapping") - [ - Ty.tuple - [ Ty.path "trait_erc20::AccountId"; Ty.path "trait_erc20::AccountId" ]; - Ty.path "u128" - ], - [], - "default", - [] - |), - [] - |)) - ] + M.of_value (| + Value.StructRecord + "trait_erc20::Erc20" + [ + ("total_supply", A.to_value (M.read (| total_supply |))); + ("balances", A.to_value (M.read (| balances |))); + ("allowances", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "trait_erc20::Mapping") + [ + Ty.tuple + [ Ty.path "trait_erc20::AccountId"; Ty.path "trait_erc20::AccountId" + ]; + Ty.path "u128" + ], + [], + "default", + [] + |), + [] + |))) + ] + |) |) |))) | _, _ => M.impossible @@ -637,7 +730,7 @@ Module Impl_trait_erc20_Erc20. self.balances.get(owner).unwrap_or_default() } *) - Definition balance_of_impl (τ : list Ty.t) (α : list Value.t) : M := + Definition balance_of_impl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic @@ -680,7 +773,7 @@ Module Impl_trait_erc20_Erc20. self.allowances.get(&( *owner, *spender)).unwrap_or_default() } *) - Definition allowance_impl (τ : list Ty.t) (α : list Value.t) : M := + Definition allowance_impl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner; spender ] => ltac:(M.monadic @@ -712,7 +805,13 @@ Module Impl_trait_erc20_Erc20. "allowances" |); M.alloc (| - Value.Tuple [ M.read (| M.read (| owner |) |); M.read (| M.read (| spender |) |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.read (| owner |) |)); + A.to_value (M.read (| M.read (| spender |) |)) + ] + |) |) ] |) @@ -742,7 +841,7 @@ Module Impl_trait_erc20_Erc20. Ok(()) } *) - Definition transfer_from_to (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer_from_to (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; to; value ] => ltac:(M.monadic @@ -766,14 +865,14 @@ Module Impl_trait_erc20_Erc20. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| from_balance |)) (M.read (| value |)) + BinOp.Pure.lt (| M.read (| from_balance |), M.read (| value |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -781,14 +880,23 @@ Module Impl_trait_erc20_Erc20. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "trait_erc20::Error::InsufficientBalance" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "trait_erc20::Error::InsufficientBalance" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -808,7 +916,11 @@ Module Impl_trait_erc20_Erc20. "balances" |); M.read (| M.read (| from |) |); - BinOp.Panic.sub (| M.read (| from_balance |), M.read (| value |) |) + BinOp.Panic.sub (| + Integer.U128, + M.read (| from_balance |), + M.read (| value |) + |) ] |) |) in @@ -840,7 +952,11 @@ Module Impl_trait_erc20_Erc20. "balances" |); M.read (| M.read (| to |) |); - BinOp.Panic.add (| M.read (| to_balance |), M.read (| value |) |) + BinOp.Panic.add (| + Integer.U128, + M.read (| to_balance |), + M.read (| value |) + |) ] |) |) in @@ -855,27 +971,44 @@ Module Impl_trait_erc20_Erc20. [ M.read (| self |) ] |) |); - Value.StructTuple - "trait_erc20::Event::Transfer" - [ - Value.StructRecord - "trait_erc20::Transfer" - [ - ("from", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| M.read (| from |) |) ]); - ("to", - Value.StructTuple - "core::option::Option::Some" - [ M.read (| M.read (| to |) |) ]); - ("value", M.read (| value |)) - ] - ] + M.of_value (| + Value.StructTuple + "trait_erc20::Event::Transfer" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "trait_erc20::Transfer" + [ + ("from", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.read (| from |) |)) ] + |))); + ("to", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.read (| to |) |)) ] + |))); + ("value", A.to_value (M.read (| value |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible @@ -893,7 +1026,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. self.total_supply } *) - Definition total_supply (τ : list Ty.t) (α : list Value.t) : M := + Definition total_supply (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -913,7 +1046,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. self.balance_of_impl(&owner) } *) - Definition balance_of (τ : list Ty.t) (α : list Value.t) : M := + Definition balance_of (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner ] => ltac:(M.monadic @@ -931,7 +1064,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. self.allowance_impl(&owner, &spender) } *) - Definition allowance (τ : list Ty.t) (α : list Value.t) : M := + Definition allowance (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; owner; spender ] => ltac:(M.monadic @@ -951,7 +1084,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. self.transfer_from_to(&from, &to, value) } *) - Definition transfer (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; to; value ] => ltac:(M.monadic @@ -995,7 +1128,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. Ok(()) } *) - Definition approve (τ : list Ty.t) (α : list Value.t) : M := + Definition approve (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; spender; value ] => ltac:(M.monadic @@ -1037,7 +1170,10 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. "trait_erc20::Erc20", "allowances" |); - Value.Tuple [ M.read (| owner |); M.read (| spender |) ]; + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| owner |)); A.to_value (M.read (| spender |)) ] + |); M.read (| value |) ] |) @@ -1053,21 +1189,32 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. [ M.read (| self |) ] |) |); - Value.StructTuple - "trait_erc20::Event::Approval" - [ - Value.StructRecord - "trait_erc20::Approval" - [ - ("owner", M.read (| owner |)); - ("spender", M.read (| spender |)); - ("value", M.read (| value |)) - ] - ] + M.of_value (| + Value.StructTuple + "trait_erc20::Event::Approval" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "trait_erc20::Approval" + [ + ("owner", A.to_value (M.read (| owner |))); + ("spender", A.to_value (M.read (| spender |))); + ("value", A.to_value (M.read (| value |))) + ] + |)) + ] + |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -1084,7 +1231,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. Ok(()) } *) - Definition transfer_from (τ : list Ty.t) (α : list Value.t) : M := + Definition transfer_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; from; to; value ] => ltac:(M.monadic @@ -1122,14 +1269,14 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| allowance |)) (M.read (| value |)) + BinOp.Pure.lt (| M.read (| allowance |), M.read (| value |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1137,15 +1284,23 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "trait_erc20::Error::InsufficientAllowance" [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "trait_erc20::Error::InsufficientAllowance" + [] + |)) + ] + |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1242,12 +1397,21 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. "trait_erc20::Erc20", "allowances" |); - Value.Tuple [ M.read (| from |); M.read (| caller |) ]; - BinOp.Panic.sub (| M.read (| allowance |), M.read (| value |) |) + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| from |)); A.to_value (M.read (| caller |)) ] + |); + BinOp.Panic.sub (| Integer.U128, M.read (| allowance |), M.read (| value |) |) ] |) |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/ink_contracts/trait_flipper.v b/CoqOfRust/examples/default/examples/ink_contracts/trait_flipper.v index d11789f57..bf3bc5bd1 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/trait_flipper.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/trait_flipper.v @@ -21,25 +21,28 @@ Module Impl_trait_flipper_Flipper. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "trait_flipper::Flipper" - [ - ("value", - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - Ty.path "bool", - [], - "default", - [] - |), - [] - |)) - ])) + (M.of_value (| + Value.StructRecord + "trait_flipper::Flipper" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))) + ] + |))) | _, _ => M.impossible end. @@ -54,7 +57,7 @@ Module Impl_trait_flipper_Flip_for_trait_flipper_Flipper. self.value = !self.value; } *) - Definition flip (τ : list Ty.t) (α : list Value.t) : M := + Definition flip (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -67,16 +70,17 @@ Module Impl_trait_flipper_Flip_for_trait_flipper_Flipper. "trait_flipper::Flipper", "value" |), - UnOp.Pure.not - (M.read (| + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "trait_flipper::Flipper", "value" |) - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -86,7 +90,7 @@ Module Impl_trait_flipper_Flip_for_trait_flipper_Flipper. self.value } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/examples/default/examples/ink_contracts/trait_incrementer.v b/CoqOfRust/examples/default/examples/ink_contracts/trait_incrementer.v index baf468d1e..177d2a747 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/trait_incrementer.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/trait_incrementer.v @@ -22,12 +22,16 @@ Module Impl_trait_incrementer_Incrementer. Self { value: init_value } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ init_value ] => ltac:(M.monadic (let init_value := M.alloc (| init_value |) in - Value.StructRecord "trait_incrementer::Incrementer" [ ("value", M.read (| init_value |)) ])) + M.of_value (| + Value.StructRecord + "trait_incrementer::Incrementer" + [ ("value", A.to_value (M.read (| init_value |))) ] + |))) | _, _ => M.impossible end. @@ -38,7 +42,7 @@ Module Impl_trait_incrementer_Incrementer. self.value += delta; } *) - Definition inc_by (τ : list Ty.t) (α : list Value.t) : M := + Definition inc_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; delta ] => ltac:(M.monadic @@ -52,8 +56,11 @@ Module Impl_trait_incrementer_Incrementer. "trait_incrementer::Incrementer", "value" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| delta |) |) |) in - M.alloc (| Value.Tuple [] |) + M.write (| + β, + BinOp.Panic.add (| Integer.U64, M.read (| β |), M.read (| delta |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -69,14 +76,14 @@ Module Impl_trait_incrementer_Increment_for_trait_incrementer_Incrementer. self.inc_by(1) } *) - Definition inc (τ : list Ty.t) (α : list Value.t) : M := + Definition inc (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.call_closure (| M.get_associated_function (| Ty.path "trait_incrementer::Incrementer", "inc_by", [] |), - [ M.read (| self |); Value.Integer Integer.U64 1 ] + [ M.read (| self |); M.of_value (| Value.Integer 1 |) ] |))) | _, _ => M.impossible end. @@ -86,7 +93,7 @@ Module Impl_trait_incrementer_Increment_for_trait_incrementer_Incrementer. self.value } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -117,7 +124,7 @@ Module Impl_trait_incrementer_Reset_for_trait_incrementer_Incrementer. self.value = 0; } *) - Definition reset (τ : list Ty.t) (α : list Value.t) : M := + Definition reset (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -130,9 +137,9 @@ Module Impl_trait_incrementer_Reset_for_trait_incrementer_Incrementer. "trait_incrementer::Incrementer", "value" |), - Value.Integer Integer.U64 0 + M.of_value (| Value.Integer 0 |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/ink_contracts/wildcard_selector.v b/CoqOfRust/examples/default/examples/ink_contracts/wildcard_selector.v index 4f7976757..e585a99c1 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/wildcard_selector.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/wildcard_selector.v @@ -6,7 +6,18 @@ fn decode_input() -> Result { unimplemented!() } *) -Parameter decode_input : (list Ty.t) -> (list Value.t) -> M. +Definition decode_input (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ T ], [] => + ltac:(M.monadic + (M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ M.read (| M.of_value (| Value.String "not implemented" |) |) ] + |) + |))) + | _, _ => M.impossible + end. (* StructTuple { @@ -23,9 +34,10 @@ Module Impl_wildcard_selector_WildcardSelector. Self {} } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "wildcard_selector::WildcardSelector" [])) + | [], [] => + ltac:(M.monadic (M.of_value (| Value.StructTuple "wildcard_selector::WildcardSelector" [] |))) | _, _ => M.impossible end. @@ -37,7 +49,7 @@ Module Impl_wildcard_selector_WildcardSelector. println!("Wildcard selector: {:?}, message: {}", _selector, _message); } *) - Definition wildcard (τ : list Ty.t) (α : list Value.t) : M := + Definition wildcard (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -98,46 +110,61 @@ Module Impl_wildcard_selector_WildcardSelector. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Wildcard selector: " |); - M.read (| Value.String ", message: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Wildcard selector: " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", message: " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] - |), - [ _selector ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ _message ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] + |), + [ _selector ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ _message ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -151,7 +178,7 @@ Module Impl_wildcard_selector_WildcardSelector. println!("Wildcard complement message: {}", _message); } *) - Definition wildcard_complement (τ : list Ty.t) (α : list Value.t) : M := + Definition wildcard_complement (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _message ] => ltac:(M.monadic @@ -168,37 +195,47 @@ Module Impl_wildcard_selector_WildcardSelector. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Wildcard complement message: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Wildcard complement message: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ _message ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ _message ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example01.v b/CoqOfRust/examples/default/examples/monadic_transformation/example01.v index 818e76867..794a0fed2 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example01.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example01.v @@ -6,7 +6,7 @@ fn id(x: u64) -> u64 { x } *) -Definition id (τ : list Ty.t) (α : list Value.t) : M := +Definition id (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -16,14 +16,14 @@ Definition id (τ : list Ty.t) (α : list Value.t) : M := end. (* fn tri(a: u64, b: u64, c: u64) {} *) -Definition tri (τ : list Ty.t) (α : list Value.t) : M := +Definition tri (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; c ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in let c := M.alloc (| c |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -36,7 +36,7 @@ fn main() { tri(id(1), id(2), 3); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -45,7 +45,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "example01::id", [] |), - [ Value.Integer Integer.U64 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |) in let _ := @@ -55,7 +55,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "example01::id", [] |), - [ Value.Integer Integer.U64 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) ] |) @@ -70,7 +70,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "example01::id", [] |), - [ Value.Integer Integer.U64 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) ] |) @@ -90,7 +90,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "example01::id", [] |), - [ Value.Integer Integer.U64 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) ] |) @@ -106,17 +106,17 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "example01::id", [] |), - [ Value.Integer Integer.U64 1 ] + [ M.of_value (| Value.Integer 1 |) ] |); M.call_closure (| M.get_function (| "example01::id", [] |), - [ Value.Integer Integer.U64 2 ] + [ M.of_value (| Value.Integer 2 |) ] |); - Value.Integer Integer.U64 3 + M.of_value (| Value.Integer 3 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example02.v b/CoqOfRust/examples/default/examples/monadic_transformation/example02.v index 96ac96aff..9c4034726 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example02.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example02.v @@ -23,80 +23,78 @@ fn main() { }; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Integer Integer.I32 1 |), + M.alloc (| M.of_value (| Value.Integer 1 |) |), [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I32 0 - |) in - M.alloc (| Value.Bool false |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in + M.alloc (| M.of_value (| Value.Bool false |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I32 0 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 1 |))) + M.alloc (| M.of_value (| Value.Integer 0 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool false |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool false |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I32 2 |))); + M.alloc (| M.of_value (| Value.Integer 2 |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool false |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool false |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I32 3 |))); + M.alloc (| M.of_value (| Value.Integer 3 |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool false |)) in + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool false |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I32 4 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 5 |))) + M.alloc (| M.of_value (| Value.Integer 4 |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 5 |) |))) ] |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example03.v b/CoqOfRust/examples/default/examples/monadic_transformation/example03.v index 23be3bce9..1fcdcc14c 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example03.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example03.v @@ -7,20 +7,22 @@ fn main() { vec![5, 6, 7, 8]; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let _ := M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3; - Value.Integer Integer.I32 4 - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |) |) in let _ := M.alloc (| @@ -32,8 +34,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -47,21 +49,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 5; - Value.Integer Integer.I32 6; - Value.Integer Integer.I32 7; - Value.Integer Integer.I32 8 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)); + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 8 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example04.v b/CoqOfRust/examples/default/examples/monadic_transformation/example04.v index 9eacefa8e..45eaabd30 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example04.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example04.v @@ -6,13 +6,13 @@ fn main() { let x = &1; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| M.alloc (| Value.Integer Integer.I32 1 |) |) in - M.alloc (| Value.Tuple [] |) + let x := M.alloc (| M.alloc (| M.of_value (| Value.Integer 1 |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example05.v b/CoqOfRust/examples/default/examples/monadic_transformation/example05.v index c95d57825..63eec50e1 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example05.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example05.v @@ -16,14 +16,15 @@ Module Impl_example05_Foo. self.0 + 1 } *) - Definition plus1 (τ : list Ty.t) (α : list Value.t) : M := + Definition plus1 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ 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 Integer.U32 1 + M.of_value (| Value.Integer 1 |) |))) | _, _ => M.impossible end. @@ -37,13 +38,17 @@ fn main() { foo.plus1(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let foo := - M.alloc (| Value.StructTuple "example05::Foo" [ Value.Integer Integer.U32 0 ] |) in + M.alloc (| + M.of_value (| + Value.StructTuple "example05::Foo" [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |) + |) in let _ := M.alloc (| M.call_closure (| @@ -51,7 +56,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| foo |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 d22481da5..794619f1e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/attributes/dead_code.v +++ b/CoqOfRust/examples/default/examples/rust_book/attributes/dead_code.v @@ -2,23 +2,32 @@ Require Import CoqOfRust.CoqOfRust. (* fn used_function() {} *) -Definition used_function (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition used_function (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. (* fn unused_function() {} *) -Definition unused_function (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition unused_function (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. (* fn noisy_unused_function() {} *) -Definition noisy_unused_function (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition noisy_unused_function (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. (* fn main() { used_function(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -27,7 +36,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "dead_code::used_function", [] |), [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 08197ae5b..024fe388c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/cargo/concurrent_tests.v +++ b/CoqOfRust/examples/default/examples/rust_book/cargo/concurrent_tests.v @@ -9,7 +9,7 @@ fn foo(o: Option) { } } *) -Definition foo (τ : list Ty.t) (α : list Value.t) : M := +Definition foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A ], [ o ] => ltac:(M.monadic @@ -36,15 +36,24 @@ Definition foo (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "some -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "some +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -60,15 +69,24 @@ Definition foo (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "nothing -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "nothing +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -92,7 +110,7 @@ Module tests. } } *) - Definition test_file (τ : list Ty.t) (α : list Value.t) : M := + Definition test_file (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -139,16 +157,16 @@ Module tests. [] |) |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |); - M.read (| Value.String "ferris.txt" |) + M.read (| M.of_value (| Value.String "ferris.txt" |) |) ] |); - M.read (| Value.String "Failed to open ferris.txt" |) + M.read (| M.of_value (| Value.String "Failed to open ferris.txt" |) |) ] |) |) in @@ -164,12 +182,14 @@ Module tests. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.I32 0); - ("end_", Value.Integer Integer.I32 5) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 5 |))) + ] + |) ] |) |), @@ -232,19 +252,27 @@ Module tests. "as_bytes", [] |), - [ M.read (| Value.String "Ferris -" |) ] + [ + M.read (| + M.of_value (| Value.String "Ferris +" |) + |) + ] |) ] |); - M.read (| Value.String "Could not write to ferris.txt" |) + M.read (| + M.of_value (| + Value.String "Could not write to ferris.txt" + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -268,7 +296,7 @@ Module tests. } } *) - Definition test_file_also (τ : list Ty.t) (α : list Value.t) : M := + Definition test_file_also (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -315,16 +343,16 @@ Module tests. [] |) |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |); - M.read (| Value.String "ferris.txt" |) + M.read (| M.of_value (| Value.String "ferris.txt" |) |) ] |); - M.read (| Value.String "Failed to open ferris.txt" |) + M.read (| M.of_value (| Value.String "Failed to open ferris.txt" |) |) ] |) |) in @@ -340,12 +368,14 @@ Module tests. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.I32 0); - ("end_", Value.Integer Integer.I32 5) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 5 |))) + ] + |) ] |) |), @@ -408,19 +438,27 @@ Module tests. "as_bytes", [] |), - [ M.read (| Value.String "Corro -" |) ] + [ + M.read (| + M.of_value (| Value.String "Corro +" |) + |) + ] |) ] |); - M.read (| Value.String "Could not write to ferris.txt" |) + M.read (| + M.of_value (| + Value.String "Could not write to ferris.txt" + |) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 6160d16c6..ec7f52e09 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 @@ -16,7 +16,7 @@ Module Impl_core_fmt_Display_for_converting_to_string_Circle. write!(f, "Circle of radius {}", self.radius) } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -30,29 +30,42 @@ Module Impl_core_fmt_Display_for_converting_to_string_Circle. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "Circle of radius " |) ] |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Circle of radius " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "converting_to_string::Circle", - "radius" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "converting_to_string::Circle", + "radius" + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -74,16 +87,18 @@ fn main() { circle.to_string(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let circle := M.alloc (| - Value.StructRecord - "converting_to_string::Circle" - [ ("radius", Value.Integer Integer.I32 6) ] + M.of_value (| + Value.StructRecord + "converting_to_string::Circle" + [ ("radius", A.to_value (M.of_value (| Value.Integer 6 |))) ] + |) |) in let _ := M.alloc (| @@ -98,7 +113,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ circle ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/conversion/from.v b/CoqOfRust/examples/default/examples/rust_book/conversion/from.v index 5cb59e996..3aa625f2d 100644 --- a/CoqOfRust/examples/default/examples/rust_book/conversion/from.v +++ b/CoqOfRust/examples/default/examples/rust_book/conversion/from.v @@ -16,12 +16,14 @@ Module Impl_core_convert_From_i32_for_from_Number. Number { value: item } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ item ] => ltac:(M.monadic (let item := M.alloc (| item |) in - Value.StructRecord "from::Number" [ ("value", M.read (| item |)) ])) + M.of_value (| + Value.StructRecord "from::Number" [ ("value", A.to_value (M.read (| item |))) ] + |))) | _, _ => M.impossible end. @@ -38,7 +40,7 @@ fn main() { Number::from(30); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -53,10 +55,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "from", [] |), - [ Value.Integer Integer.I32 30 ] + [ M.of_value (| Value.Integer 30 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/conversion/into.v b/CoqOfRust/examples/default/examples/rust_book/conversion/into.v index 40ffc727e..37314f101 100644 --- a/CoqOfRust/examples/default/examples/rust_book/conversion/into.v +++ b/CoqOfRust/examples/default/examples/rust_book/conversion/into.v @@ -16,12 +16,14 @@ Module Impl_core_convert_From_i32_for_into_Number. Number { value: item } } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ item ] => ltac:(M.monadic (let item := M.alloc (| item |) in - Value.StructRecord "into::Number" [ ("value", M.read (| item |)) ])) + M.of_value (| + Value.StructRecord "into::Number" [ ("value", A.to_value (M.read (| item |))) ] + |))) | _, _ => M.impossible end. @@ -38,7 +40,7 @@ fn main() { >::into(5); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -53,10 +55,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "into", [] |), - [ Value.Integer Integer.I32 5 ] + [ M.of_value (| Value.Integer 5 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 1036b97dc..78a969a90 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 @@ -8,7 +8,7 @@ fn main() { "unparsable".parse::(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -17,24 +17,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "parse", [ Ty.path "i32" ] |), - [ M.read (| Value.String "12" |) ] + [ M.read (| M.of_value (| Value.String "12" |) |) ] |) |) in let _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "parse", [ Ty.path "bool" ] |), - [ M.read (| Value.String "true" |) ] + [ M.read (| M.of_value (| Value.String "true" |) |) ] |) |) in let _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "parse", [ Ty.path "u32" ] |), - [ M.read (| Value.String "unparsable" |) ] + [ M.read (| M.of_value (| Value.String "unparsable" |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 87e3fa22c..5fa297186 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 @@ -12,7 +12,7 @@ Module Impl_core_fmt_Debug_for_try_from_and_try_into_EvenNumber. Definition Self : Ty.t := Ty.path "try_from_and_try_into::EvenNumber". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -26,16 +26,17 @@ Module Impl_core_fmt_Debug_for_try_from_and_try_into_EvenNumber. |), [ M.read (| f |); - M.read (| Value.String "EvenNumber" |); + M.read (| M.of_value (| Value.String "EvenNumber" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "try_from_and_try_into::EvenNumber", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -64,27 +65,28 @@ Module Impl_core_cmp_PartialEq_for_try_from_and_try_into_EvenNumber. Definition Self : Ty.t := Ty.path "try_from_and_try_into::EvenNumber". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "try_from_and_try_into::EvenNumber", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "try_from_and_try_into::EvenNumber", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -111,34 +113,53 @@ Module Impl_core_convert_TryFrom_i32_for_try_from_and_try_into_EvenNumber. } } *) - Definition try_from (τ : list Ty.t) (α : list Value.t) : M := + Definition try_from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ value ] => ltac:(M.monadic (let value := M.alloc (| value |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| M.read (| value |), Value.Integer Integer.I32 2 |)) - (Value.Integer Integer.I32 0) + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, + M.read (| value |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ Value.StructTuple "try_from_and_try_into::EvenNumber" [ M.read (| value |) ] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "try_from_and_try_into::EvenNumber" + [ A.to_value (M.read (| value |)) ] + |)) + ] + |) |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::result::Result::Err" [ Value.Tuple [] ] |))) + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |))) ] |) |))) @@ -169,7 +190,7 @@ fn main() { assert_eq!(result, Err(())); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -177,30 +198,39 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::convert::TryFrom", - Ty.path "try_from_and_try_into::EvenNumber", - [ Ty.path "i32" ], - "try_from", - [] - |), - [ Value.Integer Integer.I32 8 ] - |) - |); - M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructTuple - "try_from_and_try_into::EvenNumber" - [ Value.Integer Integer.I32 8 ] - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "try_from_and_try_into::EvenNumber", + [ Ty.path "i32" ], + "try_from", + [] + |), + [ M.of_value (| Value.Integer 8 |) ] + |) + |)); + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "try_from_and_try_into::EvenNumber" + [ A.to_value (M.of_value (| Value.Integer 8 |)) ] + |)) + ] + |) + |)) + ] + |) |), [ fun γ => @@ -210,15 +240,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply @@ -235,7 +265,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -244,7 +275,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -265,14 +298,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -280,22 +315,32 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::convert::TryFrom", - Ty.path "try_from_and_try_into::EvenNumber", - [ Ty.path "i32" ], - "try_from", - [] - |), - [ Value.Integer Integer.I32 5 ] - |) - |); - M.alloc (| Value.StructTuple "core::result::Result::Err" [ Value.Tuple [] ] |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "try_from_and_try_into::EvenNumber", + [ Ty.path "i32" ], + "try_from", + [] + |), + [ M.of_value (| Value.Integer 5 |) ] + |) + |)); + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |)) + ] + |) |), [ fun γ => @@ -305,15 +350,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply @@ -330,7 +375,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -339,7 +385,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -360,14 +408,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -382,25 +432,33 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "try_into", [] |), - [ Value.Integer Integer.I32 8 ] + [ M.of_value (| Value.Integer 8 |) ] |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - result; - M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - Value.StructTuple - "try_from_and_try_into::EvenNumber" - [ Value.Integer Integer.I32 8 ] - ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value result; + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "try_from_and_try_into::EvenNumber" + [ A.to_value (M.of_value (| Value.Integer 8 |)) ] + |)) + ] + |) + |)) + ] + |) |), [ fun γ => @@ -410,15 +468,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply @@ -435,7 +493,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -444,7 +503,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -465,14 +526,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -487,17 +550,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "try_into", [] |), - [ Value.Integer Integer.I32 5 ] + [ M.of_value (| Value.Integer 5 |) ] |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - result; - M.alloc (| Value.StructTuple "core::result::Result::Err" [ Value.Tuple [] ] |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value result; + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |)) + ] + |) |), [ fun γ => @@ -507,15 +579,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply @@ -532,7 +604,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -541,7 +614,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -562,19 +637,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 99d1dc0a0..74943df83 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/constants.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/constants.v @@ -1,10 +1,11 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Definition value_LANGUAGE : Value.t := M.run ltac:(M.monadic (M.alloc (| Value.String "Rust" |))). +Definition value_LANGUAGE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.String "Rust" |) |))). -Definition value_THRESHOLD : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.I32 10 |))). +Definition value_THRESHOLD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). (* fn is_big(n: i32) -> bool { @@ -12,12 +13,12 @@ fn is_big(n: i32) -> bool { n > THRESHOLD } *) -Definition is_big (τ : list Ty.t) (α : list Value.t) : M := +Definition is_big (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in - BinOp.Pure.gt (M.read (| n |)) (M.read (| M.get_constant (| "constants::THRESHOLD" |) |)))) + BinOp.Pure.gt (| M.read (| n |), M.read (| M.get_constant (| "constants::THRESHOLD" |) |) |))) | _, _ => M.impossible end. @@ -35,12 +36,12 @@ fn main() { // FIXME ^ Comment out this line } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let n := M.alloc (| Value.Integer Integer.I32 16 |) in + let n := M.alloc (| M.of_value (| Value.Integer 16 |) |) in let _ := let _ := M.alloc (| @@ -51,33 +52,43 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "This is " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "This is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ M.read (| M.get_constant (| "constants::LANGUAGE" |) |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ M.read (| M.get_constant (| "constants::LANGUAGE" |) |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -88,36 +99,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The threshold is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "The threshold is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ M.get_constant (| "constants::THRESHOLD" |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ M.get_constant (| "constants::THRESHOLD" |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -128,71 +147,81 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), [ - fun γ => - ltac:(M.monadic - (let γ := - M.use + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_function (| "constants::is_big", [] |), + [ M.read (| n |) ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.of_value (| Value.String "big" |))); + fun γ => + ltac:(M.monadic (M.alloc (| - M.call_closure (| - M.get_function (| "constants::is_big", [] |), - [ M.read (| n |) ] - |) - |)) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - Value.String "big")); - fun γ => - ltac:(M.monadic - (M.alloc (| M.read (| Value.String "small" |) |))) + M.read (| M.of_value (| Value.String "small" |) |) + |))) + ] + |) ] - |) - ] - |) - ] - |)) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 5d3580d73..1ff756b5c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums.v @@ -51,7 +51,7 @@ fn inspect(event: WebEvent) { } } *) -Definition inspect (τ : list Ty.t) (α : list Value.t) : M := +Definition inspect (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ event ] => ltac:(M.monadic @@ -75,25 +75,33 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - ("page loaded, r" - ++ - (String.String "233" ("f" ++ (String.String "233" " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + ("page loaded, r" + ++ + (String.String + "233" + ("f" ++ (String.String "233" " ")))) - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -109,17 +117,26 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "page unloaded -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "page unloaded +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -138,36 +155,44 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "pressed '" |); - M.read (| Value.String "'. -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "pressed '" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "'. +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "char" ] - |), - [ c ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "char" ] + |), + [ c ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -186,36 +211,44 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "pasted """ |); - M.read (| Value.String """. -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "pasted """ |) |)); + A.to_value (M.read (| M.of_value (| Value.String """. +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ s ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ s ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -238,46 +271,58 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "clicked at x=" |); - M.read (| Value.String ", y=" |); - M.read (| Value.String ". -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "clicked at x=" |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ", y=" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ". +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i64" ] - |), - [ x ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i64" ] - |), - [ y ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i64" ] + |), + [ x ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i64" ] + |), + [ y ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -300,38 +345,54 @@ fn main() { inspect(unload); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let pressed := - M.alloc (| Value.StructTuple "enums::WebEvent::KeyPress" [ Value.UnicodeChar 120 ] |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "enums::WebEvent::KeyPress" + [ A.to_value (M.of_value (| Value.UnicodeChar 120 |)) ] + |) + |) in let pasted := M.alloc (| - Value.StructTuple - "enums::WebEvent::Paste" - [ - M.call_closure (| - M.get_trait_method (| - "alloc::borrow::ToOwned", - Ty.path "str", - [], - "to_owned", - [] - |), - [ M.read (| Value.String "my text" |) ] - |) - ] + M.of_value (| + Value.StructTuple + "enums::WebEvent::Paste" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "alloc::borrow::ToOwned", + Ty.path "str", + [], + "to_owned", + [] + |), + [ M.read (| M.of_value (| Value.String "my text" |) |) ] + |)) + ] + |) |) in let click := M.alloc (| - Value.StructRecord - "enums::WebEvent::Click" - [ ("x", Value.Integer Integer.I64 20); ("y", Value.Integer Integer.I64 80) ] + M.of_value (| + Value.StructRecord + "enums::WebEvent::Click" + [ + ("x", A.to_value (M.of_value (| Value.Integer 20 |))); + ("y", A.to_value (M.of_value (| 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 load := + M.alloc (| M.of_value (| Value.StructTuple "enums::WebEvent::PageLoad" [] |) |) in + let unload := + M.alloc (| M.of_value (| Value.StructTuple "enums::WebEvent::PageUnload" [] |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "enums::inspect", [] |), [ M.read (| pressed |) ] |) @@ -352,7 +413,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "enums::inspect", [] |), [ M.read (| unload |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 d4d38bacd..9a275c4fd 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 @@ -61,7 +61,7 @@ fn main() { println!("violets are #{:06x}", Color::Blue as i32); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -76,33 +76,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "zero is " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "zero is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ M.alloc (| M.rust_cast (Value.Integer Integer.Isize 0) |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.rust_cast (| M.of_value (| Value.Integer 0 |) |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -113,33 +127,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "one is " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "one is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ M.alloc (| M.rust_cast (Value.Integer Integer.Isize 1) |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.rust_cast (| M.of_value (| Value.Integer 1 |) |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -154,62 +182,84 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "roses are #" |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "roses are #" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.rust_cast - (BinOp.Panic.add (| - M.get_constant (| - "enums_c_like::Color::Red_discriminant" - |), - Value.Integer Integer.Isize 0 - |)) - |) - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.rust_cast (| + BinOp.Panic.add (| + Integer.Isize, + M.get_constant (| + "enums_c_like::Color::Red_discriminant" + |), + M.of_value (| Value.Integer 0 |) + |) + |) + |) + ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple "core::fmt::rt::Alignment::Unknown" []; - Value.Integer Integer.U32 8; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple - "core::fmt::rt::Count::Is" - [ Value.Integer Integer.Usize 6 ] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Unknown" [] + |); + M.of_value (| Value.Integer 8 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ A.to_value (M.of_value (| Value.Integer 6 |)) ] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -223,7 +273,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -238,64 +288,84 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "violets are #" |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "violets are #" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.rust_cast - (BinOp.Panic.add (| - M.get_constant (| - "enums_c_like::Color::Blue_discriminant" - |), - Value.Integer Integer.Isize 0 - |)) - |) - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.rust_cast (| + BinOp.Panic.add (| + Integer.Isize, + M.get_constant (| + "enums_c_like::Color::Blue_discriminant" + |), + M.of_value (| Value.Integer 0 |) + |) + |) + |) + ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple "core::fmt::rt::Alignment::Unknown" []; - Value.Integer Integer.U32 8; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple - "core::fmt::rt::Count::Is" - [ Value.Integer Integer.Usize 6 ] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Unknown" [] + |); + M.of_value (| Value.Integer 8 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ A.to_value (M.of_value (| Value.Integer 6 |)) ] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -309,8 +379,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 63eee4b81..058848cd9 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 @@ -37,9 +37,11 @@ Module Impl_enums_testcase_linked_list_List. Nil } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.StructTuple "enums_testcase_linked_list::List::Nil" [])) + | [], [] => + ltac:(M.monadic + (M.of_value (| Value.StructTuple "enums_testcase_linked_list::List::Nil" [] |))) | _, _ => M.impossible end. @@ -51,27 +53,31 @@ Module Impl_enums_testcase_linked_list_List. Cons(elem, Box::new(self)) } *) - Definition prepend (τ : list Ty.t) (α : list Value.t) : M := + Definition prepend (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; elem ] => ltac:(M.monadic (let self := M.alloc (| self |) in let elem := M.alloc (| elem |) in - Value.StructTuple - "enums_testcase_linked_list::List::Cons" - [ - M.read (| elem |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "enums_testcase_linked_list::List"; Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [ M.read (| self |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "enums_testcase_linked_list::List::Cons" + [ + A.to_value (M.read (| elem |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "enums_testcase_linked_list::List"; Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ M.read (| self |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -95,7 +101,7 @@ Module Impl_enums_testcase_linked_list_List. } } *) - Definition len (τ : list Ty.t) (α : list Value.t) : M := + Definition len (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -121,7 +127,8 @@ Module Impl_enums_testcase_linked_list_List. let tail := M.alloc (| γ0_1 |) in M.alloc (| BinOp.Panic.add (| - Value.Integer Integer.U32 1, + Integer.U32, + M.of_value (| Value.Integer 1 |), M.call_closure (| M.get_associated_function (| Ty.path "enums_testcase_linked_list::List", @@ -132,7 +139,7 @@ Module Impl_enums_testcase_linked_list_List. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 0 |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) ] |) |))) @@ -155,7 +162,7 @@ Module Impl_enums_testcase_linked_list_List. } } *) - Definition stringify (τ : list Ty.t) (α : list Value.t) : M := + Definition stringify (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -193,45 +200,56 @@ Module Impl_enums_testcase_linked_list_List. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String ", " |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ head ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "enums_testcase_linked_list::List", - "stringify", - [] - |), - [ M.read (| M.read (| tail |) |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ head ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "enums_testcase_linked_list::List", + "stringify", + [] + |), + [ M.read (| M.read (| tail |) |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -253,8 +271,17 @@ Module Impl_enums_testcase_linked_list_List. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "Nil" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Nil" |) |)) + ] + |) + |) + |) ] |) ] @@ -285,7 +312,7 @@ fn main() { println!("{}", list.stringify()); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -306,7 +333,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "prepend", [] |), - [ M.read (| list |); Value.Integer Integer.U32 1 ] + [ M.read (| list |); M.of_value (| Value.Integer 1 |) ] |) |) in let _ := @@ -318,7 +345,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "prepend", [] |), - [ M.read (| list |); Value.Integer Integer.U32 2 ] + [ M.read (| list |); M.of_value (| Value.Integer 2 |) ] |) |) in let _ := @@ -330,7 +357,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "prepend", [] |), - [ M.read (| list |); Value.Integer Integer.U32 3 ] + [ M.read (| list |); M.of_value (| Value.Integer 3 |) ] |) |) in let _ := @@ -343,47 +370,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "linked list has length: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "linked list has length: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "enums_testcase_linked_list::List", - "len", - [] - |), - [ list ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "enums_testcase_linked_list::List", + "len", + [] + |), + [ list ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -394,45 +431,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "enums_testcase_linked_list::List", - "stringify", - [] - |), - [ list ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "enums_testcase_linked_list::List", + "stringify", + [] + |), + [ list ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 ee6ffb86f..bb6545ff2 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 @@ -32,18 +32,20 @@ fn main() { let x = Operations::Add; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let x := M.alloc (| - Value.StructTuple - "enums_type_aliases_v1::VeryVerboseEnumOfThingsToDoWithNumbers::Add" - [] + M.of_value (| + Value.StructTuple + "enums_type_aliases_v1::VeryVerboseEnumOfThingsToDoWithNumbers::Add" + [] + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 7f7d37ff2..e1e58bfee 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 @@ -32,7 +32,7 @@ Module Impl_enums_type_aliases_v2_VeryVerboseEnumOfThingsToDoWithNumbers. } } *) - Definition run (τ : list Ty.t) (α : list Value.t) : M := + Definition run (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; x; y ] => ltac:(M.monadic @@ -46,11 +46,11 @@ Module Impl_enums_type_aliases_v2_VeryVerboseEnumOfThingsToDoWithNumbers. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| BinOp.Panic.add (| M.read (| x |), M.read (| y |) |) |))); + M.alloc (| BinOp.Panic.add (| Integer.I32, M.read (| x |), M.read (| y |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| BinOp.Panic.sub (| M.read (| x |), M.read (| y |) |) |))) + M.alloc (| BinOp.Panic.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 7f142d392..c9ec79231 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 @@ -61,13 +61,15 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => 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 status := + M.alloc (| M.of_value (| Value.StructTuple "enums_use::Status::Poor" [] |) |) in + let work := + M.alloc (| M.of_value (| Value.StructTuple "enums_use::Work::Civilian" [] |) |) in let _ := M.match_operator (| status, @@ -87,18 +89,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "The rich have lots of money! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "The rich have lots of money! +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -114,18 +126,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "The poor have no money... -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "The poor have no money... +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -146,17 +168,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Civilians work! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Civilians work! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -172,17 +203,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Soldiers fight! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Soldiers fight! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 82d1cb601..84173a00e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/structures.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/structures.v @@ -12,7 +12,7 @@ Module Impl_core_fmt_Debug_for_structures_Person. Definition Self : Ty.t := Ty.path "structures::Person". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -26,25 +26,27 @@ Module Impl_core_fmt_Debug_for_structures_Person. |), [ M.read (| f |); - M.read (| Value.String "Person" |); - M.read (| Value.String "name" |); + M.read (| M.of_value (| Value.String "Person" |) |); + M.read (| M.of_value (| Value.String "name" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "structures::Person", "name" - |)); - M.read (| Value.String "age" |); + |) + |); + M.read (| M.of_value (| Value.String "age" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "structures::Person", "age" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -141,7 +143,7 @@ fn main() { println!("pair contains {:?} and {:?}", integer, decimal); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -156,15 +158,17 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "from", [] |), - [ M.read (| Value.String "Peter" |) ] + [ M.read (| M.of_value (| Value.String "Peter" |) |) ] |) |) in - let age := M.alloc (| Value.Integer Integer.U8 27 |) in + let age := M.alloc (| M.of_value (| Value.Integer 27 |) |) in let peter := M.alloc (| - Value.StructRecord - "structures::Person" - [ ("name", M.read (| name |)); ("age", M.read (| age |)) ] + M.of_value (| + Value.StructRecord + "structures::Person" + [ ("name", A.to_value (M.read (| name |))); ("age", A.to_value (M.read (| age |))) ] + |) |) in let _ := let _ := @@ -176,38 +180,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "structures::Person" ] - |), - [ peter ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "structures::Person" ] + |), + [ peter ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let point := M.alloc (| - Value.StructRecord - "structures::Point" - [ ("x", M.read (| UnsupportedLiteral |)); ("y", M.read (| UnsupportedLiteral |)) ] + M.of_value (| + Value.StructRecord + "structures::Point" + [ + ("x", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))); + ("y", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) + ] + |) |) in let _ := let _ := @@ -219,60 +238,75 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "point coordinates: (" |); - M.read (| Value.String ", " |); - M.read (| Value.String ") -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "point coordinates: (" |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - point, - "structures::Point", - "x" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - point, - "structures::Point", - "y" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + point, + "structures::Point", + "x" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + point, + "structures::Point", + "y" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let bottom_right := M.alloc (| - M.struct_record_update (M.read (| point |)) [ ("x", M.read (| UnsupportedLiteral |)) ] + M.of_value (| + M.struct_record_update + (M.read (| point |)) + [ ("x", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) ] + |) |) in let _ := let _ := @@ -284,57 +318,66 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "second point: (" |); - M.read (| Value.String ", " |); - M.read (| Value.String ") -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "second point: (" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - bottom_right, - "structures::Point", - "x" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - bottom_right, - "structures::Point", - "y" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + bottom_right, + "structures::Point", + "x" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + bottom_right, + "structures::Point", + "y" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| point, [ @@ -348,22 +391,36 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let top_edge := M.copy (| γ0_1 |) in let _rectangle := M.alloc (| - Value.StructRecord - "structures::Rectangle" - [ - ("top_left", - Value.StructRecord - "structures::Point" - [ ("x", M.read (| left_edge |)); ("y", M.read (| top_edge |)) ]); - ("bottom_right", M.read (| bottom_right |)) - ] + M.of_value (| + Value.StructRecord + "structures::Rectangle" + [ + ("top_left", + A.to_value + (M.of_value (| + Value.StructRecord + "structures::Point" + [ + ("x", A.to_value (M.read (| left_edge |))); + ("y", A.to_value (M.read (| top_edge |))) + ] + |))); + ("bottom_right", A.to_value (M.read (| bottom_right |))) + ] + |) |) in - let _unit := M.alloc (| Value.StructTuple "structures::Unit" [] |) in + let _unit := + M.alloc (| M.of_value (| Value.StructTuple "structures::Unit" [] |) |) in let pair_ := M.alloc (| - Value.StructTuple - "structures::Pair" - [ Value.Integer Integer.I32 1; M.read (| UnsupportedLiteral |) ] + M.of_value (| + Value.StructTuple + "structures::Pair" + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)) + ] + |) |) in let _ := let _ := @@ -379,57 +436,69 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "pair contains " |); - M.read (| Value.String " and " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "pair contains " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " and " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_tuple_field (| - pair_, - "structures::Pair", - 0 - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f32" ] - |), - [ - M.SubPointer.get_struct_tuple_field (| - pair_, - "structures::Pair", - 1 - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_tuple_field (| + pair_, + "structures::Pair", + 0 + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f32" ] + |), + [ + M.SubPointer.get_struct_tuple_field (| + pair_, + "structures::Pair", + 1 + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| pair_, [ @@ -455,46 +524,61 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "pair contains " |); - M.read (| Value.String " and " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "pair contains " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " and " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ integer ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f32" ] - |), - [ decimal ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ integer ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f32" ] + |), + [ decimal ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] 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 aa3e1a5c0..b30c4a9e9 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 @@ -15,7 +15,7 @@ fn multiply(first_number_str: &str, second_number_str: &str) -> AliasedResult ltac:(M.monadic @@ -41,8 +41,8 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "str", "parse", [ Ty.path "i32" ] |), [ M.read (| first_number_str |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -72,8 +72,8 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| second_number_str |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -84,19 +84,22 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let second_number := M.copy (| γ |) in BinOp.Panic.mul (| + Integer.I32, M.read (| first_number |), M.read (| second_number |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -110,7 +113,7 @@ fn print(result: AliasedResult) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -137,34 +140,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "n is " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "n is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -183,36 +196,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "core::num::error::ParseIntError" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "core::num::error::ParseIntError" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -225,7 +246,7 @@ fn main() { print(multiply("t", "2")); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -237,7 +258,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "aliases_for_result::multiply", [] |), - [ M.read (| Value.String "10" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "10" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) ] |) @@ -249,12 +273,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "aliases_for_result::multiply", [] |), - [ M.read (| Value.String "t" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "t" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 25933f00c..86653785c 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 @@ -24,7 +24,7 @@ Module Impl_core_fmt_Debug_for_boxing_errors_EmptyVec. Definition Self : Ty.t := Ty.path "boxing_errors::EmptyVec". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -32,7 +32,7 @@ Module Impl_core_fmt_Debug_for_boxing_errors_EmptyVec. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "EmptyVec" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "EmptyVec" |) |) ] |))) | _, _ => M.impossible end. @@ -49,12 +49,12 @@ Module Impl_core_clone_Clone_for_boxing_errors_EmptyVec. Definition Self : Ty.t := Ty.path "boxing_errors::EmptyVec". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "boxing_errors::EmptyVec" [])) + M.of_value (| Value.StructTuple "boxing_errors::EmptyVec" [] |))) | _, _ => M.impossible end. @@ -74,7 +74,7 @@ Module Impl_core_fmt_Display_for_boxing_errors_EmptyVec. write!(f, "invalid first item to double") } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -88,10 +88,19 @@ Module Impl_core_fmt_Display_for_boxing_errors_EmptyVec. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "invalid first item to double" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "invalid first item to double" |) + |)) + ] + |) + |) + |) ] |) ] @@ -125,7 +134,7 @@ fn double_first(vec: Vec<&str>) -> Result { }) } *) -Definition double_first (τ : list Ty.t) (α : list Value.t) : M := +Definition double_first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ vec ] => ltac:(M.monadic @@ -197,8 +206,8 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -222,16 +231,17 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := "into", [] |), - [ Value.StructTuple "boxing_errors::EmptyVec" [] ] + [ M.of_value (| Value.StructTuple "boxing_errors::EmptyVec" [] |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -293,8 +303,8 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| M.read (| s |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -325,11 +335,12 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -340,19 +351,22 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let i := M.copy (| γ |) in BinOp.Panic.mul (| - Value.Integer Integer.I32 2, + Integer.I32, + M.of_value (| Value.Integer 2 |), M.read (| i |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -366,7 +380,7 @@ fn print(result: Result) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -393,36 +407,46 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -441,43 +465,51 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", [ - Ty.dyn [ ("core::error::Error::Trait", []) ]; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn [ ("core::error::Error::Trait", []) ]; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ e ] - |) - ] - |)) + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -495,7 +527,7 @@ fn main() { print(double_first(strings)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -510,8 +542,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -525,16 +557,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "42" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "42" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -561,8 +596,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -576,16 +611,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -625,7 +663,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 c73b3b5e7..ee1f8dba6 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 @@ -30,7 +30,7 @@ Module Impl_core_fmt_Debug_for_combinators_and_then_Food. Definition Self : Ty.t := Ty.path "combinators_and_then::Food". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -47,15 +47,15 @@ Module Impl_core_fmt_Debug_for_combinators_and_then_Food. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "CordonBleu" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "CordonBleu" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Steak" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Steak" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Sushi" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Sushi" |) |) |))) ] |) |) @@ -101,7 +101,7 @@ Module Impl_core_fmt_Debug_for_combinators_and_then_Day. Definition Self : Ty.t := Ty.path "combinators_and_then::Day". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -118,15 +118,15 @@ Module Impl_core_fmt_Debug_for_combinators_and_then_Day. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Monday" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Monday" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Tuesday" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Tuesday" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Wednesday" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Wednesday" |) |) |))) ] |) |) @@ -151,7 +151,7 @@ fn have_ingredients(food: Food) -> Option { } } *) -Definition have_ingredients (τ : list Ty.t) (α : list Value.t) : M := +Definition have_ingredients (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ food ] => ltac:(M.monadic @@ -161,11 +161,16 @@ 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 + (M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| food |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| food |)) ] + |) |))) ] |) @@ -181,7 +186,7 @@ fn have_recipe(food: Food) -> Option { } } *) -Definition have_recipe (τ : list Ty.t) (α : list Value.t) : M := +Definition have_recipe (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ food ] => ltac:(M.monadic @@ -191,11 +196,16 @@ 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 + (M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| food |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| food |)) ] + |) |))) ] |) @@ -214,7 +224,7 @@ fn cookable_v1(food: Food) -> Option { } } *) -Definition cookable_v1 (τ : list Ty.t) (α : list Value.t) : M := +Definition cookable_v1 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ food ] => ltac:(M.monadic @@ -229,7 +239,8 @@ 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 + (M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -245,7 +256,9 @@ Definition cookable_v1 (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -256,7 +269,11 @@ Definition cookable_v1 (τ : list Ty.t) (α : list Value.t) : M := |) in let food := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| food |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| food |)) ] + |) |))) ] |))) @@ -271,7 +288,7 @@ fn cookable_v2(food: Food) -> Option { have_recipe(food).and_then(have_ingredients) } *) -Definition cookable_v2 (τ : list Ty.t) (α : list Value.t) : M := +Definition cookable_v2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ food ] => ltac:(M.monadic @@ -306,7 +323,7 @@ fn eat(food: Food, day: Day) { } } *) -Definition eat (τ : list Ty.t) (α : list Value.t) : M := +Definition eat (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ food; day ] => ltac:(M.monadic @@ -339,45 +356,57 @@ Definition eat (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Yay! On " |); - M.read (| Value.String " we get to eat " |); - M.read (| Value.String ". -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Yay! On " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " we get to eat " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ". +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "combinators_and_then::Day" ] - |), - [ day ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "combinators_and_then::Food" ] - |), - [ food ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "combinators_and_then::Day" ] + |), + [ day ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "combinators_and_then::Food" ] + |), + [ food ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -393,36 +422,48 @@ Definition eat (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Oh no. We don't get to eat on " |); - M.read (| Value.String "? -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Oh no. We don't get to eat on " + |) + |)); + A.to_value (M.read (| M.of_value (| Value.String "? +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "combinators_and_then::Day" ] - |), - [ day ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "combinators_and_then::Day" ] + |), + [ day ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -438,19 +479,26 @@ fn main() { eat(sushi, Day::Wednesday); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.match_operator (| M.alloc (| - Value.Tuple - [ - Value.StructTuple "combinators_and_then::Food::CordonBleu" []; - Value.StructTuple "combinators_and_then::Food::Steak" []; - Value.StructTuple "combinators_and_then::Food::Sushi" [] - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.StructTuple "combinators_and_then::Food::CordonBleu" [] + |)); + A.to_value + (M.of_value (| Value.StructTuple "combinators_and_then::Food::Steak" [] |)); + A.to_value + (M.of_value (| Value.StructTuple "combinators_and_then::Food::Sushi" [] |)) + ] + |) |), [ fun γ => @@ -467,7 +515,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_function (| "combinators_and_then::eat", [] |), [ M.read (| cordon_bleu |); - Value.StructTuple "combinators_and_then::Day::Monday" [] + M.of_value (| Value.StructTuple "combinators_and_then::Day::Monday" [] |) ] |) |) in @@ -477,7 +525,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_function (| "combinators_and_then::eat", [] |), [ M.read (| steak |); - Value.StructTuple "combinators_and_then::Day::Tuesday" [] + M.of_value (| Value.StructTuple "combinators_and_then::Day::Tuesday" [] |) ] |) |) in @@ -487,11 +535,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_function (| "combinators_and_then::eat", [] |), [ M.read (| sushi |); - Value.StructTuple "combinators_and_then::Day::Wednesday" [] + M.of_value (| Value.StructTuple "combinators_and_then::Day::Wednesday" [] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 993a3ae3a..819967357 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 @@ -30,7 +30,7 @@ Module Impl_core_fmt_Debug_for_combinators_map_Food. Definition Self : Ty.t := Ty.path "combinators_map::Food". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -47,15 +47,15 @@ Module Impl_core_fmt_Debug_for_combinators_map_Food. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Apple" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Apple" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Carrot" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Carrot" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Potato" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Potato" |) |) |))) ] |) |) @@ -83,7 +83,7 @@ Module Impl_core_fmt_Debug_for_combinators_map_Peeled. Definition Self : Ty.t := Ty.path "combinators_map::Peeled". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -97,16 +97,17 @@ Module Impl_core_fmt_Debug_for_combinators_map_Peeled. |), [ M.read (| f |); - M.read (| Value.String "Peeled" |); + M.read (| M.of_value (| Value.String "Peeled" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "combinators_map::Peeled", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -131,7 +132,7 @@ Module Impl_core_fmt_Debug_for_combinators_map_Chopped. Definition Self : Ty.t := Ty.path "combinators_map::Chopped". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -145,16 +146,17 @@ Module Impl_core_fmt_Debug_for_combinators_map_Chopped. |), [ M.read (| f |); - M.read (| Value.String "Chopped" |); + M.read (| M.of_value (| Value.String "Chopped" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "combinators_map::Chopped", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -179,7 +181,7 @@ Module Impl_core_fmt_Debug_for_combinators_map_Cooked. Definition Self : Ty.t := Ty.path "combinators_map::Cooked". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -193,16 +195,17 @@ Module Impl_core_fmt_Debug_for_combinators_map_Cooked. |), [ M.read (| f |); - M.read (| Value.String "Cooked" |); + M.read (| M.of_value (| Value.String "Cooked" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "combinators_map::Cooked", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -224,7 +227,7 @@ fn peel(food: Option) -> Option { } } *) -Definition peel (τ : list Ty.t) (α : list Value.t) : M := +Definition peel (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ food ] => ltac:(M.monadic @@ -239,12 +242,22 @@ Definition peel (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let food := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "combinators_map::Peeled" [ M.read (| food |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "combinators_map::Peeled" + [ A.to_value (M.read (| food |)) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |))) ] |) |))) @@ -259,7 +272,7 @@ fn chop(peeled: Option) -> Option { } } *) -Definition chop (τ : list Ty.t) (α : list Value.t) : M := +Definition chop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ peeled ] => ltac:(M.monadic @@ -276,12 +289,22 @@ Definition chop (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_tuple_field (| γ0_0, "combinators_map::Peeled", 0 |) in let food := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "combinators_map::Chopped" [ M.read (| food |) ] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "combinators_map::Chopped" + [ A.to_value (M.read (| food |)) ] + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |))) ] |) |))) @@ -293,7 +316,7 @@ fn cook(chopped: Option) -> Option { chopped.map(|Chopped(food)| Cooked(food)) } *) -Definition cook (τ : list Ty.t) (α : list Value.t) : M := +Definition cook (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ chopped ] => ltac:(M.monadic @@ -311,8 +334,8 @@ Definition cook (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| chopped |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -328,11 +351,16 @@ Definition cook (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let food := M.copy (| γ0_0 |) in - Value.StructTuple "combinators_map::Cooked" [ M.read (| food |) ])) + M.of_value (| + Value.StructTuple + "combinators_map::Cooked" + [ A.to_value (M.read (| food |)) ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -345,7 +373,7 @@ fn process(food: Option) -> Option { .map(|Chopped(f)| Cooked(f)) } *) -Definition process (τ : list Ty.t) (α : list Value.t) : M := +Definition process (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ food ] => ltac:(M.monadic @@ -387,8 +415,8 @@ Definition process (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| food |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -398,15 +426,20 @@ Definition process (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let f := M.copy (| γ |) in - Value.StructTuple "combinators_map::Peeled" [ M.read (| f |) ])) + M.of_value (| + Value.StructTuple + "combinators_map::Peeled" + [ A.to_value (M.read (| f |)) ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -422,15 +455,20 @@ Definition process (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let f := M.copy (| γ0_0 |) in - Value.StructTuple "combinators_map::Chopped" [ M.read (| f |) ])) + M.of_value (| + Value.StructTuple + "combinators_map::Chopped" + [ A.to_value (M.read (| f |)) ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -446,11 +484,16 @@ Definition process (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let f := M.copy (| γ0_0 |) in - Value.StructTuple "combinators_map::Cooked" [ M.read (| f |) ])) + M.of_value (| + Value.StructTuple + "combinators_map::Cooked" + [ A.to_value (M.read (| f |)) ] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -464,7 +507,7 @@ fn eat(food: Option) { } } *) -Definition eat (τ : list Ty.t) (α : list Value.t) : M := +Definition eat (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ food ] => ltac:(M.monadic @@ -491,36 +534,44 @@ Definition eat (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Mmm. I love " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Mmm. I love " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "combinators_map::Cooked" ] - |), - [ food ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "combinators_map::Cooked" ] + |), + [ food ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -536,18 +587,26 @@ Definition eat (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Oh no! It wasn't edible. -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Oh no! It wasn't edible. +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -570,24 +629,31 @@ fn main() { eat(cooked_potato); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let apple := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "combinators_map::Food::Apple" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.StructTuple "combinators_map::Food::Apple" [] |)) + ] + |) |) in let carrot := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "combinators_map::Food::Carrot" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.StructTuple "combinators_map::Food::Carrot" [] |)) + ] + |) |) in - let potato := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let potato := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let cooked_apple := M.alloc (| M.call_closure (| @@ -650,7 +716,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| cooked_potato |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 398bfbb2b..18ef89a27 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 @@ -12,7 +12,7 @@ Module Impl_core_fmt_Debug_for_defining_an_error_type_DoubleError. Definition Self : Ty.t := Ty.path "defining_an_error_type::DoubleError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -20,7 +20,7 @@ Module Impl_core_fmt_Debug_for_defining_an_error_type_DoubleError. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "DoubleError" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "DoubleError" |) |) ] |))) | _, _ => M.impossible end. @@ -37,12 +37,12 @@ Module Impl_core_clone_Clone_for_defining_an_error_type_DoubleError. Definition Self : Ty.t := Ty.path "defining_an_error_type::DoubleError". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple "defining_an_error_type::DoubleError" [])) + M.of_value (| Value.StructTuple "defining_an_error_type::DoubleError" [] |))) | _, _ => M.impossible end. @@ -69,7 +69,7 @@ Module Impl_core_fmt_Display_for_defining_an_error_type_DoubleError. write!(f, "invalid first item to double") } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -83,10 +83,19 @@ Module Impl_core_fmt_Display_for_defining_an_error_type_DoubleError. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "invalid first item to double" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "invalid first item to double" |) + |)) + ] + |) + |) + |) ] |) ] @@ -115,7 +124,7 @@ fn double_first(vec: Vec<&str>) -> Result { }) } *) -Definition double_first (τ : list Ty.t) (α : list Value.t) : M := +Definition double_first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ vec ] => ltac:(M.monadic @@ -170,11 +179,11 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) ] |); - Value.StructTuple "defining_an_error_type::DoubleError" [] + M.of_value (| Value.StructTuple "defining_an_error_type::DoubleError" [] |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -218,8 +227,8 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| M.read (| s |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -228,17 +237,20 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (Value.StructTuple - "defining_an_error_type::DoubleError" - [])) + (M.of_value (| + Value.StructTuple + "defining_an_error_type::DoubleError" + [] + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -249,19 +261,22 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let i := M.copy (| γ |) in BinOp.Panic.mul (| - Value.Integer Integer.I32 2, + Integer.I32, + M.of_value (| Value.Integer 2 |), M.read (| i |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -275,7 +290,7 @@ fn print(result: Result) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -302,36 +317,46 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -350,36 +375,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "defining_an_error_type::DoubleError" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "defining_an_error_type::DoubleError" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -397,7 +430,7 @@ fn main() { print(double_first(strings)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -412,8 +445,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -427,16 +460,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "42" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "42" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -463,8 +499,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -478,16 +514,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -527,7 +566,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 8e014181d..131d04506 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 @@ -16,7 +16,7 @@ fn multiply(first_number_str: &str, second_number_str: &str) -> Result ltac:(M.monadic @@ -58,7 +58,11 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |) |) |) |) @@ -99,7 +103,11 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |) |) |) |) @@ -108,9 +116,18 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ BinOp.Panic.mul (| M.read (| first_number |), M.read (| second_number |) |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Panic.mul (| + Integer.I32, + M.read (| first_number |), + M.read (| second_number |) + |)) + ] + |) |) |))) |))) @@ -125,7 +142,7 @@ fn print(result: Result) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -152,34 +169,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "n is " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "n is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -198,36 +225,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "core::num::error::ParseIntError" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "core::num::error::ParseIntError" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -240,7 +275,7 @@ fn main() { print(multiply("t", "2")); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -252,7 +287,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "early_returns::multiply", [] |), - [ M.read (| Value.String "10" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "10" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) ] |) @@ -264,12 +302,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "early_returns::multiply", [] |), - [ M.read (| Value.String "t" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "t" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 56692dc27..37f327d6b 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 @@ -9,7 +9,7 @@ fn multiply(first_number_str: &str, second_number_str: &str) -> Result ltac:(M.monadic @@ -163,9 +163,18 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ BinOp.Panic.mul (| M.read (| first_number |), M.read (| second_number |) |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Panic.mul (| + Integer.I32, + M.read (| first_number |), + M.read (| second_number |) + |)) + ] + |) |) |))) |))) @@ -180,7 +189,7 @@ fn print(result: Result) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -207,34 +216,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "n is " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "n is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -253,36 +272,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "core::num::error::ParseIntError" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "core::num::error::ParseIntError" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -295,7 +322,7 @@ fn main() { print(multiply("t", "2")); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -307,7 +334,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "introducing_question_mark::multiply", [] |), - [ M.read (| Value.String "10" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "10" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) ] |) @@ -319,12 +349,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "introducing_question_mark::multiply", [] |), - [ M.read (| Value.String "t" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "t" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 60e9e0d3d..9f2f14ae0 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 @@ -9,7 +9,7 @@ fn multiply(first_number_str: &str, second_number_str: &str) -> Result ltac:(M.monadic @@ -51,20 +51,23 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "core::num::error::ParseIntError", - [ Ty.path "core::num::error::ParseIntError" ], - "from", - [] - |), - [ M.read (| err |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "core::num::error::ParseIntError", + [ Ty.path "core::num::error::ParseIntError" ], + "from", + [] + |), + [ M.read (| err |) ] + |)) + ] + |) |) |) |) @@ -105,20 +108,23 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple - "core::result::Result::Err" - [ - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "core::num::error::ParseIntError", - [ Ty.path "core::num::error::ParseIntError" ], - "from", - [] - |), - [ M.read (| err |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "core::num::error::ParseIntError", + [ Ty.path "core::num::error::ParseIntError" ], + "from", + [] + |), + [ M.read (| err |) ] + |)) + ] + |) |) |) |) @@ -127,9 +133,18 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ BinOp.Panic.mul (| M.read (| first_number |), M.read (| second_number |) |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Panic.mul (| + Integer.I32, + M.read (| first_number |), + M.read (| second_number |) + |)) + ] + |) |) |))) |))) @@ -144,7 +159,7 @@ fn print(result: Result) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -171,34 +186,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "n is " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "n is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -217,36 +242,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "core::num::error::ParseIntError" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "core::num::error::ParseIntError" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -259,7 +292,7 @@ fn main() { print(multiply("t", "2")); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -277,7 +310,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "introducing_question_mark_is_an_replacement_for_deprecated_try::multiply", [] |), - [ M.read (| Value.String "10" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "10" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) ] |) @@ -295,12 +331,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "introducing_question_mark_is_an_replacement_for_deprecated_try::multiply", [] |), - [ M.read (| Value.String "t" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "t" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 d27a83173..a938abaa3 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 @@ -12,7 +12,7 @@ fn main() { println!("Errors: {:?}", errors); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -27,8 +27,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -42,16 +42,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -130,8 +133,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| strings |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -152,7 +155,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.get_associated_function (| @@ -186,48 +190,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Numbers: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Numbers: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::vec::Vec") [ - Ty.path "i32"; - Ty.path "core::num::error::ParseIntError" - ]; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "i32"; + Ty.path "core::num::error::ParseIntError" + ]; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ numbers ] - |) - ] - |)) + |), + [ numbers ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -242,49 +254,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Errors: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Errors: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::vec::Vec") [ - Ty.path "i32"; - Ty.path "core::num::error::ParseIntError" - ]; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "i32"; + Ty.path "core::num::error::ParseIntError" + ]; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ errors ] - |) - ] - |)) + |), + [ errors ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 ea8c4ad34..f514d9aea 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 @@ -14,7 +14,7 @@ fn main() { println!("Errors: {:?}", errors); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -29,8 +29,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -44,16 +44,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -132,8 +135,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| strings |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -154,7 +157,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); M.get_associated_function (| @@ -365,40 +369,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Numbers: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Numbers: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ numbers ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ numbers ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -413,44 +425,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Errors: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Errors: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path "core::num::error::ParseIntError"; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "core::num::error::ParseIntError"; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ errors ] - |) - ] - |)) + |), + [ errors ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 3427fdcf8..8bcccb42c 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 @@ -14,7 +14,7 @@ fn main() { println!("Errors: {:?}", errors); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -29,8 +29,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -44,18 +44,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "42" |); - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "999" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "42" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "999" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -182,8 +185,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| strings |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -204,11 +207,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -248,8 +252,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| r |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -276,7 +280,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -284,7 +289,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -300,37 +306,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Numbers: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Numbers: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ numbers ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ numbers ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -341,41 +357,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Errors: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Errors: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path "core::num::error::ParseIntError"; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "core::num::error::ParseIntError"; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ errors ] - |) - ] - |)) + |), + [ errors ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 cde460028..76b8bd96d 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 @@ -8,7 +8,7 @@ fn main() { println!("Results: {:?}", numbers); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -23,8 +23,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -38,16 +38,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -115,8 +118,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| strings |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -137,7 +140,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -153,43 +157,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Results: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Results: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::result::Result") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ]; - Ty.path "core::num::error::ParseIntError" + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ]; + Ty.path "core::num::error::ParseIntError" + ] ] - ] - |), - [ numbers ] - |) - ] - |)) + |), + [ numbers ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 1388d0414..54ab735c0 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 @@ -8,7 +8,7 @@ fn main() { println!("Results: {:?}", numbers); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -23,8 +23,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -38,16 +38,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -115,8 +118,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| strings |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -137,7 +140,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -153,44 +157,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Results: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Results: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ Ty.apply - (Ty.path "core::result::Result") - [ Ty.path "i32"; Ty.path "core::num::error::ParseIntError" - ]; - Ty.path "alloc::alloc::Global" + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "i32"; + Ty.path "core::num::error::ParseIntError" + ]; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ numbers ] - |) - ] - |)) + |), + [ numbers ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 8400f305c..8aae899f8 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 @@ -11,7 +11,7 @@ fn main() { println!("Results: {:?}", numbers); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -26,8 +26,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -41,16 +41,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -107,8 +110,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| strings |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -141,7 +144,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -157,38 +161,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Results: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Results: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ numbers ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ numbers ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 123cac72f..330cdee4d 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 @@ -10,7 +10,7 @@ fn multiply(first_number_str: &str, second_number_str: &str) -> Result ltac:(M.monadic @@ -36,8 +36,8 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "str", "parse", [ Ty.path "i32" ] |), [ M.read (| first_number_str |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -67,8 +67,8 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| second_number_str |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -79,19 +79,22 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let second_number := M.copy (| γ |) in BinOp.Panic.mul (| + Integer.I32, M.read (| first_number |), M.read (| second_number |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -105,7 +108,7 @@ fn print(result: Result) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -132,34 +135,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "n is " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "n is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -178,36 +191,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "core::num::error::ParseIntError" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "core::num::error::ParseIntError" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -225,7 +246,7 @@ fn main() { print(tt); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -234,7 +255,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_combinators::multiply", [] |), - [ M.read (| Value.String "10" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "10" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) |) in let _ := @@ -248,7 +272,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_combinators::multiply", [] |), - [ M.read (| Value.String "t" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "t" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) |) in let _ := @@ -258,7 +285,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| tt_ |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 080411ab6..52e86e73b 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 @@ -12,7 +12,7 @@ fn multiply(first_number_str: &str, second_number_str: &str) -> Result ltac:(M.monadic @@ -50,14 +50,18 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := |) in let second_number := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - BinOp.Panic.mul (| - M.read (| first_number |), - M.read (| second_number |) - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Panic.mul (| + Integer.I32, + M.read (| first_number |), + M.read (| second_number |) + |)) + ] + |) |))); fun γ => ltac:(M.monadic @@ -69,7 +73,11 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := |) in let e := M.copy (| γ0_0 |) in M.alloc (| - Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |) |))) ] |))); @@ -78,7 +86,11 @@ Definition multiply (τ : 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 - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] |))) + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Err" [ A.to_value (M.read (| e |)) ] + |) + |))) ] |) |))) @@ -93,7 +105,7 @@ fn print(result: Result) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -120,34 +132,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "n is " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "n is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -166,36 +188,44 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "core::num::error::ParseIntError" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "core::num::error::ParseIntError" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -213,7 +243,7 @@ fn main() { print(tt); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -222,7 +252,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_match::multiply", [] |), - [ M.read (| Value.String "10" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "10" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) |) in let _ := @@ -236,7 +269,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_match::multiply", [] |), - [ M.read (| Value.String "t" |); M.read (| Value.String "2" |) ] + [ + M.read (| M.of_value (| Value.String "t" |) |); + M.read (| M.of_value (| Value.String "2" |) |) + ] |) |) in let _ := @@ -246,7 +282,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| tt_ |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 197245c09..a54d94bb5 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 @@ -7,7 +7,7 @@ fn double_first(vec: Vec<&str>) -> i32 { 2 * first.parse::().unwrap() // Generate error 2 } *) -Definition double_first (τ : list Ty.t) (α : list Value.t) : M := +Definition double_first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ vec ] => ltac:(M.monadic @@ -51,7 +51,8 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| BinOp.Panic.mul (| - Value.Integer Integer.I32 2, + Integer.I32, + M.of_value (| Value.Integer 2 |), M.call_closure (| M.get_associated_function (| Ty.apply @@ -88,7 +89,7 @@ fn main() { // Error 2: the element doesn't parse to a number } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -103,8 +104,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -118,16 +119,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "42" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "42" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -154,8 +158,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -169,16 +173,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -192,43 +199,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "multiple_error_types::double_first", [] |), - [ M.read (| numbers |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "multiple_error_types::double_first", + [] + |), + [ M.read (| numbers |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -239,43 +259,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "multiple_error_types::double_first", [] |), - [ M.read (| empty |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "multiple_error_types::double_first", + [] + |), + [ M.read (| empty |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -286,44 +319,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "multiple_error_types::double_first", [] |), - [ M.read (| strings |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "multiple_error_types::double_first", + [] + |), + [ M.read (| strings |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 cc09ba956..2193b2dfe 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 @@ -11,7 +11,7 @@ fn give_adult(drink: Option<&str>) { } } *) -Definition give_adult (τ : list Ty.t) (α : list Value.t) : M := +Definition give_adult (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ drink ] => ltac:(M.monadic @@ -39,17 +39,26 @@ Definition give_adult (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Yuck! Too sugary. -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Yuck! Too sugary. +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -68,36 +77,44 @@ Definition give_adult (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String "? How nice. -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "? How nice. +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ inner ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ inner ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -113,17 +130,26 @@ Definition give_adult (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "No drink? Oh well. -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "No drink? Oh well. +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -141,7 +167,7 @@ fn drink(drink: Option<&str>) { println!("I love {}s!!!!!", inside); } *) -Definition drink (τ : list Ty.t) (α : list Value.t) : M := +Definition drink (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ drink ] => ltac:(M.monadic @@ -162,7 +188,7 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -177,7 +203,7 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := "eq", [] |), - [ inside; Value.String "lemonade" ] + [ inside; M.of_value (| Value.String "lemonade" |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -188,11 +214,11 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "AAAaaaaa!!!!" |) ] + [ M.read (| M.of_value (| Value.String "AAAaaaaa!!!!" |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -205,37 +231,44 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "I love " |); - M.read (| Value.String "s!!!!! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "I love " |) |)); + A.to_value (M.read (| M.of_value (| Value.String "s!!!!! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ inside ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ inside ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -257,20 +290,29 @@ fn main() { drink(nothing); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let water := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| Value.String "water" |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.of_value (| Value.String "water" |) |)) ] + |) |) in let lemonade := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| Value.String "lemonade" |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.of_value (| Value.String "lemonade" |) |)) ] + |) |) in - let void := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let void := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -294,9 +336,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let coffee := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| Value.String "coffee" |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.of_value (| Value.String "coffee" |) |)) ] + |) |) in - let nothing := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let nothing := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -311,7 +358,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| nothing |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 a41fa7147..abcba2025 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 @@ -24,7 +24,7 @@ Module Impl_core_fmt_Debug_for_other_uses_of_question_mark_EmptyVec. Definition Self : Ty.t := Ty.path "other_uses_of_question_mark::EmptyVec". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -32,7 +32,7 @@ Module Impl_core_fmt_Debug_for_other_uses_of_question_mark_EmptyVec. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "EmptyVec" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "EmptyVec" |) |) ] |))) | _, _ => M.impossible end. @@ -53,7 +53,7 @@ Module Impl_core_fmt_Display_for_other_uses_of_question_mark_EmptyVec. write!(f, "invalid first item to double") } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -67,10 +67,19 @@ Module Impl_core_fmt_Display_for_other_uses_of_question_mark_EmptyVec. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "invalid first item to double" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "invalid first item to double" |) + |)) + ] + |) + |) + |) ] |) ] @@ -100,7 +109,7 @@ fn double_first(vec: Vec<&str>) -> Result { Ok(2 * parsed) } *) -Definition double_first (τ : list Ty.t) (α : list Value.t) : M := +Definition double_first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ vec ] => ltac:(M.monadic @@ -162,7 +171,9 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) ] |); - Value.StructTuple "other_uses_of_question_mark::EmptyVec" [] + M.of_value (| + Value.StructTuple "other_uses_of_question_mark::EmptyVec" [] + |) ] |) ] @@ -307,9 +318,18 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ BinOp.Panic.mul (| Value.Integer Integer.I32 2, M.read (| parsed |) |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Panic.mul (| + Integer.I32, + M.of_value (| Value.Integer 2 |), + M.read (| parsed |) + |)) + ] + |) |) |))) |))) @@ -324,7 +344,7 @@ fn print(result: Result) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -351,36 +371,46 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -399,43 +429,51 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", [ - Ty.dyn [ ("core::error::Error::Trait", []) ]; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn [ ("core::error::Error::Trait", []) ]; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ e ] - |) - ] - |)) + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -453,7 +491,7 @@ fn main() { print(double_first(strings)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -468,8 +506,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -483,16 +521,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "42" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "42" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -519,8 +560,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -534,16 +575,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -583,7 +627,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 c00a7471b..c9e20ef79 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/panic.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/panic.v @@ -11,7 +11,7 @@ fn drink(beverage: &str) { println!("Some refreshing {} is all I need.", beverage); } *) -Definition drink (τ : list Ty.t) (α : list Value.t) : M := +Definition drink (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ beverage ] => ltac:(M.monadic @@ -19,7 +19,7 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -34,7 +34,7 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := "eq", [] |), - [ beverage; Value.String "lemonade" ] + [ beverage; M.of_value (| Value.String "lemonade" |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -45,11 +45,11 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "AAAaaaaa!!!!" |) ] + [ M.read (| M.of_value (| Value.String "AAAaaaaa!!!!" |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -62,37 +62,46 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Some refreshing " |); - M.read (| Value.String " is all I need. -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Some refreshing " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " is all I need. +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ beverage ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ beverage ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103,7 +112,7 @@ fn main() { drink("lemonade"); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -112,17 +121,17 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "panic::drink", [] |), - [ M.read (| Value.String "water" |) ] + [ M.read (| M.of_value (| Value.String "water" |) |) ] |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "panic::drink", [] |), - [ M.read (| Value.String "lemonade" |) ] + [ M.read (| M.of_value (| Value.String "lemonade" |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 57cca0372..f2fab61a9 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 @@ -6,7 +6,7 @@ fn double_first(vec: Vec<&str>) -> Option> { vec.first().map(|first| first.parse::().map(|n| 2 * n)) } *) -Definition double_first (τ : list Ty.t) (α : list Value.t) : M := +Definition double_first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ vec ] => ltac:(M.monadic @@ -50,8 +50,8 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -81,8 +81,8 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| M.read (| first |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -93,19 +93,22 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let n := M.copy (| γ |) in BinOp.Panic.mul (| - Value.Integer Integer.I32 2, + Integer.I32, + M.of_value (| Value.Integer 2 |), M.read (| n |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) | _, _ => M.impossible @@ -126,7 +129,7 @@ fn main() { // Error 2: the element doesn't parse to a number } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -141,8 +144,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -156,16 +159,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "42" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "42" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -192,8 +198,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -207,16 +213,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -230,55 +239,67 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::option::Option") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ Ty.apply - (Ty.path "core::result::Result") - [ Ty.path "i32"; Ty.path "core::num::error::ParseIntError" + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "i32"; + Ty.path "core::num::error::ParseIntError" + ] ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "pulling_results_out_of_options::double_first", - [] - |), - [ M.read (| numbers |) ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "pulling_results_out_of_options::double_first", + [] + |), + [ M.read (| numbers |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -289,55 +310,67 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::option::Option") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ Ty.apply - (Ty.path "core::result::Result") - [ Ty.path "i32"; Ty.path "core::num::error::ParseIntError" + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "i32"; + Ty.path "core::num::error::ParseIntError" + ] ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "pulling_results_out_of_options::double_first", - [] - |), - [ M.read (| empty |) ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "pulling_results_out_of_options::double_first", + [] + |), + [ M.read (| empty |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -348,56 +381,68 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::option::Option") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ Ty.apply - (Ty.path "core::result::Result") - [ Ty.path "i32"; Ty.path "core::num::error::ParseIntError" + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "i32"; + Ty.path "core::num::error::ParseIntError" + ] ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "pulling_results_out_of_options::double_first", - [] - |), - [ M.read (| strings |) ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "pulling_results_out_of_options::double_first", + [] + |), + [ M.read (| strings |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 7d9a6581f..1b395ddbd 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 @@ -8,7 +8,7 @@ fn double_first(vec: Vec<&str>) -> Result, ParseIntError> { opt.map_or(Ok(None), |r| r.map(Some)) } *) -Definition double_first (τ : list Ty.t) (α : list Value.t) : M := +Definition double_first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ vec ] => ltac:(M.monadic @@ -59,8 +59,8 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -90,8 +90,8 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| M.read (| first |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -102,19 +102,22 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let n := M.copy (| γ |) in BinOp.Panic.mul (| - Value.Integer Integer.I32 2, + Integer.I32, + M.of_value (| Value.Integer 2 |), M.read (| n |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -155,11 +158,14 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| opt |); - Value.StructTuple - "core::result::Result::Ok" - [ Value.StructTuple "core::option::Option::None" [] ]; - M.closure - (fun γ => + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.StructTuple "core::option::Option::None" [] |)) + ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -184,13 +190,14 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| r |); - M.constructor_as_closure "core::option::Option::Some" + M.constructor_as_closure (| "core::option::Option::Some" |) ] |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) @@ -209,7 +216,7 @@ fn main() { println!("The first doubled is {:?}", double_first(strings)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -224,8 +231,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -239,16 +246,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "42" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "42" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -275,8 +285,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -290,16 +300,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -313,53 +326,65 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::result::Result") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ]; - Ty.path "core::num::error::ParseIntError" + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "i32" ]; + Ty.path "core::num::error::ParseIntError" + ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "pulling_results_out_of_options_with_stop_error_processing::double_first", - [] - |), - [ M.read (| numbers |) ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "pulling_results_out_of_options_with_stop_error_processing::double_first", + [] + |), + [ M.read (| numbers |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -370,53 +395,65 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::result::Result") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ]; - Ty.path "core::num::error::ParseIntError" + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "i32" ]; + Ty.path "core::num::error::ParseIntError" + ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "pulling_results_out_of_options_with_stop_error_processing::double_first", - [] - |), - [ M.read (| empty |) ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "pulling_results_out_of_options_with_stop_error_processing::double_first", + [] + |), + [ M.read (| empty |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -427,54 +464,66 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::result::Result") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ]; - Ty.path "core::num::error::ParseIntError" + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "i32" ]; + Ty.path "core::num::error::ParseIntError" + ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "pulling_results_out_of_options_with_stop_error_processing::double_first", - [] - |), - [ M.read (| strings |) ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "pulling_results_out_of_options_with_stop_error_processing::double_first", + [] + |), + [ M.read (| strings |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 37f46f134..6990f4c05 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 @@ -12,14 +12,14 @@ fn main() -> Result<(), ParseIntError> { Ok(()) } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.catch_return (| ltac:(M.monadic (M.read (| - let number_str := M.copy (| Value.String "10" |) in + let number_str := M.copy (| M.of_value (| Value.String "10" |) |) in let number := M.copy (| M.match_operator (| @@ -53,7 +53,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.never_to_any (| M.read (| M.return_ (| - Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |) |) |) |) @@ -75,34 +79,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ number ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ number ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) |))) |))) | _, _ => M.impossible 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 888ab5f75..08d01764a 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 @@ -40,7 +40,7 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_ Definition Self : Ty.t := Ty.path "unpacking_options_and_defaults_via_get_or_insert::Fruit". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -57,23 +57,23 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_ fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Apple" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Apple" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Orange" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Orange" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Banana" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Banana" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Kiwi" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Kiwi" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Lemon" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Lemon" |) |) |))) ] |) |) @@ -103,15 +103,18 @@ fn main() { // TODO: uncomment the line above to see the compiler error } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let my_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let my_fruit := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let apple := M.alloc (| - Value.StructTuple "unpacking_options_and_defaults_via_get_or_insert::Fruit::Apple" [] + M.of_value (| + Value.StructTuple "unpacking_options_and_defaults_via_get_or_insert::Fruit::Apple" [] + |) |) in let first_available_fruit := M.alloc (| @@ -136,43 +139,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "my_fruit is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "my_fruit is: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&mut") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path - "unpacking_options_and_defaults_via_get_or_insert::Fruit" + Ty.apply + (Ty.path "&mut") + [ + Ty.path + "unpacking_options_and_defaults_via_get_or_insert::Fruit" + ] ] - ] - |), - [ first_available_fruit ] - |) - ] - |)) + |), + [ first_available_fruit ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -183,44 +194,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "first_available_fruit is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "first_available_fruit is: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&mut") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path - "unpacking_options_and_defaults_via_get_or_insert::Fruit" + Ty.apply + (Ty.path "&mut") + [ + Ty.path + "unpacking_options_and_defaults_via_get_or_insert::Fruit" + ] ] - ] - |), - [ first_available_fruit ] - |) - ] - |)) + |), + [ first_available_fruit ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 016588f2a..2d1215bcc 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 @@ -40,7 +40,7 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_ Definition Self : Ty.t := Ty.path "unpacking_options_and_defaults_via_get_or_insert_with::Fruit". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -57,23 +57,23 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_ fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Apple" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Apple" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Orange" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Orange" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Banana" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Banana" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Kiwi" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Kiwi" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Lemon" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Lemon" |) |) |))) ] |) |) @@ -114,16 +114,17 @@ fn main() { // my_apple is unchanged: Some(Apple) } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let my_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let my_fruit := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let get_lemon_as_fallback := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -147,32 +148,42 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "Providing lemon as fallback + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Providing lemon as fallback " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| - Value.StructTuple - "unpacking_options_and_defaults_via_get_or_insert_with::Fruit::Lemon" - [] + M.of_value (| + Value.StructTuple + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit::Lemon" + [] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let first_available_fruit := M.alloc (| @@ -201,43 +212,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "my_fruit is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "my_fruit is: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&mut") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path - "unpacking_options_and_defaults_via_get_or_insert_with::Fruit" + Ty.apply + (Ty.path "&mut") + [ + Ty.path + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit" + ] ] - ] - |), - [ first_available_fruit ] - |) - ] - |)) + |), + [ first_available_fruit ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -248,52 +267,67 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "first_available_fruit is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "first_available_fruit is: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&mut") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path - "unpacking_options_and_defaults_via_get_or_insert_with::Fruit" + Ty.apply + (Ty.path "&mut") + [ + Ty.path + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit" + ] ] - ] - |), - [ first_available_fruit ] - |) - ] - |)) + |), + [ first_available_fruit ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let my_apple := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "unpacking_options_and_defaults_via_get_or_insert_with::Fruit::Apple" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit::Apple" + [] + |)) + ] + |) |) in let should_be_apple := M.alloc (| @@ -322,43 +356,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "should_be_apple is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "should_be_apple is: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&mut") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path - "unpacking_options_and_defaults_via_get_or_insert_with::Fruit" + Ty.apply + (Ty.path "&mut") + [ + Ty.path + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit" + ] ] - ] - |), - [ should_be_apple ] - |) - ] - |)) + |), + [ should_be_apple ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -369,44 +413,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "my_apple is unchanged: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "my_apple is unchanged: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::option::Option") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path - "unpacking_options_and_defaults_via_get_or_insert_with::Fruit" + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.path + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit" + ] ] - ] - |), - [ my_apple ] - |) - ] - |)) + |), + [ my_apple ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 15da2a247..374f25623 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 @@ -40,7 +40,7 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_Fruit. Definition Self : Ty.t := Ty.path "unpacking_options_and_defaults_via_or::Fruit". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -57,23 +57,23 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_Fruit. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Apple" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Apple" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Orange" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Orange" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Banana" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Banana" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Kiwi" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Kiwi" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Lemon" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Lemon" |) |) |))) ] |) |) @@ -107,24 +107,39 @@ fn main() { // TODO: uncomment the line above to see the compiler error } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let apple := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "unpacking_options_and_defaults_via_or::Fruit::Apple" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple "unpacking_options_and_defaults_via_or::Fruit::Apple" [] + |)) + ] + |) |) in let orange := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "unpacking_options_and_defaults_via_or::Fruit::Orange" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple "unpacking_options_and_defaults_via_or::Fruit::Orange" [] + |)) + ] + |) |) in - let no_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let no_fruit := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let first_available_fruit := M.alloc (| M.call_closure (| @@ -160,41 +175,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "first_available_fruit: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "first_available_fruit: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "unpacking_options_and_defaults_via_or::Fruit" ] - ] - |), - [ first_available_fruit ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "unpacking_options_and_defaults_via_or::Fruit" ] + ] + |), + [ first_available_fruit ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 cb5808d6d..4af4b16b1 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 @@ -40,7 +40,7 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_else_Fruit. Definition Self : Ty.t := Ty.path "unpacking_options_and_defaults_via_or_else::Fruit". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -57,23 +57,23 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_else_Fruit. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Apple" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Apple" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Orange" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Orange" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Banana" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Banana" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Kiwi" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "Kiwi" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "Lemon" |) |))) + M.alloc (| M.read (| M.of_value (| Value.String "Lemon" |) |) |))) ] |) |) @@ -111,22 +111,32 @@ fn main() { // first_available_fruit: Some(Kiwi) } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let apple := M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ Value.StructTuple "unpacking_options_and_defaults_via_or_else::Fruit::Apple" [] ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + 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 no_fruit := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let get_kiwi_as_fallback := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -150,41 +160,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "Providing kiwi as fallback + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Providing kiwi as fallback " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "unpacking_options_and_defaults_via_or_else::Fruit::Kiwi" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "unpacking_options_and_defaults_via_or_else::Fruit::Kiwi" + [] + |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let get_lemon_as_fallback := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -208,36 +231,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "Providing lemon as fallback + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Providing lemon as fallback " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructTuple - "unpacking_options_and_defaults_via_or_else::Fruit::Lemon" - [] - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "unpacking_options_and_defaults_via_or_else::Fruit::Lemon" + [] + |)) + ] + |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let first_available_fruit := M.alloc (| @@ -286,42 +322,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "first_available_fruit: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "first_available_fruit: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.path "unpacking_options_and_defaults_via_or_else::Fruit" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.path + "unpacking_options_and_defaults_via_or_else::Fruit" + ] ] - ] - |), - [ first_available_fruit ] - |) - ] - |)) + |), + [ first_available_fruit ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 f2238a0a2..a962fd814 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 @@ -16,19 +16,19 @@ Module Impl_core_clone_Clone_for_unpacking_options_via_question_mark_PhoneNumber Definition Self : Ty.t := Ty.path "unpacking_options_via_question_mark::PhoneNumber". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -69,14 +69,14 @@ Module Impl_core_clone_Clone_for_unpacking_options_via_question_mark_Job. Definition Self : Ty.t := Ty.path "unpacking_options_via_question_mark::Job". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -122,7 +122,7 @@ Module Impl_unpacking_options_via_question_mark_Person. self.job?.phone_number?.area_code } *) - Definition work_phone_area_code (τ : list Ty.t) (α : list Value.t) : M := + Definition work_phone_area_code (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -292,60 +292,94 @@ fn main() { assert_eq!(p.work_phone_area_code(), Some(61)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let p := M.alloc (| - Value.StructRecord - "unpacking_options_via_question_mark::Person" - [ - ("job", - Value.StructTuple - "core::option::Option::Some" - [ - Value.StructRecord - "unpacking_options_via_question_mark::Job" - [ - ("phone_number", - Value.StructTuple - "core::option::Option::Some" - [ + M.of_value (| + Value.StructRecord + "unpacking_options_via_question_mark::Person" + [ + ("job", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| Value.StructRecord - "unpacking_options_via_question_mark::PhoneNumber" + "unpacking_options_via_question_mark::Job" [ - ("area_code", - Value.StructTuple - "core::option::Option::Some" - [ Value.Integer Integer.U8 61 ]); - ("number", Value.Integer Integer.U32 439222222) + ("phone_number", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "unpacking_options_via_question_mark::PhoneNumber" + [ + ("area_code", + A.to_value + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Integer 61 + |)) + ] + |))); + ("number", + A.to_value + (M.of_value (| + Value.Integer 439222222 + |))) + ] + |)) + ] + |))) ] - ]) - ] - ]) - ] + |)) + ] + |))) + ] + |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "unpacking_options_via_question_mark::Person", - "work_phone_area_code", - [] - |), - [ p ] - |) - |); - M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.U8 61 ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "unpacking_options_via_question_mark::Person", + "work_phone_area_code", + [] + |), + [ p ] + |) + |)); + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 61 |)) ] + |) + |)) + ] + |) |), [ fun γ => @@ -355,15 +389,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply (Ty.path "core::option::Option") [ Ty.path "u8" ], @@ -373,7 +407,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -382,7 +417,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -397,19 +434,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 8bf609cd1..3e46fa606 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 @@ -25,7 +25,7 @@ Module Impl_core_fmt_Debug_for_wrapping_errors_DoubleError. Definition Self : Ty.t := Ty.path "wrapping_errors::DoubleError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -45,7 +45,7 @@ Module Impl_core_fmt_Debug_for_wrapping_errors_DoubleError. "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "EmptyVec" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "EmptyVec" |) |) ] |) |))); fun γ => @@ -67,8 +67,8 @@ Module Impl_core_fmt_Debug_for_wrapping_errors_DoubleError. |), [ M.read (| f |); - M.read (| Value.String "Parse" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Parse" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -104,7 +104,7 @@ Module Impl_core_fmt_Display_for_wrapping_errors_DoubleError. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -133,15 +133,22 @@ Module Impl_core_fmt_Display_for_wrapping_errors_DoubleError. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "please use a vector with at least one element" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "please use a vector with at least one element" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -166,15 +173,22 @@ Module Impl_core_fmt_Display_for_wrapping_errors_DoubleError. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "the provided string could not be parsed as int" - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "the provided string could not be parsed as int" + |) + |)) + ] + |) + |) + |) ] |) ] @@ -208,7 +222,7 @@ Module Impl_core_error_Error_for_wrapping_errors_DoubleError. } } *) - Definition source (τ : list Ty.t) (α : list Value.t) : M := + Definition source (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -218,7 +232,10 @@ 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 + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -229,9 +246,11 @@ Module Impl_core_error_Error_for_wrapping_errors_DoubleError. |) in let e := M.alloc (| γ0_0 |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ (* Unsize *) M.pointer_coercion (M.read (| e |)) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (* Unsize *) (M.pointer_coercion (| M.read (| e |) |)) ] + |) |))) ] |) @@ -255,12 +274,14 @@ Module Impl_core_convert_From_core_num_error_ParseIntError_for_wrapping_errors_D DoubleError::Parse(err) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ err ] => ltac:(M.monadic (let err := M.alloc (| err |) in - Value.StructTuple "wrapping_errors::DoubleError::Parse" [ M.read (| err |) ])) + M.of_value (| + Value.StructTuple "wrapping_errors::DoubleError::Parse" [ A.to_value (M.read (| err |)) ] + |))) | _, _ => M.impossible end. @@ -282,7 +303,7 @@ fn double_first(vec: Vec<&str>) -> Result { Ok(2 * parsed) } *) -Definition double_first (τ : list Ty.t) (α : list Value.t) : M := +Definition double_first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ vec ] => ltac:(M.monadic @@ -344,7 +365,9 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) ] |); - Value.StructTuple "wrapping_errors::DoubleError::EmptyVec" [] + M.of_value (| + Value.StructTuple "wrapping_errors::DoubleError::EmptyVec" [] + |) ] |) ] @@ -473,9 +496,18 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ BinOp.Panic.mul (| Value.Integer Integer.I32 2, M.read (| parsed |) |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Panic.mul (| + Integer.I32, + M.of_value (| Value.Integer 2 |), + M.read (| parsed |) + |)) + ] + |) |) |))) |))) @@ -495,7 +527,7 @@ fn print(result: Result) { } } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ result ] => ltac:(M.monadic @@ -522,36 +554,46 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The first doubled is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The first doubled is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -571,38 +613,46 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Error: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Error: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "wrapping_errors::DoubleError" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "wrapping_errors::DoubleError" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -640,43 +690,56 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String " Caused by: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String " Caused by: " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.dyn [ ("core::error::Error::Trait", []) ] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ + Ty.dyn + [ ("core::error::Error::Trait", []) ] + ] ] - ] - |), - [ source ] - |) - ] - |)) + |), + [ source ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -696,7 +759,7 @@ fn main() { print(double_first(strings)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -711,8 +774,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -726,16 +789,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "42" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "42" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -762,8 +828,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -777,16 +843,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "tofu" |); - M.read (| Value.String "93" |); - M.read (| Value.String "18" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "tofu" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "93" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "18" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -826,7 +895,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/expressions/blocks.v b/CoqOfRust/examples/default/examples/rust_book/expressions/blocks.v index ccb882c13..64342e441 100644 --- a/CoqOfRust/examples/default/examples/rust_book/expressions/blocks.v +++ b/CoqOfRust/examples/default/examples/rust_book/expressions/blocks.v @@ -23,20 +23,24 @@ fn main() { println!("z is {:?}", z); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.U32 5 |) in + let x := M.alloc (| M.of_value (| Value.Integer 5 |) |) in let y := M.copy (| - let x_squared := M.alloc (| BinOp.Panic.mul (| M.read (| x |), M.read (| x |) |) |) in + 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 (| M.read (| x_squared |), M.read (| x |) |) |) in + M.alloc (| + BinOp.Panic.mul (| Integer.U32, M.read (| x_squared |), M.read (| x |) |) + |) in M.alloc (| BinOp.Panic.add (| - BinOp.Panic.add (| M.read (| x_cube |), M.read (| x_squared |) |), + Integer.U32, + BinOp.Panic.add (| Integer.U32, M.read (| x_cube |), M.read (| x_squared |) |), M.read (| x |) |) |) @@ -44,8 +48,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let z := M.copy (| let _ := - M.alloc (| BinOp.Panic.mul (| Value.Integer Integer.U32 2, M.read (| x |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + BinOp.Panic.mul (| Integer.U32, M.of_value (| Value.Integer 2 |), M.read (| x |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) in let _ := let _ := @@ -57,33 +63,43 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "x is " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "x is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ x ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -94,33 +110,43 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "y is " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "y is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ y ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ y ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -131,34 +157,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "z is " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "z is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.tuple [] ] - |), - [ z ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.tuple [] ] + |), + [ z ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/expressions/const_underscore_expression.v b/CoqOfRust/examples/default/examples/rust_book/expressions/const_underscore_expression.v index c607721c3..60ade8995 100644 --- a/CoqOfRust/examples/default/examples/rust_book/expressions/const_underscore_expression.v +++ b/CoqOfRust/examples/default/examples/rust_book/expressions/const_underscore_expression.v @@ -16,7 +16,7 @@ Module underscore. self.test } *) - Definition show (τ : list Ty.t) (α : list Value.t) : M := + Definition show (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic diff --git a/CoqOfRust/examples/default/examples/rust_book/expressions/statement.v b/CoqOfRust/examples/default/examples/rust_book/expressions/statement.v index d8689eab8..0eeada465 100644 --- a/CoqOfRust/examples/default/examples/rust_book/expressions/statement.v +++ b/CoqOfRust/examples/default/examples/rust_book/expressions/statement.v @@ -8,5 +8,8 @@ fn main() { // statement } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition main (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. 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 cd02af4df..22b178aa9 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 @@ -12,16 +12,19 @@ fn main() { 15; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.I32 5 |) in + let x := M.alloc (| M.of_value (| Value.Integer 5 |) |) in let _ := x in - let _ := M.alloc (| BinOp.Panic.add (| M.read (| x |), Value.Integer Integer.I32 1 |) |) in - let _ := M.alloc (| Value.Integer Integer.I32 15 |) in - M.alloc (| Value.Tuple [] |) + let _ := + M.alloc (| + BinOp.Panic.add (| Integer.I32, M.read (| x |), M.of_value (| Value.Integer 1 |) |) + |) in + let _ := M.alloc (| M.of_value (| Value.Integer 15 |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 09008c3e3..6ab67d8e9 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 @@ -16,7 +16,7 @@ fn main() { // FIXME ^ Comment out this line } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -31,8 +31,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -46,16 +46,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "Bob" |); - M.read (| Value.String "Frank" |); - M.read (| Value.String "Ferris" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Bob" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "Frank" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "Ferris" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -150,23 +153,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "There is a rustacean among us! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "There is a rustacean among us! " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -182,45 +191,61 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Hello " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Hello " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "str" ] - ] - |), - [ name ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "str" ] + ] + |), + [ name ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 5d2177f41..bce7f9cdf 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 @@ -16,7 +16,7 @@ fn main() { println!("names: {:?}", names); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -31,8 +31,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -46,16 +46,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "Bob" |); - M.read (| Value.String "Frank" |); - M.read (| Value.String "Ferris" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Bob" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "Frank" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "Ferris" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -160,23 +163,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "There is a rustacean among us! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "There is a rustacean among us! " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -192,49 +201,67 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Hello " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Hello " + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", [ Ty.apply (Ty.path "&") - [ Ty.path "str" ] + [ + Ty.apply + (Ty.path "&") + [ Ty.path "str" ] + ] ] - ] - |), - [ name ] - |) - ] - |)) + |), + [ name ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -248,41 +275,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "names: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "names: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply (Ty.path "&") [ Ty.path "str" ]; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "str" ]; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ names ] - |) - ] - |)) + |), + [ names ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 f7129559d..005e6aaec 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 @@ -15,7 +15,7 @@ fn main() { println!("names: {:?}", names); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -30,8 +30,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -45,16 +45,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - M.read (| Value.String "Bob" |); - M.read (| Value.String "Frank" |); - M.read (| Value.String "Ferris" |) - ] + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Bob" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "Frank" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "Ferris" |) |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -151,19 +154,23 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| M.read (| - Value.String "There is a rustacean among us!" + M.of_value (| + Value.String "There is a rustacean among us!" + |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "Hello" |) |))) + (M.alloc (| + M.read (| M.of_value (| Value.String "Hello" |) |) + |))) ] |) |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -177,41 +184,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "names: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "names: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply (Ty.path "&") [ Ty.path "str" ]; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "str" ]; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ names ] - |) - ] - |)) + |), + [ names ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 f7aec2ae5..be2af2b32 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 @@ -17,7 +17,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -40,7 +40,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.I32 1; Value.Integer Integer.I32 100 ] + [ M.of_value (| Value.Integer 1 |); M.of_value (| Value.Integer 100 |) ] |) ] |) @@ -81,19 +81,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| n |), - Value.Integer Integer.I32 15 - |)) - (Value.Integer Integer.I32 0) + M.of_value (| Value.Integer 15 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -114,36 +116,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "fizzbuzz -" |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "fizzbuzz +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| n |), - Value.Integer Integer.I32 3 - |)) - (Value.Integer Integer.I32 0) + M.of_value (| Value.Integer 3 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -167,39 +180,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "fizz + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "fizz " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| n |), - Value.Integer Integer.I32 5 - |)) - (Value.Integer Integer.I32 0) + M.of_value (| Value.Integer 5 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -224,23 +245,34 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "buzz + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "buzz " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -261,42 +293,64 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "" - |); - M.read (| - Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + " " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "i32" + ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] @@ -305,7 +359,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 640e02b32..143ee72db 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 @@ -17,7 +17,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -34,12 +34,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.I32 1); - ("end_", Value.Integer Integer.I32 101) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 101 |))) + ] + |) ] |) |), @@ -77,19 +79,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let n := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| n |), - Value.Integer Integer.I32 15 - |)) - (Value.Integer Integer.I32 0) + M.of_value (| Value.Integer 15 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -110,36 +114,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "fizzbuzz -" |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "fizzbuzz +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| n |), - Value.Integer Integer.I32 3 - |)) - (Value.Integer Integer.I32 0) + M.of_value (| Value.Integer 3 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -163,39 +178,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "fizz + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "fizz " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| n |), - Value.Integer Integer.I32 5 - |)) - (Value.Integer Integer.I32 0) + M.of_value (| Value.Integer 5 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -220,23 +243,34 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "buzz + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "buzz " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); fun γ => ltac:(M.monadic (let _ := @@ -257,42 +291,64 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "" - |); - M.read (| - Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + " " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "i32" + ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) ] |))) ] @@ -301,7 +357,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 a40877035..2b476897e 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 @@ -30,22 +30,22 @@ fn main() { println!("{} -> {}", n, big_n); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let n := M.alloc (| Value.Integer Integer.I32 5 |) in + let n := M.alloc (| M.of_value (| Value.Integer 5 |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| n |)) (Value.Integer Integer.I32 0) + BinOp.Pure.lt (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := @@ -62,47 +62,58 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " is negative" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " is negative" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| n |)) (Value.Integer Integer.I32 0) + BinOp.Pure.gt (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -120,36 +131,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " is positive" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " is positive" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -166,36 +188,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " is zero" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " is zero" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -203,7 +236,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let big_n := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -211,9 +244,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| LogicalOp.and (| - BinOp.Pure.lt (M.read (| n |)) (Value.Integer Integer.I32 10), + BinOp.Pure.lt (| M.read (| n |), M.of_value (| Value.Integer 10 |) |), ltac:(M.monadic - (BinOp.Pure.gt (M.read (| n |)) (Value.Integer Integer.I32 (-10)))) + (BinOp.Pure.gt (| + M.read (| n |), + M.of_value (| Value.Integer (-10) |) + |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -231,25 +267,35 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - ", and is a small number, increase ten-fold + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + ", and is a small number, increase ten-fold " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| - BinOp.Panic.mul (| Value.Integer Integer.I32 10, M.read (| n |) |) + BinOp.Panic.mul (| + Integer.I32, + M.of_value (| Value.Integer 10 |), + M.read (| n |) + |) |))); fun γ => ltac:(M.monadic @@ -267,24 +313,35 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String ", and is a big number, halve the number + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + ", and is a big number, halve the number " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| - BinOp.Panic.div (| M.read (| n |), Value.Integer Integer.I32 2 |) + BinOp.Panic.div (| + Integer.I32, + M.read (| n |), + M.of_value (| Value.Integer 2 |) + |) |))) ] |) @@ -299,46 +356,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " -> " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " -> " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ big_n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ big_n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 4890d7f78..bee7dedc1 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 @@ -37,20 +37,26 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let number := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 7 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| 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 letter := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in + let emoticon := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -72,43 +78,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Matched " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Matched " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -130,37 +145,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Matched " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Matched " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -177,29 +201,35 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "Didn't match a number. Let's go with a letter! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Didn't match a number. Let's go with a letter! " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let i_like_letters := M.alloc (| Value.Bool false |) in + let i_like_letters := M.alloc (| M.of_value (| Value.Bool false |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -221,41 +251,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Matched " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Matched " |) |)); + A.to_value (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -276,24 +314,30 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "Didn't match a number. Let's go with a letter! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Didn't match a number. Let's go with a letter! " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -310,24 +354,30 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "I don't like letters. Let's go with an emoticon :)! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "I don't like letters. Let's go with an emoticon :)! " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] 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 2ef138a17..7a732dbdc 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 @@ -27,14 +27,14 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.StructTuple "if_let_challenge::Foo::Bar" [] |) in + let a := M.alloc (| M.of_value (| Value.StructTuple "if_let_challenge::Foo::Bar" [] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -53,19 +53,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "a is foobar -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "a is foobar +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 718bc579b..b23aeddeb 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 @@ -18,14 +18,18 @@ fn main() { }; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let optional := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 7 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 7 |)) ] + |) |) in let _ := M.match_operator (| @@ -50,43 +54,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "This is a really long string and `" - |); - M.read (| Value.String "` -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "This is a really long string and `" + |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String "` +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 6a02b03f9..02737d371 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 @@ -56,20 +56,30 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => 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 a := + M.alloc (| + M.of_value (| Value.StructTuple "if_let_match_enum_values::Foo::Bar" [] |) + |) in + let b := + M.alloc (| + M.of_value (| 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 Integer.U32 100 ] + M.of_value (| + Value.StructTuple + "if_let_match_enum_values::Foo::Qux" + [ A.to_value (M.of_value (| Value.Integer 100 |)) ] + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -88,24 +98,33 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "a is foobar -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "a is foobar +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -124,24 +143,33 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "b is foobar -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "b is foobar +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -167,42 +195,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "c is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "c is " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ value ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ value ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -214,11 +251,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let value := M.copy (| γ0_0 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U32 100 - |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 100 |) in let _ := let _ := M.alloc (| @@ -233,19 +266,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "c is one hundred -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "c is one hundred +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 4403b3f19..73d4b6375 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 @@ -29,12 +29,12 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let count := M.alloc (| Value.Integer Integer.U32 0 |) in + let count := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := let _ := M.alloc (| @@ -45,32 +45,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Let's count until infinity! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Let's count until infinity! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.loop (| ltac:(M.monadic (let _ := let β := count in - M.write (| β, BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.U32 1 |) |) in + M.write (| + β, + BinOp.Panic.add (| Integer.U32, M.read (| β |), M.of_value (| Value.Integer 1 |) |) + |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| count |)) (Value.Integer Integer.U32 3) + BinOp.Pure.eq (| M.read (| count |), M.of_value (| Value.Integer 3 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -90,22 +102,31 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "three -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "three +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.continue (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -122,42 +143,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ count ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ count ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| count |)) (Value.Integer Integer.U32 5) + BinOp.Pure.eq (| M.read (| count |), M.of_value (| Value.Integer 5 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -177,23 +208,33 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "OK, that's enough -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "OK, that's enough +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) 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 25ba47f8f..1bf64a982 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 @@ -22,7 +22,7 @@ fn main() { println!("Exited the outer loop"); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -44,17 +44,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Entered the outer loop -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Entered the outer loop +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.never_to_any (| @@ -75,19 +84,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Entered the inner loop -" |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Entered the inner loop +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.break (||))) |) |) @@ -107,19 +125,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "This point will never be reached -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "This point will never be reached +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |) in let _ := let _ := @@ -131,18 +159,27 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Exited the outer loop -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Exited the outer loop +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 c9a1e49cc..08f718583 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 @@ -16,12 +16,12 @@ fn main() { assert_eq!(result, 20); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let counter := M.alloc (| Value.Integer Integer.I32 0 |) in + let counter := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let result := M.copy (| M.loop (| @@ -30,29 +30,42 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let β := counter in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I32 1 |) + BinOp.Panic.add (| + Integer.I32, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| counter |)) (Value.Integer Integer.I32 10) + BinOp.Pure.eq (| + M.read (| counter |), + M.of_value (| Value.Integer 10 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ result; M.alloc (| Value.Integer Integer.I32 20 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value result; A.to_value (M.alloc (| M.of_value (| Value.Integer 20 |) |)) + ] + |) + |), [ fun γ => ltac:(M.monadic @@ -61,17 +74,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -80,7 +95,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -92,19 +109,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 d32a2aac2..aee81922a 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 @@ -32,12 +32,12 @@ fn main() { println!("{} -> {}", boolean, binary); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let number := M.alloc (| Value.Integer Integer.I32 13 |) in + let number := M.alloc (| M.of_value (| Value.Integer 13 |) |) in let _ := let _ := M.alloc (| @@ -48,47 +48,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Tell me about " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Tell me about " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ number ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ number ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| number, [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I32 1 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in let _ := M.alloc (| M.call_closure (| @@ -102,15 +106,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "One! -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "One! +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.find_or_pattern (| @@ -119,46 +132,31 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I32 2 - |) in - Value.Tuple [])); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 2 |) in + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I32 3 - |) in - Value.Tuple [])); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 3 |) in + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I32 5 - |) in - Value.Tuple [])); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 5 |) in + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I32 7 - |) in - Value.Tuple [])); + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 7 |) in + M.of_value (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.I32 11 - |) in - Value.Tuple [])) + M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 11 |) in + M.of_value (| Value.Tuple [] |))) ], - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [] => @@ -175,20 +173,31 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "This is a prime -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "This is a prime +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) | _ => M.impossible (||) - end)) + end) + |) |))); fun γ => ltac:(M.monadic @@ -205,15 +214,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "A teen -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "A teen +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -229,20 +247,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Ain't special -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Ain't special +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let boolean := M.alloc (| Value.Bool true |) in + let boolean := M.alloc (| M.of_value (| Value.Bool true |) |) in let binary := M.copy (| M.match_operator (| @@ -251,11 +278,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool false |) in - M.alloc (| Value.Integer Integer.I32 0 |))); + M.alloc (| M.of_value (| Value.Integer 0 |) |))); fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.Integer Integer.I32 1 |))) + M.alloc (| M.of_value (| Value.Integer 1 |) |))) ] |) |) in @@ -269,46 +296,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " -> " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " -> " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ boolean ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ binary ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ boolean ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ binary ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 1827a8fd2..d6798c095 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 @@ -6,9 +6,9 @@ fn age() -> u32 { 15 } *) -Definition age (τ : list Ty.t) (α : list Value.t) : M := +Definition age (τ : list Ty.t) (α : list A.t) : M := match τ, α with - | [], [] => ltac:(M.monadic (Value.Integer Integer.U32 15)) + | [], [] => ltac:(M.monadic (M.of_value (| Value.Integer 15 |))) | _, _ => M.impossible end. @@ -28,7 +28,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -43,25 +43,34 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Tell me what type of person you are -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Tell me what type of person you are +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| M.alloc (| M.call_closure (| M.get_function (| "match_binding::age", [] |), [] |) |), [ fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| M.read (| γ |), Value.Integer Integer.U32 0 |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in let _ := M.alloc (| M.call_closure (| @@ -75,22 +84,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "I haven't celebrated my first birthday yet + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "I haven't celebrated my first birthday yet " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in @@ -107,36 +123,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "I'm a child of age " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "I'm a child of age " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in @@ -153,36 +179,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "I'm a teen of age " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "I'm a teen of age " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in @@ -199,36 +235,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "I'm an old person of age " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "I'm an old person of age " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 20a10eb04..f8fc51a1a 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 @@ -6,11 +6,15 @@ fn some_number() -> Option { Some(42) } *) -Definition some_number (τ : list Ty.t) (α : list Value.t) : M := +Definition some_number (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.U32 42 ])) + (M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 42 |)) ] + |))) | _, _ => M.impossible end. @@ -27,7 +31,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -45,11 +49,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 _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U32 42 - |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 42 |) in let _ := M.alloc (| M.call_closure (| @@ -63,36 +63,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The Answer: " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "The Answer: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -111,37 +119,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Not interesting... " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Not interesting... " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 b9c898e90..4c79cb497 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 @@ -40,19 +40,21 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let array := M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 (-2); - Value.Integer Integer.I32 6 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer (-2) |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |) |) in M.match_operator (| array, @@ -62,11 +64,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in let γ0_2 := M.SubPointer.get_slice_index (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 0 - |) in + 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 _ := @@ -82,55 +80,65 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "array[0] = 0, array[1] = " |); - M.read (| Value.String ", array[2] = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "array[0] = 0, array[1] = " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", array[2] = " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ second ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ third ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ second ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ third ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in let γ0_2 := M.SubPointer.get_slice_index (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 1 - |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 1 |) in let third := M.copy (| γ0_2 |) in let _ := M.alloc (| @@ -145,46 +153,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "array[0] = 1, array[2] = " |); - M.read (| Value.String " and array[1] was ignored + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "array[0] = 1, array[2] = " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " and array[1] was ignored " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ third ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ third ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in let γ0_rest := M.SubPointer.get_slice_rest (| γ, 2, 0 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 (-1) - |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer (-1) |) in let second := M.copy (| γ0_1 |) in let _ := M.alloc (| @@ -199,48 +216,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "array[0] = -1, array[1] = " |); - M.read (| - Value.String " and all the other ones were ignored + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "array[0] = -1, array[1] = " |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " and all the other ones were ignored " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ second ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ second ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in let γ0_1 := M.SubPointer.get_slice_index (| γ, 1 |) in let γ0_rest := M.SubPointer.get_slice_rest (| γ, 2, 0 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 3 - |) in + 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 _ := @@ -256,45 +282,61 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "array[0] = 3, array[1] = " |); - M.read (| Value.String " and the other elements were " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "array[0] = 3, array[1] = " |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " and the other elements were " + |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ second ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] ] - |), - [ tail ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ second ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] ] + |), + [ tail ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_slice_index (| γ, 0 |) in @@ -316,54 +358,68 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "array[0] = " |); - M.read (| Value.String ", middle = " |); - M.read (| Value.String ", array[2] = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "array[0] = " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", middle = " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", array[2] = " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ first ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] ] - |), - [ middle ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ last ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ first ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] ] + |), + [ middle ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ last ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 547047590..485bff717 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 @@ -74,20 +74,22 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let color := M.alloc (| - Value.StructTuple - "match_destructuring_enums::Color::RGB" - [ - Value.Integer Integer.U32 122; - Value.Integer Integer.U32 17; - Value.Integer Integer.U32 40 - ] + M.of_value (| + Value.StructTuple + "match_destructuring_enums::Color::RGB" + [ + A.to_value (M.of_value (| Value.Integer 122 |)); + A.to_value (M.of_value (| Value.Integer 17 |)); + A.to_value (M.of_value (| Value.Integer 40 |)) + ] + |) |) in let _ := let _ := @@ -99,17 +101,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "What color is it? -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "What color is it? +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| color, [ @@ -128,17 +137,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "The color is Red! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The color is Red! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -154,17 +172,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "The color is Blue! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The color is Blue! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -180,17 +207,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "The color is Green! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The color is Green! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -227,54 +263,66 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Red: " |); - M.read (| Value.String ", green: " |); - M.read (| Value.String ", and blue: " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Red: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", green: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", and blue: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ r ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ g ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ b ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ r ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ g ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ b ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -311,54 +359,68 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Hue: " |); - M.read (| Value.String ", saturation: " |); - M.read (| Value.String ", value: " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Hue: " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", saturation: " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ", value: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ h ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ s ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ v ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ h ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ s ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ v ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -395,54 +457,70 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Hue: " |); - M.read (| Value.String ", saturation: " |); - M.read (| Value.String ", lightness: " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Hue: " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", saturation: " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", lightness: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ h ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ s ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ l ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ h ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ s ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ l ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -479,54 +557,66 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Cyan: " |); - M.read (| Value.String ", magenta: " |); - M.read (| Value.String ", yellow: " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Cyan: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", magenta: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", yellow: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ c ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ m ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ y ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ c ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ m ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ y ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -570,63 +660,79 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Cyan: " |); - M.read (| Value.String ", magenta: " |); - M.read (| Value.String ", yellow: " |); - M.read (| Value.String ", key (black): " |); - M.read (| Value.String "! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Cyan: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", magenta: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", yellow: " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", key (black): " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String "! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ c ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ m ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ y ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ k ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ c ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ m ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ y ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ k ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 df857d5e8..d175591bd 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 @@ -53,12 +53,12 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let reference := M.alloc (| M.alloc (| Value.Integer Integer.I32 4 |) |) in + let reference := M.alloc (| M.alloc (| M.of_value (| Value.Integer 4 |) |) |) in let _ := M.match_operator (| reference, @@ -80,36 +80,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Got a value via destructuring: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Got a value via destructuring: " + |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ val ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ val ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -132,47 +144,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Got a value via dereferencing: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Got a value via dereferencing: " + |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ val ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ val ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let _not_a_reference := M.alloc (| Value.Integer Integer.I32 3 |) in + let _not_a_reference := M.alloc (| M.of_value (| Value.Integer 3 |) |) in M.match_operator (| - M.alloc (| Value.Integer Integer.I32 3 |), + M.alloc (| M.of_value (| Value.Integer 3 |) |), [ fun γ => ltac:(M.monadic (let _is_a_reference := M.alloc (| γ |) in - let value := M.alloc (| Value.Integer Integer.I32 5 |) in - let mut_value := M.alloc (| Value.Integer Integer.I32 6 |) in + let value := M.alloc (| M.of_value (| Value.Integer 5 |) |) in + let mut_value := M.alloc (| M.of_value (| Value.Integer 6 |) |) in let _ := M.match_operator (| value, @@ -193,38 +217,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "Got a reference to a value: " - |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Got a reference to a value: " + |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ r ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ r ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.match_operator (| @@ -237,7 +272,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let β := M.read (| m |) in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I32 10 |) + BinOp.Panic.add (| + Integer.I32, + M.read (| β |), + M.of_value (| Value.Integer 10 |) + |) |) in let _ := let _ := @@ -253,39 +292,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "We added 10. `mut_value`: " - |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "We added 10. `mut_value`: " + |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&mut") [ Ty.path "i32" ] ] - |), - [ m ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&mut") [ Ty.path "i32" ] + ] + |), + [ m ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] 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 ea186a77a..f394eeb85 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 @@ -27,19 +27,29 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let foo := M.alloc (| - Value.StructRecord - "match_destructuring_structs::Foo" - [ - ("x", Value.Tuple [ Value.Integer Integer.U32 1; Value.Integer Integer.U32 2 ]); - ("y", Value.Integer Integer.U32 3) - ] + M.of_value (| + Value.StructRecord + "match_destructuring_structs::Foo" + [ + ("x", + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |))); + ("y", A.to_value (M.of_value (| Value.Integer 3 |))) + ] + |) |) in M.match_operator (| foo, @@ -60,11 +70,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in 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 _ := - M.is_constant_or_break_match (| - M.read (| γ1_0 |), - Value.Integer Integer.U32 1 - |) in + 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 _ := @@ -80,45 +86,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "First of x is 1, b = " |); - M.read (| Value.String ", y = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "First of x is 1, b = " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ", y = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ b ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ y ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ b ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ y ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -133,11 +151,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "match_destructuring_structs::Foo", "x" |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.U32 2 - |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 2 |) in let i := M.copy (| γ0_1 |) in let _ := M.alloc (| @@ -152,36 +166,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "y is 2, i = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "y is 2, i = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.tuple [ Ty.path "u32"; Ty.path "u32" ] ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.tuple [ Ty.path "u32"; Ty.path "u32" ] ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -204,36 +226,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "y = " |); - M.read (| Value.String ", we don't care about x + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "y = " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", we don't care about x " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ y ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ y ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 a3b7a9e5c..656708e2c 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 @@ -20,19 +20,21 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let triple := M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I32 0; - Value.Integer Integer.I32 (-2); - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer (-2) |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) in let _ := let _ := @@ -44,36 +46,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Tell me about " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Tell me about " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.tuple [ Ty.path "i32"; Ty.path "i32"; Ty.path "i32" ] ] - |), - [ triple ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.tuple [ Ty.path "i32"; Ty.path "i32"; Ty.path "i32" ] ] + |), + [ triple ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| triple, [ @@ -82,11 +92,7 @@ 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 0 - |) in + 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 _ := @@ -102,55 +108,65 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "First is `0`, `y` is " |); - M.read (| Value.String ", and `z` is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "First is `0`, `y` is " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", and `z` is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ y ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ z ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ y ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ z ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 1 - |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 1 |) in let _ := M.alloc (| M.call_closure (| @@ -164,32 +180,34 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "First is `1` and the rest doesn't matter + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "First is `1` and the rest doesn't matter " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_2 |), - Value.Integer Integer.I32 2 - |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Integer 2 |) in let _ := M.alloc (| M.call_closure (| @@ -203,37 +221,35 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "last is `2` and the rest doesn't matter + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "last is `2` and the rest doesn't matter " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 3 - |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_2 |), - Value.Integer Integer.I32 4 - |) 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 _ := M.alloc (| M.call_closure (| @@ -247,23 +263,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "First is `3`, last is `4`, and the rest doesn't matter + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "First is `3`, last is `4`, and the rest doesn't matter " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -279,18 +301,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "It doesn't matter what they are -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "It doesn't matter what they are +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 61f558ab5..45823cbe6 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 @@ -20,19 +20,21 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let triple := M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I32 0; - Value.Integer Integer.I32 (-2); - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer (-2) |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) in let _ := let _ := @@ -44,36 +46,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Tell me about " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Tell me about " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.tuple [ Ty.path "i32"; Ty.path "i32"; Ty.path "i32" ] ] - |), - [ triple ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.tuple [ Ty.path "i32"; Ty.path "i32"; Ty.path "i32" ] ] + |), + [ triple ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| triple, [ @@ -82,11 +92,7 @@ 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 0 - |) in + 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 _ := @@ -102,55 +108,65 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "First is `0`, `y` is " |); - M.read (| Value.String ", and `z` is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "First is `0`, `y` is " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ", and `z` is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ y ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ z ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ y ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ z ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 1 - |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 1 |) in let _ := M.alloc (| M.call_closure (| @@ -164,32 +180,34 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "First is `1` and the rest doesn't matter + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "First is `1` and the rest doesn't matter " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_2 |), - Value.Integer Integer.I32 2 - |) in + let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Integer 2 |) in let _ := M.alloc (| M.call_closure (| @@ -203,37 +221,35 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "last is `2` and the rest doesn't matter + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "last is `2` and the rest doesn't matter " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_0 |), - Value.Integer Integer.I32 3 - |) in - let _ := - M.is_constant_or_break_match (| - M.read (| γ0_2 |), - Value.Integer Integer.I32 4 - |) 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 _ := M.alloc (| M.call_closure (| @@ -247,23 +263,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "First is `3`, last is `4`, and the rest doesn't matter + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "First is `3`, last is `4`, and the rest doesn't matter " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -279,18 +301,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "It doesn't matter what they are -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "It doesn't matter what they are +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 dea30bae1..94d789347 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 @@ -36,14 +36,18 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let temperature := M.alloc (| - Value.StructTuple "match_guards::Temperature::Celsius" [ Value.Integer Integer.I32 35 ] + M.of_value (| + Value.StructTuple + "match_guards::Temperature::Celsius" + [ A.to_value (M.of_value (| Value.Integer 35 |)) ] + |) |) in M.match_operator (| temperature, @@ -58,7 +62,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let t := M.copy (| γ0_0 |) in let γ := - M.alloc (| BinOp.Pure.gt (M.read (| t |)) (Value.Integer Integer.I32 30) |) in + M.alloc (| + BinOp.Pure.gt (| M.read (| t |), M.of_value (| Value.Integer 30 |) |) + |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -73,36 +79,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String "C is above 30 Celsius + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String "C is above 30 Celsius " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -125,36 +141,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String "C is below 30 Celsius + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String "C is below 30 Celsius " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -165,7 +191,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let t := M.copy (| γ0_0 |) in let γ := - M.alloc (| BinOp.Pure.gt (M.read (| t |)) (Value.Integer Integer.I32 86) |) in + M.alloc (| + BinOp.Pure.gt (| M.read (| t |), M.of_value (| Value.Integer 86 |) |) + |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -180,36 +208,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String "F is above 86 Fahrenheit + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String "F is above 86 Fahrenheit " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -232,36 +270,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String "F is below 86 Fahrenheit + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String "F is below 86 Fahrenheit " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 15dccd799..dcbc32f67 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 @@ -13,12 +13,12 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let number := M.alloc (| Value.Integer Integer.U8 4 |) in + let number := M.alloc (| M.of_value (| Value.Integer 4 |) |) in M.match_operator (| number, [ @@ -26,7 +26,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let i := M.copy (| γ |) in let γ := - M.alloc (| BinOp.Pure.eq (M.read (| i |)) (Value.Integer Integer.U8 0) |) in + M.alloc (| + BinOp.Pure.eq (| M.read (| i |), M.of_value (| Value.Integer 0 |) |) + |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -41,20 +43,31 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "Zero -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Zero +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let i := M.copy (| γ |) in let γ := - M.alloc (| BinOp.Pure.gt (M.read (| i |)) (Value.Integer Integer.U8 0) |) in + M.alloc (| + BinOp.Pure.gt (| M.read (| i |), M.of_value (| Value.Integer 0 |) |) + |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -69,17 +82,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Greater than zero -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Greater than zero +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -89,7 +111,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "core::panicking::unreachable_display", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ Value.String "Should never happen." ] + [ M.of_value (| Value.String "Should never happen." |) ] |) |) |))) 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 b7e607a0f..4ff1b2c9d 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 @@ -23,40 +23,42 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let n := M.alloc (| Value.Integer Integer.I32 1 |) in + let n := M.alloc (| M.of_value (| Value.Integer 1 |) |) in M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| n |)) (Value.Integer Integer.I32 101) + BinOp.Pure.lt (| M.read (| n |), M.of_value (| Value.Integer 101 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| n |), - Value.Integer Integer.I32 15 - |)) - (Value.Integer Integer.I32 0) + M.of_value (| Value.Integer 15 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -77,35 +79,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "fizzbuzz -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "fizzbuzz +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| n |), - Value.Integer Integer.I32 3 - |)) - (Value.Integer Integer.I32 0) + M.of_value (| Value.Integer 3 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -126,35 +138,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "fizz -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "fizz +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| n |), - Value.Integer Integer.I32 5 - |)) - (Value.Integer Integer.I32 0) + M.of_value (| Value.Integer 5 |) + |), + M.of_value (| Value.Integer 0 |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -178,23 +202,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "buzz + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "buzz " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -214,38 +244,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -256,16 +303,20 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let β := n in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I32 1 |) + BinOp.Panic.add (| + Integer.I32, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| 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 4fe7c2a15..12fad22cd 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 @@ -23,19 +23,23 @@ fn main() { // clauses. `while let` does not have these. } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let optional := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 0 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |) |) in M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -48,14 +52,17 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let i := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| i |)) (Value.Integer Integer.I32 9) + BinOp.Pure.gt (| + M.read (| i |), + M.of_value (| Value.Integer 9 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -73,25 +80,34 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Greater than 9, quit! -" |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Greater than 9, quit! +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| optional, - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -108,49 +124,68 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`i` is `" |); - M.read (| Value.String "`. Try again. -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "`i` is `" |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String "`. Try again. +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| optional, - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.read (| i |), - Value.Integer Integer.I32 1 - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.I32, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -159,7 +194,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.never_to_any (| M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| 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 8da7b4c13..055c8fceb 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 @@ -28,14 +28,18 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let optional := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 0 ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |) |) in M.loop (| ltac:(M.monadic @@ -52,14 +56,17 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let i := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.gt (M.read (| i |)) (Value.Integer Integer.I32 9) + BinOp.Pure.gt (| + M.read (| i |), + M.of_value (| Value.Integer 9 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -77,25 +84,34 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Greater than 9, quit! -" |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Greater than 9, quit! +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| optional, - Value.StructTuple "core::option::Option::None" [] + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -112,49 +128,68 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`i` is `" |); - M.read (| Value.String "`. Try again. -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "`i` is `" |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String "`. Try again. +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| optional, - Value.StructTuple - "core::option::Option::Some" - [ - BinOp.Panic.add (| - M.read (| i |), - Value.Integer Integer.I32 1 - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.add (| + Integer.I32, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |)) + ] + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/associated_functions_and_methods.err b/CoqOfRust/examples/default/examples/rust_book/functions/associated_functions_and_methods.err index e69de29bb..604f1b138 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/associated_functions_and_methods.err +++ b/CoqOfRust/examples/default/examples/rust_book/functions/associated_functions_and_methods.err @@ -0,0 +1,90 @@ +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:43:9 + | +43 | ((x1 - x2) * (y1 - y2)).abs() + | ^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:43:10 + | +43 | ((x1 - x2) * (y1 - y2)).abs() + | ^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:43:22 + | +43 | ((x1 - x2) * (y1 - y2)).abs() + | ^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:50:9 + | +50 | 2.0 * ((x1 - x2).abs() + (y1 - y2).abs()) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:50:15 + | +50 | 2.0 * ((x1 - x2).abs() + (y1 - y2).abs()) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:50:16 + | +50 | 2.0 * ((x1 - x2).abs() + (y1 - y2).abs()) + | ^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:50:34 + | +50 | 2.0 * ((x1 - x2).abs() + (y1 - y2).abs()) + | ^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:60:9 + | +60 | self.p2.y += y; + | ^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:59:9 + | +59 | self.p1.y += y; + | ^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:57:9 + | +57 | self.p2.x += x; + | ^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: Expected an integer type for the parameters + --> examples/rust_book/functions/associated_functions_and_methods.rs:56:9 + | +56 | self.p1.x += x; + | ^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: 11 warnings emitted + 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 79e3c7c4c..f3fe68a0f 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 @@ -16,13 +16,18 @@ Module Impl_associated_functions_and_methods_Point. Point { y: 0.0, x: 1.0 } } *) - Definition origin (τ : list Ty.t) (α : list Value.t) : M := + Definition origin (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "associated_functions_and_methods::Point" - [ ("y", M.read (| UnsupportedLiteral |)); ("x", M.read (| UnsupportedLiteral |)) ])) + (M.of_value (| + Value.StructRecord + "associated_functions_and_methods::Point" + [ + ("y", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))); + ("x", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) + ] + |))) | _, _ => M.impossible end. @@ -33,15 +38,17 @@ Module Impl_associated_functions_and_methods_Point. Point { x: x, y: y } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; y ] => ltac:(M.monadic (let x := M.alloc (| x |) in let y := M.alloc (| y |) in - Value.StructRecord - "associated_functions_and_methods::Point" - [ ("x", M.read (| x |)); ("y", M.read (| y |)) ])) + M.of_value (| + Value.StructRecord + "associated_functions_and_methods::Point" + [ ("x", A.to_value (M.read (| x |))); ("y", A.to_value (M.read (| y |))) ] + |))) | _, _ => M.impossible end. @@ -67,7 +74,7 @@ Module Impl_associated_functions_and_methods_Rectangle. self.p1 } *) - Definition get_p1 (τ : list Ty.t) (α : list Value.t) : M := + Definition get_p1 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -95,7 +102,7 @@ Module Impl_associated_functions_and_methods_Rectangle. ((x1 - x2) * (y1 - y2)).abs() } *) - Definition area (τ : list Ty.t) (α : list Value.t) : M := + Definition area (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -152,8 +159,17 @@ Module Impl_associated_functions_and_methods_Rectangle. M.get_associated_function (| Ty.path "f64", "abs", [] |), [ BinOp.Panic.mul (| - BinOp.Panic.sub (| M.read (| x1 |), M.read (| x2 |) |), - BinOp.Panic.sub (| M.read (| y1 |), M.read (| y2 |) |) + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| x1 |), + M.read (| x2 |) + |), + BinOp.Panic.sub (| + Integer.Usize, + M.read (| y1 |), + M.read (| y2 |) + |) |) ] |) @@ -176,7 +192,7 @@ Module Impl_associated_functions_and_methods_Rectangle. 2.0 * ((x1 - x2).abs() + (y1 - y2).abs()) } *) - Definition perimeter (τ : list Ty.t) (α : list Value.t) : M := + Definition perimeter (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -230,15 +246,29 @@ Module Impl_associated_functions_and_methods_Rectangle. let y2 := M.copy (| γ0_1 |) in M.alloc (| BinOp.Panic.mul (| - M.read (| UnsupportedLiteral |), + Integer.Usize, + M.read (| M.of_value (| UnsupportedLiteral |) |), BinOp.Panic.add (| + Integer.Usize, M.call_closure (| M.get_associated_function (| Ty.path "f64", "abs", [] |), - [ BinOp.Panic.sub (| M.read (| x1 |), M.read (| x2 |) |) ] + [ + BinOp.Panic.sub (| + Integer.Usize, + M.read (| x1 |), + M.read (| x2 |) + |) + ] |), M.call_closure (| M.get_associated_function (| Ty.path "f64", "abs", [] |), - [ BinOp.Panic.sub (| M.read (| y1 |), M.read (| y2 |) |) ] + [ + BinOp.Panic.sub (| + Integer.Usize, + M.read (| y1 |), + M.read (| y2 |) + |) + ] |) |) |) @@ -262,7 +292,7 @@ Module Impl_associated_functions_and_methods_Rectangle. self.p2.y += y; } *) - Definition translate (τ : list Ty.t) (α : list Value.t) : M := + Definition translate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; x; y ] => ltac:(M.monadic @@ -281,7 +311,7 @@ Module Impl_associated_functions_and_methods_Rectangle. "associated_functions_and_methods::Point", "x" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| x |) |) |) in + M.write (| β, BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| x |) |) |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -293,7 +323,7 @@ Module Impl_associated_functions_and_methods_Rectangle. "associated_functions_and_methods::Point", "x" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| x |) |) |) in + M.write (| β, BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| x |) |) |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -305,7 +335,7 @@ Module Impl_associated_functions_and_methods_Rectangle. "associated_functions_and_methods::Point", "y" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| y |) |) |) in + M.write (| β, BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| y |) |) |) in let _ := let β := M.SubPointer.get_struct_record_field (| @@ -317,8 +347,8 @@ Module Impl_associated_functions_and_methods_Rectangle. "associated_functions_and_methods::Point", "y" |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| y |) |) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| y |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -350,7 +380,7 @@ Module Impl_associated_functions_and_methods_Pair. // `first` and `second` go out of scope and get freed } *) - Definition destroy (τ : list Ty.t) (α : list Value.t) : M := + Definition destroy (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -389,54 +419,69 @@ Module Impl_associated_functions_and_methods_Pair. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Destroying Pair(" |); - M.read (| Value.String ", " |); - M.read (| Value.String ") -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Destroying Pair(" |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ") +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ first ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ second ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" + ] + ] + |), + [ first ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" + ] + ] + |), + [ second ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -482,35 +527,42 @@ fn main() { // TODO ^ Try uncommenting this line } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let rectangle := M.alloc (| - Value.StructRecord - "associated_functions_and_methods::Rectangle" - [ - ("p1", - M.call_closure (| - M.get_associated_function (| - Ty.path "associated_functions_and_methods::Point", - "origin", - [] - |), - [] - |)); - ("p2", - M.call_closure (| - M.get_associated_function (| - Ty.path "associated_functions_and_methods::Point", - "new", - [] - |), - [ M.read (| UnsupportedLiteral |); M.read (| UnsupportedLiteral |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "associated_functions_and_methods::Rectangle" + [ + ("p1", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "associated_functions_and_methods::Point", + "origin", + [] + |), + [] + |))); + ("p2", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "associated_functions_and_methods::Point", + "new", + [] + |), + [ + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.read (| M.of_value (| UnsupportedLiteral |) |) + ] + |))) + ] + |) |) in let _ := let _ := @@ -522,47 +574,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Rectangle perimeter: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Rectangle perimeter: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f64" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "associated_functions_and_methods::Rectangle", - "perimeter", - [] - |), - [ rectangle ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f64" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "associated_functions_and_methods::Rectangle", + "perimeter", + [] + |), + [ rectangle ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -573,71 +635,86 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Rectangle area: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Rectangle area: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f64" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "associated_functions_and_methods::Rectangle", - "area", - [] - |), - [ rectangle ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f64" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "associated_functions_and_methods::Rectangle", + "area", + [] + |), + [ rectangle ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let square := M.alloc (| - Value.StructRecord - "associated_functions_and_methods::Rectangle" - [ - ("p1", - M.call_closure (| - M.get_associated_function (| - Ty.path "associated_functions_and_methods::Point", - "origin", - [] - |), - [] - |)); - ("p2", - M.call_closure (| - M.get_associated_function (| - Ty.path "associated_functions_and_methods::Point", - "new", - [] - |), - [ M.read (| UnsupportedLiteral |); M.read (| UnsupportedLiteral |) ] - |)) - ] + M.of_value (| + Value.StructRecord + "associated_functions_and_methods::Rectangle" + [ + ("p1", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "associated_functions_and_methods::Point", + "origin", + [] + |), + [] + |))); + ("p2", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "associated_functions_and_methods::Point", + "new", + [] + |), + [ + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.read (| M.of_value (| UnsupportedLiteral |) |) + ] + |))) + ] + |) |) in let _ := M.alloc (| @@ -647,35 +724,43 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "translate", [] |), - [ square; M.read (| UnsupportedLiteral |); M.read (| UnsupportedLiteral |) ] + [ + square; + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.read (| M.of_value (| UnsupportedLiteral |) |) + ] |) |) in let pair_ := M.alloc (| - Value.StructTuple - "associated_functions_and_methods::Pair" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [ Value.Integer Integer.I32 1 ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [ Value.Integer Integer.I32 2 ] - |) - ] + M.of_value (| + Value.StructTuple + "associated_functions_and_methods::Pair" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 2 |) ] + |)) + ] + |) |) in let _ := M.alloc (| @@ -688,7 +773,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| pair_ |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions.v b/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions.v index 94169526c..a2357fb70 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions.v @@ -8,8 +8,11 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition main (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. Module main. (* @@ -17,7 +20,7 @@ Module main. panic!("This call never returns."); } *) - Definition foo (τ : list Ty.t) (α : list Value.t) : M := + Definition foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -26,7 +29,7 @@ Module main. "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "This call never returns." |) ] + [ M.read (| M.of_value (| Value.String "This call never returns." |) |) ] |))) | _, _ => M.impossible end. 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 d76526957..07ae84015 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 @@ -26,7 +26,7 @@ fn main() { ); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -41,47 +41,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Sum of odd numbers up to 9 (excluding): " |); - M.read (| Value.String " -" |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "diverging_functions_example_sum_odd_numbers::main.sum_odd_numbers", - [] - |), - [ Value.Integer Integer.U32 9 ] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Sum of odd numbers up to 9 (excluding): " |) - |) - ] - |) - ] - |)) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "diverging_functions_example_sum_odd_numbers::main.sum_odd_numbers", + [] + |), + [ M.of_value (| Value.Integer 9 |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -106,13 +118,13 @@ Module main. acc } *) - Definition sum_odd_numbers (τ : list Ty.t) (α : list Value.t) : M := + Definition sum_odd_numbers (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ up_to ] => ltac:(M.monadic (let up_to := M.alloc (| up_to |) in M.read (| - let acc := M.alloc (| Value.Integer Integer.U32 0 |) in + let acc := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -126,9 +138,14 @@ Module main. [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.U32 0); ("end_", M.read (| up_to |)) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| up_to |))) + ] + |) ] |) |), @@ -169,12 +186,14 @@ Module main. M.copy (| M.match_operator (| M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.U32, M.read (| i |), - Value.Integer Integer.U32 2 - |)) - (Value.Integer Integer.U32 1) + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 1 |) + |) |), [ fun γ => @@ -202,12 +221,16 @@ Module main. let β := acc in M.write (| β, - BinOp.Panic.add (| M.read (| β |), M.read (| addition |) |) + BinOp.Panic.add (| + Integer.U32, + M.read (| β |), + M.read (| addition |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in 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 b53ffdba7..a7f1d25a5 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 @@ -6,8 +6,11 @@ fn some_fn() { () } *) -Definition some_fn (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition some_fn (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. (* fn main() { @@ -15,7 +18,7 @@ fn main() { println!("This function returns and you can see this line.") } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -36,22 +39,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "This function returns and you can see this line. + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "This function returns and you can see this line. " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions.v index db0ab5ec9..7cd0055d6 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions.v @@ -12,7 +12,7 @@ fn is_divisible_by(lhs: u32, rhs: u32) -> bool { lhs % rhs == 0 } *) -Definition is_divisible_by (τ : list Ty.t) (α : list Value.t) : M := +Definition is_divisible_by (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ lhs; rhs ] => ltac:(M.monadic @@ -23,26 +23,29 @@ Definition is_divisible_by (τ : list Ty.t) (α : list Value.t) : M := (M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| rhs |)) (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| M.read (| rhs |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Bool false |) |) |) + |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - BinOp.Pure.eq - (BinOp.Panic.rem (| M.read (| lhs |), M.read (| rhs |) |)) - (Value.Integer Integer.U32 0) + BinOp.Pure.eq (| + BinOp.Panic.rem (| Integer.U32, M.read (| lhs |), M.read (| rhs |) |), + M.of_value (| Value.Integer 0 |) + |) |) |))) |))) @@ -62,14 +65,14 @@ fn fizzbuzz(n: u32) -> () { } } *) -Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := +Definition fizzbuzz (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -78,7 +81,7 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := (M.alloc (| M.call_closure (| M.get_function (| "functions::is_divisible_by", [] |), - [ M.read (| n |); Value.Integer Integer.U32 15 ] + [ M.read (| n |); M.of_value (| Value.Integer 15 |) ] |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -96,22 +99,29 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "fizzbuzz -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "fizzbuzz +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -120,7 +130,7 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := (M.alloc (| M.call_closure (| M.get_function (| "functions::is_divisible_by", [] |), - [ M.read (| n |); Value.Integer Integer.U32 3 ] + [ M.read (| n |); M.of_value (| Value.Integer 3 |) ] |) |)) in let _ := @@ -139,22 +149,31 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "fizz -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "fizz +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -163,7 +182,7 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := (M.alloc (| M.call_closure (| M.get_function (| "functions::is_divisible_by", [] |), - [ M.read (| n |); Value.Integer Integer.U32 5 ] + [ M.read (| n |); M.of_value (| Value.Integer 5 |) ] |) |)) in let _ := @@ -185,18 +204,27 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "buzz -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "buzz +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -213,37 +241,50 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ n ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ n ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -261,7 +302,7 @@ fn fizzbuzz_to(n: u32) { } } *) -Definition fizzbuzz_to (τ : list Ty.t) (α : list Value.t) : M := +Definition fizzbuzz_to (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic @@ -285,7 +326,7 @@ Definition fizzbuzz_to (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.U32 1; M.read (| n |) ] + [ M.of_value (| Value.Integer 1 |); M.read (| n |) ] |) ] |) @@ -332,10 +373,10 @@ Definition fizzbuzz_to (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| n |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) @@ -349,7 +390,7 @@ fn main() { fizzbuzz_to(100); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -358,10 +399,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "functions::fizzbuzz_to", [] |), - [ Value.Integer Integer.U32 100 ] + [ M.of_value (| Value.Integer 100 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 22cb16400..1d7c90763 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures.v @@ -30,16 +30,16 @@ fn main() { println!("closure returning one: {}", one()); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let outer_var := M.alloc (| Value.Integer Integer.I32 42 |) in + let outer_var := M.alloc (| M.of_value (| Value.Integer 42 |) |) in let closure_annotated := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -49,16 +49,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let i := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| i |), M.read (| outer_var |) |))) + BinOp.Panic.add (| + Integer.I32, + M.read (| i |), + M.read (| outer_var |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let closure_inferred := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -68,11 +73,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let i := M.copy (| γ |) in - BinOp.Panic.add (| M.read (| i |), M.read (| outer_var |) |))) + BinOp.Panic.add (| + Integer.I32, + M.read (| i |), + M.read (| outer_var |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := let _ := @@ -84,52 +94,67 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "closure_annotated: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "closure_annotated: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::function::Fn", - Ty.function [ Ty.tuple [ Ty.path "i32" ] ] (Ty.path "i32"), - [ Ty.tuple [ Ty.path "i32" ] ], - "call", - [] - |), - [ - closure_annotated; - Value.Tuple [ Value.Integer Integer.I32 1 ] - ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + Ty.function + [ Ty.tuple [ Ty.path "i32" ] ] + (Ty.path "i32"), + [ Ty.tuple [ Ty.path "i32" ] ], + "call", + [] + |), + [ + closure_annotated; + M.of_value (| + Value.Tuple + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -140,65 +165,79 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "closure_inferred: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "closure_inferred: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::function::Fn", - Ty.function [ Ty.tuple [ Ty.path "i32" ] ] (Ty.path "i32"), - [ Ty.tuple [ Ty.path "i32" ] ], - "call", - [] - |), - [ - closure_inferred; - Value.Tuple [ Value.Integer Integer.I32 1 ] - ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + Ty.function + [ Ty.tuple [ Ty.path "i32" ] ] + (Ty.path "i32"), + [ Ty.tuple [ Ty.path "i32" ] ], + "call", + [] + |), + [ + closure_inferred; + M.of_value (| + Value.Tuple + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let one := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => M.match_operator (| M.alloc (| α0 |), - [ fun γ => ltac:(M.monadic (Value.Integer Integer.I32 1)) ] + [ fun γ => ltac:(M.monadic (M.of_value (| Value.Integer 1 |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := let _ := @@ -210,50 +249,60 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "closure returning one: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "closure returning one: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::function::Fn", - Ty.function [ Ty.tuple [] ] (Ty.path "i32"), - [ Ty.tuple [] ], - "call", - [] - |), - [ one; Value.Tuple [] ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + Ty.function [ Ty.tuple [] ] (Ty.path "i32"), + [ Ty.tuple [] ], + "call", + [] + |), + [ one; M.of_value (| Value.Tuple [] |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 05be82b05..783a72721 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 @@ -12,7 +12,7 @@ where f(); } *) -Definition apply (τ : list Ty.t) (α : list Value.t) : M := +Definition apply (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ f ] => ltac:(M.monadic @@ -28,10 +28,10 @@ Definition apply (τ : list Ty.t) (α : list Value.t) : M := "call_once", [] |), - [ M.read (| f |); Value.Tuple [] ] + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -45,7 +45,7 @@ where f(3) } *) -Definition apply_to_3 (τ : list Ty.t) (α : list Value.t) : M := +Definition apply_to_3 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ f ] => ltac:(M.monadic @@ -58,7 +58,7 @@ Definition apply_to_3 (τ : list Ty.t) (α : list Value.t) : M := "call", [] |), - [ f; Value.Tuple [ Value.Integer Integer.I32 3 ] ] + [ f; M.of_value (| Value.Tuple [ A.to_value (M.of_value (| Value.Integer 3 |)) ] |) ] |))) | _, _ => M.impossible end. @@ -98,23 +98,23 @@ fn main() { println!("3 doubled: {}", apply_to_3(double)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let greeting := M.copy (| Value.String "hello" |) in + let greeting := M.copy (| M.of_value (| 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" |) ] + [ M.read (| M.of_value (| Value.String "goodbye" |) |) ] |) |) in let diary := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -138,36 +138,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "I said " |); - M.read (| Value.String ". + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "I said " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ". " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ greeting ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "str" ] + ] + |), + [ greeting ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -176,7 +193,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "push_str", [] |), - [ farewell; M.read (| Value.String "!!!" |) ] + [ farewell; M.read (| M.of_value (| Value.String "!!!" |) |) ] |) |) in let _ := @@ -193,36 +210,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Then I screamed " |); - M.read (| Value.String ". + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Then I screamed " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ". " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ farewell ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ farewell ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -237,22 +269,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "Now I can sleep. zzzzz + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Now I can sleep. zzzzz " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -263,12 +301,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| farewell |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.alloc (| @@ -282,8 +321,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let double := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -293,11 +332,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Panic.mul (| Value.Integer Integer.I32 2, M.read (| x |) |))) + BinOp.Panic.mul (| + Integer.I32, + M.of_value (| Value.Integer 2 |), + M.read (| x |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := let _ := @@ -309,46 +353,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "3 doubled: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "3 doubled: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "functions_closures_as_input_parameters::apply_to_3", - [ Ty.function [ Ty.tuple [ Ty.path "i32" ] ] (Ty.path "i32") - ] - |), - [ M.read (| double |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "functions_closures_as_input_parameters::apply_to_3", + [ + Ty.function + [ Ty.tuple [ Ty.path "i32" ] ] + (Ty.path "i32") + ] + |), + [ M.read (| double |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 e18ae03df..4c45ebf86 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 @@ -8,7 +8,7 @@ fn create_fn() -> impl Fn() { move || println!("This is a: {}", text) } *) -Definition create_fn (τ : list Ty.t) (α : list Value.t) : M := +Definition create_fn (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -17,12 +17,12 @@ Definition create_fn (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::borrow::ToOwned", Ty.path "str", [], "to_owned", [] |), - [ M.read (| Value.String "Fn" |) ] + [ M.read (| M.of_value (| Value.String "Fn" |) |) ] |) |) in M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -45,41 +45,53 @@ Definition create_fn (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "This is a: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "This is a: " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ text ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ text ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) |))) | _, _ => M.impossible @@ -96,7 +108,7 @@ fn create_fnmut() -> impl FnMut() { move || println!("This is a: {}", text) } *) -Definition create_fnmut (τ : list Ty.t) (α : list Value.t) : M := +Definition create_fnmut (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -105,12 +117,12 @@ Definition create_fnmut (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::borrow::ToOwned", Ty.path "str", [], "to_owned", [] |), - [ M.read (| Value.String "FnMut" |) ] + [ M.read (| M.of_value (| Value.String "FnMut" |) |) ] |) |) in M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -133,41 +145,53 @@ Definition create_fnmut (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "This is a: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "This is a: " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ text ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ text ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) |))) | _, _ => M.impossible @@ -184,7 +208,7 @@ fn create_fnonce() -> impl FnOnce() { move || println!("This is a: {}", text) } *) -Definition create_fnonce (τ : list Ty.t) (α : list Value.t) : M := +Definition create_fnonce (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -193,12 +217,12 @@ Definition create_fnonce (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::borrow::ToOwned", Ty.path "str", [], "to_owned", [] |), - [ M.read (| Value.String "FnOnce" |) ] + [ M.read (| M.of_value (| Value.String "FnOnce" |) |) ] |) |) in M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -221,41 +245,53 @@ Definition create_fnonce (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "This is a: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "This is a: " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ text ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ text ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) |))) | _, _ => M.impossible @@ -276,7 +312,7 @@ fn main() { fn_once(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -312,7 +348,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "call", [] |), - [ fn_plain; Value.Tuple [] ] + [ fn_plain; M.of_value (| Value.Tuple [] |) ] |) |) in let _ := @@ -325,7 +361,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "call_mut", [] |), - [ fn_mut; Value.Tuple [] ] + [ fn_mut; M.of_value (| Value.Tuple [] |) ] |) |) in let _ := @@ -338,10 +374,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "call_once", [] |), - [ M.read (| fn_once |); Value.Tuple [] ] + [ M.read (| fn_once |); M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 620a0cba7..1fe810bb7 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 @@ -69,7 +69,7 @@ fn main() { // ^ TODO: Try uncommenting this line. } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -84,13 +84,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "from", [] |), - [ M.read (| Value.String "green" |) ] + [ M.read (| M.of_value (| Value.String "green" |) |) ] |) |) in let print := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -113,41 +113,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`color`: " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "`color`: " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ color ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ color ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.alloc (| @@ -159,7 +173,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "call", [] |), - [ print; Value.Tuple [] ] + [ print; M.of_value (| Value.Tuple [] |) ] |) |) in let _reborrow := M.alloc (| color |) in @@ -173,15 +187,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "call", [] |), - [ print; Value.Tuple [] ] + [ print; M.of_value (| Value.Tuple [] |) ] |) |) in let _color_moved := M.copy (| color |) in - let count := M.alloc (| Value.Integer Integer.I32 0 |) in + let count := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let inc := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -195,7 +209,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let β := count in M.write (| β, - BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I32 1 |) + BinOp.Panic.add (| + Integer.I32, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) |) in let _ := let _ := @@ -211,42 +229,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`count`: " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "`count`: " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ count ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ count ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.alloc (| @@ -258,7 +290,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "call_mut", [] |), - [ inc; Value.Tuple [] ] + [ inc; M.of_value (| Value.Tuple [] |) ] |) |) in let _ := @@ -271,7 +303,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "call_mut", [] |), - [ inc; Value.Tuple [] ] + [ inc; M.of_value (| Value.Tuple [] |) ] |) |) in let _count_reborrowed := M.alloc (| count |) in @@ -285,13 +317,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.I32 3 ] + [ M.of_value (| Value.Integer 3 |) ] |) |) in let consume := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -315,43 +347,58 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`movable`: " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "`movable`: " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.path "i32"; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "i32"; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ movable ] - |) - ] - |)) + |), + [ movable ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -366,12 +413,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| movable |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.alloc (| @@ -383,10 +431,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "call_once", [] |), - [ M.read (| consume |); Value.Tuple [] ] + [ M.read (| consume |); M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 a7ef66946..cc6ad3ac7 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 @@ -28,7 +28,7 @@ fn main() { println!("2 in array2: {}", array2.into_iter().any(|x| *x == 2)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -43,8 +43,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -58,16 +58,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -81,8 +84,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -96,16 +99,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 4; - Value.Integer Integer.I32 5; - Value.Integer Integer.I32 6 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -119,98 +125,114 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "2 in vec1: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "2 in vec1: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::slice::iter::Iter") - [ Ty.path "i32" ], - [], - "any", - [ - Ty.function - [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - ] - (Ty.path "bool") - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "i32" ], - "iter", - [] - |), + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "i32" ], + [], + "any", [ + Ty.function + [ + Ty.tuple + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] + (Ty.path "bool") + ] + |), + [ + M.alloc (| M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" - ], - [], - "deref", + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "i32" ], + "iter", [] |), - [ vec1 ] + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "i32"; + Ty.path "alloc::alloc::Global" + ], + [], + "deref", + [] + |), + [ vec1 ] + |) + ] |) - ] - |) - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| x |)) - (Value.Integer Integer.I32 2))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - |) - ] - |) - ] - |)) + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let x := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -221,86 +243,99 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "2 in vec2: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "2 in vec2: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "alloc::vec::into_iter::IntoIter") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - [], - "any", - [ - Ty.function - [ Ty.tuple [ Ty.path "i32" ] ] - (Ty.path "bool") - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - [], - "into_iter", - [] - |), - [ M.read (| vec2 |) ] - |) - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| x |)) - (Value.Integer Integer.I32 2))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "alloc::vec::into_iter::IntoIter") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + [], + "any", + [ + Ty.function + [ Ty.tuple [ Ty.path "i32" ] ] + (Ty.path "bool") + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" + ], + [], + "into_iter", + [] + |), + [ M.read (| vec2 |) ] + |) + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let x := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -311,47 +346,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "vec1 len: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "vec1 len: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - "len", - [] - |), - [ vec1 ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ vec1 ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -362,66 +407,80 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "First element of vec1 is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "First element of vec1 is: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - [ Ty.path "usize" ], - "index", - [] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] |), - [ vec1; Value.Integer Integer.Usize 0 ] - |) - ] - |) - ] - |)) + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + [ Ty.path "usize" ], + "index", + [] + |), + [ vec1; M.of_value (| Value.Integer 0 |) ] + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let array1 := M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) in let array2 := M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 4; - Value.Integer Integer.I32 5; - Value.Integer Integer.I32 6 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |) |) in let _ := let _ := @@ -433,86 +492,98 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "2 in array1: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "2 in array1: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::slice::iter::Iter") - [ Ty.path "i32" ], - [], - "any", - [ - Ty.function - [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "i32" ], + [], + "any", + [ + Ty.function + [ + Ty.tuple + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] + (Ty.path "bool") ] - (Ty.path "bool") - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "i32" ], - "iter", - [] - |), - [ (* Unsize *) M.pointer_coercion array1 ] - |) - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| x |)) - (Value.Integer Integer.I32 2))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "i32" ], + "iter", + [] + |), + [ (* Unsize *) M.pointer_coercion (| array1 |) ] + |) + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let x := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -523,90 +594,103 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "2 in array2: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "2 in array2: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::slice::iter::Iter") - [ Ty.path "i32" ], - [], - "any", - [ - Ty.function - [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "i32" ], + [], + "any", + [ + Ty.function + [ + Ty.tuple + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] + (Ty.path "bool") ] - (Ty.path "bool") - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] ], - [], - "into_iter", - [] - |), - [ array2 ] - |) - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| M.read (| x |) |)) - (Value.Integer Integer.I32 2))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] + ], + [], + "into_iter", + [] + |), + [ array2 ] + |) + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let x := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| M.read (| x |) |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 492c32eed..b43f35871 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 @@ -30,7 +30,7 @@ fn main() { ); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -45,8 +45,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -60,16 +60,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -83,8 +86,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -98,16 +101,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 4; - Value.Integer Integer.I32 5; - Value.Integer Integer.I32 6 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -160,88 +166,98 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Find 2 in vec1: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Find 2 in vec1: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply - (Ty.path "core::slice::iter::Iter") - [ Ty.path "i32" ], - [], - "find", - [ - Ty.function + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "i32" ], + [], + "find", [ - Ty.tuple + Ty.function [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] ] + (Ty.path "bool") ] - (Ty.path "bool") - ] - |), - [ - iter; - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let γ := M.read (| γ |) in - let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| x |)) - (Value.Integer Integer.I32 2))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - |) - ] - |) - ] - |)) + |), + [ + iter; + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ := M.read (| γ |) in + let x := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -252,94 +268,111 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Find 2 in vec2: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Find 2 in vec2: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "alloc::vec::into_iter::IntoIter") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - [], - "find", - [ - Ty.function - [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - ] - (Ty.path "bool") - ] - |), - [ - into_iter; - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| x |)) - (Value.Integer Integer.I32 2))) - ] - |) - | _ => M.impossible (||) - end)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "alloc::vec::into_iter::IntoIter") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + [], + "find", + [ + Ty.function + [ + Ty.tuple + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] + (Ty.path "bool") + ] + |), + [ + into_iter; + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let x := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let array1 := M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) in let array2 := M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 4; - Value.Integer Integer.I32 5; - Value.Integer Integer.I32 6 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)); + A.to_value (M.of_value (| Value.Integer 6 |)) + ] + |) |) in let _ := let _ := @@ -351,97 +384,107 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Find 2 in array1: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Find 2 in array1: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply - (Ty.path "core::slice::iter::Iter") - [ Ty.path "i32" ], - [], - "find", - [ - Ty.function + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "i32" ], + [], + "find", [ - Ty.tuple + Ty.function [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] ] + (Ty.path "bool") ] - (Ty.path "bool") - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "i32" ], - "iter", - [] - |), - [ (* Unsize *) M.pointer_coercion array1 ] - |) - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let γ := M.read (| γ |) in - let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| x |)) - (Value.Integer Integer.I32 2))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "i32" ], + "iter", + [] + |), + [ (* Unsize *) M.pointer_coercion (| array1 |) ] + |) + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ := M.read (| γ |) in + let x := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| x |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -452,101 +495,112 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Find 2 in array2: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Find 2 in array2: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "core::option::Option") - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply - (Ty.path "core::slice::iter::Iter") - [ Ty.path "i32" ], - [], - "find", - [ - Ty.function + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "i32" ], + [], + "find", [ - Ty.tuple + Ty.function [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] ] + (Ty.path "bool") ] - (Ty.path "bool") - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] ], - [], - "into_iter", - [] - |), - [ array2 ] - |) - |); - M.closure - (fun γ => - ltac:(M.monadic - match γ with - | [ α0 ] => - M.match_operator (| - M.alloc (| α0 |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.read (| γ |) in - let x := M.copy (| γ |) in - BinOp.Pure.eq - (M.read (| M.read (| x |) |)) - (Value.Integer Integer.I32 2))) - ] - |) - | _ => M.impossible (||) - end)) - ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] + ], + [], + "into_iter", + [] + |), + [ array2 ] + |) + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let x := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| M.read (| x |) |), + M.of_value (| Value.Integer 2 |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 a17c25ca8..d3b77ea6c 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 @@ -16,7 +16,7 @@ fn main() { assert_eq!(index_of_first_negative_number, None); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -31,8 +31,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -46,19 +46,22 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 9; - Value.Integer Integer.I32 3; - Value.Integer Integer.I32 3; - Value.Integer Integer.I32 13; - Value.Integer Integer.I32 2 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 9 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 13 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -100,8 +103,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -112,29 +115,39 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let γ := M.read (| γ |) in let x := M.copy (| γ |) in - BinOp.Pure.eq - (BinOp.Panic.rem (| + BinOp.Pure.eq (| + BinOp.Panic.rem (| + Integer.I32, M.read (| x |), - Value.Integer Integer.I32 2 - |)) - (Value.Integer Integer.I32 0))) + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - index_of_first_even_number; - M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.Usize 5 ] - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value index_of_first_even_number; + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 5 |)) ] + |) + |)) + ] + |) |), [ fun γ => @@ -144,15 +157,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], @@ -165,7 +178,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -174,7 +188,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -193,14 +209,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -232,8 +250,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| vec |) ] |) |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -243,22 +261,31 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Pure.lt (M.read (| x |)) (Value.Integer Integer.I32 0))) + BinOp.Pure.lt (| + M.read (| x |), + M.of_value (| Value.Integer 0 |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - index_of_first_negative_number; - M.alloc (| Value.StructTuple "core::option::Option::None" [] |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value index_of_first_negative_number; + A.to_value + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |)) + ] + |) |), [ fun γ => @@ -268,15 +295,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], @@ -289,7 +316,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -298,7 +326,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -317,19 +347,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 5b029fc05..f7707ee76 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 @@ -21,7 +21,7 @@ fn main() { // available and uncommenting above line will not cause an error. } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -36,8 +36,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -51,23 +51,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in let contains := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -102,7 +105,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := let _ := @@ -114,51 +118,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::function::Fn", - Ty.function - [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] ] - (Ty.path "bool"), - [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] ], - "call", - [] - |), - [ - contains; - Value.Tuple [ M.alloc (| Value.Integer Integer.I32 1 |) ] - ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + Ty.function + [ + Ty.tuple + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] + (Ty.path "bool"), + [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ], + "call", + [] + |), + [ + contains; + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| M.of_value (| Value.Integer 1 |) |)) + ] + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -169,52 +193,72 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::function::Fn", - Ty.function - [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] ] - (Ty.path "bool"), - [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] ], - "call", - [] - |), - [ - contains; - Value.Tuple [ M.alloc (| Value.Integer Integer.I32 4 |) ] - ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + Ty.function + [ + Ty.tuple + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ] + (Ty.path "bool"), + [ Ty.tuple [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + ], + "call", + [] + |), + [ + contains; + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| M.of_value (| Value.Integer 4 |) |)) + ] + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 c75ff23fa..ecebfac3e 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 @@ -6,7 +6,7 @@ fn call_me(f: F) { f(); } *) -Definition call_me (τ : list Ty.t) (α : list Value.t) : M := +Definition call_me (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ f ] => ltac:(M.monadic @@ -16,10 +16,10 @@ Definition call_me (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::function::Fn", F, [ Ty.tuple [] ], "call", [] |), - [ f; Value.Tuple [] ] + [ f; M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -29,7 +29,7 @@ fn function() { println!("I'm a function!"); } *) -Definition function (τ : list Ty.t) (α : list Value.t) : M := +Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -44,16 +44,25 @@ Definition function (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "I'm a function! -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "I'm a function! +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -67,15 +76,15 @@ fn main() { call_me(function); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let closure := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -98,23 +107,34 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "I'm a closure! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "I'm a closure! +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.alloc (| @@ -136,7 +156,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.get_function (| "functions_closures_input_functions::function", [] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 6db32a3aa..0ce3dd6b0 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 @@ -12,8 +12,11 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition main (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. Module main. (* @@ -24,7 +27,7 @@ Module main. f(); } *) - Definition apply (τ : list Ty.t) (α : list Value.t) : M := + Definition apply (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ f ] => ltac:(M.monadic @@ -40,10 +43,10 @@ Module main. "call_once", [] |), - [ M.read (| f |); Value.Tuple [] ] + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 abd7a42ad..99b7316f5 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 @@ -9,7 +9,7 @@ where f(); } *) -Definition apply (τ : list Ty.t) (α : list Value.t) : M := +Definition apply (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ F ], [ f ] => ltac:(M.monadic @@ -19,10 +19,10 @@ Definition apply (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::function::Fn", F, [ Ty.tuple [] ], "call", [] |), - [ f; Value.Tuple [] ] + [ f; M.of_value (| Value.Tuple [] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -38,16 +38,16 @@ fn main() { apply(print); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.I32 7 |) in + let x := M.alloc (| M.of_value (| Value.Integer 7 |) |) in let print := M.alloc (| - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -70,41 +70,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ x ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) |) in let _ := M.alloc (| @@ -116,7 +130,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| print |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 7e421b5a9..4c5bb0874 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_order.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_order.v @@ -23,7 +23,7 @@ Module Impl_functions_order_SomeType. self.meth2(); } *) - Definition meth1 (τ : list Ty.t) (α : list Value.t) : M := + Definition meth1 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -36,7 +36,7 @@ Module Impl_functions_order_SomeType. [ M.read (| self |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44,12 +44,12 @@ Module Impl_functions_order_SomeType. Axiom AssociatedFunction_meth1 : M.IsAssociatedFunction Self "meth1" meth1. (* fn meth2(self) {} *) - Definition meth2 (τ : list Ty.t) (α : list Value.t) : M := + Definition meth2 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -62,7 +62,7 @@ fn depends_on_trait_impl(u: u32, b: bool) { SomeType(u).some_trait_foo(); } *) -Definition depends_on_trait_impl (τ : list Ty.t) (α : list Value.t) : M := +Definition depends_on_trait_impl (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ u; b ] => ltac:(M.monadic @@ -79,7 +79,13 @@ Definition depends_on_trait_impl (τ : list Ty.t) (α : list Value.t) : M := "some_trait_foo", [] |), - [ M.alloc (| Value.StructTuple "functions_order::OtherType" [ M.read (| b |) ] |) ] + [ + M.alloc (| + M.of_value (| + Value.StructTuple "functions_order::OtherType" [ A.to_value (M.read (| b |)) ] + |) + |) + ] |) |) in let _ := @@ -92,10 +98,16 @@ Definition depends_on_trait_impl (τ : list Ty.t) (α : list Value.t) : M := "some_trait_foo", [] |), - [ M.alloc (| Value.StructTuple "functions_order::SomeType" [ M.read (| u |) ] |) ] + [ + M.alloc (| + M.of_value (| + Value.StructTuple "functions_order::SomeType" [ A.to_value (M.read (| u |)) ] + |) + |) + ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -111,7 +123,7 @@ Module Impl_functions_order_SomeTrait_for_functions_order_SomeType. self.some_trait_bar() } *) - Definition some_trait_foo (τ : list Ty.t) (α : list Value.t) : M := + Definition some_trait_foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -130,12 +142,12 @@ Module Impl_functions_order_SomeTrait_for_functions_order_SomeType. end. (* fn some_trait_bar(&self) {} *) - Definition some_trait_bar (τ : list Ty.t) (α : list Value.t) : M := + Definition some_trait_bar (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -155,22 +167,22 @@ Module Impl_functions_order_SomeTrait_for_functions_order_OtherType. Definition Self : Ty.t := Ty.path "functions_order::OtherType". (* fn some_trait_foo(&self) {} *) - Definition some_trait_foo (τ : list Ty.t) (α : list Value.t) : M := + Definition some_trait_foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. (* fn some_trait_bar(&self) {} *) - Definition some_trait_bar (τ : list Ty.t) (α : list Value.t) : M := + Definition some_trait_bar (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -193,7 +205,7 @@ Module inner_mod. tar(); } *) - Definition bar (τ : list Ty.t) (α : list Value.t) : M := + Definition bar (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -202,14 +214,17 @@ Module inner_mod. M.alloc (| M.call_closure (| M.get_function (| "functions_order::inner_mod::tar", [] |), [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. (* fn tar() {} *) - Definition tar (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. + Definition tar (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. Module nested_mod. (* @@ -217,7 +232,7 @@ Module inner_mod. tack(); } *) - Definition tick (τ : list Ty.t) (α : list Value.t) : M := + Definition tick (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -229,14 +244,17 @@ Module inner_mod. [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. (* fn tack() {} *) - Definition tack (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. + Definition tack (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. End nested_mod. End inner_mod. @@ -248,7 +266,7 @@ fn main() { SomeType(0).meth1(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -263,14 +281,23 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "functions_order::SomeType", "meth1", [] |), - [ Value.StructTuple "functions_order::SomeType" [ Value.Integer Integer.U32 0 ] ] + [ + M.of_value (| + Value.StructTuple + "functions_order::SomeType" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. (* fn foo() {} *) -Definition foo (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition foo (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. 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 2be810b78..557a556ea 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 @@ -6,14 +6,15 @@ fn is_odd(n: u32) -> bool { n % 2 == 1 } *) -Definition is_odd (τ : list Ty.t) (α : list Value.t) : M := +Definition is_odd (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ n ] => ltac:(M.monadic (let n := M.alloc (| n |) in - BinOp.Pure.eq - (BinOp.Panic.rem (| M.read (| n |), Value.Integer Integer.U32 2 |)) - (Value.Integer Integer.U32 1))) + BinOp.Pure.eq (| + BinOp.Panic.rem (| Integer.U32, M.read (| n |), M.of_value (| Value.Integer 2 |) |), + M.of_value (| Value.Integer 1 |) + |))) | _, _ => M.impossible end. @@ -49,7 +50,7 @@ fn main() { println!("functional style: {}", sum_of_squared_odd_numbers); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -64,25 +65,31 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "Find the sum of all the squared odd numbers under 1000 + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Find the sum of all the squared odd numbers under 1000 " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let upper := M.alloc (| Value.Integer Integer.U32 1000 |) in - let acc := M.alloc (| Value.Integer Integer.U32 0 |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let upper := M.alloc (| M.of_value (| Value.Integer 1000 |) |) in + let acc := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := M.use (M.match_operator (| @@ -96,9 +103,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.U32 0) ] + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.of_value (| Value.Integer 0 |))) ] + |) ] |) |), @@ -139,19 +148,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let n := M.copy (| γ0_0 |) in let n_squared := M.alloc (| - BinOp.Panic.mul (| M.read (| n |), M.read (| n |) |) + BinOp.Panic.mul (| + Integer.U32, + M.read (| n |), + M.read (| n |) + |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ge - (M.read (| n_squared |)) - (M.read (| upper |)) + BinOp.Pure.ge (| + M.read (| n_squared |), + M.read (| upper |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -164,7 +178,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -189,20 +203,22 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.write (| β, BinOp.Panic.add (| + Integer.U32, M.read (| β |), M.read (| n_squared |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -216,36 +232,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "imperative style: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "imperative style: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ acc ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ acc ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let sum_of_squared_odd_numbers := M.alloc (| M.call_closure (| @@ -331,11 +355,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |), [ - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.U32 0) ]; - M.closure - (fun γ => + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ ("start", A.to_value (M.of_value (| Value.Integer 0 |))) ] + |); + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -345,15 +371,20 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in - BinOp.Panic.mul (| M.read (| n |), M.read (| n |) |))) + BinOp.Panic.mul (| + Integer.U32, + M.read (| n |), + M.read (| n |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -364,17 +395,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let γ := M.read (| γ |) in let n_squared := M.copy (| γ |) in - BinOp.Pure.lt - (M.read (| n_squared |)) - (M.read (| upper |)))) + BinOp.Pure.lt (| + M.read (| n_squared |), + M.read (| upper |) + |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -392,7 +425,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -408,37 +442,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "functional style: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "functional style: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ sum_of_squared_odd_numbers ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ sum_of_squared_odd_numbers ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics.v index c1c1d919e..6af318e82 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics.v @@ -38,26 +38,52 @@ fn main() { let _char = SingleGen('a'); // Uses `char`. } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let _s := M.alloc (| - Value.StructTuple "generics::Single" [ Value.StructTuple "generics::A" [] ] + M.of_value (| + Value.StructTuple + "generics::Single" + [ A.to_value (M.of_value (| Value.StructTuple "generics::A" [] |)) ] + |) |) in let _char := - M.alloc (| Value.StructTuple "generics::SingleGen" [ Value.UnicodeChar 97 ] |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "generics::SingleGen" + [ A.to_value (M.of_value (| Value.UnicodeChar 97 |)) ] + |) + |) in let _t := M.alloc (| - Value.StructTuple "generics::SingleGen" [ Value.StructTuple "generics::A" [] ] + M.of_value (| + Value.StructTuple + "generics::SingleGen" + [ A.to_value (M.of_value (| Value.StructTuple "generics::A" [] |)) ] + |) |) in let _i32 := - M.alloc (| Value.StructTuple "generics::SingleGen" [ Value.Integer Integer.I32 6 ] |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "generics::SingleGen" + [ A.to_value (M.of_value (| Value.Integer 6 |)) ] + |) + |) in let _char := - M.alloc (| Value.StructTuple "generics::SingleGen" [ Value.UnicodeChar 97 ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| + Value.StructTuple + "generics::SingleGen" + [ A.to_value (M.of_value (| Value.UnicodeChar 97 |)) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 b2d533a87..4e5e8c56e 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 @@ -19,7 +19,7 @@ Module Impl_generics_associated_types_problem_Contains_i32_i32_for_generics_asso (&self.0 == number_1) && (&self.1 == number_2) } *) - Definition contains (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; number_1; number_2 ] => ltac:(M.monadic @@ -75,7 +75,7 @@ Module Impl_generics_associated_types_problem_Contains_i32_i32_for_generics_asso self.0 } *) - Definition first (τ : list Ty.t) (α : list Value.t) : M := + Definition first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -95,7 +95,7 @@ Module Impl_generics_associated_types_problem_Contains_i32_i32_for_generics_asso self.1 } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -131,12 +131,13 @@ where container.last() - container.first() } *) -Definition difference (τ : list Ty.t) (α : list Value.t) : M := +Definition difference (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ A; B; C ], [ container ] => ltac:(M.monadic (let container := M.alloc (| container |) in BinOp.Panic.sub (| + Integer.I32, M.call_closure (| M.get_trait_method (| "generics_associated_types_problem::Contains", @@ -180,18 +181,20 @@ fn main() { println!("The difference is: {}", difference(&container)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let number_1 := M.alloc (| Value.Integer Integer.I32 3 |) in - let number_2 := M.alloc (| Value.Integer Integer.I32 10 |) in + let number_1 := M.alloc (| M.of_value (| Value.Integer 3 |) |) in + let number_2 := M.alloc (| M.of_value (| Value.Integer 10 |) |) in let container := M.alloc (| - Value.StructTuple - "generics_associated_types_problem::Container" - [ M.read (| number_1 |); M.read (| number_2 |) ] + M.of_value (| + Value.StructTuple + "generics_associated_types_problem::Container" + [ A.to_value (M.read (| number_1 |)); A.to_value (M.read (| number_2 |)) ] + |) |) in let _ := let _ := @@ -203,67 +206,79 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Does container contain " |); - M.read (| Value.String " and " |); - M.read (| Value.String ": " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Does container contain " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " and " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ": " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ M.alloc (| number_1 |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ M.alloc (| number_2 |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "generics_associated_types_problem::Contains", - Ty.path "generics_associated_types_problem::Container", - [ Ty.path "i32"; Ty.path "i32" ], - "contains", - [] - |), - [ container; number_1; number_2 ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ M.alloc (| number_1 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ M.alloc (| number_2 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "generics_associated_types_problem::Contains", + Ty.path "generics_associated_types_problem::Container", + [ Ty.path "i32"; Ty.path "i32" ], + "contains", + [] + |), + [ container; number_1; number_2 ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -274,49 +289,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "First number: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "First number: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "generics_associated_types_problem::Contains", - Ty.path "generics_associated_types_problem::Container", - [ Ty.path "i32"; Ty.path "i32" ], - "first", - [] - |), - [ container ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "generics_associated_types_problem::Contains", + Ty.path "generics_associated_types_problem::Container", + [ Ty.path "i32"; Ty.path "i32" ], + "first", + [] + |), + [ container ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -327,49 +350,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Last number: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Last number: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "generics_associated_types_problem::Contains", - Ty.path "generics_associated_types_problem::Container", - [ Ty.path "i32"; Ty.path "i32" ], - "last", - [] - |), - [ container ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "generics_associated_types_problem::Contains", + Ty.path "generics_associated_types_problem::Container", + [ Ty.path "i32"; Ty.path "i32" ], + "last", + [] + |), + [ container ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -380,51 +411,61 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The difference is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The difference is: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "generics_associated_types_problem::difference", - [ - Ty.path "i32"; - Ty.path "i32"; - Ty.path "generics_associated_types_problem::Container" - ] - |), - [ container ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "generics_associated_types_problem::difference", + [ + Ty.path "i32"; + Ty.path "i32"; + Ty.path "generics_associated_types_problem::Container" + ] + |), + [ container ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 8f148795c..71a313ded 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 @@ -25,7 +25,7 @@ Module Impl_generics_associated_types_solution_Contains_for_generics_associated_ (&self.0 == number_1) && (&self.1 == number_2) } *) - Definition contains (τ : list Ty.t) (α : list Value.t) : M := + Definition contains (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; number_1; number_2 ] => ltac:(M.monadic @@ -81,7 +81,7 @@ Module Impl_generics_associated_types_solution_Contains_for_generics_associated_ self.0 } *) - Definition first (τ : list Ty.t) (α : list Value.t) : M := + Definition first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -101,7 +101,7 @@ Module Impl_generics_associated_types_solution_Contains_for_generics_associated_ self.1 } *) - Definition last (τ : list Ty.t) (α : list Value.t) : M := + Definition last (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -121,7 +121,7 @@ Module Impl_generics_associated_types_solution_Contains_for_generics_associated_ self.0 } *) - Definition a (τ : list Ty.t) (α : list Value.t) : M := + Definition a (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -157,12 +157,13 @@ fn difference(container: &C) -> i32 { container.last() - container.first() } *) -Definition difference (τ : list Ty.t) (α : list Value.t) : M := +Definition difference (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ C ], [ container ] => ltac:(M.monadic (let container := M.alloc (| container |) in BinOp.Panic.sub (| + Integer.I32, M.call_closure (| M.get_trait_method (| "generics_associated_types_solution::Contains", @@ -192,7 +193,7 @@ fn get_a(container: &C) -> C::A { container.a() } *) -Definition get_a (τ : list Ty.t) (α : list Value.t) : M := +Definition get_a (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ C ], [ container ] => ltac:(M.monadic @@ -223,18 +224,20 @@ fn main() { println!("The difference is: {}", difference(&container)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let number_1 := M.alloc (| Value.Integer Integer.I32 3 |) in - let number_2 := M.alloc (| Value.Integer Integer.I32 10 |) in + let number_1 := M.alloc (| M.of_value (| Value.Integer 3 |) |) in + let number_2 := M.alloc (| M.of_value (| Value.Integer 10 |) |) in let container := M.alloc (| - Value.StructTuple - "generics_associated_types_solution::Container" - [ M.read (| number_1 |); M.read (| number_2 |) ] + M.of_value (| + Value.StructTuple + "generics_associated_types_solution::Container" + [ A.to_value (M.read (| number_1 |)); A.to_value (M.read (| number_2 |)) ] + |) |) in let _ := let _ := @@ -246,67 +249,79 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Does container contain " |); - M.read (| Value.String " and " |); - M.read (| Value.String ": " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Does container contain " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " and " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ": " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ M.alloc (| number_1 |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ M.alloc (| number_2 |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "generics_associated_types_solution::Contains", - Ty.path "generics_associated_types_solution::Container", - [], - "contains", - [] - |), - [ container; number_1; number_2 ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ M.alloc (| number_1 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ M.alloc (| number_2 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "generics_associated_types_solution::Contains", + Ty.path "generics_associated_types_solution::Container", + [], + "contains", + [] + |), + [ container; number_1; number_2 ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -317,49 +332,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "First number: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "First number: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "generics_associated_types_solution::Contains", - Ty.path "generics_associated_types_solution::Container", - [], - "first", - [] - |), - [ container ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "generics_associated_types_solution::Contains", + Ty.path "generics_associated_types_solution::Container", + [], + "first", + [] + |), + [ container ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -370,49 +393,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Last number: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Last number: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "generics_associated_types_solution::Contains", - Ty.path "generics_associated_types_solution::Container", - [], - "last", - [] - |), - [ container ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "generics_associated_types_solution::Contains", + Ty.path "generics_associated_types_solution::Container", + [], + "last", + [] + |), + [ container ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -423,47 +454,60 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The difference is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The difference is: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "generics_associated_types_solution::difference", - [ Ty.path "generics_associated_types_solution::Container" ] - |), - [ container ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "generics_associated_types_solution::difference", + [ + Ty.path + "generics_associated_types_solution::Container" + ] + |), + [ container ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.err b/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.err index e69de29bb..9735af079 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.err +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.err @@ -0,0 +1,10 @@ +warning: Expected an integer type for the parameters + --> examples/rust_book/generics/generics_bounds.rs:21:9 + | +21 | self.length * self.height + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: 1 warning emitted + 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 9868edbc6..3590fa341 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.v @@ -15,7 +15,7 @@ Module Impl_core_fmt_Debug_for_generics_bounds_Rectangle. Definition Self : Ty.t := Ty.path "generics_bounds::Rectangle". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -29,25 +29,27 @@ Module Impl_core_fmt_Debug_for_generics_bounds_Rectangle. |), [ M.read (| f |); - M.read (| Value.String "Rectangle" |); - M.read (| Value.String "length" |); + M.read (| M.of_value (| Value.String "Rectangle" |) |); + M.read (| M.of_value (| Value.String "length" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "generics_bounds::Rectangle", "length" - |)); - M.read (| Value.String "height" |); + |) + |); + M.read (| M.of_value (| Value.String "height" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "generics_bounds::Rectangle", "height" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -76,12 +78,13 @@ Module Impl_generics_bounds_HasArea_for_generics_bounds_Rectangle. self.length * self.height } *) - Definition area (τ : list Ty.t) (α : list Value.t) : M := + Definition area (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Panic.mul (| + Integer.Usize, M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -113,7 +116,7 @@ fn print_debug(t: &T) { println!("{:?}", t); } *) -Definition print_debug (τ : list Ty.t) (α : list Value.t) : M := +Definition print_debug (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -129,34 +132,44 @@ Definition print_debug (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ T ] ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ T ] ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -166,7 +179,7 @@ fn area(t: &T) -> f64 { t.area() } *) -Definition area (τ : list Ty.t) (α : list Value.t) : M := +Definition area (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -198,28 +211,32 @@ fn main() { // | Error: Does not implement either `Debug` or `HasArea`. } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let rectangle := M.alloc (| - Value.StructRecord - "generics_bounds::Rectangle" - [ - ("length", M.read (| UnsupportedLiteral |)); - ("height", M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructRecord + "generics_bounds::Rectangle" + [ + ("length", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))); + ("height", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) + ] + |) |) in let _triangle := M.alloc (| - Value.StructRecord - "generics_bounds::Triangle" - [ - ("length", M.read (| UnsupportedLiteral |)); - ("height", M.read (| UnsupportedLiteral |)) - ] + M.of_value (| + Value.StructRecord + "generics_bounds::Triangle" + [ + ("length", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))); + ("height", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) + ] + |) |) in let _ := M.alloc (| @@ -241,47 +258,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Area: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Area: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f64" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "generics_bounds::HasArea", - Ty.path "generics_bounds::Rectangle", - [], - "area", - [] - |), - [ rectangle ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f64" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "generics_bounds::HasArea", + Ty.path "generics_bounds::Rectangle", + [], + "area", + [] + |), + [ rectangle ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 77e19dcdb..43168790a 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 @@ -55,12 +55,15 @@ fn red(_: &T) -> &'static str { "red" } *) -Definition red (τ : list Ty.t) (α : list Value.t) : M := +Definition red (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0 ] => ltac:(M.monadic (let β0 := M.alloc (| β0 |) in - M.match_operator (| β0, [ fun γ => ltac:(M.monadic (M.read (| Value.String "red" |))) ] |))) + M.match_operator (| + β0, + [ fun γ => ltac:(M.monadic (M.read (| M.of_value (| Value.String "red" |) |))) ] + |))) | _, _ => M.impossible end. @@ -69,12 +72,15 @@ fn blue(_: &T) -> &'static str { "blue" } *) -Definition blue (τ : list Ty.t) (α : list Value.t) : M := +Definition blue (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ β0 ] => ltac:(M.monadic (let β0 := M.alloc (| β0 |) in - M.match_operator (| β0, [ fun γ => ltac:(M.monadic (M.read (| Value.String "blue" |))) ] |))) + M.match_operator (| + β0, + [ fun γ => ltac:(M.monadic (M.read (| M.of_value (| Value.String "blue" |) |))) ] + |))) | _, _ => M.impossible end. @@ -92,17 +98,23 @@ fn main() { // ^ TODO: Try uncommenting this line. } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let cardinal := - M.alloc (| Value.StructTuple "generics_bounds_test_case_empty_bounds::Cardinal" [] |) in + M.alloc (| + M.of_value (| Value.StructTuple "generics_bounds_test_case_empty_bounds::Cardinal" [] |) + |) in let blue_jay := - M.alloc (| Value.StructTuple "generics_bounds_test_case_empty_bounds::BlueJay" [] |) in + M.alloc (| + M.of_value (| Value.StructTuple "generics_bounds_test_case_empty_bounds::BlueJay" [] |) + |) in let _turkey := - M.alloc (| Value.StructTuple "generics_bounds_test_case_empty_bounds::Turkey" [] |) in + M.alloc (| + M.of_value (| Value.StructTuple "generics_bounds_test_case_empty_bounds::Turkey" [] |) + |) in let _ := let _ := M.alloc (| @@ -113,47 +125,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "A cardinal is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "A cardinal is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "generics_bounds_test_case_empty_bounds::red", - [ Ty.path "generics_bounds_test_case_empty_bounds::Cardinal" - ] - |), - [ cardinal ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "generics_bounds_test_case_empty_bounds::red", + [ + Ty.path + "generics_bounds_test_case_empty_bounds::Cardinal" + ] + |), + [ cardinal ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -164,48 +186,58 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "A blue jay is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "A blue jay is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "generics_bounds_test_case_empty_bounds::blue", - [ Ty.path "generics_bounds_test_case_empty_bounds::BlueJay" - ] - |), - [ blue_jay ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "generics_bounds_test_case_empty_bounds::blue", + [ + Ty.path + "generics_bounds_test_case_empty_bounds::BlueJay" + ] + |), + [ blue_jay ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 1e0ad887b..64447008c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_functions.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_functions.v @@ -23,42 +23,42 @@ Require Import CoqOfRust.CoqOfRust. } *) (* fn reg_fn(_s: S) {} *) -Definition reg_fn (τ : list Ty.t) (α : list Value.t) : M := +Definition reg_fn (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ _s ] => ltac:(M.monadic (let _s := M.alloc (| _s |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. (* fn gen_spec_t(_s: SGen) {} *) -Definition gen_spec_t (τ : list Ty.t) (α : list Value.t) : M := +Definition gen_spec_t (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ _s ] => ltac:(M.monadic (let _s := M.alloc (| _s |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. (* fn gen_spec_i32(_s: SGen) {} *) -Definition gen_spec_i32 (τ : list Ty.t) (α : list Value.t) : M := +Definition gen_spec_i32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ _s ] => ltac:(M.monadic (let _s := M.alloc (| _s |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. (* fn generic(_s: SGen) {} *) -Definition generic (τ : list Ty.t) (α : list Value.t) : M := +Definition generic (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ _s ] => ltac:(M.monadic (let _s := M.alloc (| _s |) in - Value.Tuple [])) + M.of_value (| Value.Tuple [] |))) | _, _ => M.impossible end. @@ -76,7 +76,7 @@ fn main() { generic(SGen('c')); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -86,9 +86,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.call_closure (| M.get_function (| "generics_functions::reg_fn", [] |), [ - Value.StructTuple - "generics_functions::S" - [ Value.StructTuple "generics_functions::A" [] ] + M.of_value (| + Value.StructTuple + "generics_functions::S" + [ A.to_value (M.of_value (| Value.StructTuple "generics_functions::A" [] |)) ] + |) ] |) |) in @@ -97,9 +99,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.call_closure (| M.get_function (| "generics_functions::gen_spec_t", [] |), [ - Value.StructTuple - "generics_functions::SGen" - [ Value.StructTuple "generics_functions::A" [] ] + M.of_value (| + Value.StructTuple + "generics_functions::SGen" + [ A.to_value (M.of_value (| Value.StructTuple "generics_functions::A" [] |)) ] + |) ] |) |) in @@ -107,24 +111,42 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "generics_functions::gen_spec_i32", [] |), - [ Value.StructTuple "generics_functions::SGen" [ Value.Integer Integer.I32 6 ] ] + [ + M.of_value (| + Value.StructTuple + "generics_functions::SGen" + [ A.to_value (M.of_value (| Value.Integer 6 |)) ] + |) + ] |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "generics_functions::generic", [ Ty.path "char" ] |), - [ Value.StructTuple "generics_functions::SGen" [ Value.UnicodeChar 97 ] ] + [ + M.of_value (| + Value.StructTuple + "generics_functions::SGen" + [ A.to_value (M.of_value (| Value.UnicodeChar 97 |)) ] + |) + ] |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "generics_functions::generic", [ Ty.path "char" ] |), - [ Value.StructTuple "generics_functions::SGen" [ Value.UnicodeChar 99 ] ] + [ + M.of_value (| + Value.StructTuple + "generics_functions::SGen" + [ A.to_value (M.of_value (| Value.UnicodeChar 99 |)) ] + |) + ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 1f353415f..310e13276 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_implementation.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_implementation.v @@ -23,7 +23,7 @@ Module Impl_generics_implementation_Val. &self.val } *) - Definition value (τ : list Ty.t) (α : list Value.t) : M := + Definition value (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -47,7 +47,7 @@ Module Impl_generics_implementation_GenVal_T. &self.gen_val } *) - Definition value (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition value (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -74,22 +74,26 @@ fn main() { println!("{}, {}", x.value(), y.value()); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let x := M.alloc (| - Value.StructRecord - "generics_implementation::Val" - [ ("val", M.read (| UnsupportedLiteral |)) ] + M.of_value (| + Value.StructRecord + "generics_implementation::Val" + [ ("val", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) ] + |) |) in let y := M.alloc (| - Value.StructRecord - "generics_implementation::GenVal" - [ ("gen_val", Value.Integer Integer.I32 3) ] + M.of_value (| + Value.StructRecord + "generics_implementation::GenVal" + [ ("gen_val", A.to_value (M.of_value (| Value.Integer 3 |))) ] + |) |) in let _ := let _ := @@ -101,70 +105,78 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String ", " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "f64" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "generics_implementation::Val", - "value", - [] - |), - [ x ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "generics_implementation::GenVal") - [ Ty.path "i32" ], - "value", - [] - |), - [ y ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "f64" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "generics_implementation::Val", + "value", + [] + |), + [ x ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "generics_implementation::GenVal") + [ Ty.path "i32" ], + "value", + [] + |), + [ y ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 b1b597946..4747e0684 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 @@ -7,7 +7,7 @@ fn compare_prints(t: &T) { println!("Display: `{}`", t); } *) -Definition compare_prints (τ : list Ty.t) (α : list Value.t) : M := +Definition compare_prints (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -23,33 +23,43 @@ Definition compare_prints (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Debug: `" |); M.read (| Value.String "` -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Debug: `" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "` +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ T ] ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ T ] ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -60,35 +70,45 @@ Definition compare_prints (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Display: `" |); M.read (| Value.String "` -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Display: `" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "` +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ T ] ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ T ] ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -99,7 +119,7 @@ fn compare_types(t: &T, u: &U) { println!("u: `{:?}`", u); } *) -Definition compare_types (τ : list Ty.t) (α : list Value.t) : M := +Definition compare_types (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T; U ], [ t; u ] => ltac:(M.monadic @@ -116,33 +136,43 @@ Definition compare_types (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "t: `" |); M.read (| Value.String "` -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "t: `" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "` +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ T ] ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ T ] ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -153,34 +183,44 @@ Definition compare_types (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "u: `" |); M.read (| Value.String "` -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "u: `" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "` +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ U ] ] - |), - [ u ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ U ] ] + |), + [ u ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -198,20 +238,22 @@ fn main() { compare_types(&array, &vec); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let string := M.copy (| Value.String "words" |) in + let string := M.copy (| M.of_value (| Value.String "words" |) |) in let array := M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) in let vec := M.alloc (| @@ -223,8 +265,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -238,16 +280,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -276,7 +321,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ array; vec ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 050c2bcc7..bbfb5bce2 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 @@ -23,25 +23,29 @@ Module Impl_generics_new_type_idiom_Years. Days(self.0 * 365) } *) - Definition to_days (τ : list Ty.t) (α : list Value.t) : M := + Definition to_days (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "generics_new_type_idiom::Days" - [ - BinOp.Panic.mul (| - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "generics_new_type_idiom::Years", - 0 - |) - |), - Value.Integer Integer.I64 365 - |) - ])) + M.of_value (| + Value.StructTuple + "generics_new_type_idiom::Days" + [ + A.to_value + (BinOp.Panic.mul (| + Integer.I64, + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "generics_new_type_idiom::Years", + 0 + |) + |), + M.of_value (| Value.Integer 365 |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -56,25 +60,29 @@ Module Impl_generics_new_type_idiom_Days. Years(self.0 / 365) } *) - Definition to_years (τ : list Ty.t) (α : list Value.t) : M := + Definition to_years (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "generics_new_type_idiom::Years" - [ - BinOp.Panic.div (| - M.read (| - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "generics_new_type_idiom::Days", - 0 - |) - |), - Value.Integer Integer.I64 365 - |) - ])) + M.of_value (| + Value.StructTuple + "generics_new_type_idiom::Years" + [ + A.to_value + (BinOp.Panic.div (| + Integer.I64, + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "generics_new_type_idiom::Days", + 0 + |) + |), + M.of_value (| Value.Integer 365 |) + |)) + ] + |))) | _, _ => M.impossible end. @@ -86,20 +94,21 @@ fn old_enough(age: &Years) -> bool { age.0 >= 18 } *) -Definition old_enough (τ : list Ty.t) (α : list Value.t) : M := +Definition old_enough (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ age ] => ltac:(M.monadic (let age := M.alloc (| age |) in - BinOp.Pure.ge - (M.read (| + BinOp.Pure.ge (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| age |), "generics_new_type_idiom::Years", 0 |) - |)) - (Value.Integer Integer.I64 18))) + |), + M.of_value (| Value.Integer 18 |) + |))) | _, _ => M.impossible end. @@ -112,14 +121,18 @@ fn main() { // println!("Old enough {}", old_enough(&age_days)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let age := M.alloc (| - Value.StructTuple "generics_new_type_idiom::Years" [ Value.Integer Integer.I64 5 ] + M.of_value (| + Value.StructTuple + "generics_new_type_idiom::Years" + [ A.to_value (M.of_value (| Value.Integer 5 |)) ] + |) |) in let age_days := M.alloc (| @@ -142,44 +155,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Old enough " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Old enough " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "generics_new_type_idiom::old_enough", - [] - |), - [ age ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "generics_new_type_idiom::old_enough", + [] + |), + [ age ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -190,56 +213,66 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Old enough " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Old enough " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "generics_new_type_idiom::old_enough", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "generics_new_type_idiom::Days", - "to_years", - [] - |), - [ age_days ] - |) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "generics_new_type_idiom::old_enough", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "generics_new_type_idiom::Days", + "to_years", + [] + |), + [ age_days ] + |) + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 a0cdc6a04..fa15951ff 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 @@ -15,16 +15,18 @@ fn main() { let Years(years_as_primitive_2) = years; // Destructuring } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let years := M.alloc (| - Value.StructTuple - "generics_new_type_idiom_as_base_type::Years" - [ Value.Integer Integer.I64 42 ] + M.of_value (| + Value.StructTuple + "generics_new_type_idiom_as_base_type::Years" + [ A.to_value (M.of_value (| Value.Integer 42 |)) ] + |) |) in let years_as_primitive_1 := M.copy (| @@ -46,7 +48,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let years_as_primitive_2 := M.copy (| γ0_0 |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 9f7da1a5c..c2517816d 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 @@ -26,7 +26,7 @@ Module Impl_core_cmp_PartialEq_where_core_cmp_PartialEq_A_where_core_cmp_Partial Ty.apply (Ty.path "generics_phantom_type::PhantomTuple") [ A; B ]. (* PartialEq *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -109,7 +109,7 @@ Module Impl_core_cmp_PartialEq_where_core_cmp_PartialEq_A_where_core_cmp_Partial Ty.apply (Ty.path "generics_phantom_type::PhantomStruct") [ A; B ]. (* PartialEq *) - Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (A B : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self A B in match τ, α with | [], [ self; other ] => @@ -195,42 +195,58 @@ fn main() { // _struct1 == _struct2); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let _tuple1 := M.alloc (| - Value.StructTuple - "generics_phantom_type::PhantomTuple" - [ Value.UnicodeChar 81; Value.StructTuple "core::marker::PhantomData" [] ] + M.of_value (| + Value.StructTuple + "generics_phantom_type::PhantomTuple" + [ + A.to_value (M.of_value (| Value.UnicodeChar 81 |)); + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) + ] + |) |) in let _tuple2 := M.alloc (| - Value.StructTuple - "generics_phantom_type::PhantomTuple" - [ Value.UnicodeChar 81; Value.StructTuple "core::marker::PhantomData" [] ] + M.of_value (| + Value.StructTuple + "generics_phantom_type::PhantomTuple" + [ + A.to_value (M.of_value (| Value.UnicodeChar 81 |)); + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) + ] + |) |) in let _struct1 := M.alloc (| - Value.StructRecord - "generics_phantom_type::PhantomStruct" - [ - ("first", Value.UnicodeChar 81); - ("phantom", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "generics_phantom_type::PhantomStruct" + [ + ("first", A.to_value (M.of_value (| Value.UnicodeChar 81 |))); + ("phantom", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) in let _struct2 := M.alloc (| - Value.StructRecord - "generics_phantom_type::PhantomStruct" - [ - ("first", Value.UnicodeChar 81); - ("phantom", Value.StructTuple "core::marker::PhantomData" []) - ] + M.of_value (| + Value.StructRecord + "generics_phantom_type::PhantomStruct" + [ + ("first", A.to_value (M.of_value (| Value.UnicodeChar 81 |))); + ("phantom", + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |))) + ] + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.err b/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.err index e69de29bb..29e4ec505 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.err +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.err @@ -0,0 +1,10 @@ +warning: Expected an integer type for the parameters + --> examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.rs:24:16 + | +24 | Length(self.0 + rhs.0, PhantomData) + | ^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: 1 warning emitted + 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 b29851c02..abc3dc2fe 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 @@ -13,7 +13,7 @@ Module Impl_core_fmt_Debug_for_generics_phantom_type_test_case_unit_clarificatio Definition Self : Ty.t := Ty.path "generics_phantom_type_test_case_unit_clarification::Inch". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -35,7 +35,7 @@ Module Impl_core_clone_Clone_for_generics_phantom_type_test_case_unit_clarificat Definition Self : Ty.t := Ty.path "generics_phantom_type_test_case_unit_clarification::Inch". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -71,7 +71,7 @@ Module Impl_core_fmt_Debug_for_generics_phantom_type_test_case_unit_clarificatio Definition Self : Ty.t := Ty.path "generics_phantom_type_test_case_unit_clarification::Mm". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -93,7 +93,7 @@ Module Impl_core_clone_Clone_for_generics_phantom_type_test_case_unit_clarificat Definition Self : Ty.t := Ty.path "generics_phantom_type_test_case_unit_clarification::Mm". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -129,7 +129,7 @@ Module Impl_core_fmt_Debug_where_core_fmt_Debug_Unit_for_generics_phantom_type_t Ty.apply (Ty.path "generics_phantom_type_test_case_unit_clarification::Length") [ Unit ]. (* Debug *) - Definition fmt (Unit : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (Unit : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Unit in match τ, α with | [], [ self; f ] => @@ -144,23 +144,25 @@ Module Impl_core_fmt_Debug_where_core_fmt_Debug_Unit_for_generics_phantom_type_t |), [ M.read (| f |); - M.read (| Value.String "Length" |); + M.read (| M.of_value (| Value.String "Length" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "generics_phantom_type_test_case_unit_clarification::Length", 0 - |)); + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "generics_phantom_type_test_case_unit_clarification::Length", 1 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -180,42 +182,46 @@ Module Impl_core_clone_Clone_where_core_clone_Clone_Unit_for_generics_phantom_ty Ty.apply (Ty.path "generics_phantom_type_test_case_unit_clarification::Length") [ Unit ]. (* Clone *) - Definition clone (Unit : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (Unit : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Unit in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "generics_phantom_type_test_case_unit_clarification::Length" - [ - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", Ty.path "f64", [], "clone", [] |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "generics_phantom_type_test_case_unit_clarification::Length", - 0 - |) - ] - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply (Ty.path "core::marker::PhantomData") [ Unit ], - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "generics_phantom_type_test_case_unit_clarification::Length", - 1 - |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "generics_phantom_type_test_case_unit_clarification::Length" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", Ty.path "f64", [], "clone", [] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "generics_phantom_type_test_case_unit_clarification::Length", + 0 + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::marker::PhantomData") [ Unit ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "generics_phantom_type_test_case_unit_clarification::Length", + 1 + |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -255,34 +261,38 @@ Module Impl_core_ops_arith_Add_for_generics_phantom_type_test_case_unit_clarific Length(self.0 + rhs.0, PhantomData) } *) - Definition add (Unit : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition add (Unit : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self Unit in match τ, α with | [], [ self; rhs ] => ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - Value.StructTuple - "generics_phantom_type_test_case_unit_clarification::Length" - [ - BinOp.Panic.add (| - M.read (| - M.SubPointer.get_struct_tuple_field (| - self, - "generics_phantom_type_test_case_unit_clarification::Length", - 0 - |) - |), - M.read (| - M.SubPointer.get_struct_tuple_field (| - rhs, - "generics_phantom_type_test_case_unit_clarification::Length", - 0 - |) - |) - |); - Value.StructTuple "core::marker::PhantomData" [] - ])) + M.of_value (| + Value.StructTuple + "generics_phantom_type_test_case_unit_clarification::Length" + [ + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "generics_phantom_type_test_case_unit_clarification::Length", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + rhs, + "generics_phantom_type_test_case_unit_clarification::Length", + 0 + |) + |) + |)); + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) + ] + |))) | _, _ => M.impossible end. @@ -319,22 +329,32 @@ fn main() { //let one_feter = one_foot + one_meter; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let one_foot := M.alloc (| - Value.StructTuple - "generics_phantom_type_test_case_unit_clarification::Length" - [ M.read (| UnsupportedLiteral |); Value.StructTuple "core::marker::PhantomData" [] ] + M.of_value (| + Value.StructTuple + "generics_phantom_type_test_case_unit_clarification::Length" + [ + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)); + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) + ] + |) |) in let one_meter := M.alloc (| - Value.StructTuple - "generics_phantom_type_test_case_unit_clarification::Length" - [ M.read (| UnsupportedLiteral |); Value.StructTuple "core::marker::PhantomData" [] ] + M.of_value (| + Value.StructTuple + "generics_phantom_type_test_case_unit_clarification::Length" + [ + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)); + A.to_value (M.of_value (| Value.StructTuple "core::marker::PhantomData" [] |)) + ] + |) |) in let two_feet := M.alloc (| @@ -384,42 +404,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "one foot + one_foot = " |); - M.read (| Value.String " in -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "one foot + one_foot = " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " in +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f64" ] - |), - [ - M.SubPointer.get_struct_tuple_field (| - two_feet, - "generics_phantom_type_test_case_unit_clarification::Length", - 0 - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f64" ] + |), + [ + M.SubPointer.get_struct_tuple_field (| + two_feet, + "generics_phantom_type_test_case_unit_clarification::Length", + 0 + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -430,43 +460,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "one meter + one_meter = " |); - M.read (| Value.String " mm -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "one meter + one_meter = " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " mm +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f64" ] - |), - [ - M.SubPointer.get_struct_tuple_field (| - two_meters, - "generics_phantom_type_test_case_unit_clarification::Length", - 0 - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f64" ] + |), + [ + M.SubPointer.get_struct_tuple_field (| + two_meters, + "generics_phantom_type_test_case_unit_clarification::Length", + 0 + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 02e4a197e..ad3976804 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_traits.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_traits.v @@ -22,14 +22,14 @@ Module Impl_generics_traits_DoubleDrop_T_for_U. Definition Self (T U : Ty.t) : Ty.t := U. (* fn double_drop(self, _: T) {} *) - Definition double_drop (T U : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition double_drop (T U : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T U in match τ, α with | [], [ self; β1 ] => ltac:(M.monadic (let self := M.alloc (| self |) in let β1 := M.alloc (| β1 |) in - M.match_operator (| β1, [ fun γ => ltac:(M.monadic (Value.Tuple [])) ] |))) + M.match_operator (| β1, [ fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) ] |))) | _, _ => M.impossible end. @@ -55,13 +55,13 @@ fn main() { // ^ TODO: Try uncommenting these lines. } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => 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 empty := M.alloc (| M.of_value (| Value.StructTuple "generics_traits::Empty" [] |) |) in + let null := M.alloc (| M.of_value (| Value.StructTuple "generics_traits::Null" [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -75,7 +75,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| empty |); M.read (| null |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 7001d5512..4c2ce064f 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 @@ -12,7 +12,7 @@ Module Impl_generics_where_clauses_PrintInOption_where_core_fmt_Debug_core_optio println!("{:?}", Some(self)); } *) - Definition print_in_option (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition print_in_option (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -29,40 +29,52 @@ Module Impl_generics_where_clauses_PrintInOption_where_core_fmt_Debug_core_optio M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::option::Option") [ T ] ] - |), - [ - M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ M.read (| self |) ] - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "core::option::Option") [ T ] ] + |), + [ + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| self |)) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -83,7 +95,7 @@ fn main() { vec.print_in_option(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -98,8 +110,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -113,16 +125,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -141,7 +156,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| vec |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 d1a3a64e4..7b09b07c0 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 @@ -6,14 +6,14 @@ fn gen_range() -> u32 { todo!() } *) -Definition gen_range (τ : list Ty.t) (α : list Value.t) : M := +Definition gen_range (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "not yet implemented" |) ] + [ M.read (| M.of_value (| Value.String "not yet implemented" |) |) ] |) |))) | _, _ => M.impossible @@ -53,7 +53,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -68,17 +68,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Guess the number! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Guess the number! +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let secret_number := M.alloc (| M.call_closure (| M.get_function (| "guessing_game::gen_range", [] |), [] |) @@ -99,17 +106,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Please input your guess. -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Please input your guess. +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let guess := M.alloc (| M.call_closure (| @@ -141,7 +157,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := guess ] |); - M.read (| Value.String "Failed to read line" |) + M.read (| M.of_value (| Value.String "Failed to read line" |) |) ] |) |) in @@ -207,36 +223,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "You guessed: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "You guessed: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ guess ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ guess ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -260,17 +284,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Too small! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Too small! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -286,17 +319,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Too big! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Too big! +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -316,17 +356,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "You win! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "You win! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.break (||) |) |) 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 bf6c68c66..af2a5c9d2 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 @@ -63,7 +63,7 @@ fn main() { println!("{number:>width$}"); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -78,12 +78,18 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "31 days -" |) ] |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "31 days +" |) |)) ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -92,13 +98,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [] |) - |)) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -109,15 +116,25 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Alice, this is Bob. Bob, this is Alice -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Alice, this is Bob. Bob, this is Alice +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -126,13 +143,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [] |) - |)) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -143,19 +161,25 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "the quick brown fox jumps over the lazy dog + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "the quick brown fox jumps over the lazy dog " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -164,13 +188,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [] |) - |)) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -181,14 +206,23 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Base 10: 69420 -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Base 10: 69420 +" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -197,13 +231,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [] |) - |)) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -214,36 +249,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Base 2 (binary): " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Base 2 (binary): " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_binary", - [ Ty.path "i32" ] - |), - [ M.alloc (| Value.Integer Integer.I32 69420 |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_binary", + [ Ty.path "i32" ] + |), + [ M.alloc (| M.of_value (| Value.Integer 69420 |) |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -254,36 +299,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Base 8 (octal): " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Base 8 (octal): " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_octal", - [ Ty.path "i32" ] - |), - [ M.alloc (| Value.Integer Integer.I32 69420 |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_octal", + [ Ty.path "i32" ] + |), + [ M.alloc (| M.of_value (| Value.Integer 69420 |) |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -294,36 +349,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Base 16 (hexadecimal): " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Base 16 (hexadecimal): " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "i32" ] - |), - [ M.alloc (| Value.Integer Integer.I32 69420 |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "i32" ] + |), + [ M.alloc (| M.of_value (| Value.Integer 69420 |) |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -334,36 +399,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Base 16 (hexadecimal): " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Base 16 (hexadecimal): " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_upper_hex", - [ Ty.path "i32" ] - |), - [ M.alloc (| Value.Integer Integer.I32 69420 |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_upper_hex", + [ Ty.path "i32" ] + |), + [ M.alloc (| M.of_value (| Value.Integer 69420 |) |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -378,51 +453,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ M.alloc (| Value.Integer Integer.I32 1 |) ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ M.alloc (| M.of_value (| Value.Integer 1 |) |) ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple "core::fmt::rt::Alignment::Right" []; - Value.Integer Integer.U32 0; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple - "core::fmt::rt::Count::Is" - [ Value.Integer Integer.Usize 5 ] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Right" [] + |); + M.of_value (| Value.Integer 0 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ A.to_value (M.of_value (| Value.Integer 5 |)) ] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -436,7 +531,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -451,51 +546,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ M.alloc (| Value.Integer Integer.I32 1 |) ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ M.alloc (| M.of_value (| Value.Integer 1 |) |) ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 48; - Value.StructTuple "core::fmt::rt::Alignment::Left" []; - Value.Integer Integer.U32 0; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple - "core::fmt::rt::Count::Is" - [ Value.Integer Integer.Usize 5 ] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 48 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Left" [] + |); + M.of_value (| Value.Integer 0 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ A.to_value (M.of_value (| Value.Integer 5 |)) ] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -509,7 +624,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -524,59 +639,80 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ M.alloc (| Value.Integer Integer.I32 1 |) ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "from_usize", - [] - |), - [ M.alloc (| Value.Integer Integer.Usize 5 |) ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ M.alloc (| M.of_value (| Value.Integer 1 |) |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "from_usize", + [] + |), + [ M.alloc (| M.of_value (| Value.Integer 5 |) |) ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 48; - Value.StructTuple "core::fmt::rt::Alignment::Right" []; - Value.Integer Integer.U32 0; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple - "core::fmt::rt::Count::Param" - [ Value.Integer Integer.Usize 1 ] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 48 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Right" [] + |); + M.of_value (| Value.Integer 0 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Param" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -590,7 +726,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -601,14 +737,23 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "My name is Bond, James Bond -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "My name is Bond, James Bond +" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -617,15 +762,16 @@ 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 Integer.Usize 5 |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let number := M.copy (| M.of_value (| UnsupportedLiteral |) |) in + let width := M.alloc (| M.of_value (| Value.Integer 5 |) |) in let _ := let _ := M.alloc (| @@ -640,59 +786,80 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f64" ] - |), - [ number ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "from_usize", - [] - |), - [ width ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f64" ] + |), + [ number ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "from_usize", + [] + |), + [ width ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple "core::fmt::rt::Alignment::Right" []; - Value.Integer Integer.U32 0; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple - "core::fmt::rt::Count::Param" - [ Value.Integer Integer.Usize 1 ] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Right" [] + |); + M.of_value (| Value.Integer 0 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Param" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -706,8 +873,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 d3ea4451c..e1edbc0d0 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 @@ -9,7 +9,7 @@ fn main() { println!("Hello World!"); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -24,16 +24,25 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "Hello World! -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Hello World! +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 4b3c55e46..75a0d5e68 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 @@ -7,7 +7,7 @@ fn main() { say_hello!() } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -21,15 +21,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "Hello! -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "Hello! +" |) |)) ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 5b3ebfa1b..bba6fab78 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 @@ -7,7 +7,7 @@ Require Import CoqOfRust.CoqOfRust. println!("You called {:?}()", stringify!($func_name)); } *) -Definition foo (τ : list Ty.t) (α : list Value.t) : M := +Definition foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -22,37 +22,45 @@ Definition foo (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "You called " |); - M.read (| Value.String "() -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "You called " |) |)); + A.to_value (M.read (| M.of_value (| Value.String "() +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ Value.String "foo" ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ M.of_value (| Value.String "foo" |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -63,7 +71,7 @@ Definition foo (τ : list Ty.t) (α : list Value.t) : M := println!("You called {:?}()", stringify!($func_name)); } *) -Definition bar (τ : list Ty.t) (α : list Value.t) : M := +Definition bar (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -78,37 +86,45 @@ Definition bar (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "You called " |); - M.read (| Value.String "() -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "You called " |) |)); + A.to_value (M.read (| M.of_value (| Value.String "() +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ Value.String "bar" ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ M.of_value (| Value.String "bar" |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -128,7 +144,7 @@ fn main() { }); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -151,52 +167,61 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ Value.String "1u32 + 1" ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - BinOp.Panic.add (| - Value.Integer Integer.U32 1, - Value.Integer Integer.U32 1 - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ M.of_value (| Value.String "1u32 + 1" |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + BinOp.Panic.add (| + Integer.U32, + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 1 |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -207,60 +232,79 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ Value.String "{ let x = 1u32; x * x + 2 * x - 1 }" ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ - let x := M.alloc (| Value.Integer Integer.U32 1 |) in - M.alloc (| - BinOp.Panic.sub (| - BinOp.Panic.add (| - BinOp.Panic.mul (| M.read (| x |), M.read (| x |) |), - BinOp.Panic.mul (| - Value.Integer Integer.U32 2, - M.read (| x |) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.of_value (| + Value.String "{ let x = 1u32; x * x + 2 * x - 1 }" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ + let x := M.alloc (| M.of_value (| 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, + M.of_value (| Value.Integer 2 |), + M.read (| x |) + |) + |), + M.of_value (| Value.Integer 1 |) |) - |), - Value.Integer Integer.U32 1 - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 effe126ee..e86c85777 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 @@ -12,7 +12,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -20,7 +20,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := let val := M.alloc (| - BinOp.Panic.add (| Value.Integer Integer.Usize 1, Value.Integer Integer.Usize 2 |) + BinOp.Panic.add (| + Integer.Usize, + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := let _ := @@ -32,40 +36,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "1 + 2 = " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "1 + 2 = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ val ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ val ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let val := M.alloc (| BinOp.Panic.mul (| - BinOp.Panic.add (| Value.Integer Integer.Usize 1, Value.Integer Integer.Usize 2 |), - BinOp.Panic.div (| Value.Integer Integer.Usize 3, Value.Integer Integer.Usize 4 |) + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 2 |) + |), + BinOp.Panic.div (| + Integer.Usize, + M.of_value (| Value.Integer 3 |), + M.of_value (| Value.Integer 4 |) + |) |) |) in let _ := @@ -78,37 +101,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "(1 + 2) * (3 / 4) = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "(1 + 2) * (3 / 4) = " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ val ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ val ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 8aa0dba54..f426e071e 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 @@ -7,7 +7,7 @@ fn main() { test!(true; or false); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -22,72 +22,85 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " and " |); - M.read (| Value.String " is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " and " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ Value.String "1i32 + 1 == 2i32" ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ Value.String "2i32 * 2 == 4i32" ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - LogicalOp.and (| - BinOp.Pure.eq - (BinOp.Panic.add (| - Value.Integer Integer.I32 1, - Value.Integer Integer.I32 1 - |)) - (Value.Integer Integer.I32 2), - ltac:(M.monadic - (BinOp.Pure.eq - (BinOp.Panic.mul (| - Value.Integer Integer.I32 2, - Value.Integer Integer.I32 2 - |)) - (Value.Integer Integer.I32 4))) - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ M.of_value (| Value.String "1i32 + 1 == 2i32" |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ M.of_value (| Value.String "2i32 * 2 == 4i32" |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + LogicalOp.and (| + BinOp.Pure.eq (| + BinOp.Panic.add (| + Integer.I32, + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 2 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + BinOp.Panic.mul (| + Integer.I32, + M.of_value (| Value.Integer 2 |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 4 |) + |))) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -98,62 +111,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " or " |); - M.read (| Value.String " is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " or " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ Value.String "true" ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ Value.String "false" ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - LogicalOp.or (| - Value.Bool true, - ltac:(M.monadic (Value.Bool false)) - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ M.of_value (| Value.String "true" |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ M.of_value (| Value.String "false" |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + LogicalOp.or (| + M.of_value (| Value.Bool true |), + ltac:(M.monadic (M.of_value (| Value.Bool false |))) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 46c916959..79d1a4514 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 @@ -8,7 +8,7 @@ fn main() { println!("{}", find_min!(5, 2 * 3, 4)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -23,12 +23,18 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "1 -" |) ] |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "1 +" |) |)) ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -37,13 +43,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [] |) - |)) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -54,46 +61,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "core::cmp::min", [ Ty.path "i32" ] |), - [ - BinOp.Panic.add (| - Value.Integer Integer.I32 1, - Value.Integer Integer.I32 2 - |); - Value.Integer Integer.I32 2 - ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| "core::cmp::min", [ Ty.path "i32" ] |), + [ + BinOp.Panic.add (| + Integer.I32, + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 2 |) + |); + M.of_value (| Value.Integer 2 |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -104,53 +122,67 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "core::cmp::min", [ Ty.path "i32" ] |), - [ - Value.Integer Integer.I32 5; + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "i32" ] |), [ - BinOp.Panic.mul (| - Value.Integer Integer.I32 2, - Value.Integer Integer.I32 3 - |); - Value.Integer Integer.I32 4 + M.of_value (| Value.Integer 5 |); + M.call_closure (| + M.get_function (| + "core::cmp::min", + [ Ty.path "i32" ] + |), + [ + BinOp.Panic.mul (| + Integer.I32, + M.of_value (| Value.Integer 2 |), + M.of_value (| Value.Integer 3 |) + |); + M.of_value (| Value.Integer 4 |) + ] + |) ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 2d375a672..8b4032893 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 @@ -10,7 +10,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -18,7 +18,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := let val := M.alloc (| - BinOp.Panic.add (| Value.Integer Integer.Usize 1, Value.Integer Integer.Usize 2 |) + BinOp.Panic.add (| + Integer.Usize, + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 2 |) + |) |) in let _ := let _ := @@ -30,39 +34,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "1 + 2 = " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "1 + 2 = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ val ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ val ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let val := M.alloc (| - BinOp.Panic.add (| Value.Integer Integer.Usize 3, Value.Integer Integer.Usize 4 |) + BinOp.Panic.add (| + Integer.Usize, + M.of_value (| Value.Integer 3 |), + M.of_value (| Value.Integer 4 |) + |) |) in let _ := let _ := @@ -74,40 +92,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "3 + 4 = " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "3 + 4 = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ val ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ val ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let val := M.alloc (| BinOp.Panic.add (| - BinOp.Panic.mul (| Value.Integer Integer.Usize 2, Value.Integer Integer.Usize 3 |), - Value.Integer Integer.Usize 1 + Integer.Usize, + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 2 |), + M.of_value (| Value.Integer 3 |) + |), + M.of_value (| Value.Integer 1 |) |) |) in let _ := @@ -120,37 +153,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "(2 * 3) + 1 = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "(2 * 3) + 1 = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ val ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ val ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 5a9cae7e3..90febd648 100644 --- a/CoqOfRust/examples/default/examples/rust_book/modules/struct_visibility.v +++ b/CoqOfRust/examples/default/examples/rust_book/modules/struct_visibility.v @@ -25,15 +25,17 @@ Module my. ClosedBox { contents: contents } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ contents ] => ltac:(M.monadic (let contents := M.alloc (| contents |) in - Value.StructRecord - "struct_visibility::my::ClosedBox" - [ ("contents", M.read (| contents |)) ])) + M.of_value (| + Value.StructRecord + "struct_visibility::my::ClosedBox" + [ ("contents", A.to_value (M.read (| contents |))) ] + |))) | _, _ => M.impossible end. @@ -66,16 +68,21 @@ fn main() { // TODO ^ Try uncommenting this line } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let open_box := M.alloc (| - Value.StructRecord - "struct_visibility::my::OpenBox" - [ ("contents", M.read (| Value.String "public information" |)) ] + M.of_value (| + Value.StructRecord + "struct_visibility::my::OpenBox" + [ + ("contents", + A.to_value (M.read (| M.of_value (| Value.String "public information" |) |))) + ] + |) |) in let _ := let _ := @@ -87,42 +94,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The open box contains: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The open box contains: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - open_box, - "struct_visibility::my::OpenBox", - "contents" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.SubPointer.get_struct_record_field (| + open_box, + "struct_visibility::my::OpenBox", + "contents" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _closed_box := M.alloc (| M.call_closure (| @@ -133,10 +150,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ M.read (| Value.String "classified information" |) ] + [ M.read (| M.of_value (| Value.String "classified information" |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 dab788279..5451b6f2e 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 @@ -6,7 +6,7 @@ fn function() { println!("called `function()`"); } *) -Definition function (τ : list Ty.t) (α : list Value.t) : M := +Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -21,18 +21,27 @@ Definition function (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "called `function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "called `function()` +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -43,7 +52,7 @@ Module cool. println!("called `cool::function()`"); } *) - Definition function (τ : list Ty.t) (α : list Value.t) : M := + Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -62,18 +71,27 @@ Module cool. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "called `cool::function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "called `cool::function()` +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -85,7 +103,7 @@ Module my. println!("called `my::function()`"); } *) - Definition function (τ : list Ty.t) (α : list Value.t) : M := + Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -104,18 +122,27 @@ Module my. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "called `my::function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "called `my::function()` +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -126,7 +153,7 @@ Module my. println!("called `my::cool::function()`"); } *) - Definition function (τ : list Ty.t) (α : list Value.t) : M := + Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -145,19 +172,29 @@ Module my. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "called `my::cool::function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "called `my::cool::function()` +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -188,7 +225,7 @@ Module my. } } *) - Definition indirect_call (τ : list Ty.t) (α : list Value.t) : M := + Definition indirect_call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -207,18 +244,28 @@ Module my. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "called `my::indirect_call()`, that -> " |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "called `my::indirect_call()`, that +> " + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "super_and_self::my::function", [] |), [] |) @@ -239,7 +286,7 @@ Module my. M.alloc (| M.call_closure (| M.get_function (| "super_and_self::cool::function", [] |), [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -250,7 +297,7 @@ fn main() { my::indirect_call(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -259,7 +306,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "super_and_self::my::indirect_call", [] |), [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 76f4daa94..82cfbbe4c 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 @@ -6,7 +6,7 @@ fn function() { println!("called `function()`"); } *) -Definition function (τ : list Ty.t) (α : list Value.t) : M := +Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -21,18 +21,27 @@ Definition function (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "called `function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "called `function()` +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -44,7 +53,7 @@ Module deeply. println!("called `deeply::nested::function()`"); } *) - Definition function (τ : list Ty.t) (α : list Value.t) : M := + Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -63,19 +72,29 @@ Module deeply. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "called `deeply::nested::function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "called `deeply::nested::function()` +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -103,7 +122,7 @@ fn main() { function(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -125,15 +144,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "Entering block -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Entering block +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -156,21 +184,30 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "Leaving block -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Leaving block +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "the_use_as_declaration::function", [] |), [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/modules/visibility.v b/CoqOfRust/examples/default/examples/rust_book/modules/visibility.v index 809ca35a8..a37fdad3b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/modules/visibility.v +++ b/CoqOfRust/examples/default/examples/rust_book/modules/visibility.v @@ -7,7 +7,7 @@ Module my_mod. println!("called `my_mod::private_function()`"); } *) - Definition private_function (τ : list Ty.t) (α : list Value.t) : M := + Definition private_function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -26,19 +26,29 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "called `my_mod::private_function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "called `my_mod::private_function()` +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -48,7 +58,7 @@ Module my_mod. println!("called `my_mod::function()`"); } *) - Definition function (τ : list Ty.t) (α : list Value.t) : M := + Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -67,18 +77,27 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "called `my_mod::function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "called `my_mod::function()` +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -89,7 +108,7 @@ Module my_mod. private_function(); } *) - Definition indirect_access (τ : list Ty.t) (α : list Value.t) : M := + Definition indirect_access (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -108,22 +127,28 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "called `my_mod::indirect_access()`, that + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "called `my_mod::indirect_access()`, that > " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -131,7 +156,7 @@ Module my_mod. [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -142,7 +167,7 @@ Module my_mod. println!("called `my_mod::nested::function()`"); } *) - Definition function (τ : list Ty.t) (α : list Value.t) : M := + Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -161,19 +186,29 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "called `my_mod::nested::function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "called `my_mod::nested::function()` +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -183,7 +218,7 @@ Module my_mod. println!("called `my_mod::nested::private_function()`"); } *) - Definition private_function (τ : list Ty.t) (α : list Value.t) : M := + Definition private_function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -202,23 +237,30 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "called `my_mod::nested::private_function()` + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "called `my_mod::nested::private_function()` " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -229,7 +271,7 @@ Module my_mod. public_function_in_nested(); } *) - Definition public_function_in_my_mod (τ : list Ty.t) (α : list Value.t) : M := + Definition public_function_in_my_mod (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -248,23 +290,29 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "called `my_mod::nested::public_function_in_my_mod()`, that + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "called `my_mod::nested::public_function_in_my_mod()`, that > " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -272,7 +320,7 @@ Module my_mod. [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -282,7 +330,7 @@ Module my_mod. println!("called `my_mod::nested::public_function_in_nested()`"); } *) - Definition public_function_in_nested (τ : list Ty.t) (α : list Value.t) : M := + Definition public_function_in_nested (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -301,24 +349,30 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "called `my_mod::nested::public_function_in_nested()` + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "called `my_mod::nested::public_function_in_nested()` " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -328,7 +382,7 @@ Module my_mod. println!("called `my_mod::nested::public_function_in_super_mod()`"); } *) - Definition public_function_in_super_mod (τ : list Ty.t) (α : list Value.t) : M := + Definition public_function_in_super_mod (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -347,24 +401,30 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "called `my_mod::nested::public_function_in_super_mod()` + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "called `my_mod::nested::public_function_in_super_mod()` " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -378,7 +438,7 @@ Module my_mod. nested::public_function_in_super_mod(); } *) - Definition call_public_function_in_my_mod (τ : list Ty.t) (α : list Value.t) : M := + Definition call_public_function_in_my_mod (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -397,23 +457,29 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "called `my_mod::call_public_function_in_my_mod()`, that + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "called `my_mod::call_public_function_in_my_mod()`, that > " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -435,14 +501,20 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "> " |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "> " |) |)) ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -450,7 +522,7 @@ Module my_mod. [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -460,7 +532,7 @@ Module my_mod. println!("called `my_mod::public_function_in_crate()`"); } *) - Definition public_function_in_crate (τ : list Ty.t) (α : list Value.t) : M := + Definition public_function_in_crate (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -479,23 +551,29 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "called `my_mod::public_function_in_crate()` + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "called `my_mod::public_function_in_crate()` " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -506,7 +584,7 @@ Module my_mod. println!("called `my_mod::private_nested::function()`"); } *) - Definition function (τ : list Ty.t) (α : list Value.t) : M := + Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -525,23 +603,30 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "called `my_mod::private_nested::function()` + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "called `my_mod::private_nested::function()` " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -551,7 +636,7 @@ Module my_mod. println!("called `my_mod::private_nested::restricted_function()`"); } *) - Definition restricted_function (τ : list Ty.t) (α : list Value.t) : M := + Definition restricted_function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -570,24 +655,30 @@ Module my_mod. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "called `my_mod::private_nested::restricted_function()` + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "called `my_mod::private_nested::restricted_function()` " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -599,7 +690,7 @@ fn function() { println!("called `function()`"); } *) -Definition function (τ : list Ty.t) (α : list Value.t) : M := +Definition function (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -614,18 +705,27 @@ Definition function (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "called `function()` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "called `function()` +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -670,7 +770,7 @@ fn main() { // TODO ^ Try uncommenting this line } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -703,7 +803,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 f27b3411f..cae031b87 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 @@ -7,7 +7,7 @@ fn analyze_slice(slice: &[i32]) { println!("the slice has {} elements", slice.len()); } *) -Definition analyze_slice (τ : list Ty.t) (α : list Value.t) : M := +Definition analyze_slice (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ slice ] => ltac:(M.monadic @@ -23,41 +23,51 @@ Definition analyze_slice (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "first element of the slice: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "first element of the slice: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_array_field (| - M.read (| slice |), - M.alloc (| Value.Integer Integer.Usize 0 |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_array_field (| + M.read (| slice |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -68,48 +78,56 @@ Definition analyze_slice (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "the slice has " |); - M.read (| Value.String " elements -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "the slice has " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " elements +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "i32" ], - "len", - [] - |), - [ M.read (| slice |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "i32" ], + "len", + [] + |), + [ M.read (| slice |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -163,23 +181,25 @@ fn main() { //println!("{}", xs[5]); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let xs := M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3; - Value.Integer Integer.I32 4; - Value.Integer Integer.I32 5 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |) |) in - let ys := M.alloc (| repeat (Value.Integer Integer.I32 0) 500 |) in + let ys := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 500 |) |) in let _ := let _ := M.alloc (| @@ -190,41 +210,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "first element of the array: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "first element of the array: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_array_field (| - xs, - M.alloc (| Value.Integer Integer.Usize 0 |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_array_field (| + xs, + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -235,41 +265,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "second element of the array: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "second element of the array: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_array_field (| - xs, - M.alloc (| Value.Integer Integer.Usize 1 |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_array_field (| + xs, + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -280,47 +320,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "number of elements in array: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "number of elements in array: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "i32" ], - "len", - [] - |), - [ (* Unsize *) M.pointer_coercion xs ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "i32" ], + "len", + [] + |), + [ (* Unsize *) M.pointer_coercion (| xs |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -331,46 +381,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "array occupies " |); - M.read (| Value.String " bytes -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "array occupies " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " bytes +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] ] - |), - [ xs ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", + [ Ty.apply (Ty.path "array") [ Ty.path "i32" ] ] + |), + [ xs ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -381,23 +439,33 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "borrow the whole array as a slice -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "borrow the whole array as a slice +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "arrays_and_slices::analyze_slice", [] |), - [ (* Unsize *) M.pointer_coercion xs ] + [ (* Unsize *) M.pointer_coercion (| xs |) ] |) |) in let _ := @@ -410,19 +478,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "borrow a section of the array as a slice -" |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "borrow a section of the array as a slice +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -438,22 +515,30 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ ys; - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 1); - ("end_", Value.Integer Integer.Usize 4) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 1 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 4 |))) + ] + |) ] |) ] |) |) in - let empty_array := M.alloc (| Value.Array [] |) in + let empty_array := M.alloc (| M.of_value (| Value.Array [] |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple [ M.alloc (| empty_array |); M.alloc (| M.alloc (| Value.Array [] |) |) ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.alloc (| empty_array |)); + A.to_value (M.alloc (| M.alloc (| M.of_value (| Value.Array [] |) |) |)) + ] + |) |), [ fun γ => @@ -463,15 +548,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply @@ -486,7 +571,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -495,7 +581,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -514,14 +602,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -529,25 +619,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| empty_array |); - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply (Ty.path "array") [ Ty.path "u32" ], - [ Ty.path "core::ops::range::RangeFull" ], - "index", - [] - |), - [ - M.alloc (| Value.Array [] |); - Value.StructTuple "core::ops::range::RangeFull" [] - ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.alloc (| empty_array |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "array") [ Ty.path "u32" ], + [ Ty.path "core::ops::range::RangeFull" ], + "index", + [] + |), + [ + M.alloc (| M.of_value (| Value.Array [] |) |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] + |) + |)) + ] + |) |), [ fun γ => @@ -557,15 +650,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply @@ -580,7 +673,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -589,7 +683,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -608,14 +704,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -632,23 +730,27 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.Usize 0); - ("end_", - BinOp.Panic.add (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "slice") [ Ty.path "i32" ], - "len", - [] - |), - [ (* Unsize *) M.pointer_coercion xs ] - |), - Value.Integer Integer.Usize 1 - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "i32" ], + "len", + [] + |), + [ (* Unsize *) M.pointer_coercion (| xs |) ] + |), + M.of_value (| Value.Integer 1 |) + |))) + ] + |) ] |) |), @@ -693,7 +795,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "get", [ Ty.path "usize" ] |), - [ (* Unsize *) M.pointer_coercion xs; M.read (| i |) ] + [ (* Unsize *) M.pointer_coercion (| xs |); M.read (| i |) ] |) |), [ @@ -719,49 +821,68 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String ": " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ": " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ i ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "i32" ] - ] - |), - [ xval ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ i ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "i32" ] + ] + |), + [ xval ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -777,43 +898,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Slow down! " |); - M.read (| - Value.String " is too far! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Slow down! " + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " is too far! " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 bfc813093..5ef8fbe34 100644 --- a/CoqOfRust/examples/default/examples/rust_book/primitives/compound_types.v +++ b/CoqOfRust/examples/default/examples/rust_book/primitives/compound_types.v @@ -28,22 +28,22 @@ fn main() { let mutable = true; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => 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 Integer.I32 5 |) in - let default_float := M.copy (| UnsupportedLiteral |) in - let default_integer := M.alloc (| Value.Integer Integer.I32 7 |) in - let inferred_type := M.alloc (| Value.Integer Integer.I64 12 |) in - let _ := M.write (| inferred_type, Value.Integer Integer.I64 4294967296 |) in - let mutable := M.alloc (| Value.Integer Integer.I32 12 |) in - let _ := M.write (| mutable, Value.Integer Integer.I32 21 |) in - let mutable := M.alloc (| Value.Bool true |) in - M.alloc (| Value.Tuple [] |) + let logical := M.alloc (| M.of_value (| Value.Bool true |) |) in + let a_float := M.copy (| M.of_value (| UnsupportedLiteral |) |) in + let an_integer := M.alloc (| M.of_value (| Value.Integer 5 |) |) in + let default_float := M.copy (| M.of_value (| UnsupportedLiteral |) |) in + let default_integer := M.alloc (| M.of_value (| Value.Integer 7 |) |) in + let inferred_type := M.alloc (| M.of_value (| Value.Integer 12 |) |) in + let _ := M.write (| inferred_type, M.of_value (| Value.Integer 4294967296 |) |) in + let mutable := M.alloc (| M.of_value (| Value.Integer 12 |) |) in + let _ := M.write (| mutable, M.of_value (| Value.Integer 21 |) |) in + let mutable := M.alloc (| M.of_value (| Value.Bool true |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 eb394456f..150459a5f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/primitives/literals_operators.v +++ b/CoqOfRust/examples/default/examples/rust_book/primitives/literals_operators.v @@ -26,7 +26,7 @@ fn main() { println!("One million is written as {}", 1_000_000u32); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -41,40 +41,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "1 + 2 = " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "1 + 2 = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - BinOp.Panic.add (| - Value.Integer Integer.U32 1, - Value.Integer Integer.U32 2 - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + BinOp.Panic.add (| + Integer.U32, + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 2 |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -85,40 +96,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "1 - 2 = " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "1 - 2 = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - BinOp.Panic.sub (| - Value.Integer Integer.I32 1, - Value.Integer Integer.I32 2 - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + BinOp.Panic.sub (| + Integer.I32, + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 2 |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -129,43 +151,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "true AND false is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "true AND false is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - LogicalOp.and (| - Value.Bool true, - ltac:(M.monadic (Value.Bool false)) - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + LogicalOp.and (| + M.of_value (| Value.Bool true |), + ltac:(M.monadic (M.of_value (| Value.Bool false |))) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -176,43 +206,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "true OR false is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "true OR false is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - LogicalOp.or (| - Value.Bool true, - ltac:(M.monadic (Value.Bool false)) - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + LogicalOp.or (| + M.of_value (| Value.Bool true |), + ltac:(M.monadic (M.of_value (| Value.Bool false |))) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -223,36 +261,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "NOT true is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "NOT true is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ M.alloc (| UnOp.Pure.not (Value.Bool true) |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + UnOp.Pure.not (| M.of_value (| Value.Bool true |) |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -267,60 +317,79 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "0011 AND 0101 is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "0011 AND 0101 is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_binary", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - BinOp.Pure.bit_and - (Value.Integer Integer.U32 3) - (Value.Integer Integer.U32 5) - |) - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_binary", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + BinOp.Pure.bit_and (| + M.of_value (| Value.Integer 3 |), + M.of_value (| Value.Integer 5 |) + |) + |) + ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple "core::fmt::rt::Alignment::Unknown" []; - Value.Integer Integer.U32 8; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple - "core::fmt::rt::Count::Is" - [ Value.Integer Integer.Usize 4 ] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Unknown" [] + |); + M.of_value (| Value.Integer 8 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ A.to_value (M.of_value (| Value.Integer 4 |)) ] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -334,7 +403,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -349,60 +418,79 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "0011 OR 0101 is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "0011 OR 0101 is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_binary", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - BinOp.Pure.bit_or - (Value.Integer Integer.U32 3) - (Value.Integer Integer.U32 5) - |) - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_binary", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + BinOp.Pure.bit_or (| + M.of_value (| Value.Integer 3 |), + M.of_value (| Value.Integer 5 |) + |) + |) + ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple "core::fmt::rt::Alignment::Unknown" []; - Value.Integer Integer.U32 8; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple - "core::fmt::rt::Count::Is" - [ Value.Integer Integer.Usize 4 ] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Unknown" [] + |); + M.of_value (| Value.Integer 8 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ A.to_value (M.of_value (| Value.Integer 4 |)) ] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -416,7 +504,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -431,60 +519,79 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "0011 XOR 0101 is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "0011 XOR 0101 is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_binary", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - BinOp.Pure.bit_xor - (Value.Integer Integer.U32 3) - (Value.Integer Integer.U32 5) - |) - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_binary", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + BinOp.Pure.bit_xor (| + M.of_value (| Value.Integer 3 |), + M.of_value (| Value.Integer 5 |) + |) + |) + ] + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Placeholder", - "new", - [] - |), - [ - Value.Integer Integer.Usize 0; - Value.UnicodeChar 32; - Value.StructTuple "core::fmt::rt::Alignment::Unknown" []; - Value.Integer Integer.U32 8; - Value.StructTuple "core::fmt::rt::Count::Implied" []; - Value.StructTuple - "core::fmt::rt::Count::Is" - [ Value.Integer Integer.Usize 4 ] - ] - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Alignment::Unknown" [] + |); + M.of_value (| Value.Integer 8 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ A.to_value (M.of_value (| Value.Integer 4 |)) ] + |) + ] + |)) + ] + |) + |) + |); M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::UnsafeArg", @@ -498,7 +605,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -509,41 +616,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "1 << 5 is " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "1 << 5 is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - BinOp.Panic.shl (| - Value.Integer Integer.U32 1, - Value.Integer Integer.I32 5 - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + BinOp.Panic.shl (| + M.of_value (| Value.Integer 1 |), + M.of_value (| Value.Integer 5 |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -554,43 +671,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "0x80 >> 2 is 0x" |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "0x80 >> 2 is 0x" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_lower_hex", - [ Ty.path "u32" ] - |), - [ - M.alloc (| - BinOp.Panic.shr (| - Value.Integer Integer.U32 128, - Value.Integer Integer.I32 2 - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_lower_hex", + [ Ty.path "u32" ] + |), + [ + M.alloc (| + BinOp.Panic.shr (| + M.of_value (| Value.Integer 128 |), + M.of_value (| Value.Integer 2 |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -601,15 +726,25 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "One million is written as 1000000 -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "One million is written as 1000000 +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::rt::Argument", @@ -618,14 +753,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [] |) - |)) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/primitives/tuples.v b/CoqOfRust/examples/default/examples/rust_book/primitives/tuples.v index 62bbb5d29..e3c502f84 100644 --- a/CoqOfRust/examples/default/examples/rust_book/primitives/tuples.v +++ b/CoqOfRust/examples/default/examples/rust_book/primitives/tuples.v @@ -9,7 +9,7 @@ fn reverse(pair: (i32, bool)) -> (bool, i32) { (bool_param, int_param) } *) -Definition reverse (τ : list Ty.t) (α : list Value.t) : M := +Definition reverse (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ pair_ ] => ltac:(M.monadic @@ -24,7 +24,12 @@ Definition reverse (τ : list Ty.t) (α : list Value.t) : M := let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let int_param := M.copy (| γ0_0 |) in let bool_param := M.copy (| γ0_1 |) in - M.alloc (| Value.Tuple [ M.read (| bool_param |); M.read (| int_param |) ] |))) + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| bool_param |)); A.to_value (M.read (| int_param |)) ] + |) + |))) ] |) |))) @@ -42,7 +47,7 @@ Module Impl_core_fmt_Debug_for_tuples_Matrix. Definition Self : Ty.t := Ty.path "tuples::Matrix". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -56,21 +61,25 @@ Module Impl_core_fmt_Debug_for_tuples_Matrix. |), [ M.read (| f |); - M.read (| Value.String "Matrix" |); + M.read (| M.of_value (| Value.String "Matrix" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| M.read (| self |), "tuples::Matrix", 0 |)); + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "tuples::Matrix", 0 |) + |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| M.read (| self |), "tuples::Matrix", 1 |)); + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "tuples::Matrix", 1 |) + |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| M.read (| self |), "tuples::Matrix", 2 |)); + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "tuples::Matrix", 2 |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "tuples::Matrix", 3 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -128,28 +137,30 @@ fn main() { } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let long_tuple := M.alloc (| - Value.Tuple - [ - Value.Integer Integer.U8 1; - Value.Integer Integer.U16 2; - Value.Integer Integer.U32 3; - Value.Integer Integer.U64 4; - Value.Integer Integer.I8 (-1); - Value.Integer Integer.I16 (-2); - Value.Integer Integer.I32 (-3); - Value.Integer Integer.I64 (-4); - M.read (| UnsupportedLiteral |); - M.read (| UnsupportedLiteral |); - Value.UnicodeChar 97; - Value.Bool true - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer (-1) |)); + A.to_value (M.of_value (| Value.Integer (-2) |)); + A.to_value (M.of_value (| Value.Integer (-3) |)); + A.to_value (M.of_value (| Value.Integer (-4) |)); + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)); + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)); + A.to_value (M.of_value (| Value.UnicodeChar 97 |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |) in let _ := let _ := @@ -161,36 +172,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "long tuple first value: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "long tuple first value: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ M.SubPointer.get_tuple_field (| long_tuple, 0 |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ M.SubPointer.get_tuple_field (| long_tuple, 0 |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -201,49 +222,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "long tuple second value: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "long tuple second value: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u16" ] - |), - [ M.SubPointer.get_tuple_field (| long_tuple, 1 |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u16" ] + |), + [ M.SubPointer.get_tuple_field (| long_tuple, 1 |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let tuple_of_tuples := M.alloc (| - Value.Tuple - [ - Value.Tuple - [ - Value.Integer Integer.U8 1; - Value.Integer Integer.U16 2; - Value.Integer Integer.U32 2 - ]; - Value.Tuple [ Value.Integer Integer.U64 4; Value.Integer Integer.I8 (-1) ]; - Value.Integer Integer.I16 (-2) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer (-1) |)) + ] + |)); + A.to_value (M.of_value (| Value.Integer (-2) |)) + ] + |) |) in let _ := let _ := @@ -255,44 +298,61 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "tuple of tuples: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "tuple of tuples: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.tuple + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.tuple [ Ty.path "u8"; Ty.path "u16"; Ty.path "u32" ]; - Ty.tuple [ Ty.path "u64"; Ty.path "i8" ]; - Ty.path "i16" + Ty.tuple + [ + Ty.tuple [ Ty.path "u8"; Ty.path "u16"; Ty.path "u32" ]; + Ty.tuple [ Ty.path "u64"; Ty.path "i8" ]; + Ty.path "i16" + ] ] - ] - |), - [ tuple_of_tuples ] - |) - ] - |)) + |), + [ tuple_of_tuples ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let pair_ := M.alloc (| Value.Tuple [ Value.Integer Integer.I32 1; Value.Bool true ] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let pair_ := + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |) in let _ := let _ := M.alloc (| @@ -303,33 +363,43 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "pair is " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "pair is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.tuple [ Ty.path "i32"; Ty.path "bool" ] ] - |), - [ pair_ ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.tuple [ Ty.path "i32"; Ty.path "bool" ] ] + |), + [ pair_ ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -340,43 +410,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "the reversed pair is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "the reversed pair is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.tuple [ Ty.path "bool"; Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "tuples::reverse", [] |), - [ M.read (| pair_ |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.tuple [ Ty.path "bool"; Ty.path "i32" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| "tuples::reverse", [] |), + [ M.read (| pair_ |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -387,36 +467,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "one element tuple: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "one element tuple: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.tuple [ Ty.path "u32" ] ] - |), - [ M.alloc (| Value.Tuple [ Value.Integer Integer.U32 5 ] |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.tuple [ Ty.path "u32" ] ] + |), + [ + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.of_value (| Value.Integer 5 |)) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -427,45 +524,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "just an integer: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "just an integer: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ M.alloc (| Value.Integer Integer.U32 5 |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ M.alloc (| M.of_value (| Value.Integer 5 |) |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let tuple := M.alloc (| - Value.Tuple - [ - Value.Integer Integer.I32 1; - M.read (| Value.String "hello" |); - M.read (| UnsupportedLiteral |); - Value.Bool true - ] + M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.read (| M.of_value (| Value.String "hello" |) |)); + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) |) in M.match_operator (| tuple, @@ -494,73 +601,88 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String ", " |); - M.read (| Value.String ", " |); - M.read (| Value.String ", " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ a ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ b ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f64" ] - |), - [ c ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "bool" ] - |), - [ d ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ a ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ b ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f64" ] + |), + [ c ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "bool" ] + |), + [ d ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let matrix := M.alloc (| - Value.StructTuple - "tuples::Matrix" - [ - M.read (| UnsupportedLiteral |); - M.read (| UnsupportedLiteral |); - M.read (| UnsupportedLiteral |); - M.read (| UnsupportedLiteral |) - ] + M.of_value (| + Value.StructTuple + "tuples::Matrix" + [ + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)); + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)); + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)); + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)) + ] + |) |) in let _ := let _ := @@ -576,34 +698,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "tuples::Matrix" ] - |), - [ matrix ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "tuples::Matrix" ] + |), + [ matrix ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 dc871cf99..63540106d 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 @@ -6,7 +6,7 @@ fn eat_box_i32(boxed_i32: Box) { println!("Destroying box that contains {}", boxed_i32); } *) -Definition eat_box_i32 (τ : list Ty.t) (α : list Value.t) : M := +Definition eat_box_i32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ boxed_i32 ] => ltac:(M.monadic @@ -22,41 +22,51 @@ Definition eat_box_i32 (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Destroying box that contains " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Destroying box that contains " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ boxed_i32 ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ boxed_i32 ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -66,7 +76,7 @@ fn borrow_i32(borrowed_i32: &i32) { println!("This int is: {}", borrowed_i32); } *) -Definition borrow_i32 (τ : list Ty.t) (α : list Value.t) : M := +Definition borrow_i32 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ borrowed_i32 ] => ltac:(M.monadic @@ -82,37 +92,45 @@ Definition borrow_i32 (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "This int is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "This int is: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ borrowed_i32 ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ borrowed_i32 ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -146,7 +164,7 @@ fn main() { eat_box_i32(boxed_i32); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -161,10 +179,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.I32 5 ] + [ M.of_value (| Value.Integer 5 |) ] |) |) in - let stacked_i32 := M.alloc (| Value.Integer Integer.I32 6 |) in + let stacked_i32 := M.alloc (| M.of_value (| Value.Integer 6 |) |) in let _ := M.alloc (| M.call_closure (| @@ -188,7 +206,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| _ref_to_i32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -196,7 +214,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| boxed_i32 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 177ad309f..b13c33f8a 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 @@ -65,20 +65,22 @@ fn main() { ); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let point := M.alloc (| - Value.StructRecord - "scoping_rules_borrowing_aliasing::Point" - [ - ("x", Value.Integer Integer.I32 0); - ("y", Value.Integer Integer.I32 0); - ("z", Value.Integer Integer.I32 0) - ] + M.of_value (| + Value.StructRecord + "scoping_rules_borrowing_aliasing::Point" + [ + ("x", A.to_value (M.of_value (| Value.Integer 0 |))); + ("y", A.to_value (M.of_value (| Value.Integer 0 |))); + ("z", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let borrowed_point := M.alloc (| point |) in let another_borrow := M.alloc (| point |) in @@ -92,72 +94,84 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Point has coordinates: (" |); - M.read (| Value.String ", " |); - M.read (| Value.String ", " |); - M.read (| Value.String ") -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Point has coordinates: (" |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| borrowed_point |), - "scoping_rules_borrowing_aliasing::Point", - "x" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| another_borrow |), - "scoping_rules_borrowing_aliasing::Point", - "y" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - point, - "scoping_rules_borrowing_aliasing::Point", - "z" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| borrowed_point |), + "scoping_rules_borrowing_aliasing::Point", + "x" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| another_borrow |), + "scoping_rules_borrowing_aliasing::Point", + "y" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + point, + "scoping_rules_borrowing_aliasing::Point", + "z" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -168,72 +182,84 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Point has coordinates: (" |); - M.read (| Value.String ", " |); - M.read (| Value.String ", " |); - M.read (| Value.String ") -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Point has coordinates: (" |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| borrowed_point |), - "scoping_rules_borrowing_aliasing::Point", - "x" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| another_borrow |), - "scoping_rules_borrowing_aliasing::Point", - "y" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - point, - "scoping_rules_borrowing_aliasing::Point", - "z" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| borrowed_point |), + "scoping_rules_borrowing_aliasing::Point", + "x" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| another_borrow |), + "scoping_rules_borrowing_aliasing::Point", + "y" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + point, + "scoping_rules_borrowing_aliasing::Point", + "z" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let mutable_borrow := M.alloc (| point |) in let _ := M.write (| @@ -242,7 +268,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "scoping_rules_borrowing_aliasing::Point", "x" |), - Value.Integer Integer.I32 5 + M.of_value (| Value.Integer 5 |) |) in let _ := M.write (| @@ -251,7 +277,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "scoping_rules_borrowing_aliasing::Point", "y" |), - Value.Integer Integer.I32 2 + M.of_value (| Value.Integer 2 |) |) in let _ := M.write (| @@ -260,7 +286,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "scoping_rules_borrowing_aliasing::Point", "z" |), - Value.Integer Integer.I32 1 + M.of_value (| Value.Integer 1 |) |) in let _ := let _ := @@ -272,72 +298,84 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Point has coordinates: (" |); - M.read (| Value.String ", " |); - M.read (| Value.String ", " |); - M.read (| Value.String ") -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Point has coordinates: (" |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| mutable_borrow |), - "scoping_rules_borrowing_aliasing::Point", - "x" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| mutable_borrow |), - "scoping_rules_borrowing_aliasing::Point", - "y" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| mutable_borrow |), - "scoping_rules_borrowing_aliasing::Point", - "z" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| mutable_borrow |), + "scoping_rules_borrowing_aliasing::Point", + "x" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| mutable_borrow |), + "scoping_rules_borrowing_aliasing::Point", + "y" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| mutable_borrow |), + "scoping_rules_borrowing_aliasing::Point", + "z" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let new_borrowed_point := M.alloc (| point |) in let _ := let _ := @@ -349,73 +387,85 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Point now has coordinates: (" |); - M.read (| Value.String ", " |); - M.read (| Value.String ", " |); - M.read (| Value.String ") -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Point now has coordinates: (" |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| new_borrowed_point |), - "scoping_rules_borrowing_aliasing::Point", - "x" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| new_borrowed_point |), - "scoping_rules_borrowing_aliasing::Point", - "y" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| new_borrowed_point |), - "scoping_rules_borrowing_aliasing::Point", - "z" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| new_borrowed_point |), + "scoping_rules_borrowing_aliasing::Point", + "x" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| new_borrowed_point |), + "scoping_rules_borrowing_aliasing::Point", + "y" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| new_borrowed_point |), + "scoping_rules_borrowing_aliasing::Point", + "z" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 e00a52d85..d47ebc943 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 @@ -17,24 +17,24 @@ Module Impl_core_clone_Clone_for_scoping_rules_borrowing_mutablity_Book. Definition Self : Ty.t := Ty.path "scoping_rules_borrowing_mutablity::Book". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |))) ] @@ -68,7 +68,7 @@ fn borrow_book(book: &Book) { ); } *) -Definition borrow_book (τ : list Ty.t) (α : list Value.t) : M := +Definition borrow_book (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ book ] => ltac:(M.monadic @@ -84,58 +84,69 @@ Definition borrow_book (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "I immutably borrowed " |); - M.read (| Value.String " - " |); - M.read (| Value.String " edition -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "I immutably borrowed " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " - " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " edition +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| book |), - "scoping_rules_borrowing_mutablity::Book", - "title" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| book |), - "scoping_rules_borrowing_mutablity::Book", - "year" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| book |), + "scoping_rules_borrowing_mutablity::Book", + "title" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| book |), + "scoping_rules_borrowing_mutablity::Book", + "year" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -146,7 +157,7 @@ fn new_edition(book: &mut Book) { println!("I mutably borrowed {} - {} edition", book.title, book.year); } *) -Definition new_edition (τ : list Ty.t) (α : list Value.t) : M := +Definition new_edition (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ book ] => ltac:(M.monadic @@ -159,7 +170,7 @@ Definition new_edition (τ : list Ty.t) (α : list Value.t) : M := "scoping_rules_borrowing_mutablity::Book", "year" |), - Value.Integer Integer.U32 2014 + M.of_value (| Value.Integer 2014 |) |) in let _ := let _ := @@ -171,58 +182,69 @@ Definition new_edition (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "I mutably borrowed " |); - M.read (| Value.String " - " |); - M.read (| Value.String " edition -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "I mutably borrowed " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " - " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " edition +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| book |), - "scoping_rules_borrowing_mutablity::Book", - "title" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| book |), - "scoping_rules_borrowing_mutablity::Book", - "year" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| book |), + "scoping_rules_borrowing_mutablity::Book", + "title" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| book |), + "scoping_rules_borrowing_mutablity::Book", + "year" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -254,21 +276,29 @@ fn main() { // FIXME ^ Comment out this line } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let immutabook := M.alloc (| - Value.StructRecord - "scoping_rules_borrowing_mutablity::Book" - [ - ("author", M.read (| Value.String "Douglas Hofstadter" |)); - ("title", - M.read (| Value.String ("G" ++ (String.String "246" "del, Escher, Bach")) |)); - ("year", Value.Integer Integer.U32 1979) - ] + M.of_value (| + Value.StructRecord + "scoping_rules_borrowing_mutablity::Book" + [ + ("author", + A.to_value (M.read (| M.of_value (| Value.String "Douglas Hofstadter" |) |))); + ("title", + A.to_value + (M.read (| + M.of_value (| + Value.String ("G" ++ (String.String "246" "del, Escher, Bach")) + |) + |))); + ("year", A.to_value (M.of_value (| Value.Integer 1979 |))) + ] + |) |) in let mutabook := M.copy (| immutabook |) in let _ := @@ -292,7 +322,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ mutabook ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 867963e01..9ab954393 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 @@ -12,14 +12,14 @@ Module Impl_core_clone_Clone_for_scoping_rules_borrowing_the_ref_pattern_Point. Definition Self : Ty.t := Ty.path "scoping_rules_borrowing_the_ref_pattern::Point". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -98,12 +98,12 @@ fn main() { println!("tuple is {:?}", mutable_tuple); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let c := M.alloc (| Value.UnicodeChar 81 |) in + let c := M.alloc (| M.of_value (| Value.UnicodeChar 81 |) |) in M.match_operator (| c, [ @@ -125,47 +125,63 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "ref_c1 equals ref_c2: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "ref_c1 equals ref_c2: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - BinOp.Pure.eq - (M.read (| M.read (| ref_c1 |) |)) - (M.read (| M.read (| ref_c2 |) |)) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + BinOp.Pure.eq (| + M.read (| M.read (| ref_c1 |) |), + M.read (| M.read (| ref_c2 |) |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let point := M.alloc (| - Value.StructRecord - "scoping_rules_borrowing_the_ref_pattern::Point" - [ ("x", Value.Integer Integer.I32 0); ("y", Value.Integer Integer.I32 0) ] + M.of_value (| + Value.StructRecord + "scoping_rules_borrowing_the_ref_pattern::Point" + [ + ("x", A.to_value (M.of_value (| Value.Integer 0 |))); + ("y", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) |) in let _copy_of_x := M.copy (| @@ -212,8 +228,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let mut_ref_to_y := M.alloc (| γ0_1 |) in let _ := - M.write (| M.read (| mut_ref_to_y |), Value.Integer Integer.I32 1 |) in - M.alloc (| Value.Tuple [] |))) + M.write (| + M.read (| mut_ref_to_y |), + M.of_value (| Value.Integer 1 |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -230,57 +249,67 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "point is (" |); - M.read (| Value.String ", " |); - M.read (| Value.String ") -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "point is (" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - point, - "scoping_rules_borrowing_the_ref_pattern::Point", - "x" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - point, - "scoping_rules_borrowing_the_ref_pattern::Point", - "y" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + point, + "scoping_rules_borrowing_the_ref_pattern::Point", + "x" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + point, + "scoping_rules_borrowing_the_ref_pattern::Point", + "y" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -295,73 +324,88 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "mutable_point is (" |); - M.read (| Value.String ", " |); - M.read (| Value.String ") -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "mutable_point is (" |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ", " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - mutable_point, - "scoping_rules_borrowing_the_ref_pattern::Point", - "x" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - mutable_point, - "scoping_rules_borrowing_the_ref_pattern::Point", - "y" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + mutable_point, + "scoping_rules_borrowing_the_ref_pattern::Point", + "x" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + mutable_point, + "scoping_rules_borrowing_the_ref_pattern::Point", + "y" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let mutable_tuple := M.alloc (| - Value.Tuple - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [ Value.Integer Integer.U32 5 ] - |); - Value.Integer Integer.U32 3 - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 5 |) ] + |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) in let _ := M.match_operator (| @@ -372,8 +416,9 @@ 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 Integer.U32 2 |) in - M.alloc (| Value.Tuple [] |))) + let _ := + M.write (| M.read (| last |), M.of_value (| Value.Integer 2 |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -390,45 +435,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "tuple is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "tuple is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.tuple + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ]; - Ty.path "u32" + Ty.tuple + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "u32"; + Ty.path "alloc::alloc::Global" + ]; + Ty.path "u32" + ] ] - ] - |), - [ mutable_tuple ] - |) - ] - |)) + |), + [ mutable_tuple ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 1f61baf74..d0bc887cf 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 @@ -22,12 +22,12 @@ fn main() { // │ } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let i := M.alloc (| Value.Integer Integer.I32 3 |) in + let i := M.alloc (| M.of_value (| Value.Integer 3 |) |) in let _ := let borrow1 := M.alloc (| i |) in let _ := @@ -40,35 +40,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "borrow1: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "borrow1: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ borrow1 ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ borrow1 ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let borrow2 := M.alloc (| i |) in let _ := let _ := @@ -80,34 +90,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "borrow2: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "borrow2: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ borrow2 ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ borrow2 ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 dd96bb5f5..bfd32f058 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 @@ -13,7 +13,7 @@ Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_scoping_rules_lifetimes_bo Ty.apply (Ty.path "scoping_rules_lifetimes_bounds::Ref") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -28,16 +28,17 @@ Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_scoping_rules_lifetimes_bo |), [ M.read (| f |); - M.read (| Value.String "Ref" |); + M.read (| M.of_value (| Value.String "Ref" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "scoping_rules_lifetimes_bounds::Ref", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -60,7 +61,7 @@ where println!("`print`: t is {:?}", t); } *) -Definition print (τ : list Ty.t) (α : list Value.t) : M := +Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -76,37 +77,45 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`print`: t is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`print`: t is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ T ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ T ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -119,7 +128,7 @@ where println!("`print_ref`: t is {:?}", t); } *) -Definition print_ref (τ : list Ty.t) (α : list Value.t) : M := +Definition print_ref (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -135,37 +144,45 @@ Definition print_ref (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`print_ref`: t is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`print_ref`: t is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "&") [ T ] ] - |), - [ t ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "&") [ T ] ] + |), + [ t ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -179,13 +196,18 @@ fn main() { print(ref_x); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.I32 7 |) in - let ref_x := M.alloc (| Value.StructTuple "scoping_rules_lifetimes_bounds::Ref" [ x ] |) in + let x := M.alloc (| M.of_value (| Value.Integer 7 |) |) in + let ref_x := + M.alloc (| + M.of_value (| + Value.StructTuple "scoping_rules_lifetimes_bounds::Ref" [ A.to_value x ] + |) + |) in let _ := M.alloc (| M.call_closure (| @@ -206,7 +228,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| ref_x |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 f888ab960..8337ff50e 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 @@ -6,7 +6,7 @@ fn multiply<'a>(first: &'a i32, second: &'a i32) -> i32 { first * second } *) -Definition multiply (τ : list Ty.t) (α : list Value.t) : M := +Definition multiply (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ first; second ] => ltac:(M.monadic @@ -30,7 +30,7 @@ fn choose_first<'a: 'b, 'b>(first: &'a i32, _: &'b i32) -> &'b i32 { first } *) -Definition choose_first (τ : list Ty.t) (α : list Value.t) : M := +Definition choose_first (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ first; β1 ] => ltac:(M.monadic @@ -52,14 +52,14 @@ fn main() { }; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let first := M.alloc (| Value.Integer Integer.I32 2 |) in + let first := M.alloc (| M.of_value (| Value.Integer 2 |) |) in let _ := - let second := M.alloc (| Value.Integer Integer.I32 3 |) in + let second := M.alloc (| M.of_value (| Value.Integer 3 |) |) in let _ := let _ := M.alloc (| @@ -70,46 +70,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The product is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "The product is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "scoping_rules_lifetimes_coercion::multiply", - [] - |), - [ first; second ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "scoping_rules_lifetimes_coercion::multiply", + [] + |), + [ first; second ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -120,48 +128,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " is the first -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " is the first +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "scoping_rules_lifetimes_coercion::choose_first", - [] - |), - [ first; second ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "scoping_rules_lifetimes_coercion::choose_first", + [] + |), + [ first; second ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 11bbd6c8c..b779eab62 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 @@ -6,7 +6,7 @@ fn elided_input(x: &i32) { println!("`elided_input`: {}", x); } *) -Definition elided_input (τ : list Ty.t) (α : list Value.t) : M := +Definition elided_input (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -22,37 +22,45 @@ Definition elided_input (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`elided_input`: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`elided_input`: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ x ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -62,7 +70,7 @@ fn annotated_input<'a>(x: &'a i32) { println!("`annotated_input`: {}", x); } *) -Definition annotated_input (τ : list Ty.t) (α : list Value.t) : M := +Definition annotated_input (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -78,37 +86,47 @@ Definition annotated_input (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`annotated_input`: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "`annotated_input`: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ x ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -118,7 +136,7 @@ fn elided_pass(x: &i32) -> &i32 { x } *) -Definition elided_pass (τ : list Ty.t) (α : list Value.t) : M := +Definition elided_pass (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -132,7 +150,7 @@ fn annotated_pass<'a>(x: &'a i32) -> &'a i32 { x } *) -Definition annotated_pass (τ : list Ty.t) (α : list Value.t) : M := +Definition annotated_pass (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -152,12 +170,12 @@ fn main() { println!("`annotated_pass`: {}", annotated_pass(&x)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.I32 3 |) in + let x := M.alloc (| M.of_value (| Value.Integer 3 |) |) in let _ := M.alloc (| M.call_closure (| @@ -182,46 +200,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`elided_pass`: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`elided_pass`: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "scoping_rules_lifetimes_elision::elided_pass", - [] - |), - [ x ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "scoping_rules_lifetimes_elision::elided_pass", + [] + |), + [ x ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -232,47 +258,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`annotated_pass`: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`annotated_pass`: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "scoping_rules_lifetimes_elision::annotated_pass", - [] - |), - [ x ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "scoping_rules_lifetimes_elision::annotated_pass", + [] + |), + [ x ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 f4ce2f686..6af6e602a 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 @@ -6,7 +6,7 @@ fn print_one<'a>(x: &'a i32) { println!("`print_one`: x is {}", x); } *) -Definition print_one (τ : list Ty.t) (α : list Value.t) : M := +Definition print_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -22,37 +22,45 @@ Definition print_one (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`print_one`: x is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`print_one`: x is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ x ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -62,7 +70,7 @@ fn add_one<'a>(x: &'a mut i32) { *x += 1; } *) -Definition add_one (τ : list Ty.t) (α : list Value.t) : M := +Definition add_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic @@ -70,8 +78,11 @@ Definition add_one (τ : list Ty.t) (α : list Value.t) : M := M.read (| let _ := let β := M.read (| x |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I32 1 |) |) in - M.alloc (| Value.Tuple [] |) + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.of_value (| Value.Integer 1 |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -81,7 +92,7 @@ fn print_multi<'a, 'b>(x: &'a i32, y: &'b i32) { println!("`print_multi`: x is {}, y is {}", x, y); } *) -Definition print_multi (τ : list Ty.t) (α : list Value.t) : M := +Definition print_multi (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; y ] => ltac:(M.monadic @@ -98,46 +109,57 @@ Definition print_multi (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "`print_multi`: x is " |); - M.read (| Value.String ", y is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "`print_multi`: x is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ", y is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ x ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ y ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ x ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ y ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -147,7 +169,7 @@ fn pass_x<'a, 'b>(x: &'a i32, _: &'b i32) -> &'a i32 { x } *) -Definition pass_x (τ : list Ty.t) (α : list Value.t) : M := +Definition pass_x (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; β1 ] => ltac:(M.monadic @@ -173,13 +195,13 @@ fn main() { print_one(&t); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.I32 7 |) in - let y := M.alloc (| Value.Integer Integer.I32 9 |) in + let x := M.alloc (| M.of_value (| Value.Integer 7 |) |) in + let y := M.alloc (| M.of_value (| Value.Integer 9 |) |) in let _ := M.alloc (| M.call_closure (| @@ -208,7 +230,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| z |) ] |) |) in - let t := M.alloc (| Value.Integer Integer.I32 3 |) in + let t := M.alloc (| M.of_value (| Value.Integer 3 |) |) in let _ := M.alloc (| M.call_closure (| @@ -223,7 +245,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ t ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 58eeec716..1365641e6 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 @@ -16,7 +16,7 @@ Module Impl_scoping_rules_lifetimes_methods_Owner. self.0 += 1; } *) - Definition add_one (τ : list Ty.t) (α : list Value.t) : M := + Definition add_one (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -29,8 +29,11 @@ Module Impl_scoping_rules_lifetimes_methods_Owner. "scoping_rules_lifetimes_methods::Owner", 0 |) in - M.write (| β, BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I32 1 |) |) in - M.alloc (| Value.Tuple [] |) + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.of_value (| Value.Integer 1 |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -42,7 +45,7 @@ Module Impl_scoping_rules_lifetimes_methods_Owner. println!("`print`: {}", self.0); } *) - Definition print (τ : list Ty.t) (α : list Value.t) : M := + Definition print (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -58,41 +61,51 @@ Module Impl_scoping_rules_lifetimes_methods_Owner. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "`print`: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`print`: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.SubPointer.get_struct_tuple_field (| - M.read (| self |), - "scoping_rules_lifetimes_methods::Owner", - 0 - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "scoping_rules_lifetimes_methods::Owner", + 0 + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -108,16 +121,18 @@ fn main() { owner.print(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let owner := M.alloc (| - Value.StructTuple - "scoping_rules_lifetimes_methods::Owner" - [ Value.Integer Integer.I32 18 ] + M.of_value (| + Value.StructTuple + "scoping_rules_lifetimes_methods::Owner" + [ A.to_value (M.of_value (| Value.Integer 18 |)) ] + |) |) in let _ := M.alloc (| @@ -141,7 +156,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ owner ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 21f08ca4a..b900a4d27 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 @@ -1,15 +1,15 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Definition value_NUM : Value.t := - M.run ltac:(M.monadic (M.alloc (| M.alloc (| Value.Integer Integer.I32 18 |) |))). +Definition value_NUM : A.t := + M.run ltac:(M.monadic (M.alloc (| M.alloc (| M.of_value (| Value.Integer 18 |) |) |))). (* fn coerce_static<'a>(_: &'a i32) -> &'a i32 { &NUM } *) -Definition coerce_static (τ : list Ty.t) (α : list Value.t) : M := +Definition coerce_static (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ β0 ] => ltac:(M.monadic @@ -51,13 +51,14 @@ fn main() { println!("NUM: {} stays accessible!", NUM); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let _ := - let static_string := M.copy (| Value.String "I'm in read-only memory" |) in + let static_string := + M.copy (| M.of_value (| Value.String "I'm in read-only memory" |) |) in let _ := let _ := M.alloc (| @@ -68,39 +69,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "static_string: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "static_string: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ static_string ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ static_string ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := - let lifetime_num := M.alloc (| Value.Integer Integer.I32 9 |) in + let lifetime_num := M.alloc (| M.of_value (| Value.Integer 9 |) |) in let coerced_static := M.alloc (| M.call_closure (| @@ -121,37 +130,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "coerced_static: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "coerced_static: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] - |), - [ coerced_static ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "i32" ] ] + |), + [ coerced_static ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -162,43 +179,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "NUM: " |); - M.read (| Value.String " stays accessible! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "NUM: " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " stays accessible! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.read (| - M.get_constant (| - "scoping_rules_lifetimes_reference_lifetime_static::NUM" - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.read (| + M.get_constant (| + "scoping_rules_lifetimes_reference_lifetime_static::NUM" + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 4efc5cf51..50c881283 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 @@ -12,7 +12,7 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Borrowed. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_structs::Borrowed". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -26,16 +26,17 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Borrowed. |), [ M.read (| f |); - M.read (| Value.String "Borrowed" |); + M.read (| M.of_value (| Value.String "Borrowed" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "scoping_rules_lifetimes_structs::Borrowed", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -64,7 +65,7 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_NamedBorrowed. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_structs::NamedBorrowed". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -78,25 +79,27 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_NamedBorrowed. |), [ M.read (| f |); - M.read (| Value.String "NamedBorrowed" |); - M.read (| Value.String "x" |); + M.read (| M.of_value (| Value.String "NamedBorrowed" |) |); + M.read (| M.of_value (| Value.String "x" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "scoping_rules_lifetimes_structs::NamedBorrowed", "x" - |)); - M.read (| Value.String "y" |); + |) + |); + M.read (| M.of_value (| Value.String "y" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "scoping_rules_lifetimes_structs::NamedBorrowed", "y" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -134,7 +137,7 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Either. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_structs::Either". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -163,8 +166,8 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Either. |), [ M.read (| f |); - M.read (| Value.String "Num" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Num" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))); @@ -187,8 +190,8 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_structs_Either. |), [ M.read (| f |); - M.read (| Value.String "Ref" |); - (* Unsize *) M.pointer_coercion __self_0 + M.read (| M.of_value (| Value.String "Ref" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) ] |) |))) @@ -222,26 +225,40 @@ fn main() { println!("y is *not* borrowed in {:?}", number); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.I32 18 |) in - let y := M.alloc (| Value.Integer Integer.I32 15 |) in + let x := M.alloc (| M.of_value (| Value.Integer 18 |) |) in + let y := M.alloc (| M.of_value (| Value.Integer 15 |) |) in let single := - M.alloc (| Value.StructTuple "scoping_rules_lifetimes_structs::Borrowed" [ x ] |) in + M.alloc (| + M.of_value (| + Value.StructTuple "scoping_rules_lifetimes_structs::Borrowed" [ A.to_value x ] + |) + |) in let double := M.alloc (| - Value.StructRecord - "scoping_rules_lifetimes_structs::NamedBorrowed" - [ ("x", x); ("y", y) ] + M.of_value (| + Value.StructRecord + "scoping_rules_lifetimes_structs::NamedBorrowed" + [ ("x", A.to_value x); ("y", A.to_value y) ] + |) |) in let reference := - M.alloc (| Value.StructTuple "scoping_rules_lifetimes_structs::Either::Ref" [ x ] |) in + M.alloc (| + M.of_value (| + Value.StructTuple "scoping_rules_lifetimes_structs::Either::Ref" [ A.to_value x ] + |) + |) in let number := M.alloc (| - Value.StructTuple "scoping_rules_lifetimes_structs::Either::Num" [ M.read (| y |) ] + M.of_value (| + Value.StructTuple + "scoping_rules_lifetimes_structs::Either::Num" + [ A.to_value (M.read (| y |)) ] + |) |) in let _ := let _ := @@ -253,36 +270,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "x is borrowed in " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "x is borrowed in " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "scoping_rules_lifetimes_structs::Borrowed" ] - |), - [ single ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "scoping_rules_lifetimes_structs::Borrowed" ] + |), + [ single ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -293,36 +318,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "x and y are borrowed in " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "x and y are borrowed in " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "scoping_rules_lifetimes_structs::NamedBorrowed" ] - |), - [ double ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "scoping_rules_lifetimes_structs::NamedBorrowed" ] + |), + [ double ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -333,36 +368,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "x is borrowed in " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "x is borrowed in " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "scoping_rules_lifetimes_structs::Either" ] - |), - [ reference ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "scoping_rules_lifetimes_structs::Either" ] + |), + [ reference ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -373,37 +416,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "y is *not* borrowed in " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "y is *not* borrowed in " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "scoping_rules_lifetimes_structs::Either" ] - |), - [ number ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "scoping_rules_lifetimes_structs::Either" ] + |), + [ number ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 a19e68750..8b2463adb 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 @@ -12,7 +12,7 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_traits_Borrowed. Definition Self : Ty.t := Ty.path "scoping_rules_lifetimes_traits::Borrowed". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -26,17 +26,18 @@ Module Impl_core_fmt_Debug_for_scoping_rules_lifetimes_traits_Borrowed. |), [ M.read (| f |); - M.read (| Value.String "Borrowed" |); - M.read (| Value.String "x" |); + M.read (| M.of_value (| Value.String "Borrowed" |) |); + M.read (| M.of_value (| Value.String "x" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "scoping_rules_lifetimes_traits::Borrowed", "x" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -58,13 +59,15 @@ Module Impl_core_default_Default_for_scoping_rules_lifetimes_traits_Borrowed. Self { x: &10 } } *) - Definition default (τ : list Ty.t) (α : list Value.t) : M := + Definition default (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "scoping_rules_lifetimes_traits::Borrowed" - [ ("x", M.alloc (| Value.Integer Integer.I32 10 |)) ])) + (M.of_value (| + Value.StructRecord + "scoping_rules_lifetimes_traits::Borrowed" + [ ("x", A.to_value (M.alloc (| M.of_value (| Value.Integer 10 |) |))) ] + |))) | _, _ => M.impossible end. @@ -82,7 +85,7 @@ fn main() { println!("b is {:?}", b); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -110,34 +113,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "b is " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "b is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "scoping_rules_lifetimes_traits::Borrowed" ] - |), - [ b ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "scoping_rules_lifetimes_traits::Borrowed" ] + |), + [ b ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 abfb69b56..6a1f52984 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 @@ -8,7 +8,7 @@ fn destroy_box(c: Box) { // `c` is destroyed and the memory freed } *) -Definition destroy_box (τ : list Ty.t) (α : list Value.t) : M := +Definition destroy_box (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ c ] => ltac:(M.monadic @@ -24,41 +24,51 @@ Definition destroy_box (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Destroying a box that contains " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Destroying a box that contains " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ c ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ c ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -100,12 +110,12 @@ fn main() { // TODO ^ Try uncommenting this line } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.U32 5 |) in + let x := M.alloc (| M.of_value (| Value.Integer 5 |) |) in let y := M.copy (| x |) in let _ := let _ := @@ -117,45 +127,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "x is " |); - M.read (| Value.String ", and y is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "x is " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String ", and y is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ x ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ y ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ x ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ y ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let a := M.alloc (| M.call_closure (| @@ -166,7 +185,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.I32 5 ] + [ M.of_value (| Value.Integer 5 |) ] |) |) in let _ := @@ -179,40 +198,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "a contains: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "a contains: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ a ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ a ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let b := M.copy (| a |) in let _ := M.alloc (| @@ -221,7 +248,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| b |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 bca0f51ca..3c4941df7 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 @@ -21,7 +21,7 @@ fn main() { println!("mutable_box now contains {}", mutable_box); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -36,7 +36,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.U32 5 ] + [ M.of_value (| Value.Integer 5 |) ] |) |) in let _ := @@ -49,40 +49,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "immutable_box contains " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "immutable_box contains " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ immutable_box ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ immutable_box ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let mutable_box := M.copy (| immutable_box |) in let _ := let _ := @@ -94,41 +104,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "mutable_box contains " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "mutable_box contains " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ mutable_box ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ mutable_box ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let _ := M.write (| M.read (| mutable_box |), Value.Integer Integer.U32 4 |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let _ := M.write (| M.read (| mutable_box |), M.of_value (| Value.Integer 4 |) |) in let _ := let _ := M.alloc (| @@ -139,41 +159,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "mutable_box now contains " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "mutable_box now contains " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ mutable_box ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ mutable_box ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 657c317b9..87309936d 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 @@ -28,39 +28,43 @@ fn main() { println!("The person's age from person struct is {}", person.age); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let person := M.alloc (| - Value.StructRecord - "scoping_rules_ownership_and_rules_partial_moves::main::Person" - [ - ("name", - M.call_closure (| - M.get_trait_method (| - "core::convert::From", - Ty.path "alloc::string::String", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ], - "from", - [] - |), - [ M.read (| Value.String "Alice" |) ] - |)); - ("age", - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [ Value.Integer Integer.U8 20 ] - |)) - ] + M.of_value (| + Value.StructRecord + "scoping_rules_ownership_and_rules_partial_moves::main::Person" + [ + ("name", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloc::string::String", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ], + "from", + [] + |), + [ M.read (| M.of_value (| Value.String "Alice" |) |) ] + |))); + ("age", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 20 |) ] + |))) + ] + |) |) in M.match_operator (| person, @@ -95,44 +99,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The person's age is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The person's age is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", [ Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] + (Ty.path "&") + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" + ] + ] ] - ] - |), - [ age ] - |) - ] - |)) + |), + [ age ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -147,36 +162,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "The person's name is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "The person's name is " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ name ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ name ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -191,49 +216,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "The person's age from person struct is " - |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "The person's age from person struct is " + |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ - M.SubPointer.get_struct_record_field (| - person, - "scoping_rules_ownership_and_rules_partial_moves::main::Person", - "age" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ + M.SubPointer.get_struct_record_field (| + person, + "scoping_rules_ownership_and_rules_partial_moves::main::Person", + "age" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -258,7 +293,7 @@ Module main. Ty.path "scoping_rules_ownership_and_rules_partial_moves::main::Person". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -272,25 +307,27 @@ Module main. |), [ M.read (| f |); - M.read (| Value.String "Person" |); - M.read (| Value.String "name" |); + M.read (| M.of_value (| Value.String "Person" |) |); + M.read (| M.of_value (| Value.String "name" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "scoping_rules_ownership_and_rules_partial_moves::main::Person", "name" - |)); - M.read (| Value.String "age" |); + |) + |); + M.read (| M.of_value (| Value.String "age" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "scoping_rules_ownership_and_rules_partial_moves::main::Person", "age" |) - |)) + |) + |) ] |))) | _, _ => M.impossible 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 d4415cc6b..927d8783b 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 @@ -9,7 +9,7 @@ fn create_box() { // `_box1` is destroyed here, and memory gets freed } *) -Definition create_box (τ : list Ty.t) (α : list Value.t) : M := +Definition create_box (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -24,10 +24,10 @@ Definition create_box (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.I32 3 ] + [ M.of_value (| Value.Integer 3 |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -54,7 +54,7 @@ fn main() { // `_box2` is destroyed here, and memory gets freed } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -69,7 +69,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.I32 5 ] + [ M.of_value (| Value.Integer 5 |) ] |) |) in let _ := @@ -83,10 +83,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.I32 4 ] + [ M.of_value (| Value.Integer 4 |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.use (M.match_operator (| M.alloc (| @@ -99,12 +99,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.U32 0); - ("end_", Value.Integer Integer.U32 1000) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 1000 |))) + ] + |) ] |) |), @@ -147,10 +149,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 c60115168..298bc5040 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 @@ -16,7 +16,7 @@ Module Impl_core_ops_drop_Drop_for_scoping_rules_raii_desctructor_ToDrop. println!("ToDrop is being dropped"); } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -36,18 +36,27 @@ Module Impl_core_ops_drop_Drop_for_scoping_rules_raii_desctructor_ToDrop. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "ToDrop is being dropped -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "ToDrop is being dropped +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -66,12 +75,15 @@ fn main() { println!("Made a ToDrop!"); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.StructTuple "scoping_rules_raii_desctructor::ToDrop" [] |) in + let x := + M.alloc (| + M.of_value (| Value.StructTuple "scoping_rules_raii_desctructor::ToDrop" [] |) + |) in let _ := let _ := M.alloc (| @@ -82,16 +94,25 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "Made a ToDrop! -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Made a ToDrop! +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 cb8fa4346..d36631a76 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 @@ -22,7 +22,7 @@ fn main() { thread::sleep(Duration::from_secs(1)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -37,7 +37,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ M.read (| Value.String "the same apple" |) ] + [ M.read (| M.of_value (| Value.String "the same apple" |) |) ] |) |) in let _ := @@ -53,12 +53,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.I32 0); - ("end_", Value.Integer Integer.I32 10) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 10 |))) + ] + |) ] |) |), @@ -120,8 +122,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Ty.function [ Ty.tuple [] ] (Ty.tuple []); Ty.tuple [] ] |), [ - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -149,69 +151,89 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "" - |); - M.read (| - Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + " " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path - "alloc::sync::Arc") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_debug", [ Ty.apply (Ty.path - "&") + "alloc::sync::Arc") [ + Ty.apply + (Ty.path + "&") + [ + Ty.path + "str" + ]; Ty.path - "str" - ]; - Ty.path - "alloc::alloc::Global" + "alloc::alloc::Global" + ] ] - ] - |), - [ apple ] - |) - ] - |)) + |), + [ apple ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -222,12 +244,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_secs", [] |), - [ Value.Integer Integer.U64 1 ] + [ M.of_value (| Value.Integer 1 |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 5adc23371..9d535488b 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 @@ -12,7 +12,7 @@ Module Impl_core_fmt_Debug_for_box_stack_heap_Point. Definition Self : Ty.t := Ty.path "box_stack_heap::Point". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -26,25 +26,27 @@ Module Impl_core_fmt_Debug_for_box_stack_heap_Point. |), [ M.read (| f |); - M.read (| Value.String "Point" |); - M.read (| Value.String "x" |); + M.read (| M.of_value (| Value.String "Point" |) |); + M.read (| M.of_value (| Value.String "x" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "box_stack_heap::Point", "x" - |)); - M.read (| Value.String "y" |); + |) + |); + M.read (| M.of_value (| Value.String "y" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "box_stack_heap::Point", "y" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -62,14 +64,14 @@ Module Impl_core_clone_Clone_for_box_stack_heap_Point. Definition Self : Ty.t := Ty.path "box_stack_heap::Point". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -107,13 +109,18 @@ fn origin() -> Point { Point { x: 0.0, y: 0.0 } } *) -Definition origin (τ : list Ty.t) (α : list Value.t) : M := +Definition origin (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "box_stack_heap::Point" - [ ("x", M.read (| UnsupportedLiteral |)); ("y", M.read (| UnsupportedLiteral |)) ])) + (M.of_value (| + Value.StructRecord + "box_stack_heap::Point" + [ + ("x", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))); + ("y", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) + ] + |))) | _, _ => M.impossible end. @@ -123,7 +130,7 @@ fn boxed_origin() -> Box { Box::new(Point { x: 0.0, y: 0.0 }) } *) -Definition boxed_origin (τ : list Ty.t) (α : list Value.t) : M := +Definition boxed_origin (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -136,9 +143,14 @@ Definition boxed_origin (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "box_stack_heap::Point" - [ ("x", M.read (| UnsupportedLiteral |)); ("y", M.read (| UnsupportedLiteral |)) ] + M.of_value (| + Value.StructRecord + "box_stack_heap::Point" + [ + ("x", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))); + ("y", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) + ] + |) ] |))) | _, _ => M.impossible @@ -197,7 +209,7 @@ fn main() { ); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -208,17 +220,25 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let rectangle := M.alloc (| - Value.StructRecord - "box_stack_heap::Rectangle" - [ - ("top_left", - M.call_closure (| M.get_function (| "box_stack_heap::origin", [] |), [] |)); - ("bottom_right", - Value.StructRecord - "box_stack_heap::Point" - [ ("x", M.read (| UnsupportedLiteral |)); ("y", M.read (| UnsupportedLiteral |)) - ]) - ] + M.of_value (| + Value.StructRecord + "box_stack_heap::Rectangle" + [ + ("top_left", + A.to_value + (M.call_closure (| M.get_function (| "box_stack_heap::origin", [] |), [] |))); + ("bottom_right", + A.to_value + (M.of_value (| + Value.StructRecord + "box_stack_heap::Point" + [ + ("x", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))); + ("y", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) + ] + |))) + ] + |) |) in let boxed_rectangle := M.alloc (| @@ -231,19 +251,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "box_stack_heap::Rectangle" - [ - ("top_left", - M.call_closure (| M.get_function (| "box_stack_heap::origin", [] |), [] |)); - ("bottom_right", - Value.StructRecord - "box_stack_heap::Point" - [ - ("x", M.read (| UnsupportedLiteral |)); - ("y", M.read (| UnsupportedLiteral |)) - ]) - ] + M.of_value (| + Value.StructRecord + "box_stack_heap::Rectangle" + [ + ("top_left", + A.to_value + (M.call_closure (| + M.get_function (| "box_stack_heap::origin", [] |), + [] + |))); + ("bottom_right", + A.to_value + (M.of_value (| + Value.StructRecord + "box_stack_heap::Point" + [ + ("x", + A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))); + ("y", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) + ] + |))) + ] + |) ] |) |) in @@ -288,46 +318,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Point occupies " |); - M.read (| Value.String " bytes on the stack + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Point occupies " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes on the stack " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ Ty.path "box_stack_heap::Point" ] - |), - [ point ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", + [ Ty.path "box_stack_heap::Point" ] + |), + [ point ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -338,46 +379,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Rectangle occupies " |); - M.read (| Value.String " bytes on the stack + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Rectangle occupies " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes on the stack " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ Ty.path "box_stack_heap::Rectangle" ] - |), - [ rectangle ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", + [ Ty.path "box_stack_heap::Rectangle" ] + |), + [ rectangle ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -388,53 +442,66 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Boxed point occupies " |); - M.read (| Value.String " bytes on the stack + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Boxed point occupies " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes on the stack " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", [ - Ty.path "box_stack_heap::Point"; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "box_stack_heap::Point"; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ boxed_point ] - |) - |) - ] - |) - ] - |)) + |), + [ boxed_point ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -445,53 +512,66 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Boxed rectangle occupies " |); - M.read (| Value.String " bytes on the stack + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Boxed rectangle occupies " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes on the stack " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", [ - Ty.path "box_stack_heap::Rectangle"; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "box_stack_heap::Rectangle"; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ boxed_rectangle ] - |) - |) - ] - |) - ] - |)) + |), + [ boxed_rectangle ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -502,58 +582,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Boxed box occupies " |); - M.read (| Value.String " bytes on the stack + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Boxed box occupies " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes on the stack " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ - Ty.apply - (Ty.path "alloc::boxed::Box") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", [ Ty.apply (Ty.path "alloc::boxed::Box") [ - Ty.path "box_stack_heap::Point"; + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "box_stack_heap::Point"; + Ty.path "alloc::alloc::Global" + ]; Ty.path "alloc::alloc::Global" - ]; - Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ box_in_a_box ] - |) - |) - ] - |) - ] - |)) + |), + [ box_in_a_box ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let unboxed_point := M.copy (| M.read (| boxed_point |) |) in let _ := let _ := @@ -565,47 +658,60 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Unboxed point occupies " |); - M.read (| Value.String " bytes on the stack + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Unboxed point occupies " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " bytes on the stack " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ Ty.path "box_stack_heap::Point" ] - |), - [ unboxed_point ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", + [ Ty.path "box_stack_heap::Point" ] + |), + [ unboxed_point ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 a2ac01360..5865f3e19 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 @@ -16,7 +16,7 @@ fn call(number: &str) -> &str { } } *) -Definition call (τ : list Ty.t) (α : list Value.t) : M := +Definition call (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ number ] => ltac:(M.monadic @@ -31,9 +31,11 @@ Definition call (τ : list Ty.t) (α : list Value.t) : M := M.is_constant_or_break_match (| M.read (| γ |), Value.String "798-1364" |) in M.alloc (| M.read (| - Value.String - "We're sorry, the call cannot be completed as dialed. + M.of_value (| + Value.String + "We're sorry, the call cannot be completed as dialed. Please hang up and try again." + |) |) |))); fun γ => @@ -42,13 +44,16 @@ Definition call (τ : list Ty.t) (α : list Value.t) : M := M.is_constant_or_break_match (| M.read (| γ |), Value.String "645-7689" |) in M.alloc (| M.read (| - Value.String - "Hello, this is Mr. Awesome's Pizza. My name is Fred. + M.of_value (| + Value.String + "Hello, this is Mr. Awesome's Pizza. My name is Fred. What can I get for you today?" + |) |) |))); fun γ => - ltac:(M.monadic (M.alloc (| M.read (| Value.String "Hi! Who is this again?" |) |))) + ltac:(M.monadic + (M.alloc (| M.read (| M.of_value (| Value.String "Hi! Who is this again?" |) |) |))) ] |) |))) @@ -88,7 +93,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -124,7 +129,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "insert", [] |), - [ contacts; M.read (| Value.String "Daniel" |); M.read (| Value.String "798-1364" |) ] + [ + contacts; + M.read (| M.of_value (| Value.String "Daniel" |) |); + M.read (| M.of_value (| Value.String "798-1364" |) |) + ] |) |) in let _ := @@ -141,7 +150,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "insert", [] |), - [ contacts; M.read (| Value.String "Ashley" |); M.read (| Value.String "645-7689" |) ] + [ + contacts; + M.read (| M.of_value (| Value.String "Ashley" |) |); + M.read (| M.of_value (| Value.String "645-7689" |) |) + ] |) |) in let _ := @@ -158,7 +171,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "insert", [] |), - [ contacts; M.read (| Value.String "Katie" |); M.read (| Value.String "435-8291" |) ] + [ + contacts; + M.read (| M.of_value (| Value.String "Katie" |) |); + M.read (| M.of_value (| Value.String "435-8291" |) |) + ] |) |) in let _ := @@ -175,7 +192,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "insert", [] |), - [ contacts; M.read (| Value.String "Robert" |); M.read (| Value.String "956-1745" |) ] + [ + contacts; + M.read (| M.of_value (| Value.String "Robert" |) |); + M.read (| M.of_value (| Value.String "956-1745" |) |) + ] |) |) in let _ := @@ -193,7 +214,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "get", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ contacts; Value.String "Daniel" ] + [ contacts; M.of_value (| Value.String "Daniel" |) ] |) |), [ @@ -216,43 +237,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Calling Daniel: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Calling Daniel: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "hash_map::call", [] |), - [ M.read (| number |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| "hash_map::call", [] |), + [ M.read (| number |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -268,18 +299,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Don't have Daniel's number. -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Don't have Daniel's number. +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -296,7 +337,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "insert", [] |), - [ contacts; M.read (| Value.String "Daniel" |); M.read (| Value.String "164-6743" |) ] + [ + contacts; + M.read (| M.of_value (| Value.String "Daniel" |) |); + M.read (| M.of_value (| Value.String "164-6743" |) |) + ] |) |) in let _ := @@ -314,7 +359,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "get", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ contacts; Value.String "Ashley" ] + [ contacts; M.of_value (| Value.String "Ashley" |) ] |) |), [ @@ -337,43 +382,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Calling Ashley: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Calling Ashley: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "hash_map::call", [] |), - [ M.read (| number |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| "hash_map::call", [] |), + [ M.read (| number |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -389,18 +444,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Don't have Ashley's number. -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Don't have Ashley's number. +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -417,7 +482,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "remove", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ contacts; Value.String "Ashley" ] + [ contacts; M.of_value (| Value.String "Ashley" |) ] |) |) in M.use @@ -510,68 +575,88 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Calling " |); - M.read (| Value.String ": " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Calling " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ": " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "str" ] + ] + ] + |), + [ contact ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - ] - |), - [ contact ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "hash_map::call", - [] - |), - [ M.read (| number |) ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "hash_map::call", + [] + |), + [ M.read (| number |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 c6f47a37d..b1bc57cb1 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 @@ -27,7 +27,7 @@ Module Impl_core_cmp_PartialEq_for_hash_map_alternate_or_custom_key_types_Accoun Definition Self : Ty.t := Ty.path "hash_map_alternate_or_custom_key_types::Account". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -104,20 +104,20 @@ Module Impl_core_cmp_Eq_for_hash_map_alternate_or_custom_key_types_Account. Definition Self : Ty.t := Ty.path "hash_map_alternate_or_custom_key_types::Account". (* Eq *) - Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.match_operator (| - Value.DeclaredButUndefined, - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) @@ -138,7 +138,7 @@ Module Impl_core_hash_Hash_for_hash_map_alternate_or_custom_key_types_Account. Definition Self : Ty.t := Ty.path "hash_map_alternate_or_custom_key_types::Account". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -235,7 +235,7 @@ fn try_logon<'a>(accounts: &Accounts<'a>, username: &'a str, password: &'a str) } } *) -Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := +Definition try_logon (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ accounts; username; password ] => ltac:(M.monadic @@ -253,34 +253,44 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Username: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Username: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ username ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ username ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -291,34 +301,44 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Password: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Password: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ password ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ password ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -329,22 +349,36 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Attempting logon... -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Attempting logon... +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let logon := M.alloc (| - Value.StructRecord - "hash_map_alternate_or_custom_key_types::Account" - [ ("username", M.read (| username |)); ("password", M.read (| password |)) ] + M.of_value (| + Value.StructRecord + "hash_map_alternate_or_custom_key_types::Account" + [ + ("username", A.to_value (M.read (| username |))); + ("password", A.to_value (M.read (| password |))) + ] + |) |) in M.match_operator (| M.alloc (| @@ -383,17 +417,26 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Successful logon! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Successful logon! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -408,42 +451,50 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Name: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Name: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| account_info |), - "hash_map_alternate_or_custom_key_types::AccountInfo", - "name" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| account_info |), + "hash_map_alternate_or_custom_key_types::AccountInfo", + "name" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -458,43 +509,51 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Email: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Email: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| account_info |), - "hash_map_alternate_or_custom_key_types::AccountInfo", - "email" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| account_info |), + "hash_map_alternate_or_custom_key_types::AccountInfo", + "email" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -510,17 +569,26 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Login failed! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Login failed! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -548,7 +616,7 @@ fn main() { try_logon(&accounts, "j.everyman", "password123"); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -572,21 +640,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let account := M.alloc (| - Value.StructRecord - "hash_map_alternate_or_custom_key_types::Account" - [ - ("username", M.read (| Value.String "j.everyman" |)); - ("password", M.read (| Value.String "password123" |)) - ] + M.of_value (| + Value.StructRecord + "hash_map_alternate_or_custom_key_types::Account" + [ + ("username", + A.to_value (M.read (| M.of_value (| Value.String "j.everyman" |) |))); + ("password", + A.to_value (M.read (| M.of_value (| Value.String "password123" |) |))) + ] + |) |) in let account_info := M.alloc (| - Value.StructRecord - "hash_map_alternate_or_custom_key_types::AccountInfo" - [ - ("name", M.read (| Value.String "John Everyman" |)); - ("email", M.read (| Value.String "j.everyman@email.com" |)) - ] + M.of_value (| + Value.StructRecord + "hash_map_alternate_or_custom_key_types::AccountInfo" + [ + ("name", A.to_value (M.read (| M.of_value (| Value.String "John Everyman" |) |))); + ("email", + A.to_value (M.read (| M.of_value (| Value.String "j.everyman@email.com" |) |))) + ] + |) |) in let _ := M.alloc (| @@ -611,8 +686,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_function (| "hash_map_alternate_or_custom_key_types::try_logon", [] |), [ accounts; - M.read (| Value.String "j.everyman" |); - M.read (| Value.String "psasword123" |) + M.read (| M.of_value (| Value.String "j.everyman" |) |); + M.read (| M.of_value (| Value.String "psasword123" |) |) ] |) |) in @@ -622,12 +697,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_function (| "hash_map_alternate_or_custom_key_types::try_logon", [] |), [ accounts; - M.read (| Value.String "j.everyman" |); - M.read (| Value.String "password123" |) + M.read (| M.of_value (| Value.String "j.everyman" |) |); + M.read (| M.of_value (| Value.String "password123" |) |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 4c3f207ab..01d3ebd28 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 @@ -41,7 +41,7 @@ fn main() { ); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -82,8 +82,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -97,16 +97,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) ] @@ -150,8 +153,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -165,16 +168,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3; - Value.Integer Integer.I32 4 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) ] @@ -184,15 +190,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "std::collections::hash::set::HashSet") @@ -200,32 +206,34 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "insert", [] |), - [ a; Value.Integer Integer.I32 4 ] - |)) + [ a; M.of_value (| Value.Integer 4 |) ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: a.insert(4)" |) ] + [ M.read (| M.of_value (| Value.String "assertion failed: a.insert(4)" |) |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "std::collections::hash::set::HashSet") @@ -233,19 +241,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "contains", [ Ty.path "i32" ] |), - [ a; M.alloc (| Value.Integer Integer.I32 4 |) ] - |)) + [ a; M.alloc (| M.of_value (| Value.Integer 4 |) |) ] + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: a.contains(&4)" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: a.contains(&4)" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -258,7 +271,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "insert", [] |), - [ b; Value.Integer Integer.I32 5 ] + [ b; M.of_value (| Value.Integer 5 |) ] |) |) in let _ := @@ -271,37 +284,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "A: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "A: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "std::collections::hash::set::HashSet") - [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" ] - ] - |), - [ a ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "std::collections::hash::set::HashSet") + [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" + ] + ] + |), + [ a ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -312,37 +336,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "B: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "B: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "std::collections::hash::set::HashSet") - [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" ] - ] - |), - [ b ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "std::collections::hash::set::HashSet") + [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" + ] + ] + |), + [ b ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -353,77 +388,89 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Union: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Union: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply (Ty.path "&") [ Ty.path "i32" ]; - Ty.path "alloc::alloc::Global" - ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path "std::collections::hash::set::Union") - [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" - ], - [], - "collect", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ - Ty.apply (Ty.path "&") [ Ty.path "i32" ]; - Ty.path "alloc::alloc::Global" - ] - ] - |), - [ + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "i32" ]; + Ty.path "alloc::alloc::Global" + ] + ] + |), + [ + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path "std::collections::hash::set::HashSet") + (Ty.path "std::collections::hash::set::Union") [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" ], - "union", - [] + [], + "collect", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "i32" ]; + Ty.path "alloc::alloc::Global" + ] + ] |), - [ a; b ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::set::HashSet") + [ + Ty.path "i32"; + Ty.path "std::hash::random::RandomState" + ], + "union", + [] + |), + [ a; b ] + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -434,80 +481,90 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Difference: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Difference: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply (Ty.path "&") [ Ty.path "i32" ]; - Ty.path "alloc::alloc::Global" - ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path "std::collections::hash::set::Difference") - [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" - ], - [], - "collect", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ - Ty.apply (Ty.path "&") [ Ty.path "i32" ]; - Ty.path "alloc::alloc::Global" - ] - ] - |), - [ + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "i32" ]; + Ty.path "alloc::alloc::Global" + ] + ] + |), + [ + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path "std::collections::hash::set::HashSet") + (Ty.path "std::collections::hash::set::Difference") [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" ], - "difference", - [] + [], + "collect", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "i32" ]; + Ty.path "alloc::alloc::Global" + ] + ] |), - [ a; b ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::set::HashSet") + [ + Ty.path "i32"; + Ty.path "std::hash::random::RandomState" + ], + "difference", + [] + |), + [ a; b ] + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -518,80 +575,90 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Intersection: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Intersection: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply (Ty.path "&") [ Ty.path "i32" ]; - Ty.path "alloc::alloc::Global" - ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path "std::collections::hash::set::Intersection") - [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" - ], - [], - "collect", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ - Ty.apply (Ty.path "&") [ Ty.path "i32" ]; - Ty.path "alloc::alloc::Global" - ] - ] - |), - [ + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "i32" ]; + Ty.path "alloc::alloc::Global" + ] + ] + |), + [ + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path "std::collections::hash::set::HashSet") + (Ty.path "std::collections::hash::set::Intersection") [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" ], - "intersection", - [] + [], + "collect", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "i32" ]; + Ty.path "alloc::alloc::Global" + ] + ] |), - [ a; b ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::set::HashSet") + [ + Ty.path "i32"; + Ty.path "std::hash::random::RandomState" + ], + "intersection", + [] + |), + [ a; b ] + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -602,82 +669,94 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Symmetric Difference: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Symmetric Difference: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ - Ty.apply (Ty.path "&") [ Ty.path "i32" ]; - Ty.path "alloc::alloc::Global" - ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path - "std::collections::hash::set::SymmetricDifference") - [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" - ], - [], - "collect", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ - Ty.apply (Ty.path "&") [ Ty.path "i32" ]; - Ty.path "alloc::alloc::Global" - ] - ] - |), - [ + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "i32" ]; + Ty.path "alloc::alloc::Global" + ] + ] + |), + [ + M.alloc (| M.call_closure (| - M.get_associated_function (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", Ty.apply - (Ty.path "std::collections::hash::set::HashSet") + (Ty.path + "std::collections::hash::set::SymmetricDifference") [ Ty.path "i32"; Ty.path "std::hash::random::RandomState" ], - "symmetric_difference", - [] + [], + "collect", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply (Ty.path "&") [ Ty.path "i32" ]; + Ty.path "alloc::alloc::Global" + ] + ] |), - [ a; b ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::set::HashSet") + [ + Ty.path "i32"; + Ty.path "std::hash::random::RandomState" + ], + "symmetric_difference", + [] + |), + [ a; b ] + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 351a5c3a8..050dc78b8 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 @@ -12,7 +12,7 @@ fn checked_division(dividend: i32, divisor: i32) -> Option { } } *) -Definition checked_division (τ : list Ty.t) (α : list Value.t) : M := +Definition checked_division (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ dividend; divisor ] => ltac:(M.monadic @@ -20,23 +20,32 @@ Definition checked_division (τ : list Ty.t) (α : list Value.t) : M := let divisor := M.alloc (| divisor |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| divisor |)) (Value.Integer Integer.I32 0) + BinOp.Pure.eq (| M.read (| divisor |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ BinOp.Panic.div (| M.read (| dividend |), M.read (| divisor |) |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (BinOp.Panic.div (| + Integer.I32, + M.read (| dividend |), + M.read (| divisor |) + |)) + ] + |) |))) ] |) @@ -55,7 +64,7 @@ fn try_division(dividend: i32, divisor: i32) { } } *) -Definition try_division (τ : list Ty.t) (α : list Value.t) : M := +Definition try_division (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ dividend; divisor ] => ltac:(M.monadic @@ -85,45 +94,54 @@ Definition try_division (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " / " |); - M.read (| Value.String " failed! -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " / " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " failed! +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ dividend ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ divisor ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ dividend ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ divisor ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -142,54 +160,63 @@ Definition try_division (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " / " |); - M.read (| Value.String " = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " / " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ dividend ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ divisor ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ quotient ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ dividend ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ divisor ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ quotient ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -218,7 +245,7 @@ fn main() { println!("{:?} unwraps to {:?}", none, none.unwrap()); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -227,21 +254,27 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "option::try_division", [] |), - [ Value.Integer Integer.I32 4; Value.Integer Integer.I32 2 ] + [ M.of_value (| Value.Integer 4 |); M.of_value (| Value.Integer 2 |) ] |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "option::try_division", [] |), - [ Value.Integer Integer.I32 1; Value.Integer Integer.I32 0 ] + [ M.of_value (| Value.Integer 1 |); M.of_value (| 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 none := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in + let _equivalent_none := + M.alloc (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |) |) in let optional_float := M.alloc (| - Value.StructTuple "core::option::Option::Some" [ M.read (| UnsupportedLiteral |) ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)) ] + |) |) in let _ := let _ := @@ -253,56 +286,68 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " unwraps to " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " unwraps to " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "f32" ] ] - |), - [ optional_float ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "f32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "f32" ], - "unwrap", - [] - |), - [ M.read (| optional_float |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "f32" ] + ] + |), + [ optional_float ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "f32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "f32" ], + "unwrap", + [] + |), + [ M.read (| optional_float |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -313,57 +358,69 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " unwraps to " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " unwraps to " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] ] - |), - [ none ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ], - "unwrap", - [] - |), - [ M.read (| none |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] + ] + |), + [ none ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "i32" ], + "unwrap", + [] + |), + [ M.read (| none |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 334493da9..c14027c7c 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 @@ -11,7 +11,7 @@ fn division(dividend: i32, divisor: i32) -> i32 { } } *) -Definition division (τ : list Ty.t) (α : list Value.t) : M := +Definition division (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ dividend; divisor ] => ltac:(M.monadic @@ -19,14 +19,14 @@ Definition division (τ : list Ty.t) (α : list Value.t) : M := let divisor := M.alloc (| divisor |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| divisor |)) (Value.Integer Integer.I32 0) + BinOp.Pure.eq (| M.read (| divisor |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -36,13 +36,15 @@ Definition division (τ : list Ty.t) (α : list Value.t) : M := "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "division by zero" |) ] + [ M.read (| M.of_value (| Value.String "division by zero" |) |) ] |) |) |))); fun γ => ltac:(M.monadic - (M.alloc (| BinOp.Panic.div (| M.read (| dividend |), M.read (| divisor |) |) |))) + (M.alloc (| + BinOp.Panic.div (| Integer.I32, M.read (| dividend |), M.read (| divisor |) |) + |))) ] |) |))) @@ -62,7 +64,7 @@ fn main() { // `_x` should get destroyed at this point } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -77,14 +79,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.Integer Integer.I32 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |) in let _ := M.alloc (| M.call_closure (| M.get_function (| "panic::division", [] |), - [ Value.Integer Integer.I32 3; Value.Integer Integer.I32 0 ] + [ M.of_value (| Value.Integer 3 |); M.of_value (| Value.Integer 0 |) ] |) |) in let _ := @@ -97,18 +99,27 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "This point won't be reached! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "This point won't be reached! +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 254aff09f..2ffb93f22 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 @@ -38,7 +38,7 @@ fn main() { // TODO ^ Try uncommenting this line } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -53,7 +53,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "to_string", [] |), - [ M.read (| Value.String "Rc examples" |) ] + [ M.read (| M.of_value (| Value.String "Rc examples" |) |) ] |) |) in let _ := @@ -66,17 +66,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "--- rc_a is created --- -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "--- rc_a is created --- +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let rc_a := M.alloc (| M.call_closure (| @@ -100,52 +109,62 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Reference Count of rc_a: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Reference Count of rc_a: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") - [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ], - "strong_count", - [] - |), - [ rc_a ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ], + "strong_count", + [] + |), + [ rc_a ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := let _ := @@ -161,18 +180,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "--- rc_a is cloned to rc_b --- -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "--- rc_a is cloned to rc_b --- +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let rc_b := M.alloc (| M.call_closure (| @@ -198,52 +227,62 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Reference Count of rc_b: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Reference Count of rc_b: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") - [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ], - "strong_count", - [] - |), - [ rc_b ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ], + "strong_count", + [] + |), + [ rc_b ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -254,52 +293,62 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Reference Count of rc_a: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Reference Count of rc_a: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") - [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ], - "strong_count", - [] - |), - [ rc_a ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ], + "strong_count", + [] + |), + [ rc_a ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -310,61 +359,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "rc_a and rc_b are equal: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "rc_a and rc_b are equal: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "bool" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::cmp::PartialEq", - Ty.apply - (Ty.path "alloc::rc::Rc") - [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ], - [ - Ty.apply - (Ty.path "alloc::rc::Rc") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "bool" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ], [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ] - ], - "eq", - [] - |), - [ rc_a; rc_b ] - |) - |) - ] - |) - ] - |)) + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ] + ], + "eq", + [] + |), + [ rc_a; rc_b ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -375,63 +434,75 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Length of the value inside rc_a: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Length of the value inside rc_a: " + |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "alloc::string::String", - "len", - [] - |), - [ + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| M.call_closure (| - M.get_trait_method (| - "core::ops::deref::Deref", - Ty.apply - (Ty.path "alloc::rc::Rc") - [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ], - [], - "deref", + M.get_associated_function (| + Ty.path "alloc::string::String", + "len", [] |), - [ rc_a ] + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ], + [], + "deref", + [] + |), + [ rc_a ] + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -442,43 +513,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Value of rc_b: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Value of rc_b: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::rc::Rc") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ rc_b ] - |) - ] - |)) + |), + [ rc_b ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -493,19 +572,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "--- rc_b is dropped out of scope --- -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "--- rc_b is dropped out of scope --- +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -516,52 +605,62 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Reference Count of rc_a: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Reference Count of rc_a: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::rc::Rc") - [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ], - "strong_count", - [] - |), - [ rc_a ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::rc::Rc") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ], + "strong_count", + [] + |), + [ rc_a ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -572,19 +671,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "--- rc_a is dropped out of scope --- -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "--- rc_a is dropped out of scope --- +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/result.err b/CoqOfRust/examples/default/examples/rust_book/std_library_types/result.err index e69de29bb..1b1d19d2d 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/result.err +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/result.err @@ -0,0 +1,10 @@ +warning: Expected an integer type for the parameters + --> examples/rust_book/std_library_types/result.rs:19:16 + | +19 | Ok(x / y) + | ^^^^^ + | + = note: Please report 🙏 + +warning: 1 warning emitted + 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 4d1901963..77b067845 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 @@ -31,7 +31,7 @@ Module checked. Definition Self : Ty.t := Ty.path "result::checked::MathError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -48,15 +48,19 @@ Module checked. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "DivisionByZero" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "DivisionByZero" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "NonPositiveLogarithm" |) |))); + M.alloc (| + M.read (| M.of_value (| Value.String "NonPositiveLogarithm" |) |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "NegativeSquareRoot" |) |))) + M.alloc (| + M.read (| M.of_value (| Value.String "NegativeSquareRoot" |) |) + |))) ] |) |) @@ -91,7 +95,7 @@ Module checked. } } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; y ] => ltac:(M.monadic @@ -99,27 +103,42 @@ Module checked. let y := M.alloc (| y |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| y |)) (M.read (| UnsupportedLiteral |)) + BinOp.Pure.eq (| + M.read (| y |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "result::checked::MathError::DivisionByZero" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "result::checked::MathError::DivisionByZero" [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ BinOp.Panic.div (| M.read (| x |), M.read (| y |) |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Panic.div (| Integer.Usize, M.read (| x |), M.read (| y |) |)) + ] + |) |))) ] |) @@ -136,39 +155,52 @@ Module checked. } } *) - Definition sqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition sqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| x |)) (M.read (| UnsupportedLiteral |)) + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "result::checked::MathError::NegativeSquareRoot" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple "result::checked::MathError::NegativeSquareRoot" [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "f64", "sqrt", [] |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "f64", "sqrt", [] |), + [ M.read (| x |) ] + |)) + ] + |) |))) ] |) @@ -185,39 +217,54 @@ Module checked. } } *) - Definition ln (τ : list Ty.t) (α : list Value.t) : M := + Definition ln (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| x |)) (M.read (| UnsupportedLiteral |)) + BinOp.Pure.le (| + M.read (| x |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ Value.StructTuple "result::checked::MathError::NonPositiveLogarithm" [] ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "result::checked::MathError::NonPositiveLogarithm" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "f64", "ln", [] |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "f64", "ln", [] |), + [ M.read (| x |) ] + |)) + ] + |) |))) ] |) @@ -241,7 +288,7 @@ fn op(x: f64, y: f64) -> f64 { } } *) -Definition op (τ : list Ty.t) (α : list Value.t) : M := +Definition op (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; y ] => ltac:(M.monadic @@ -274,23 +321,33 @@ Definition op (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "" |) ] |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "" |) |)) ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "result::checked::MathError" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "result::checked::MathError" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -332,23 +389,36 @@ Definition op (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "" |) ] |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "result::checked::MathError" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "result::checked::MathError" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -394,25 +464,38 @@ Definition op (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "result::checked::MathError" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "result::checked::MathError" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -445,7 +528,7 @@ fn main() { println!("{}", op(1.0, 10.0)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -460,44 +543,54 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f64" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "result::op", [] |), - [ - M.read (| UnsupportedLiteral |); - M.read (| UnsupportedLiteral |) - ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f64" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| "result::op", [] |), + [ + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.read (| M.of_value (| UnsupportedLiteral |) |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/result_chaining_with_question_mark.err b/CoqOfRust/examples/default/examples/rust_book/std_library_types/result_chaining_with_question_mark.err index e69de29bb..e0db4ba5a 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/result_chaining_with_question_mark.err +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/result_chaining_with_question_mark.err @@ -0,0 +1,10 @@ +warning: Expected an integer type for the parameters + --> examples/rust_book/std_library_types/result_chaining_with_question_mark.rs:15:16 + | +15 | Ok(x / y) + | ^^^^^ + | + = note: Please report 🙏 + +warning: 1 warning emitted + 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 309d92656..d7622d0aa 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 @@ -31,7 +31,7 @@ Module checked. Definition Self : Ty.t := Ty.path "result_chaining_with_question_mark::checked::MathError". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -48,15 +48,19 @@ Module checked. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "DivisionByZero" |) |))); + M.alloc (| M.read (| M.of_value (| Value.String "DivisionByZero" |) |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "NonPositiveLogarithm" |) |))); + M.alloc (| + M.read (| M.of_value (| Value.String "NonPositiveLogarithm" |) |) + |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| M.read (| Value.String "NegativeSquareRoot" |) |))) + M.alloc (| + M.read (| M.of_value (| Value.String "NegativeSquareRoot" |) |) + |))) ] |) |) @@ -88,7 +92,7 @@ Module checked. } } *) - Definition div (τ : list Ty.t) (α : list Value.t) : M := + Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; y ] => ltac:(M.monadic @@ -96,31 +100,44 @@ Module checked. let y := M.alloc (| y |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| y |)) (M.read (| UnsupportedLiteral |)) + BinOp.Pure.eq (| + M.read (| y |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "result_chaining_with_question_mark::checked::MathError::DivisionByZero" - [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "result_chaining_with_question_mark::checked::MathError::DivisionByZero" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ BinOp.Panic.div (| M.read (| x |), M.read (| y |) |) ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (BinOp.Panic.div (| Integer.Usize, M.read (| x |), M.read (| y |) |)) + ] + |) |))) ] |) @@ -137,43 +154,54 @@ Module checked. } } *) - Definition sqrt (τ : list Ty.t) (α : list Value.t) : M := + Definition sqrt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| x |)) (M.read (| UnsupportedLiteral |)) + BinOp.Pure.lt (| + M.read (| x |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "result_chaining_with_question_mark::checked::MathError::NegativeSquareRoot" - [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "result_chaining_with_question_mark::checked::MathError::NegativeSquareRoot" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "f64", "sqrt", [] |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "f64", "sqrt", [] |), + [ M.read (| x |) ] + |)) + ] + |) |))) ] |) @@ -190,43 +218,54 @@ Module checked. } } *) - Definition ln (τ : list Ty.t) (α : list Value.t) : M := + Definition ln (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.le (M.read (| x |)) (M.read (| UnsupportedLiteral |)) + BinOp.Pure.le (| + M.read (| x |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::result::Result::Err" - [ - Value.StructTuple - "result_chaining_with_question_mark::checked::MathError::NonPositiveLogarithm" - [] - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "result_chaining_with_question_mark::checked::MathError::NonPositiveLogarithm" + [] + |)) + ] + |) |))); fun γ => ltac:(M.monadic (M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_associated_function (| Ty.path "f64", "ln", [] |), - [ M.read (| x |) ] - |) - ] + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| Ty.path "f64", "ln", [] |), + [ M.read (| x |) ] + |)) + ] + |) |))) ] |) @@ -245,7 +284,7 @@ Module checked. sqrt(ln) } *) - Definition op_ (τ : list Ty.t) (α : list Value.t) : M := + Definition op_ (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; y ] => ltac:(M.monadic @@ -446,7 +485,7 @@ Module checked. } } *) - Definition op (τ : list Ty.t) (α : list Value.t) : M := + Definition op (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ x; y ] => ltac:(M.monadic @@ -478,14 +517,21 @@ Module checked. why, [ fun γ => - ltac:(M.monadic (Value.String "logarithm of non-positive number")); + ltac:(M.monadic + (M.of_value (| + Value.String "logarithm of non-positive number" + |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "division by zero" |) |))); + (M.alloc (| + M.read (| M.of_value (| Value.String "division by zero" |) |) + |))); fun γ => ltac:(M.monadic (M.alloc (| - M.read (| Value.String "square root of negative number" |) + M.read (| + M.of_value (| Value.String "square root of negative number" |) + |) |))) ] |) @@ -511,33 +557,43 @@ Module checked. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f64" ] - |), - [ value ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f64" ] + |), + [ value ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -550,7 +606,7 @@ fn main() { checked::op(1.0, 10.0); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -559,10 +615,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "result_chaining_with_question_mark::checked::op", [] |), - [ M.read (| UnsupportedLiteral |); M.read (| UnsupportedLiteral |) ] + [ + M.read (| M.of_value (| UnsupportedLiteral |) |); + M.read (| M.of_value (| UnsupportedLiteral |) |) + ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 4f2be8642..32f01e048 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 @@ -43,12 +43,15 @@ fn main() { println!("Bob says: {}", bob); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let pangram := M.copy (| Value.String "the quick brown fox jumps over the lazy dog" |) in + let pangram := + M.copy (| + M.of_value (| Value.String "the quick brown fox jumps over the lazy dog" |) + |) in let _ := let _ := M.alloc (| @@ -59,33 +62,43 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Pangram: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Pangram: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ pangram ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ pangram ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -96,17 +109,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Words in reverse -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Words in reverse +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.use (M.match_operator (| @@ -189,44 +209,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "> " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "> " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "str" ] - ] - |), - [ word ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "str" ] + ] + |), + [ word ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -367,21 +400,30 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "push_str", [] |), - [ string; M.read (| Value.String ", " |) ] + [ string; M.read (| M.of_value (| Value.String ", " |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let chars_to_trim := M.alloc (| (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ Value.UnicodeChar 32; Value.UnicodeChar 44 ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.UnicodeChar 32 |)); + A.to_value (M.of_value (| Value.UnicodeChar 44 |)) + ] + |) + |) + |) |) in let trimmed_str := M.alloc (| @@ -416,36 +458,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Used characters: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Used characters: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ trimmed_str ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ trimmed_str ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let alice := M.alloc (| M.call_closure (| @@ -456,7 +506,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "from", [] |), - [ M.read (| Value.String "I like dogs" |) ] + [ M.read (| M.of_value (| Value.String "I like dogs" |) |) ] |) |) in let bob := @@ -478,8 +528,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ alice ] |); - M.read (| Value.String "dog" |); - M.read (| Value.String "cat" |) + M.read (| M.of_value (| Value.String "dog" |) |); + M.read (| M.of_value (| Value.String "cat" |) |) ] |) |) in @@ -493,36 +543,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Alice says: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Alice says: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ alice ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ alice ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -533,35 +591,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Bob says: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Bob says: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ bob ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ bob ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 219fb5859..dda0046d2 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 @@ -37,12 +37,12 @@ fn main() { }; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let bytestring := M.alloc (| M.read (| UnsupportedLiteral |) |) in + let bytestring := M.alloc (| M.read (| M.of_value (| UnsupportedLiteral |) |) |) in let _ := let _ := M.alloc (| @@ -53,41 +53,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "A byte string: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "A byte string: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] - ] - |), - [ bytestring ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] + ] + |), + [ bytestring ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let escaped := M.copy (| UnsupportedLiteral |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let escaped := M.copy (| M.of_value (| UnsupportedLiteral |) |) in let _ := let _ := M.alloc (| @@ -98,41 +106,51 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Some escaped bytes: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Some escaped bytes: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] - ] - |), - [ escaped ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] + ] + |), + [ escaped ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let raw_bytestring := M.copy (| UnsupportedLiteral |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let raw_bytestring := M.copy (| M.of_value (| UnsupportedLiteral |) |) in let _ := let _ := M.alloc (| @@ -143,40 +161,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] - ] - |), - [ raw_bytestring ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ] + ] + |), + [ raw_bytestring ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -184,7 +212,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_function (| "core::str::converts::from_utf8", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| raw_bytestring |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| raw_bytestring |) |) ] |) |) in let γ0_0 := @@ -204,48 +232,61 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "And the same as text: '" |); - M.read (| Value.String "' -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "And the same as text: '" + |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String "' +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ my_str ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ my_str ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let _quotes := M.copy (| UnsupportedLiteral |) in - let shift_jis := M.copy (| UnsupportedLiteral |) in + let _quotes := M.copy (| M.of_value (| UnsupportedLiteral |) |) in + let shift_jis := M.copy (| M.of_value (| UnsupportedLiteral |) |) in let _ := M.match_operator (| M.alloc (| M.call_closure (| M.get_function (| "core::str::converts::from_utf8", [] |), - [ (* Unsize *) M.pointer_coercion (M.read (| shift_jis |)) ] + [ (* Unsize *) M.pointer_coercion (| M.read (| shift_jis |) |) ] |) |), [ @@ -267,36 +308,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Conversion successful: '" |); - M.read (| Value.String "' -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Conversion successful: '" |) + |)); + A.to_value (M.read (| M.of_value (| Value.String "' +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ my_str ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ my_str ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -315,39 +366,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Conversion failed: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Conversion failed: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "core::str::error::Utf8Error" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "core::str::error::Utf8Error" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 8b738961e..0093020bb 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 @@ -23,12 +23,12 @@ fn main() { println!("{}", long_string); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let byte_escape := M.copy (| Value.String "I'm writing Rust!" |) in + let byte_escape := M.copy (| M.of_value (| Value.String "I'm writing Rust!" |) |) in let _ := let _ := M.alloc (| @@ -39,38 +39,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "What are you doing? (\x3F means ?) " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "What are you doing? (\x3F means ?) " + |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ byte_escape ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ byte_escape ] + |)) + ] + |) + |) + |) ] |) ] |) |) 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 + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let unicode_codepoint := + M.copy (| M.of_value (| Value.String (String.String "029" "") |) |) in + let character_name := + M.copy (| M.of_value (| Value.String """DOUBLE-STRUCK CAPITAL R""" |) |) in let _ := let _ := M.alloc (| @@ -81,51 +95,65 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Unicode character " |); - M.read (| Value.String " (U+211D) is called " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Unicode character " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " (U+211D) is called " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ unicode_codepoint ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ character_name ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ unicode_codepoint ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ character_name ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let long_string := M.copy (| - Value.String - "String literals + M.of_value (| + Value.String + "String literals can span multiple lines. The linebreak and indentation here -><- can be escaped too!" + |) |) in let _ := let _ := @@ -137,34 +165,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ long_string ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ long_string ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 5da747534..d5c7748ea 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 @@ -17,12 +17,13 @@ fn main() { } " *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let raw_str := M.copy (| Value.String "Escapes don't work here: \x3F \u{211D}" |) in + let raw_str := + M.copy (| M.of_value (| Value.String "Escapes don't work here: \x3F \u{211D}" |) |) in let _ := let _ := M.alloc (| @@ -33,34 +34,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ raw_str ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ raw_str ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let quotes := M.copy (| Value.String "And then I said: ""There is no escape!""" |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let quotes := + M.copy (| M.of_value (| Value.String "And then I said: ""There is no escape!""" |) |) in let _ := let _ := M.alloc (| @@ -71,35 +83,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ quotes ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ quotes ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let longer_delimiter := - M.copy (| Value.String "A string with ""# in it. And even ""##!" |) in + M.copy (| M.of_value (| Value.String "A string with ""# in it. And even ""##!" |) |) in let _ := let _ := M.alloc (| @@ -110,34 +132,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ longer_delimiter ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ longer_delimiter ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 1e38b6d08..c693d4ac6 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 @@ -53,7 +53,7 @@ fn main() { println!("Updated vector: {:?}", xs); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -73,9 +73,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |), [ - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.I32 0); ("end_", Value.Integer Integer.I32 10) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 10 |))) + ] + |) ] |) |) in @@ -89,40 +94,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Collected (0..10) into: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Collected (0..10) into: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ collected_iterator ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ collected_iterator ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let xs := M.alloc (| M.call_closure (| @@ -133,8 +148,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -148,16 +163,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -171,40 +189,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Initial vector: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Initial vector: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ xs ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ xs ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -215,17 +241,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Push 4 into the vector -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Push 4 into the vector +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -236,7 +271,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "push", [] |), - [ xs; Value.Integer Integer.I32 4 ] + [ xs; M.of_value (| Value.Integer 4 |) ] |) |) in let _ := @@ -249,37 +284,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Vector: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Vector: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ xs ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ xs ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -290,49 +335,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Vector length: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Vector length: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - "len", - [] - |), - [ xs ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ xs ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -343,49 +396,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Second element: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Second element: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - [ Ty.path "usize" ], - "index", - [] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] |), - [ xs; Value.Integer Integer.Usize 1 ] - |) - ] - |) - ] - |)) + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + [ Ty.path "usize" ], + "index", + [] + |), + [ xs; M.of_value (| Value.Integer 1 |) ] + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -396,49 +457,58 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Pop last element: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Pop last element: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - "pop", - [] - |), - [ xs ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + "pop", + [] + |), + [ xs ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -449,15 +519,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "Contents of xs: -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Contents of xs: +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.use (M.match_operator (| @@ -542,44 +621,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "> " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "> " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "i32" ] - ] - |), - [ x ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "i32" ] + ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -686,53 +778,74 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "In position " |); - M.read (| Value.String " we have value " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "In position " + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " we have value " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ i ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "i32" ] - ] - |), - [ x ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ i ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "i32" ] + ] + |), + [ x ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -811,14 +924,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.write (| β, BinOp.Panic.mul (| + Integer.I32, M.read (| β |), - Value.Integer Integer.I32 3 + M.of_value (| Value.Integer 3 |) |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -832,41 +946,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Updated vector: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Updated vector: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ xs ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ xs ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 f9355ecf8..fb551920c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/channels.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/channels.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Definition value_NTHREADS : Value.t := - M.run ltac:(M.monadic (M.alloc (| M.alloc (| Value.Integer Integer.I32 3 |) |))). +Definition value_NTHREADS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.alloc (| M.of_value (| Value.Integer 3 |) |) |))). (* fn main() { @@ -47,7 +47,7 @@ fn main() { println!("{:?}", ids); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -95,15 +95,18 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.I32 0); - ("end_", - M.read (| - M.read (| M.get_constant (| "channels::NTHREADS" |) |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.read (| M.get_constant (| "channels::NTHREADS" |) |) + |))) + ] + |) ] |) |), @@ -170,8 +173,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |), [ - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -234,54 +237,75 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "thread " - |); - M.read (| - Value.String - " finished + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "thread " + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + " finished " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_display", - [ - Ty.path - "i32" - ] - |), - [ id ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "i32" + ] + |), + [ id + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in M.alloc (| - Value.Tuple [] + M.of_value (| + Value.Tuple [] + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -303,10 +327,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ children; M.read (| child |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -326,8 +350,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - M.rust_cast - (M.read (| M.read (| M.get_constant (| "channels::NTHREADS" |) |) |)) + M.rust_cast (| + M.read (| M.read (| M.get_constant (| "channels::NTHREADS" |) |) |) + |) ] |) |) in @@ -344,15 +369,18 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.I32 0); - ("end_", - M.read (| - M.read (| M.get_constant (| "channels::NTHREADS" |) |) - |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.read (| M.get_constant (| "channels::NTHREADS" |) |) + |))) + ] + |) ] |) |), @@ -425,10 +453,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -524,15 +552,17 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| child |) ] |); M.read (| - Value.String "oops! the child thread panicked" + M.of_value (| + Value.String "oops! the child thread panicked" + |) |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -550,46 +580,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ Ty.apply - (Ty.path "core::result::Result") + (Ty.path "alloc::vec::Vec") [ - Ty.path "i32"; - Ty.path "std::sync::mpsc::RecvError" - ]; - Ty.path "alloc::alloc::Global" + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "i32"; + Ty.path "std::sync::mpsc::RecvError" + ]; + Ty.path "alloc::alloc::Global" + ] ] - ] - |), - [ ids ] - |) - ] - |)) + |), + [ ids ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 8aed448ac..6beb70c7e 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 @@ -19,7 +19,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -56,16 +56,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "rustc" |) ] + [ M.read (| M.of_value (| Value.String "rustc" |) |) ] |) |); - M.read (| Value.String "--version" |) + M.read (| M.of_value (| Value.String "--version" |) |) ] |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -87,30 +87,40 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "failed to execute process: " - |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "failed to execute process: " + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::io::error::Error" ] - |), - [ e ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::io::error::Error" ] + |), + [ e ] + |)) + ] + |) + |) + |) ] |) ] @@ -119,12 +129,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -191,38 +202,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "rustc succeeded and stdout was: -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "rustc succeeded and stdout was: +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::borrow::Cow") - [ Ty.path "str" ] - ] - |), - [ s ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::borrow::Cow") + [ Ty.path "str" ] + ] + |), + [ s ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let s := @@ -269,38 +294,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "rustc failed and stderr was: -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "rustc failed and stderr was: +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "alloc::borrow::Cow") - [ Ty.path "str" ] - ] - |), - [ s ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "alloc::borrow::Cow") + [ Ty.path "str" ] + ] + |), + [ s ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 c2354acc1..c4b0ee4f8 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 @@ -1,10 +1,13 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Definition value_PANGRAM : Value.t := +Definition value_PANGRAM : A.t := M.run - ltac:(M.monadic (M.alloc (| Value.String "the quick brown fox jumped over the lazy dog -" |))). + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.String "the quick brown fox jumped over the lazy dog +" |) + |))). (* fn main() { @@ -41,7 +44,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -74,7 +77,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "wc" |) ] + [ M.read (| M.of_value (| Value.String "wc" |) |) ] |) |); M.call_closure (| @@ -119,25 +122,38 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "couldn't spawn wc: " |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "couldn't spawn wc: " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::io::error::Error" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::io::error::Error" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -215,26 +231,40 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "couldn't write to wc stdin: " |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "couldn't write to wc stdin: " + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::io::error::Error" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::io::error::Error" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -258,17 +288,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "sent pangram to wc -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "sent pangram to wc +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let s := @@ -332,26 +371,38 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "couldn't read wc stdout: " |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "couldn't read wc stdout: " |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::io::error::Error" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::io::error::Error" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -375,32 +426,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "wc responded with: -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "wc responded with: +" |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ s ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ s ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 893438178..24d4e89ba 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 @@ -9,7 +9,7 @@ fn main() { println!("reached end of main"); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -42,10 +42,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "sleep" |) ] + [ M.read (| M.of_value (| Value.String "sleep" |) |) ] |) |); - M.read (| Value.String "5" |) + M.read (| M.of_value (| Value.String "5" |) |) ] |) ] @@ -81,18 +81,27 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "reached end of main -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "reached end of main +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 688409e9c..3e21810f2 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 @@ -1,18 +1,20 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Definition value_LOREM_IPSUM : Value.t := +Definition value_LOREM_IPSUM : A.t := M.run ltac:(M.monadic (M.alloc (| - Value.String - "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + M.of_value (| + Value.String + "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. " + |) |))). (* @@ -33,7 +35,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -42,7 +44,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 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" |) ] + [ M.read (| M.of_value (| Value.String "lorem_ipsum.txt" |) |) ] |) |) in let display := @@ -88,37 +90,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "couldn't create " |); - M.read (| Value.String ": " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "couldn't create " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ": " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::path::Display" ] - |), - [ display ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::io::error::Error" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::path::Display" ] + |), + [ display ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::io::error::Error" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -172,37 +186,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "couldn't write to " |); - M.read (| Value.String ": " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "couldn't write to " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ": " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::path::Display" ] - |), - [ display ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::io::error::Error" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::path::Display" ] + |), + [ display ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::io::error::Error" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -226,36 +251,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "successfully wrote to " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "successfully wrote to " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::path::Display" ] - |), - [ display ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::path::Display" ] + |), + [ display ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 91f1681ed..1c3ecb03a 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 @@ -23,7 +23,7 @@ fn main() { // `file` goes out of scope, and the "hello.txt" file gets closed } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -32,7 +32,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "std::path::Path", "new", [ Ty.path "str" ] |), - [ M.read (| Value.String "hello.txt" |) ] + [ M.read (| M.of_value (| Value.String "hello.txt" |) |) ] |) |) in let display := @@ -78,37 +78,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "couldn't open " |); - M.read (| Value.String ": " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "couldn't open " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ": " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::path::Display" ] - |), - [ display ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::io::error::Error" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::path::Display" ] + |), + [ display ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::io::error::Error" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -163,37 +175,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "couldn't read " |); - M.read (| Value.String ": " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "couldn't read " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String ": " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::path::Display" ] - |), - [ display ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::io::error::Error" ] - |), - [ why ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::path::Display" ] + |), + [ display ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::io::error::Error" ] + |), + [ why ] + |)) + ] + |) + |) + |) ] |) ] @@ -217,44 +240,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " contains: -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " contains: +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "std::path::Display" ] - |), - [ display ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ s ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "std::path::Display" ] + |), + [ display ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ s ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 823a32b6a..a35f1ce8f 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 @@ -9,7 +9,7 @@ fn read_lines(filename: String) -> io::Lines> { return io::BufReader::new(file).lines(); } *) -Definition read_lines (τ : list Ty.t) (α : list Value.t) : M := +Definition read_lines (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ filename ] => ltac:(M.monadic @@ -81,7 +81,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -99,7 +99,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "to_string", [] |), - [ M.read (| Value.String "./hosts" |) ] + [ M.read (| M.of_value (| Value.String "./hosts" |) |) ] |) ] |) @@ -177,56 +177,72 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "core::result::Result") - [ - Ty.path "alloc::string::String"; - Ty.path "std::io::error::Error" - ], - "unwrap", - [] - |), - [ M.read (| line |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.path + "alloc::string::String"; + Ty.path + "std::io::error::Error" + ], + "unwrap", + [] + |), + [ M.read (| line |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 cabebd9cf..0fd0f879f 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 @@ -10,7 +10,7 @@ where Ok(io::BufReader::new(file).lines()) } *) -Definition read_lines (τ : list Ty.t) (α : list Value.t) : M := +Definition read_lines (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ P ], [ filename ] => ltac:(M.monadic @@ -100,33 +100,36 @@ Definition read_lines (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| - Value.StructTuple - "core::result::Result::Ok" - [ - M.call_closure (| - M.get_trait_method (| - "std::io::BufRead", - Ty.apply - (Ty.path "std::io::buffered::bufreader::BufReader") - [ Ty.path "std::fs::File" ], - [], - "lines", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "std::io::BufRead", Ty.apply (Ty.path "std::io::buffered::bufreader::BufReader") [ Ty.path "std::fs::File" ], - "new", + [], + "lines", [] |), - [ M.read (| file |) ] - |) - ] - |) - ] + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::io::buffered::bufreader::BufReader") + [ Ty.path "std::fs::File" ], + "new", + [] + |), + [ M.read (| file |) ] + |) + ] + |)) + ] + |) |) |))) |))) @@ -146,13 +149,13 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -163,7 +166,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "file_io_read_lines_efficient_method::read_lines", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "./hosts" |) ] + [ M.read (| M.of_value (| Value.String "./hosts" |) |) ] |) |) in let γ0_0 := @@ -231,7 +234,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let line := M.copy (| γ0_0 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -260,51 +263,70 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_display", - [ - Ty.path - "alloc::string::String" - ] - |), - [ ip ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "alloc::string::String" + ] + |), + [ ip ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 30036bdb6..fd321d663 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 @@ -11,7 +11,7 @@ fn cat(path: &Path) -> io::Result { } } *) -Definition cat (τ : list Ty.t) (α : list Value.t) : M := +Definition cat (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ path ] => ltac:(M.monadic @@ -123,13 +123,23 @@ Definition cat (τ : 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 - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| s |) ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| s |)) ] + |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] |))) + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ A.to_value (M.read (| e |)) ] + |) + |))) ] |) |))) @@ -144,7 +154,7 @@ fn echo(s: &str, path: &Path) -> io::Result<()> { f.write_all(s.as_bytes()) } *) -Definition echo (τ : list Ty.t) (α : list Value.t) : M := +Definition echo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ s; path ] => ltac:(M.monadic @@ -260,7 +270,7 @@ fn touch(path: &Path) -> io::Result<()> { } } *) -Definition touch (τ : list Ty.t) (α : list Value.t) : M := +Definition touch (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ path ] => ltac:(M.monadic @@ -291,10 +301,10 @@ Definition touch (τ : list Ty.t) (α : list Value.t) : M := [] |) |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |); - Value.Bool true + M.of_value (| Value.Bool true |) ] |); M.read (| path |) @@ -306,13 +316,23 @@ Definition touch (τ : 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 - M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |))); + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| e |) ] |))) + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Err" [ A.to_value (M.read (| e |)) ] + |) + |))) ] |) |))) @@ -383,7 +403,7 @@ fn main() { }); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -398,15 +418,22 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "`mkdir a` -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "`mkdir a` +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| M.alloc (| @@ -415,7 +442,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "std::fs::create_dir", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "a" |) ] + [ M.read (| M.of_value (| Value.String "a" |) |) ] |) |), [ @@ -437,50 +464,60 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "! " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "! " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "std::io::error::ErrorKind" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "std::io::error::Error", - "kind", - [] - |), - [ why ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "std::io::error::ErrorKind" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "std::io::error::Error", + "kind", + [] + |), + [ why ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -493,17 +530,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "`echo hello > a/b.txt` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "`echo hello > a/b.txt` +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -518,19 +564,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.call_closure (| M.get_function (| "filesystem_operations::echo", [] |), [ - M.read (| Value.String "hello" |); + M.read (| M.of_value (| Value.String "hello" |) |); M.call_closure (| M.get_associated_function (| Ty.path "std::path::Path", "new", [ Ty.path "str" ] |), - [ M.read (| Value.String "a/b.txt" |) ] + [ M.read (| M.of_value (| Value.String "a/b.txt" |) |) ] |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -555,53 +601,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "! " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "! " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "std::io::error::ErrorKind" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "std::io::error::Error", - "kind", - [] - |), - [ why ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.path + "std::io::error::ErrorKind" + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "std::io::error::Error", + "kind", + [] + |), + [ why ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -615,17 +679,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "`mkdir -p a/c/d` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`mkdir -p a/c/d` +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -642,10 +713,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "std::fs::create_dir_all", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "a/c/d" |) ] + [ M.read (| M.of_value (| Value.String "a/c/d" |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -670,53 +741,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "! " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "! " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "std::io::error::ErrorKind" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "std::io::error::Error", - "kind", - [] - |), - [ why ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.path + "std::io::error::ErrorKind" + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "std::io::error::Error", + "kind", + [] + |), + [ why ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -730,17 +819,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "`touch a/c/e.txt` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`touch a/c/e.txt` +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -761,12 +857,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [ Ty.path "str" ] |), - [ M.read (| Value.String "a/c/e.txt" |) ] + [ M.read (| M.of_value (| Value.String "a/c/e.txt" |) |) ] |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -791,53 +887,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "! " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "! " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "std::io::error::ErrorKind" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "std::io::error::Error", - "kind", - [] - |), - [ why ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.path + "std::io::error::ErrorKind" + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "std::io::error::Error", + "kind", + [] + |), + [ why ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -851,24 +965,33 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "`ln -s ../b.txt a/c/b.txt` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "`ln -s ../b.txt a/c/b.txt` +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.alloc (| @@ -894,12 +1017,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |), [ - M.read (| Value.String "../b.txt" |); - M.read (| Value.String "a/c/b.txt" |) + M.read (| M.of_value (| Value.String "../b.txt" |) |); + M.read (| M.of_value (| Value.String "a/c/b.txt" |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -927,63 +1050,81 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "! " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "! " + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_debug", - [ - Ty.path - "std::io::error::ErrorKind" - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_debug", + [ Ty.path - "std::io::error::Error", - "kind", - [] - |), - [ why ] - |) - |) - ] - |) - ] - |)) + "std::io::error::ErrorKind" + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "std::io::error::Error", + "kind", + [] + |), + [ why ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -996,15 +1137,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "`cat a/c/b.txt` -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`cat a/c/b.txt` +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| M.alloc (| @@ -1017,7 +1167,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new", [ Ty.path "str" ] |), - [ M.read (| Value.String "a/c/b.txt" |) ] + [ M.read (| M.of_value (| Value.String "a/c/b.txt" |) |) ] |) ] |) @@ -1041,45 +1191,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "! " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "! " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "std::io::error::ErrorKind" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "std::io::error::Error", - "kind", - [] - |), - [ why ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "std::io::error::ErrorKind" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "std::io::error::Error", + "kind", + [] + |), + [ why ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1098,34 +1258,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "> " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "> " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ s ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ s ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in let _ := @@ -1138,15 +1308,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "`ls a` -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "`ls a` +" |) |)) ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| M.alloc (| @@ -1155,7 +1331,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "std::fs::read_dir", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "a" |) ] + [ M.read (| M.of_value (| Value.String "a" |) |) ] |) |), [ @@ -1177,45 +1353,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "! " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "! " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "std::io::error::ErrorKind" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "std::io::error::Error", - "kind", - [] - |), - [ why ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "std::io::error::ErrorKind" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "std::io::error::Error", + "kind", + [] + |), + [ why ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1284,72 +1470,96 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "> " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "> " + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String " +" + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "std::path::PathBuf" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path - "std::fs::DirEntry", - "path", - [] - |), + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_debug", [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::result::Result") + Ty.path + "std::path::PathBuf" + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "std::fs::DirEntry", + "path", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.path + "std::fs::DirEntry"; + Ty.path + "std::io::error::Error" + ], + "unwrap", + [] + |), [ - Ty.path - "std::fs::DirEntry"; - Ty.path - "std::io::error::Error" - ], - "unwrap", - [] - |), - [ M.read (| path |) ] - |) + M.read (| + path + |) + ] + |) + |) + ] |) - ] - |) - |) - ] - |) - ] - |)) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)))) @@ -1365,15 +1575,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "`rm a/c/e.txt` -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`rm a/c/e.txt` +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -1390,10 +1609,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "std::fs::remove_file", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "a/c/e.txt" |) ] + [ M.read (| M.of_value (| Value.String "a/c/e.txt" |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1418,53 +1637,71 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "! " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "! " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "std::io::error::ErrorKind" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "std::io::error::Error", - "kind", - [] - |), - [ why ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.path + "std::io::error::ErrorKind" + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "std::io::error::Error", + "kind", + [] + |), + [ why ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in @@ -1478,15 +1715,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "`rmdir a/c/d` -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "`rmdir a/c/d` +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -1503,10 +1749,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "std::fs::remove_dir", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "a/c/d" |) ] + [ M.read (| M.of_value (| Value.String "a/c/d" |) |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -1531,57 +1777,75 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "! " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "! " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "std::io::error::ErrorKind" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "std::io::error::Error", - "kind", - [] - |), - [ why ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.path + "std::io::error::ErrorKind" + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "std::io::error::Error", + "kind", + [] + |), + [ why ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/foreign_function_interface.err b/CoqOfRust/examples/default/examples/rust_book/std_misc/foreign_function_interface.err index 61a1bcc94..ee7427d96 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/foreign_function_interface.err +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/foreign_function_interface.err @@ -12,5 +12,13 @@ warning: Foreign modules are not supported | = note: We will work on it! 🐣 -warning: 1 warning emitted +warning: Expected an integer type for the parameters + --> examples/rust_book/std_misc/foreign_function_interface.rs:43:42 + | +43 | write!(f, "{}-{}i", self.re, -self.im) + | ^^^^^^^^ + | + = note: Please report 🙏 + +warning: 2 warnings emitted 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 e4b013993..f8a3f0c8e 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 @@ -8,7 +8,7 @@ fn cos(z: Complex) -> Complex { unsafe { ccosf(z) } } *) -Definition cos (τ : list Ty.t) (α : list Value.t) : M := +Definition cos (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ z ] => ltac:(M.monadic @@ -34,16 +34,21 @@ fn main() { println!("cos({:?}) = {:?}", z, cos(z)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let z := M.alloc (| - Value.StructRecord - "foreign_function_interface::Complex" - [ ("re", M.read (| UnsupportedLiteral |)); ("im", M.read (| UnsupportedLiteral |)) ] + M.of_value (| + Value.StructRecord + "foreign_function_interface::Complex" + [ + ("re", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))); + ("im", A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |))) + ] + |) |) in let z_sqrt := M.alloc (| @@ -62,45 +67,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "the square root of " |); - M.read (| Value.String " is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "the square root of " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "foreign_function_interface::Complex" ] - |), - [ z ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "foreign_function_interface::Complex" ] - |), - [ z_sqrt ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "foreign_function_interface::Complex" ] + |), + [ z ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "foreign_function_interface::Complex" ] + |), + [ z_sqrt ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -111,53 +127,64 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "cos(" |); - M.read (| Value.String ") = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "cos(" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ") = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "foreign_function_interface::Complex" ] - |), - [ z ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "foreign_function_interface::Complex" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| "foreign_function_interface::cos", [] |), - [ M.read (| z |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "foreign_function_interface::Complex" ] + |), + [ z ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "foreign_function_interface::Complex" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "foreign_function_interface::cos", + [] + |), + [ M.read (| z |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -173,14 +200,14 @@ Module Impl_core_clone_Clone_for_foreign_function_interface_Complex. Definition Self : Ty.t := Ty.path "foreign_function_interface::Complex". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -214,7 +241,7 @@ Module Impl_core_fmt_Debug_for_foreign_function_interface_Complex. } } *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -222,22 +249,23 @@ Module Impl_core_fmt_Debug_for_foreign_function_interface_Complex. let f := M.alloc (| f |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| + BinOp.Pure.lt (| + M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "foreign_function_interface::Complex", "im" |) - |)) - (M.read (| UnsupportedLiteral |)) + |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -257,56 +285,65 @@ Module Impl_core_fmt_Debug_for_foreign_function_interface_Complex. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String "-" |); - M.read (| Value.String "i" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "-" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "i" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "foreign_function_interface::Complex", - "re" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f32" ] - |), - [ - M.alloc (| - UnOp.Panic.neg (| - M.read (| - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "foreign_function_interface::Complex", - "im" + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "foreign_function_interface::Complex", + "re" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f32" ] + |), + [ + M.alloc (| + UnOp.Panic.neg (| + Integer.Usize, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "foreign_function_interface::Complex", + "im" + |) + |) |) |) - |) - |) - ] - |) - ] - |)) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -331,50 +368,58 @@ Module Impl_core_fmt_Debug_for_foreign_function_interface_Complex. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String "+" |); - M.read (| Value.String "i" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "+" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "i" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "foreign_function_interface::Complex", - "re" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f32" ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "foreign_function_interface::Complex", - "im" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "foreign_function_interface::Complex", + "re" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f32" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "foreign_function_interface::Complex", + "im" + |) + ] + |)) + ] + |) + |) + |) ] |) ] 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 a5e21459b..3e410309d 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/path.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/path.v @@ -27,7 +27,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -36,7 +36,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "std::path::Path", "new", [ Ty.path "str" ] |), - [ M.read (| Value.String "." |) ] + [ M.read (| M.of_value (| Value.String "." |) |) ] |) |) in let _display := @@ -71,12 +71,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "join", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| path |); M.read (| Value.String "a" |) ] + [ M.read (| path |); M.read (| M.of_value (| Value.String "a" |) |) ] |) |) ] |); - M.read (| Value.String "b" |) + M.read (| M.of_value (| Value.String "b" |) |) ] |) |) in @@ -88,7 +88,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "push", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ new_path; M.read (| Value.String "c" |) ] + [ new_path; M.read (| M.of_value (| Value.String "c" |) |) ] |) |) in let _ := @@ -99,7 +99,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "push", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ new_path; M.read (| Value.String "myfile.tar.gz" |) ] + [ new_path; M.read (| M.of_value (| Value.String "myfile.tar.gz" |) |) ] |) |) in let _ := @@ -110,7 +110,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "set_file_name", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ new_path; M.read (| Value.String "package.tgz" |) ] + [ new_path; M.read (| M.of_value (| Value.String "package.tgz" |) |) ] |) |) in M.match_operator (| @@ -141,7 +141,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "new path is not a valid UTF-8 sequence" |) ] + [ + M.read (| + M.of_value (| Value.String "new path is not a valid UTF-8 sequence" |) + |) + ] |) |) |))); @@ -163,36 +167,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "new path is " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "new path is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ s ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ s ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 96acd0902..9eddaa009 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 @@ -14,7 +14,7 @@ fn main() { println!("I got {:?} arguments: {:?}.", args.len() - 1, &args[1..]); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -46,52 +46,60 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "My path is " |); - M.read (| Value.String ". -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "My path is " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ". +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply - (Ty.path "alloc::vec::Vec") - [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ], - [ Ty.path "usize" ], - "index", - [] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] |), - [ args; Value.Integer Integer.Usize 0 ] - |) - ] - |) - ] - |)) + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ], + [ Ty.path "usize" ], + "index", + [] + |), + [ args; M.of_value (| Value.Integer 0 |) ] + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -102,100 +110,115 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "I got " |); - M.read (| Value.String " arguments: " |); - M.read (| Value.String ". -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "I got " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " arguments: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String ". +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - BinOp.Panic.sub (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ], - "len", - [] - |), - [ args ] - |), - Value.Integer Integer.Usize 1 - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&") + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ], + "len", + [] + |), + [ args ] + |), + M.of_value (| Value.Integer 1 |) + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", [ Ty.apply - (Ty.path "slice") - [ Ty.path "alloc::string::String" ] - ] - ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::index::Index", - Ty.apply - (Ty.path "alloc::vec::Vec") + (Ty.path "&") [ - Ty.path "alloc::string::String"; - Ty.path "alloc::alloc::Global" - ], - [ - Ty.apply - (Ty.path "core::ops::range::RangeFrom") - [ Ty.path "usize" ] - ], - "index", - [] - |), - [ - args; - Value.StructRecord - "core::ops::range::RangeFrom" - [ ("start", Value.Integer Integer.Usize 1) ] + Ty.apply + (Ty.path "slice") + [ Ty.path "alloc::string::String" ] + ] ] - |) - |) - ] - |) - ] - |)) + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloc::string::String"; + Ty.path "alloc::alloc::Global" + ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + args; + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 1 |))) + ] + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 279d72706..b968dfb2c 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 @@ -6,7 +6,7 @@ fn increase(number: i32) { println!("{}", number + 1); } *) -Definition increase (τ : list Ty.t) (α : list Value.t) : M := +Definition increase (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ number ] => ltac:(M.monadic @@ -22,41 +22,52 @@ Definition increase (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - BinOp.Panic.add (| - M.read (| number |), - Value.Integer Integer.I32 1 - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + BinOp.Panic.add (| + Integer.I32, + M.read (| number |), + M.of_value (| Value.Integer 1 |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -66,7 +77,7 @@ fn decrease(number: i32) { println!("{}", number - 1); } *) -Definition decrease (τ : list Ty.t) (α : list Value.t) : M := +Definition decrease (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ number ] => ltac:(M.monadic @@ -82,41 +93,52 @@ Definition decrease (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - BinOp.Panic.sub (| - M.read (| number |), - Value.Integer Integer.I32 1 - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + BinOp.Panic.sub (| + Integer.I32, + M.read (| number |), + M.of_value (| Value.Integer 1 |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -132,7 +154,7 @@ match_args {{increase|decrease}} ); } *) -Definition help (τ : list Ty.t) (α : list Value.t) : M := +Definition help (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -147,28 +169,34 @@ Definition help (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "usage: + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "usage: match_args Check whether given string is the answer. match_args {increase|decrease} Increase or decrease given integer by one. " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -218,7 +246,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -258,11 +286,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 Integer.Usize 1 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in let _ := let _ := M.alloc (| @@ -277,31 +301,33 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "My name is 'match_args'. Try passing some arguments! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "My name is 'match_args'. Try passing some arguments! " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 2 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 2 |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -329,7 +355,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "index", [] |), - [ args; Value.Integer Integer.Usize 1 ] + [ args; M.of_value (| Value.Integer 1 |) ] |) ] |) @@ -348,7 +374,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), - Value.Integer Integer.I32 42 + Value.Integer 42 |) in let _ := M.alloc (| @@ -363,18 +389,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "This is the answer! -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "This is the answer! +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -390,28 +426,33 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "This is not the answer. -" |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "This is not the answer. +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => ltac:(M.monadic - (let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Integer Integer.Usize 3 - |) in + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 3 |) in let cmd := M.alloc (| M.call_closure (| @@ -424,7 +465,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "index", [] |), - [ args; Value.Integer Integer.Usize 1 ] + [ args; M.of_value (| Value.Integer 1 |) ] |) |) in let num := @@ -439,7 +480,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "index", [] |), - [ args; Value.Integer Integer.Usize 2 ] + [ args; M.of_value (| Value.Integer 2 |) ] |) |) in let number := @@ -502,23 +543,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "error: second argument not an integer + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "error: second argument not an integer " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -529,7 +576,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - M.return_ (| Value.Tuple [] |) + M.return_ (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -546,7 +593,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "index", [] |), - [ M.read (| cmd |); Value.StructTuple "core::ops::range::RangeFull" [] ] + [ + M.read (| cmd |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] |) |), [ @@ -592,22 +642,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "error: invalid command + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "error: invalid command " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -615,7 +671,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))); fun γ => @@ -627,7 +683,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) 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 b5f2e1bce..221fe66cb 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/threads.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/threads.v @@ -1,8 +1,8 @@ (* Generated by coq-of-rust *) Require Import CoqOfRust.CoqOfRust. -Definition value_NTHREADS : Value.t := - M.run ltac:(M.monadic (M.alloc (| Value.Integer Integer.U32 10 |))). +Definition value_NTHREADS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). (* fn main() { @@ -22,7 +22,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -56,12 +56,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.U32 0); - ("end_", M.read (| M.get_constant (| "threads::NTHREADS" |) |)) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value (M.read (| M.get_constant (| "threads::NTHREADS" |) |))) + ] + |) ] |) |), @@ -124,8 +127,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |), [ - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -153,61 +156,79 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "this is thread number " - |); - M.read (| - Value.String - " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "this is thread number " + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + " " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_display", - [ - Ty.path - "u32" - ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "u32" + ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -281,11 +302,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| child |) ] |) |), - [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] + [ + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 b06859c3c..78d9d7cab 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 @@ -88,15 +88,16 @@ fn main() { println!("Final sum result: {}", final_result); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let data := M.copy (| - Value.String - "86967897737416471853297327050364959 + M.of_value (| + Value.String + "86967897737416471853297327050364959 11861322575564723963297542624962850 70856234701860851907960690014725639 38397966707106094172783238747669219 @@ -104,6 +105,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 58495327135744041048897885734297812 69920216438980873548808413720956532 16278424637452589860345374828574668" + |) |) in let children := M.alloc (| @@ -208,49 +210,68 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "data segment " |); - M.read (| Value.String " is """ |); - M.read (| Value.String """ + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "data segment " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " is """ |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String """ " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ i ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ - Ty.apply - (Ty.path "&") - [ Ty.path "str" ] - ] - |), - [ data_segment ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ i ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "str" ] + ] + |), + [ data_segment ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -277,8 +298,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |), [ - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -342,8 +363,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -383,14 +404,17 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| c |); - Value.Integer - Integer.U32 - 10 + M.of_value (| + Value.Integer + 10 + |) ] |); M.read (| - Value.String - "should be a digit" + M.of_value (| + Value.String + "should be a digit" + |) |) ] |))) @@ -398,7 +422,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -422,77 +447,98 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String - "processed segment " - |); - M.read (| - Value.String - ", result=" - |); - M.read (| - Value.String - " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "processed segment " + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + ", result=" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + " " - |) - ] - |)); + |) + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_display", - [ - Ty.path - "usize" - ] - |), - [ i ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path - "core::fmt::rt::Argument", - "new_display", - [ - Ty.path - "u32" - ] - |), - [ result ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "usize" + ] + |), + [ i ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "u32" + ] + |), + [ result + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in result |))) ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -557,8 +603,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.read (| children |) ] |); - M.closure - (fun γ => + M.closure (| + fun γ => ltac:(M.monadic match γ with | [ α0 ] => @@ -600,7 +646,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) | _ => M.impossible (||) - end)) + end) + |) ] |) ] @@ -616,37 +663,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Final sum result: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Final sum result: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ final_result ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ final_result ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 388b5926e..7131658b5 100644 --- a/CoqOfRust/examples/default/examples/rust_book/testing/documentation_testing.v +++ b/CoqOfRust/examples/default/examples/rust_book/testing/documentation_testing.v @@ -6,13 +6,13 @@ pub fn add(a: i32, b: i32) -> i32 { a + b } *) -Definition add (τ : list Ty.t) (α : list Value.t) : M := +Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| Integer.I32, M.read (| a |), M.read (| b |) |))) | _, _ => M.impossible end. @@ -25,7 +25,7 @@ pub fn div(a: i32, b: i32) -> i32 { a / b } *) -Definition div (τ : list Ty.t) (α : list Value.t) : M := +Definition div (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b ] => ltac:(M.monadic @@ -34,14 +34,14 @@ Definition div (τ : list Ty.t) (α : list Value.t) : M := M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq (M.read (| b |)) (Value.Integer Integer.I32 0) + BinOp.Pure.eq (| M.read (| b |), M.of_value (| Value.Integer 0 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -51,14 +51,14 @@ Definition div (τ : list Ty.t) (α : list Value.t) : M := "std::panicking::begin_panic", [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] |), - [ M.read (| Value.String "Divide-by-zero error" |) ] + [ M.read (| M.of_value (| Value.String "Divide-by-zero error" |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| BinOp.Panic.div (| M.read (| a |), M.read (| b |) |) |) + M.alloc (| BinOp.Panic.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 0ae7dae88..d1e0e9788 100644 --- a/CoqOfRust/examples/default/examples/rust_book/testing/unit_testing.v +++ b/CoqOfRust/examples/default/examples/rust_book/testing/unit_testing.v @@ -6,13 +6,13 @@ pub fn add(a: i32, b: i32) -> i32 { a + b } *) -Definition add (τ : list Ty.t) (α : list Value.t) : M := +Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - BinOp.Panic.add (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.add (| Integer.I32, M.read (| a |), M.read (| b |) |))) | _, _ => M.impossible end. @@ -21,13 +21,13 @@ fn bad_add(a: i32, b: i32) -> i32 { a - b } *) -Definition bad_add (τ : list Ty.t) (α : list Value.t) : M := +Definition bad_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - BinOp.Panic.sub (| M.read (| a |), M.read (| b |) |))) + BinOp.Panic.sub (| Integer.I32, M.read (| a |), M.read (| b |) |))) | _, _ => M.impossible end. @@ -37,7 +37,7 @@ Module tests. assert_eq!(add(1, 2), 3); } *) - Definition test_add (τ : list Ty.t) (α : list Value.t) : M := + Definition test_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -45,16 +45,19 @@ Module tests. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_function (| "unit_testing::add", [] |), - [ Value.Integer Integer.I32 1; Value.Integer Integer.I32 2 ] - |) - |); - M.alloc (| Value.Integer Integer.I32 3 |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_function (| "unit_testing::add", [] |), + [ M.of_value (| Value.Integer 1 |); M.of_value (| Value.Integer 2 |) ] + |) + |)); + A.to_value (M.alloc (| M.of_value (| Value.Integer 3 |) |)) + ] + |) |), [ fun γ => @@ -64,17 +67,19 @@ Module tests. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -83,7 +88,9 @@ Module tests. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -95,19 +102,21 @@ Module tests. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -119,7 +128,7 @@ Module tests. assert_eq!(bad_add(1, 2), 3); } *) - Definition test_bad_add (τ : list Ty.t) (α : list Value.t) : M := + Definition test_bad_add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -127,16 +136,19 @@ Module tests. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_function (| "unit_testing::bad_add", [] |), - [ Value.Integer Integer.I32 1; Value.Integer Integer.I32 2 ] - |) - |); - M.alloc (| Value.Integer Integer.I32 3 |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_function (| "unit_testing::bad_add", [] |), + [ M.of_value (| Value.Integer 1 |); M.of_value (| Value.Integer 2 |) ] + |) + |)); + A.to_value (M.alloc (| M.of_value (| Value.Integer 3 |) |)) + ] + |) |), [ fun γ => @@ -146,17 +158,19 @@ Module tests. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -165,7 +179,9 @@ Module tests. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -177,19 +193,21 @@ Module tests. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/clone.v b/CoqOfRust/examples/default/examples/rust_book/traits/clone.v index fade52731..8443b6b52 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/clone.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/clone.v @@ -12,7 +12,7 @@ Module Impl_core_fmt_Debug_for_clone_Unit. Definition Self : Ty.t := Ty.path "clone::Unit". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -20,7 +20,7 @@ Module Impl_core_fmt_Debug_for_clone_Unit. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "Unit" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "Unit" |) |) ] |))) | _, _ => M.impossible end. @@ -37,7 +37,7 @@ Module Impl_core_clone_Clone_for_clone_Unit. Definition Self : Ty.t := Ty.path "clone::Unit". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -76,39 +76,43 @@ Module Impl_core_clone_Clone_for_clone_Pair. Definition Self : Ty.t := Ty.path "clone::Pair". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructTuple - "clone::Pair" - [ - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - [], - "clone", - [] - |), - [ M.SubPointer.get_struct_tuple_field (| M.read (| self |), "clone::Pair", 0 |) ] - |); - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - [], - "clone", - [] - |), - [ M.SubPointer.get_struct_tuple_field (| M.read (| self |), "clone::Pair", 1 |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "clone::Pair" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + [], + "clone", + [] + |), + [ M.SubPointer.get_struct_tuple_field (| M.read (| self |), "clone::Pair", 0 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + [], + "clone", + [] + |), + [ M.SubPointer.get_struct_tuple_field (| M.read (| self |), "clone::Pair", 1 |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -124,7 +128,7 @@ Module Impl_core_fmt_Debug_for_clone_Pair. Definition Self : Ty.t := Ty.path "clone::Pair". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -138,15 +142,17 @@ Module Impl_core_fmt_Debug_for_clone_Pair. |), [ M.read (| f |); - M.read (| Value.String "Pair" |); + M.read (| M.of_value (| Value.String "Pair" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_tuple_field (| M.read (| self |), "clone::Pair", 0 |)); + M.pointer_coercion (| + M.SubPointer.get_struct_tuple_field (| M.read (| self |), "clone::Pair", 0 |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "clone::Pair", 1 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -196,12 +202,12 @@ fn main() { println!("clone: {:?}", cloned_pair); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let unit_ := M.alloc (| Value.StructTuple "clone::Unit" [] |) in + let unit_ := M.alloc (| M.of_value (| Value.StructTuple "clone::Unit" [] |) |) in let copied_unit := M.copy (| unit_ |) in let _ := let _ := @@ -213,34 +219,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "original: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "original: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "clone::Unit" ] - |), - [ unit_ ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "clone::Unit" ] + |), + [ unit_ ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -251,59 +267,73 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "copy: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "copy: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "clone::Unit" ] - |), - [ copied_unit ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "clone::Unit" ] + |), + [ copied_unit ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let pair_ := M.alloc (| - Value.StructTuple - "clone::Pair" - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [ Value.Integer Integer.I32 1 ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::boxed::Box") - [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], - "new", - [] - |), - [ Value.Integer Integer.I32 2 ] - |) - ] + M.of_value (| + Value.StructTuple + "clone::Pair" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 1 |) ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ Ty.path "i32"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [ M.of_value (| Value.Integer 2 |) ] + |)) + ] + |) |) in let _ := let _ := @@ -315,34 +345,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "original: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "original: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "clone::Pair" ] - |), - [ pair_ ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "clone::Pair" ] + |), + [ pair_ ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let moved_pair := M.copy (| pair_ |) in let _ := let _ := @@ -354,33 +394,43 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "moved: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "moved: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "clone::Pair" ] - |), - [ moved_pair ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "clone::Pair" ] + |), + [ moved_pair ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let cloned_pair := M.alloc (| M.call_closure (| @@ -405,34 +455,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "clone: " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "clone: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "clone::Pair" ] - |), - [ cloned_pair ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "clone::Pair" ] + |), + [ cloned_pair ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/derive.err b/CoqOfRust/examples/default/examples/rust_book/traits/derive.err index e69de29bb..dac78221a 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/derive.err +++ b/CoqOfRust/examples/default/examples/rust_book/traits/derive.err @@ -0,0 +1,10 @@ +warning: Expected an integer type for the parameters + --> examples/rust_book/traits/derive.rs:13:21 + | +13 | Centimeters(inches as f64 * 2.54) + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: Please report 🙏 + +warning: 1 warning emitted + diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/derive.v b/CoqOfRust/examples/default/examples/rust_book/traits/derive.v index 0a6958c67..5b55f874f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/derive.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/derive.v @@ -23,19 +23,20 @@ Module Impl_core_cmp_PartialEq_for_derive_Centimeters. Definition Self : Ty.t := Ty.path "derive::Centimeters". (* PartialEq *) - Definition eq (τ : list Ty.t) (α : list Value.t) : M := + Definition eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Pure.eq - (M.read (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "derive::Centimeters", 0 |) - |)) - (M.read (| + |), + M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| other |), "derive::Centimeters", 0 |) - |)))) + |) + |))) | _, _ => M.impossible end. @@ -51,7 +52,7 @@ Module Impl_core_cmp_PartialOrd_for_derive_Centimeters. Definition Self : Ty.t := Ty.path "derive::Centimeters". (* PartialOrd *) - Definition partial_cmp (τ : list Ty.t) (α : list Value.t) : M := + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -92,7 +93,7 @@ Module Impl_core_fmt_Debug_for_derive_Inches. Definition Self : Ty.t := Ty.path "derive::Inches". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -106,12 +107,13 @@ Module Impl_core_fmt_Debug_for_derive_Inches. |), [ M.read (| f |); - M.read (| Value.String "Inches" |); + M.read (| M.of_value (| Value.String "Inches" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "derive::Inches", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -135,7 +137,7 @@ Module Impl_derive_Inches. Centimeters(inches as f64 * 2.54) } *) - Definition to_centimeters (τ : list Ty.t) (α : list Value.t) : M := + Definition to_centimeters (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -150,14 +152,18 @@ Module Impl_derive_Inches. let γ1_0 := M.SubPointer.get_struct_tuple_field (| γ, "derive::Inches", 0 |) in let inches := M.copy (| γ1_0 |) in M.alloc (| - Value.StructTuple - "derive::Centimeters" - [ - BinOp.Panic.mul (| - M.rust_cast (M.read (| inches |)), - M.read (| UnsupportedLiteral |) - |) - ] + M.of_value (| + Value.StructTuple + "derive::Centimeters" + [ + A.to_value + (BinOp.Panic.mul (| + Integer.Usize, + M.rust_cast (| M.read (| inches |) |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |)) + ] + |) |))) ] |) @@ -203,15 +209,23 @@ fn main() { println!("One foot is {} than one meter.", cmp); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let _one_second := - M.alloc (| Value.StructTuple "derive::Seconds" [ Value.Integer Integer.I32 1 ] |) in + M.alloc (| + M.of_value (| + Value.StructTuple "derive::Seconds" [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) + |) in let foot := - M.alloc (| Value.StructTuple "derive::Inches" [ Value.Integer Integer.I32 12 ] |) in + M.alloc (| + M.of_value (| + Value.StructTuple "derive::Inches" [ A.to_value (M.of_value (| Value.Integer 12 |)) ] + |) + |) in let _ := let _ := M.alloc (| @@ -222,44 +236,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "One foot equals " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "One foot equals " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "derive::Inches" ] - |), - [ foot ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "derive::Inches" ] + |), + [ foot ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let meter := M.alloc (| - Value.StructTuple "derive::Centimeters" [ M.read (| UnsupportedLiteral |) ] + M.of_value (| + Value.StructTuple + "derive::Centimeters" + [ A.to_value (M.read (| M.of_value (| UnsupportedLiteral |) |)) ] + |) |) in let cmp := M.copy (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -290,8 +316,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "smaller")); - fun γ => ltac:(M.monadic (M.alloc (| M.read (| Value.String "bigger" |) |))) + M.of_value (| Value.String "smaller" |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.read (| M.of_value (| Value.String "bigger" |) |) |))) ] |) |) in @@ -305,37 +333,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "One foot is " |); - M.read (| Value.String " than one meter. -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "One foot is " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " than one meter. +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ cmp ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ cmp ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 fa4d16620..b62e0ff08 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 @@ -22,7 +22,7 @@ Module Impl_disambiguating_overlapping_traits_UsernameWidget_for_disambiguating_ self.username.clone() } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -62,7 +62,7 @@ Module Impl_disambiguating_overlapping_traits_AgeWidget_for_disambiguating_overl self.age } *) - Definition get (τ : list Ty.t) (α : list Value.t) : M := + Definition get (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -103,29 +103,32 @@ fn main() { assert_eq!(28, age); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let form := M.alloc (| - Value.StructRecord - "disambiguating_overlapping_traits::Form" - [ - ("username", - M.call_closure (| - M.get_trait_method (| - "alloc::borrow::ToOwned", - Ty.path "str", - [], - "to_owned", - [] - |), - [ M.read (| Value.String "rustacean" |) ] - |)); - ("age", Value.Integer Integer.U8 28) - ] + M.of_value (| + Value.StructRecord + "disambiguating_overlapping_traits::Form" + [ + ("username", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "alloc::borrow::ToOwned", + Ty.path "str", + [], + "to_owned", + [] + |), + [ M.read (| M.of_value (| Value.String "rustacean" |) |) ] + |))); + ("age", A.to_value (M.of_value (| Value.Integer 28 |))) + ] + |) |) in let username := M.alloc (| @@ -143,22 +146,25 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "alloc::string::ToString", - Ty.path "str", - [], - "to_string", - [] - |), - [ M.read (| Value.String "rustacean" |) ] - |) - |); - username - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "alloc::string::ToString", + Ty.path "str", + [], + "to_string", + [] + |), + [ M.read (| M.of_value (| Value.String "rustacean" |) |) ] + |) + |)); + A.to_value username + ] + |) |), [ fun γ => @@ -168,15 +174,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.path "alloc::string::String", @@ -185,7 +191,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -194,7 +201,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -209,14 +218,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -236,7 +247,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ M.alloc (| Value.Integer Integer.U8 28 |); age ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.alloc (| M.of_value (| Value.Integer 28 |) |)); A.to_value age ] + |) + |), [ fun γ => ltac:(M.monadic @@ -245,17 +261,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -264,7 +282,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -276,19 +296,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/drop.v b/CoqOfRust/examples/default/examples/rust_book/traits/drop.v index a1b359081..c7dac274f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/drop.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/drop.v @@ -16,7 +16,7 @@ Module Impl_core_ops_drop_Drop_for_drop_Droppable. println!("> Dropping {}", self.name); } *) - Definition drop (τ : list Ty.t) (α : list Value.t) : M := + Definition drop (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -32,43 +32,51 @@ Module Impl_core_ops_drop_Drop_for_drop_Droppable. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "> Dropping " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "> Dropping " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "drop::Droppable", - "name" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "drop::Droppable", + "name" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -112,28 +120,44 @@ fn main() { // (manually) `drop`ed } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let _a := M.alloc (| - Value.StructRecord "drop::Droppable" [ ("name", M.read (| Value.String "a" |)) ] + M.of_value (| + Value.StructRecord + "drop::Droppable" + [ ("name", A.to_value (M.read (| M.of_value (| Value.String "a" |) |))) ] + |) |) in let _ := let _b := M.alloc (| - Value.StructRecord "drop::Droppable" [ ("name", M.read (| Value.String "b" |)) ] + M.of_value (| + Value.StructRecord + "drop::Droppable" + [ ("name", A.to_value (M.read (| M.of_value (| Value.String "b" |) |))) ] + |) |) in let _ := let _c := M.alloc (| - Value.StructRecord "drop::Droppable" [ ("name", M.read (| Value.String "c" |)) ] + M.of_value (| + Value.StructRecord + "drop::Droppable" + [ ("name", A.to_value (M.read (| M.of_value (| Value.String "c" |) |))) ] + |) |) in let _d := M.alloc (| - Value.StructRecord "drop::Droppable" [ ("name", M.read (| Value.String "d" |)) ] + M.of_value (| + Value.StructRecord + "drop::Droppable" + [ ("name", A.to_value (M.read (| M.of_value (| Value.String "d" |) |))) ] + |) |) in let _ := let _ := @@ -149,18 +173,27 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Exiting block B -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Exiting block B +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -175,17 +208,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Just exited block B -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Just exited block B +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -200,18 +242,25 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Exiting block A -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Exiting block A +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -222,17 +271,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "Just exited block A -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Just exited block A +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.alloc (| M.call_closure (| @@ -250,18 +308,27 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "end of the main function -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "end of the main function +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/hash.v b/CoqOfRust/examples/default/examples/rust_book/traits/hash.v index 4056f4901..661f9ac92 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/hash.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/hash.v @@ -14,7 +14,7 @@ Module Impl_core_hash_Hash_for_hash_Person. Definition Self : Ty.t := Ty.path "hash::Person". (* Hash *) - Definition hash (τ : list Ty.t) (α : list Value.t) : M := + Definition hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ __H ], [ self; state ] => ltac:(M.monadic @@ -87,7 +87,7 @@ fn calculate_hash(t: &T) -> u64 { s.finish() } *) -Definition calculate_hash (τ : list Ty.t) (α : list Value.t) : M := +Definition calculate_hash (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [ T ], [ t ] => ltac:(M.monadic @@ -145,76 +145,84 @@ fn main() { assert!(calculate_hash(&person1) != calculate_hash(&person2)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let person1 := M.alloc (| - Value.StructRecord - "hash::Person" - [ - ("id", Value.Integer Integer.U32 5); - ("name", - M.call_closure (| - M.get_trait_method (| - "alloc::string::ToString", - Ty.path "str", - [], - "to_string", - [] - |), - [ M.read (| Value.String "Janet" |) ] - |)); - ("phone", Value.Integer Integer.U64 5556667777) - ] + M.of_value (| + Value.StructRecord + "hash::Person" + [ + ("id", A.to_value (M.of_value (| Value.Integer 5 |))); + ("name", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "alloc::string::ToString", + Ty.path "str", + [], + "to_string", + [] + |), + [ M.read (| M.of_value (| Value.String "Janet" |) |) ] + |))); + ("phone", A.to_value (M.of_value (| Value.Integer 5556667777 |))) + ] + |) |) in let person2 := M.alloc (| - Value.StructRecord - "hash::Person" - [ - ("id", Value.Integer Integer.U32 5); - ("name", - M.call_closure (| - M.get_trait_method (| - "alloc::string::ToString", - Ty.path "str", - [], - "to_string", - [] - |), - [ M.read (| Value.String "Bob" |) ] - |)); - ("phone", Value.Integer Integer.U64 5556667777) - ] + M.of_value (| + Value.StructRecord + "hash::Person" + [ + ("id", A.to_value (M.of_value (| Value.Integer 5 |))); + ("name", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "alloc::string::ToString", + Ty.path "str", + [], + "to_string", + [] + |), + [ M.read (| M.of_value (| Value.String "Bob" |) |) ] + |))); + ("phone", A.to_value (M.of_value (| Value.Integer 5556667777 |))) + ] + |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.ne - (M.call_closure (| + UnOp.Pure.not (| + BinOp.Pure.ne (| + M.call_closure (| M.get_function (| "hash::calculate_hash", [ Ty.path "hash::Person" ] |), [ person1 ] - |)) - (M.call_closure (| + |), + M.call_closure (| M.get_function (| "hash::calculate_hash", [ Ty.path "hash::Person" ] |), [ person2 ] - |))) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -223,17 +231,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: calculate_hash(&person1) != calculate_hash(&person2)" + M.of_value (| + Value.String + "assertion failed: calculate_hash(&person1) != calculate_hash(&person2)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 1d06a2578..78658f065 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 @@ -9,7 +9,7 @@ fn combine_vecs_explicit_return_type( v.into_iter().chain(u.into_iter()).cycle() } *) -Definition combine_vecs_explicit_return_type (τ : list Ty.t) (α : list Value.t) : M := +Definition combine_vecs_explicit_return_type (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v; u ] => ltac:(M.monadic @@ -84,7 +84,7 @@ fn combine_vecs(v: Vec, u: Vec) -> impl Iterator { v.into_iter().chain(u.into_iter()).cycle() } *) -Definition combine_vecs (τ : list Ty.t) (α : list Value.t) : M := +Definition combine_vecs (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ v; u ] => ltac:(M.monadic @@ -171,7 +171,7 @@ fn main() { println!("all done"); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -186,8 +186,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -201,16 +201,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.I32 1; - Value.Integer Integer.I32 2; - Value.Integer Integer.I32 3 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -224,8 +227,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -239,11 +242,18 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array [ Value.Integer Integer.I32 4; Value.Integer Integer.I32 5 ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 4 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -257,24 +267,32 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 1 ] - |); - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.associated, - [], - "next", - [] - |), - [ v3 ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.associated, + [], + "next", + [] + |), + [ v3 ] + |) + |)) + ] + |) |), [ fun γ => @@ -284,15 +302,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ], @@ -302,7 +320,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -311,7 +330,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -326,14 +347,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -341,24 +364,32 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 2 ] - |); - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.associated, - [], - "next", - [] - |), - [ v3 ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 2 |)) ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.associated, + [], + "next", + [] + |), + [ v3 ] + |) + |)) + ] + |) |), [ fun γ => @@ -368,15 +399,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ], @@ -386,7 +417,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -395,7 +427,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -410,14 +444,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -425,24 +461,32 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 3 ] - |); - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.associated, - [], - "next", - [] - |), - [ v3 ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 3 |)) ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.associated, + [], + "next", + [] + |), + [ v3 ] + |) + |)) + ] + |) |), [ fun γ => @@ -452,15 +496,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ], @@ -470,7 +514,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -479,7 +524,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -494,14 +541,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -509,24 +558,32 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 4 ] - |); - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.associated, - [], - "next", - [] - |), - [ v3 ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 4 |)) ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.associated, + [], + "next", + [] + |), + [ v3 ] + |) + |)) + ] + |) |), [ fun γ => @@ -536,15 +593,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ], @@ -554,7 +611,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -563,7 +621,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -578,14 +638,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -593,24 +655,32 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - Value.StructTuple "core::option::Option::Some" [ Value.Integer Integer.I32 5 ] - |); - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.associated, - [], - "next", - [] - |), - [ v3 ] - |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.of_value (| Value.Integer 5 |)) ] + |) + |)); + A.to_value + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.associated, + [], + "next", + [] + |), + [ v3 ] + |) + |)) + ] + |) |), [ fun γ => @@ -620,15 +690,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ], @@ -638,7 +708,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -647,7 +718,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -662,14 +735,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -684,16 +759,23 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| Value.Array [ M.read (| Value.String "all done -" |) ] |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ A.to_value (M.read (| M.of_value (| Value.String "all done +" |) |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/iterators.v b/CoqOfRust/examples/default/examples/rust_book/traits/iterators.v index 66a43dbfd..4cef37f5f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/iterators.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/iterators.v @@ -26,7 +26,7 @@ Module Impl_core_iter_traits_iterator_Iterator_for_iterators_Fibonacci. Some(current) } *) - Definition next (τ : list Ty.t) (α : list Value.t) : M := + Definition next (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -63,6 +63,7 @@ Module Impl_core_iter_traits_iterator_Iterator_for_iterators_Fibonacci. "next" |), BinOp.Panic.add (| + Integer.U32, M.read (| current |), M.read (| M.SubPointer.get_struct_record_field (| @@ -73,7 +74,11 @@ Module Impl_core_iter_traits_iterator_Iterator_for_iterators_Fibonacci. |) |) |) in - M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| current |) ] |) + M.alloc (| + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| current |)) ] + |) + |) |))) | _, _ => M.impossible end. @@ -91,13 +96,18 @@ fn fibonacci() -> Fibonacci { Fibonacci { curr: 0, next: 1 } } *) -Definition fibonacci (τ : list Ty.t) (α : list Value.t) : M := +Definition fibonacci (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic - (Value.StructRecord - "iterators::Fibonacci" - [ ("curr", Value.Integer Integer.U32 0); ("next", Value.Integer Integer.U32 1) ])) + (M.of_value (| + Value.StructRecord + "iterators::Fibonacci" + [ + ("curr", A.to_value (M.of_value (| Value.Integer 0 |))); + ("next", A.to_value (M.of_value (| Value.Integer 1 |))) + ] + |))) | _, _ => M.impossible end. @@ -140,16 +150,21 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let sequence := M.alloc (| - Value.StructRecord - "core::ops::range::Range" - [ ("start", Value.Integer Integer.I32 0); ("end_", Value.Integer Integer.I32 3) ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 3 |))) + ] + |) |) in let _ := let _ := @@ -161,18 +176,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Four consecutive `next` calls on 0..3 -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Four consecutive `next` calls on 0..3 +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -183,48 +208,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "> " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "> " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "i32" ], - [], - "next", - [] - |), - [ sequence ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "i32" ], + [], + "next", + [] + |), + [ sequence ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -235,48 +271,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "> " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "> " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "i32" ], - [], - "next", - [] - |), - [ sequence ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "i32" ], + [], + "next", + [] + |), + [ sequence ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -287,48 +334,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "> " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "> " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "i32" ], - [], - "next", - [] - |), - [ sequence ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "i32" ], + [], + "next", + [] + |), + [ sequence ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -339,48 +397,59 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "> " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "> " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path "core::ops::range::Range") - [ Ty.path "i32" ], - [], - "next", - [] - |), - [ sequence ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.apply (Ty.path "core::option::Option") [ Ty.path "i32" ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "i32" ], + [], + "next", + [] + |), + [ sequence ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -391,18 +460,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "Iterate through 0..3 using `for` -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Iterate through 0..3 using `for` +" + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.use (M.match_operator (| @@ -416,12 +495,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - Value.StructRecord - "core::ops::range::Range" - [ - ("start", Value.Integer Integer.I32 0); - ("end_", Value.Integer Integer.I32 3) - ] + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.of_value (| Value.Integer 3 |))) + ] + |) ] |) |), @@ -472,40 +553,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "> " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "> " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -519,22 +613,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "The first four terms of the Fibonacci sequence are: + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "The first four terms of the Fibonacci sequence are: " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.use (M.match_operator (| @@ -560,7 +661,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.call_closure (| M.get_function (| "iterators::fibonacci", [] |), [] |); - Value.Integer Integer.Usize 4 + M.of_value (| Value.Integer 4 |) ] |) ] @@ -615,40 +716,53 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "> " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "> " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -662,22 +776,29 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "The next four terms of the Fibonacci sequence are: + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "The next four terms of the Fibonacci sequence are: " - |) - ] - |)) + |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.use (M.match_operator (| @@ -721,10 +842,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_function (| "iterators::fibonacci", [] |), [] |); - Value.Integer Integer.Usize 4 + M.of_value (| Value.Integer 4 |) ] |); - Value.Integer Integer.Usize 4 + M.of_value (| Value.Integer 4 |) ] |) ] @@ -783,52 +904,67 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "> " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "> " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u32" ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u32" ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in let array := M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 1; - Value.Integer Integer.U32 3; - Value.Integer Integer.U32 3; - Value.Integer Integer.U32 7 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 7 |)) + ] + |) |) in let _ := let _ := @@ -840,40 +976,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Iterate the following array " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Iterate the following array " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "array") [ Ty.path "u32" ] ] - ] - |), - [ M.alloc (| array |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "array") [ Ty.path "u32" ] ] + ] + |), + [ M.alloc (| array |) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.use (M.match_operator (| M.alloc (| @@ -892,7 +1038,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "iter", [] |), - [ (* Unsize *) M.pointer_coercion array ] + [ (* Unsize *) M.pointer_coercion (| array |) ] |) ] |) @@ -944,41 +1090,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "> " |); - M.read (| Value.String " + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "> " |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String " " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "u32" ] - ] - |), - [ i ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "u32" ] + ] + |), + [ i ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) 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 c668642c4..a68ab0834 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/operator_overloading.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/operator_overloading.v @@ -26,7 +26,7 @@ Module Impl_core_fmt_Debug_for_operator_overloading_FooBar. Definition Self : Ty.t := Ty.path "operator_overloading::FooBar". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -34,7 +34,7 @@ Module Impl_core_fmt_Debug_for_operator_overloading_FooBar. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "FooBar" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "FooBar" |) |) ] |))) | _, _ => M.impossible end. @@ -58,7 +58,7 @@ Module Impl_core_fmt_Debug_for_operator_overloading_BarFoo. Definition Self : Ty.t := Ty.path "operator_overloading::BarFoo". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -66,7 +66,7 @@ Module Impl_core_fmt_Debug_for_operator_overloading_BarFoo. let f := M.alloc (| f |) in M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), - [ M.read (| f |); M.read (| Value.String "BarFoo" |) ] + [ M.read (| f |); M.read (| M.of_value (| Value.String "BarFoo" |) |) ] |))) | _, _ => M.impossible end. @@ -92,7 +92,7 @@ Module Impl_core_ops_arith_Add_operator_overloading_Bar_for_operator_overloading FooBar } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _rhs ] => ltac:(M.monadic @@ -113,18 +113,27 @@ Module Impl_core_ops_arith_Add_operator_overloading_Bar_for_operator_overloading |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "> Foo.add(Bar) was called -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "> Foo.add(Bar) was called +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "operator_overloading::FooBar" [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.StructTuple "operator_overloading::FooBar" [] |) |) |))) | _, _ => M.impossible end. @@ -150,7 +159,7 @@ Module Impl_core_ops_arith_Add_operator_overloading_Foo_for_operator_overloading BarFoo } *) - Definition add (τ : list Ty.t) (α : list Value.t) : M := + Definition add (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; _rhs ] => ltac:(M.monadic @@ -171,18 +180,27 @@ Module Impl_core_ops_arith_Add_operator_overloading_Foo_for_operator_overloading |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "> Bar.add(Foo) was called -" |) ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "> Bar.add(Foo) was called +" |) + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.StructTuple "operator_overloading::BarFoo" [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.StructTuple "operator_overloading::BarFoo" [] |) |) |))) | _, _ => M.impossible end. @@ -201,7 +219,7 @@ fn main() { println!("Bar + Foo = {:?}", Bar + Foo); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -216,52 +234,64 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Foo + Bar = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Foo + Bar = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "operator_overloading::FooBar" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Add", - Ty.path "operator_overloading::Foo", - [ Ty.path "operator_overloading::Bar" ], - "add", - [] - |), - [ - Value.StructTuple "operator_overloading::Foo" []; - Value.StructTuple "operator_overloading::Bar" [] - ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "operator_overloading::FooBar" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Add", + Ty.path "operator_overloading::Foo", + [ Ty.path "operator_overloading::Bar" ], + "add", + [] + |), + [ + M.of_value (| + Value.StructTuple "operator_overloading::Foo" [] + |); + M.of_value (| + Value.StructTuple "operator_overloading::Bar" [] + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -272,53 +302,65 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Bar + Foo = " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Bar + Foo = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "operator_overloading::BarFoo" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Add", - Ty.path "operator_overloading::Bar", - [ Ty.path "operator_overloading::Foo" ], - "add", - [] - |), - [ - Value.StructTuple "operator_overloading::Bar" []; - Value.StructTuple "operator_overloading::Foo" [] - ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "operator_overloading::BarFoo" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Add", + Ty.path "operator_overloading::Bar", + [ Ty.path "operator_overloading::Foo" ], + "add", + [] + |), + [ + M.of_value (| + Value.StructTuple "operator_overloading::Bar" [] + |); + M.of_value (| + Value.StructTuple "operator_overloading::Foo" [] + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 f12147188..751fff357 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 @@ -26,12 +26,12 @@ Module Impl_returning_traits_with_dyn_Animal_for_returning_traits_with_dyn_Sheep "baaaaah!" } *) - Definition noise (τ : list Ty.t) (α : list Value.t) : M := + Definition noise (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "baaaaah!" |))) + M.read (| M.of_value (| Value.String "baaaaah!" |) |))) | _, _ => M.impossible end. @@ -51,12 +51,12 @@ Module Impl_returning_traits_with_dyn_Animal_for_returning_traits_with_dyn_Cow. "moooooo!" } *) - Definition noise (τ : list Ty.t) (α : list Value.t) : M := + Definition noise (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - M.read (| Value.String "moooooo!" |))) + M.read (| M.of_value (| Value.String "moooooo!" |) |))) | _, _ => M.impossible end. @@ -77,35 +77,36 @@ fn random_animal(random_number: f64) -> Box { } } *) -Definition random_animal (τ : list Ty.t) (α : list Value.t) : M := +Definition random_animal (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ random_number ] => ltac:(M.monadic (let random_number := M.alloc (| random_number |) in (* Unsize *) - M.pointer_coercion + M.pointer_coercion (| (* Unsize *) - (M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt - (M.read (| random_number |)) - (M.read (| UnsupportedLiteral |)) + BinOp.Pure.lt (| + M.read (| random_number |), + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| (* Unsize *) - M.pointer_coercion + M.pointer_coercion (| (* Unsize *) - (M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -116,15 +117,21 @@ Definition random_animal (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.StructTuple "returning_traits_with_dyn::Sheep" [] ] - |))) + [ + M.of_value (| + Value.StructTuple "returning_traits_with_dyn::Sheep" [] + |) + ] + |) + |) + |) |))); fun γ => ltac:(M.monadic (M.alloc (| (* Unsize *) - M.pointer_coercion - (M.call_closure (| + M.pointer_coercion (| + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::boxed::Box") @@ -135,12 +142,15 @@ Definition random_animal (τ : list Ty.t) (α : list Value.t) : M := "new", [] |), - [ Value.StructTuple "returning_traits_with_dyn::Cow" [] ] - |)) + [ M.of_value (| Value.StructTuple "returning_traits_with_dyn::Cow" [] |) ] + |) + |) |))) ] |) - |))))) + |) + |) + |))) | _, _ => M.impossible end. @@ -154,12 +164,12 @@ fn main() { ); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let random_number := M.copy (| UnsupportedLiteral |) in + let random_number := M.copy (| M.of_value (| UnsupportedLiteral |) |) in let animal := M.alloc (| M.call_closure (| @@ -177,52 +187,63 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| - Value.String "You've randomly chosen an animal, and it says " - |); - M.read (| Value.String " -" |) - ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "returning_traits_with_dyn::Animal", - Ty.dyn [ ("returning_traits_with_dyn::Animal::Trait", []) ], - [], - "noise", - [] - |), - [ M.read (| animal |) ] + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "You've randomly chosen an animal, and it says " |) - |) - ] - |) - ] - |)) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "returning_traits_with_dyn::Animal", + Ty.dyn + [ ("returning_traits_with_dyn::Animal::Trait", []) ], + [], + "noise", + [] + |), + [ M.read (| animal |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/supertraits.v b/CoqOfRust/examples/default/examples/rust_book/traits/supertraits.v index a4471c40c..05b1251dc 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/supertraits.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/supertraits.v @@ -24,7 +24,7 @@ fn comp_sci_student_greeting(student: &dyn CompSciStudent) -> String { ) } *) -Definition comp_sci_student_greeting (τ : list Ty.t) (α : list Value.t) : M := +Definition comp_sci_student_greeting (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ student ] => ltac:(M.monadic @@ -39,107 +39,122 @@ Definition comp_sci_student_greeting (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "My name is " |); - M.read (| Value.String " and I attend " |); - M.read (| Value.String ". My favorite language is " |); - M.read (| Value.String ". My Git username is " |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "My name is " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " and I attend " |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String ". My favorite language is " |) + |)); + A.to_value + (M.read (| M.of_value (| Value.String ". My Git username is " |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "supertraits::Person", - Ty.dyn [ ("supertraits::CompSciStudent::Trait", []) ], - [], - "name", - [] - |), - [ M.read (| student |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "supertraits::Student", - Ty.dyn [ ("supertraits::CompSciStudent::Trait", []) ], - [], - "university", - [] - |), - [ M.read (| student |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "supertraits::Programmer", - Ty.dyn [ ("supertraits::CompSciStudent::Trait", []) ], - [], - "fav_language", - [] - |), - [ M.read (| student |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "alloc::string::String" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "supertraits::CompSciStudent", - Ty.dyn [ ("supertraits::CompSciStudent::Trait", []) ], - [], - "git_username", - [] - |), - [ M.read (| student |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "supertraits::Person", + Ty.dyn [ ("supertraits::CompSciStudent::Trait", []) ], + [], + "name", + [] + |), + [ M.read (| student |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "supertraits::Student", + Ty.dyn [ ("supertraits::CompSciStudent::Trait", []) ], + [], + "university", + [] + |), + [ M.read (| student |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "supertraits::Programmer", + Ty.dyn [ ("supertraits::CompSciStudent::Trait", []) ], + [], + "fav_language", + [] + |), + [ M.read (| student |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "alloc::string::String" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "supertraits::CompSciStudent", + Ty.dyn [ ("supertraits::CompSciStudent::Trait", []) ], + [], + "git_username", + [] + |), + [ M.read (| student |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] @@ -151,5 +166,8 @@ Definition comp_sci_student_greeting (τ : list Ty.t) (α : list Value.t) : M := end. (* fn main() {} *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition main (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/traits.v b/CoqOfRust/examples/default/examples/rust_book/traits/traits.v index d9692bd2d..77c18bb83 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/traits.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/traits.v @@ -10,7 +10,7 @@ Require Import CoqOfRust.CoqOfRust. (* Trait *) Module Animal. - Definition talk (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition talk (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -26,72 +26,80 @@ Module Animal. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " says " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " says " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "traits::Animal", - Self, - [], - "name", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "traits::Animal", - Self, - [], - "noise", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "traits::Animal", + Self, + [], + "name", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "traits::Animal", + Self, + [], + "noise", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -107,7 +115,7 @@ Module Impl_traits_Sheep. self.naked } *) - Definition is_naked (τ : list Ty.t) (α : list Value.t) : M := + Definition is_naked (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -131,14 +139,14 @@ Module Impl_traits_Sheep. } } *) - Definition shear (τ : list Ty.t) (α : list Value.t) : M := + Definition shear (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -165,50 +173,61 @@ Module Impl_traits_Sheep. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " is already naked... + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " is already naked... " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "traits::Animal", - Ty.path "traits::Sheep", - [], - "name", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "traits::Animal", + Ty.path "traits::Sheep", + [], + "name", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |))); + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (let _ := @@ -225,42 +244,53 @@ Module Impl_traits_Sheep. |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " gets a haircut! + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " gets a haircut! " |) - ] - |)); + |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "traits::Sheep", - "name" - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "traits::Sheep", + "name" + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.write (| M.SubPointer.get_struct_record_field (| @@ -268,9 +298,9 @@ Module Impl_traits_Sheep. "traits::Sheep", "naked" |), - Value.Bool true + M.of_value (| Value.Bool true |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) |))) @@ -291,14 +321,19 @@ Module Impl_traits_Animal_for_traits_Sheep. } } *) - Definition new (τ : list Ty.t) (α : list Value.t) : M := + Definition new (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ name ] => ltac:(M.monadic (let name := M.alloc (| name |) in - Value.StructRecord - "traits::Sheep" - [ ("name", M.read (| name |)); ("naked", Value.Bool false) ])) + M.of_value (| + Value.StructRecord + "traits::Sheep" + [ + ("name", A.to_value (M.read (| name |))); + ("naked", A.to_value (M.of_value (| Value.Bool false |))) + ] + |))) | _, _ => M.impossible end. @@ -307,7 +342,7 @@ Module Impl_traits_Animal_for_traits_Sheep. self.name } *) - Definition name (τ : list Ty.t) (α : list Value.t) : M := + Definition name (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -327,14 +362,14 @@ Module Impl_traits_Animal_for_traits_Sheep. } } *) - Definition noise (τ : list Ty.t) (α : list Value.t) : M := + Definition noise (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic @@ -347,8 +382,8 @@ Module Impl_traits_Animal_for_traits_Sheep. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - Value.String "baaaaah?")); - fun γ => ltac:(M.monadic (Value.String "baaaaah!")) + M.of_value (| Value.String "baaaaah?" |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.String "baaaaah!" |))) ] |) |))) @@ -361,7 +396,7 @@ Module Impl_traits_Animal_for_traits_Sheep. println!("{} pauses briefly... {}", self.name, self.noise()); } *) - Definition talk (τ : list Ty.t) (α : list Value.t) : M := + Definition talk (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -377,65 +412,76 @@ Module Impl_traits_Animal_for_traits_Sheep. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " pauses briefly... " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| + M.of_value (| Value.String " pauses briefly... " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "traits::Sheep", - "name" - |) - ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "traits::Animal", - Ty.path "traits::Sheep", - [], - "noise", - [] - |), - [ M.read (| self |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "traits::Sheep", + "name" + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "traits::Animal", + Ty.path "traits::Sheep", + [], + "noise", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -466,7 +512,7 @@ fn main() { dolly.talk(); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -475,7 +521,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.call_closure (| M.get_trait_method (| "traits::Animal", Ty.path "traits::Sheep", [], "new", [] |), - [ M.read (| Value.String "Dolly" |) ] + [ M.read (| M.of_value (| Value.String "Dolly" |) |) ] |) |) in let _ := @@ -499,7 +545,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ dolly ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/traits_parms.v b/CoqOfRust/examples/default/examples/rust_book/traits/traits_parms.v index 69d70dcad..9654539da 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/traits_parms.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/traits_parms.v @@ -48,8 +48,11 @@ Module Impl_traits_parms_SomeTrait_for_traits_parms_SomeOtherType. Definition _SomeType : Ty.t := Ty.path "traits_parms::SomeOtherType". (* fn some_fn() {} *) - Definition some_fn (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. + Definition some_fn (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. Axiom Implements : M.IsTraitInstance diff --git a/CoqOfRust/examples/default/examples/rust_book/types/aliasing.v b/CoqOfRust/examples/default/examples/rust_book/types/aliasing.v index e8476395b..584df62fb 100644 --- a/CoqOfRust/examples/default/examples/rust_book/types/aliasing.v +++ b/CoqOfRust/examples/default/examples/rust_book/types/aliasing.v @@ -23,13 +23,13 @@ fn main() { ); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let nanoseconds := M.copy (| M.use (M.alloc (| Value.Integer Integer.U64 5 |)) |) in - let inches := M.copy (| M.use (M.alloc (| Value.Integer Integer.U64 2 |)) |) in + let nanoseconds := M.copy (| M.use (M.alloc (| M.of_value (| Value.Integer 5 |) |)) |) in + let inches := M.copy (| M.use (M.alloc (| M.of_value (| Value.Integer 2 |) |)) |) in let _ := let _ := M.alloc (| @@ -40,62 +40,74 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "" |); - M.read (| Value.String " nanoseconds + " |); - M.read (| Value.String " inches = " |); - M.read (| Value.String " unit? -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " nanoseconds + " |) |)); + A.to_value + (M.read (| M.of_value (| Value.String " inches = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " unit? +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u64" ] - |), - [ nanoseconds ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u64" ] - |), - [ inches ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u64" ] - |), - [ - M.alloc (| - BinOp.Panic.add (| - M.read (| nanoseconds |), - M.read (| inches |) - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u64" ] + |), + [ nanoseconds ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u64" ] + |), + [ inches ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u64" ] + |), + [ + M.alloc (| + BinOp.Panic.add (| + Integer.U64, + M.read (| nanoseconds |), + M.read (| inches |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/types/casting.v b/CoqOfRust/examples/default/examples/rust_book/types/casting.v index 693041862..b65bd9073 100644 --- a/CoqOfRust/examples/default/examples/rust_book/types/casting.v +++ b/CoqOfRust/examples/default/examples/rust_book/types/casting.v @@ -81,14 +81,14 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => 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 decimal := M.copy (| M.of_value (| 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 (| @@ -99,54 +99,63 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Casting: " |); - M.read (| Value.String " -> " |); - M.read (| Value.String " -> " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "Casting: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " -> " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " -> " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "f32" ] - |), - [ decimal ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ integer ] - |); - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "char" ] - |), - [ character ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "f32" ] + |), + [ decimal ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ integer ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "char" ] + |), + [ character ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -157,36 +166,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "1000 as a u16 is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "1000 as a u16 is: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u16" ] - |), - [ M.use (M.alloc (| Value.Integer Integer.U16 1000 |)) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u16" ] + |), + [ M.use (M.alloc (| M.of_value (| Value.Integer 1000 |) |)) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -197,36 +214,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "1000 as a u8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "1000 as a u8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ M.use (M.alloc (| Value.Integer Integer.U8 1000 |)) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ M.use (M.alloc (| M.of_value (| Value.Integer 1000 |) |)) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -237,36 +262,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String " -1 as a u8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String " -1 as a u8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ M.alloc (| M.rust_cast (Value.Integer Integer.I8 (-1)) |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + M.rust_cast (| M.of_value (| Value.Integer (-1) |) |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -277,43 +314,52 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "1000 mod 256 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "1000 mod 256 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ - M.alloc (| - BinOp.Panic.rem (| - Value.Integer Integer.I32 1000, - Value.Integer Integer.I32 256 - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ + M.alloc (| + BinOp.Panic.rem (| + Integer.I32, + M.of_value (| Value.Integer 1000 |), + M.of_value (| Value.Integer 256 |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -324,36 +370,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String " 128 as a i16 is: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String " 128 as a i16 is: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i16" ] - |), - [ M.use (M.alloc (| Value.Integer Integer.I16 128 |)) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i16" ] + |), + [ M.use (M.alloc (| M.of_value (| Value.Integer 128 |) |)) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -364,36 +418,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String " 128 as a i8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String " 128 as a i8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i8" ] - |), - [ M.use (M.alloc (| Value.Integer Integer.I8 128 |)) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i8" ] + |), + [ M.use (M.alloc (| M.of_value (| Value.Integer 128 |) |)) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -404,36 +466,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "1000 as a u8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "1000 as a u8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ M.use (M.alloc (| Value.Integer Integer.U8 1000 |)) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ M.use (M.alloc (| M.of_value (| Value.Integer 1000 |) |)) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -444,36 +514,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String " 232 as a i8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String " 232 as a i8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i8" ] - |), - [ M.use (M.alloc (| Value.Integer Integer.I8 232 |)) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i8" ] + |), + [ M.use (M.alloc (| M.of_value (| Value.Integer 232 |) |)) ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -484,36 +562,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String " 300.0 as u8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String " 300.0 as u8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ M.alloc (| M.rust_cast (M.read (| UnsupportedLiteral |)) |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + M.rust_cast (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -524,36 +616,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "-100.0 as u8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "-100.0 as u8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ M.alloc (| M.rust_cast (M.read (| UnsupportedLiteral |)) |) ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + M.rust_cast (| + M.read (| M.of_value (| UnsupportedLiteral |) |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -564,40 +670,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String " nan as u8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String " nan as u8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.alloc (| - M.rust_cast (M.read (| M.get_constant (| "core::f32::NAN" |) |)) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + M.rust_cast (| + M.read (| M.get_constant (| "core::f32::NAN" |) |) + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -608,47 +724,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String " 300.0 as u8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String " 300.0 as u8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "f32", - "to_int_unchecked", - [ Ty.path "u8" ] - |), - [ M.read (| UnsupportedLiteral |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "f32", + "to_int_unchecked", + [ Ty.path "u8" ] + |), + [ M.read (| M.of_value (| UnsupportedLiteral |) |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -659,47 +783,55 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "-100.0 as u8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "-100.0 as u8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "f32", - "to_int_unchecked", - [ Ty.path "u8" ] - |), - [ M.read (| UnsupportedLiteral |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "f32", + "to_int_unchecked", + [ Ty.path "u8" ] + |), + [ M.read (| M.of_value (| UnsupportedLiteral |) |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -710,48 +842,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String " nan as u8 is : " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String " nan as u8 is : " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "u8" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.path "f32", - "to_int_unchecked", - [ Ty.path "u8" ] - |), - [ M.read (| M.get_constant (| "core::f32::NAN" |) |) ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "u8" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "f32", + "to_int_unchecked", + [ Ty.path "u8" ] + |), + [ M.read (| M.get_constant (| "core::f32::NAN" |) |) ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/types/inference.v b/CoqOfRust/examples/default/examples/rust_book/types/inference.v index f2fd95a2d..af2de1815 100644 --- a/CoqOfRust/examples/default/examples/rust_book/types/inference.v +++ b/CoqOfRust/examples/default/examples/rust_book/types/inference.v @@ -19,12 +19,12 @@ fn main() { println!("{:?}", vec); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let elem := M.alloc (| Value.Integer Integer.U8 5 |) in + let elem := M.alloc (| M.of_value (| Value.Integer 5 |) |) in let vec := M.alloc (| M.call_closure (| @@ -61,38 +61,48 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "" |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "" |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] - ] - |), - [ vec ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] + ] + |), + [ vec ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/types/literals.v b/CoqOfRust/examples/default/examples/rust_book/types/literals.v index 24439cb22..94258e381 100644 --- a/CoqOfRust/examples/default/examples/rust_book/types/literals.v +++ b/CoqOfRust/examples/default/examples/rust_book/types/literals.v @@ -20,16 +20,16 @@ fn main() { println!("size of `f` in bytes: {}", std::mem::size_of_val(&f)); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.U8 1 |) in - let y := M.alloc (| Value.Integer Integer.U32 2 |) in - let z := M.copy (| UnsupportedLiteral |) in - let i := M.alloc (| Value.Integer Integer.I32 1 |) in - let f := M.copy (| UnsupportedLiteral |) in + let x := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let y := M.alloc (| M.of_value (| Value.Integer 2 |) |) in + let z := M.copy (| M.of_value (| UnsupportedLiteral |) |) in + let i := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let f := M.copy (| M.of_value (| UnsupportedLiteral |) |) in let _ := let _ := M.alloc (| @@ -40,46 +40,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "size of `x` in bytes: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "size of `x` in bytes: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ Ty.path "u8" ] - |), - [ x ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", + [ Ty.path "u8" ] + |), + [ x ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -90,46 +100,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "size of `y` in bytes: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "size of `y` in bytes: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ Ty.path "u32" ] - |), - [ y ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", + [ Ty.path "u32" ] + |), + [ y ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -140,46 +160,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "size of `z` in bytes: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "size of `z` in bytes: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ Ty.path "f32" ] - |), - [ z ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", + [ Ty.path "f32" ] + |), + [ z ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -190,46 +220,56 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "size of `i` in bytes: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "size of `i` in bytes: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ Ty.path "i32" ] - |), - [ i ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", + [ Ty.path "i32" ] + |), + [ i ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -240,47 +280,57 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "size of `f` in bytes: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "size of `f` in bytes: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "usize" ] - |), - [ - M.alloc (| - M.call_closure (| - M.get_function (| - "core::mem::size_of_val", - [ Ty.path "f64" ] - |), - [ f ] - |) - |) - ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "core::mem::size_of_val", + [ Ty.path "f64" ] + |), + [ f ] + |) + |) + ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 c184e8ca8..95a5ebac4 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 @@ -15,7 +15,7 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic @@ -30,8 +30,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ (* Unsize *) - M.pointer_coercion - (M.read (| + M.pointer_coercion (| + M.read (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -45,17 +45,20 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - Value.Array - [ - Value.Integer Integer.U32 1; - Value.Integer Integer.U32 2; - Value.Integer Integer.U32 3; - Value.Integer Integer.U32 4 - ] + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |) |) ] |) - |)) + |) + |) ] |) |) in @@ -95,22 +98,25 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path "alloc::vec::Vec") - [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ], - "as_slice", - [] - |), - [ some_vector ] - |) - |); - my_slice - ] + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u32"; Ty.path "alloc::alloc::Global" ], + "as_slice", + [] + |), + [ some_vector ] + |) + |)); + A.to_value my_slice + ] + |) |), [ fun γ => @@ -120,15 +126,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (M.call_closure (| + UnOp.Pure.not (| + M.call_closure (| M.get_trait_method (| "core::cmp::PartialEq", Ty.apply @@ -143,7 +149,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| left_val |); M.read (| right_val |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -152,7 +159,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -171,19 +180,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 858ce2035..5f7f26680 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 @@ -10,13 +10,13 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 0f8377644..9b2a1dc40 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 @@ -36,15 +36,15 @@ fn main() { println!("CPU Manufacturer ID: {}", name); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let name_buf := M.alloc (| repeat (Value.Integer Integer.U8 0) 12 |) in + let name_buf := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 12 |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let name := M.alloc (| M.call_closure (| @@ -59,7 +59,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "core::str::converts::from_utf8", [] |), - [ (* Unsize *) M.pointer_coercion name_buf ] + [ (* Unsize *) M.pointer_coercion (| name_buf |) ] |) ] |) @@ -74,37 +74,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "CPU Manufacturer ID: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "CPU Manufacturer ID: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ name ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ name ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 456a311ff..6107824b1 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 @@ -11,14 +11,14 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let cmd := M.alloc (| Value.Integer Integer.I32 209 |) in + let cmd := M.alloc (| M.of_value (| Value.Integer 209 |) |) in let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 929c3d9be..afbb3c8e1 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 @@ -13,19 +13,24 @@ fn main() { assert_eq!(a, 8); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.Integer Integer.U64 4 |) in - let b := M.alloc (| Value.Integer Integer.U64 4 |) in + let a := M.alloc (| M.of_value (| Value.Integer 4 |) |) in + let b := M.alloc (| M.of_value (| Value.Integer 4 |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ a; M.alloc (| Value.Integer Integer.U64 8 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value a; A.to_value (M.alloc (| M.of_value (| Value.Integer 8 |) |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -34,17 +39,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -53,7 +60,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -65,19 +74,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 f042b6326..579bf8024 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 @@ -20,20 +20,25 @@ fn main() { assert_eq!(a, 12); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.Integer Integer.U64 4 |) in - let b := M.alloc (| Value.Integer Integer.U64 4 |) in - let c := M.alloc (| Value.Integer Integer.U64 4 |) in + let a := M.alloc (| M.of_value (| Value.Integer 4 |) |) in + let b := M.alloc (| M.of_value (| Value.Integer 4 |) |) in + let c := M.alloc (| M.of_value (| Value.Integer 4 |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ a; M.alloc (| Value.Integer Integer.U64 12 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value a; A.to_value (M.alloc (| M.of_value (| Value.Integer 12 |) |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -42,17 +47,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -61,7 +68,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -73,19 +82,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 9b58e0445..5896bc411 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 @@ -24,8 +24,11 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition main (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. Module main. (* @@ -47,22 +50,26 @@ Module main. ((hi as u128) << 64) + lo as u128 } *) - Definition mul (τ : list Ty.t) (α : list Value.t) : M := + Definition mul (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b ] => ltac:(M.monadic (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 lo := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in + let hi := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in M.alloc (| BinOp.Panic.add (| - BinOp.Panic.shl (| M.rust_cast (M.read (| hi |)), Value.Integer Integer.I32 64 |), - M.rust_cast (M.read (| lo |)) + Integer.U128, + BinOp.Panic.shl (| + M.rust_cast (| M.read (| hi |) |), + M.of_value (| Value.Integer 64 |) + |), + M.rust_cast (| M.read (| lo |) |) |) |) |))) 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 b335852e4..4a9cb3119 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 @@ -13,19 +13,24 @@ fn main() { assert_eq!(y, 8); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.U64 3 |) in - let y := M.copy (| Value.DeclaredButUndefined |) in + let x := M.alloc (| M.of_value (| Value.Integer 3 |) |) in + let y := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ y; M.alloc (| Value.Integer Integer.U64 8 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value y; A.to_value (M.alloc (| M.of_value (| Value.Integer 8 |) |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -34,17 +39,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -53,7 +60,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -65,19 +74,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 e51546b51..06ba0e844 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 @@ -12,18 +12,23 @@ fn main() { assert_eq!(x, 5); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.copy (| Value.DeclaredButUndefined |) in + let x := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ x; M.alloc (| Value.Integer Integer.U64 5 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value x; A.to_value (M.alloc (| M.of_value (| Value.Integer 5 |) |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -32,17 +37,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -51,7 +58,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -63,19 +72,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 fee3e38b3..f388b1893 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 @@ -18,19 +18,24 @@ fn main() { assert_eq!(o, 8); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let i := M.alloc (| Value.Integer Integer.U64 3 |) in - let o := M.copy (| Value.DeclaredButUndefined |) in + let i := M.alloc (| M.of_value (| Value.Integer 3 |) |) in + let o := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ o; M.alloc (| Value.Integer Integer.U64 8 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value o; A.to_value (M.alloc (| M.of_value (| Value.Integer 8 |) |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -39,17 +44,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -58,7 +65,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -70,19 +79,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 fa10f754b..7122fd496 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 @@ -12,18 +12,23 @@ fn main() { assert_eq!(x, 8); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.U64 3 |) in + let x := M.alloc (| M.of_value (| Value.Integer 3 |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ x; M.alloc (| Value.Integer Integer.U64 8 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value x; A.to_value (M.alloc (| M.of_value (| Value.Integer 8 |) |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -32,17 +37,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -51,7 +58,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -63,19 +72,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 73c499ac7..98ead156f 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 @@ -22,18 +22,23 @@ fn main() { assert_eq!(a, 5); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.Integer Integer.I32 0 |) in + let a := M.alloc (| M.of_value (| Value.Integer 0 |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ a; M.alloc (| Value.Integer Integer.I32 5 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value a; A.to_value (M.alloc (| M.of_value (| Value.Integer 5 |) |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -42,17 +47,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -61,7 +68,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -73,19 +82,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 d3b9d31fd..f36ddf96c 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 @@ -12,8 +12,11 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition main (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. Module main. (* @@ -23,14 +26,14 @@ Module main. } } *) - Definition load_fpu_control_word (τ : list Ty.t) (α : list Value.t) : M := + Definition load_fpu_control_word (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ control ] => ltac:(M.monadic (let control := M.alloc (| control |) in M.read (| let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 c43e16323..4cec64593 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 @@ -17,19 +17,24 @@ fn main() { assert_eq!(a, 8); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.Integer Integer.U64 4 |) in - let b := M.alloc (| Value.Integer Integer.U64 4 |) in + let a := M.alloc (| M.of_value (| Value.Integer 4 |) |) in + let b := M.alloc (| M.of_value (| Value.Integer 4 |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ a; M.alloc (| Value.Integer Integer.U64 8 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value a; A.to_value (M.alloc (| M.of_value (| Value.Integer 8 |) |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -38,17 +43,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -57,7 +64,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -69,19 +78,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 22e108b25..bd7a2b175 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 @@ -14,18 +14,23 @@ fn main() { assert_eq!(x, 0xabab); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.U16 171 |) in + let x := M.alloc (| M.of_value (| Value.Integer 171 |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [ x; M.alloc (| Value.Integer Integer.U16 43947 |) ] |), + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value x; A.to_value (M.alloc (| M.of_value (| Value.Integer 43947 |) |)) ] + |) + |), [ fun γ => ltac:(M.monadic @@ -34,17 +39,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -53,7 +60,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -65,19 +74,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 5b84dd945..b81256a6e 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 @@ -20,25 +20,32 @@ fn main() { assert_eq!(x, 4 * 6); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer Integer.U64 4 |) in + let x := M.alloc (| M.of_value (| Value.Integer 4 |) |) in let _ := let _ := InlineAssembly in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - x; - M.alloc (| - BinOp.Panic.mul (| Value.Integer Integer.U64 4, Value.Integer Integer.U64 6 |) - |) - ] + M.of_value (| + Value.Tuple + [ + A.to_value x; + A.to_value + (M.alloc (| + BinOp.Panic.mul (| + Integer.U64, + M.of_value (| Value.Integer 4 |), + M.of_value (| Value.Integer 6 |) + |) + |)) + ] + |) |), [ fun γ => @@ -48,17 +55,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -67,7 +76,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -79,19 +90,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 a8df505be..dbffe80dc 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 @@ -30,8 +30,11 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := - match τ, α with | [], [] => ltac:(M.monadic (Value.Tuple [])) | _, _ => M.impossible end. +Definition main (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. Module main. (* @@ -40,7 +43,7 @@ Module main. arg * 2 } *) - Definition foo (τ : list Ty.t) (α : list Value.t) : M := + Definition foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ arg ] => ltac:(M.monadic @@ -56,34 +59,46 @@ Module main. M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "arg = " |); M.read (| Value.String " -" |) ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "arg = " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ arg ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ arg ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| BinOp.Panic.mul (| M.read (| arg |), Value.Integer Integer.I32 2 |) |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + BinOp.Panic.mul (| Integer.I32, M.read (| arg |), M.of_value (| Value.Integer 2 |) |) + |) |))) | _, _ => M.impossible end. @@ -108,13 +123,13 @@ Module main. } } *) - Definition call_foo (τ : list Ty.t) (α : list Value.t) : M := + Definition call_foo (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ arg ] => ltac:(M.monadic (let arg := M.alloc (| arg |) in M.read (| - let result := M.copy (| Value.DeclaredButUndefined |) in + let result := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := InlineAssembly in result |))) 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 b4c03af1e..d151f6772 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 @@ -10,39 +10,45 @@ fn main() { } } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let raw_p := M.alloc (| M.alloc (| Value.Integer Integer.U32 10 |) |) in + let raw_p := M.alloc (| M.alloc (| M.of_value (| Value.Integer 10 |) |) |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| raw_p |) |)) - (Value.Integer Integer.U32 10)) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| raw_p |) |), + M.of_value (| Value.Integer 10 |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), - [ M.read (| Value.String "assertion failed: *raw_p == 10" |) ] + [ + M.read (| + M.of_value (| Value.String "assertion failed: *raw_p == 10" |) + |) + ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 0900821cb..59beeba25 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 @@ -26,16 +26,20 @@ fn main() { println!("another binding: {}", another_binding); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let a_binding := M.copy (| Value.DeclaredButUndefined |) in + let a_binding := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in let _ := - let x := M.alloc (| Value.Integer Integer.I32 2 |) in - let _ := M.write (| a_binding, BinOp.Panic.mul (| M.read (| x |), M.read (| x |) |) |) in - M.alloc (| Value.Tuple [] |) in + let x := M.alloc (| M.of_value (| Value.Integer 2 |) |) in + let _ := + M.write (| + a_binding, + BinOp.Panic.mul (| Integer.I32, M.read (| x |), M.read (| x |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -46,36 +50,46 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "a binding: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "a binding: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ a_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ a_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let another_binding := M.copy (| Value.DeclaredButUndefined |) in - let _ := M.write (| another_binding, Value.Integer Integer.I32 1 |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let another_binding := M.copy (| M.of_value (| Value.DeclaredButUndefined |) |) in + let _ := M.write (| another_binding, M.of_value (| Value.Integer 1 |) |) in let _ := let _ := M.alloc (| @@ -86,37 +100,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "another binding: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "another binding: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ another_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ another_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 452c0ae6a..11f9baab1 100644 --- a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/freezing.v +++ b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/freezing.v @@ -20,17 +20,17 @@ fn main() { _mutable_integer = 3; } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let _mutable_integer := M.alloc (| Value.Integer Integer.I32 7 |) in + let _mutable_integer := M.alloc (| M.of_value (| 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 Integer.I32 3 |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let _ := M.write (| _mutable_integer, M.of_value (| Value.Integer 3 |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 c205c2e63..6a6e1e259 100644 --- a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/mutability.v +++ b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/mutability.v @@ -18,13 +18,13 @@ fn main() { // FIXME ^ Comment out this line } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let _immutable_binding := M.alloc (| Value.Integer Integer.I32 1 |) in - let mutable_binding := M.alloc (| Value.Integer Integer.I32 1 |) in + let _immutable_binding := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let mutable_binding := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := let _ := M.alloc (| @@ -35,39 +35,50 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Before mutation: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "Before mutation: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ mutable_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ mutable_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let β := mutable_binding in - M.write (| β, BinOp.Panic.add (| M.read (| β |), Value.Integer Integer.I32 1 |) |) in + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.of_value (| Value.Integer 1 |) |) + |) in let _ := let _ := M.alloc (| @@ -78,37 +89,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "After mutation: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "After mutation: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ mutable_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ mutable_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 8ddf0306c..d8a6af867 100644 --- a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/scope.v +++ b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/scope.v @@ -22,14 +22,14 @@ fn main() { println!("outer long: {}", long_lived_binding); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let long_lived_binding := M.alloc (| Value.Integer Integer.I32 1 |) in + let long_lived_binding := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := - let short_lived_binding := M.alloc (| Value.Integer Integer.I32 2 |) in + let short_lived_binding := M.alloc (| M.of_value (| Value.Integer 2 |) |) in let _ := let _ := M.alloc (| @@ -40,37 +40,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "inner short: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "inner short: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ short_lived_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ short_lived_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -81,37 +89,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "outer long: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "outer long: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ long_lived_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ long_lived_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 eaf8144a8..e28694eca 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 @@ -23,14 +23,14 @@ fn main() { // Please note that warnings may not be shown in a browser } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let an_integer := M.alloc (| Value.Integer Integer.U32 1 |) in - let a_boolean := M.alloc (| Value.Bool true |) in - let unit_ := M.alloc (| Value.Tuple [] |) in + let an_integer := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let a_boolean := M.alloc (| M.of_value (| Value.Bool true |) |) in + let unit_ := M.alloc (| M.of_value (| Value.Tuple [] |) |) in let copied_integer := M.copy (| an_integer |) in let _ := let _ := @@ -42,36 +42,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "An integer: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "An integer: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "u32" ] - |), - [ copied_integer ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "u32" ] + |), + [ copied_integer ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -82,34 +90,44 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ M.read (| Value.String "A boolean: " |); M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "A boolean: " |) |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.path "bool" ] - |), - [ a_boolean ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "bool" ] + |), + [ a_boolean ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -120,39 +138,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "Meet the unit value: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "Meet the unit value: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_debug", - [ Ty.tuple [] ] - |), - [ unit_ ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.tuple [] ] + |), + [ unit_ ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let _unused_variable := M.alloc (| Value.Integer Integer.U32 3 |) in - let _noisy_unused_variable := M.alloc (| Value.Integer Integer.U32 2 |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let _unused_variable := M.alloc (| M.of_value (| Value.Integer 3 |) |) in + let _noisy_unused_variable := M.alloc (| M.of_value (| Value.Integer 2 |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. 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 befc19127..8d3538185 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 @@ -20,12 +20,12 @@ fn main() { println!("shadowed in outer block: {}", shadowed_binding); } *) -Definition main (τ : list Ty.t) (α : list Value.t) : M := +Definition main (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [] => ltac:(M.monadic (M.read (| - let shadowed_binding := M.alloc (| Value.Integer Integer.I32 1 |) in + let shadowed_binding := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := let _ := let _ := @@ -37,37 +37,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "before being shadowed: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "before being shadowed: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ shadowed_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ shadowed_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let shadowed_binding := M.copy (| Value.String "abc" |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let shadowed_binding := M.copy (| M.of_value (| Value.String "abc" |) |) in let _ := let _ := M.alloc (| @@ -78,37 +88,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "shadowed in inner block: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "shadowed in inner block: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] - |), - [ shadowed_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.apply (Ty.path "&") [ Ty.path "str" ] ] + |), + [ shadowed_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in let _ := let _ := M.alloc (| @@ -119,37 +139,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "outside inner block: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "outside inner block: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ shadowed_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ shadowed_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - let shadowed_binding := M.alloc (| Value.Integer Integer.I32 2 |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let shadowed_binding := M.alloc (| M.of_value (| Value.Integer 2 |) |) in let _ := let _ := M.alloc (| @@ -160,37 +190,47 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |), [ (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.read (| Value.String "shadowed in outer block: " |); - M.read (| Value.String " -" |) - ] - |)); + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "shadowed in outer block: " |) + |)); + A.to_value (M.read (| M.of_value (| Value.String " +" |) |)) + ] + |) + |) + |); (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", - [ Ty.path "i32" ] - |), - [ shadowed_binding ] - |) - ] - |)) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "i32" ] + |), + [ shadowed_binding ] + |)) + ] + |) + |) + |) ] |) ] |) |) in - M.alloc (| Value.Tuple [] |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/subtle.v b/CoqOfRust/examples/default/examples/subtle.v index c54cae253..b9d0d5f4c 100644 --- a/CoqOfRust/examples/default/examples/subtle.v +++ b/CoqOfRust/examples/default/examples/subtle.v @@ -19,14 +19,14 @@ Module Impl_core_clone_Clone_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". (* Clone *) - Definition clone (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| M.match_operator (| - Value.DeclaredButUndefined, + M.of_value (| Value.DeclaredButUndefined |), [ fun γ => ltac:(M.monadic (M.read (| self |))) ] |) |))) @@ -45,7 +45,7 @@ Module Impl_core_fmt_Debug_for_subtle_Choice. Definition Self : Ty.t := Ty.path "subtle::Choice". (* Debug *) - Definition fmt (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; f ] => ltac:(M.monadic @@ -59,12 +59,13 @@ Module Impl_core_fmt_Debug_for_subtle_Choice. |), [ M.read (| f |); - M.read (| Value.String "Choice" |); + M.read (| M.of_value (| Value.String "Choice" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "subtle::Choice", 0 |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -86,7 +87,7 @@ Module Impl_subtle_Choice. self.0 } *) - Definition unwrap_u8 (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_u8 (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -109,7 +110,7 @@ Module Impl_core_convert_From_subtle_Choice_for_bool. source.0 != 0 } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ source ] => ltac:(M.monadic @@ -117,41 +118,45 @@ Module Impl_core_convert_From_subtle_Choice_for_bool. M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.bit_or - (BinOp.Pure.eq - (M.read (| + UnOp.Pure.not (| + BinOp.Pure.bit_or (| + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| source, "subtle::Choice", 0 |) - |)) - (Value.Integer Integer.U8 0)) - (BinOp.Pure.eq - (M.read (| + |), + M.of_value (| Value.Integer 0 |) + |), + BinOp.Pure.eq (| + M.read (| M.SubPointer.get_struct_tuple_field (| source, "subtle::Choice", 0 |) - |)) - (Value.Integer Integer.U8 1))) + |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| @@ -164,24 +169,27 @@ Module Impl_core_convert_From_subtle_Choice_for_bool. M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: (source.0 == 0u8) | (source.0 == 1u8)" + M.of_value (| + Value.String + "assertion failed: (source.0 == 0u8) | (source.0 == 1u8)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| - BinOp.Pure.ne - (M.read (| M.SubPointer.get_struct_tuple_field (| source, "subtle::Choice", 0 |) |)) - (Value.Integer Integer.U8 0) + BinOp.Pure.ne (| + M.read (| M.SubPointer.get_struct_tuple_field (| source, "subtle::Choice", 0 |) |), + M.of_value (| Value.Integer 0 |) + |) |) |))) | _, _ => M.impossible @@ -206,7 +214,7 @@ Module Impl_core_ops_bit_BitAnd_for_subtle_Choice. (self.0 & rhs.0).into() } *) - Definition bitand (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -221,9 +229,10 @@ Module Impl_core_ops_bit_BitAnd_for_subtle_Choice. [] |), [ - BinOp.Pure.bit_and - (M.read (| M.SubPointer.get_struct_tuple_field (| self, "subtle::Choice", 0 |) |)) - (M.read (| M.SubPointer.get_struct_tuple_field (| rhs, "subtle::Choice", 0 |) |)) + BinOp.Pure.bit_and (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "subtle::Choice", 0 |) |), + M.read (| M.SubPointer.get_struct_tuple_field (| rhs, "subtle::Choice", 0 |) |) + |) ] |))) | _, _ => M.impossible @@ -246,7 +255,7 @@ Module Impl_core_ops_bit_BitAndAssign_for_subtle_Choice. *self = *self & rhs; } *) - Definition bitand_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitand_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -267,7 +276,7 @@ Module Impl_core_ops_bit_BitAndAssign_for_subtle_Choice. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -291,7 +300,7 @@ Module Impl_core_ops_bit_BitOr_for_subtle_Choice. (self.0 | rhs.0).into() } *) - Definition bitor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -306,9 +315,10 @@ Module Impl_core_ops_bit_BitOr_for_subtle_Choice. [] |), [ - BinOp.Pure.bit_or - (M.read (| M.SubPointer.get_struct_tuple_field (| self, "subtle::Choice", 0 |) |)) - (M.read (| M.SubPointer.get_struct_tuple_field (| rhs, "subtle::Choice", 0 |) |)) + BinOp.Pure.bit_or (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "subtle::Choice", 0 |) |), + M.read (| M.SubPointer.get_struct_tuple_field (| rhs, "subtle::Choice", 0 |) |) + |) ] |))) | _, _ => M.impossible @@ -331,7 +341,7 @@ Module Impl_core_ops_bit_BitOrAssign_for_subtle_Choice. *self = *self | rhs; } *) - Definition bitor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -352,7 +362,7 @@ Module Impl_core_ops_bit_BitOrAssign_for_subtle_Choice. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -376,7 +386,7 @@ Module Impl_core_ops_bit_BitXor_for_subtle_Choice. (self.0 ^ rhs.0).into() } *) - Definition bitxor (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -391,9 +401,10 @@ Module Impl_core_ops_bit_BitXor_for_subtle_Choice. [] |), [ - BinOp.Pure.bit_xor - (M.read (| M.SubPointer.get_struct_tuple_field (| self, "subtle::Choice", 0 |) |)) - (M.read (| M.SubPointer.get_struct_tuple_field (| rhs, "subtle::Choice", 0 |) |)) + BinOp.Pure.bit_xor (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "subtle::Choice", 0 |) |), + M.read (| M.SubPointer.get_struct_tuple_field (| rhs, "subtle::Choice", 0 |) |) + |) ] |))) | _, _ => M.impossible @@ -416,7 +427,7 @@ Module Impl_core_ops_bit_BitXorAssign_for_subtle_Choice. *self = *self ^ rhs; } *) - Definition bitxor_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition bitxor_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -437,7 +448,7 @@ Module Impl_core_ops_bit_BitXorAssign_for_subtle_Choice. [ M.read (| M.read (| self |) |); M.read (| rhs |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -461,7 +472,7 @@ Module Impl_core_ops_bit_Not_for_subtle_Choice. (1u8 & (!self.0)).into() } *) - Definition not (τ : list Ty.t) (α : list Value.t) : M := + Definition not (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self ] => ltac:(M.monadic @@ -475,10 +486,12 @@ Module Impl_core_ops_bit_Not_for_subtle_Choice. [] |), [ - BinOp.Pure.bit_and - (Value.Integer Integer.U8 1) - (UnOp.Pure.not - (M.read (| M.SubPointer.get_struct_tuple_field (| self, "subtle::Choice", 0 |) |))) + BinOp.Pure.bit_and (| + M.of_value (| Value.Integer 1 |), + UnOp.Pure.not (| + M.read (| M.SubPointer.get_struct_tuple_field (| self, "subtle::Choice", 0 |) |) + |) + |) ] |))) | _, _ => M.impossible @@ -509,7 +522,7 @@ fn black_box(input: u8) -> u8 { } } *) -Definition black_box (τ : list Ty.t) (α : list Value.t) : M := +Definition black_box (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ input ] => ltac:(M.monadic @@ -517,29 +530,33 @@ Definition black_box (τ : list Ty.t) (α : list Value.t) : M := M.read (| let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic - (let γ := M.use (M.alloc (| Value.Bool true |)) in + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.bit_or - (BinOp.Pure.eq - (M.read (| input |)) - (Value.Integer Integer.U8 0)) - (BinOp.Pure.eq - (M.read (| input |)) - (Value.Integer Integer.U8 1))) + UnOp.Pure.not (| + BinOp.Pure.bit_or (| + BinOp.Pure.eq (| + M.read (| input |), + M.of_value (| Value.Integer 0 |) + |), + BinOp.Pure.eq (| + M.read (| input |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -549,18 +566,20 @@ Definition black_box (τ : list Ty.t) (α : list Value.t) : M := M.get_function (| "core::panicking::panic", [] |), [ M.read (| - Value.String - "assertion failed: (input == 0u8) | (input == 1u8)" + M.of_value (| + Value.String + "assertion failed: (input == 0u8) | (input == 1u8)" + |) |) ] |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in M.alloc (| @@ -583,19 +602,22 @@ Module Impl_core_convert_From_u8_for_subtle_Choice. Choice(black_box(input)) } *) - Definition from (τ : list Ty.t) (α : list Value.t) : M := + Definition from (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ input ] => ltac:(M.monadic (let input := M.alloc (| input |) in - Value.StructTuple - "subtle::Choice" - [ - M.call_closure (| - M.get_function (| "subtle::black_box", [] |), - [ M.read (| input |) ] - |) - ])) + M.of_value (| + Value.StructTuple + "subtle::Choice" + [ + A.to_value + (M.call_closure (| + M.get_function (| "subtle::black_box", [] |), + [ M.read (| input |) ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -609,7 +631,7 @@ End Impl_core_convert_From_u8_for_subtle_Choice. (* Trait *) Module ConstantTimeEq. - Definition ct_ne (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_ne (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -654,7 +676,7 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. x.into() } *) - Definition ct_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; _rhs ] => @@ -673,23 +695,24 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. |) in let _ := M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.ne - (M.read (| len |)) - (M.call_closure (| + BinOp.Pure.ne (| + M.read (| len |), + M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| _rhs |) ] - |)) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -705,16 +728,16 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. "from", [] |), - [ Value.Integer Integer.U8 0 ] + [ M.of_value (| Value.Integer 0 |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - let x := M.alloc (| Value.Integer Integer.U8 1 |) in + let x := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.use (M.match_operator (| @@ -810,9 +833,9 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. let β := x in M.write (| β, - BinOp.Pure.bit_and - (M.read (| β |)) - (M.call_closure (| + BinOp.Pure.bit_and (| + M.read (| β |), + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", @@ -832,12 +855,13 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. |) |) ] - |)) + |) + |) |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |) in - M.alloc (| Value.Tuple [] |))) + M.alloc (| M.of_value (| Value.Tuple [] |) |))) |))) ] |)) in @@ -875,7 +899,7 @@ Module Impl_subtle_ConstantTimeEq_for_subtle_Choice. !( *self ^ *rhs) } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; rhs ] => ltac:(M.monadic @@ -923,7 +947,7 @@ Module Impl_subtle_ConstantTimeEq_for_u8. ((y ^ (1 as $t_u)) as u8).into() } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -946,13 +970,18 @@ Module Impl_subtle_ConstantTimeEq_for_u8. let y := M.alloc (| BinOp.Panic.shr (| - BinOp.Pure.bit_or - (M.read (| x |)) - (M.call_closure (| + 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 (| Value.Integer Integer.I32 8, Value.Integer Integer.I32 1 |) + |) + |), + BinOp.Panic.sub (| + Integer.I32, + M.of_value (| Value.Integer 8 |), + M.of_value (| Value.Integer 1 |) + |) |) |) in M.alloc (| @@ -968,9 +997,10 @@ Module Impl_subtle_ConstantTimeEq_for_u8. M.read (| M.use (M.alloc (| - BinOp.Pure.bit_xor - (M.read (| y |)) - (M.read (| M.use (M.alloc (| Value.Integer Integer.U8 1 |)) |)) + BinOp.Pure.bit_xor (| + M.read (| y |), + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 1 |) |)) |) + |) |)) |) ] @@ -997,7 +1027,7 @@ Module Impl_subtle_ConstantTimeEq_for_i8. ( *self as $t_u).ct_eq(&( *other as $t_u)) } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1006,8 +1036,8 @@ Module Impl_subtle_ConstantTimeEq_for_i8. M.call_closure (| M.get_trait_method (| "subtle::ConstantTimeEq", Ty.path "u8", [], "ct_eq", [] |), [ - M.alloc (| M.rust_cast (M.read (| M.read (| self |) |)) |); - M.alloc (| M.rust_cast (M.read (| M.read (| other |) |)) |) + M.alloc (| M.rust_cast (| M.read (| M.read (| self |) |) |) |); + M.alloc (| M.rust_cast (| M.read (| M.read (| other |) |) |) |) ] |))) | _, _ => M.impossible @@ -1037,7 +1067,7 @@ Module Impl_subtle_ConstantTimeEq_for_u16. ((y ^ (1 as $t_u)) as u8).into() } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1060,13 +1090,18 @@ Module Impl_subtle_ConstantTimeEq_for_u16. let y := M.alloc (| BinOp.Panic.shr (| - BinOp.Pure.bit_or - (M.read (| x |)) - (M.call_closure (| + 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 (| Value.Integer Integer.I32 16, Value.Integer Integer.I32 1 |) + |) + |), + BinOp.Panic.sub (| + Integer.I32, + M.of_value (| Value.Integer 16 |), + M.of_value (| Value.Integer 1 |) + |) |) |) in M.alloc (| @@ -1079,10 +1114,12 @@ Module Impl_subtle_ConstantTimeEq_for_u16. [] |), [ - M.rust_cast - (BinOp.Pure.bit_xor - (M.read (| y |)) - (M.read (| M.use (M.alloc (| Value.Integer Integer.U16 1 |)) |))) + M.rust_cast (| + BinOp.Pure.bit_xor (| + M.read (| y |), + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 1 |) |)) |) + |) + |) ] |) |) @@ -1107,7 +1144,7 @@ Module Impl_subtle_ConstantTimeEq_for_i16. ( *self as $t_u).ct_eq(&( *other as $t_u)) } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1116,8 +1153,8 @@ Module Impl_subtle_ConstantTimeEq_for_i16. M.call_closure (| M.get_trait_method (| "subtle::ConstantTimeEq", Ty.path "u16", [], "ct_eq", [] |), [ - M.alloc (| M.rust_cast (M.read (| M.read (| self |) |)) |); - M.alloc (| M.rust_cast (M.read (| M.read (| other |) |)) |) + M.alloc (| M.rust_cast (| M.read (| M.read (| self |) |) |) |); + M.alloc (| M.rust_cast (| M.read (| M.read (| other |) |) |) |) ] |))) | _, _ => M.impossible @@ -1147,7 +1184,7 @@ Module Impl_subtle_ConstantTimeEq_for_u32. ((y ^ (1 as $t_u)) as u8).into() } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1170,13 +1207,18 @@ Module Impl_subtle_ConstantTimeEq_for_u32. let y := M.alloc (| BinOp.Panic.shr (| - BinOp.Pure.bit_or - (M.read (| x |)) - (M.call_closure (| + 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 (| Value.Integer Integer.I32 32, Value.Integer Integer.I32 1 |) + |) + |), + BinOp.Panic.sub (| + Integer.I32, + M.of_value (| Value.Integer 32 |), + M.of_value (| Value.Integer 1 |) + |) |) |) in M.alloc (| @@ -1189,10 +1231,12 @@ Module Impl_subtle_ConstantTimeEq_for_u32. [] |), [ - M.rust_cast - (BinOp.Pure.bit_xor - (M.read (| y |)) - (M.read (| M.use (M.alloc (| Value.Integer Integer.U32 1 |)) |))) + M.rust_cast (| + BinOp.Pure.bit_xor (| + M.read (| y |), + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 1 |) |)) |) + |) + |) ] |) |) @@ -1217,7 +1261,7 @@ Module Impl_subtle_ConstantTimeEq_for_i32. ( *self as $t_u).ct_eq(&( *other as $t_u)) } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1226,8 +1270,8 @@ Module Impl_subtle_ConstantTimeEq_for_i32. M.call_closure (| M.get_trait_method (| "subtle::ConstantTimeEq", Ty.path "u32", [], "ct_eq", [] |), [ - M.alloc (| M.rust_cast (M.read (| M.read (| self |) |)) |); - M.alloc (| M.rust_cast (M.read (| M.read (| other |) |)) |) + M.alloc (| M.rust_cast (| M.read (| M.read (| self |) |) |) |); + M.alloc (| M.rust_cast (| M.read (| M.read (| other |) |) |) |) ] |))) | _, _ => M.impossible @@ -1257,7 +1301,7 @@ Module Impl_subtle_ConstantTimeEq_for_u64. ((y ^ (1 as $t_u)) as u8).into() } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1280,13 +1324,18 @@ Module Impl_subtle_ConstantTimeEq_for_u64. let y := M.alloc (| BinOp.Panic.shr (| - BinOp.Pure.bit_or - (M.read (| x |)) - (M.call_closure (| + 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 (| Value.Integer Integer.I32 64, Value.Integer Integer.I32 1 |) + |) + |), + BinOp.Panic.sub (| + Integer.I32, + M.of_value (| Value.Integer 64 |), + M.of_value (| Value.Integer 1 |) + |) |) |) in M.alloc (| @@ -1299,10 +1348,12 @@ Module Impl_subtle_ConstantTimeEq_for_u64. [] |), [ - M.rust_cast - (BinOp.Pure.bit_xor - (M.read (| y |)) - (M.read (| M.use (M.alloc (| Value.Integer Integer.U64 1 |)) |))) + M.rust_cast (| + BinOp.Pure.bit_xor (| + M.read (| y |), + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 1 |) |)) |) + |) + |) ] |) |) @@ -1327,7 +1378,7 @@ Module Impl_subtle_ConstantTimeEq_for_i64. ( *self as $t_u).ct_eq(&( *other as $t_u)) } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1336,8 +1387,8 @@ Module Impl_subtle_ConstantTimeEq_for_i64. M.call_closure (| M.get_trait_method (| "subtle::ConstantTimeEq", Ty.path "u64", [], "ct_eq", [] |), [ - M.alloc (| M.rust_cast (M.read (| M.read (| self |) |)) |); - M.alloc (| M.rust_cast (M.read (| M.read (| other |) |)) |) + M.alloc (| M.rust_cast (| M.read (| M.read (| self |) |) |) |); + M.alloc (| M.rust_cast (| M.read (| M.read (| other |) |) |) |) ] |))) | _, _ => M.impossible @@ -1367,7 +1418,7 @@ Module Impl_subtle_ConstantTimeEq_for_usize. ((y ^ (1 as $t_u)) as u8).into() } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1390,21 +1441,24 @@ Module Impl_subtle_ConstantTimeEq_for_usize. let y := M.alloc (| BinOp.Panic.shr (| - BinOp.Pure.bit_or - (M.read (| x |)) - (M.call_closure (| + 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 (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] |), - Value.Integer Integer.Usize 8 + M.of_value (| Value.Integer 8 |) |), - Value.Integer Integer.Usize 1 + M.of_value (| Value.Integer 1 |) |) |) |) in @@ -1418,10 +1472,12 @@ Module Impl_subtle_ConstantTimeEq_for_usize. [] |), [ - M.rust_cast - (BinOp.Pure.bit_xor - (M.read (| y |)) - (M.read (| M.use (M.alloc (| Value.Integer Integer.Usize 1 |)) |))) + M.rust_cast (| + BinOp.Pure.bit_xor (| + M.read (| y |), + M.read (| M.use (M.alloc (| M.of_value (| Value.Integer 1 |) |)) |) + |) + |) ] |) |) @@ -1446,7 +1502,7 @@ Module Impl_subtle_ConstantTimeEq_for_isize. ( *self as $t_u).ct_eq(&( *other as $t_u)) } *) - Definition ct_eq (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -1455,8 +1511,8 @@ Module Impl_subtle_ConstantTimeEq_for_isize. M.call_closure (| M.get_trait_method (| "subtle::ConstantTimeEq", Ty.path "usize", [], "ct_eq", [] |), [ - M.alloc (| M.rust_cast (M.read (| M.read (| self |) |)) |); - M.alloc (| M.rust_cast (M.read (| M.read (| other |) |)) |) + M.alloc (| M.rust_cast (| M.read (| M.read (| self |) |) |) |); + M.alloc (| M.rust_cast (| M.read (| M.read (| other |) |) |) |) ] |))) | _, _ => M.impossible @@ -1472,7 +1528,7 @@ End Impl_subtle_ConstantTimeEq_for_isize. (* Trait *) Module ConditionallySelectable. - Definition conditional_assign (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_assign (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; choice ] => ltac:(M.monadic @@ -1494,14 +1550,14 @@ Module ConditionallySelectable. [ M.read (| self |); M.read (| other |); M.read (| choice |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. Axiom ProvidedMethod_conditional_assign : M.IsProvidedMethod "subtle::ConditionallySelectable" "conditional_assign" conditional_assign. - Definition conditional_swap (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_swap (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -1536,7 +1592,7 @@ Module ConditionallySelectable. [ M.read (| b |); t; M.read (| choice |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1556,7 +1612,7 @@ Module Impl_subtle_ConditionallySelectable_for_u8. a ^ (mask & (a ^ b)) } *) - Definition conditional_select (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -1566,14 +1622,17 @@ Module Impl_subtle_ConditionallySelectable_for_u8. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I8, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1586,9 +1645,9 @@ Module Impl_subtle_ConditionallySelectable_for_u8. |), [ M.read (| a |); - BinOp.Pure.bit_and - (M.read (| mask |)) - (M.call_closure (| + BinOp.Pure.bit_and (| + M.read (| mask |), + M.call_closure (| M.get_trait_method (| "core::ops::bit::BitXor", Ty.apply (Ty.path "&") [ Ty.path "u8" ], @@ -1597,7 +1656,8 @@ Module Impl_subtle_ConditionallySelectable_for_u8. [] |), [ M.read (| a |); M.read (| b |) ] - |)) + |) + |) ] |) |) @@ -1613,7 +1673,7 @@ Module Impl_subtle_ConditionallySelectable_for_u8. *self ^= mask & ( *self ^ *other); } *) - Definition conditional_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; choice ] => ltac:(M.monadic @@ -1623,28 +1683,34 @@ Module Impl_subtle_ConditionallySelectable_for_u8. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I8, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in let _ := let β := M.read (| self |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Pure.bit_and - (M.read (| mask |)) - (BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)))) + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1659,7 +1725,7 @@ Module Impl_subtle_ConditionallySelectable_for_u8. *b ^= t; } *) - Definition conditional_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -1669,28 +1735,32 @@ Module Impl_subtle_ConditionallySelectable_for_u8. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I8, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in 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 |) |))) + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| M.read (| M.read (| a |) |), M.read (| M.read (| b |) |) |) + |) |) in let _ := let β := M.read (| a |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in let _ := let β := M.read (| b |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1719,7 +1789,7 @@ Module Impl_subtle_ConditionallySelectable_for_i8. a ^ (mask & (a ^ b)) } *) - Definition conditional_select (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -1732,11 +1802,13 @@ Module Impl_subtle_ConditionallySelectable_for_i8. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I8, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in @@ -1751,9 +1823,9 @@ Module Impl_subtle_ConditionallySelectable_for_i8. |), [ M.read (| a |); - BinOp.Pure.bit_and - (M.read (| mask |)) - (M.call_closure (| + BinOp.Pure.bit_and (| + M.read (| mask |), + M.call_closure (| M.get_trait_method (| "core::ops::bit::BitXor", Ty.apply (Ty.path "&") [ Ty.path "i8" ], @@ -1762,7 +1834,8 @@ Module Impl_subtle_ConditionallySelectable_for_i8. [] |), [ M.read (| a |); M.read (| b |) ] - |)) + |) + |) ] |) |) @@ -1778,7 +1851,7 @@ Module Impl_subtle_ConditionallySelectable_for_i8. *self ^= mask & ( *self ^ *other); } *) - Definition conditional_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; choice ] => ltac:(M.monadic @@ -1791,11 +1864,13 @@ Module Impl_subtle_ConditionallySelectable_for_i8. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I8, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in @@ -1803,15 +1878,18 @@ Module Impl_subtle_ConditionallySelectable_for_i8. let β := M.read (| self |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Pure.bit_and - (M.read (| mask |)) - (BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)))) + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1826,7 +1904,7 @@ Module Impl_subtle_ConditionallySelectable_for_i8. *b ^= t; } *) - Definition conditional_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -1839,27 +1917,30 @@ Module Impl_subtle_ConditionallySelectable_for_i8. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I8, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in 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 |) |))) + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| M.read (| M.read (| a |) |), M.read (| M.read (| b |) |) |) + |) |) in let _ := let β := M.read (| a |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in let _ := let β := M.read (| b |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1888,7 +1969,7 @@ Module Impl_subtle_ConditionallySelectable_for_u16. a ^ (mask & (a ^ b)) } *) - Definition conditional_select (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -1898,14 +1979,17 @@ Module Impl_subtle_ConditionallySelectable_for_u16. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I16, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -1918,9 +2002,9 @@ Module Impl_subtle_ConditionallySelectable_for_u16. |), [ M.read (| a |); - BinOp.Pure.bit_and - (M.read (| mask |)) - (M.call_closure (| + BinOp.Pure.bit_and (| + M.read (| mask |), + M.call_closure (| M.get_trait_method (| "core::ops::bit::BitXor", Ty.apply (Ty.path "&") [ Ty.path "u16" ], @@ -1929,7 +2013,8 @@ Module Impl_subtle_ConditionallySelectable_for_u16. [] |), [ M.read (| a |); M.read (| b |) ] - |)) + |) + |) ] |) |) @@ -1945,7 +2030,7 @@ Module Impl_subtle_ConditionallySelectable_for_u16. *self ^= mask & ( *self ^ *other); } *) - Definition conditional_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; choice ] => ltac:(M.monadic @@ -1955,28 +2040,34 @@ Module Impl_subtle_ConditionallySelectable_for_u16. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I16, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in let _ := let β := M.read (| self |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Pure.bit_and - (M.read (| mask |)) - (BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)))) + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -1991,7 +2082,7 @@ Module Impl_subtle_ConditionallySelectable_for_u16. *b ^= t; } *) - Definition conditional_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2001,28 +2092,32 @@ Module Impl_subtle_ConditionallySelectable_for_u16. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I16, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in 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 |) |))) + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| M.read (| M.read (| a |) |), M.read (| M.read (| b |) |) |) + |) |) in let _ := let β := M.read (| a |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in let _ := let β := M.read (| b |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2051,7 +2146,7 @@ Module Impl_subtle_ConditionallySelectable_for_i16. a ^ (mask & (a ^ b)) } *) - Definition conditional_select (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2064,11 +2159,13 @@ Module Impl_subtle_ConditionallySelectable_for_i16. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I16, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in @@ -2083,9 +2180,9 @@ Module Impl_subtle_ConditionallySelectable_for_i16. |), [ M.read (| a |); - BinOp.Pure.bit_and - (M.read (| mask |)) - (M.call_closure (| + BinOp.Pure.bit_and (| + M.read (| mask |), + M.call_closure (| M.get_trait_method (| "core::ops::bit::BitXor", Ty.apply (Ty.path "&") [ Ty.path "i16" ], @@ -2094,7 +2191,8 @@ Module Impl_subtle_ConditionallySelectable_for_i16. [] |), [ M.read (| a |); M.read (| b |) ] - |)) + |) + |) ] |) |) @@ -2110,7 +2208,7 @@ Module Impl_subtle_ConditionallySelectable_for_i16. *self ^= mask & ( *self ^ *other); } *) - Definition conditional_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; choice ] => ltac:(M.monadic @@ -2123,11 +2221,13 @@ Module Impl_subtle_ConditionallySelectable_for_i16. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I16, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in @@ -2135,15 +2235,18 @@ Module Impl_subtle_ConditionallySelectable_for_i16. let β := M.read (| self |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Pure.bit_and - (M.read (| mask |)) - (BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)))) + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2158,7 +2261,7 @@ Module Impl_subtle_ConditionallySelectable_for_i16. *b ^= t; } *) - Definition conditional_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2171,27 +2274,30 @@ Module Impl_subtle_ConditionallySelectable_for_i16. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I16, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in 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 |) |))) + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| M.read (| M.read (| a |) |), M.read (| M.read (| b |) |) |) + |) |) in let _ := let β := M.read (| a |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in let _ := let β := M.read (| b |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2220,7 +2326,7 @@ Module Impl_subtle_ConditionallySelectable_for_u32. a ^ (mask & (a ^ b)) } *) - Definition conditional_select (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2230,14 +2336,17 @@ Module Impl_subtle_ConditionallySelectable_for_u32. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -2250,9 +2359,9 @@ Module Impl_subtle_ConditionallySelectable_for_u32. |), [ M.read (| a |); - BinOp.Pure.bit_and - (M.read (| mask |)) - (M.call_closure (| + BinOp.Pure.bit_and (| + M.read (| mask |), + M.call_closure (| M.get_trait_method (| "core::ops::bit::BitXor", Ty.apply (Ty.path "&") [ Ty.path "u32" ], @@ -2261,7 +2370,8 @@ Module Impl_subtle_ConditionallySelectable_for_u32. [] |), [ M.read (| a |); M.read (| b |) ] - |)) + |) + |) ] |) |) @@ -2277,7 +2387,7 @@ Module Impl_subtle_ConditionallySelectable_for_u32. *self ^= mask & ( *self ^ *other); } *) - Definition conditional_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; choice ] => ltac:(M.monadic @@ -2287,28 +2397,34 @@ Module Impl_subtle_ConditionallySelectable_for_u32. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in let _ := let β := M.read (| self |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Pure.bit_and - (M.read (| mask |)) - (BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)))) + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2323,7 +2439,7 @@ Module Impl_subtle_ConditionallySelectable_for_u32. *b ^= t; } *) - Definition conditional_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2333,28 +2449,32 @@ Module Impl_subtle_ConditionallySelectable_for_u32. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in 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 |) |))) + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| M.read (| M.read (| a |) |), M.read (| M.read (| b |) |) |) + |) |) in let _ := let β := M.read (| a |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in let _ := let β := M.read (| b |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2383,7 +2503,7 @@ Module Impl_subtle_ConditionallySelectable_for_i32. a ^ (mask & (a ^ b)) } *) - Definition conditional_select (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2396,11 +2516,13 @@ Module Impl_subtle_ConditionallySelectable_for_i32. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in @@ -2415,9 +2537,9 @@ Module Impl_subtle_ConditionallySelectable_for_i32. |), [ M.read (| a |); - BinOp.Pure.bit_and - (M.read (| mask |)) - (M.call_closure (| + BinOp.Pure.bit_and (| + M.read (| mask |), + M.call_closure (| M.get_trait_method (| "core::ops::bit::BitXor", Ty.apply (Ty.path "&") [ Ty.path "i32" ], @@ -2426,7 +2548,8 @@ Module Impl_subtle_ConditionallySelectable_for_i32. [] |), [ M.read (| a |); M.read (| b |) ] - |)) + |) + |) ] |) |) @@ -2442,7 +2565,7 @@ Module Impl_subtle_ConditionallySelectable_for_i32. *self ^= mask & ( *self ^ *other); } *) - Definition conditional_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; choice ] => ltac:(M.monadic @@ -2455,11 +2578,13 @@ Module Impl_subtle_ConditionallySelectable_for_i32. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in @@ -2467,15 +2592,18 @@ Module Impl_subtle_ConditionallySelectable_for_i32. let β := M.read (| self |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Pure.bit_and - (M.read (| mask |)) - (BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)))) + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2490,7 +2618,7 @@ Module Impl_subtle_ConditionallySelectable_for_i32. *b ^= t; } *) - Definition conditional_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2503,27 +2631,30 @@ Module Impl_subtle_ConditionallySelectable_for_i32. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I32, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in 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 |) |))) + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| M.read (| M.read (| a |) |), M.read (| M.read (| b |) |) |) + |) |) in let _ := let β := M.read (| a |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in let _ := let β := M.read (| b |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2552,7 +2683,7 @@ Module Impl_subtle_ConditionallySelectable_for_u64. a ^ (mask & (a ^ b)) } *) - Definition conditional_select (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2562,14 +2693,17 @@ Module Impl_subtle_ConditionallySelectable_for_u64. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I64, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in M.alloc (| M.call_closure (| @@ -2582,9 +2716,9 @@ Module Impl_subtle_ConditionallySelectable_for_u64. |), [ M.read (| a |); - BinOp.Pure.bit_and - (M.read (| mask |)) - (M.call_closure (| + BinOp.Pure.bit_and (| + M.read (| mask |), + M.call_closure (| M.get_trait_method (| "core::ops::bit::BitXor", Ty.apply (Ty.path "&") [ Ty.path "u64" ], @@ -2593,7 +2727,8 @@ Module Impl_subtle_ConditionallySelectable_for_u64. [] |), [ M.read (| a |); M.read (| b |) ] - |)) + |) + |) ] |) |) @@ -2609,7 +2744,7 @@ Module Impl_subtle_ConditionallySelectable_for_u64. *self ^= mask & ( *self ^ *other); } *) - Definition conditional_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; choice ] => ltac:(M.monadic @@ -2619,28 +2754,34 @@ Module Impl_subtle_ConditionallySelectable_for_u64. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I64, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in let _ := let β := M.read (| self |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Pure.bit_and - (M.read (| mask |)) - (BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)))) + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2655,7 +2796,7 @@ Module Impl_subtle_ConditionallySelectable_for_u64. *b ^= t; } *) - Definition conditional_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2665,28 +2806,32 @@ Module Impl_subtle_ConditionallySelectable_for_u64. M.read (| let mask := M.alloc (| - M.rust_cast - (UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + M.rust_cast (| + UnOp.Panic.neg (| + Integer.I64, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) - |)) + |) + |) + |) + |) |) in 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 |) |))) + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| M.read (| M.read (| a |) |), M.read (| M.read (| b |) |) |) + |) |) in let _ := let β := M.read (| a |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in let _ := let β := M.read (| b |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2715,7 +2860,7 @@ Module Impl_subtle_ConditionallySelectable_for_i64. a ^ (mask & (a ^ b)) } *) - Definition conditional_select (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2728,11 +2873,13 @@ Module Impl_subtle_ConditionallySelectable_for_i64. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I64, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in @@ -2747,9 +2894,9 @@ Module Impl_subtle_ConditionallySelectable_for_i64. |), [ M.read (| a |); - BinOp.Pure.bit_and - (M.read (| mask |)) - (M.call_closure (| + BinOp.Pure.bit_and (| + M.read (| mask |), + M.call_closure (| M.get_trait_method (| "core::ops::bit::BitXor", Ty.apply (Ty.path "&") [ Ty.path "i64" ], @@ -2758,7 +2905,8 @@ Module Impl_subtle_ConditionallySelectable_for_i64. [] |), [ M.read (| a |); M.read (| b |) ] - |)) + |) + |) ] |) |) @@ -2774,7 +2922,7 @@ Module Impl_subtle_ConditionallySelectable_for_i64. *self ^= mask & ( *self ^ *other); } *) - Definition conditional_assign (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_assign (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other; choice ] => ltac:(M.monadic @@ -2787,11 +2935,13 @@ Module Impl_subtle_ConditionallySelectable_for_i64. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I64, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in @@ -2799,15 +2949,18 @@ Module Impl_subtle_ConditionallySelectable_for_i64. let β := M.read (| self |) in M.write (| β, - BinOp.Pure.bit_xor - (M.read (| β |)) - (BinOp.Pure.bit_and - (M.read (| mask |)) - (BinOp.Pure.bit_xor - (M.read (| M.read (| self |) |)) - (M.read (| M.read (| other |) |)))) + BinOp.Pure.bit_xor (| + M.read (| β |), + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| + M.read (| M.read (| self |) |), + M.read (| M.read (| other |) |) + |) + |) + |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2822,7 +2975,7 @@ Module Impl_subtle_ConditionallySelectable_for_i64. *b ^= t; } *) - Definition conditional_swap (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_swap (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic @@ -2835,27 +2988,30 @@ Module Impl_subtle_ConditionallySelectable_for_i64. M.use (M.alloc (| UnOp.Panic.neg (| - M.rust_cast - (M.call_closure (| + Integer.I64, + M.rust_cast (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), [ choice ] - |)) + |) + |) |) |)) |) in 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 |) |))) + BinOp.Pure.bit_and (| + M.read (| mask |), + BinOp.Pure.bit_xor (| M.read (| M.read (| a |) |), M.read (| M.read (| b |) |) |) + |) |) in let _ := let β := M.read (| a |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in let _ := let β := M.read (| b |) in - M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - M.alloc (| Value.Tuple [] |) + M.write (| β, BinOp.Pure.bit_xor (| M.read (| β |), M.read (| t |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2881,31 +3037,34 @@ Module Impl_subtle_ConditionallySelectable_for_subtle_Choice. Choice(u8::conditional_select(&a.0, &b.0, choice)) } *) - Definition conditional_select (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ a; b; choice ] => ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in - Value.StructTuple - "subtle::Choice" - [ - M.call_closure (| - M.get_trait_method (| - "subtle::ConditionallySelectable", - Ty.path "u8", - [], - "conditional_select", - [] - |), - [ - M.SubPointer.get_struct_tuple_field (| M.read (| a |), "subtle::Choice", 0 |); - M.SubPointer.get_struct_tuple_field (| M.read (| b |), "subtle::Choice", 0 |); - M.read (| choice |) - ] - |) - ])) + M.of_value (| + Value.StructTuple + "subtle::Choice" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "subtle::ConditionallySelectable", + Ty.path "u8", + [], + "conditional_select", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| M.read (| a |), "subtle::Choice", 0 |); + M.SubPointer.get_struct_tuple_field (| M.read (| b |), "subtle::Choice", 0 |); + M.read (| choice |) + ] + |)) + ] + |))) | _, _ => M.impossible end. @@ -2930,7 +3089,7 @@ Module Impl_subtle_ConditionallyNegatable_where_subtle_ConditionallySelectable_T self.conditional_assign(&self_neg, choice); } *) - Definition conditional_negate (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_negate (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; choice ] => @@ -2964,7 +3123,7 @@ Module Impl_subtle_ConditionallyNegatable_where_subtle_ConditionallySelectable_T [ M.read (| self |); self_neg; M.read (| choice |) ] |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |))) | _, _ => M.impossible end. @@ -2989,44 +3148,48 @@ Module Impl_core_clone_Clone_where_core_clone_Clone_T_for_subtle_CtOption_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "subtle::CtOption") [ T ]. (* Clone *) - Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition clone (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - Value.StructRecord - "subtle::CtOption" - [ - ("value", - M.call_closure (| - M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "subtle::CtOption", - "value" - |) - ] - |)); - ("is_some", - M.call_closure (| - M.get_trait_method (| - "core::clone::Clone", - Ty.path "subtle::Choice", - [], - "clone", - [] - |), - [ - M.SubPointer.get_struct_record_field (| - M.read (| self |), - "subtle::CtOption", - "is_some" - |) - ] - |)) - ])) + M.of_value (| + Value.StructRecord + "subtle::CtOption" + [ + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "subtle::CtOption", + "value" + |) + ] + |))); + ("is_some", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "subtle::Choice", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "subtle::CtOption", + "is_some" + |) + ] + |))) + ] + |))) | _, _ => M.impossible end. @@ -3055,7 +3218,7 @@ Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_subtle_CtOption_T. Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "subtle::CtOption") [ T ]. (* Debug *) - Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; f ] => @@ -3070,25 +3233,27 @@ Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_for_subtle_CtOption_T. |), [ M.read (| f |); - M.read (| Value.String "CtOption" |); - M.read (| Value.String "value" |); + M.read (| M.of_value (| Value.String "CtOption" |) |); + M.read (| M.of_value (| Value.String "value" |) |); (* Unsize *) - M.pointer_coercion - (M.SubPointer.get_struct_record_field (| + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| M.read (| self |), "subtle::CtOption", "value" - |)); - M.read (| Value.String "is_some" |); + |) + |); + M.read (| M.of_value (| Value.String "is_some" |) |); (* Unsize *) - M.pointer_coercion - (M.alloc (| + M.pointer_coercion (| + M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), "subtle::CtOption", "is_some" |) - |)) + |) + |) ] |))) | _, _ => M.impossible @@ -3115,7 +3280,7 @@ Module Impl_core_convert_From_subtle_CtOption_T_for_core_option_Option_T. } } *) - Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition from (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ source ] => @@ -3123,15 +3288,15 @@ Module Impl_core_convert_From_subtle_CtOption_T_for_core_option_Option_T. (let source := M.alloc (| source |) in M.read (| M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.eq - (M.call_closure (| + BinOp.Pure.eq (| + M.call_closure (| M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", @@ -3149,25 +3314,32 @@ Module Impl_core_convert_From_subtle_CtOption_T_for_core_option_Option_T. |) |) ] - |)) - (Value.Integer Integer.U8 1) + |), + M.of_value (| Value.Integer 1 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - Value.StructTuple - "core::option::Option::Some" - [ - M.read (| - M.SubPointer.get_struct_record_field (| - source, - "subtle::CtOption", - "value" - |) - |) - ] + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + source, + "subtle::CtOption", + "value" + |) + |)) + ] + |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) ] |) |))) @@ -3194,16 +3366,21 @@ Module Impl_subtle_CtOption_T. } } *) - Definition new (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition new (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ value; is_some ] => ltac:(M.monadic (let value := M.alloc (| value |) in let is_some := M.alloc (| is_some |) in - Value.StructRecord - "subtle::CtOption" - [ ("value", M.read (| value |)); ("is_some", M.read (| is_some |)) ])) + M.of_value (| + Value.StructRecord + "subtle::CtOption" + [ + ("value", A.to_value (M.read (| value |))); + ("is_some", A.to_value (M.read (| is_some |))) + ] + |))) | _, _ => M.impossible end. @@ -3216,7 +3393,7 @@ Module Impl_subtle_CtOption_T. self.value } *) - Definition expect (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition expect (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; msg ] => @@ -3227,22 +3404,29 @@ Module Impl_subtle_CtOption_T. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), - [ - M.SubPointer.get_struct_record_field (| - self, - "subtle::CtOption", - "is_some" + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "subtle::Choice", + "unwrap_u8", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + self, + "subtle::CtOption", + "is_some" + |) + ] |) - ] - |) - |); - M.alloc (| Value.Integer Integer.U8 1 |) - ] + |)); + A.to_value (M.alloc (| M.of_value (| Value.Integer 1 |) |)) + ] + |) |), [ fun γ => @@ -3252,17 +3436,19 @@ Module Impl_subtle_CtOption_T. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3271,7 +3457,9 @@ Module Impl_subtle_CtOption_T. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -3283,50 +3471,67 @@ Module Impl_subtle_CtOption_T. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple - "core::option::Option::Some" - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::Arguments", - "new_v1", - [] - |), - [ - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array [ M.read (| Value.String "" |) ] - |)); - (* Unsize *) - M.pointer_coercion - (M.alloc (| - Value.Array - [ - M.call_closure (| - M.get_associated_function (| - Ty.path "core::fmt::rt::Argument", - "new_display", + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array [ - Ty.apply - (Ty.path "&") - [ Ty.path "str" ] + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)) ] - |), - [ msg ] |) - ] - |)) - ] - |) - ] + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "str" ] + ] + |), + [ msg ] + |)) + ] + |) + |) + |) + ] + |)) + ] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -3347,7 +3552,7 @@ Module Impl_subtle_CtOption_T. self.value } *) - Definition unwrap (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3357,22 +3562,29 @@ Module Impl_subtle_CtOption_T. let _ := M.match_operator (| M.alloc (| - Value.Tuple - [ - M.alloc (| - M.call_closure (| - M.get_associated_function (| Ty.path "subtle::Choice", "unwrap_u8", [] |), - [ - M.SubPointer.get_struct_record_field (| - self, - "subtle::CtOption", - "is_some" + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "subtle::Choice", + "unwrap_u8", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + self, + "subtle::CtOption", + "is_some" + |) + ] |) - ] - |) - |); - M.alloc (| Value.Integer Integer.U8 1 |) - ] + |)); + A.to_value (M.alloc (| M.of_value (| Value.Integer 1 |) |)) + ] + |) |), [ fun γ => @@ -3382,17 +3594,19 @@ Module Impl_subtle_CtOption_T. let left_val := M.copy (| γ0_0 |) in let right_val := M.copy (| γ0_1 |) in M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - UnOp.Pure.not - (BinOp.Pure.eq - (M.read (| M.read (| left_val |) |)) - (M.read (| M.read (| right_val |) |))) + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -3401,7 +3615,9 @@ Module Impl_subtle_CtOption_T. M.read (| let kind := M.alloc (| - Value.StructTuple "core::panicking::AssertKind::Eq" [] + M.of_value (| + Value.StructTuple "core::panicking::AssertKind::Eq" [] + |) |) in M.alloc (| M.call_closure (| @@ -3413,14 +3629,16 @@ Module Impl_subtle_CtOption_T. M.read (| kind |); M.read (| left_val |); M.read (| right_val |); - Value.StructTuple "core::option::Option::None" [] + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) ] |) |) |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] |))) ] @@ -3442,7 +3660,7 @@ Module Impl_subtle_CtOption_T. T::conditional_select(&def, &self.value, self.is_some) } *) - Definition unwrap_or (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; def ] => @@ -3481,7 +3699,7 @@ Module Impl_subtle_CtOption_T. T::conditional_select(&f(), &self.value, self.is_some) } *) - Definition unwrap_or_else (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition unwrap_or_else (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -3506,7 +3724,7 @@ Module Impl_subtle_CtOption_T. "call_once", [] |), - [ M.read (| f |); Value.Tuple [] ] + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] |) |); M.SubPointer.get_struct_record_field (| self, "subtle::CtOption", "value" |); @@ -3527,7 +3745,7 @@ Module Impl_subtle_CtOption_T. self.is_some } *) - Definition is_some (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_some (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3552,7 +3770,7 @@ Module Impl_subtle_CtOption_T. !self.is_some } *) - Definition is_none (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition is_none (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self ] => @@ -3593,7 +3811,7 @@ Module Impl_subtle_CtOption_T. ) } *) - Definition map (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition map (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ self; f ] => @@ -3613,38 +3831,47 @@ Module Impl_subtle_CtOption_T. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "subtle::ConditionallySelectable", - T, - [], - "conditional_select", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| "core::default::Default", T, [], "default", [] |), + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "subtle::ConditionallySelectable", + T, + [], + "conditional_select", [] - |) - |); - M.SubPointer.get_struct_record_field (| - self, - "subtle::CtOption", - "value" - |); - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "subtle::CtOption", - "is_some" - |) - |) - ] - |) - ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::default::Default", + T, + [], + "default", + [] + |), + [] + |) + |); + M.SubPointer.get_struct_record_field (| + self, + "subtle::CtOption", + "value" + |); + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "subtle::CtOption", + "is_some" + |) + |) + ] + |)) + ] + |) ] |); M.read (| @@ -3673,7 +3900,7 @@ Module Impl_subtle_CtOption_T. tmp } *) - Definition and_then (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition and_then (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ U; F ], [ self; f ] => @@ -3693,44 +3920,47 @@ Module Impl_subtle_CtOption_T. |), [ M.read (| f |); - Value.Tuple - [ - M.call_closure (| - M.get_trait_method (| - "subtle::ConditionallySelectable", - T, - [], - "conditional_select", - [] - |), - [ - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::default::Default", - T, - [], - "default", - [] - |), + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "subtle::ConditionallySelectable", + T, + [], + "conditional_select", [] - |) - |); - M.SubPointer.get_struct_record_field (| - self, - "subtle::CtOption", - "value" - |); - M.read (| - M.SubPointer.get_struct_record_field (| - self, - "subtle::CtOption", - "is_some" - |) - |) - ] - |) - ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::default::Default", + T, + [], + "default", + [] + |), + [] + |) + |); + M.SubPointer.get_struct_record_field (| + self, + "subtle::CtOption", + "value" + |); + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "subtle::CtOption", + "is_some" + |) + |) + ] + |)) + ] + |) ] |) |) in @@ -3773,7 +4003,7 @@ Module Impl_subtle_CtOption_T. Self::conditional_select(&self, &f, is_none) } *) - Definition or_else (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition or_else (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [ F ], [ self; f ] => @@ -3802,7 +4032,7 @@ Module Impl_subtle_CtOption_T. "call_once", [] |), - [ M.read (| f |); Value.Tuple [] ] + [ M.read (| f |); M.of_value (| Value.Tuple [] |) ] |) |) in M.alloc (| @@ -3837,7 +4067,7 @@ Module Impl_subtle_ConditionallySelectable_where_subtle_ConditionallySelectable_ ) } *) - Definition conditional_select (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition conditional_select (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ a; b; choice ] => @@ -3917,7 +4147,7 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_subtle_CtOpt (a & b & self.value.ct_eq(&rhs.value)) | (!a & !b) } *) - Definition ct_eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_eq (T : Ty.t) (τ : list Ty.t) (α : list A.t) : M := let Self : Ty.t := Self T in match τ, α with | [], [ self; rhs ] => @@ -4069,7 +4299,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. Choice::from((bit & 1) as u8) } *) - Definition ct_gt (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4126,19 +4356,19 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. ] |) |) in - let pow := M.alloc (| Value.Integer Integer.I32 1 |) in + let pow := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| pow |)) (Value.Integer Integer.I32 8) + BinOp.Pure.lt (| M.read (| pow |), M.of_value (| Value.Integer 8 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4146,14 +4376,18 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. let β := ltb in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |) + |) |) in let _ := let β := pow in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| pow |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4161,7 +4395,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4170,21 +4404,21 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. |) in let bit := M.alloc (| - BinOp.Pure.bit_and (M.read (| gtb |)) (UnOp.Pure.not (M.read (| ltb |))) + BinOp.Pure.bit_and (| M.read (| gtb |), UnOp.Pure.not (| M.read (| ltb |) |) |) |) in - let pow := M.alloc (| Value.Integer Integer.I32 1 |) in + let pow := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| pow |)) (Value.Integer Integer.I32 8) + BinOp.Pure.lt (| M.read (| pow |), M.of_value (| Value.Integer 8 |) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4192,14 +4426,18 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. let β := bit in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |) + |) |) in let _ := let β := pow in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| pow |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4207,7 +4445,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4227,7 +4465,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. M.read (| M.use (M.alloc (| - BinOp.Pure.bit_and (M.read (| bit |)) (Value.Integer Integer.U8 1) + BinOp.Pure.bit_and (| M.read (| bit |), M.of_value (| Value.Integer 1 |) |) |)) |) ] @@ -4271,7 +4509,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. Choice::from((bit & 1) as u8) } *) - Definition ct_gt (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4328,19 +4566,22 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. ] |) |) in - let pow := M.alloc (| Value.Integer Integer.I32 1 |) in + let pow := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| pow |)) (Value.Integer Integer.I32 16) + BinOp.Pure.lt (| + M.read (| pow |), + M.of_value (| Value.Integer 16 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4348,14 +4589,18 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. let β := ltb in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |) + |) |) in let _ := let β := pow in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| pow |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4363,7 +4608,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4372,21 +4617,24 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. |) in let bit := M.alloc (| - BinOp.Pure.bit_and (M.read (| gtb |)) (UnOp.Pure.not (M.read (| ltb |))) + BinOp.Pure.bit_and (| M.read (| gtb |), UnOp.Pure.not (| M.read (| ltb |) |) |) |) in - let pow := M.alloc (| Value.Integer Integer.I32 1 |) in + let pow := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| pow |)) (Value.Integer Integer.I32 16) + BinOp.Pure.lt (| + M.read (| pow |), + M.of_value (| Value.Integer 16 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4394,14 +4642,18 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. let β := bit in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |) + |) |) in let _ := let β := pow in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| pow |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4409,7 +4661,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4425,7 +4677,11 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. "from", [] |), - [ M.rust_cast (BinOp.Pure.bit_and (M.read (| bit |)) (Value.Integer Integer.U16 1)) ] + [ + M.rust_cast (| + BinOp.Pure.bit_and (| M.read (| bit |), M.of_value (| Value.Integer 1 |) |) + |) + ] |) |) |))) @@ -4466,7 +4722,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. Choice::from((bit & 1) as u8) } *) - Definition ct_gt (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4523,19 +4779,22 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. ] |) |) in - let pow := M.alloc (| Value.Integer Integer.I32 1 |) in + let pow := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| pow |)) (Value.Integer Integer.I32 32) + BinOp.Pure.lt (| + M.read (| pow |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4543,14 +4802,18 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. let β := ltb in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |) + |) |) in let _ := let β := pow in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| pow |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4558,7 +4821,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4567,21 +4830,24 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. |) in let bit := M.alloc (| - BinOp.Pure.bit_and (M.read (| gtb |)) (UnOp.Pure.not (M.read (| ltb |))) + BinOp.Pure.bit_and (| M.read (| gtb |), UnOp.Pure.not (| M.read (| ltb |) |) |) |) in - let pow := M.alloc (| Value.Integer Integer.I32 1 |) in + let pow := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| pow |)) (Value.Integer Integer.I32 32) + BinOp.Pure.lt (| + M.read (| pow |), + M.of_value (| Value.Integer 32 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4589,14 +4855,18 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. let β := bit in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |) + |) |) in let _ := let β := pow in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| pow |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4604,7 +4874,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4620,7 +4890,11 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. "from", [] |), - [ M.rust_cast (BinOp.Pure.bit_and (M.read (| bit |)) (Value.Integer Integer.U32 1)) ] + [ + M.rust_cast (| + BinOp.Pure.bit_and (| M.read (| bit |), M.of_value (| Value.Integer 1 |) |) + |) + ] |) |) |))) @@ -4661,7 +4935,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. Choice::from((bit & 1) as u8) } *) - Definition ct_gt (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_gt (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic @@ -4718,19 +4992,22 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. ] |) |) in - let pow := M.alloc (| Value.Integer Integer.I32 1 |) in + let pow := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| pow |)) (Value.Integer Integer.I32 64) + BinOp.Pure.lt (| + M.read (| pow |), + M.of_value (| Value.Integer 64 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4738,14 +5015,18 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. let β := ltb in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |) + |) |) in let _ := let β := pow in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| pow |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4753,7 +5034,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4762,21 +5043,24 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. |) in let bit := M.alloc (| - BinOp.Pure.bit_and (M.read (| gtb |)) (UnOp.Pure.not (M.read (| ltb |))) + BinOp.Pure.bit_and (| M.read (| gtb |), UnOp.Pure.not (| M.read (| ltb |) |) |) |) in - let pow := M.alloc (| Value.Integer Integer.I32 1 |) in + let pow := M.alloc (| M.of_value (| Value.Integer 1 |) |) in let _ := M.loop (| ltac:(M.monadic (M.match_operator (| - M.alloc (| Value.Tuple [] |), + M.alloc (| M.of_value (| Value.Tuple [] |) |), [ fun γ => ltac:(M.monadic (let γ := M.use (M.alloc (| - BinOp.Pure.lt (M.read (| pow |)) (Value.Integer Integer.I32 64) + BinOp.Pure.lt (| + M.read (| pow |), + M.of_value (| Value.Integer 64 |) + |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -4784,14 +5068,18 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. let β := bit in M.write (| β, - BinOp.Pure.bit_or - (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |)) + BinOp.Pure.bit_or (| + M.read (| β |), + BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |) + |) |) in let _ := let β := pow in - M.write (| β, BinOp.Panic.add (| M.read (| β |), M.read (| pow |) |) |) in - M.alloc (| Value.Tuple [] |))); + M.write (| + β, + BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -4799,7 +5087,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. M.read (| let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in - M.alloc (| Value.Tuple [] |) + M.alloc (| M.of_value (| Value.Tuple [] |) |) |) |) |))) @@ -4815,7 +5103,11 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. "from", [] |), - [ M.rust_cast (BinOp.Pure.bit_and (M.read (| bit |)) (Value.Integer Integer.U64 1)) ] + [ + M.rust_cast (| + BinOp.Pure.bit_and (| M.read (| bit |), M.of_value (| Value.Integer 1 |) |) + |) + ] |) |) |))) @@ -4832,7 +5124,7 @@ End Impl_subtle_ConstantTimeGreater_for_u64. (* Trait *) Module ConstantTimeLess. - Definition ct_lt (Self : Ty.t) (τ : list Ty.t) (α : list Value.t) : M := + Definition ct_lt (Self : Ty.t) (τ : list Ty.t) (α : list A.t) : M := match τ, α with | [], [ self; other ] => ltac:(M.monadic diff --git a/CoqOfRust/lib/lib.v b/CoqOfRust/lib/lib.v index 65abab2cf..781a09bbc 100644 --- a/CoqOfRust/lib/lib.v +++ b/CoqOfRust/lib/lib.v @@ -26,28 +26,25 @@ Module List. end. End List. -Definition assign (target : Value.t) (source : Value.t) : M := +Module A. + Definition tt : M := + M.of_value (Value.Tuple []). +End A. + +Definition assign (target : A.t) (source : A.t) : M := let* _ := M.write target source in - M.alloc (Value.Tuple []). + let* tt := A.tt in + M.alloc tt. (** ** Integer types *) (** A value with an address of type `ref str`. *) -Definition mk_str (s : string) : Value.t := - Value.Pointer (Pointer.Immediate ( +Definition mk_str (s : string) : M := + M.of_value (Value.Pointer (Pointer.Immediate ( Value.Pointer (Pointer.Immediate ( Value.String s )) - )). - -Module IntegerDescription. - Class C (Self : M.Integer.t) : Set := { - (** Apply the modulo operation in case of overflows. *) - normalize_wrap : Z -> Z; - min : Z; - max : Z; - }. -End IntegerDescription. + ))). Module Integer. Definition min (kind : Integer.t) : Z := @@ -109,143 +106,149 @@ End Integer. Module UnOp. Module Pure. - Definition not (v : Value.t) : Value.t := - match v with + Definition not (v : A.t) : M := + M.of_value match A.to_value v with | Value.Bool b => Value.Bool (negb b) - | Value.Integer kind i => Value.Integer kind (Z.lnot i) - | _ => v + | Value.Integer i => Value.Integer (Z.lnot i) + | _ => Value.Error "unexpected parameter for not" end. End Pure. Module Panic. - Definition neg (v : Value.t) : M := - match v with - | Value.Integer kind i => + Definition neg (kind : Integer.t) (v : A.t) : M := + match A.to_value v with + | Value.Integer i => if Z.eqb i (Integer.min kind) then M.panic "overflow" else - M.pure (Value.Integer kind (- i)) - | _ => M.panic "not implemented" + M.of_value (Value.Integer (- i)) + | _ => M.of_value (Value.Error "unexpected parameter for neg") end. End Panic. End UnOp. Module BinOp. Module Pure. - Parameter bit_xor : Value.t -> Value.t -> Value.t. - Parameter bit_and : Value.t -> Value.t -> Value.t. - Parameter bit_or : Value.t -> Value.t -> Value.t. - - Definition eq (v1 v2 : Value.t) : Value.t := - Value.Bool (Value.eqb v1 v2). - - Definition ne (v1 v2 : Value.t) : Value.t := - Value.Bool (negb (Value.eqb v1 v2)). - - Definition lt (v1 v2 : Value.t) : Value.t := - match v1, v2 with - | Value.Integer _ i1, Value.Integer _ i2 => Value.Bool (Z.ltb i1 i2) - | _, _ => Value.Bool false + Parameter bit_xor : A.t -> A.t -> M. + Parameter bit_and : A.t -> A.t -> M. + Parameter bit_or : A.t -> A.t -> M. + + Definition eq (v1 v2 : A.t) : M := + let v1 := A.to_value v1 in + let v2 := A.to_value v2 in + M.of_value (Value.Bool (Value.eqb v1 v2)). + + Definition ne (v1 v2 : A.t) : M := + let v1 := A.to_value v1 in + let v2 := A.to_value v2 in + M.of_value (Value.Bool (negb (Value.eqb v1 v2))). + + Definition lt (v1 v2 : A.t) : M := + M.of_value match A.to_value v1, A.to_value v2 with + | Value.Integer i1, Value.Integer i2 => Value.Bool (Z.ltb i1 i2) + | _, _ => Value.Error "unexpected parameter for lt" end. - Definition le (v1 v2 : Value.t) : Value.t := - match v1, v2 with - | Value.Integer _ i1, Value.Integer _ i2 => Value.Bool (Z.leb i1 i2) - | _, _ => Value.Bool true + Definition le (v1 v2 : A.t) : M := + M.of_value match A.to_value v1, A.to_value v2 with + | Value.Integer i1, Value.Integer i2 => Value.Bool (Z.leb i1 i2) + | _, _ => Value.Error "unexpected parameter for le" end. - Definition ge (v1 v2 : Value.t) : Value.t := - match v1, v2 with - | Value.Integer _ i1, Value.Integer _ i2 => Value.Bool (Z.geb i1 i2) - | _, _ => Value.Bool true + Definition ge (v1 v2 : A.t) : M := + M.of_value match A.to_value v1, A.to_value v2 with + | Value.Integer i1, Value.Integer i2 => Value.Bool (Z.geb i1 i2) + | _, _ => Value.Error "unexpected parameter for ge" end. - Definition gt (v1 v2 : Value.t) : Value.t := - match v1, v2 with - | Value.Integer _ i1, Value.Integer _ i2 => Value.Bool (Z.gtb i1 i2) - | _, _ => Value.Bool false + Definition gt (v1 v2 : A.t) : M := + M.of_value match A.to_value v1, A.to_value v2 with + | Value.Integer i1, Value.Integer i2 => Value.Bool (Z.gtb i1 i2) + | _, _ => Value.Error "unexpected parameter for gt" end. End Pure. Module Error. Definition make_arithmetic (bin_op : Z -> Z -> Z) + (kind : Integer.t) (v1 v2 : Value.t) : Value.t + string := match v1, v2 with - | Value.Integer kind z1, Value.Integer _ z2 => + | Value.Integer z1, Value.Integer z2 => match Integer.normalize_with_error kind (bin_op z1 z2) with - | inl v => inl (Value.Integer kind v) + | inl v => inl (Value.Integer v) | inr err => inr err end | _, _ => inr "expected integers" end. - Definition add (v1 v2 : Value.t) : Value.t + string := - make_arithmetic Z.add v1 v2. + (* Definition add (kind : Integer.t) (v1 v2 : Value.t) : Value.t + string := + make_arithmetic Z.add kind v1 v2. - Definition sub (v1 v2 : Value.t) : Value.t + string := - make_arithmetic Z.sub v1 v2. + Definition sub (kind : Integer.t) (v1 v2 : Value.t) : Value.t + string := + make_arithmetic Z.sub kind v1 v2. - Definition mul (v1 v2 : Value.t) : Value.t + string := - make_arithmetic Z.mul v1 v2. + Definition mul (kind : Integer.t) (v1 v2 : Value.t) : Value.t + string := + make_arithmetic Z.mul kind v1 v2. - Parameter div : Value.t -> Value.t -> Value.t + string. - Parameter rem : Value.t -> Value.t -> Value.t + string. + Parameter div : Integer.t -> Value.t -> Value.t -> Value.t + string. + Parameter rem : Integer.t -> Value.t -> Value.t -> Value.t + string. Parameter shl : Value.t -> Value.t -> Value.t + string. - Parameter shr : Value.t -> Value.t -> Value.t + string. + Parameter shr : Value.t -> Value.t -> Value.t + string. *) End Error. Module Panic. - Definition make_arithmetic (bin_op : Z -> Z -> Z) (v1 v2 : Value.t) : M := - match Error.make_arithmetic bin_op v1 v2 with - | inl v => M.pure v + Definition make_arithmetic (bin_op : Z -> Z -> Z) (kind : Integer.t) (v1 v2 : A.t) : M := + match Error.make_arithmetic bin_op kind (A.to_value v1) (A.to_value v2) with + | inl v => M.of_value v | inr err => M.panic err end. - Definition add : Value.t -> Value.t -> M := - make_arithmetic Z.add. + Definition add (kind : Integer.t) : A.t -> A.t -> M := + make_arithmetic Z.add kind. - Definition sub : Value.t -> Value.t -> M := - make_arithmetic Z.sub. + Definition sub (kind : Integer.t) : A.t -> A.t -> M := + make_arithmetic Z.sub kind. - Definition mul : Value.t -> Value.t -> M := - make_arithmetic Z.mul. + Definition mul (kind : Integer.t) : A.t -> A.t -> M := + make_arithmetic Z.mul kind. - Parameter div : Value.t -> Value.t -> M. - Parameter rem : Value.t -> Value.t -> M. + Parameter div : Integer.t -> A.t -> A.t -> M. + Parameter rem : Integer.t -> A.t -> A.t -> M. - Parameter shl : Value.t -> Value.t -> M. - Parameter shr : Value.t -> Value.t -> M. + Parameter shl : A.t -> A.t -> M. + Parameter shr : A.t -> A.t -> M. End Panic. Module Wrap. Definition make_arithmetic (bin_op : Z -> Z -> Z) - (v1 v2 : Value.t) : - Value.t := - match v1, v2 with - | Value.Integer kind v1, Value.Integer _ v2 => + (kind : Integer.t) + (v1 v2 : A.t) : + M := + M.of_value match A.to_value v1, A.to_value v2 with + | Value.Integer v1, Value.Integer v2 => let z := Integer.normalize_wrap kind (bin_op v1 v2) in - Value.Integer kind z + Value.Integer z | _, _ => Value.Error "expected integers" end. - Definition add (v1 v2 : Value.t) : Value.t := - make_arithmetic Z.add v1 v2. + Definition add (kind : Integer.t) (v1 v2 : A.t) : M := + make_arithmetic Z.add kind v1 v2. - Definition sub (v1 v2 : Value.t) : Value.t := - make_arithmetic Z.sub v1 v2. + Definition sub (kind : Integer.t) (v1 v2 : A.t) : M := + make_arithmetic Z.sub kind v1 v2. - Definition mul (v1 v2 : Value.t) : Value.t := - make_arithmetic Z.mul v1 v2. + Definition mul (kind : Integer.t) (v1 v2 : A.t) : M := + make_arithmetic Z.mul kind v1 v2. - Parameter div : Value.t -> Value.t -> Value.t. - Parameter rem : Value.t -> Value.t -> Value.t. - - Parameter shl : Value.t -> Value.t -> Value.t. - Parameter shr : Value.t -> Value.t -> Value.t. + Parameter div : Integer.t -> A.t -> A.t -> M. + Parameter rem : Integer.t -> A.t -> A.t -> M. + + Parameter shl : A.t -> A.t -> M. + Parameter shr : A.t -> A.t -> M. End Wrap. Module Optimistic. @@ -254,49 +257,49 @@ Module BinOp. in the simulations when possible, to simplify the proofs. *) Definition make_arithmetic (bin_op : Z -> Z -> Z) - (v1 v2 : Value.t) : - Value.t := - match v1, v2 with - | Value.Integer kind v1, Value.Integer _ v2 => + (v1 v2 : A.t) : + M := + M.of_value match A.to_value v1, A.to_value v2 with + | Value.Integer v1, Value.Integer v2 => let z := bin_op v1 v2 in - Value.Integer kind z + Value.Integer z | _, _ => Value.Error "expected integers" end. - Definition add (v1 v2 : Value.t) : Value.t := + Definition add (v1 v2 : A.t) : M := make_arithmetic Z.add v1 v2. - Definition sub (v1 v2 : Value.t) : Value.t := + Definition sub (v1 v2 : A.t) : M := make_arithmetic Z.sub v1 v2. - Definition mul (v1 v2 : Value.t) : Value.t := + Definition mul (v1 v2 : A.t) : M := make_arithmetic Z.mul v1 v2. - Parameter div : Value.t -> Value.t -> Value.t. - Parameter rem : Value.t -> Value.t -> Value.t. + Parameter div : A.t -> A.t -> M. + Parameter rem : A.t -> A.t -> M. - Parameter shl : Value.t -> Value.t -> Value.t. - Parameter shr : Value.t -> Value.t -> Value.t. + Parameter shl : A.t -> A.t -> M. + Parameter shr : A.t -> A.t -> M. End Optimistic. End BinOp. (** The evaluation of logical operators is lazy on the second parameter. *) Module LogicalOp. - Definition and (lhs : Value.t) (rhs : M) : M := - match lhs with + Definition and (lhs : A.t) (rhs : M) : M := + match A.to_value lhs with | Value.Bool b => if b then rhs else - M.pure (Value.Bool false) + M.of_value (Value.Bool false) | _ => M.impossible end. - Definition or (lhs : Value.t) (rhs : M) : M := - match lhs with + Definition or (lhs : A.t) (rhs : M) : M := + match A.to_value lhs with | Value.Bool b => if b then - M.pure (Value.Bool true) + M.of_value (Value.Bool true) else rhs | _ => M.impossible @@ -310,5 +313,5 @@ Fixpoint repeat_nat {A : Set} (times : nat) (v : A) : list A := end. (** The repeat operator to create new arrays, like in `[0; 32]`. *) -Definition repeat (v : Value.t) (times : Z) : Value.t := - Value.Array (repeat_nat (Z.to_nat times) v). +Definition repeat (v : A.t) (times : Z) : M := + M.of_value (Value.Array (repeat_nat (Z.to_nat times) (A.to_value v))). diff --git a/CoqOfRust/lib/proofs/lib.v b/CoqOfRust/lib/proofs/lib.v index 99de80bf3..327d5ed17 100644 --- a/CoqOfRust/lib/proofs/lib.v +++ b/CoqOfRust/lib/proofs/lib.v @@ -37,8 +37,7 @@ End Integer. Module BinOp. Module Error. Lemma add_eq (kind : Integer.t) (z1 z2 z : Z) : - BinOp.Error.add (Value.Integer kind z1) (Value.Integer kind z2) = - inl (Value.Integer kind z) -> + BinOp.Error.add kind (Value.Integer z1) (Value.Integer z2) = inl (Value.Integer z) -> z = (z1 + z2)%Z. Proof. unfold @@ -51,11 +50,9 @@ Module BinOp. Lemma add_is_valid (kind : Integer.t) (z1 z2 : Z) (v : Value.t) (H_z1 : Integer.Valid.t kind z1) (H_z2 : Integer.Valid.t kind z2) - (H_v : - BinOp.Error.add (Value.Integer kind z1) (Value.Integer kind z2) = - inl v) : + (H_v : BinOp.Error.add kind (Value.Integer z1) (Value.Integer z2) = inl v) : match v with - | Value.Integer _ z => Integer.Valid.t kind z + | Value.Integer z => Integer.Valid.t kind z | _ => False end. Proof. diff --git a/CoqOfRust/lib/simulations/lib.v b/CoqOfRust/lib/simulations/lib.v deleted file mode 100644 index 79bbbc209..000000000 --- a/CoqOfRust/lib/simulations/lib.v +++ /dev/null @@ -1,148 +0,0 @@ -Require Import CoqOfRust.CoqOfRust. -Require Import CoqOfRust.simulations.M. - -Import simulations.M.Notations. - -Module u8. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u8"; - φ '(Make x) := Value.Integer Integer.U8 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End u8. - -Module u16. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u16"; - φ '(Make x) := Value.Integer Integer.U16 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End u16. - -Module u32. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u32"; - φ '(Make x) := Value.Integer Integer.U32 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End u32. - -Module u64. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u64"; - φ '(Make x) := Value.Integer Integer.U64 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End u64. - -Module u128. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "u128"; - φ '(Make x) := Value.Integer Integer.U128 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End u128. - -Module usize. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "usize"; - φ '(Make x) := Value.Integer Integer.Usize x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End usize. - -Module i8. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i8"; - φ '(Make x) := Value.Integer Integer.I8 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End i8. - -Module i16. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i16"; - φ '(Make x) := Value.Integer Integer.I16 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End i16. - -Module i32. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i32"; - φ '(Make x) := Value.Integer Integer.I32 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End i32. - -Module i64. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i64"; - φ '(Make x) := Value.Integer Integer.I64 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End i64. - -Module i128. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "i128"; - φ '(Make x) := Value.Integer Integer.I128 x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End i128. - -Module isize. - Inductive t : Set := - | Make (_ : Z). - - Global Instance IsToValue : ToValue t := { - Φ := Ty.path "isize"; - φ '(Make x) := Value.Integer Integer.Isize x; - }. - - Definition get : t -> Z := fun '(Make x) => x. -End isize. diff --git a/CoqOfRust/proofs/M.v b/CoqOfRust/proofs/M.v index 6b9ec1d4f..e5cd4e012 100644 --- a/CoqOfRust/proofs/M.v +++ b/CoqOfRust/proofs/M.v @@ -46,7 +46,7 @@ Definition IsTraitMethod (self_ty : Ty.t) (trait_tys : list Ty.t) (method_name : string) - (method : list Ty.t -> list Value.t -> M) : + (method : list Ty.t -> list A.t -> M) : Prop := exists (instance : Instance.t), M.IsTraitInstance @@ -57,47 +57,50 @@ Definition IsTraitMethod List.assoc instance method_name = Some (InstanceField.Method method). Module Run. - Reserved Notation "{{ env , env_to_value , state | e ⇓ result | state' }}". + Reserved Notation "{{ env , state | e ⇓ result | state' }}". - Inductive t `{State.Trait} {Env : Set} (env : Env) (env_to_value : Env -> Value.t) + Inductive t `{State.Trait} {Env : Set} `{ToValue Env} (env : Env) (* Be aware of the order of parameters: the result and final state are at the beginning. This is due to the way polymorphic types for inductive work in Coq, and the fact that the result is always the same as we are in continuation passing style. *) - (result : Value.t + Exception.t) (state' : State) : + (result : A.t + Exception.t) (state' : State) : M -> State -> Prop := | Pure : - {{ env, env_to_value, state' | LowM.Pure result ⇓ result | state' }} + {{ env, state' | LowM.Pure result ⇓ result | state' }} | CallPrimitiveStateAllocImmediate - (state : State) (v : Value.t) - (k : Value.t -> M) : - {{ env, env_to_value, state | - k (Value.Pointer (Pointer.Immediate v)) ⇓ result + (state : State) (value : A.t) + {B : Set} (next_to_value : B -> Value.t) (next : B) + (k : A.t -> M) : + Value.Pointer (Pointer.Immediate (A.to_value value)) = next_to_value next -> + {{ env, state | + k (A.Make (to_value := next_to_value) next) ⇓ result | state' }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive (Primitive.StateAlloc v) k ⇓ result + {{ env, state | + LowM.CallPrimitive (Primitive.StateAlloc value) k ⇓ result | state' }} | CallPrimitiveStateAllocMutable (address : Address) - (value : State.get_Set address) - (value' : Value.t) + (value : State.get_Set address) `{ToValue (State.get_Set address)} (to_value : State.get_Set address -> Value.t) (state : State) - (k : Value.t -> M) : - let r := Value.Pointer (Pointer.mutable address to_value) in - value' = to_value value -> + {B : Set} `{ToValue B} (next : B) + (k : A.t -> M) : + Value.Pointer (Pointer.mutable address to_value) = φ next -> State.read address state = None -> State.alloc_write address state value = Some state' -> - {{ env, env_to_value, state | k r ⇓ result | state' }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive (Primitive.StateAlloc value') k ⇓ result + {{ env, state | + k (A.make next) ⇓ result + | state' }} -> + {{ env, state | + LowM.CallPrimitive (Primitive.StateAlloc (A.make value)) k ⇓ result | state' }} | CallPrimitiveStateRead {A : Set} {to_value : A -> Value.t} address path big_to_value projection injection (value : State.get_Set address) (sub_value : A) (state : State) - (k : Value.t -> M) : + (k : A.t -> M) : let mutable := Pointer.Mutable.Make (Value := Value.t) (A := A) (to_value := to_value) (Address := Address) @@ -109,20 +112,20 @@ Module Run. injection in State.read address state = Some value -> projection value = Some sub_value -> - {{ env, env_to_value, state | - k (to_value sub_value) ⇓ + {{ env, state | + k (A.Make (to_value := to_value) sub_value) ⇓ result | state' }} -> - {{ env, env_to_value, state | + {{ env, state | LowM.CallPrimitive (Primitive.StateRead mutable) k ⇓ result | state' }} | CallPrimitiveStateWrite {A : Set} {to_value : A -> Value.t} address path big_to_value projection injection - (value : A) (value' : Value.t) + (value : A) (big_value new_big_value : State.get_Set address) (state state_inter : State) - (k : Value.t -> M) : + (k : A.t -> M) : let mutable := Pointer.Mutable.Make (Value := Value.t) (A := A) (to_value := to_value) (Address := Address) @@ -132,20 +135,23 @@ Module Run. big_to_value projection injection in - value' = 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 []) ⇓ result | state' }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive (Primitive.StateWrite mutable value') k ⇓ + {{ env, state_inter | + k (A.make tt) ⇓ + result + | state' }} -> + {{ env, state | + LowM.CallPrimitive (Primitive.StateWrite mutable (A.Make (to_value := to_value) value)) k ⇓ result | state' }} | CallPrimitiveGetSubPointer {A Sub_A : Set} {to_value : A -> Value.t} (mutable : Pointer.Mutable.t Value.t to_value) index sub_projection sub_injection sub_to_value (state : State) - (k : Value.t -> M) : + {B : Set} `{ToValue B} (next : B) + (k : A.t -> M) : (* Communtativity of the read *) (forall (a : A), Option.map (sub_projection a) sub_to_value = @@ -156,47 +162,61 @@ Module Run. 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 - ))) ⇓ + Value.Pointer (Pointer.Mutable (Pointer.Mutable.get_sub + mutable index sub_projection sub_injection sub_to_value + )) = φ next -> + {{ env, state | + k (A.make next) ⇓ result | state' }} -> - {{ env, env_to_value, state | + {{ env, state | LowM.CallPrimitive (Primitive.GetSubPointer mutable index) k ⇓ result | state' }} | CallPrimitiveEnvRead - (state : State) (k : Value.t -> M) : - {{ env, env_to_value, state | k (env_to_value env) ⇓ result | state' }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive Primitive.EnvRead k ⇓ result + (state : State) (k : A.t -> M) : + {{ env, state | + k (A.make env) ⇓ + result + | state' }} -> + {{ env, state | + LowM.CallPrimitive Primitive.EnvRead k ⇓ + result | state' }} | CallPrimitiveGetAssociatedFunction (state : State) (ty : Ty.t) (name : string) (generic_tys : list Ty.t) - (associated_function : list Ty.t -> list Value.t -> M) - (k : Value.t -> M) : + (associated_function : list Ty.t -> list A.t -> M) + {B : Set} `{ToValue B} (next : B) + (k : A.t -> M) : let closure := - Value.Closure (existS (Value.t, M) (associated_function generic_tys)) in + Value.Closure (existS (A.t, M) (associated_function generic_tys)) in M.IsAssociatedFunction ty name associated_function -> - {{ env, env_to_value, state | k closure ⇓ result | state' }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive - (Primitive.GetAssociatedFunction ty name generic_tys) k ⇓ - result + closure = φ next -> + {{ env, state | + k (A.make next) ⇓ + result + | state' }} -> + {{ env, state | + LowM.CallPrimitive (Primitive.GetAssociatedFunction ty name generic_tys) k ⇓ + result | state' }} | CallPrimitiveGetTraitMethod (state : State) (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) : + (method : list Ty.t -> list A.t -> M) + {B : Set} `{ToValue B} (next : B) + (k : A.t -> M) : let closure := - Value.Closure (existS (Value.t, M) (method generic_tys)) in + Value.Closure (existS (A.t, M) (method generic_tys)) in IsTraitMethod trait_name self_ty trait_tys method_name method -> - {{ env, env_to_value, state | k closure ⇓ result | state' }} -> - {{ env, env_to_value, state | + closure = φ next -> + {{ env, state | + k (A.make next) ⇓ + result + | state' }} -> + {{ env, state | LowM.CallPrimitive (Primitive.GetTraitMethod trait_name @@ -209,23 +229,28 @@ Module Run. | state' }} | CallClosure (state state_inter : State) - (f : list Value.t -> M) (args : list Value.t) - (value : Value.t + Exception.t) - (k : Value.t + Exception.t -> M) : - let closure := Value.Closure (existS (Value.t, M) f) in - {{ env, env_to_value, state | f args ⇓ value | state_inter }} -> - {{ env, env_to_value, state_inter | k value ⇓ result | state' }} -> - {{ env, env_to_value, state | LowM.CallClosure closure args k ⇓ result | state' }} + (f : list A.t -> M) (args : list A.t) + (value : A.t + Exception.t) + {B : Set} `{ToValue B} (closure' : B) + (k : A.t + Exception.t -> M) : + let closure := Value.Closure (existS (A.t, M) f) in + closure = φ closure' -> + {{ env, state | f args ⇓ value | state_inter }} -> + {{ env, state_inter | k value ⇓ result | state' }} -> + {{ env, state | + LowM.CallClosure (A.Make (to_value := φ) closure') args k ⇓ + result + | state' }} - where "{{ env , env_to_value , state | e ⇓ result | state' }}" := - (t env env_to_value result state' e state). + where "{{ env , state | e ⇓ result | state' }}" := + (t env result state' e state). - Definition pure (e : M) (result : Value.t + Exception.t) : Prop := + Definition pure (e : M) (result : A.t + Exception.t) : Prop := forall (State Address : Set) `(State.Trait State Address) - (Env : Set) (env : Env) (env_to_value : Env -> Value.t) + (Env : Set) `(ToValue Env) (env : Env) (state : State), - {{ env, env_to_value, state | e ⇓ result | state }}. + {{ env, state | e ⇓ result | state }}. End Run. Module SubPointer. @@ -262,15 +287,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) - (result : Value.t + Exception.t) (state state' : State) (k : Value.t -> M) + `{State.Trait} {Env : Set} `{ToValue Env} (env : Env) + (result : A.t + Exception.t) (state state' : State) (k : A.t -> M) + {B : Set} `{ToValue B} (next : B) (index : Pointer.Index.t) : index = runner.(SubPointer.Runner.index) -> - {{ env, env_to_value, state | - k (Value.Pointer (Pointer.Mutable (SubPointer.get_sub mutable runner))) ⇓ + Value.Pointer (Pointer.Mutable (SubPointer.get_sub mutable runner)) = φ next -> + {{ env, state | + k (A.make next) ⇓ result | state' }} -> - {{ env, env_to_value, state | + {{ env, state | LowM.CallPrimitive (Primitive.GetSubPointer mutable index) k ⇓ result | state' }}. @@ -281,14 +308,6 @@ Module SubPointer. Qed. 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 ( diff --git a/CoqOfRust/revm/function_stack.v b/CoqOfRust/revm/function_stack.v new file mode 100644 index 000000000..b100ec3ba --- /dev/null +++ b/CoqOfRust/revm/function_stack.v @@ -0,0 +1,717 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module function_stack. + (* StructRecord + { + name := "FunctionReturnFrame"; + ty_params := []; + fields := [ ("idx", Ty.path "usize"); ("pc", Ty.path "usize") ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field2_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "FunctionReturnFrame" |) |); + M.read (| M.of_value (| Value.String "idx" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionReturnFrame", + "idx" + |) + |); + M.read (| M.of_value (| Value.String "pc" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionReturnFrame", + "pc" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_function_stack_FunctionReturnFrame. + + Module Impl_core_default_Default_for_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::function_stack::FunctionReturnFrame" + [ + ("idx", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "usize", + [], + "default", + [] + |), + [] + |))); + ("pc", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "usize", + [], + "default", + [] + |), + [] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_function_stack_FunctionReturnFrame. + + Module Impl_core_clone_Clone_for_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.read (| self |))) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_function_stack_FunctionReturnFrame. + + Module Impl_core_marker_Copy_for_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_function_stack_FunctionReturnFrame. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_function_stack_FunctionReturnFrame. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionReturnFrame", + "idx" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::function_stack::FunctionReturnFrame", + "idx" + |) + |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionReturnFrame", + "pc" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::function_stack::FunctionReturnFrame", + "pc" + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_function_stack_FunctionReturnFrame. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_function_stack_FunctionReturnFrame. + + Module Impl_core_cmp_Eq_for_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_function_stack_FunctionReturnFrame. + + Module Impl_core_hash_Hash_for_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "usize", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionReturnFrame", + "idx" + |); + M.read (| state |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "usize", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionReturnFrame", + "pc" + |); + M.read (| state |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_function_stack_FunctionReturnFrame. + + Module Impl_revm_interpreter_function_stack_FunctionReturnFrame. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionReturnFrame". + + (* + pub fn new(idx: usize, pc: usize) -> Self { + Self { idx, pc } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ idx; pc ] => + ltac:(M.monadic + (let idx := M.alloc (| idx |) in + let pc := M.alloc (| pc |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::function_stack::FunctionReturnFrame" + [ ("idx", A.to_value (M.read (| idx |))); ("pc", A.to_value (M.read (| pc |))) ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + End Impl_revm_interpreter_function_stack_FunctionReturnFrame. + + (* StructRecord + { + name := "FunctionStack"; + ty_params := []; + fields := + [ + ("return_stack", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "revm_interpreter::function_stack::FunctionReturnFrame"; + Ty.path "alloc::alloc::Global" + ]); + ("current_code_idx", Ty.path "usize") + ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_function_stack_FunctionStack. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionStack". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field2_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "FunctionStack" |) |); + M.read (| M.of_value (| Value.String "return_stack" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionStack", + "return_stack" + |) + |); + M.read (| M.of_value (| Value.String "current_code_idx" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionStack", + "current_code_idx" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_function_stack_FunctionStack. + + Module Impl_core_default_Default_for_revm_interpreter_function_stack_FunctionStack. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionStack". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::function_stack::FunctionStack" + [ + ("return_stack", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "revm_interpreter::function_stack::FunctionReturnFrame"; + Ty.path "alloc::alloc::Global" + ], + [], + "default", + [] + |), + [] + |))); + ("current_code_idx", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "usize", + [], + "default", + [] + |), + [] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_function_stack_FunctionStack. + + Module Impl_revm_interpreter_function_stack_FunctionStack. + Definition Self : Ty.t := Ty.path "revm_interpreter::function_stack::FunctionStack". + + (* + pub fn new() -> Self { + Self { + return_stack: Vec::new(), + current_code_idx: 0, + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::function_stack::FunctionStack" + [ + ("return_stack", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "revm_interpreter::function_stack::FunctionReturnFrame"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [] + |))); + ("current_code_idx", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn push(&mut self, program_counter: usize, new_idx: usize) { + self.return_stack.push(FunctionReturnFrame { + idx: self.current_code_idx, + pc: program_counter, + }); + self.current_code_idx = new_idx; + } + *) + Definition push (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; program_counter; new_idx ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let program_counter := M.alloc (| program_counter |) in + let new_idx := M.alloc (| new_idx |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "revm_interpreter::function_stack::FunctionReturnFrame"; + Ty.path "alloc::alloc::Global" + ], + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionStack", + "return_stack" + |); + M.of_value (| + Value.StructRecord + "revm_interpreter::function_stack::FunctionReturnFrame" + [ + ("idx", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionStack", + "current_code_idx" + |) + |))); + ("pc", A.to_value (M.read (| program_counter |))) + ] + |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionStack", + "current_code_idx" + |), + M.read (| new_idx |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_push : M.IsAssociatedFunction Self "push" push. + + (* + pub fn return_stack_len(&self) -> usize { + self.return_stack.len() + } + *) + Definition return_stack_len (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "revm_interpreter::function_stack::FunctionReturnFrame"; + Ty.path "alloc::alloc::Global" + ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionStack", + "return_stack" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_return_stack_len : + M.IsAssociatedFunction Self "return_stack_len" return_stack_len. + + (* + pub fn pop(&mut self) -> Option { + self.return_stack.pop().map(|frame| { + self.current_code_idx = frame.idx; + frame + }) + } + *) + Definition pop (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "revm_interpreter::function_stack::FunctionReturnFrame" ], + "map", + [ + Ty.path "revm_interpreter::function_stack::FunctionReturnFrame"; + Ty.function + [ Ty.tuple [ Ty.path "revm_interpreter::function_stack::FunctionReturnFrame" ] ] + (Ty.path "revm_interpreter::function_stack::FunctionReturnFrame") + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "revm_interpreter::function_stack::FunctionReturnFrame"; + Ty.path "alloc::alloc::Global" + ], + "pop", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionStack", + "return_stack" + |) + ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let frame := M.copy (| γ |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionStack", + "current_code_idx" + |), + M.read (| + M.SubPointer.get_struct_record_field (| + frame, + "revm_interpreter::function_stack::FunctionReturnFrame", + "idx" + |) + |) + |) in + frame + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_pop : M.IsAssociatedFunction Self "pop" pop. + + (* + pub fn set_current_code_idx(&mut self, idx: usize) { + self.current_code_idx = idx; + } + *) + Definition set_current_code_idx (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; idx ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let idx := M.alloc (| idx |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::function_stack::FunctionStack", + "current_code_idx" + |), + M.read (| idx |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set_current_code_idx : + M.IsAssociatedFunction Self "set_current_code_idx" set_current_code_idx. + End Impl_revm_interpreter_function_stack_FunctionStack. +End function_stack. diff --git a/CoqOfRust/revm/gas.v b/CoqOfRust/revm/gas.v new file mode 100644 index 000000000..54617b14d --- /dev/null +++ b/CoqOfRust/revm/gas.v @@ -0,0 +1,830 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module gas. + (* StructRecord + { + name := "Gas"; + ty_params := []; + fields := + [ ("limit", Ty.path "u64"); ("remaining", Ty.path "u64"); ("refunded", Ty.path "i64") ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.read (| self |))) ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_gas_Gas. + + Module Impl_core_marker_Copy_for_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_gas_Gas. + + Module Impl_core_fmt_Debug_for_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field3_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Gas" |) |); + M.read (| M.of_value (| Value.String "limit" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "limit" + |) + |); + M.read (| M.of_value (| Value.String "remaining" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "remaining" + |) + |); + M.read (| M.of_value (| Value.String "refunded" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "refunded" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_gas_Gas. + + Module Impl_core_default_Default_for_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::gas::Gas" + [ + ("limit", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u64", + [], + "default", + [] + |), + [] + |))); + ("remaining", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u64", + [], + "default", + [] + |), + [] + |))); + ("refunded", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "i64", + [], + "default", + [] + |), + [] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_gas_Gas. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_gas_Gas. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "limit" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::gas::Gas", + "limit" + |) + |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "remaining" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::gas::Gas", + "remaining" + |) + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "refunded" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::gas::Gas", + "refunded" + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_gas_Gas. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_gas_Gas. + + Module Impl_core_cmp_Eq_for_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_gas_Gas. + + Module Impl_core_hash_Hash_for_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "limit" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "remaining" + |); + M.read (| state |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "i64", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "refunded" + |); + M.read (| state |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_gas_Gas. + + Module Impl_revm_interpreter_gas_Gas. + Definition Self : Ty.t := Ty.path "revm_interpreter::gas::Gas". + + (* + pub const fn new(limit: u64) -> Self { + Self { + limit, + remaining: limit, + refunded: 0, + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ limit ] => + ltac:(M.monadic + (let limit := M.alloc (| limit |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::gas::Gas" + [ + ("limit", A.to_value (M.read (| limit |))); + ("remaining", A.to_value (M.read (| limit |))); + ("refunded", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub const fn new_spent(limit: u64) -> Self { + Self { + limit, + remaining: 0, + refunded: 0, + } + } + *) + Definition new_spent (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ limit ] => + ltac:(M.monadic + (let limit := M.alloc (| limit |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::gas::Gas" + [ + ("limit", A.to_value (M.read (| limit |))); + ("remaining", A.to_value (M.of_value (| Value.Integer 0 |))); + ("refunded", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new_spent : M.IsAssociatedFunction Self "new_spent" new_spent. + + (* + pub const fn limit(&self) -> u64 { + self.limit + } + *) + Definition limit (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "limit" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_limit : M.IsAssociatedFunction Self "limit" limit. + + (* + pub const fn memory(&self) -> u64 { + 0 + } + *) + Definition memory (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| Value.Integer 0 |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_memory : M.IsAssociatedFunction Self "memory" memory. + + (* + pub const fn refunded(&self) -> i64 { + self.refunded + } + *) + Definition refunded (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "refunded" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_refunded : M.IsAssociatedFunction Self "refunded" refunded. + + (* + pub const fn spent(&self) -> u64 { + self.limit - self.remaining + } + *) + Definition spent (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + BinOp.Panic.sub (| + Integer.U64, + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "limit" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "remaining" + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_spent : M.IsAssociatedFunction Self "spent" spent. + + (* + pub const fn spend(&self) -> u64 { + self.spent() + } + *) + Definition spend (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| Ty.path "revm_interpreter::gas::Gas", "spent", [] |), + [ M.read (| self |) ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_spend : M.IsAssociatedFunction Self "spend" spend. + + (* + pub const fn remaining(&self) -> u64 { + self.remaining + } + *) + Definition remaining (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "remaining" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_remaining : M.IsAssociatedFunction Self "remaining" remaining. + + (* + pub fn erase_cost(&mut self, returned: u64) { + self.remaining += returned; + } + *) + Definition erase_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; returned ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let returned := M.alloc (| returned |) in + M.read (| + let _ := + let β := + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "remaining" + |) in + M.write (| + β, + BinOp.Panic.add (| Integer.U64, M.read (| β |), M.read (| returned |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_erase_cost : M.IsAssociatedFunction Self "erase_cost" erase_cost. + + (* + pub fn spend_all(&mut self) { + self.remaining = 0; + } + *) + Definition spend_all (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "remaining" + |), + M.of_value (| Value.Integer 0 |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_spend_all : M.IsAssociatedFunction Self "spend_all" spend_all. + + (* + pub fn record_refund(&mut self, refund: i64) { + self.refunded += refund; + } + *) + Definition record_refund (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; refund ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let refund := M.alloc (| refund |) in + M.read (| + 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.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_record_refund : + M.IsAssociatedFunction Self "record_refund" record_refund. + + (* + 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 set_final_refund (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; is_london ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let is_london := M.alloc (| is_london |) in + M.read (| + let max_refund_quotient := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_london in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| M.of_value (| Value.Integer 5 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "refunded" + |), + M.rust_cast (| + M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "u64", [], "min", [] |), + [ + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "refunded", + [] + |), + [ M.read (| self |) ] + |) + |); + BinOp.Panic.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 |) + |) + ] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set_final_refund : + M.IsAssociatedFunction Self "set_final_refund" set_final_refund. + + (* + pub fn set_refund(&mut self, refund: i64) { + self.refunded = refund; + } + *) + Definition set_refund (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; refund ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let refund := M.alloc (| refund |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "refunded" + |), + M.read (| refund |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set_refund : M.IsAssociatedFunction Self "set_refund" set_refund. + + (* + pub fn record_cost(&mut self, cost: u64) -> bool { + let (remaining, overflow) = self.remaining.overflowing_sub(cost); + let success = !overflow; + if success { + self.remaining = remaining; + } + success + } + *) + Definition record_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; cost ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let cost := M.alloc (| cost |) in + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "overflowing_sub", [] |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "remaining" + |) + |); + M.read (| cost |) + ] + |) + |), + [ + 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 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use success in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::gas::Gas", + "remaining" + |), + M.read (| remaining |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + success)) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_record_cost : M.IsAssociatedFunction Self "record_cost" record_cost. + End Impl_revm_interpreter_gas_Gas. +End gas. diff --git a/CoqOfRust/revm/gas/calc.v b/CoqOfRust/revm/gas/calc.v new file mode 100644 index 000000000..27f01906e --- /dev/null +++ b/CoqOfRust/revm/gas/calc.v @@ -0,0 +1,3581 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module gas. + Module calc. + (* + pub fn sstore_refund(spec_id: SpecId, original: U256, current: U256, new: U256) -> i64 { + if spec_id.is_enabled_in(SpecId::ISTANBUL) { + // EIP-3529: Reduction in refunds + let sstore_clears_schedule = if spec_id.is_enabled_in(SpecId::LONDON) { + (SSTORE_RESET - COLD_SLOAD_COST + ACCESS_LIST_STORAGE_KEY) as i64 + } else { + REFUND_SSTORE_CLEARS + }; + if current == new { + 0 + } else { + if original == current && new == U256::ZERO { + sstore_clears_schedule + } else { + let mut refund = 0; + + if original != U256::ZERO { + if current == U256::ZERO { + refund -= sstore_clears_schedule; + } else if new == U256::ZERO { + refund += sstore_clears_schedule; + } + } + + if original == new { + let (gas_sstore_reset, gas_sload) = if spec_id.is_enabled_in(SpecId::BERLIN) { + (SSTORE_RESET - COLD_SLOAD_COST, WARM_STORAGE_READ_COST) + } else { + (SSTORE_RESET, sload_cost(spec_id, false)) + }; + if original == U256::ZERO { + refund += (SSTORE_SET - gas_sload) as i64; + } else { + refund += (gas_sstore_reset - gas_sload) as i64; + } + } + + refund + } + } + } else { + if current != U256::ZERO && new == U256::ZERO { + REFUND_SSTORE_CLEARS + } else { + 0 + } + } + } + *) + Definition sstore_refund (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ spec_id; original; current; new ] => + ltac:(M.monadic + (let spec_id := M.alloc (| spec_id |) in + let original := M.alloc (| original |) in + let current := M.alloc (| current |) in + let new := M.alloc (| new |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::ISTANBUL" + [] + |) + ] + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let sstore_clears_schedule := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::LONDON" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.rust_cast (| + BinOp.Panic.add (| + Integer.U64, + 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" + |) + |) + |), + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::ACCESS_LIST_STORAGE_KEY" + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.get_constant (| + "revm_interpreter::gas::constants::REFUND_SSTORE_CLEARS" + |))) + ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ current; new ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| M.of_value (| Value.Integer 0 |) |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ original; current ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ new; M.get_constant (| "ruint::ZERO" |) ] + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + sstore_clears_schedule)); + fun γ => + ltac:(M.monadic + (let refund := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ original; M.get_constant (| "ruint::ZERO" |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + current; + M.get_constant (| "ruint::ZERO" |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + let β := refund in + M.write (| + β, + BinOp.Panic.sub (| + Integer.I64, + M.read (| β |), + M.read (| sstore_clears_schedule |) + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + new; + M.get_constant (| + "ruint::ZERO" + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + let β := refund in + M.write (| + β, + BinOp.Panic.add (| + Integer.I64, + M.read (| β |), + M.read (| + sstore_clears_schedule + |) + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ original; new ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (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" + |) + |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::WARM_STORAGE_READ_COST" + |) + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::SSTORE_RESET" + |) + |)); + A.to_value + (M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::sload_cost", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.Bool false + |) + ] + |)) + ] + |) + |))) + ] + |), + [ + 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 gas_sstore_reset := M.copy (| γ0_0 |) in + let gas_sload := M.copy (| γ0_1 |) in + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + original; + M.get_constant (| + "ruint::ZERO" + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + let β := refund in + M.write (| + β, + BinOp.Panic.add (| + Integer.I64, + M.read (| β |), + M.rust_cast (| + BinOp.Panic.sub (| + Integer.U64, + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::SSTORE_SET" + |) + |), + M.read (| gas_sload |) + |) + |) + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + let β := refund in + M.write (| + β, + BinOp.Panic.add (| + Integer.I64, + M.read (| β |), + M.rust_cast (| + BinOp.Panic.sub (| + Integer.U64, + M.read (| + gas_sstore_reset + |), + M.read (| gas_sload |) + |) + |) + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + refund)) + ] + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ current; M.get_constant (| "ruint::ZERO" |) ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ new; M.get_constant (| "ruint::ZERO" |) ] + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.get_constant (| + "revm_interpreter::gas::constants::REFUND_SSTORE_CLEARS" + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + pub const fn create2_cost(len: u64) -> Option { + CREATE.checked_add(tri!(cost_per_word(len, KECCAK256WORD))) + } + *) + Definition create2_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ len ] => + ltac:(M.monadic + (let len := M.alloc (| len |) in + M.catch_return (| + ltac:(M.monadic + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "checked_add", [] |), + [ + M.read (| M.get_constant (| "revm_interpreter::gas::constants::CREATE" |) |); + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::cost_per_word", [] |), + [ + M.read (| len |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::KECCAK256WORD" |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let v := M.copy (| γ0_0 |) in + v)); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))) + ] + |) + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + (* + const fn log2floor(value: U256) -> u64 { + let mut l: u64 = 256; + let mut i = 3; + loop { + if value.as_limbs()[i] == 0u64 { + l -= 64; + } else { + l -= value.as_limbs()[i].leading_zeros() as u64; + if l == 0 { + return l; + } else { + return l - 1; + } + } + if i == 0 { + break; + } + i -= 1; + } + l + } + *) + Definition log2floor (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ value ] => + ltac:(M.monadic + (let value := M.alloc (| value |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let l := M.alloc (| M.of_value (| Value.Integer 256 |) |) in + let i := M.alloc (| M.of_value (| Value.Integer 3 |) |) in + let _ := + M.loop (| + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ value ] + |), + i + |) + |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + let β := l in + M.write (| + β, + BinOp.Panic.sub (| + Integer.U64, + M.read (| β |), + M.of_value (| Value.Integer 64 |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let _ := + let β := l in + M.write (| + β, + BinOp.Panic.sub (| + Integer.U64, + M.read (| β |), + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "u64", + "leading_zeros", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ value ] + |), + i + |) + |) + ] + |) + |) + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| l |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| M.return_ (| M.read (| l |) |) |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + BinOp.Panic.sub (| + Integer.U64, + M.read (| l |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) + |) + |))) + ] + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| i |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + let β := i in + M.write (| + β, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + |) in + l + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn exp_cost(spec_id: SpecId, power: U256) -> Option { + if power == U256::ZERO { + Some(EXP) + } else { + // EIP-160: EXP cost increase + let gas_byte = U256::from(if spec_id.is_enabled_in(SpecId::SPURIOUS_DRAGON) { + 50 + } else { + 10 + }); + let gas = U256::from(EXP) + .checked_add(gas_byte.checked_mul(U256::from(log2floor(power) / 8 + 1))?)?; + + u64::try_from(gas).ok() + } + } + *) + Definition exp_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ spec_id; power ] => + ltac:(M.monadic + (let spec_id := M.alloc (| spec_id |) in + let power := M.alloc (| power |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ power; M.get_constant (| "ruint::ZERO" |) ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::gas::constants::EXP" |) + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let gas_byte := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "i32" ] + |), + [ + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::SPURIOUS_DRAGON" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| M.of_value (| Value.Integer 50 |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Integer 10 |) |))) + ] + |) + |) + ] + |) + |) in + let gas := + M.copy (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "ruint::Uint" ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "checked_add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "u64" ] + |), + [ + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::EXP" + |) + |) + ] + |); + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "ruint::Uint" ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "checked_mul", + [] + |), + [ + M.read (| gas_byte |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "u64" ] + |), + [ + BinOp.Panic.add (| + Integer.U64, + BinOp.Panic.div (| + Integer.U64, + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::log2floor", + [] + |), + [ M.read (| power |) ] + |), + M.of_value (| Value.Integer 8 |) + |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + ] + |) + ] + |) + |), + [ + 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::option::Option") + [ Ty.path "u64" ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.path + "core::convert::Infallible" + ] + ], + "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)) + ] + |) + |) + ] + |) + ] + |) + |), + [ + 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::option::Option") + [ Ty.path "u64" ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "core::convert::Infallible" ] + ], + "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 + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "u64"; + Ty.apply (Ty.path "ruint::from::FromUintError") [ Ty.path "u64" ] + ], + "ok", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "u64", + [ Ty.path "ruint::Uint" ], + "try_from", + [] + |), + [ M.read (| gas |) ] + |) + ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub const fn verylowcopy_cost(len: u64) -> Option { + VERYLOW.checked_add(tri!(cost_per_word(len, COPY))) + } + *) + Definition verylowcopy_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ len ] => + ltac:(M.monadic + (let len := M.alloc (| len |) in + M.catch_return (| + ltac:(M.monadic + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "checked_add", [] |), + [ + M.read (| M.get_constant (| "revm_interpreter::gas::constants::VERYLOW" |) |); + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::cost_per_word", [] |), + [ + M.read (| len |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::COPY" |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let v := M.copy (| γ0_0 |) in + v)); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))) + ] + |) + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + (* + 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) { + warm_cold_cost(is_cold) + } else if spec_id.is_enabled_in(SpecId::TANGERINE) { + 700 + } else { + 20 + }; + base_gas.checked_add(tri!(cost_per_word(len, COPY))) + } + *) + Definition extcodecopy_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ spec_id; len; is_cold ] => + ltac:(M.monadic + (let spec_id := M.alloc (| spec_id |) in + let len := M.alloc (| len |) in + let is_cold := M.alloc (| is_cold |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let base_gas := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::warm_cold_cost", + [] + |), + [ M.read (| is_cold |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::TANGERINE" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| M.of_value (| Value.Integer 700 |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 20 |) |))) + ] + |))) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "checked_add", [] |), + [ + M.read (| base_gas |); + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::cost_per_word", [] |), + [ + M.read (| len |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::COPY" |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let v := M.copy (| γ0_0 |) in + v)); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))) + ] + |) + |) + ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + 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) + } + *) + Definition log_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ n; len ] => + ltac:(M.monadic + (let n := M.alloc (| n |) in + let len := M.alloc (| len |) in + M.catch_return (| + ltac:(M.monadic + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "checked_add", [] |), + [ + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "checked_add", [] |), + [ + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOG" |) + |); + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "u64", + "checked_mul", + [] + |), + [ + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::LOGDATA" + |) + |); + M.read (| len |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let v := M.copy (| γ0_0 |) in + v)); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))) + ] + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let v := M.copy (| γ0_0 |) in + v)); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))) + ] + |) + |); + BinOp.Panic.mul (| + Integer.U64, + M.read (| M.get_constant (| "revm_interpreter::gas::constants::LOGTOPIC" |) |), + M.rust_cast (| M.read (| n |) |) + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub const fn keccak256_cost(len: u64) -> Option { + KECCAK256.checked_add(tri!(cost_per_word(len, KECCAK256WORD))) + } + *) + Definition keccak256_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ len ] => + ltac:(M.monadic + (let len := M.alloc (| len |) in + M.catch_return (| + ltac:(M.monadic + (M.call_closure (| + M.get_associated_function (| Ty.path "u64", "checked_add", [] |), + [ + M.read (| M.get_constant (| "revm_interpreter::gas::constants::KECCAK256" |) |); + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::cost_per_word", [] |), + [ + M.read (| len |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::KECCAK256WORD" |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let v := M.copy (| γ0_0 |) in + v)); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))) + ] + |) + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub const fn cost_per_word(len: u64, multiple: u64) -> Option { + multiple.checked_mul(num_words(len)) + } + *) + Definition cost_per_word (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ len; multiple ] => + ltac:(M.monadic + (let len := M.alloc (| len |) in + let multiple := M.alloc (| multiple |) in + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "checked_mul", [] |), + [ + M.read (| multiple |); + M.call_closure (| + M.get_function (| "revm_interpreter::interpreter::shared_memory::num_words", [] |), + [ M.read (| len |) ] + |) + ] + |))) + | _, _ => M.impossible + end. + + (* + pub const fn initcode_cost(len: u64) -> u64 { + let Some(cost) = cost_per_word(len, INITCODE_WORD_COST) else { + panic!("initcode cost overflow") + }; + cost + } + *) + Definition initcode_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ len ] => + ltac:(M.monadic + (let len := M.alloc (| len |) in + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::cost_per_word", [] |), + [ + M.read (| len |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::INITCODE_WORD_COST" |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let cost := M.copy (| γ0_0 |) in + cost)) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + pub const fn sload_cost(spec_id: SpecId, is_cold: bool) -> u64 { + if spec_id.is_enabled_in(SpecId::BERLIN) { + if is_cold { + COLD_SLOAD_COST + } else { + WARM_STORAGE_READ_COST + } + } else if spec_id.is_enabled_in(SpecId::ISTANBUL) { + // EIP-1884: Repricing for trie-size-dependent opcodes + INSTANBUL_SLOAD_GAS + } else if spec_id.is_enabled_in(SpecId::TANGERINE) { + // EIP-150: Gas cost changes for IO-heavy operations + 200 + } else { + 50 + } + } + *) + Definition sload_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ spec_id; is_cold ] => + ltac:(M.monadic + (let spec_id := M.alloc (| spec_id |) in + let is_cold := M.alloc (| is_cold |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_cold in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.get_constant (| + "revm_interpreter::gas::constants::COLD_SLOAD_COST" + |))); + fun γ => + ltac:(M.monadic + (M.get_constant (| + "revm_interpreter::gas::constants::WARM_STORAGE_READ_COST" + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::ISTANBUL" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.get_constant (| + "revm_interpreter::gas::constants::INSTANBUL_SLOAD_GAS" + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::TANGERINE" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| M.of_value (| Value.Integer 200 |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 50 |) |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + pub fn sstore_cost( + spec_id: SpecId, + original: U256, + current: U256, + new: U256, + gas: u64, + is_cold: bool, + ) -> Option { + // EIP-1706 Disable SSTORE with gasleft lower than call stipend + if spec_id.is_enabled_in(SpecId::ISTANBUL) && gas <= CALL_STIPEND { + return None; + } + + if spec_id.is_enabled_in(SpecId::BERLIN) { + // Berlin specification logic + let mut gas_cost = istanbul_sstore_cost::( + original, current, new, + ); + + if is_cold { + gas_cost += COLD_SLOAD_COST; + } + Some(gas_cost) + } else if spec_id.is_enabled_in(SpecId::ISTANBUL) { + // Istanbul logic + Some(istanbul_sstore_cost::( + original, current, new, + )) + } else { + // Frontier logic + Some(frontier_sstore_cost(current, new)) + } + } + *) + Definition sstore_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ spec_id; original; current; new; gas; is_cold ] => + ltac:(M.monadic + (let spec_id := M.alloc (| spec_id |) in + let original := M.alloc (| original |) in + let current := M.alloc (| current |) in + let new := M.alloc (| new |) in + let gas := M.alloc (| gas |) in + let is_cold := M.alloc (| is_cold |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::ISTANBUL" + [] + |) + ] + |), + ltac:(M.monadic + (BinOp.Pure.le (| + M.read (| gas |), + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::CALL_STIPEND" + |) + |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let gas_cost := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::istanbul_sstore_cost", + [] + |), + [ M.read (| original |); M.read (| current |); M.read (| new |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_cold in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + let β := gas_cost in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::COLD_SLOAD_COST" + |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| gas_cost |)) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::ISTANBUL" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::istanbul_sstore_cost", + [] + |), + [ + M.read (| original |); + M.read (| current |); + M.read (| new |) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::frontier_sstore_cost", + [] + |), + [ M.read (| current |); M.read (| new |) ] + |)) + ] + |) + |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + fn istanbul_sstore_cost( + original: U256, + current: U256, + new: U256, + ) -> u64 { + if new == current { + SLOAD_GAS + } else if original == current && original == U256::ZERO { + SSTORE_SET + } else if original == current { + SSTORE_RESET_GAS + } else { + SLOAD_GAS + } + } + *) + Definition istanbul_sstore_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ original; current; new ] => + ltac:(M.monadic + (let original := M.alloc (| original |) in + let current := M.alloc (| current |) in + let new := M.alloc (| new |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ new; current ] + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.get_constant (| + "revm_interpreter::gas::calc::istanbul_sstore_cost::SLOAD_GAS" + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ original; current ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ original; M.get_constant (| "ruint::ZERO" |) ] + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.get_constant (| "revm_interpreter::gas::constants::SSTORE_SET" |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ original; current ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.get_constant (| + "revm_interpreter::gas::calc::istanbul_sstore_cost::SSTORE_RESET_GAS" + |))); + fun γ => + ltac:(M.monadic + (M.get_constant (| + "revm_interpreter::gas::calc::istanbul_sstore_cost::SLOAD_GAS" + |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + fn frontier_sstore_cost(current: U256, new: U256) -> u64 { + if current == U256::ZERO && new != U256::ZERO { + SSTORE_SET + } else { + SSTORE_RESET + } + } + *) + Definition frontier_sstore_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ current; new ] => + ltac:(M.monadic + (let current := M.alloc (| current |) in + let new := M.alloc (| new |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ current; M.get_constant (| "ruint::ZERO" |) ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ new; M.get_constant (| "ruint::ZERO" |) ] + |))) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.get_constant (| "revm_interpreter::gas::constants::SSTORE_SET" |))); + fun γ => + ltac:(M.monadic + (M.get_constant (| "revm_interpreter::gas::constants::SSTORE_RESET" |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + pub const fn selfdestruct_cost(spec_id: SpecId, res: SelfDestructResult) -> u64 { + // EIP-161: State trie clearing (invariant-preserving alternative) + let should_charge_topup = if spec_id.is_enabled_in(SpecId::SPURIOUS_DRAGON) { + res.had_value && !res.target_exists + } else { + !res.target_exists + }; + + // EIP-150: Gas cost changes for IO-heavy operations + let selfdestruct_gas_topup = if spec_id.is_enabled_in(SpecId::TANGERINE) && should_charge_topup + { + 25000 + } else { + 0 + }; + + // EIP-150: Gas cost changes for IO-heavy operations + let selfdestruct_gas = if spec_id.is_enabled_in(SpecId::TANGERINE) { + 5000 + } else { + 0 + }; + + let mut gas = selfdestruct_gas + selfdestruct_gas_topup; + if spec_id.is_enabled_in(SpecId::BERLIN) && res.is_cold { + gas += COLD_ACCOUNT_ACCESS_COST + } + gas + } + *) + Definition selfdestruct_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ spec_id; res ] => + ltac:(M.monadic + (let spec_id := M.alloc (| spec_id |) in + let res := M.alloc (| res |) in + M.read (| + let should_charge_topup := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::SPURIOUS_DRAGON" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + LogicalOp.and (| + M.read (| + M.SubPointer.get_struct_record_field (| + res, + "revm_interpreter::host::SelfDestructResult", + "had_value" + |) + |), + ltac:(M.monadic + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + res, + "revm_interpreter::host::SelfDestructResult", + "target_exists" + |) + |) + |))) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + res, + "revm_interpreter::host::SelfDestructResult", + "target_exists" + |) + |) + |) + |))) + ] + |) + |) in + let selfdestruct_gas_topup := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::TANGERINE" + [] + |) + ] + |), + ltac:(M.monadic (M.read (| should_charge_topup |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| M.of_value (| Value.Integer 25000 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) + ] + |) + |) in + let selfdestruct_gas := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::TANGERINE" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| M.of_value (| Value.Integer 5000 |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))) + ] + |) + |) in + let gas := + M.alloc (| + BinOp.Panic.add (| + Integer.U64, + M.read (| selfdestruct_gas |), + M.read (| selfdestruct_gas_topup |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |), + ltac:(M.monadic + (M.read (| + M.SubPointer.get_struct_record_field (| + res, + "revm_interpreter::host::SelfDestructResult", + "is_cold" + |) + |))) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let β := gas in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::COLD_ACCOUNT_ACCESS_COST" + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + gas + |))) + | _, _ => M.impossible + end. + + (* + pub const fn call_cost( + spec_id: SpecId, + transfers_value: bool, + is_cold: bool, + new_account_accounting: bool, + ) -> u64 { + // Account access. + let mut gas = if spec_id.is_enabled_in(SpecId::BERLIN) { + warm_cold_cost(is_cold) + } else if spec_id.is_enabled_in(SpecId::TANGERINE) { + // EIP-150: Gas cost changes for IO-heavy operations + 700 + } else { + 40 + }; + + // transfer value cost + if transfers_value { + gas += CALLVALUE; + } + + // new account cost + if new_account_accounting { + // EIP-161: State trie clearing (invariant-preserving alternative) + if spec_id.is_enabled_in(SpecId::SPURIOUS_DRAGON) { + // account only if there is value transferred. + if transfers_value { + gas += NEWACCOUNT; + } + } else { + gas += NEWACCOUNT; + } + } + + gas + } + *) + Definition call_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ spec_id; transfers_value; is_cold; new_account_accounting ] => + ltac:(M.monadic + (let spec_id := M.alloc (| spec_id |) in + let transfers_value := M.alloc (| transfers_value |) in + let is_cold := M.alloc (| is_cold |) in + let new_account_accounting := M.alloc (| new_account_accounting |) in + M.read (| + let gas := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::warm_cold_cost", [] |), + [ M.read (| is_cold |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::TANGERINE" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| M.of_value (| Value.Integer 700 |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 40 |) |))) + ] + |))) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use transfers_value in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + let β := gas in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::CALLVALUE" |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use new_account_accounting in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::SPURIOUS_DRAGON" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use transfers_value in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + let β := gas in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::NEWACCOUNT" + |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + let β := gas in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::NEWACCOUNT" + |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + gas + |))) + | _, _ => M.impossible + end. + + (* + pub const fn warm_cold_cost(is_cold: bool) -> u64 { + if is_cold { + COLD_ACCOUNT_ACCESS_COST + } else { + WARM_STORAGE_READ_COST + } + } + *) + Definition warm_cold_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ is_cold ] => + ltac:(M.monadic + (let is_cold := M.alloc (| is_cold |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_cold in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.get_constant (| + "revm_interpreter::gas::constants::COLD_ACCOUNT_ACCESS_COST" + |))); + fun γ => + ltac:(M.monadic + (M.get_constant (| + "revm_interpreter::gas::constants::WARM_STORAGE_READ_COST" + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + pub const fn memory_gas_for_len(len: usize) -> u64 { + memory_gas(crate::interpreter::num_words(len as u64)) + } + *) + Definition memory_gas_for_len (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ len ] => + ltac:(M.monadic + (let len := M.alloc (| len |) in + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::memory_gas", [] |), + [ + M.call_closure (| + M.get_function (| "revm_interpreter::interpreter::shared_memory::num_words", [] |), + [ M.rust_cast (| M.read (| len |) |) ] + |) + ] + |))) + | _, _ => M.impossible + end. + + (* + pub const fn memory_gas(num_words: u64) -> u64 { + MEMORY + .saturating_mul(num_words) + .saturating_add(num_words.saturating_mul(num_words) / 512) + } + *) + Definition memory_gas (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ num_words ] => + ltac:(M.monadic + (let num_words := M.alloc (| num_words |) in + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_add", [] |), + [ + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_mul", [] |), + [ + M.read (| M.get_constant (| "revm_interpreter::gas::constants::MEMORY" |) |); + M.read (| num_words |) + ] + |); + BinOp.Panic.div (| + Integer.U64, + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_mul", [] |), + [ M.read (| num_words |); M.read (| num_words |) ] + |), + M.of_value (| Value.Integer 512 |) + |) + ] + |))) + | _, _ => M.impossible + end. + + (* + pub fn validate_initial_tx_gas( + spec_id: SpecId, + input: &[u8], + is_create: bool, + access_list: &[(Address, Vec)], + initcodes: &[Bytes], + ) -> u64 { + let mut initial_gas = 0; + let mut zero_data_len = input.iter().filter(|v| **v == 0).count() as u64; + let mut non_zero_data_len = input.len() as u64 - zero_data_len; + + // Enabling of initcode is checked in `validate_env` handler. + for initcode in initcodes { + let zeros = initcode.iter().filter(|v| **v == 0).count() as u64; + zero_data_len += zeros; + non_zero_data_len += initcode.len() as u64 - zeros; + } + + // initdate stipend + initial_gas += zero_data_len * TRANSACTION_ZERO_DATA; + // EIP-2028: Transaction data gas cost reduction + initial_gas += non_zero_data_len + * if spec_id.is_enabled_in(SpecId::ISTANBUL) { + 16 + } else { + 68 + }; + + // get number of access list account and storages. + if spec_id.is_enabled_in(SpecId::BERLIN) { + let accessed_slots = access_list + .iter() + .fold(0, |slot_count, (_, slots)| slot_count + slots.len() as u64); + initial_gas += access_list.len() as u64 * ACCESS_LIST_ADDRESS; + initial_gas += accessed_slots * ACCESS_LIST_STORAGE_KEY; + } + + // base stipend + initial_gas += if is_create { + if spec_id.is_enabled_in(SpecId::HOMESTEAD) { + // EIP-2: Homestead Hard-fork Changes + 53000 + } else { + 21000 + } + } else { + 21000 + }; + + // EIP-3860: Limit and meter initcode + // Initcode stipend for bytecode analysis + if spec_id.is_enabled_in(SpecId::SHANGHAI) && is_create { + initial_gas += initcode_cost(input.len() as u64) + } + + initial_gas + } + *) + Definition validate_initial_tx_gas (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ spec_id; input; is_create; access_list; initcodes ] => + ltac:(M.monadic + (let spec_id := M.alloc (| spec_id |) in + let input := M.alloc (| input |) in + let is_create := M.alloc (| is_create |) in + let access_list := M.alloc (| access_list |) in + let initcodes := M.alloc (| initcodes |) in + M.read (| + let initial_gas := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let zero_data_len := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::iter::adapters::filter::Filter") + [ + Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ]; + Ty.function + [ + Ty.tuple + [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "&") [ Ty.path "u8" ] ] + ] + ] + (Ty.path "bool") + ], + [], + "count", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ], + [], + "filter", + [ + Ty.function + [ + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "&") [ Ty.path "u8" ] ] + ] + ] + (Ty.path "bool") + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "iter", + [] + |), + [ M.read (| input |) ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let v := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| M.read (| M.read (| v |) |) |), + M.of_value (| Value.Integer 0 |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + ] + |) + |) + |) in + let non_zero_data_len := + M.alloc (| + BinOp.Panic.sub (| + Integer.U64, + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| input |) ] + |) + |), + M.read (| zero_data_len |) + |) + |) in + let _ := + 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 "alloy_primitives::bytes_::Bytes" ] + ], + [], + "into_iter", + [] + |), + [ M.read (| initcodes |) ] + |) + |), + [ + 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 "alloy_primitives::bytes_::Bytes" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let initcode := M.copy (| γ0_0 |) in + let zeros := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::iter::adapters::filter::Filter") + [ + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "u8" ]; + Ty.function + [ + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "u8" ] + ] + ] + ] + (Ty.path "bool") + ], + [], + "count", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "u8" ], + [], + "filter", + [ + Ty.function + [ + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "u8" ] + ] + ] + ] + (Ty.path "bool") + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "iter", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path + "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ M.read (| initcode |) ] + |) + ] + |) + ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let v := M.copy (| γ |) in + BinOp.Pure.eq (| + M.read (| + M.read (| M.read (| v |) |) + |), + M.of_value (| + Value.Integer 0 + |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + ] + |) + |) + |) in + let _ := + let β := zero_data_len in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.read (| zeros |) + |) + |) in + let _ := + let β := non_zero_data_len in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + BinOp.Panic.sub (| + Integer.U64, + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ M.read (| initcode |) ] + |) + ] + |) + |), + M.read (| zeros |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + |))) + ] + |)) in + 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 (| + M.get_constant (| "revm_interpreter::gas::constants::TRANSACTION_ZERO_DATA" |) + |) + |) + |) + |) in + 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 (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::ISTANBUL" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| M.of_value (| Value.Integer 16 |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 68 |) |))) + ] + |) + |) + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let accessed_slots := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ + Ty.tuple + [ + Ty.path "alloy_primitives::bits::address::Address"; + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ] + ] + ], + [], + "fold", + [ + Ty.path "u64"; + Ty.function + [ + Ty.tuple + [ + Ty.path "u64"; + Ty.apply + (Ty.path "&") + [ + Ty.tuple + [ + Ty.path "alloy_primitives::bits::address::Address"; + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "ruint::Uint"; + Ty.path "alloc::alloc::Global" + ] + ] + ] + ] + ] + (Ty.path "u64") + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ + Ty.tuple + [ + Ty.path "alloy_primitives::bits::address::Address"; + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" + ] + ] + ], + "iter", + [] + |), + [ M.read (| access_list |) ] + |); + M.of_value (| Value.Integer 0 |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0; α1 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let slot_count := M.copy (| γ |) in + M.match_operator (| + M.alloc (| α1 |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_tuple_field (| γ, 0 |) in + 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 (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "ruint::Uint"; + Ty.path "alloc::alloc::Global" + ], + "len", + [] + |), + [ M.read (| slots |) ] + |) + |) + |))) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) in + let _ := + let β := initial_gas in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + BinOp.Panic.mul (| + Integer.U64, + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ + Ty.tuple + [ + Ty.path "alloy_primitives::bits::address::Address"; + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "ruint::Uint"; + Ty.path "alloc::alloc::Global" + ] + ] + ], + "len", + [] + |), + [ M.read (| access_list |) ] + |) + |), + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::ACCESS_LIST_ADDRESS" + |) + |) + |) + |) + |) in + 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 (| + M.get_constant (| + "revm_interpreter::gas::constants::ACCESS_LIST_STORAGE_KEY" + |) + |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + let β := initial_gas in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_create in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::HOMESTEAD" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| M.of_value (| Value.Integer 53000 |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Integer 21000 |) |))) + ] + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 21000 |) |))) + ] + |) + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::specification::SpecId", + "is_enabled_in", + [] + |), + [ + M.read (| spec_id |); + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::SHANGHAI" + [] + |) + ] + |), + ltac:(M.monadic (M.read (| is_create |))) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let β := initial_gas in + M.write (| + β, + BinOp.Panic.add (| + Integer.U64, + M.read (| β |), + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::initcode_cost", [] |), + [ + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| input |) ] + |) + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + initial_gas + |))) + | _, _ => M.impossible + end. + End calc. +End gas. diff --git a/CoqOfRust/revm/gas/constants.v b/CoqOfRust/revm/gas/constants.v new file mode 100644 index 000000000..684ca5913 --- /dev/null +++ b/CoqOfRust/revm/gas/constants.v @@ -0,0 +1,137 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module gas. + Module constants. + Definition value_ZERO : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). + + Definition value_BASE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))). + + Definition value_VERYLOW : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 3 |) |))). + + Definition value_DATA_LOADN_GAS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 3 |) |))). + + Definition value_CONDITION_JUMP_GAS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4 |) |))). + + Definition value_RETF_GAS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4 |) |))). + + Definition value_DATA_LOAD_GAS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4 |) |))). + + Definition value_LOW : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 5 |) |))). + + Definition value_MID : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 8 |) |))). + + Definition value_HIGH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). + + Definition value_JUMPDEST : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))). + + Definition value_SELFDESTRUCT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 24000 |) |))). + + Definition value_CREATE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 32000 |) |))). + + Definition value_CALLVALUE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 9000 |) |))). + + Definition value_NEWACCOUNT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 25000 |) |))). + + Definition value_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). + + Definition value_MEMORY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 3 |) |))). + + Definition value_LOG : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 375 |) |))). + + Definition value_LOGDATA : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 8 |) |))). + + Definition value_LOGTOPIC : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 375 |) |))). + + Definition value_KECCAK256 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 30 |) |))). + + Definition value_KECCAK256WORD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 6 |) |))). + + Definition value_COPY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 3 |) |))). + + Definition value_BLOCKHASH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 20 |) |))). + + Definition value_CODEDEPOSIT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 200 |) |))). + + Definition value_INSTANBUL_SLOAD_GAS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 800 |) |))). + + Definition value_SSTORE_SET : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 20000 |) |))). + + Definition value_SSTORE_RESET : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 5000 |) |))). + + Definition value_REFUND_SSTORE_CLEARS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 15000 |) |))). + + Definition value_TRANSACTION_ZERO_DATA : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4 |) |))). + + Definition value_TRANSACTION_NON_ZERO_DATA_INIT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 16 |) |))). + + Definition value_TRANSACTION_NON_ZERO_DATA_FRONTIER : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 68 |) |))). + + Definition value_EOF_CREATE_GAS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 32000 |) |))). + + Definition value_ACCESS_LIST_ADDRESS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2400 |) |))). + + Definition value_ACCESS_LIST_STORAGE_KEY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1900 |) |))). + + Definition value_COLD_SLOAD_COST : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2100 |) |))). + + Definition value_COLD_ACCOUNT_ACCESS_COST : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2600 |) |))). + + Definition value_WARM_STORAGE_READ_COST : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 100 |) |))). + + Definition value_WARM_SSTORE_RESET : A.t := + 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" |) |) + |) + |))). + + Definition value_INITCODE_WORD_COST : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))). + + Definition value_CALL_STIPEND : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2300 |) |))). + End constants. +End gas. diff --git a/CoqOfRust/revm/host.v b/CoqOfRust/revm/host.v new file mode 100644 index 000000000..123c76d60 --- /dev/null +++ b/CoqOfRust/revm/host.v @@ -0,0 +1,1103 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module host. + (* Trait *) + (* Empty module 'Host' *) + + (* StructRecord + { + name := "SStoreResult"; + ty_params := []; + fields := + [ + ("original_value", Ty.path "ruint::Uint"); + ("present_value", Ty.path "ruint::Uint"); + ("new_value", Ty.path "ruint::Uint"); + ("is_cold", Ty.path "bool") + ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_host_SStoreResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SStoreResult". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field4_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SStoreResult" |) |); + M.read (| M.of_value (| Value.String "original_value" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "original_value" + |) + |); + M.read (| M.of_value (| Value.String "present_value" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "present_value" + |) + |); + M.read (| M.of_value (| Value.String "new_value" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "new_value" + |) + |); + M.read (| M.of_value (| Value.String "is_cold" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "is_cold" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_host_SStoreResult. + + Module Impl_core_clone_Clone_for_revm_interpreter_host_SStoreResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SStoreResult". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::host::SStoreResult" + [ + ("original_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "ruint::Uint", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "original_value" + |) + ] + |))); + ("present_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "ruint::Uint", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "present_value" + |) + ] + |))); + ("new_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "ruint::Uint", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "new_value" + |) + ] + |))); + ("is_cold", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "is_cold" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_host_SStoreResult. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_host_SStoreResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SStoreResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_host_SStoreResult. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_host_SStoreResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SStoreResult". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "original_value" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::SStoreResult", + "original_value" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "present_value" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::SStoreResult", + "present_value" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "new_value" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::SStoreResult", + "new_value" + |) + ] + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SStoreResult", + "is_cold" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::SStoreResult", + "is_cold" + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_host_SStoreResult. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_host_SStoreResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SStoreResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_host_SStoreResult. + + Module Impl_core_cmp_Eq_for_revm_interpreter_host_SStoreResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SStoreResult". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_host_SStoreResult. + + (* StructRecord + { + name := "LoadAccountResult"; + ty_params := []; + fields := [ ("is_cold", Ty.path "bool"); ("is_empty", Ty.path "bool") ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_host_LoadAccountResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::LoadAccountResult". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field2_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "LoadAccountResult" |) |); + M.read (| M.of_value (| Value.String "is_cold" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |) + |); + M.read (| M.of_value (| Value.String "is_empty" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::LoadAccountResult", + "is_empty" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_host_LoadAccountResult. + + Module Impl_core_clone_Clone_for_revm_interpreter_host_LoadAccountResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::LoadAccountResult". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::host::LoadAccountResult" + [ + ("is_cold", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |) + ] + |))); + ("is_empty", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::LoadAccountResult", + "is_empty" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_host_LoadAccountResult. + + Module Impl_core_default_Default_for_revm_interpreter_host_LoadAccountResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::LoadAccountResult". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::host::LoadAccountResult" + [ + ("is_cold", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))); + ("is_empty", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_host_LoadAccountResult. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_host_LoadAccountResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::LoadAccountResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_host_LoadAccountResult. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_host_LoadAccountResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::LoadAccountResult". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |) + |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::LoadAccountResult", + "is_empty" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::LoadAccountResult", + "is_empty" + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_host_LoadAccountResult. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_host_LoadAccountResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::LoadAccountResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_host_LoadAccountResult. + + Module Impl_core_cmp_Eq_for_revm_interpreter_host_LoadAccountResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::LoadAccountResult". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_host_LoadAccountResult. + + (* StructRecord + { + name := "SelfDestructResult"; + ty_params := []; + fields := + [ + ("had_value", Ty.path "bool"); + ("target_exists", Ty.path "bool"); + ("is_cold", Ty.path "bool"); + ("previously_destroyed", Ty.path "bool") + ]; + } *) + + Module Impl_core_default_Default_for_revm_interpreter_host_SelfDestructResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SelfDestructResult". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::host::SelfDestructResult" + [ + ("had_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))); + ("target_exists", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))); + ("is_cold", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))); + ("previously_destroyed", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "bool", + [], + "default", + [] + |), + [] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_host_SelfDestructResult. + + Module Impl_core_clone_Clone_for_revm_interpreter_host_SelfDestructResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SelfDestructResult". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::host::SelfDestructResult" + [ + ("had_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "had_value" + |) + ] + |))); + ("target_exists", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "target_exists" + |) + ] + |))); + ("is_cold", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "is_cold" + |) + ] + |))); + ("previously_destroyed", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "previously_destroyed" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_host_SelfDestructResult. + + Module Impl_core_fmt_Debug_for_revm_interpreter_host_SelfDestructResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SelfDestructResult". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field4_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SelfDestructResult" |) |); + M.read (| M.of_value (| Value.String "had_value" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "had_value" + |) + |); + M.read (| M.of_value (| Value.String "target_exists" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "target_exists" + |) + |); + M.read (| M.of_value (| Value.String "is_cold" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "is_cold" + |) + |); + M.read (| M.of_value (| Value.String "previously_destroyed" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "previously_destroyed" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_host_SelfDestructResult. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_host_SelfDestructResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SelfDestructResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_host_SelfDestructResult. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_host_SelfDestructResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SelfDestructResult". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "had_value" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::SelfDestructResult", + "had_value" + |) + |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "target_exists" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::SelfDestructResult", + "target_exists" + |) + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "is_cold" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::SelfDestructResult", + "is_cold" + |) + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "previously_destroyed" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::SelfDestructResult", + "previously_destroyed" + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_host_SelfDestructResult. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_host_SelfDestructResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SelfDestructResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_host_SelfDestructResult. + + Module Impl_core_cmp_Eq_for_revm_interpreter_host_SelfDestructResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SelfDestructResult". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_host_SelfDestructResult. + + Module Impl_core_hash_Hash_for_revm_interpreter_host_SelfDestructResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::SelfDestructResult". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "had_value" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "target_exists" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "is_cold" + |); + M.read (| state |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::SelfDestructResult", + "previously_destroyed" + |); + M.read (| state |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_host_SelfDestructResult. +End host. diff --git a/CoqOfRust/revm/host/dummy.v b/CoqOfRust/revm/host/dummy.v new file mode 100644 index 000000000..d67db38df --- /dev/null +++ b/CoqOfRust/revm/host/dummy.v @@ -0,0 +1,1322 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module host. + Module dummy. + (* StructRecord + { + name := "DummyHost"; + ty_params := []; + fields := + [ + ("env", Ty.path "revm_primitives::env::Env"); + ("storage", + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ]); + ("transient_storage", + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ]); + ("log", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "alloy_primitives::log::Log") + [ Ty.path "alloy_primitives::log::LogData" ]; + Ty.path "alloc::alloc::Global" + ]) + ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_host_dummy_DummyHost. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::dummy::DummyHost". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::host::dummy::DummyHost" + [ + ("env", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_primitives::env::Env", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "env" + |) + ] + |))); + ("storage", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "storage" + |) + ] + |))); + ("transient_storage", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "transient_storage" + |) + ] + |))); + ("log", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "alloy_primitives::log::Log") + [ Ty.path "alloy_primitives::log::LogData" ]; + Ty.path "alloc::alloc::Global" + ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "log" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_host_dummy_DummyHost. + + Module Impl_core_fmt_Debug_for_revm_interpreter_host_dummy_DummyHost. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::dummy::DummyHost". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field4_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "DummyHost" |) |); + M.read (| M.of_value (| Value.String "env" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "env" + |) + |); + M.read (| M.of_value (| Value.String "storage" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "storage" + |) + |); + M.read (| M.of_value (| Value.String "transient_storage" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "transient_storage" + |) + |); + M.read (| M.of_value (| Value.String "log" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "log" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_host_dummy_DummyHost. + + Module Impl_core_default_Default_for_revm_interpreter_host_dummy_DummyHost. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::dummy::DummyHost". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::host::dummy::DummyHost" + [ + ("env", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "revm_primitives::env::Env", + [], + "default", + [] + |), + [] + |))); + ("storage", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + [], + "default", + [] + |), + [] + |))); + ("transient_storage", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + [], + "default", + [] + |), + [] + |))); + ("log", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "alloy_primitives::log::Log") + [ Ty.path "alloy_primitives::log::LogData" ]; + Ty.path "alloc::alloc::Global" + ], + [], + "default", + [] + |), + [] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_host_dummy_DummyHost. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_host_dummy_DummyHost. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::dummy::DummyHost". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_host_dummy_DummyHost. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_host_dummy_DummyHost. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::dummy::DummyHost". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_primitives::env::Env", + [ Ty.path "revm_primitives::env::Env" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "env" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::dummy::DummyHost", + "env" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + [ + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ] + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "storage" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::dummy::DummyHost", + "storage" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + [ + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ] + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "transient_storage" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::dummy::DummyHost", + "transient_storage" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "alloy_primitives::log::Log") + [ Ty.path "alloy_primitives::log::LogData" ]; + Ty.path "alloc::alloc::Global" + ], + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "alloy_primitives::log::Log") + [ Ty.path "alloy_primitives::log::LogData" ]; + Ty.path "alloc::alloc::Global" + ] + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "log" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::host::dummy::DummyHost", + "log" + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_host_dummy_DummyHost. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_host_dummy_DummyHost. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::dummy::DummyHost". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_host_dummy_DummyHost. + + Module Impl_core_cmp_Eq_for_revm_interpreter_host_dummy_DummyHost. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::dummy::DummyHost". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_host_dummy_DummyHost. + + Module Impl_revm_interpreter_host_dummy_DummyHost. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::dummy::DummyHost". + + (* + pub fn new(env: Env) -> Self { + Self { + env, + ..Default::default() + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ env ] => + ltac:(M.monadic + (let env := M.alloc (| env |) in + M.of_value (| + M.struct_record_update + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "revm_interpreter::host::dummy::DummyHost", + [], + "default", + [] + |), + [] + |)) + [ ("env", A.to_value (M.read (| env |))) ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn clear(&mut self) { + self.storage.clear(); + self.log.clear(); + } + *) + Definition clear (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + "clear", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "storage" + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "alloy_primitives::log::Log") + [ Ty.path "alloy_primitives::log::LogData" ]; + Ty.path "alloc::alloc::Global" + ], + "clear", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "log" + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_clear : M.IsAssociatedFunction Self "clear" clear. + End Impl_revm_interpreter_host_dummy_DummyHost. + + Module Impl_revm_interpreter_host_Host_for_revm_interpreter_host_dummy_DummyHost. + Definition Self : Ty.t := Ty.path "revm_interpreter::host::dummy::DummyHost". + + (* + fn env(&self) -> &Env { + &self.env + } + *) + Definition env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "env" + |))) + | _, _ => M.impossible + end. + + (* + fn env_mut(&mut self) -> &mut Env { + &mut self.env + } + *) + Definition env_mut (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "env" + |))) + | _, _ => M.impossible + end. + + (* + fn load_account(&mut self, _address: Address) -> Option { + Some(LoadAccountResult::default()) + } + *) + Definition load_account (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _address ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _address := M.alloc (| _address |) in + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "revm_interpreter::host::LoadAccountResult", + [], + "default", + [] + |), + [] + |)) + ] + |))) + | _, _ => M.impossible + end. + + (* + fn block_hash(&mut self, _number: U256) -> Option { + Some(B256::ZERO) + } + *) + Definition block_hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _number ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _number := M.alloc (| _number |) in + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.read (| M.get_constant (| "alloy_primitives::bits::fixed::ZERO" |) |)) + ] + |))) + | _, _ => M.impossible + end. + + (* + fn balance(&mut self, _address: Address) -> Option<(U256, bool)> { + Some((U256::ZERO, false)) + } + *) + Definition balance (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _address ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _address := M.alloc (| _address |) in + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "ruint::ZERO" |) |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |)) + ] + |))) + | _, _ => M.impossible + end. + + (* + fn code(&mut self, _address: Address) -> Option<(Bytecode, bool)> { + Some((Bytecode::default(), false)) + } + *) + Definition code (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _address ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _address := M.alloc (| _address |) in + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "revm_primitives::bytecode::Bytecode", + [], + "default", + [] + |), + [] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |)) + ] + |))) + | _, _ => M.impossible + end. + + (* + fn code_hash(&mut self, __address: Address) -> Option<(B256, bool)> { + Some((KECCAK_EMPTY, false)) + } + *) + Definition code_hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; __address ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let __address := M.alloc (| __address |) in + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.get_constant (| "revm_primitives::utilities::KECCAK_EMPTY" |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |)) + ] + |))) + | _, _ => M.impossible + end. + + (* + fn sload(&mut self, __address: Address, index: U256) -> Option<(U256, bool)> { + match self.storage.entry(index) { + Entry::Occupied(entry) => Some(( *entry.get(), false)), + Entry::Vacant(entry) => { + entry.insert(U256::ZERO); + Some((U256::ZERO, true)) + } + } + } + *) + Definition sload (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; __address; index ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let __address := M.alloc (| __address |) in + let index := M.alloc (| index |) in + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + "entry", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "storage" + |); + M.read (| index |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "std::collections::hash::map::Entry::Occupied", + 0 + |) in + let entry := M.copy (| γ0_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "std::collections::hash::map::OccupiedEntry") + [ Ty.path "ruint::Uint"; Ty.path "ruint::Uint" ], + "get", + [] + |), + [ entry ] + |) + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "std::collections::hash::map::Entry::Vacant", + 0 + |) in + let entry := M.copy (| γ0_0 |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::map::VacantEntry") + [ Ty.path "ruint::Uint"; Ty.path "ruint::Uint" ], + "insert", + [] + |), + [ M.read (| entry |); M.read (| M.get_constant (| "ruint::ZERO" |) |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "ruint::ZERO" |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |)) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + fn sstore(&mut self, _address: Address, index: U256, value: U256) -> Option { + let (present, is_cold) = match self.storage.entry(index) { + Entry::Occupied(mut entry) => (entry.insert(value), false), + Entry::Vacant(entry) => { + entry.insert(value); + (U256::ZERO, true) + } + }; + + Some(SStoreResult { + original_value: U256::ZERO, + present_value: present, + new_value: value, + is_cold, + }) + } + *) + Definition sstore (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _address; index; value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _address := M.alloc (| _address |) in + let index := M.alloc (| index |) in + let value := M.alloc (| value |) in + M.read (| + M.match_operator (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + "entry", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "storage" + |); + M.read (| index |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "std::collections::hash::map::Entry::Occupied", + 0 + |) in + let entry := M.copy (| γ0_0 |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::map::OccupiedEntry") + [ Ty.path "ruint::Uint"; Ty.path "ruint::Uint" ], + "insert", + [] + |), + [ entry; M.read (| value |) ] + |)); + A.to_value (M.of_value (| Value.Bool false |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "std::collections::hash::map::Entry::Vacant", + 0 + |) in + let entry := M.copy (| γ0_0 |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::map::VacantEntry") + [ Ty.path "ruint::Uint"; Ty.path "ruint::Uint" ], + "insert", + [] + |), + [ M.read (| entry |); M.read (| value |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| M.get_constant (| "ruint::ZERO" |) |)); + A.to_value (M.of_value (| Value.Bool true |)) + ] + |) + |))) + ] + |), + [ + 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 present := M.copy (| γ0_0 |) in + let is_cold := M.copy (| γ0_1 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "revm_interpreter::host::SStoreResult" + [ + ("original_value", + A.to_value + (M.read (| M.get_constant (| "ruint::ZERO" |) |))); + ("present_value", A.to_value (M.read (| present |))); + ("new_value", A.to_value (M.read (| value |))); + ("is_cold", A.to_value (M.read (| is_cold |))) + ] + |)) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + fn tload(&mut self, _address: Address, index: U256) -> U256 { + self.transient_storage + .get(&index) + .copied() + .unwrap_or_default() + } + *) + Definition tload (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _address; index ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _address := M.alloc (| _address |) in + let index := M.alloc (| index |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "ruint::Uint" ], + "unwrap_or_default", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&") [ Ty.path "ruint::Uint" ] ], + "copied", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + "get", + [ Ty.path "ruint::Uint" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "transient_storage" + |); + index + ] + |) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + + (* + fn tstore(&mut self, _address: Address, index: U256, value: U256) { + self.transient_storage.insert(index, value); + } + *) + Definition tstore (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _address; index; value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _address := M.alloc (| _address |) in + let index := M.alloc (| index |) in + let value := M.alloc (| value |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "ruint::Uint"; + Ty.path "ruint::Uint"; + Ty.path "std::hash::random::RandomState" + ], + "insert", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "transient_storage" + |); + M.read (| index |); + M.read (| value |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + (* + fn log(&mut self, log: Log) { + self.log.push(log) + } + *) + Definition log (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; log ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let log := M.alloc (| log |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.apply + (Ty.path "alloy_primitives::log::Log") + [ Ty.path "alloy_primitives::log::LogData" ]; + Ty.path "alloc::alloc::Global" + ], + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::host::dummy::DummyHost", + "log" + |); + M.read (| log |) + ] + |))) + | _, _ => M.impossible + end. + + (* + fn selfdestruct(&mut self, _address: Address, _target: Address) -> Option { + panic!("Selfdestruct is not supported for this host") + } + *) + Definition selfdestruct (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; _address; _target ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let _address := M.alloc (| _address |) in + let _target := M.alloc (| _target |) in + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_const", [] |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Selfdestruct is not supported for this host" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "revm_interpreter::host::Host" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ + ("env", InstanceField.Method env); + ("env_mut", InstanceField.Method env_mut); + ("load_account", InstanceField.Method load_account); + ("block_hash", InstanceField.Method block_hash); + ("balance", InstanceField.Method balance); + ("code", InstanceField.Method code); + ("code_hash", InstanceField.Method code_hash); + ("sload", InstanceField.Method sload); + ("sstore", InstanceField.Method sstore); + ("tload", InstanceField.Method tload); + ("tstore", InstanceField.Method tstore); + ("log", InstanceField.Method log); + ("selfdestruct", InstanceField.Method selfdestruct) + ]. + End Impl_revm_interpreter_host_Host_for_revm_interpreter_host_dummy_DummyHost. + End dummy. +End host. diff --git a/CoqOfRust/revm/instruction_result.v b/CoqOfRust/revm/instruction_result.v new file mode 100644 index 000000000..6102d8d79 --- /dev/null +++ b/CoqOfRust/revm/instruction_result.v @@ -0,0 +1,2378 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instruction_result. + (* + Enum InstructionResult + { + ty_params := []; + variants := + [ + { + name := "Continue"; + item := StructTuple []; + discriminant := Some 0; + }; + { + name := "Stop"; + item := StructTuple []; + discriminant := None; + }; + { + name := "Return"; + item := StructTuple []; + discriminant := None; + }; + { + name := "SelfDestruct"; + item := StructTuple []; + discriminant := None; + }; + { + name := "ReturnContract"; + item := StructTuple []; + discriminant := None; + }; + { + name := "Revert"; + item := StructTuple []; + discriminant := Some 16; + }; + { + name := "CallTooDeep"; + item := StructTuple []; + discriminant := None; + }; + { + name := "OutOfFunds"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CallOrCreate"; + item := StructTuple []; + discriminant := Some 32; + }; + { + name := "OutOfGas"; + item := StructTuple []; + discriminant := Some 80; + }; + { + name := "MemoryOOG"; + item := StructTuple []; + discriminant := None; + }; + { + name := "MemoryLimitOOG"; + item := StructTuple []; + discriminant := None; + }; + { + name := "PrecompileOOG"; + item := StructTuple []; + discriminant := None; + }; + { + name := "InvalidOperandOOG"; + item := StructTuple []; + discriminant := None; + }; + { + name := "OpcodeNotFound"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CallNotAllowedInsideStatic"; + item := StructTuple []; + discriminant := None; + }; + { + name := "StateChangeDuringStaticCall"; + item := StructTuple []; + discriminant := None; + }; + { + name := "InvalidFEOpcode"; + item := StructTuple []; + discriminant := None; + }; + { + name := "InvalidJump"; + item := StructTuple []; + discriminant := None; + }; + { + name := "NotActivated"; + item := StructTuple []; + discriminant := None; + }; + { + name := "StackUnderflow"; + item := StructTuple []; + discriminant := None; + }; + { + name := "StackOverflow"; + item := StructTuple []; + discriminant := None; + }; + { + name := "OutOfOffset"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CreateCollision"; + item := StructTuple []; + discriminant := None; + }; + { + name := "OverflowPayment"; + item := StructTuple []; + discriminant := None; + }; + { + name := "PrecompileError"; + item := StructTuple []; + discriminant := None; + }; + { + name := "NonceOverflow"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CreateContractSizeLimit"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CreateContractStartingWithEF"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CreateInitCodeSizeLimit"; + item := StructTuple []; + discriminant := None; + }; + { + name := "FatalExternalError"; + item := StructTuple []; + discriminant := None; + }; + { + name := "ReturnContractInNotInitEOF"; + item := StructTuple []; + discriminant := None; + }; + { + name := "EOFOpcodeDisabledInLegacy"; + item := StructTuple []; + discriminant := None; + }; + { + name := "EOFFunctionStackOverflow"; + item := StructTuple []; + discriminant := None; + } + ]; + } + *) + + Module Impl_core_clone_Clone_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| M.read (| self |) |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_marker_Copy_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_fmt_Debug_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), + [ + M.read (| f |); + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "Continue" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "Stop" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "Return" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "SelfDestruct" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "ReturnContract" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "Revert" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "CallTooDeep" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "OutOfFunds" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "CallOrCreate" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "OutOfGas" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "MemoryOOG" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "MemoryLimitOOG" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "PrecompileOOG" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "InvalidOperandOOG" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "OpcodeNotFound" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "CallNotAllowedInsideStatic" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "StateChangeDuringStaticCall" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "InvalidFEOpcode" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "InvalidJump" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "NotActivated" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "StackUnderflow" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "StackOverflow" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "OutOfOffset" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "CreateCollision" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "OverflowPayment" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "PrecompileError" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "NonceOverflow" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "CreateContractSizeLimit" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "CreateContractStartingWithEF" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "CreateInitCodeSizeLimit" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "FatalExternalError" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "ReturnContractInNotInitEOF" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "EOFOpcodeDisabledInLegacy" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "EOFFunctionStackOverflow" |) |) + |))) + ] + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_default_Default_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::Continue" [] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instruction_result::InstructionResult" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instruction_result::InstructionResult" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_cmp_Eq_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_hash_Hash_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instruction_result::InstructionResult" ] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), + [ __self_tag; M.read (| state |) ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_convert_From_revm_primitives_result_SuccessReason_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + (* + fn from(value: SuccessReason) -> Self { + match value { + SuccessReason::Return => InstructionResult::Return, + SuccessReason::Stop => InstructionResult::Stop, + SuccessReason::SelfDestruct => InstructionResult::SelfDestruct, + } + } + *) + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ value ] => + ltac:(M.monadic + (let value := M.alloc (| value |) in + M.read (| + M.match_operator (| + value, + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Return" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Stop" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::SelfDestruct" + [] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::convert::From" + Self + (* Trait polymorphic types *) [ (* T *) Ty.path "revm_primitives::result::SuccessReason" ] + (* Instance *) [ ("from", InstanceField.Method from) ]. + End Impl_core_convert_From_revm_primitives_result_SuccessReason_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_core_convert_From_revm_primitives_result_HaltReason_for_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + (* + fn from(value: HaltReason) -> Self { + match value { + HaltReason::OutOfGas(error) => match error { + OutOfGasError::Basic => Self::OutOfGas, + OutOfGasError::InvalidOperand => Self::InvalidOperandOOG, + OutOfGasError::Memory => Self::MemoryOOG, + OutOfGasError::MemoryLimit => Self::MemoryLimitOOG, + OutOfGasError::Precompile => Self::PrecompileOOG, + }, + HaltReason::OpcodeNotFound => Self::OpcodeNotFound, + HaltReason::InvalidFEOpcode => Self::InvalidFEOpcode, + HaltReason::InvalidJump => Self::InvalidJump, + HaltReason::NotActivated => Self::NotActivated, + HaltReason::StackOverflow => Self::StackOverflow, + HaltReason::StackUnderflow => Self::StackUnderflow, + HaltReason::OutOfOffset => Self::OutOfOffset, + HaltReason::CreateCollision => Self::CreateCollision, + HaltReason::PrecompileError => Self::PrecompileError, + HaltReason::NonceOverflow => Self::NonceOverflow, + HaltReason::CreateContractSizeLimit => Self::CreateContractSizeLimit, + HaltReason::CreateContractStartingWithEF => Self::CreateContractStartingWithEF, + HaltReason::CreateInitCodeSizeLimit => Self::CreateInitCodeSizeLimit, + HaltReason::OverflowPayment => Self::OverflowPayment, + HaltReason::StateChangeDuringStaticCall => Self::StateChangeDuringStaticCall, + HaltReason::CallNotAllowedInsideStatic => Self::CallNotAllowedInsideStatic, + HaltReason::OutOfFunds => Self::OutOfFunds, + HaltReason::CallTooDeep => Self::CallTooDeep, + #[cfg(feature = "optimism")] + HaltReason::FailedDeposit => Self::FatalExternalError, + } + } + *) + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ value ] => + ltac:(M.monadic + (let value := M.alloc (| value |) in + M.read (| + M.match_operator (| + value, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_primitives::result::HaltReason::OutOfGas", + 0 + |) in + let error := M.copy (| γ0_0 |) in + M.match_operator (| + error, + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryLimitOOG" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::PrecompileOOG" + [] + |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OpcodeNotFound" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidFEOpcode" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidJump" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackOverflow" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfOffset" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CreateCollision" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::PrecompileError" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NonceOverflow" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CreateContractSizeLimit" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CreateContractStartingWithEF" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CreateInitCodeSizeLimit" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OverflowPayment" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallNotAllowedInsideStatic" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfFunds" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallTooDeep" + [] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::convert::From" + Self + (* Trait polymorphic types *) [ (* T *) Ty.path "revm_primitives::result::HaltReason" ] + (* Instance *) [ ("from", InstanceField.Method from) ]. + End Impl_core_convert_From_revm_primitives_result_HaltReason_for_revm_interpreter_instruction_result_InstructionResult. + + Module Impl_revm_interpreter_instruction_result_InstructionResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::InstructionResult". + + (* + pub const fn is_ok(self) -> bool { + matches!(self, crate::return_ok!()) + } + *) + Definition is_ok (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_ok : M.IsAssociatedFunction Self "is_ok" is_ok. + + (* + pub const fn is_revert(self) -> bool { + matches!(self, crate::return_revert!()) + } + *) + Definition is_revert (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_revert : M.IsAssociatedFunction Self "is_revert" is_revert. + + (* + pub const fn is_error(self) -> bool { + matches!(self, return_error!()) + } + *) + Definition is_error (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => M.alloc (| M.of_value (| Value.Bool true |) |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_error : M.IsAssociatedFunction Self "is_error" is_error. + End Impl_revm_interpreter_instruction_result_InstructionResult. + + (* + Enum SuccessOrHalt + { + ty_params := []; + variants := + [ + { + name := "Success"; + item := StructTuple [ Ty.path "revm_primitives::result::SuccessReason" ]; + discriminant := None; + }; + { + name := "Revert"; + item := StructTuple []; + discriminant := None; + }; + { + name := "Halt"; + item := StructTuple [ Ty.path "revm_primitives::result::HaltReason" ]; + discriminant := None; + }; + { + name := "FatalExternalError"; + item := StructTuple []; + discriminant := None; + }; + { + name := "InternalContinue"; + item := StructTuple []; + discriminant := None; + }; + { + name := "InternalCallOrCreate"; + item := StructTuple []; + discriminant := None; + } + ]; + } + *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Success", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_tuple_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Success" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_str", + [] + |), + [ M.read (| f |); M.read (| M.of_value (| Value.String "Revert" |) |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Halt", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_tuple_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Halt" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_str", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "FatalExternalError" |) |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_str", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "InternalContinue" |) |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_str", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "InternalCallOrCreate" |) |) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_instruction_result_SuccessOrHalt. + + Module Impl_core_marker_Copy_for_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_instruction_result_SuccessOrHalt. + + Module Impl_core_clone_Clone_for_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.read (| self |))) ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_instruction_result_SuccessOrHalt. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_instruction_result_SuccessOrHalt. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instruction_result::SuccessOrHalt" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instruction_result::SuccessOrHalt" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| + LogicalOp.and (| + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), + ltac:(M.monadic + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), + [ + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::instruction_result::SuccessOrHalt::Success", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::instruction_result::SuccessOrHalt::Success", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_primitives::result::SuccessReason", + [ Ty.path "revm_primitives::result::SuccessReason" ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::instruction_result::SuccessOrHalt::Halt", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::instruction_result::SuccessOrHalt::Halt", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_primitives::result::HaltReason", + [ Ty.path "revm_primitives::result::HaltReason" ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) + ] + |) + |))) + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_instruction_result_SuccessOrHalt. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_instruction_result_SuccessOrHalt. + + Module Impl_core_cmp_Eq_for_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_instruction_result_SuccessOrHalt. + + Module Impl_core_hash_Hash_for_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instruction_result::SuccessOrHalt" ] + |), + [ M.read (| self |) ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "isize", [], "hash", [ __H ] |), + [ __self_tag; M.read (| state |) ] + |) + |) in + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Success", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "revm_primitives::result::SuccessReason", + [], + "hash", + [ __H ] + |), + [ M.read (| __self_0 |); M.read (| state |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Halt", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "revm_primitives::result::HaltReason", + [], + "hash", + [ __H ] + |), + [ M.read (| __self_0 |); M.read (| state |) ] + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_instruction_result_SuccessOrHalt. + + Module Impl_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + (* + pub fn is_success(self) -> bool { + matches!(self, SuccessOrHalt::Success(_)) + } + *) + Definition is_success (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Success", + 0 + |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_success : M.IsAssociatedFunction Self "is_success" is_success. + + (* + pub fn to_success(self) -> Option { + match self { + SuccessOrHalt::Success(reason) => Some(reason), + _ => None, + } + } + *) + Definition to_success (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Success", + 0 + |) in + let reason := M.copy (| γ0_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| reason |)) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_to_success : M.IsAssociatedFunction Self "to_success" to_success. + + (* + pub fn is_revert(self) -> bool { + matches!(self, SuccessOrHalt::Revert) + } + *) + Definition is_revert (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_revert : M.IsAssociatedFunction Self "is_revert" is_revert. + + (* + pub fn is_halt(self) -> bool { + matches!(self, SuccessOrHalt::Halt(_)) + } + *) + Definition is_halt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Halt", + 0 + |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_halt : M.IsAssociatedFunction Self "is_halt" is_halt. + + (* + pub fn to_halt(self) -> Option { + match self { + SuccessOrHalt::Halt(reason) => Some(reason), + _ => None, + } + } + *) + Definition to_halt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Halt", + 0 + |) in + let reason := M.copy (| γ0_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| reason |)) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_to_halt : M.IsAssociatedFunction Self "to_halt" to_halt. + End Impl_revm_interpreter_instruction_result_SuccessOrHalt. + + Module Impl_core_convert_From_revm_interpreter_instruction_result_InstructionResult_for_revm_interpreter_instruction_result_SuccessOrHalt. + Definition Self : Ty.t := Ty.path "revm_interpreter::instruction_result::SuccessOrHalt". + + (* + fn from(result: InstructionResult) -> Self { + match result { + InstructionResult::Continue => Self::InternalContinue, // used only in interpreter loop + InstructionResult::Stop => Self::Success(SuccessReason::Stop), + InstructionResult::Return => Self::Success(SuccessReason::Return), + InstructionResult::SelfDestruct => Self::Success(SuccessReason::SelfDestruct), + InstructionResult::Revert => Self::Revert, + InstructionResult::CallOrCreate => Self::InternalCallOrCreate, // used only in interpreter loop + InstructionResult::CallTooDeep => Self::Halt(HaltReason::CallTooDeep), // not gonna happen for first call + InstructionResult::OutOfFunds => Self::Halt(HaltReason::OutOfFunds), // Check for first call is done separately. + InstructionResult::OutOfGas => Self::Halt(HaltReason::OutOfGas(OutOfGasError::Basic)), + InstructionResult::MemoryLimitOOG => { + Self::Halt(HaltReason::OutOfGas(OutOfGasError::MemoryLimit)) + } + InstructionResult::MemoryOOG => Self::Halt(HaltReason::OutOfGas(OutOfGasError::Memory)), + InstructionResult::PrecompileOOG => { + Self::Halt(HaltReason::OutOfGas(OutOfGasError::Precompile)) + } + InstructionResult::InvalidOperandOOG => { + Self::Halt(HaltReason::OutOfGas(OutOfGasError::InvalidOperand)) + } + InstructionResult::OpcodeNotFound | InstructionResult::ReturnContractInNotInitEOF => { + Self::Halt(HaltReason::OpcodeNotFound) + } + InstructionResult::CallNotAllowedInsideStatic => { + Self::Halt(HaltReason::CallNotAllowedInsideStatic) + } // first call is not static call + InstructionResult::StateChangeDuringStaticCall => { + Self::Halt(HaltReason::StateChangeDuringStaticCall) + } + InstructionResult::InvalidFEOpcode => Self::Halt(HaltReason::InvalidFEOpcode), + InstructionResult::InvalidJump => Self::Halt(HaltReason::InvalidJump), + InstructionResult::NotActivated => Self::Halt(HaltReason::NotActivated), + InstructionResult::StackUnderflow => Self::Halt(HaltReason::StackUnderflow), + InstructionResult::StackOverflow => Self::Halt(HaltReason::StackOverflow), + InstructionResult::OutOfOffset => Self::Halt(HaltReason::OutOfOffset), + InstructionResult::CreateCollision => Self::Halt(HaltReason::CreateCollision), + InstructionResult::OverflowPayment => Self::Halt(HaltReason::OverflowPayment), // Check for first call is done separately. + InstructionResult::PrecompileError => Self::Halt(HaltReason::PrecompileError), + InstructionResult::NonceOverflow => Self::Halt(HaltReason::NonceOverflow), + InstructionResult::CreateContractSizeLimit + | InstructionResult::CreateContractStartingWithEF => { + Self::Halt(HaltReason::CreateContractSizeLimit) + } + InstructionResult::CreateInitCodeSizeLimit => { + Self::Halt(HaltReason::CreateInitCodeSizeLimit) + } + InstructionResult::FatalExternalError => Self::FatalExternalError, + InstructionResult::EOFOpcodeDisabledInLegacy => Self::Halt(HaltReason::OpcodeNotFound), + InstructionResult::EOFFunctionStackOverflow => Self::FatalExternalError, + InstructionResult::ReturnContract => { + panic!("Unexpected EOF internal Return Contract") + } + } + } + *) + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ result ] => + ltac:(M.monadic + (let result := M.alloc (| result |) in + M.read (| + M.match_operator (| + result, + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::InternalContinue" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Success" + [ + A.to_value + (M.of_value (| + Value.StructTuple "revm_primitives::result::SuccessReason::Stop" [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Success" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::SuccessReason::Return" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Success" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::SuccessReason::SelfDestruct" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Revert" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::InternalCallOrCreate" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::CallTooDeep" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OutOfFunds" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OutOfGas" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::OutOfGasError::Basic" + [] + |)) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OutOfGas" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::OutOfGasError::MemoryLimit" + [] + |)) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OutOfGas" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::OutOfGasError::Memory" + [] + |)) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OutOfGas" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::OutOfGasError::Precompile" + [] + |)) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OutOfGas" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::OutOfGasError::InvalidOperand" + [] + |)) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OpcodeNotFound" + [] + |)) + ] + |) + |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::CallNotAllowedInsideStatic" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::StateChangeDuringStaticCall" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::InvalidFEOpcode" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::InvalidJump" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::NotActivated" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::StackUnderflow" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::StackOverflow" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OutOfOffset" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::CreateCollision" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OverflowPayment" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::PrecompileError" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::NonceOverflow" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::CreateContractSizeLimit" + [] + |)) + ] + |) + |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::CreateInitCodeSizeLimit" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::FatalExternalError" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::Halt" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::result::HaltReason::OpcodeNotFound" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::SuccessOrHalt::FatalExternalError" + [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Unexpected EOF internal Return Contract" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::convert::From" + Self + (* Trait polymorphic types *) + [ (* T *) Ty.path "revm_interpreter::instruction_result::InstructionResult" ] + (* Instance *) [ ("from", InstanceField.Method from) ]. + End Impl_core_convert_From_revm_interpreter_instruction_result_InstructionResult_for_revm_interpreter_instruction_result_SuccessOrHalt. +End instruction_result. diff --git a/CoqOfRust/revm/instructions/arithmetic.v b/CoqOfRust/revm/instructions/arithmetic.v new file mode 100644 index 000000000..8db54bfca --- /dev/null +++ b/CoqOfRust/revm/instructions/arithmetic.v @@ -0,0 +1,2104 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module arithmetic. + (* + pub fn add(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = op1.wrapping_add( *op2); + } + *) + Definition add (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_add", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn mul(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::LOW); + pop_top!(interpreter, op1, op2); + *op2 = op1.wrapping_mul( *op2); + } + *) + Definition mul (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOW" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_mul", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn sub(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = op1.wrapping_sub( *op2); + } + *) + Definition sub (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_sub", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn div(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::LOW); + pop_top!(interpreter, op1, op2); + if *op2 != U256::ZERO { + *op2 = op1.wrapping_div( *op2); + } + } + *) + Definition div (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOW" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ M.read (| op2 |); M.get_constant (| "ruint::ZERO" |) ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_div", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn sdiv(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::LOW); + pop_top!(interpreter, op1, op2); + *op2 = i256_div(op1, *op2); + } + *) + Definition sdiv (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOW" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::i256_div", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn rem(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::LOW); + pop_top!(interpreter, op1, op2); + if *op2 != U256::ZERO { + *op2 = op1.wrapping_rem( *op2); + } + } + *) + Definition rem (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOW" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ M.read (| op2 |); M.get_constant (| "ruint::ZERO" |) ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_rem", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn smod(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::LOW); + pop_top!(interpreter, op1, op2); + *op2 = i256_mod(op1, *op2) + } + *) + Definition smod (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOW" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::i256_mod", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn addmod(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::MID); + pop_top!(interpreter, op1, op2, op3); + *op3 = op1.add_mod(op2, *op3) + } + *) + Definition addmod (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::MID" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 3 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let op3 := M.copy (| γ0_2 |) in + M.write (| + M.read (| op3 |), + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "add_mod", [] |), + [ M.read (| op1 |); M.read (| op2 |); M.read (| M.read (| op3 |) |) ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn mulmod(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::MID); + pop_top!(interpreter, op1, op2, op3); + *op3 = op1.mul_mod(op2, *op3) + } + *) + Definition mulmod (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::MID" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 3 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let op3 := M.copy (| γ0_2 |) in + M.write (| + M.read (| op3 |), + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "mul_mod", [] |), + [ M.read (| op1 |); M.read (| op2 |); M.read (| M.read (| op3 |) |) ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn exp(interpreter: &mut Interpreter, _host: &mut H) { + pop_top!(interpreter, op1, op2); + gas_or_fail!(interpreter, gas::exp_cost(SPEC::SPEC_ID, *op2)); + *op2 = op1.pow( *op2); + } + *) + Definition exp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::exp_cost", [] |), + [ + M.read (| + M.get_constant (| + "revm_primitives::specification::Spec::SPEC_ID" + |) + |); + M.read (| M.read (| op2 |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "pow", [] |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn signextend(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::LOW); + pop_top!(interpreter, ext, x); + // For 31 we also don't need to do anything. + if ext < U256::from(31) { + let ext = ext.as_limbs()[0]; + let bit_index = (8 * ext + 7) as usize; + let bit = x.bit(bit_index); + let mask = (U256::from(1) << bit_index) - U256::from(1); + *x = if bit { *x | !mask } else { *x & mask }; + } + } + *) + Definition signextend (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOW" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 ext := M.copy (| γ0_0 |) in + let x := M.copy (| γ0_1 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "lt", + [] + |), + [ + ext; + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "i32" ] + |), + [ M.of_value (| Value.Integer 31 |) ] + |) + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let ext := + M.copy (| + M.SubPointer.get_array_field (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ ext ] + |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) in + let bit_index := + M.alloc (| + M.rust_cast (| + BinOp.Panic.add (| + Integer.U64, + BinOp.Panic.mul (| + Integer.U64, + M.of_value (| Value.Integer 8 |), + M.read (| ext |) + |), + M.of_value (| Value.Integer 7 |) + |) + |) + |) in + let bit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "bit", + [] + |), + [ M.read (| x |); M.read (| bit_index |) ] + |) + |) in + let mask := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Sub", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "sub", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::Shl", + Ty.path "ruint::Uint", + [ Ty.path "usize" ], + "shl", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "i32" ] + |), + [ M.of_value (| Value.Integer 1 |) ] + |); + M.read (| bit_index |) + ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "i32" ] + |), + [ M.of_value (| Value.Integer 1 |) ] + |) + ] + |) + |) in + let _ := + M.write (| + M.read (| x |), + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use bit in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::BitOr", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "bitor", + [] + |), + [ + M.read (| M.read (| x |) |); + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::Not", + Ty.path "ruint::Uint", + [], + "not", + [] + |), + [ M.read (| mask |) ] + |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::BitAnd", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "bitand", + [] + |), + [ M.read (| M.read (| x |) |); M.read (| mask |) ] + |) + |))) + ] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + End arithmetic. +End instructions. diff --git a/CoqOfRust/revm/instructions/bitwise.v b/CoqOfRust/revm/instructions/bitwise.v new file mode 100644 index 000000000..4aef504d5 --- /dev/null +++ b/CoqOfRust/revm/instructions/bitwise.v @@ -0,0 +1,3223 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module bitwise. + (* + pub fn lt(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = U256::from(op1 < *op2); + } + *) + Definition lt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "bool" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "lt", + [] + |), + [ op1; M.read (| op2 |) ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn gt(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = U256::from(op1 > *op2); + } + *) + Definition gt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "bool" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "gt", + [] + |), + [ op1; M.read (| op2 |) ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn slt(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = U256::from(i256_cmp(&op1, op2) == Ordering::Less); + } + *) + Definition slt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "bool" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "core::cmp::Ordering", + [ Ty.path "core::cmp::Ordering" ], + "eq", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::i256_cmp", + [] + |), + [ op1; M.read (| op2 |) ] + |) + |); + M.alloc (| + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Less" [] + |) + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn sgt(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = U256::from(i256_cmp(&op1, op2) == Ordering::Greater); + } + *) + Definition sgt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "bool" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "core::cmp::Ordering", + [ Ty.path "core::cmp::Ordering" ], + "eq", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::i256_cmp", + [] + |), + [ op1; M.read (| op2 |) ] + |) + |); + M.alloc (| + M.of_value (| + Value.StructTuple "core::cmp::Ordering::Greater" [] + |) + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn eq(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = U256::from(op1 == *op2); + } + *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "bool" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ op1; M.read (| op2 |) ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn iszero(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1); + *op1 = U256::from( *op1 == U256::ZERO); + } + *) + Definition iszero (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let op1 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let _ := + M.write (| + M.read (| op1 |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "bool" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ M.read (| op1 |); M.get_constant (| "ruint::ZERO" |) ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn bitand(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = op1 & *op2; + } + *) + Definition bitand (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::BitAnd", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "bitand", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn bitor(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = op1 | *op2; + } + *) + Definition bitor (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::BitOr", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "bitor", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn bitxor(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 = op1 ^ *op2; + } + *) + Definition bitxor (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.write (| + M.read (| op2 |), + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::BitXor", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "bitxor", + [] + |), + [ M.read (| op1 |); M.read (| M.read (| op2 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn not(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1); + *op1 = !*op1; + } + *) + Definition not (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let op1 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let _ := + M.write (| + M.read (| op1 |), + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::Not", + Ty.path "ruint::Uint", + [], + "not", + [] + |), + [ M.read (| M.read (| op1 |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn byte(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + + let o1 = as_usize_saturated!(op1); + *op2 = if o1 < 32 { + // `31 - o1` because `byte` returns LE, while we want BE + U256::from(op2.byte(31 - o1)) + } else { + U256::ZERO + }; + } + *) + Definition byte (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let o1 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ op1 ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => + ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + let _ := + M.write (| + M.read (| op2 |), + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| o1 |), + M.of_value (| Value.Integer 32 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "u8" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "byte", + [] + |), + [ + M.read (| op2 |); + BinOp.Panic.sub (| + Integer.Usize, + M.of_value (| Value.Integer 31 |), + M.read (| o1 |) + |) + ] + |) + ] + |) + |))); + fun γ => ltac:(M.monadic (M.get_constant (| "ruint::ZERO" |))) + ] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn shl(interpreter: &mut Interpreter, _host: &mut H) { + check!(interpreter, CONSTANTINOPLE); + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 <<= as_usize_saturated!(op1); + } + *) + Definition shl (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::CONSTANTINOPLE" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::ShlAssign", + Ty.path "ruint::Uint", + [ Ty.path "usize" ], + "shl_assign", + [] + |), + [ + M.read (| op2 |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" + ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ op1 ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| + Value.Integer 2 + |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => + ltac:(M.monadic + (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn shr(interpreter: &mut Interpreter, _host: &mut H) { + check!(interpreter, CONSTANTINOPLE); + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + *op2 >>= as_usize_saturated!(op1); + } + *) + Definition shr (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::CONSTANTINOPLE" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::bit::ShrAssign", + Ty.path "ruint::Uint", + [ Ty.path "usize" ], + "shr_assign", + [] + |), + [ + M.read (| op2 |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" + ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ op1 ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| + Value.Integer 2 + |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => + ltac:(M.monadic + (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn sar(interpreter: &mut Interpreter, _host: &mut H) { + check!(interpreter, CONSTANTINOPLE); + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, op1, op2); + + let value_sign = i256_sign_compl(op2); + + // If the shift count is 255+, we can short-circuit. This is because shifting by 255 bits is the + // maximum shift that still leaves 1 bit in the original 256-bit number. Shifting by 256 bits or + // more would mean that no original bits remain. The result depends on what the highest bit of + // the value is. + *op2 = if value_sign == Sign::Zero || op1 >= U256::from(255) { + match value_sign { + // value is 0 or >=1, pushing 0 + Sign::Plus | Sign::Zero => U256::ZERO, + // value is <0, pushing -1 + Sign::Minus => U256::MAX, + } + } else { + const ONE: U256 = uint!(1_U256); + // SAFETY: shift count is checked above; it's less than 255. + let shift = usize::try_from(op1).unwrap(); + match value_sign { + Sign::Plus | Sign::Zero => op2.wrapping_shr(shift), + Sign::Minus => two_compl(op2.wrapping_sub(ONE).wrapping_shr(shift).wrapping_add(ONE)), + } + }; + } + *) + Definition sar (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::CONSTANTINOPLE" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 op1 := M.copy (| γ0_0 |) in + let op2 := M.copy (| γ0_1 |) in + let value_sign := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::i256_sign_compl", + [] + |), + [ M.read (| op2 |) ] + |) + |) in + let _ := + M.write (| + M.read (| op2 |), + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path + "revm_interpreter::instructions::i256::Sign", + [ + Ty.path + "revm_interpreter::instructions::i256::Sign" + ], + "eq", + [] + |), + [ + value_sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Zero" + [] + |) + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ge", + [] + |), + [ + op1; + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "i32" ] + |), + [ M.of_value (| Value.Integer 255 |) ] + |) + |) + ] + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + value_sign, + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => M.get_constant (| "ruint::ZERO" |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic (M.get_constant (| "ruint::MAX" |))) + ] + |))); + fun γ => + ltac:(M.monadic + (let shift := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "usize"; + Ty.apply + (Ty.path "ruint::from::FromUintError") + [ Ty.path "usize" ] + ], + "unwrap", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "ruint::Uint" ], + "try_from", + [] + |), + [ M.read (| op1 |) ] + |) + ] + |) + |) in + M.match_operator (| + value_sign, + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_shr", + [] + |), + [ + M.read (| M.read (| op2 |) |); + M.read (| shift |) + ] + |) + |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::two_compl", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_shr", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_sub", + [] + |), + [ + M.read (| M.read (| op2 |) |); + M.read (| + M.get_constant (| + "revm_interpreter::instructions::bitwise::sar::ONE" + |) + |) + ] + |); + M.read (| shift |) + ] + |); + M.read (| + M.get_constant (| + "revm_interpreter::instructions::bitwise::sar::ONE" + |) + |) + ] + |) + ] + |) + |))) + ] + |))) + ] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + Module sar. + Definition value_ONE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "from_limbs", [] |), + [ + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |) + ] + |) + |))). + End sar. + End bitwise. +End instructions. diff --git a/CoqOfRust/revm/instructions/contract.v b/CoqOfRust/revm/instructions/contract.v new file mode 100644 index 000000000..c3b27e193 --- /dev/null +++ b/CoqOfRust/revm/instructions/contract.v @@ -0,0 +1,9034 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module contract. + (* + pub fn resize_memory( + interpreter: &mut Interpreter, + offset: U256, + len: U256, + ) -> Option> { + let len = as_usize_or_fail_ret!(interpreter, len, None); + if len != 0 { + let offset = as_usize_or_fail_ret!(interpreter, offset, None); + resize_memory!(interpreter, offset, len, None); + // range is checked in resize_memory! macro and it is bounded by usize. + Some(offset..offset + len) + } else { + //unrealistic value so we are sure it is not used + Some(usize::MAX..usize::MAX) + } + } + *) + Definition resize_memory (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ interpreter; offset; len ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let offset := M.alloc (| offset |) in + let len := M.alloc (| len |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let len := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), + [ len ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 2 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| M.read (| len |), M.of_value (| Value.Integer 0 |) |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| offset |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| offset |), + M.read (| len |) + |))) + ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| M.get_constant (| "core::num::MAX" |) |))); + ("end_", + A.to_value + (M.read (| M.get_constant (| "core::num::MAX" |) |))) + ] + |)) + ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn eofcreate(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, EOF_CREATE_GAS); + let initcontainer_index = unsafe { *interpreter.instruction_pointer }; + pop!(interpreter, value, salt, data_offset, data_size); + + let sub_container = interpreter + .eof() + .expect("EOF is set") + .body + .container_section + .get(initcontainer_index as usize) + .cloned() + .expect("EOF is checked"); + + // resize memory and get return range. + let Some(return_range) = resize_memory(interpreter, data_offset, data_size) else { + return; + }; + + let eof = Eof::decode(sub_container.clone()).expect("Subcontainer is verified"); + + if !eof.body.is_data_filled { + // should be always false as it is verified by eof verification. + panic!("Panic if data section is not full"); + } + + // deduct gas for hash that is needed to calculate address. + gas_or_fail!( + interpreter, + cost_per_word(sub_container.len() as u64, KECCAK256WORD) + ); + + let created_address = interpreter + .contract + .caller + .create2(salt.to_be_bytes(), keccak256(sub_container)); + + // Send container for execution container is preverified. + interpreter.next_action = InterpreterAction::EOFCreate { + inputs: Box::new(EOFCreateInput::new( + interpreter.contract.target_address, + created_address, + value, + eof, + interpreter.gas().remaining(), + return_range, + )), + }; + + interpreter.instruction_pointer = unsafe { interpreter.instruction_pointer.offset(1) }; + } + *) + Definition eofcreate (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::EOF_CREATE_GAS" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let initcontainer_index := + M.copy (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 4 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop4_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in + let value := M.copy (| γ0_0 |) in + 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 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::bytes_::Bytes" ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "alloy_primitives::bytes_::Bytes" ] + ], + "cloned", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "alloy_primitives::bytes_::Bytes" ], + "get", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "alloc::alloc::Global" + ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ + Ty.path + "revm_primitives::bytecode::eof::Eof" + ] + ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::Interpreter", + "eof", + [] + |), + [ M.read (| interpreter |) ] + |); + M.read (| + M.of_value (| Value.String "EOF is set" |) + |) + ] + |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "container_section" + |) + ] + |); + M.rust_cast (| M.read (| initcontainer_index |) |) + ] + |) + ] + |); + M.read (| M.of_value (| Value.String "EOF is checked" |) |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::resize_memory", + [] + |), + [ + M.read (| interpreter |); + M.read (| data_offset |); + M.read (| data_size |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let return_range := M.copy (| γ0_0 |) in + let eof := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "revm_primitives::bytecode::eof::Eof"; + Ty.path "revm_primitives::bytecode::eof::EofDecodeError" + ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::eof::Eof", + "decode", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ sub_container ] + |) + ] + |); + M.read (| + M.of_value (| Value.String "Subcontainer is verified" |) + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + eof, + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "is_data_filled" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::panicking::panic_fmt", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Panic if data section is not full" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::cost_per_word", + [] + |), + [ + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ sub_container ] + |) + ] + |) + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::KECCAK256WORD" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let created_address := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "create2", + [ + Ty.apply (Ty.path "array") [ Ty.path "u8" ]; + Ty.path "alloy_primitives::bits::fixed::FixedBytes" + ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "caller" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "to_be_bytes", + [] + |), + [ salt ] + |); + M.call_closure (| + M.get_function (| + "alloy_primitives::utils::keccak256", + [ Ty.path "alloy_primitives::bytes_::Bytes" ] + |), + [ M.read (| sub_container |) ] + |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::EOFCreate" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "new", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |); + M.read (| created_address |); + M.read (| value |); + M.read (| eof |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::Interpreter", + "gas", + [] + |), + [ M.read (| interpreter |) ] + |) + ] + |); + M.read (| return_range |) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn txcreate(interpreter: &mut Interpreter, host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, EOF_CREATE_GAS); + pop!( + interpreter, + tx_initcode_hash, + value, + salt, + data_offset, + data_size + ); + let tx_initcode_hash = B256::from(tx_initcode_hash); + + // resize memory and get return range. + let Some(return_range) = resize_memory(interpreter, data_offset, data_size) else { + return; + }; + + // fetch initcode, if not found push ZERO. + let Some(initcode) = host + .env() + .tx + .eof_initcodes_hashed + .get(&tx_initcode_hash) + .cloned() + else { + push!(interpreter, U256::ZERO); + return; + }; + + // deduct gas for validation + gas_or_fail!(interpreter, cost_per_word(initcode.len() as u64, BASE)); + + // deduct gas for hash. TODO check order of actions. + gas_or_fail!( + interpreter, + cost_per_word(initcode.len() as u64, KECCAK256WORD) + ); + + let Ok(eof) = Eof::decode(initcode.clone()) else { + push!(interpreter, U256::ZERO); + return; + }; + + // Data section should be full, push zero to stack and return if not. + if !eof.body.is_data_filled { + push!(interpreter, U256::ZERO); + return; + } + + // Validate initcode + if validate_eof(&eof).is_err() { + push!(interpreter, U256::ZERO); + return; + } + + // Create new address. Gas for it is already deducted. + let created_address = interpreter + .contract + .caller + .create2(salt.to_be_bytes(), tx_initcode_hash); + + let gas_limit = interpreter.gas().remaining(); + // spend all gas. It will be reimbursed after frame returns. + gas!(interpreter, gas_limit); + + interpreter.next_action = InterpreterAction::EOFCreate { + inputs: Box::new(EOFCreateInput::new( + interpreter.contract.target_address, + created_address, + value, + eof, + gas_limit, + return_range, + )), + }; + interpreter.instruction_result = InstructionResult::CallOrCreate; + } + *) + Definition txcreate (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::EOF_CREATE_GAS" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 4 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop5_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in + let γ0_4 := M.SubPointer.get_tuple_field (| γ, 4 |) in + let tx_initcode_hash := M.copy (| γ0_0 |) in + let value := M.copy (| γ0_1 |) in + 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 := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ M.read (| tx_initcode_hash |) ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::resize_memory", + [] + |), + [ + M.read (| interpreter |); + M.read (| data_offset |); + M.read (| data_size |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let return_range := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "alloy_primitives::bytes_::Bytes" ] + ], + "cloned", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::map::HashMap") + [ + Ty.path "alloy_primitives::bits::fixed::FixedBytes"; + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "std::hash::random::RandomState" + ], + "get", + [ Ty.path "alloy_primitives::bits::fixed::FixedBytes" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "tx" + |), + "revm_primitives::env::TxEnv", + "eof_initcodes_hashed" + |); + tx_initcode_hash + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let initcode := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::cost_per_word", + [] + |), + [ + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path + "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ initcode ] + |) + ] + |) + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::cost_per_word", + [] + |), + [ + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path + "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ initcode ] + |) + ] + |) + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::KECCAK256WORD" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::eof::Eof", + "decode", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ initcode ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let eof := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + eof, + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "is_data_filled" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| + interpreter + |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.get_constant (| + "ruint::ZERO" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := + M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| + interpreter + |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| + M.of_value (| + Value.Tuple [] + |) + |) + |) + |) + |))) + ] + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.tuple []; + Ty.path + "revm_interpreter::interpreter::analysis::EofError" + ], + "is_err", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::analysis::validate_eof", + [] + |), + [ eof ] + |) + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| + interpreter + |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.get_constant (| + "ruint::ZERO" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := + M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| + interpreter + |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| + M.of_value (| + Value.Tuple [] + |) + |) + |) + |) + |))) + ] + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + let created_address := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "alloy_primitives::bits::address::Address", + "create2", + [ + Ty.apply + (Ty.path "array") + [ Ty.path "u8" ]; + Ty.path + "alloy_primitives::bits::fixed::FixedBytes" + ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "caller" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "to_be_bytes", + [] + |), + [ salt ] + |); + M.read (| tx_initcode_hash |) + ] + |) + |) in + let gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::Interpreter", + "gas", + [] + |), + [ M.read (| interpreter |) ] + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_limit |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::EOFCreate" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "new", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| + interpreter + |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |); + M.read (| created_address |); + M.read (| value |); + M.read (| eof |); + M.read (| gas_limit |); + M.read (| return_range |) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn return_contract(interpreter: &mut Interpreter, _host: &mut H) { + require_init_eof!(interpreter); + let deploy_container_index = unsafe { read_u16(interpreter.instruction_pointer) }; + pop!(interpreter, aux_data_offset, aux_data_size); + let aux_data_size = as_usize_or_fail!(interpreter, aux_data_size); + // important: offset must be ignored if len is zeros + let container = interpreter + .eof() + .expect("EOF is set") + .body + .container_section + .get(deploy_container_index as usize) + .expect("EOF is checked"); + + // convert to EOF so we can check data section size. + let new_eof = Eof::decode(container.clone()).expect("Container is verified"); + + let aux_slice = if aux_data_size != 0 { + let aux_data_offset = as_usize_or_fail!(interpreter, aux_data_offset); + resize_memory!(interpreter, aux_data_offset, aux_data_size); + + interpreter + .shared_memory + .slice(aux_data_offset, aux_data_size) + } else { + &[] + }; + + let new_data_size = new_eof.body.data_section.len() + aux_slice.len(); + if new_data_size > 0xFFFF { + // aux data is too big + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + } + if new_data_size < new_eof.header.data_size as usize { + // aux data is too small + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + } + + // append data bytes + let output = [new_eof.raw(), aux_slice].concat().into(); + + let result = InstructionResult::ReturnContract; + interpreter.instruction_result = result; + interpreter.next_action = crate::InterpreterAction::Return { + result: InterpreterResult { + output, + gas: interpreter.gas, + result, + }, + }; + } + *) + Definition return_contract (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof_init" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::ReturnContractInNotInitEOF" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let deploy_container_index := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::instructions::utility::read_u16", [] |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 aux_data_offset := M.copy (| γ0_0 |) in + let aux_data_size := M.copy (| γ0_1 |) in + let aux_data_size := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ aux_data_size ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let container := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "alloy_primitives::bytes_::Bytes" ] + ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "alloy_primitives::bytes_::Bytes" ], + "get", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "alloc::alloc::Global" + ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ + Ty.path + "revm_primitives::bytecode::eof::Eof" + ] + ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::Interpreter", + "eof", + [] + |), + [ M.read (| interpreter |) ] + |); + M.read (| + M.of_value (| Value.String "EOF is set" |) + |) + ] + |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "container_section" + |) + ] + |); + M.rust_cast (| M.read (| deploy_container_index |) |) + ] + |); + M.read (| M.of_value (| Value.String "EOF is checked" |) |) + ] + |) + |) in + let new_eof := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "revm_primitives::bytecode::eof::Eof"; + Ty.path "revm_primitives::bytecode::eof::EofDecodeError" + ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::eof::Eof", + "decode", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ M.read (| container |) ] + |) + ] + |); + M.read (| M.of_value (| Value.String "Container is verified" |) |) + ] + |) + |) in + let aux_slice := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.read (| aux_data_size |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let aux_data_offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ aux_data_offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| + Value.Integer 2 + |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let new_size := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_add", + [] + |), + [ M.read (| aux_data_offset |); M.read (| aux_data_size |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| aux_data_offset |); + M.read (| aux_data_size |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.alloc (| M.of_value (| Value.Array [] |) |) + |) + |))) + ] + |) + |) in + let new_data_size := + M.alloc (| + BinOp.Panic.add (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + new_eof, + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "data_section" + |) + ] + |) + ] + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| aux_slice |) ] + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_data_size |), + M.of_value (| Value.Integer 65535 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::FatalExternalError" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| new_data_size |), + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + new_eof, + "revm_primitives::bytecode::eof::Eof", + "header" + |), + "revm_primitives::bytecode::eof::header::EofHeader", + "data_size" + |) + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::FatalExternalError" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let output := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [ Ty.path "alloy_primitives::bytes_::Bytes" ], + "into", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ] + ], + "concat", + [ Ty.path "u8" ] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_primitives::bytecode::eof::Eof", + "raw", + [] + |), + [ new_eof ] + |) + ] + |) + ] + |)); + A.to_value (M.read (| aux_slice |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) in + let result := + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::ReturnContract" + [] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| result |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Return" + [ + ("result", + A.to_value + (M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::InterpreterResult" + [ + ("output", A.to_value (M.read (| output |))); + ("gas", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |) + |))); + ("result", A.to_value (M.read (| result |))) + ] + |))) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn extcall_input(interpreter: &mut Interpreter) -> Option { + pop_ret!(interpreter, input_offset, input_size, None); + + let return_memory_offset = + resize_memory_and_return_range(interpreter, input_offset, input_size)?; + + Some(Bytes::copy_from_slice( + interpreter + .shared_memory + .slice_range(return_memory_offset.clone()), + )) + } + *) + Definition extcall_input (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ interpreter ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 input_offset := M.copy (| γ0_0 |) in + let input_size := M.copy (| γ0_1 |) in + let return_memory_offset := + M.copy (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::resize_memory_and_return_range", + [] + |), + [ + M.read (| interpreter |); + M.read (| input_offset |); + M.read (| input_size |) + ] + |) + ] + |) + |), + [ + 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::option::Option") + [ Ty.path "alloy_primitives::bytes_::Bytes" ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "core::convert::Infallible" ] + ], + "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 + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "copy_from_slice", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice_range", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [], + "clone", + [] + |), + [ return_memory_offset ] + |) + ] + |) + ] + |)) + ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn extcall_gas_calc( + interpreter: &mut Interpreter, + host: &mut H, + target: Address, + transfers_value: bool, + ) -> Option { + let Some(load_result) = host.load_account(target) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return None; + }; + + if load_result.is_cold { + gas!(interpreter, gas::COLD_ACCOUNT_ACCESS_COST, None); + } + + // TODO(EOF) is_empty should only be checked on delegatecall + let call_cost = gas::call_cost( + BerlinSpec::SPEC_ID, + transfers_value, + load_result.is_cold, + load_result.is_empty, + ); + gas!(interpreter, call_cost, None); + + // 7. Calculate the gas available to callee as caller’s + // remaining gas reduced by max(ceil(gas/64), MIN_RETAINED_GAS) (MIN_RETAINED_GAS is 5000). + let gas_reduce = max(interpreter.gas.remaining() / 64, 5000); + let gas_limit = interpreter.gas().remaining().saturating_sub(gas_reduce); + + if gas_limit < 2300 { + interpreter.instruction_result = InstructionResult::CallNotAllowedInsideStatic; + // TODO(EOF) error; + // interpreter.instruction_result = InstructionResult::CallGasTooLow; + return None; + } + + // TODO check remaining gas more then N + + gas!(interpreter, gas_limit, None); + Some(gas_limit) + } + *) + Definition extcall_gas_calc (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host; target; transfers_value ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + let target := M.alloc (| target |) in + let transfers_value := M.alloc (| transfers_value |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "load_account", + [] + |), + [ M.read (| host |); M.read (| target |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let load_result := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.SubPointer.get_struct_record_field (| + load_result, + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::COLD_ACCOUNT_ACCESS_COST" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let call_cost := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::call_cost", [] |), + [ + M.read (| + M.get_constant (| + "revm_primitives::specification::Spec::SPEC_ID" + |) + |); + M.read (| transfers_value |); + M.read (| + M.SubPointer.get_struct_record_field (| + load_result, + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |) + |); + M.read (| + M.SubPointer.get_struct_record_field (| + load_result, + "revm_interpreter::host::LoadAccountResult", + "is_empty" + |) + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| call_cost |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + 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 (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |) + ] + |), + M.of_value (| Value.Integer 64 |) + |); + M.of_value (| Value.Integer 5000 |) + ] + |) + |) in + let gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_sub", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "gas", + [] + |), + [ M.read (| interpreter |) ] + |) + ] + |); + M.read (| gas_reduce |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| gas_limit |), + M.of_value (| Value.Integer 2300 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallNotAllowedInsideStatic" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_limit |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| gas_limit |)) ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn extcall(interpreter: &mut Interpreter, host: &mut H) { + require_eof!(interpreter); + pop_address!(interpreter, target_address); + + // input call + let Some(input) = extcall_input(interpreter) else { + return; + }; + + pop!(interpreter, value); + let has_transfer = value != U256::ZERO; + + let Some(gas_limit) = extcall_gas_calc(interpreter, host, target_address, has_transfer) else { + return; + }; + // TODO Check if static and value 0 + + // Call host to interact with target contract + interpreter.next_action = InterpreterAction::Call { + inputs: Box::new(CallInputs { + input, + gas_limit, + target_address, + caller: interpreter.contract.target_address, + bytecode_address: target_address, + value: CallValue::Transfer(value), + scheme: CallScheme::Call, + is_static: interpreter.is_static, + is_eof: true, + return_memory_offset: 0..0, + }), + }; + interpreter.instruction_result = InstructionResult::CallOrCreate; + } + *) + Definition extcall (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let target_address := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::extcall_input", + [] + |), + [ M.read (| interpreter |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let input := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let value := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let has_transfer := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ value; M.get_constant (| "ruint::ZERO" |) ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::extcall_gas_calc", + [ H ] + |), + [ + M.read (| interpreter |); + M.read (| host |); + M.read (| target_address |); + M.read (| has_transfer |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_limit := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Call" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_inputs::CallInputs" + [ + ("input", A.to_value (M.read (| input |))); + ("gas_limit", + A.to_value (M.read (| gas_limit |))); + ("target_address", + A.to_value (M.read (| target_address |))); + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("bytecode_address", + A.to_value (M.read (| target_address |))); + ("value", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer" + [ A.to_value (M.read (| value |)) ] + |))); + ("scheme", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallScheme::Call" + [] + |))); + ("is_static", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |) + |))); + ("is_eof", + A.to_value + (M.of_value (| Value.Bool true |))); + ("return_memory_offset", + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value + (M.of_value (| + Value.Integer 0 + |))) + ] + |))) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn extdcall(interpreter: &mut Interpreter, host: &mut H) { + require_eof!(interpreter); + pop_address!(interpreter, target_address); + + // input call + let Some(input) = extcall_input(interpreter) else { + return; + }; + + let Some(gas_limit) = extcall_gas_calc(interpreter, host, target_address, false) else { + return; + }; + // TODO Check if static and value 0 + + // Call host to interact with target contract + interpreter.next_action = InterpreterAction::Call { + inputs: Box::new(CallInputs { + input, + gas_limit, + target_address, + caller: interpreter.contract.target_address, + bytecode_address: target_address, + value: CallValue::Apparent(interpreter.contract.call_value), + // TODO(EOF) should be EofDelegateCall? + scheme: CallScheme::DelegateCall, + is_static: interpreter.is_static, + is_eof: true, + return_memory_offset: 0..0, + }), + }; + interpreter.instruction_result = InstructionResult::CallOrCreate; + } + *) + Definition extdcall (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let target_address := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::extcall_input", + [] + |), + [ M.read (| interpreter |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let input := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::extcall_gas_calc", + [ H ] + |), + [ + M.read (| interpreter |); + M.read (| host |); + M.read (| target_address |); + M.of_value (| Value.Bool false |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_limit := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Call" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_inputs::CallInputs" + [ + ("input", A.to_value (M.read (| input |))); + ("gas_limit", + A.to_value (M.read (| gas_limit |))); + ("target_address", + A.to_value (M.read (| target_address |))); + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("bytecode_address", + A.to_value (M.read (| target_address |))); + ("value", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "call_value" + |) + |)) + ] + |))); + ("scheme", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallScheme::DelegateCall" + [] + |))); + ("is_static", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |) + |))); + ("is_eof", + A.to_value + (M.of_value (| Value.Bool true |))); + ("return_memory_offset", + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value + (M.of_value (| + Value.Integer 0 + |))) + ] + |))) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn extscall(interpreter: &mut Interpreter, host: &mut H) { + require_eof!(interpreter); + pop_address!(interpreter, target_address); + + // input call + let Some(input) = extcall_input(interpreter) else { + return; + }; + + let Some(gas_limit) = extcall_gas_calc(interpreter, host, target_address, false) else { + return; + }; + + // Call host to interact with target contract + interpreter.next_action = InterpreterAction::Call { + inputs: Box::new(CallInputs { + input, + gas_limit, + target_address, + caller: interpreter.contract.target_address, + bytecode_address: target_address, + value: CallValue::Transfer(U256::ZERO), + scheme: CallScheme::Call, + is_static: interpreter.is_static, + is_eof: true, + return_memory_offset: 0..0, + }), + }; + interpreter.instruction_result = InstructionResult::CallOrCreate; + } + *) + Definition extscall (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let target_address := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::extcall_input", + [] + |), + [ M.read (| interpreter |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let input := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::extcall_gas_calc", + [ H ] + |), + [ + M.read (| interpreter |); + M.read (| host |); + M.read (| target_address |); + M.of_value (| Value.Bool false |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_limit := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Call" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_inputs::CallInputs" + [ + ("input", A.to_value (M.read (| input |))); + ("gas_limit", + A.to_value (M.read (| gas_limit |))); + ("target_address", + A.to_value (M.read (| target_address |))); + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("bytecode_address", + A.to_value (M.read (| target_address |))); + ("value", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer" + [ + A.to_value + (M.read (| + M.get_constant (| + "ruint::ZERO" + |) + |)) + ] + |))); + ("scheme", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallScheme::Call" + [] + |))); + ("is_static", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |) + |))); + ("is_eof", + A.to_value + (M.of_value (| Value.Bool true |))); + ("return_memory_offset", + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value + (M.of_value (| + Value.Integer 0 + |))) + ] + |))) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn create( + interpreter: &mut Interpreter, + host: &mut H, + ) { + require_non_staticcall!(interpreter); + + // EIP-1014: Skinny CREATE2 + if IS_CREATE2 { + check!(interpreter, PETERSBURG); + } + + pop!(interpreter, value, code_offset, len); + let len = as_usize_or_fail!(interpreter, len); + + let mut code = Bytes::new(); + if len != 0 { + // EIP-3860: Limit and meter initcode + if SPEC::enabled(SHANGHAI) { + // Limit is set as double of max contract bytecode size + let max_initcode_size = host + .env() + .cfg + .limit_contract_code_size + .map(|limit| limit.saturating_mul(2)) + .unwrap_or(MAX_INITCODE_SIZE); + if len > max_initcode_size { + interpreter.instruction_result = InstructionResult::CreateInitCodeSizeLimit; + return; + } + gas!(interpreter, gas::initcode_cost(len as u64)); + } + + let code_offset = as_usize_or_fail!(interpreter, code_offset); + resize_memory!(interpreter, code_offset, len); + code = Bytes::copy_from_slice(interpreter.shared_memory.slice(code_offset, len)); + } + + // EIP-1014: Skinny CREATE2 + let scheme = if IS_CREATE2 { + pop!(interpreter, salt); + // SAFETY: len is reasonable in size as gas for it is already deducted. + gas_or_fail!(interpreter, gas::create2_cost(len.try_into().unwrap())); + CreateScheme::Create2 { salt } + } else { + gas!(interpreter, gas::CREATE); + CreateScheme::Create + }; + + let mut gas_limit = interpreter.gas().remaining(); + + // EIP-150: Gas cost changes for IO-heavy operations + if SPEC::enabled(TANGERINE) { + // take remaining gas and deduce l64 part of it. + gas_limit -= gas_limit / 64 + } + gas!(interpreter, gas_limit); + + // Call host to interact with target contract + interpreter.next_action = InterpreterAction::Create { + inputs: Box::new(CreateInputs { + caller: interpreter.contract.target_address, + scheme, + value, + init_code: code, + gas_limit, + }), + }; + interpreter.instruction_result = InstructionResult::CallOrCreate; + } + *) + Definition create (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.get_constant (| + "revm_interpreter::instructions::contract::create::IS_CREATE2" + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::PETERSBURG" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 3 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop3_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let value := M.copy (| γ0_0 |) in + let code_offset := M.copy (| γ0_1 |) in + let len := M.copy (| γ0_2 |) in + let len := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ len ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let code := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "new", + [] + |), + [] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::SHANGHAI" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let max_initcode_size := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "usize" ], + "map", + [ + Ty.path "usize"; + Ty.function + [ Ty.tuple [ Ty.path "usize" ] ] + (Ty.path "usize") + ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "cfg" + |), + "revm_primitives::env::CfgEnv", + "limit_contract_code_size" + |) + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let limit := + M.copy (| γ |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_mul", + [] + |), + [ + M.read (| limit |); + M.of_value (| + Value.Integer 2 + |) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |); + M.read (| + M.get_constant (| + "revm_primitives::constants::MAX_INITCODE_SIZE" + |) + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| len |), + M.read (| max_initcode_size |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CreateInitCodeSizeLimit" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::initcode_cost", + [] + |), + [ + M.rust_cast (| + M.read (| len |) + |) + ] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let code_offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ code_offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let new_size := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_add", + [] + |), + [ M.read (| code_offset |); M.read (| len |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + code, + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "copy_from_slice", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| code_offset |); + M.read (| len |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let scheme := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.get_constant (| + "revm_interpreter::instructions::contract::create::IS_CREATE2" + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let salt := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::create2_cost", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "u64"; + Ty.path "core::num::error::TryFromIntError" + ], + "unwrap", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryInto", + Ty.path "usize", + [ Ty.path "u64" ], + "try_into", + [] + |), + [ M.read (| len |) ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "revm_primitives::env::CreateScheme::Create2" + [ ("salt", A.to_value (M.read (| salt |))) ] + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::CREATE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_primitives::env::CreateScheme::Create" + [] + |) + |))) + ] + |) + |) in + let gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "gas", + [] + |), + [ M.read (| interpreter |) ] + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::TANGERINE" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let β := gas_limit in + M.write (| + β, + BinOp.Panic.sub (| + Integer.U64, + M.read (| β |), + BinOp.Panic.div (| + Integer.U64, + M.read (| gas_limit |), + M.of_value (| Value.Integer 64 |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_limit |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Create" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::create_inputs::CreateInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::create_inputs::CreateInputs" + [ + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("scheme", A.to_value (M.read (| scheme |))); + ("value", A.to_value (M.read (| value |))); + ("init_code", A.to_value (M.read (| code |))); + ("gas_limit", A.to_value (M.read (| gas_limit |))) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn call(interpreter: &mut Interpreter, host: &mut H) { + pop!(interpreter, local_gas_limit); + pop_address!(interpreter, to); + // max gas limit is not possible in real ethereum situation. + let local_gas_limit = u64::try_from(local_gas_limit).unwrap_or(u64::MAX); + + pop!(interpreter, value); + let has_transfer = value != U256::ZERO; + if interpreter.is_static && has_transfer { + interpreter.instruction_result = InstructionResult::CallNotAllowedInsideStatic; + return; + } + + let Some((input, return_memory_offset)) = get_memory_input_and_out_ranges(interpreter) else { + return; + }; + + let Some(LoadAccountResult { is_cold, is_empty }) = host.load_account(to) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + let Some(mut gas_limit) = calc_call_gas::( + interpreter, + is_cold, + has_transfer, + is_empty, + local_gas_limit, + ) else { + return; + }; + + gas!(interpreter, gas_limit); + + // add call stipend if there is value to be transferred. + if has_transfer { + gas_limit = gas_limit.saturating_add(gas::CALL_STIPEND); + } + + // Call host to interact with target contract + interpreter.next_action = InterpreterAction::Call { + inputs: Box::new(CallInputs { + input, + gas_limit, + target_address: to, + caller: interpreter.contract.target_address, + bytecode_address: to, + value: CallValue::Transfer(value), + scheme: CallScheme::Call, + is_static: interpreter.is_static, + is_eof: false, + return_memory_offset, + }), + }; + interpreter.instruction_result = InstructionResult::CallOrCreate; + } + *) + Definition call (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let local_gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let to := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + let local_gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "u64"; + Ty.apply (Ty.path "ruint::from::FromUintError") [ Ty.path "u64" ] + ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "u64", + [ Ty.path "ruint::Uint" ], + "try_from", + [] + |), + [ M.read (| local_gas_limit |) ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let value := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let has_transfer := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ value; M.get_constant (| "ruint::ZERO" |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |) + |), + ltac:(M.monadic (M.read (| has_transfer |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallNotAllowedInsideStatic" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::get_memory_input_and_out_ranges", + [] + |), + [ M.read (| interpreter |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 input := M.copy (| γ1_0 |) in + let return_memory_offset := M.copy (| γ1_1 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "load_account", + [] + |), + [ M.read (| host |); M.read (| to |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |) in + let γ1_1 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::host::LoadAccountResult", + "is_empty" + |) in + let is_cold := M.copy (| γ1_0 |) in + let is_empty := M.copy (| γ1_1 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::calc_call_gas", + [ H; SPEC ] + |), + [ + M.read (| interpreter |); + M.read (| is_cold |); + M.read (| has_transfer |); + M.read (| is_empty |); + M.read (| local_gas_limit |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_limit := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_limit |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use has_transfer in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + gas_limit, + M.call_closure (| + M.get_associated_function (| + Ty.path "u64", + "saturating_add", + [] + |), + [ + M.read (| gas_limit |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::CALL_STIPEND" + |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Call" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_inputs::CallInputs" + [ + ("input", + A.to_value (M.read (| input |))); + ("gas_limit", + A.to_value + (M.read (| gas_limit |))); + ("target_address", + A.to_value (M.read (| to |))); + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("bytecode_address", + A.to_value (M.read (| to |))); + ("value", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer" + [ + A.to_value + (M.read (| value |)) + ] + |))); + ("scheme", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallScheme::Call" + [] + |))); + ("is_static", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |) + |))); + ("is_eof", + A.to_value + (M.of_value (| + Value.Bool false + |))); + ("return_memory_offset", + A.to_value + (M.read (| + return_memory_offset + |))) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn call_code(interpreter: &mut Interpreter, host: &mut H) { + pop!(interpreter, local_gas_limit); + pop_address!(interpreter, to); + // max gas limit is not possible in real ethereum situation. + let local_gas_limit = u64::try_from(local_gas_limit).unwrap_or(u64::MAX); + + pop!(interpreter, value); + let Some((input, return_memory_offset)) = get_memory_input_and_out_ranges(interpreter) else { + return; + }; + + let Some(LoadAccountResult { is_cold, .. }) = host.load_account(to) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + + let Some(mut gas_limit) = calc_call_gas::( + interpreter, + is_cold, + value != U256::ZERO, + false, + local_gas_limit, + ) else { + return; + }; + + gas!(interpreter, gas_limit); + + // add call stipend if there is value to be transferred. + if value != U256::ZERO { + gas_limit = gas_limit.saturating_add(gas::CALL_STIPEND); + } + + // Call host to interact with target contract + interpreter.next_action = InterpreterAction::Call { + inputs: Box::new(CallInputs { + input, + gas_limit, + target_address: interpreter.contract.target_address, + caller: interpreter.contract.target_address, + bytecode_address: to, + value: CallValue::Transfer(value), + scheme: CallScheme::CallCode, + is_static: interpreter.is_static, + is_eof: false, + return_memory_offset, + }), + }; + interpreter.instruction_result = InstructionResult::CallOrCreate; + } + *) + Definition call_code (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let local_gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let to := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + let local_gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "u64"; + Ty.apply (Ty.path "ruint::from::FromUintError") [ Ty.path "u64" ] + ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "u64", + [ Ty.path "ruint::Uint" ], + "try_from", + [] + |), + [ M.read (| local_gas_limit |) ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let value := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::get_memory_input_and_out_ranges", + [] + |), + [ M.read (| interpreter |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 input := M.copy (| γ1_0 |) in + let return_memory_offset := M.copy (| γ1_1 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "load_account", + [] + |), + [ M.read (| host |); M.read (| to |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |) in + let is_cold := M.copy (| γ1_0 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::calc_call_gas", + [ H; SPEC ] + |), + [ + M.read (| interpreter |); + M.read (| is_cold |); + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ value; M.get_constant (| "ruint::ZERO" |) ] + |); + M.of_value (| Value.Bool false |); + M.read (| local_gas_limit |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_limit := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_limit |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ + value; + M.get_constant (| "ruint::ZERO" |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + gas_limit, + M.call_closure (| + M.get_associated_function (| + Ty.path "u64", + "saturating_add", + [] + |), + [ + M.read (| gas_limit |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::CALL_STIPEND" + |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Call" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_inputs::CallInputs" + [ + ("input", + A.to_value (M.read (| input |))); + ("gas_limit", + A.to_value + (M.read (| gas_limit |))); + ("target_address", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("bytecode_address", + A.to_value (M.read (| to |))); + ("value", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer" + [ + A.to_value + (M.read (| value |)) + ] + |))); + ("scheme", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallScheme::CallCode" + [] + |))); + ("is_static", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |) + |))); + ("is_eof", + A.to_value + (M.of_value (| + Value.Bool false + |))); + ("return_memory_offset", + A.to_value + (M.read (| + return_memory_offset + |))) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn delegate_call(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, HOMESTEAD); + pop!(interpreter, local_gas_limit); + pop_address!(interpreter, to); + // max gas limit is not possible in real ethereum situation. + let local_gas_limit = u64::try_from(local_gas_limit).unwrap_or(u64::MAX); + + let Some((input, return_memory_offset)) = get_memory_input_and_out_ranges(interpreter) else { + return; + }; + + let Some(LoadAccountResult { is_cold, .. }) = host.load_account(to) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + let Some(gas_limit) = + calc_call_gas::(interpreter, is_cold, false, false, local_gas_limit) + else { + return; + }; + + gas!(interpreter, gas_limit); + + // Call host to interact with target contract + interpreter.next_action = InterpreterAction::Call { + inputs: Box::new(CallInputs { + input, + gas_limit, + target_address: interpreter.contract.target_address, + caller: interpreter.contract.caller, + bytecode_address: to, + value: CallValue::Apparent(interpreter.contract.call_value), + scheme: CallScheme::DelegateCall, + is_static: interpreter.is_static, + is_eof: false, + return_memory_offset, + }), + }; + interpreter.instruction_result = InstructionResult::CallOrCreate; + } + *) + Definition delegate_call (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::HOMESTEAD" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let local_gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let to := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + let local_gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "u64"; + Ty.apply (Ty.path "ruint::from::FromUintError") [ Ty.path "u64" ] + ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "u64", + [ Ty.path "ruint::Uint" ], + "try_from", + [] + |), + [ M.read (| local_gas_limit |) ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::get_memory_input_and_out_ranges", + [] + |), + [ M.read (| interpreter |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 input := M.copy (| γ1_0 |) in + let return_memory_offset := M.copy (| γ1_1 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "load_account", + [] + |), + [ M.read (| host |); M.read (| to |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |) in + let is_cold := M.copy (| γ1_0 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::calc_call_gas", + [ H; SPEC ] + |), + [ + M.read (| interpreter |); + M.read (| is_cold |); + M.of_value (| Value.Bool false |); + M.of_value (| Value.Bool false |); + M.read (| local_gas_limit |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_limit := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_limit |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Call" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_inputs::CallInputs" + [ + ("input", + A.to_value (M.read (| input |))); + ("gas_limit", + A.to_value + (M.read (| gas_limit |))); + ("target_address", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "caller" + |) + |))); + ("bytecode_address", + A.to_value (M.read (| to |))); + ("value", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| + interpreter + |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "call_value" + |) + |)) + ] + |))); + ("scheme", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallScheme::DelegateCall" + [] + |))); + ("is_static", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |) + |))); + ("is_eof", + A.to_value + (M.of_value (| + Value.Bool false + |))); + ("return_memory_offset", + A.to_value + (M.read (| + return_memory_offset + |))) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn static_call(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, BYZANTIUM); + pop!(interpreter, local_gas_limit); + pop_address!(interpreter, to); + // max gas limit is not possible in real ethereum situation. + let local_gas_limit = u64::try_from(local_gas_limit).unwrap_or(u64::MAX); + + let Some((input, return_memory_offset)) = get_memory_input_and_out_ranges(interpreter) else { + return; + }; + + let Some(LoadAccountResult { is_cold, .. }) = host.load_account(to) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + + let Some(gas_limit) = + calc_call_gas::(interpreter, is_cold, false, false, local_gas_limit) + else { + return; + }; + gas!(interpreter, gas_limit); + + // Call host to interact with target contract + interpreter.next_action = InterpreterAction::Call { + inputs: Box::new(CallInputs { + input, + gas_limit, + target_address: to, + caller: interpreter.contract.target_address, + bytecode_address: to, + value: CallValue::Transfer(U256::ZERO), + scheme: CallScheme::StaticCall, + is_static: true, + is_eof: false, + return_memory_offset, + }), + }; + interpreter.instruction_result = InstructionResult::CallOrCreate; + } + *) + Definition static_call (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BYZANTIUM" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let local_gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let to := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + let local_gas_limit := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "u64"; + Ty.apply (Ty.path "ruint::from::FromUintError") [ Ty.path "u64" ] + ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "u64", + [ Ty.path "ruint::Uint" ], + "try_from", + [] + |), + [ M.read (| local_gas_limit |) ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::get_memory_input_and_out_ranges", + [] + |), + [ M.read (| interpreter |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 input := M.copy (| γ1_0 |) in + let return_memory_offset := M.copy (| γ1_1 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "load_account", + [] + |), + [ M.read (| host |); M.read (| to |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::host::LoadAccountResult", + "is_cold" + |) in + let is_cold := M.copy (| γ1_0 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::calc_call_gas", + [ H; SPEC ] + |), + [ + M.read (| interpreter |); + M.read (| is_cold |); + M.of_value (| Value.Bool false |); + M.of_value (| Value.Bool false |); + M.read (| local_gas_limit |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_limit := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_limit |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Call" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_inputs::CallInputs" + [ + ("input", + A.to_value (M.read (| input |))); + ("gas_limit", + A.to_value + (M.read (| gas_limit |))); + ("target_address", + A.to_value (M.read (| to |))); + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("bytecode_address", + A.to_value (M.read (| to |))); + ("value", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer" + [ + A.to_value + (M.read (| + M.get_constant (| + "ruint::ZERO" + |) + |)) + ] + |))); + ("scheme", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallScheme::StaticCall" + [] + |))); + ("is_static", + A.to_value + (M.of_value (| + Value.Bool true + |))); + ("is_eof", + A.to_value + (M.of_value (| + Value.Bool false + |))); + ("return_memory_offset", + A.to_value + (M.read (| + return_memory_offset + |))) + ] + |) + ] + |))) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + End contract. +End instructions. diff --git a/CoqOfRust/revm/instructions/contract/call_helpers.v b/CoqOfRust/revm/instructions/contract/call_helpers.v new file mode 100644 index 000000000..9974c7e38 --- /dev/null +++ b/CoqOfRust/revm/instructions/contract/call_helpers.v @@ -0,0 +1,1026 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module contract. + Module call_helpers. + (* + pub fn get_memory_input_and_out_ranges( + interpreter: &mut Interpreter, + ) -> Option<(Bytes, Range)> { + pop_ret!(interpreter, in_offset, in_len, out_offset, out_len, None); + + let in_range = resize_memory_and_return_range(interpreter, in_offset, in_len)?; + + let mut input = Bytes::new(); + if !in_range.is_empty() { + input = Bytes::copy_from_slice(interpreter.shared_memory.slice_range(in_range)); + } + + let ret_range = resize_memory_and_return_range(interpreter, out_offset, out_len)?; + Some((input, ret_range)) + } + *) + Definition get_memory_input_and_out_ranges (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ interpreter ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 4 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop4_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let γ0_3 := M.SubPointer.get_tuple_field (| γ, 3 |) in + let in_offset := M.copy (| γ0_0 |) in + 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 := + M.copy (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::resize_memory_and_return_range", + [] + |), + [ + M.read (| interpreter |); + M.read (| in_offset |); + M.read (| in_len |) + ] + |) + ] + |) + |), + [ + 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::option::Option") + [ + Ty.tuple + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ] + ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "core::convert::Infallible" ] + ], + "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 input := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "new", + [] + |), + [] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + "is_empty", + [] + |), + [ in_range ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + input, + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "copy_from_slice", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice_range", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| in_range |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let ret_range := + M.copy (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::contract::call_helpers::resize_memory_and_return_range", + [] + |), + [ + M.read (| interpreter |); + M.read (| out_offset |); + M.read (| out_len |) + ] + |) + ] + |) + |), + [ + 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::option::Option") + [ + Ty.tuple + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ] + ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "core::convert::Infallible" ] + ], + "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 + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| input |)); + A.to_value (M.read (| ret_range |)) + ] + |)) + ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn resize_memory_and_return_range( + interpreter: &mut Interpreter, + offset: U256, + len: U256, + ) -> Option> { + let len = as_usize_or_fail_ret!(interpreter, len, None); + let offset = if len != 0 { + let offset = as_usize_or_fail_ret!(interpreter, offset, None); + resize_memory!(interpreter, offset, len, None); + offset + } else { + usize::MAX //unrealistic value so we are sure it is not used + }; + Some(offset..offset + len) + } + *) + Definition resize_memory_and_return_range (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ interpreter; offset; len ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let offset := M.alloc (| offset |) in + let len := M.alloc (| len |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let len := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), + [ len ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 2 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let offset := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple + "core::option::Option::None" + [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + offset)); + fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| offset |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| offset |), + M.read (| len |) + |))) + ] + |)) + ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn calc_call_gas( + interpreter: &mut Interpreter, + is_cold: bool, + has_transfer: bool, + new_account_accounting: bool, + local_gas_limit: u64, + ) -> Option { + let call_cost = gas::call_cost(SPEC::SPEC_ID, has_transfer, is_cold, new_account_accounting); + + gas!(interpreter, call_cost, None); + + // EIP-150: Gas cost changes for IO-heavy operations + let gas_limit = if SPEC::enabled(TANGERINE) { + let gas = interpreter.gas().remaining(); + // take l64 part of gas_limit + min(gas - gas / 64, local_gas_limit) + } else { + local_gas_limit + }; + + Some(gas_limit) + } + *) + Definition calc_call_gas (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], + [ interpreter; is_cold; has_transfer; new_account_accounting; local_gas_limit ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let is_cold := M.alloc (| is_cold |) in + let has_transfer := M.alloc (| has_transfer |) in + let new_account_accounting := M.alloc (| new_account_accounting |) in + let local_gas_limit := M.alloc (| local_gas_limit |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let call_cost := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::call_cost", [] |), + [ + M.read (| + M.get_constant (| "revm_primitives::specification::Spec::SPEC_ID" |) + |); + M.read (| has_transfer |); + M.read (| is_cold |); + M.read (| new_account_accounting |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| call_cost |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.StructTuple "core::option::Option::None" [] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let gas_limit := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::TANGERINE" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let gas := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "gas", + [] + |), + [ M.read (| interpreter |) ] + |) + ] + |) + |) in + M.alloc (| + 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 |), + M.of_value (| Value.Integer 64 |) + |) + |); + M.read (| local_gas_limit |) + ] + |) + |))); + fun γ => ltac:(M.monadic local_gas_limit) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| gas_limit |)) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + End call_helpers. + End contract. +End instructions. diff --git a/CoqOfRust/revm/instructions/control.v b/CoqOfRust/revm/instructions/control.v new file mode 100644 index 000000000..fd8fe2150 --- /dev/null +++ b/CoqOfRust/revm/instructions/control.v @@ -0,0 +1,3116 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module control. + (* + pub fn rjump(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::BASE); + let offset = unsafe { read_i16(interpreter.instruction_pointer) } as isize; + // In spec it is +3 but pointer is already incremented in + // `Interpreter::step` so for revm is +2. + interpreter.instruction_pointer = unsafe { interpreter.instruction_pointer.offset(offset + 2) }; + } + *) + Definition rjump (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let offset := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_i16", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + ] + |) + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + BinOp.Panic.add (| + Integer.Isize, + M.read (| offset |), + M.of_value (| Value.Integer 2 |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn rjumpi(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::CONDITION_JUMP_GAS); + pop!(interpreter, condition); + // In spec it is +3 but pointer is already incremented in + // `Interpreter::step` so for revm is +2. + let mut offset = 2; + if !condition.is_zero() { + offset += unsafe { read_i16(interpreter.instruction_pointer) } as isize; + } + + interpreter.instruction_pointer = unsafe { interpreter.instruction_pointer.offset(offset) }; + } + *) + Definition rjumpi (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::CONDITION_JUMP_GAS" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let condition := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let offset := M.alloc (| M.of_value (| Value.Integer 2 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "is_zero", + [] + |), + [ condition ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + let β := offset in + M.write (| + β, + BinOp.Panic.add (| + Integer.Isize, + M.read (| β |), + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_i16", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + ] + |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + M.read (| offset |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn rjumpv(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::CONDITION_JUMP_GAS); + pop!(interpreter, case); + let case = as_isize_saturated!(case); + + let max_index = unsafe { *interpreter.instruction_pointer } as isize; + // for number of items we are adding 1 to max_index, multiply by 2 as each offset is 2 bytes + // and add 1 for max_index itself. Note that revm already incremented the instruction pointer + let mut offset = (max_index + 1) * 2 + 1; + + if case <= max_index { + offset += unsafe { + read_i16( + interpreter + .instruction_pointer + // offset for max_index that is one byte + .offset(1 + case * 2), + ) + } as isize; + } + + interpreter.instruction_pointer = unsafe { interpreter.instruction_pointer.offset(offset) }; + } + *) + Definition rjumpv (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::CONDITION_JUMP_GAS" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let case := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let case := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "isize"; Ty.path "core::num::error::TryFromIntError" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "isize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ case ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + let max_index := + M.alloc (| + M.rust_cast (| + M.read (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + |) + |) + |) in + let offset := + M.alloc (| + BinOp.Panic.add (| + Integer.Isize, + BinOp.Panic.mul (| + Integer.Isize, + BinOp.Panic.add (| + Integer.Isize, + M.read (| max_index |), + M.of_value (| Value.Integer 1 |) + |), + M.of_value (| Value.Integer 2 |) + |), + M.of_value (| Value.Integer 1 |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.le (| M.read (| case |), M.read (| max_index |) |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + let β := offset in + M.write (| + β, + BinOp.Panic.add (| + Integer.Isize, + M.read (| β |), + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_i16", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + BinOp.Panic.add (| + Integer.Isize, + M.of_value (| Value.Integer 1 |), + BinOp.Panic.mul (| + Integer.Isize, + M.read (| case |), + M.of_value (| Value.Integer 2 |) + |) + |) + ] + |) + ] + |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + M.read (| offset |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn jump(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::MID); + pop!(interpreter, target); + jump_inner(interpreter, target); + } + *) + Definition jump (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::MID" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let target := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::control::jump_inner", + [] + |), + [ M.read (| interpreter |); M.read (| target |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn jumpi(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::HIGH); + pop!(interpreter, target, cond); + if cond != U256::ZERO { + jump_inner(interpreter, target); + } + } + *) + Definition jumpi (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::HIGH" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 target := M.copy (| γ0_0 |) in + let cond := M.copy (| γ0_1 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ cond; M.get_constant (| "ruint::ZERO" |) ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::control::jump_inner", + [] + |), + [ M.read (| interpreter |); M.read (| target |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + fn jump_inner(interpreter: &mut Interpreter, target: U256) { + let target = as_usize_or_fail!(interpreter, target, InstructionResult::InvalidJump); + if !interpreter.contract.is_valid_jump(target) { + interpreter.instruction_result = InstructionResult::InvalidJump; + return; + } + // SAFETY: `is_valid_jump` ensures that `dest` is in bounds. + interpreter.instruction_pointer = unsafe { interpreter.bytecode.as_ptr().add(target) }; + } + *) + Definition jump_inner (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ interpreter; target ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let target := M.alloc (| target |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let target := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), + [ target ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 2 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidJump" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::contract::Contract", + "is_valid_jump", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |); + M.read (| target |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidJump" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "bytecode" + |) + ] + |) + ] + |) + ] + |); + M.read (| target |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn jumpdest_or_nop(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::JUMPDEST); + } + *) + Definition jumpdest_or_nop (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::JUMPDEST" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn callf(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::LOW); + + let idx = unsafe { read_u16(interpreter.instruction_pointer) } as usize; + // TODO Check stack with EOF types. + + if interpreter.function_stack.return_stack_len() == 1024 { + interpreter.instruction_result = InstructionResult::EOFFunctionStackOverflow; + return; + } + + // push current idx and PC to the callf stack. + // PC is incremented by 2 to point to the next instruction after callf. + interpreter + .function_stack + .push(interpreter.program_counter() + 2, idx); + + interpreter.load_eof_code(idx, 0) + } + *) + Definition callf (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOW" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let idx := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_u16", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + ] + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::function_stack::FunctionStack", + "return_stack_len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "function_stack" + |) + ] + |), + M.of_value (| Value.Integer 1024 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFFunctionStackOverflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::function_stack::FunctionStack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "function_stack" + |); + BinOp.Panic.add (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "program_counter", + [] + |), + [ M.read (| interpreter |) ] + |), + M.of_value (| Value.Integer 2 |) + |); + M.read (| idx |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "load_eof_code", + [] + |), + [ M.read (| interpreter |); M.read (| idx |); M.of_value (| Value.Integer 0 |) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn retf(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::RETF_GAS); + + let Some(fframe) = interpreter.function_stack.pop() else { + panic!("Expected function frame") + }; + + interpreter.load_eof_code(fframe.idx, fframe.pc); + } + *) + Definition retf (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::RETF_GAS" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::function_stack::FunctionStack", + "pop", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "function_stack" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let fframe := M.copy (| γ0_0 |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "load_eof_code", + [] + |), + [ + M.read (| interpreter |); + M.read (| + M.SubPointer.get_struct_record_field (| + fframe, + "revm_interpreter::function_stack::FunctionReturnFrame", + "idx" + |) + |); + M.read (| + M.SubPointer.get_struct_record_field (| + fframe, + "revm_interpreter::function_stack::FunctionReturnFrame", + "pc" + |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn jumpf(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::LOW); + + let idx = unsafe { read_u16(interpreter.instruction_pointer) } as usize; + + // TODO(EOF) do types stack checks + + interpreter.function_stack.set_current_code_idx(idx); + interpreter.load_eof_code(idx, 0) + } + *) + Definition jumpf (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOW" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let idx := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_u16", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + ] + |) + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::function_stack::FunctionStack", + "set_current_code_idx", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "function_stack" + |); + M.read (| idx |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "load_eof_code", + [] + |), + [ M.read (| interpreter |); M.read (| idx |); M.of_value (| Value.Integer 0 |) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn pc(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::BASE); + // - 1 because we have already advanced the instruction pointer in `Interpreter::step` + push!(interpreter, U256::from(interpreter.program_counter() - 1)); + } + *) + Definition pc (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "usize" ] + |), + [ + BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "program_counter", + [] + |), + [ M.read (| interpreter |) ] + |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + fn return_inner(interpreter: &mut Interpreter, instruction_result: InstructionResult) { + // zero gas cost + // gas!(interpreter, gas::ZERO); + pop!(interpreter, offset, len); + let len = as_usize_or_fail!(interpreter, len); + // important: offset must be ignored if len is zeros + let mut output = Bytes::default(); + if len != 0 { + let offset = as_usize_or_fail!(interpreter, offset); + resize_memory!(interpreter, offset, len); + + output = interpreter.shared_memory.slice(offset, len).to_vec().into() + } + interpreter.instruction_result = instruction_result; + interpreter.next_action = crate::InterpreterAction::Return { + result: InterpreterResult { + output, + gas: interpreter.gas, + result: instruction_result, + }, + }; + } + *) + Definition return_inner (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ interpreter; instruction_result ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let instruction_result := M.alloc (| instruction_result |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 offset := M.copy (| γ0_0 |) in + let len := M.copy (| γ0_1 |) in + let len := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ len ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let output := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "default", + [] + |), + [] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.write (| + output, + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [ Ty.path "alloy_primitives::bytes_::Bytes" ], + "into", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "to_vec", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| offset |); + M.read (| len |) + ] + |) + ] + |) + ] + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| instruction_result |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Return" + [ + ("result", + A.to_value + (M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::InterpreterResult" + [ + ("output", A.to_value (M.read (| output |))); + ("gas", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |) + |))); + ("result", A.to_value (M.read (| instruction_result |))) + ] + |))) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn ret(interpreter: &mut Interpreter, _host: &mut H) { + return_inner(interpreter, InstructionResult::Return); + } + *) + Definition ret (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::instructions::control::return_inner", [] |), + [ + M.read (| interpreter |); + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Return" + [] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + (* + pub fn revert(interpreter: &mut Interpreter, _host: &mut H) { + check!(interpreter, BYZANTIUM); + return_inner(interpreter, InstructionResult::Revert); + } + *) + Definition revert (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BYZANTIUM" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::control::return_inner", + [] + |), + [ + M.read (| interpreter |); + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Revert" + [] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn stop(interpreter: &mut Interpreter, _host: &mut H) { + interpreter.instruction_result = InstructionResult::Stop; + } + *) + Definition stop (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Stop" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + (* + pub fn invalid(interpreter: &mut Interpreter, _host: &mut H) { + interpreter.instruction_result = InstructionResult::InvalidFEOpcode; + } + *) + Definition invalid (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidFEOpcode" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + (* + pub fn unknown(interpreter: &mut Interpreter, _host: &mut H) { + interpreter.instruction_result = InstructionResult::OpcodeNotFound; + } + *) + Definition unknown (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OpcodeNotFound" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + End control. +End instructions. diff --git a/CoqOfRust/revm/instructions/data.v b/CoqOfRust/revm/instructions/data.v new file mode 100644 index 000000000..5e389f7aa --- /dev/null +++ b/CoqOfRust/revm/instructions/data.v @@ -0,0 +1,1725 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module data. + (* + pub fn data_load(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, DATA_LOAD_GAS); + pop_top!(interpreter, offset); + + let offset_usize = as_usize_saturated!(offset); + + let slice = interpreter + .contract + .bytecode + .eof() + .expect("eof") + .data_slice(offset_usize, 32); + + let mut word = [0u8; 32]; + word[..slice.len()].copy_from_slice(slice); + + *offset = U256::from_be_bytes(word); + } + *) + Definition data_load (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::DATA_LOAD_GAS" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let offset := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let offset_usize := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ M.read (| offset |) ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + let slice := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::eof::Eof", + "data_slice", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "revm_primitives::bytecode::eof::Eof" ] + ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "eof", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |); + M.read (| M.of_value (| Value.String "eof" |) |) + ] + |); + M.read (| offset_usize |); + M.of_value (| Value.Integer 32 |) + ] + |) + |) in + let word := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 32 |) |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "copy_from_slice", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] ], + "index_mut", + [] + |), + [ + word; + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| slice |) ] + |))) + ] + |) + ] + |); + M.read (| slice |) + ] + |) + |) in + let _ := + M.write (| + M.read (| offset |), + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "from_be_bytes", [] |), + [ M.read (| word |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn data_loadn(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, VERYLOW); + let offset = unsafe { read_u16(interpreter.instruction_pointer) } as usize; + + let slice = interpreter + .contract + .bytecode + .eof() + .expect("eof") + .data_slice(offset, 32); + + let mut word = [0u8; 32]; + word[..slice.len()].copy_from_slice(slice); + + push_b256!(interpreter, word.into()); + + // add +2 to the instruction pointer to skip the offset + interpreter.instruction_pointer = unsafe { interpreter.instruction_pointer.offset(2) }; + } + *) + Definition data_loadn (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let offset := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_u16", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + ] + |) + |) + |) in + let slice := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::eof::Eof", + "data_slice", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "revm_primitives::bytecode::eof::Eof" ] + ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "eof", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |); + M.read (| M.of_value (| Value.String "eof" |) |) + ] + |); + M.read (| offset |); + M.of_value (| Value.Integer 32 |) + ] + |) + |) in + let word := M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 32 |) |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "copy_from_slice", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [ Ty.apply (Ty.path "core::ops::range::RangeTo") [ Ty.path "usize" ] ], + "index_mut", + [] + |), + [ + word; + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| slice |) ] + |))) + ] + |) + ] + |); + M.read (| slice |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_b256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [ Ty.path "alloy_primitives::bits::fixed::FixedBytes" ], + "into", + [] + |), + [ M.read (| word |) ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + M.of_value (| Value.Integer 2 |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn data_size(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, BASE); + let data_size = interpreter.eof().expect("eof").header.data_size; + + push!(interpreter, U256::from(data_size)); + } + *) + Definition data_size (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let data_size := + M.copy (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "revm_primitives::bytecode::eof::Eof" ] + ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "eof", + [] + |), + [ M.read (| interpreter |) ] + |); + M.read (| M.of_value (| Value.String "eof" |) |) + ] + |), + "revm_primitives::bytecode::eof::Eof", + "header" + |), + "revm_primitives::bytecode::eof::header::EofHeader", + "data_size" + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "u16" ] + |), + [ M.read (| data_size |) ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn data_copy(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, VERYLOW); + pop!(interpreter, mem_offset, offset, size); + + // sizes more than u64::MAX will spend all the gas in memmory resize. + let size = as_usize_or_fail!(interpreter, size); + // size of zero should not change the memory + if size == 0 { + return; + } + // fail if mem offset is big as it will spend all the gas + let mem_offset = as_usize_or_fail!(interpreter, mem_offset); + resize_memory!(interpreter, mem_offset, size); + + let offset = as_usize_saturated!(offset); + let data = interpreter.contract.bytecode.eof().expect("EOF").data(); + + // set data from the eof to the shared memory. Padd it with zeros. + interpreter + .shared_memory + .set_data(mem_offset, offset, size, data); + } + *) + Definition data_copy (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 3 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop3_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let mem_offset := M.copy (| γ0_0 |) in + let offset := M.copy (| γ0_1 |) in + let size := M.copy (| γ0_2 |) in + let size := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ size ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| size |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let mem_offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ mem_offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let offset := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ offset ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => + ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + let data := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::eof::Eof", + "data", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "revm_primitives::bytecode::eof::Eof" ] + ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "eof", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |); + M.read (| M.of_value (| Value.String "EOF" |) |) + ] + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set_data", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| mem_offset |); + M.read (| offset |); + M.read (| size |); + M.read (| data |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + End data. +End instructions. diff --git a/CoqOfRust/revm/instructions/host.v b/CoqOfRust/revm/instructions/host.v new file mode 100644 index 000000000..a971a10c2 --- /dev/null +++ b/CoqOfRust/revm/instructions/host.v @@ -0,0 +1,5572 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module host. + (* + pub fn balance(interpreter: &mut Interpreter, host: &mut H) { + pop_address!(interpreter, address); + let Some((balance, is_cold)) = host.balance(address) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + gas!( + interpreter, + if SPEC::enabled(BERLIN) { + warm_cold_cost(is_cold) + } else if SPEC::enabled(ISTANBUL) { + // EIP-1884: Repricing for trie-size-dependent opcodes + 700 + } else if SPEC::enabled(TANGERINE) { + 400 + } else { + 20 + } + ); + push!(interpreter, balance); + } + *) + Definition balance (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let address := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| "revm_interpreter::host::Host", H, [], "balance", [] |), + [ M.read (| host |); M.read (| address |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 is_cold := M.copy (| γ1_1 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::warm_cold_cost", + [] + |), + [ M.read (| is_cold |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::ISTANBUL" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| Value.Integer 700 |) + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::TANGERINE" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| + Value.Integer 400 + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Integer 20 + |) + |))) + ] + |))) + ] + |))) + ] + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| balance |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn selfbalance(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, ISTANBUL); + gas!(interpreter, gas::LOW); + let Some((balance, _)) = host.balance(interpreter.contract.target_address) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + push!(interpreter, balance); + } + *) + Definition selfbalance (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::ISTANBUL" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| "revm_interpreter::gas::constants::LOW" |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| "revm_interpreter::host::Host", H, [], "balance", [] |), + [ + M.read (| host |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| balance |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn extcodesize(interpreter: &mut Interpreter, host: &mut H) { + pop_address!(interpreter, address); + let Some((code, is_cold)) = host.code(address) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + if SPEC::enabled(BERLIN) { + gas!(interpreter, warm_cold_cost(is_cold)); + } else if SPEC::enabled(TANGERINE) { + gas!(interpreter, 700); + } else { + gas!(interpreter, 20); + } + + push!(interpreter, U256::from(code.len())); + } + *) + Definition extcodesize (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let address := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| "revm_interpreter::host::Host", H, [], "code", [] |), + [ M.read (| host |); M.read (| address |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 code := M.copy (| γ1_0 |) in + let is_cold := M.copy (| γ1_1 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::warm_cold_cost", + [] + |), + [ M.read (| is_cold |) ] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::TANGERINE" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.of_value (| Value.Integer 700 |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.of_value (| Value.Integer 20 |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "len", + [] + |), + [ code ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn extcodehash(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, CONSTANTINOPLE); + pop_address!(interpreter, address); + let Some((code_hash, is_cold)) = host.code_hash(address) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + if SPEC::enabled(BERLIN) { + gas!(interpreter, warm_cold_cost(is_cold)); + } else if SPEC::enabled(ISTANBUL) { + gas!(interpreter, 700); + } else { + gas!(interpreter, 400); + } + push_b256!(interpreter, code_hash); + } + *) + Definition extcodehash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::CONSTANTINOPLE" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let address := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "code_hash", + [] + |), + [ M.read (| host |); M.read (| address |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 code_hash := M.copy (| γ1_0 |) in + let is_cold := M.copy (| γ1_1 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BERLIN" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::warm_cold_cost", + [] + |), + [ M.read (| is_cold |) ] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::ISTANBUL" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.of_value (| Value.Integer 700 |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.of_value (| Value.Integer 400 |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_b256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| code_hash |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn extcodecopy(interpreter: &mut Interpreter, host: &mut H) { + pop_address!(interpreter, address); + pop!(interpreter, memory_offset, code_offset, len_u256); + + let Some((code, is_cold)) = host.code(address) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + + let len = as_usize_or_fail!(interpreter, len_u256); + gas_or_fail!( + interpreter, + gas::extcodecopy_cost(SPEC::SPEC_ID, len as u64, is_cold) + ); + if len == 0 { + return; + } + let memory_offset = as_usize_or_fail!(interpreter, memory_offset); + let code_offset = min(as_usize_saturated!(code_offset), code.len()); + resize_memory!(interpreter, memory_offset, len); + + // Note: this can't panic because we resized memory to fit. + interpreter + .shared_memory + .set_data(memory_offset, code_offset, len, &code.original_bytes()); + } + *) + Definition extcodecopy (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let address := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 3 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop3_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let memory_offset := M.copy (| γ0_0 |) in + let code_offset := M.copy (| γ0_1 |) in + let len_u256 := M.copy (| γ0_2 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "code", + [] + |), + [ M.read (| host |); M.read (| address |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 code := M.copy (| γ1_0 |) in + let is_cold := M.copy (| γ1_1 |) in + let len := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ len_u256 ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::extcodecopy_cost", + [] + |), + [ + M.read (| + M.get_constant (| + "revm_primitives::specification::Spec::SPEC_ID" + |) + |); + M.rust_cast (| M.read (| len |) |); + M.read (| is_cold |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let memory_offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ memory_offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let code_offset := + M.alloc (| + M.call_closure (| + M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "usize"; + Ty.path "core::num::error::TryFromIntError" + ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ code_offset ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| + Value.Integer 1 + |) + |) + |) + |), + M.of_value (| + Value.Integer 0 + |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| + Value.Integer 2 + |) + |) + |) + |), + M.of_value (| + Value.Integer 0 + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| + Value.Integer 3 + |) + |) + |) + |), + M.of_value (| + Value.Integer 0 + |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 0 |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "len", + [] + |), + [ code ] + |) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set_data", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| memory_offset |); + M.read (| code_offset |); + M.read (| len |); + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "original_bytes", + [] + |), + [ code ] + |) + |) + ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn blockhash(interpreter: &mut Interpreter, host: &mut H) { + gas!(interpreter, gas::BLOCKHASH); + pop_top!(interpreter, number); + + let block_number = host.env().block.number; + + match block_number.checked_sub( *number) { + Some(diff) if !diff.is_zero() => { + let diff = as_usize_saturated!(diff); + + // blockhash should push zero if number is same as current block number. + if SPEC::enabled(PRAGUE) && diff <= BLOCKHASH_SERVE_WINDOW { + let value = sload!( + interpreter, + host, + BLOCKHASH_STORAGE_ADDRESS, + number.wrapping_rem(U256::from(BLOCKHASH_SERVE_WINDOW)) + ); + *number = value; + return; + } else if diff <= BLOCK_HASH_HISTORY { + let Some(hash) = host.block_hash( *number) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + *number = U256::from_be_bytes(hash.0); + return; + } + } + _ => { + // If blockhash is requested for the current block, the hash should be 0, so we fall + // through. + } + } + + *number = U256::ZERO; + } + *) + Definition blockhash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BLOCKHASH" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let number := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let block_number := + M.copy (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| "revm_interpreter::host::Host", H, [], "env", [] |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "block" + |), + "revm_primitives::env::BlockEnv", + "number" + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "checked_sub", [] |), + [ M.read (| block_number |); M.read (| M.read (| number |) |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let diff := M.copy (| γ0_0 |) in + let γ := + M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "is_zero", + [] + |), + [ diff ] + |) + |) + |) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let diff := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" + ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ diff ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => + ltac:(M.monadic + (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::PRAGUE" + [] + |) + ] + |), + ltac:(M.monadic + (BinOp.Pure.le (| + M.read (| diff |), + M.read (| + M.get_constant (| + "revm_primitives::constants::BLOCKHASH_SERVE_WINDOW" + |) + |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let value := + M.copy (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "sload", + [] + |), + [ + M.read (| host |); + M.read (| + M.get_constant (| + "revm_primitives::constants::BLOCKHASH_STORAGE_ADDRESS" + |) + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "wrapping_rem", + [] + |), + [ + M.read (| M.read (| number |) |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "usize" ] + |), + [ + M.read (| + M.get_constant (| + "revm_primitives::constants::BLOCKHASH_SERVE_WINDOW" + |) + |) + ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 value := M.copy (| γ1_0 |) in + let is_cold := M.copy (| γ1_1 |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| + interpreter + |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::sload_cost", + [] + |), + [ + M.read (| + M.get_constant (| + "revm_primitives::specification::Spec::SPEC_ID" + |) + |); + M.read (| is_cold |) + ] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| + Value.Tuple [] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + value)) + ] + |) + |) in + let _ := + M.write (| M.read (| number |), M.read (| value |) |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.le (| + M.read (| diff |), + M.read (| + M.get_constant (| + "revm_primitives::constants::BLOCK_HASH_HISTORY" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "block_hash", + [] + |), + [ + M.read (| host |); + M.read (| M.read (| number |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let hash := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.read (| number |), + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from_be_bytes", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + hash, + "alloy_primitives::bits::fixed::FixedBytes", + 0 + |) + |) + ] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.read (| number |), + M.read (| M.get_constant (| "ruint::ZERO" |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn sload(interpreter: &mut Interpreter, host: &mut H) { + pop_top!(interpreter, index); + let value = sload!( + interpreter, + host, + interpreter.contract.target_address, + *index + ); + *index = value; + } + *) + Definition sload (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let index := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let value := + M.copy (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "sload", + [] + |), + [ + M.read (| host |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |); + M.read (| M.read (| index |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 value := M.copy (| γ1_0 |) in + let is_cold := M.copy (| γ1_1 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::sload_cost", + [] + |), + [ + M.read (| + M.get_constant (| + "revm_primitives::specification::Spec::SPEC_ID" + |) + |); + M.read (| is_cold |) + ] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + value)) + ] + |) + |) in + let _ := M.write (| M.read (| index |), M.read (| value |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn sstore(interpreter: &mut Interpreter, host: &mut H) { + require_non_staticcall!(interpreter); + + pop!(interpreter, index, value); + let Some(SStoreResult { + original_value: original, + present_value: old, + new_value: new, + is_cold, + }) = host.sstore(interpreter.contract.target_address, index, value) + else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + gas_or_fail!(interpreter, { + let remaining_gas = interpreter.gas.remaining(); + gas::sstore_cost(SPEC::SPEC_ID, original, old, new, remaining_gas, is_cold) + }); + refund!( + interpreter, + gas::sstore_refund(SPEC::SPEC_ID, original, old, new) + ); + } + *) + Definition sstore (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 index := M.copy (| γ0_0 |) in + let value := M.copy (| γ0_1 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "sstore", + [] + |), + [ + M.read (| host |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |); + M.read (| index |); + M.read (| value |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::host::SStoreResult", + "original_value" + |) in + let γ1_1 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::host::SStoreResult", + "present_value" + |) in + let γ1_2 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::host::SStoreResult", + "new_value" + |) in + let γ1_3 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::host::SStoreResult", + "is_cold" + |) in + let original := M.copy (| γ1_0 |) in + let old := M.copy (| γ1_1 |) in + let new := M.copy (| γ1_2 |) in + let is_cold := M.copy (| γ1_3 |) in + let _ := + M.match_operator (| + let remaining_gas := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::sstore_cost", + [] + |), + [ + M.read (| + M.get_constant (| + "revm_primitives::specification::Spec::SPEC_ID" + |) + |); + M.read (| original |); + M.read (| old |); + M.read (| new |); + M.read (| remaining_gas |); + M.read (| is_cold |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_refund", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::sstore_refund", + [] + |), + [ + M.read (| + M.get_constant (| + "revm_primitives::specification::Spec::SPEC_ID" + |) + |); + M.read (| original |); + M.read (| old |); + M.read (| new |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn tstore(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, CANCUN); + require_non_staticcall!(interpreter); + gas!(interpreter, gas::WARM_STORAGE_READ_COST); + + pop!(interpreter, index, value); + + host.tstore(interpreter.contract.target_address, index, value); + } + *) + Definition tstore (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::CANCUN" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::WARM_STORAGE_READ_COST" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 index := M.copy (| γ0_0 |) in + let value := M.copy (| γ0_1 |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "tstore", + [] + |), + [ + M.read (| host |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |); + M.read (| index |); + M.read (| value |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn tload(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, CANCUN); + gas!(interpreter, gas::WARM_STORAGE_READ_COST); + + pop_top!(interpreter, index); + + *index = host.tload(interpreter.contract.target_address, *index); + } + *) + Definition tload (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::CANCUN" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::WARM_STORAGE_READ_COST" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let index := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let _ := + M.write (| + M.read (| index |), + M.call_closure (| + M.get_trait_method (| "revm_interpreter::host::Host", H, [], "tload", [] |), + [ + M.read (| host |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |); + M.read (| M.read (| index |) |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn log(interpreter: &mut Interpreter, host: &mut H) { + require_non_staticcall!(interpreter); + + pop!(interpreter, offset, len); + let len = as_usize_or_fail!(interpreter, len); + gas_or_fail!(interpreter, gas::log_cost(N as u8, len as u64)); + let data = if len == 0 { + Bytes::new() + } else { + let offset = as_usize_or_fail!(interpreter, offset); + resize_memory!(interpreter, offset, len); + Bytes::copy_from_slice(interpreter.shared_memory.slice(offset, len)) + }; + + if interpreter.stack.len() < N { + interpreter.instruction_result = InstructionResult::StackUnderflow; + return; + } + + let mut topics = Vec::with_capacity(N); + for _ in 0..N { + // SAFETY: stack bounds already checked few lines above + topics.push(B256::from(unsafe { interpreter.stack.pop_unsafe() })); + } + + let log = Log { + address: interpreter.contract.target_address, + data: LogData::new(topics, data).expect("LogData should have <=4 topics"), + }; + + host.log(log); + } + *) + Definition log (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 offset := M.copy (| γ0_0 |) in + let len := M.copy (| γ0_1 |) in + let len := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ len ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::log_cost", [] |), + [ + M.rust_cast (| + M.read (| + M.get_constant (| + "revm_interpreter::instructions::host::log::N" + |) + |) + |); + M.rust_cast (| M.read (| len |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let data := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "new", + [] + |), + [] + |) + |))); + fun γ => + ltac:(M.monadic + (let offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| + Value.Integer 2 + |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "copy_from_slice", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| offset |); + M.read (| len |) + ] + |) + ] + |) + |))) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.read (| + M.get_constant (| + "revm_interpreter::instructions::host::log::N" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let topics := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bits::fixed::FixedBytes"; + Ty.path "alloc::alloc::Global" + ], + "with_capacity", + [] + |), + [ + M.read (| + M.get_constant (| + "revm_interpreter::instructions::host::log::N" + |) + |) + ] + |) + |) in + let _ := + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [], + "into_iter", + [] + |), + [ + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::instructions::host::log::N" + |) + |))) + ] + |) + ] + |) + |), + [ + 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::ops::range::Range") + [ Ty.path "usize" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path + "alloy_primitives::bits::fixed::FixedBytes"; + Ty.path "alloc::alloc::Global" + ], + "push", + [] + |), + [ + topics; + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path + "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + |))) + ] + |)) in + let log := + M.alloc (| + M.of_value (| + Value.StructRecord + "alloy_primitives::log::Log" + [ + ("address", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |))); + ("data", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::log::LogData" ], + "expect", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::log::LogData", + "new", + [] + |), + [ M.read (| topics |); M.read (| data |) ] + |); + M.read (| + M.of_value (| + Value.String "LogData should have <=4 topics" + |) + |) + ] + |))) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "log", + [] + |), + [ M.read (| host |); M.read (| log |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn selfdestruct(interpreter: &mut Interpreter, host: &mut H) { + require_non_staticcall!(interpreter); + pop_address!(interpreter, target); + + let Some(res) = host.selfdestruct(interpreter.contract.target_address, target) else { + interpreter.instruction_result = InstructionResult::FatalExternalError; + return; + }; + + // EIP-3529: Reduction in refunds + if !SPEC::enabled(LONDON) && !res.previously_destroyed { + refund!(interpreter, gas::SELFDESTRUCT) + } + gas!(interpreter, gas::selfdestruct_cost(SPEC::SPEC_ID, res)); + + interpreter.instruction_result = InstructionResult::SelfDestruct; + } + *) + Definition selfdestruct (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let target := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "from_word", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "from", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + ] + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "selfdestruct", + [] + |), + [ + M.read (| host |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |); + M.read (| target |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let res := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::LONDON" + [] + |) + ] + |) + |), + ltac:(M.monadic + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + res, + "revm_interpreter::host::SelfDestructResult", + "previously_destroyed" + |) + |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_refund", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::SELFDESTRUCT" + |) + |) + ] + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::selfdestruct_cost", + [] + |), + [ + M.read (| + M.get_constant (| + "revm_primitives::specification::Spec::SPEC_ID" + |) + |); + M.read (| res |) + ] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::SelfDestruct" + [] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + End host. +End instructions. diff --git a/CoqOfRust/revm/instructions/host_env.v b/CoqOfRust/revm/instructions/host_env.v new file mode 100644 index 000000000..c167d00cc --- /dev/null +++ b/CoqOfRust/revm/instructions/host_env.v @@ -0,0 +1,2242 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module host_env. + (* + pub fn chainid(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, ISTANBUL); + gas!(interpreter, gas::BASE); + push!(interpreter, U256::from(host.env().cfg.chain_id)); + } + *) + Definition chainid (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::ISTANBUL" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "u64" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "cfg" + |), + "revm_primitives::env::CfgEnv", + "chain_id" + |) + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn coinbase(interpreter: &mut Interpreter, host: &mut H) { + gas!(interpreter, gas::BASE); + push_b256!(interpreter, host.env().block.coinbase.into_word()); + } + *) + Definition coinbase (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_b256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "into_word", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "block" + |), + "revm_primitives::env::BlockEnv", + "coinbase" + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn timestamp(interpreter: &mut Interpreter, host: &mut H) { + gas!(interpreter, gas::BASE); + push!(interpreter, host.env().block.timestamp); + } + *) + Definition timestamp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "block" + |), + "revm_primitives::env::BlockEnv", + "timestamp" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn block_number(interpreter: &mut Interpreter, host: &mut H) { + gas!(interpreter, gas::BASE); + push!(interpreter, host.env().block.number); + } + *) + Definition block_number (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "block" + |), + "revm_primitives::env::BlockEnv", + "number" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn difficulty(interpreter: &mut Interpreter, host: &mut H) { + gas!(interpreter, gas::BASE); + if SPEC::enabled(MERGE) { + push_b256!(interpreter, host.env().block.prevrandao.unwrap()); + } else { + push!(interpreter, host.env().block.difficulty); + } + } + *) + Definition difficulty (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::MERGE" + [] + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_b256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::bits::fixed::FixedBytes" ], + "unwrap", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "block" + |), + "revm_primitives::env::BlockEnv", + "prevrandao" + |) + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "block" + |), + "revm_primitives::env::BlockEnv", + "difficulty" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn gaslimit(interpreter: &mut Interpreter, host: &mut H) { + gas!(interpreter, gas::BASE); + push!(interpreter, host.env().block.gas_limit); + } + *) + Definition gaslimit (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "block" + |), + "revm_primitives::env::BlockEnv", + "gas_limit" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn gasprice(interpreter: &mut Interpreter, host: &mut H) { + gas!(interpreter, gas::BASE); + push!(interpreter, host.env().effective_gas_price()); + } + *) + Definition gasprice (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::env::Env", + "effective_gas_price", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn basefee(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, LONDON); + gas!(interpreter, gas::BASE); + push!(interpreter, host.env().block.basefee); + } + *) + Definition basefee (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::LONDON" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "block" + |), + "revm_primitives::env::BlockEnv", + "basefee" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn origin(interpreter: &mut Interpreter, host: &mut H) { + gas!(interpreter, gas::BASE); + push_b256!(interpreter, host.env().tx.caller.into_word()); + } + *) + Definition origin (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_b256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "into_word", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "tx" + |), + "revm_primitives::env::TxEnv", + "caller" + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn blob_hash(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, CANCUN); + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, index); + let i = as_usize_saturated!(index); + *index = match host.env().tx.blob_hashes.get(i) { + Some(hash) => U256::from_be_bytes(hash.0), + None => U256::ZERO, + }; + } + *) + Definition blob_hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::CANCUN" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let index := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let i := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ M.read (| index |) ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + let _ := + M.write (| + M.read (| index |), + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "alloy_primitives::bits::fixed::FixedBytes" ], + "get", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bits::fixed::FixedBytes"; + Ty.path "alloc::alloc::Global" + ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "tx" + |), + "revm_primitives::env::TxEnv", + "blob_hashes" + |) + ] + |); + M.read (| i |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let hash := M.copy (| γ0_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from_be_bytes", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.read (| hash |), + "alloy_primitives::bits::fixed::FixedBytes", + 0 + |) + |) + ] + |) + |))); + fun γ => ltac:(M.monadic (M.get_constant (| "ruint::ZERO" |))) + ] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn blob_basefee(interpreter: &mut Interpreter, host: &mut H) { + check!(interpreter, CANCUN); + gas!(interpreter, gas::BASE); + push!( + interpreter, + U256::from(host.env().block.get_blob_gasprice().unwrap_or_default()) + ); + } + *) + Definition blob_basefee (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::CANCUN" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "u128" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "u128" ], + "unwrap_or_default", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::env::BlockEnv", + "get_blob_gasprice", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.call_closure (| + M.get_trait_method (| + "revm_interpreter::host::Host", + H, + [], + "env", + [] + |), + [ M.read (| host |) ] + |), + "revm_primitives::env::Env", + "block" + |) + ] + |) + ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + End host_env. +End instructions. diff --git a/CoqOfRust/revm/instructions/i256.v b/CoqOfRust/revm/instructions/i256.v new file mode 100644 index 000000000..e18e25231 --- /dev/null +++ b/CoqOfRust/revm/instructions/i256.v @@ -0,0 +1,1189 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module i256. + (* + Enum Sign + { + ty_params := []; + variants := + [ + { + name := "Minus"; + item := StructTuple []; + discriminant := None; + }; + { + name := "Zero"; + item := StructTuple []; + discriminant := Some 0; + }; + { + name := "Plus"; + item := StructTuple []; + discriminant := Some 1; + } + ]; + } + *) + + Module Impl_core_clone_Clone_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| M.read (| self |) |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_instructions_i256_Sign. + + Module Impl_core_marker_Copy_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_instructions_i256_Sign. + + Module Impl_core_fmt_Debug_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), + [ + M.read (| f |); + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "Minus" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "Zero" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "Plus" |) |) |))) + ] + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_instructions_i256_Sign. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_instructions_i256_Sign. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_instructions_i256_Sign. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_instructions_i256_Sign. + + Module Impl_core_cmp_Eq_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_instructions_i256_Sign. + + Module Impl_core_cmp_PartialOrd_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + (* PartialOrd *) + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "i8", + [ Ty.path "i8" ], + "partial_cmp", + [] + |), + [ __self_tag; __arg1_tag ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialOrd" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("partial_cmp", InstanceField.Method partial_cmp) ]. + End Impl_core_cmp_PartialOrd_for_revm_interpreter_instructions_i256_Sign. + + Module Impl_core_cmp_Ord_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + (* Ord *) + Definition cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "i8", [], "cmp", [] |), + [ __self_tag; __arg1_tag ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Ord" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("cmp", InstanceField.Method cmp) ]. + End Impl_core_cmp_Ord_for_revm_interpreter_instructions_i256_Sign. + + Module Impl_core_hash_Hash_for_revm_interpreter_instructions_i256_Sign. + Definition Self : Ty.t := Ty.path "revm_interpreter::instructions::i256::Sign". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "i8", [], "hash", [ __H ] |), + [ __self_tag; M.read (| state |) ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_instructions_i256_Sign. + + Definition value_MAX_POSITIVE_VALUE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "from_limbs", [] |), + [ + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 18446744073709551615 |)); + A.to_value (M.of_value (| Value.Integer 18446744073709551615 |)); + A.to_value (M.of_value (| Value.Integer 18446744073709551615 |)); + A.to_value (M.of_value (| Value.Integer 9223372036854775807 |)) + ] + |) + ] + |) + |))). + + Definition value_MIN_NEGATIVE_VALUE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "from_limbs", [] |), + [ + M.of_value (| + Value.Array + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 9223372036854775808 |)) + ] + |) + ] + |) + |))). + + Definition value_FLIPH_BITMASK_U64 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 9223372036854775807 |) |))). + + (* + pub fn i256_sign(val: &U256) -> Sign { + if val.bit(U256::BITS - 1) { + Sign::Minus + } else { + // SAFETY: false == 0 == Zero, true == 1 == Plus + unsafe { core::mem::transmute( *val != U256::ZERO) } + } + } + *) + Definition i256_sign (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ val ] => + ltac:(M.monadic + (let val := M.alloc (| val |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + 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" |) |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.of_value (| + Value.StructTuple "revm_interpreter::instructions::i256::Sign::Minus" [] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::transmute", + [ Ty.path "bool"; Ty.path "revm_interpreter::instructions::i256::Sign" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "ne", + [] + |), + [ M.read (| val |); M.get_constant (| "ruint::ZERO" |) ] + |) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + pub fn i256_sign_compl(val: &mut U256) -> Sign { + let sign = i256_sign(val); + if sign == Sign::Minus { + two_compl_mut(val); + } + sign + } + *) + Definition i256_sign_compl (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ val ] => + ltac:(M.monadic + (let val := M.alloc (| val |) in + M.read (| + let sign := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::instructions::i256::i256_sign", [] |), + [ M.read (| val |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instructions::i256::Sign", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ], + "eq", + [] + |), + [ + sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Minus" + [] + |) + |) + ] + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::two_compl_mut", + [] + |), + [ M.read (| val |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + sign + |))) + | _, _ => M.impossible + end. + + (* + fn u256_remove_sign(val: &mut U256) { + // SAFETY: U256 does not have any padding bytes + unsafe { + val.as_limbs_mut()[3] &= FLIPH_BITMASK_U64; + } + } + *) + Definition u256_remove_sign (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ val ] => + ltac:(M.monadic + (let val := M.alloc (| val |) in + M.read (| + let _ := + let β := + M.SubPointer.get_array_field (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs_mut", [] |), + [ M.read (| val |) ] + |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) in + M.write (| + β, + BinOp.Pure.bit_and (| + M.read (| β |), + M.read (| + M.get_constant (| "revm_interpreter::instructions::i256::FLIPH_BITMASK_U64" |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + (* + pub fn two_compl_mut(op: &mut U256) { + *op = two_compl( *op); + } + *) + Definition two_compl_mut (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ op ] => + ltac:(M.monadic + (let op := M.alloc (| op |) in + M.read (| + let _ := + M.write (| + M.read (| op |), + M.call_closure (| + M.get_function (| "revm_interpreter::instructions::i256::two_compl", [] |), + [ M.read (| M.read (| op |) |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + (* + pub fn two_compl(op: U256) -> U256 { + op.wrapping_neg() + } + *) + Definition two_compl (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ op ] => + ltac:(M.monadic + (let op := M.alloc (| op |) in + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "wrapping_neg", [] |), + [ M.read (| op |) ] + |))) + | _, _ => M.impossible + end. + + (* + pub fn i256_cmp(first: &U256, second: &U256) -> Ordering { + let first_sign = i256_sign(first); + let second_sign = i256_sign(second); + match first_sign.cmp(&second_sign) { + // note: adding `if first_sign != Sign::Zero` to short circuit zero comparisons performs + // slower on average, as of #582 + Ordering::Equal => first.cmp(second), + o => o, + } + } + *) + Definition i256_cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ first; second ] => + ltac:(M.monadic + (let first := M.alloc (| first |) in + let second := M.alloc (| second |) in + M.read (| + let first_sign := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::instructions::i256::i256_sign", [] |), + [ M.read (| first |) ] + |) + |) in + let second_sign := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::instructions::i256::i256_sign", [] |), + [ M.read (| second |) ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "revm_interpreter::instructions::i256::Sign", + [], + "cmp", + [] + |), + [ first_sign; second_sign ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "ruint::Uint", + [], + "cmp", + [] + |), + [ M.read (| first |); M.read (| second |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (let o := M.copy (| γ |) in + o)) + ] + |) + |))) + | _, _ => M.impossible + end. + + (* + pub fn i256_div(mut first: U256, mut second: U256) -> U256 { + let second_sign = i256_sign_compl(&mut second); + if second_sign == Sign::Zero { + return U256::ZERO; + } + + let first_sign = i256_sign_compl(&mut first); + if first == MIN_NEGATIVE_VALUE && second == U256::from(1) { + return two_compl(MIN_NEGATIVE_VALUE); + } + + // necessary overflow checks are done above, perform the division + let mut d = first / second; + + // set sign bit to zero + u256_remove_sign(&mut d); + + // two's complement only if the signs are different + // note: this condition has better codegen than an exhaustive match, as of #582 + if (first_sign == Sign::Minus && second_sign != Sign::Minus) + || (second_sign == Sign::Minus && first_sign != Sign::Minus) + { + two_compl(d) + } else { + d + } + } + *) + Definition i256_div (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ first; second ] => + ltac:(M.monadic + (let first := M.alloc (| first |) in + let second := M.alloc (| second |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let second_sign := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::i256_sign_compl", + [] + |), + [ second ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instructions::i256::Sign", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ], + "eq", + [] + |), + [ + second_sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Zero" + [] + |) + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| M.read (| M.get_constant (| "ruint::ZERO" |) |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let first_sign := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::i256_sign_compl", + [] + |), + [ first ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + first; + M.get_constant (| + "revm_interpreter::instructions::i256::MIN_NEGATIVE_VALUE" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + second; + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "i32" ] + |), + [ M.of_value (| Value.Integer 1 |) ] + |) + |) + ] + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::two_compl", + [] + |), + [ + M.read (| + M.get_constant (| + "revm_interpreter::instructions::i256::MIN_NEGATIVE_VALUE" + |) + |) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let d := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Div", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "div", + [] + |), + [ M.read (| first |); M.read (| second |) ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::u256_remove_sign", + [] + |), + [ d ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instructions::i256::Sign", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ], + "eq", + [] + |), + [ + first_sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Minus" + [] + |) + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instructions::i256::Sign", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ], + "ne", + [] + |), + [ + second_sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Minus" + [] + |) + |) + ] + |))) + |), + ltac:(M.monadic + (LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instructions::i256::Sign", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ], + "eq", + [] + |), + [ + second_sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Minus" + [] + |) + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instructions::i256::Sign", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ], + "ne", + [] + |), + [ + first_sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Minus" + [] + |) + |) + ] + |))) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::two_compl", + [] + |), + [ M.read (| d |) ] + |) + |))); + fun γ => ltac:(M.monadic d) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn i256_mod(mut first: U256, mut second: U256) -> U256 { + let first_sign = i256_sign_compl(&mut first); + if first_sign == Sign::Zero { + return U256::ZERO; + } + + let second_sign = i256_sign_compl(&mut second); + if second_sign == Sign::Zero { + return U256::ZERO; + } + + let mut r = first % second; + + // set sign bit to zero + u256_remove_sign(&mut r); + + if first_sign == Sign::Minus { + two_compl(r) + } else { + r + } + } + *) + Definition i256_mod (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ first; second ] => + ltac:(M.monadic + (let first := M.alloc (| first |) in + let second := M.alloc (| second |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let first_sign := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::i256_sign_compl", + [] + |), + [ first ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instructions::i256::Sign", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ], + "eq", + [] + |), + [ + first_sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Zero" + [] + |) + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| M.read (| M.get_constant (| "ruint::ZERO" |) |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let second_sign := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::i256_sign_compl", + [] + |), + [ second ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instructions::i256::Sign", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ], + "eq", + [] + |), + [ + second_sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Zero" + [] + |) + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| M.read (| M.get_constant (| "ruint::ZERO" |) |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let r := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Rem", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "rem", + [] + |), + [ M.read (| first |); M.read (| second |) ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::u256_remove_sign", + [] + |), + [ r ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instructions::i256::Sign", + [ Ty.path "revm_interpreter::instructions::i256::Sign" ], + "eq", + [] + |), + [ + first_sign; + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instructions::i256::Sign::Minus" + [] + |) + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::i256::two_compl", + [] + |), + [ M.read (| r |) ] + |) + |))); + fun γ => ltac:(M.monadic r) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + End i256. +End instructions. diff --git a/CoqOfRust/revm/instructions/memory.v b/CoqOfRust/revm/instructions/memory.v new file mode 100644 index 000000000..d840e4f92 --- /dev/null +++ b/CoqOfRust/revm/instructions/memory.v @@ -0,0 +1,2141 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module memory. + (* + pub fn mload(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, top); + let offset = as_usize_or_fail!(interpreter, top); + resize_memory!(interpreter, offset, 32); + *top = interpreter.shared_memory.get_u256(offset); + } + *) + Definition mload (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let top := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), + [ M.read (| top |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 2 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let new_size := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), + [ M.read (| offset |); M.of_value (| Value.Integer 32 |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.read (| top |), + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "get_u256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| offset |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn mstore(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop!(interpreter, offset, value); + let offset = as_usize_or_fail!(interpreter, offset); + resize_memory!(interpreter, offset, 32); + interpreter.shared_memory.set_u256(offset, value); + } + *) + Definition mstore (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 offset := M.copy (| γ0_0 |) in + let value := M.copy (| γ0_1 |) in + let offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let new_size := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), + [ M.read (| offset |); M.of_value (| Value.Integer 32 |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set_u256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| offset |); + M.read (| value |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn mstore8(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop!(interpreter, offset, value); + let offset = as_usize_or_fail!(interpreter, offset); + resize_memory!(interpreter, offset, 1); + interpreter.shared_memory.set_byte(offset, value.byte(0)) + } + *) + Definition mstore8 (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop2_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 offset := M.copy (| γ0_0 |) in + let value := M.copy (| γ0_1 |) in + let offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let new_size := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), + [ M.read (| offset |); M.of_value (| Value.Integer 1 |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set_byte", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| offset |); + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "byte", [] |), + [ value; M.of_value (| Value.Integer 0 |) ] + |) + ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn msize(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::BASE); + push!(interpreter, U256::from(interpreter.shared_memory.len())); + } + *) + Definition msize (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn mcopy(interpreter: &mut Interpreter, _host: &mut H) { + check!(interpreter, CANCUN); + pop!(interpreter, dst, src, len); + + // into usize or fail + let len = as_usize_or_fail!(interpreter, len); + // deduce gas + gas_or_fail!(interpreter, gas::verylowcopy_cost(len as u64)); + if len == 0 { + return; + } + + let dst = as_usize_or_fail!(interpreter, dst); + let src = as_usize_or_fail!(interpreter, src); + // resize memory + resize_memory!(interpreter, max(dst, src), len); + // copy memory in place + interpreter.shared_memory.copy(dst, src, len); + } + *) + Definition mcopy (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::CANCUN" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 3 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop3_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let dst := M.copy (| γ0_0 |) in + let src := M.copy (| γ0_1 |) in + let len := M.copy (| γ0_2 |) in + let len := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ len ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::verylowcopy_cost", + [] + |), + [ M.rust_cast (| M.read (| len |) |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let dst := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ dst ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let src := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ src ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let new_size := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), + [ + M.call_closure (| + M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), + [ M.read (| dst |); M.read (| src |) ] + |); + M.read (| len |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "copy", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| dst |); + M.read (| src |); + M.read (| len |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + End memory. +End instructions. diff --git a/CoqOfRust/revm/instructions/stack.v b/CoqOfRust/revm/instructions/stack.v new file mode 100644 index 000000000..e19717c95 --- /dev/null +++ b/CoqOfRust/revm/instructions/stack.v @@ -0,0 +1,1373 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module stack. + (* + pub fn pop(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::BASE); + if let Err(result) = interpreter.stack.pop() { + interpreter.instruction_result = result; + } + } + *) + Definition pop (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let result := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| result |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn push0(interpreter: &mut Interpreter, _host: &mut H) { + check!(interpreter, SHANGHAI); + gas!(interpreter, gas::BASE); + if let Err(result) = interpreter.stack.push(U256::ZERO) { + interpreter.instruction_result = result; + } + } + *) + Definition push0 (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::SHANGHAI" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| M.get_constant (| "ruint::ZERO" |) |) + ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let result := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| result |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn push(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + // SAFETY: In analysis we append trailing bytes to the bytecode so that this is safe to do + // without bounds checking. + let ip = interpreter.instruction_pointer; + if let Err(result) = interpreter + .stack + .push_slice(unsafe { core::slice::from_raw_parts(ip, N) }) + { + interpreter.instruction_result = result; + return; + } + interpreter.instruction_pointer = unsafe { ip.add(N) }; + } + *) + Definition push (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let ip := + M.copy (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_slice", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_function (| + "core::slice::raw::from_raw_parts", + [ Ty.path "u8" ] + |), + [ + M.read (| ip |); + M.read (| + M.get_constant (| + "revm_interpreter::instructions::stack::push::N" + |) + |) + ] + |) + ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let result := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| result |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "add", + [] + |), + [ + M.read (| ip |); + M.read (| + M.get_constant (| "revm_interpreter::instructions::stack::push::N" |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn dup(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + if let Err(result) = interpreter.stack.dup(N) { + interpreter.instruction_result = result; + } + } + *) + Definition dup (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "dup", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.get_constant (| + "revm_interpreter::instructions::stack::dup::N" + |) + |) + ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let result := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| result |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn swap(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + if let Err(result) = interpreter.stack.swap(N) { + interpreter.instruction_result = result; + } + } + *) + Definition swap (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "swap", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.get_constant (| + "revm_interpreter::instructions::stack::swap::N" + |) + |) + ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let result := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| result |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn dupn(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::VERYLOW); + let imm = unsafe { *interpreter.instruction_pointer }; + if let Err(result) = interpreter.stack.dup(imm as usize + 1) { + interpreter.instruction_result = result; + } + interpreter.instruction_pointer = unsafe { interpreter.instruction_pointer.offset(1) }; + } + *) + Definition dupn (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let imm := + M.copy (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "dup", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + BinOp.Panic.add (| + Integer.Usize, + M.rust_cast (| M.read (| imm |) |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let result := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| result |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn swapn(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::VERYLOW); + let imm = unsafe { *interpreter.instruction_pointer }; + if let Err(result) = interpreter.stack.swap(imm as usize + 1) { + interpreter.instruction_result = result; + } + interpreter.instruction_pointer = unsafe { interpreter.instruction_pointer.offset(1) }; + } + *) + Definition swapn (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let imm := + M.copy (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "swap", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + BinOp.Panic.add (| + Integer.Usize, + M.rust_cast (| M.read (| imm |) |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let result := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| result |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn exchange(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::VERYLOW); + let imm = unsafe { *interpreter.instruction_pointer }; + let n = (imm >> 4) + 1; + let m = (imm & 0x0F) + 1; + if let Err(result) = interpreter.stack.exchange(n as usize, m as usize) { + interpreter.instruction_result = result; + } + + interpreter.instruction_pointer = unsafe { interpreter.instruction_pointer.offset(1) }; + } + *) + Definition exchange (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let imm := + M.copy (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + |) in + let n := + M.alloc (| + BinOp.Panic.add (| + Integer.U8, + BinOp.Panic.shr (| M.read (| imm |), M.of_value (| Value.Integer 4 |) |), + M.of_value (| Value.Integer 1 |) + |) + |) in + let m := + M.alloc (| + BinOp.Panic.add (| + Integer.U8, + BinOp.Pure.bit_and (| M.read (| imm |), M.of_value (| Value.Integer 15 |) |), + M.of_value (| Value.Integer 1 |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "exchange", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.rust_cast (| M.read (| n |) |); + M.rust_cast (| M.read (| m |) |) + ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let result := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| result |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + End stack. +End instructions. diff --git a/CoqOfRust/revm/instructions/system.v b/CoqOfRust/revm/instructions/system.v new file mode 100644 index 000000000..a757e89fc --- /dev/null +++ b/CoqOfRust/revm/instructions/system.v @@ -0,0 +1,5487 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module system. + (* + pub fn keccak256(interpreter: &mut Interpreter, _host: &mut H) { + pop_top!(interpreter, offset, len_ptr); + let len = as_usize_or_fail!(interpreter, len_ptr); + gas_or_fail!(interpreter, gas::keccak256_cost(len as u64)); + let hash = if len == 0 { + KECCAK_EMPTY + } else { + let from = as_usize_or_fail!(interpreter, offset); + resize_memory!(interpreter, from, len); + crate::primitives::keccak256(interpreter.shared_memory.slice(from, len)) + }; + *len_ptr = hash.into(); + } + *) + Definition keccak256 (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 2 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 offset := M.copy (| γ0_0 |) in + let len_ptr := M.copy (| γ0_1 |) in + let len := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ M.read (| len_ptr |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::keccak256_cost", + [] + |), + [ M.rust_cast (| M.read (| len |) |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let hash := + M.copy (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.get_constant (| + "revm_primitives::utilities::KECCAK_EMPTY" + |))); + fun γ => + ltac:(M.monadic + (let from := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| + Value.Integer 2 + |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let new_size := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_add", + [] + |), + [ M.read (| from |); M.read (| len |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.call_closure (| + M.get_function (| + "alloy_primitives::utils::keccak256", + [ + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ] + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| from |); + M.read (| len |) + ] + |) + ] + |) + |))) + ] + |) + |) in + let _ := + M.write (| + M.read (| len_ptr |), + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "into", + [] + |), + [ M.read (| hash |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn address(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::BASE); + push_b256!(interpreter, interpreter.contract.target_address.into_word()); + } + *) + Definition address (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_b256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "into_word", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn caller(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::BASE); + push_b256!(interpreter, interpreter.contract.caller.into_word()); + } + *) + Definition caller (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_b256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "into_word", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "caller" + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn codesize(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::BASE); + // Inform the optimizer that the bytecode cannot be EOF to remove a bounds check. + assume!(!interpreter.contract.bytecode.is_eof()); + push!(interpreter, U256::from(interpreter.contract.bytecode.len())); + } + *) + Definition codesize (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "is_eof", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::panicking::panic_fmt", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: !interpreter.contract.bytecode.is_eof()" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "none", + [] + |), + [] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::hint::unreachable_unchecked", + [] + |), + [] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn codecopy(interpreter: &mut Interpreter, _host: &mut H) { + pop!(interpreter, memory_offset, code_offset, len); + let len = as_usize_or_fail!(interpreter, len); + gas_or_fail!(interpreter, gas::verylowcopy_cost(len as u64)); + if len == 0 { + return; + } + let memory_offset = as_usize_or_fail!(interpreter, memory_offset); + let code_offset = as_usize_saturated!(code_offset); + resize_memory!(interpreter, memory_offset, len); + + // Inform the optimizer that the bytecode cannot be EOF to remove a bounds check. + assume!(!interpreter.contract.bytecode.is_eof()); + // Note: this can't panic because we resized memory to fit. + interpreter.shared_memory.set_data( + memory_offset, + code_offset, + len, + &interpreter.contract.bytecode.original_bytes(), + ); + } + *) + Definition codecopy (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 3 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop3_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + 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 := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ len ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::verylowcopy_cost", + [] + |), + [ M.rust_cast (| M.read (| len |) |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let memory_offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ memory_offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let code_offset := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ code_offset ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => + ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "is_eof", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.of_value (| Value.Bool true |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::panicking::panic_fmt", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: !interpreter.contract.bytecode.is_eof()" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "none", + [] + |), + [] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::hint::unreachable_unchecked", + [] + |), + [] + |) + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set_data", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| memory_offset |); + M.read (| code_offset |); + M.read (| len |); + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "original_bytes", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |) + |) + ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn calldataload(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, offset_ptr); + let mut word = B256::ZERO; + let offset = as_usize_saturated!(offset_ptr); + if offset < interpreter.contract.input.len() { + let count = 32.min(interpreter.contract.input.len() - offset); + // SAFETY: count is bounded by the calldata length. + // This is `word[..count].copy_from_slice(input[offset..offset + count])`, written using + // raw pointers as apparently the compiler cannot optimize the slice version, and using + // `get_unchecked` twice is uglier. + debug_assert!(count <= 32 && offset + count <= interpreter.contract.input.len()); + unsafe { + ptr::copy_nonoverlapping( + interpreter.contract.input.as_ptr().add(offset), + word.as_mut_ptr(), + count, + ) + }; + } + *offset_ptr = word.into(); + } + *) + Definition calldataload (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let offset_ptr := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let word := + M.copy (| M.get_constant (| "alloy_primitives::bits::fixed::ZERO" |) |) in + let offset := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ M.read (| offset_ptr |) ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| offset |), + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "input" + |) + ] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let count := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "usize", + [], + "min", + [] + |), + [ + M.of_value (| Value.Integer 32 |); + BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "input" + |) + ] + |) + ] + |), + M.read (| offset |) + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.le (| + M.read (| count |), + M.of_value (| Value.Integer 32 |) + |), + ltac:(M.monadic + (BinOp.Pure.le (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| offset |), + M.read (| count |) + |), + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path + "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "input" + |) + ] + |) + ] + |) + |))) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::panicking::panic", + [] + |), + [ + M.read (| + M.of_value (| + Value.String + "assertion failed: count <= 32 && offset + count <= interpreter.contract.input.len()" + |) + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::copy_nonoverlapping", + [ Ty.path "u8" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "input" + |) + ] + |) + ] + |) + ] + |); + M.read (| offset |) + ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_mut_ptr", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [], + "deref_mut", + [] + |), + [ word ] + |) + |) + ] + |); + M.read (| count |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.read (| offset_ptr |), + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "into", + [] + |), + [ M.read (| word |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn calldatasize(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::BASE); + push!(interpreter, U256::from(interpreter.contract.input.len())); + } + *) + Definition calldatasize (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "input" + |) + ] + |) + ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn callvalue(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::BASE); + push!(interpreter, interpreter.contract.call_value); + } + *) + Definition callvalue (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "call_value" + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn calldatacopy(interpreter: &mut Interpreter, _host: &mut H) { + pop!(interpreter, memory_offset, data_offset, len); + let len = as_usize_or_fail!(interpreter, len); + gas_or_fail!(interpreter, gas::verylowcopy_cost(len as u64)); + if len == 0 { + return; + } + let memory_offset = as_usize_or_fail!(interpreter, memory_offset); + let data_offset = as_usize_saturated!(data_offset); + resize_memory!(interpreter, memory_offset, len); + + // Note: this can't panic because we resized memory to fit. + interpreter.shared_memory.set_data( + memory_offset, + data_offset, + len, + &interpreter.contract.input, + ); + } + *) + Definition calldatacopy (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 3 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop3_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + 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 := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ len ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::verylowcopy_cost", + [] + |), + [ M.rust_cast (| M.read (| len |) |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| M.return_ (| M.of_value (| Value.Tuple [] |) |) |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let memory_offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ memory_offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let data_offset := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ data_offset ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => + ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set_data", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| memory_offset |); + M.read (| data_offset |); + M.read (| len |); + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "input" + |) + ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn returndatasize(interpreter: &mut Interpreter, _host: &mut H) { + check!(interpreter, BYZANTIUM); + gas!(interpreter, gas::BASE); + push!( + interpreter, + U256::from(interpreter.return_data_buffer.len()) + ); + } + *) + Definition returndatasize (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BYZANTIUM" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |) + ] + |) + ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn returndatacopy(interpreter: &mut Interpreter, _host: &mut H) { + check!(interpreter, BYZANTIUM); + pop!(interpreter, memory_offset, offset, len); + let len = as_usize_or_fail!(interpreter, len); + gas_or_fail!(interpreter, gas::verylowcopy_cost(len as u64)); + let data_offset = as_usize_saturated!(offset); + let data_end = data_offset.saturating_add(len); + if data_end > interpreter.return_data_buffer.len() { + interpreter.instruction_result = InstructionResult::OutOfOffset; + return; + } + if len != 0 { + let memory_offset = as_usize_or_fail!(interpreter, memory_offset); + resize_memory!(interpreter, memory_offset, len); + interpreter.shared_memory.set( + memory_offset, + &interpreter.return_data_buffer[data_offset..data_end], + ); + } + } + *) + Definition returndatacopy (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_trait_method (| + "revm_primitives::specification::Spec", + SPEC, + [], + "enabled", + [] + |), + [ + M.of_value (| + Value.StructTuple + "revm_primitives::specification::SpecId::BYZANTIUM" + [] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 3 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop3_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |), + [ + 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 γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in + let memory_offset := M.copy (| γ0_0 |) in + let offset := M.copy (| γ0_1 |) in + let len := M.copy (| γ0_2 |) in + let len := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ len ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::gas::calc::verylowcopy_cost", + [] + |), + [ M.rust_cast (| M.read (| len |) |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let gas_used := M.copy (| γ0_0 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| gas_used |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let data_offset := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ Ty.path "usize"; Ty.path "core::num::error::TryFromIntError" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ offset ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + LogicalOp.and (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |))); + fun γ => + ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + ] + |) + |) + ] + |); + M.read (| M.get_constant (| "core::num::MAX" |) |) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| data_end |), + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |) + ] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfOffset" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.read (| len |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let memory_offset := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "as_limbs", + [] + |), + [ memory_offset ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 1 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 2 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| + M.of_value (| Value.Integer 3 |) + |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + 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 _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_size |), + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::resize_memory", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + [] + |) + |) in + M.return_ (| + M.of_value (| Value.Tuple [] |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| memory_offset |); + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |) + ] + |) + ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| data_offset |))); + ("end_", A.to_value (M.read (| data_end |))) + ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn returndataload(interpreter: &mut Interpreter, _host: &mut H) { + require_eof!(interpreter); + gas!(interpreter, gas::VERYLOW); + pop_top!(interpreter, offset); + let offset_usize = as_usize_or_fail!(interpreter, offset); + if offset_usize.saturating_add(32) > interpreter.return_data_buffer.len() { + // TODO(EOF) proper error. + interpreter.instruction_result = InstructionResult::OutOfOffset; + return; + } + *offset = + B256::from_slice(&interpreter.return_data_buffer[offset_usize..offset_usize + 32]).into(); + } + *) + Definition returndataload (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::VERYLOW" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |), + M.of_value (| Value.Integer 1 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let offset := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + ] + |) + |) in + let offset_usize := + M.copy (| + let x := + M.alloc (| + M.call_closure (| + M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), + [ M.read (| offset |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 1 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 2 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 3 |) |) + |) + |), + M.of_value (| Value.Integer 0 |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::convert::TryFrom", + Ty.path "usize", + [ Ty.path "u64" ], + "try_from", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| x |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + let val := M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.call_closure (| + M.get_associated_function (| + Ty.path "usize", + "saturating_add", + [] + |), + [ M.read (| offset_usize |); M.of_value (| Value.Integer 32 |) ] + |), + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |) + ] + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfOffset" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.read (| offset |), + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "into", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + "from_slice", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |) + ] + |) + ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| offset_usize |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| offset_usize |), + M.of_value (| Value.Integer 32 |) + |))) + ] + |) + ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn gas(interpreter: &mut Interpreter, _host: &mut H) { + gas!(interpreter, gas::BASE); + push!(interpreter, U256::from(interpreter.gas.remaining())); + } + *) + Definition gas (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H ], [ interpreter; _host ] => + ltac:(M.monadic + (let interpreter := M.alloc (| interpreter |) in + let _host := M.alloc (| _host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| + M.get_constant (| + "revm_interpreter::gas::constants::BASE" + |) + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + [] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "u64" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |) + ] + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| interpreter |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + End system. +End instructions. diff --git a/CoqOfRust/revm/instructions/utility.v b/CoqOfRust/revm/instructions/utility.v new file mode 100644 index 000000000..20803c1fe --- /dev/null +++ b/CoqOfRust/revm/instructions/utility.v @@ -0,0 +1,100 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module instructions. + Module utility. + (* + pub(crate) unsafe fn read_i16(ptr: *const u8) -> i16 { + i16::from_be_bytes(core::slice::from_raw_parts(ptr, 2).try_into().unwrap()) + } + *) + Definition read_i16 (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ ptr ] => + ltac:(M.monadic + (let ptr := M.alloc (| ptr |) in + M.call_closure (| + M.get_associated_function (| Ty.path "i16", "from_be_bytes", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply (Ty.path "array") [ Ty.path "u8" ]; + Ty.path "core::array::TryFromSliceError" + ], + "unwrap", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryInto", + Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], + "try_into", + [] + |), + [ + M.call_closure (| + M.get_function (| "core::slice::raw::from_raw_parts", [ Ty.path "u8" ] |), + [ M.read (| ptr |); M.of_value (| Value.Integer 2 |) ] + |) + ] + |) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + + (* + pub(crate) unsafe fn read_u16(ptr: *const u8) -> u16 { + u16::from_be_bytes(core::slice::from_raw_parts(ptr, 2).try_into().unwrap()) + } + *) + Definition read_u16 (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ ptr ] => + ltac:(M.monadic + (let ptr := M.alloc (| ptr |) in + M.call_closure (| + M.get_associated_function (| Ty.path "u16", "from_be_bytes", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply (Ty.path "array") [ Ty.path "u8" ]; + Ty.path "core::array::TryFromSliceError" + ], + "unwrap", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryInto", + Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ], + "try_into", + [] + |), + [ + M.call_closure (| + M.get_function (| "core::slice::raw::from_raw_parts", [ Ty.path "u8" ] |), + [ M.read (| ptr |); M.of_value (| Value.Integer 2 |) ] + |) + ] + |) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + End utility. +End instructions. diff --git a/CoqOfRust/revm/interpreter.v b/CoqOfRust/revm/interpreter.v new file mode 100644 index 000000000..6cc3700c8 --- /dev/null +++ b/CoqOfRust/revm/interpreter.v @@ -0,0 +1,3582 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter. + (* StructRecord + { + name := "Interpreter"; + ty_params := []; + fields := + [ + ("instruction_pointer", Ty.apply (Ty.path "*const") [ Ty.path "u8" ]); + ("gas", Ty.path "revm_interpreter::gas::Gas"); + ("contract", Ty.path "revm_interpreter::interpreter::contract::Contract"); + ("instruction_result", Ty.path "revm_interpreter::instruction_result::InstructionResult"); + ("bytecode", Ty.path "alloy_primitives::bytes_::Bytes"); + ("is_eof", Ty.path "bool"); + ("is_eof_init", Ty.path "bool"); + ("shared_memory", Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory"); + ("stack", Ty.path "revm_interpreter::interpreter::stack::Stack"); + ("function_stack", Ty.path "revm_interpreter::function_stack::FunctionStack"); + ("return_data_buffer", Ty.path "alloy_primitives::bytes_::Bytes"); + ("is_static", Ty.path "bool"); + ("next_action", Ty.path "revm_interpreter::interpreter_action::InterpreterAction") + ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_Interpreter. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::Interpreter". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.read (| + let names := + M.alloc (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "instruction_pointer" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "gas" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "contract" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "instruction_result" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "bytecode" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "is_eof" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "is_eof_init" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "shared_memory" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "stack" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "function_stack" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "return_data_buffer" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "is_static" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "next_action" |) |)) + ] + |) + |) + |) in + let values := + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "bytecode" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "is_eof" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "is_eof_init" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "function_stack" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "is_static" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |) + |) + |)) + ] + |) + |) + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_fields_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Interpreter" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| names |) |); + M.read (| values |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_Interpreter. + + Module Impl_core_default_Default_for_revm_interpreter_interpreter_Interpreter. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::Interpreter". + + (* + fn default() -> Self { + Self::new(Contract::default(), 0, false) + } + *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "new", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "revm_interpreter::interpreter::contract::Contract", + [], + "default", + [] + |), + [] + |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Bool false |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_interpreter_Interpreter. + + (* StructRecord + { + name := "InterpreterResult"; + ty_params := []; + fields := + [ + ("result", Ty.path "revm_interpreter::instruction_result::InstructionResult"); + ("output", Ty.path "alloy_primitives::bytes_::Bytes"); + ("gas", Ty.path "revm_interpreter::gas::Gas") + ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_InterpreterResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::InterpreterResult". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::InterpreterResult" + [ + ("result", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_interpreter::instruction_result::InstructionResult", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |) + ] + |))); + ("output", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "output" + |) + ] + |))); + ("gas", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_interpreter::gas::Gas", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "gas" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_InterpreterResult. + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_InterpreterResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::InterpreterResult". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field3_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "InterpreterResult" |) |); + M.read (| M.of_value (| Value.String "result" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |) + |); + M.read (| M.of_value (| Value.String "output" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "output" + |) + |); + M.read (| M.of_value (| Value.String "gas" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "gas" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_InterpreterResult. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_InterpreterResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::InterpreterResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_InterpreterResult. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_InterpreterResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::InterpreterResult". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::instruction_result::InstructionResult", + [ Ty.path "revm_interpreter::instruction_result::InstructionResult" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bytes_::Bytes", + [ Ty.path "alloy_primitives::bytes_::Bytes" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "output" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter::InterpreterResult", + "output" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::gas::Gas", + [ Ty.path "revm_interpreter::gas::Gas" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "gas" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter::InterpreterResult", + "gas" + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_InterpreterResult. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_InterpreterResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::InterpreterResult". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_InterpreterResult. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_InterpreterResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::InterpreterResult". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_InterpreterResult. + + Module Impl_revm_interpreter_interpreter_Interpreter. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::Interpreter". + + (* + pub fn new(contract: Contract, gas_limit: u64, is_static: bool) -> Self { + if !contract.bytecode.is_execution_ready() { + panic!("Contract is not execution ready {:?}", contract.bytecode); + } + let is_eof = contract.bytecode.is_eof(); + let bytecode = contract.bytecode.bytecode().clone(); + Self { + instruction_pointer: bytecode.as_ptr(), + bytecode, + contract, + gas: Gas::new(gas_limit), + instruction_result: InstructionResult::Continue, + function_stack: FunctionStack::default(), + is_static, + is_eof, + is_eof_init: false, + return_data_buffer: Bytes::new(), + shared_memory: EMPTY_SHARED_MEMORY, + stack: Stack::new(), + next_action: InterpreterAction::None, + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ contract; gas_limit; is_static ] => + ltac:(M.monadic + (let contract := M.alloc (| contract |) in + let gas_limit := M.alloc (| gas_limit |) in + let is_static := M.alloc (| is_static |) in + M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "is_execution_ready", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + contract, + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "Contract is not execution ready " + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_debug", + [ Ty.path "revm_primitives::bytecode::Bytecode" ] + |), + [ + M.SubPointer.get_struct_record_field (| + contract, + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let is_eof := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "is_eof", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + contract, + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |) + |) in + let bytecode := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "bytecode", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + contract, + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::Interpreter" + [ + ("instruction_pointer", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ bytecode ] + |) + ] + |) + ] + |))); + ("bytecode", A.to_value (M.read (| bytecode |))); + ("contract", A.to_value (M.read (| contract |))); + ("gas", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "new", + [] + |), + [ M.read (| gas_limit |) ] + |))); + ("instruction_result", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Continue" + [] + |))); + ("function_stack", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "revm_interpreter::function_stack::FunctionStack", + [], + "default", + [] + |), + [] + |))); + ("is_static", A.to_value (M.read (| is_static |))); + ("is_eof", A.to_value (M.read (| is_eof |))); + ("is_eof_init", A.to_value (M.of_value (| Value.Bool false |))); + ("return_data_buffer", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "new", + [] + |), + [] + |))); + ("shared_memory", + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::interpreter::shared_memory::EMPTY_SHARED_MEMORY" + |) + |))); + ("stack", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "new", + [] + |), + [] + |))); + ("next_action", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::InterpreterAction::None" + [] + |))) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn set_is_eof_init(&mut self) { + self.is_eof_init = true; + } + *) + Definition set_is_eof_init (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "is_eof_init" + |), + M.of_value (| Value.Bool true |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set_is_eof_init : + M.IsAssociatedFunction Self "set_is_eof_init" set_is_eof_init. + + (* + pub fn eof(&self) -> Option<&Eof> { + self.contract.bytecode.eof() + } + *) + Definition eof (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "eof", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_eof : M.IsAssociatedFunction Self "eof" eof. + + (* + pub(crate) fn load_eof_code(&mut self, idx: usize, pc: usize) { + // SAFETY: eof flag is true only if bytecode is Eof. + let Bytecode::Eof(eof) = &self.contract.bytecode else { + panic!("Expected EOF bytecode") + }; + let Some(code) = eof.body.code(idx) else { + panic!("Code not found") + }; + self.bytecode = code.clone(); + self.instruction_pointer = unsafe { self.bytecode.as_ptr().add(pc) }; + } + *) + Definition load_eof_code (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; idx; pc ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let idx := M.alloc (| idx |) in + let pc := M.alloc (| pc |) in + M.read (| + M.match_operator (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_primitives::bytecode::Bytecode::Eof", + 0 + |) in + let eof := M.alloc (| γ1_0 |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::eof::body::EofBody", + "code", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "body" + |); + M.read (| idx |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let code := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "bytecode" + |), + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ M.read (| code |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "bytecode" + |) + ] + |) + ] + |) + ] + |); + M.read (| pc |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_load_eof_code : + M.IsAssociatedFunction Self "load_eof_code" load_eof_code. + + (* + pub fn insert_create_outcome(&mut self, create_outcome: CreateOutcome) { + self.instruction_result = InstructionResult::Continue; + + let instruction_result = create_outcome.instruction_result(); + self.return_data_buffer = if instruction_result.is_revert() { + // Save data to return data buffer if the create reverted + create_outcome.output().to_owned() + } else { + // Otherwise clear it + Bytes::new() + }; + + match instruction_result { + return_ok!() => { + let address = create_outcome.address; + push_b256!(self, address.unwrap_or_default().into_word()); + self.gas.erase_cost(create_outcome.gas().remaining()); + self.gas.record_refund(create_outcome.gas().refunded()); + } + return_revert!() => { + push!(self, U256::ZERO); + self.gas.erase_cost(create_outcome.gas().remaining()); + } + InstructionResult::FatalExternalError => { + panic!("Fatal external error in insert_create_outcome"); + } + _ => { + push!(self, U256::ZERO); + } + } + } + *) + Definition insert_create_outcome (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; create_outcome ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let create_outcome := M.alloc (| create_outcome |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Continue" + [] + |) + |) in + let instruction_result := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "instruction_result", + [] + |), + [ create_outcome ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |), + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::instruction_result::InstructionResult", + "is_revert", + [] + |), + [ M.read (| M.read (| instruction_result |) |) ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "alloc::borrow::ToOwned", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "to_owned", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "output", + [] + |), + [ create_outcome ] + |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "new", + [] + |), + [] + |) + |))) + ] + |) + |) + |) in + M.match_operator (| + instruction_result, + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + let address := + M.copy (| + M.SubPointer.get_struct_record_field (| + create_outcome, + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "address" + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_b256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "into_word", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.path + "alloy_primitives::bits::address::Address" + ], + "unwrap_or_default", + [] + |), + [ M.read (| address |) ] + |) + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "erase_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "gas", + [] + |), + [ create_outcome ] + |) + ] + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_refund", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "refunded", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "gas", + [] + |), + [ create_outcome ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| M.get_constant (| "ruint::ZERO" |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "erase_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "gas", + [] + |), + [ create_outcome ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Fatal external error in insert_create_outcome" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| M.get_constant (| "ruint::ZERO" |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_insert_create_outcome : + M.IsAssociatedFunction Self "insert_create_outcome" insert_create_outcome. + + (* + pub fn insert_eofcreate_outcome(&mut self, create_outcome: EOFCreateOutcome) { + let instruction_result = create_outcome.instruction_result(); + + self.return_data_buffer = if *instruction_result == InstructionResult::Revert { + // Save data to return data buffer if the create reverted + create_outcome.output().to_owned() + } else { + // Otherwise clear it. Note that RETURN opcode should abort. + Bytes::new() + }; + + match instruction_result { + InstructionResult::ReturnContract => { + push_b256!(self, create_outcome.address.into_word()); + self.gas.erase_cost(create_outcome.gas().remaining()); + self.gas.record_refund(create_outcome.gas().refunded()); + } + return_revert!() => { + push!(self, U256::ZERO); + self.gas.erase_cost(create_outcome.gas().remaining()); + } + InstructionResult::FatalExternalError => { + panic!("Fatal external error in insert_eofcreate_outcome"); + } + _ => { + push!(self, U256::ZERO); + } + } + } + *) + Definition insert_eofcreate_outcome (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; create_outcome ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let create_outcome := M.alloc (| create_outcome |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let instruction_result := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "instruction_result", + [] + |), + [ create_outcome ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |), + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path + "revm_interpreter::instruction_result::InstructionResult", + [ + Ty.path + "revm_interpreter::instruction_result::InstructionResult" + ], + "eq", + [] + |), + [ + M.read (| instruction_result |); + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Revert" + [] + |) + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "alloc::borrow::ToOwned", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "to_owned", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "output", + [] + |), + [ create_outcome ] + |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "new", + [] + |), + [] + |) + |))) + ] + |) + |) + |) in + M.match_operator (| + instruction_result, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push_b256", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "into_word", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + create_outcome, + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "address" + |) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "erase_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "gas", + [] + |), + [ create_outcome ] + |) + ] + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_refund", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "refunded", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "gas", + [] + |), + [ create_outcome ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| M.get_constant (| "ruint::ZERO" |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "erase_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "gas", + [] + |), + [ create_outcome ] + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Fatal external error in insert_eofcreate_outcome" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| M.get_constant (| "ruint::ZERO" |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_insert_eofcreate_outcome : + M.IsAssociatedFunction Self "insert_eofcreate_outcome" insert_eofcreate_outcome. + + (* + pub fn insert_call_outcome( + &mut self, + shared_memory: &mut SharedMemory, + call_outcome: CallOutcome, + ) { + self.instruction_result = InstructionResult::Continue; + self.return_data_buffer.clone_from(call_outcome.output()); + + let out_offset = call_outcome.memory_start(); + let out_len = call_outcome.memory_length(); + + let target_len = min(out_len, self.return_data_buffer.len()); + match call_outcome.instruction_result() { + return_ok!() => { + // return unspend gas. + let remaining = call_outcome.gas().remaining(); + let refunded = call_outcome.gas().refunded(); + self.gas.erase_cost(remaining); + self.gas.record_refund(refunded); + shared_memory.set(out_offset, &self.return_data_buffer[..target_len]); + push!(self, U256::from(1)); + } + return_revert!() => { + self.gas.erase_cost(call_outcome.gas().remaining()); + shared_memory.set(out_offset, &self.return_data_buffer[..target_len]); + push!(self, U256::ZERO); + } + InstructionResult::FatalExternalError => { + panic!("Fatal external error in insert_call_outcome"); + } + _ => { + push!(self, U256::ZERO); + } + } + } + *) + Definition insert_call_outcome (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; shared_memory; call_outcome ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let shared_memory := M.alloc (| shared_memory |) in + let call_outcome := M.alloc (| call_outcome |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Continue" + [] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone_from", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "output", + [] + |), + [ call_outcome ] + |) + ] + |) + |) in + let out_offset := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "memory_start", + [] + |), + [ call_outcome ] + |) + |) in + let out_len := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "memory_length", + [] + |), + [ call_outcome ] + |) + |) in + let target_len := + M.alloc (| + M.call_closure (| + M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), + [ + M.read (| out_len |); + M.call_closure (| + M.get_associated_function (| Ty.path "bytes::bytes::Bytes", "len", [] |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |) + ] + |) + ] + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "instruction_result", + [] + |), + [ call_outcome ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + let remaining := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "gas", + [] + |), + [ call_outcome ] + |) + |) + ] + |) + |) in + let refunded := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "refunded", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "gas", + [] + |), + [ call_outcome ] + |) + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "erase_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| remaining |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_refund", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| refunded |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set", + [] + |), + [ + M.read (| shared_memory |); + M.read (| out_offset |); + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |) + ] + |) + ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| target_len |))) ] + |) + ] + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "from", + [ Ty.path "i32" ] + |), + [ M.of_value (| Value.Integer 1 |) ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "erase_cost", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "remaining", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "gas", + [] + |), + [ call_outcome ] + |) + |) + ] + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set", + [] + |), + [ + M.read (| shared_memory |); + M.read (| out_offset |); + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeTo") + [ Ty.path "usize" ] + ], + "index", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "return_data_buffer" + |) + ] + |) + ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::RangeTo" + [ ("end_", A.to_value (M.read (| target_len |))) ] + |) + ] + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| M.get_constant (| "ruint::ZERO" |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Fatal external error in insert_call_outcome" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |); + M.read (| M.get_constant (| "ruint::ZERO" |) |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Ok", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::result::Result::Err", + 0 + |) in + let e := M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |), + M.read (| e |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_insert_call_outcome : + M.IsAssociatedFunction Self "insert_call_outcome" insert_call_outcome. + + (* + pub fn current_opcode(&self) -> u8 { + unsafe { *self.instruction_pointer } + } + *) + Definition current_opcode (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_current_opcode : + M.IsAssociatedFunction Self "current_opcode" current_opcode. + + (* + pub fn contract(&self) -> &Contract { + &self.contract + } + *) + Definition contract (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "contract" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_contract : M.IsAssociatedFunction Self "contract" contract. + + (* + pub fn gas(&self) -> &Gas { + &self.gas + } + *) + Definition gas (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_gas : M.IsAssociatedFunction Self "gas" gas. + + (* + pub fn stack(&self) -> &Stack { + &self.stack + } + *) + Definition stack (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "stack" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_stack : M.IsAssociatedFunction Self "stack" stack. + + (* + pub fn program_counter(&self) -> usize { + // SAFETY: `instruction_pointer` should be at an offset from the start of the bytecode. + // In practice this is always true unless a caller modifies the `instruction_pointer` field manually. + unsafe { self.instruction_pointer.offset_from(self.bytecode.as_ptr()) as usize } + } + *) + Definition program_counter (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset_from", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "bytecode" + |) + ] + |) + ] + |) + ] + |) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_program_counter : + M.IsAssociatedFunction Self "program_counter" program_counter. + + (* + pub(crate) fn step(&mut self, instruction_table: &[FN; 256], host: &mut H) + where + FN: Fn(&mut Interpreter, &mut H), + { + // Get current opcode. + let opcode = unsafe { *self.instruction_pointer }; + + // SAFETY: In analysis we are doing padding of bytecode so that we are sure that last + // byte instruction is STOP so we are safe to just increment program_counter bcs on last instruction + // it will do noop and just stop execution of this contract + self.instruction_pointer = unsafe { self.instruction_pointer.offset(1) }; + + // execute instruction. + (instruction_table[opcode as usize])(self, host) + } + *) + Definition step (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ FN; H ], [ self; instruction_table; host ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let instruction_table := M.alloc (| instruction_table |) in + let host := M.alloc (| host |) in + M.read (| + let opcode := + M.copy (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_pointer" + |) + |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::function::Fn", + FN, + [ + Ty.tuple + [ + Ty.apply + (Ty.path "&mut") + [ Ty.path "revm_interpreter::interpreter::Interpreter" ]; + Ty.apply (Ty.path "&mut") [ H ] + ] + ], + "call", + [] + |), + [ + M.SubPointer.get_array_field (| + M.read (| instruction_table |), + M.alloc (| M.rust_cast (| M.read (| opcode |) |) |) + |); + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| host |)) ] + |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_step : M.IsAssociatedFunction Self "step" step. + + (* + pub fn take_memory(&mut self) -> SharedMemory { + core::mem::replace(&mut self.shared_memory, EMPTY_SHARED_MEMORY) + } + *) + Definition take_memory (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_function (| + "core::mem::replace", + [ Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory" ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::shared_memory::EMPTY_SHARED_MEMORY" + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_take_memory : M.IsAssociatedFunction Self "take_memory" take_memory. + + (* + pub fn run( + &mut self, + shared_memory: SharedMemory, + instruction_table: &[FN; 256], + host: &mut H, + ) -> InterpreterAction + where + FN: Fn(&mut Interpreter, &mut H), + { + self.next_action = InterpreterAction::None; + self.shared_memory = shared_memory; + // main loop + while self.instruction_result == InstructionResult::Continue { + self.step(instruction_table, host); + } + + // Return next action if it is some. + if self.next_action.is_some() { + return core::mem::take(&mut self.next_action); + } + // If not, return action without output as it is a halt. + InterpreterAction::Return { + result: InterpreterResult { + result: self.instruction_result, + // return empty bytecode + output: Bytes::new(), + gas: self.gas, + }, + } + } + *) + Definition run (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ FN; H ], [ self; shared_memory; instruction_table; host ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let shared_memory := M.alloc (| shared_memory |) in + let instruction_table := M.alloc (| instruction_table |) in + let host := M.alloc (| host |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |), + M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::InterpreterAction::None" + [] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |), + M.read (| shared_memory |) + |) in + let _ := + M.loop (| + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path + "revm_interpreter::instruction_result::InstructionResult", + [ + Ty.path + "revm_interpreter::instruction_result::InstructionResult" + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |); + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::Continue" + [] + |) + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::Interpreter", + "step", + [ FN; H ] + |), + [ + M.read (| self |); + M.read (| instruction_table |); + M.read (| host |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| M.read (| M.break (||) |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |))) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter_action::InterpreterAction", + "is_some", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.call_closure (| + M.get_function (| + "core::mem::take", + [ + Ty.path + "revm_interpreter::interpreter_action::InterpreterAction" + ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "next_action" + |) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Return" + [ + ("result", + A.to_value + (M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::InterpreterResult" + [ + ("result", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "instruction_result" + |) + |))); + ("output", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bytes_::Bytes", + "new", + [] + |), + [] + |))); + ("gas", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |) + |))) + ] + |))) + ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_run : M.IsAssociatedFunction Self "run" run. + + (* + pub fn resize_memory(&mut self, new_size: usize) -> bool { + resize_memory(&mut self.shared_memory, &mut self.gas, new_size) + } + *) + Definition resize_memory (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; new_size ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let new_size := M.alloc (| new_size |) in + M.call_closure (| + M.get_function (| "revm_interpreter::interpreter::resize_memory", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "shared_memory" + |); + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::Interpreter", + "gas" + |); + M.read (| new_size |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_resize_memory : + M.IsAssociatedFunction Self "resize_memory" resize_memory. + End Impl_revm_interpreter_interpreter_Interpreter. + + Module Impl_revm_interpreter_interpreter_InterpreterResult. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::InterpreterResult". + + (* + pub const fn is_ok(&self) -> bool { + self.result.is_ok() + } + *) + Definition is_ok (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::instruction_result::InstructionResult", + "is_ok", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_ok : M.IsAssociatedFunction Self "is_ok" is_ok. + + (* + pub const fn is_revert(&self) -> bool { + self.result.is_revert() + } + *) + Definition is_revert (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::instruction_result::InstructionResult", + "is_revert", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_revert : M.IsAssociatedFunction Self "is_revert" is_revert. + + (* + pub const fn is_error(&self) -> bool { + self.result.is_error() + } + *) + Definition is_error (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::instruction_result::InstructionResult", + "is_error", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_error : M.IsAssociatedFunction Self "is_error" is_error. + End Impl_revm_interpreter_interpreter_InterpreterResult. + + (* + pub fn resize_memory(memory: &mut SharedMemory, gas: &mut Gas, new_size: usize) -> bool { + let new_words = num_words(new_size as u64); + let new_cost = gas::memory_gas(new_words); + let current_cost = memory.current_expansion_cost(); + let cost = new_cost - current_cost; + let success = gas.record_cost(cost); + if success { + memory.resize((new_words as usize) * 32); + } + success + } + *) + Definition resize_memory (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ memory; gas; new_size ] => + ltac:(M.monadic + (let memory := M.alloc (| memory |) in + let gas := M.alloc (| gas |) in + let new_size := M.alloc (| new_size |) in + M.read (| + 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 := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::memory_gas", [] |), + [ M.read (| new_words |) ] + |) + |) in + let current_cost := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "current_expansion_cost", + [] + |), + [ M.read (| memory |) ] + |) + |) in + let cost := + M.alloc (| + BinOp.Panic.sub (| Integer.U64, M.read (| new_cost |), M.read (| current_cost |) |) + |) in + let success := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::gas::Gas", + "record_cost", + [] + |), + [ M.read (| gas |); M.read (| cost |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use success in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "resize", + [] + |), + [ + M.read (| memory |); + BinOp.Panic.mul (| + Integer.Usize, + M.rust_cast (| M.read (| new_words |) |), + M.of_value (| Value.Integer 32 |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + success + |))) + | _, _ => M.impossible + end. +End interpreter. diff --git a/CoqOfRust/revm/interpreter/analysis.v b/CoqOfRust/revm/interpreter/analysis.v new file mode 100644 index 000000000..b4e81ad48 --- /dev/null +++ b/CoqOfRust/revm/interpreter/analysis.v @@ -0,0 +1,7351 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter. + Module analysis. + Definition value_EOF_NON_RETURNING_FUNCTION : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 128 |) |))). + + (* + pub fn to_analysed(bytecode: Bytecode) -> Bytecode { + let (bytes, len) = match bytecode { + Bytecode::LegacyRaw(bytecode) => { + let len = bytecode.len(); + let mut padded_bytecode = Vec::with_capacity(len + 33); + padded_bytecode.extend_from_slice(&bytecode); + padded_bytecode.resize(len + 33, 0); + (Bytes::from(padded_bytecode), len) + } + n => return n, + }; + let jump_table = analyze(bytes.as_ref()); + + Bytecode::LegacyAnalyzed(LegacyAnalyzedBytecode::new(bytes, len, jump_table)) + } + *) + Definition to_analysed (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ bytecode ] => + ltac:(M.monadic + (let bytecode := M.alloc (| bytecode |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + M.match_operator (| + M.match_operator (| + bytecode, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_primitives::bytecode::Bytecode::LegacyRaw", + 0 + |) in + let bytecode := M.copy (| γ0_0 |) in + let len := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "bytes::bytes::Bytes", + "len", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ bytecode ] + |) + ] + |) + |) in + let padded_bytecode := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "with_capacity", + [] + |), + [ + BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 33 |) + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "extend_from_slice", + [] + |), + [ + padded_bytecode; + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ bytecode ] + |) + ] + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "resize", + [] + |), + [ + padded_bytecode; + BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 33 |) + |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::convert::From", + Ty.path "alloy_primitives::bytes_::Bytes", + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] + ], + "from", + [] + |), + [ M.read (| padded_bytecode |) ] + |)); + A.to_value (M.read (| len |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let n := M.copy (| γ |) in + M.alloc (| + M.never_to_any (| M.read (| M.return_ (| M.read (| n |) |) |) |) + |))) + ] + |), + [ + 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 bytes := M.copy (| γ0_0 |) in + let len := M.copy (| γ0_1 |) in + let jump_table := + M.alloc (| + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::analysis::analyze", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::AsRef", + Ty.path "alloy_primitives::bytes_::Bytes", + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + "as_ref", + [] + |), + [ bytes ] + |) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_primitives::bytecode::Bytecode::LegacyAnalyzed" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_primitives::bytecode::legacy::LegacyAnalyzedBytecode", + "new", + [] + |), + [ M.read (| bytes |); M.read (| len |); M.read (| jump_table |) + ] + |)) + ] + |) + |))) + ] + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + fn analyze(code: &[u8]) -> JumpTable { + let mut jumps: BitVec = bitvec![u8, Lsb0; 0; code.len()]; + + let range = code.as_ptr_range(); + let start = range.start; + let mut iterator = start; + let end = range.end; + while iterator < end { + let opcode = unsafe { *iterator }; + if opcode::JUMPDEST == opcode { + // SAFETY: jumps are max length of the code + unsafe { jumps.set_unchecked(iterator.offset_from(start) as usize, true) } + iterator = unsafe { iterator.offset(1) }; + } else { + let push_offset = opcode.wrapping_sub(opcode::PUSH1); + if push_offset < 32 { + // SAFETY: iterator access range is checked in the while loop + iterator = unsafe { iterator.offset((push_offset + 2) as isize) }; + } else { + // SAFETY: iterator access range is checked in the while loop + iterator = unsafe { iterator.offset(1) }; + } + } + } + + JumpTable(Arc::new(jumps)) + } + *) + Definition analyze (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ code ] => + ltac:(M.monadic + (let code := M.alloc (| code |) in + M.read (| + let jumps := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "bitvec::vec::BitVec") + [ Ty.path "u8"; Ty.path "bitvec::order::Lsb0" ], + "repeat", + [] + |), + [ + BinOp.Pure.ne (| + M.of_value (| Value.Integer 0 |), + M.of_value (| Value.Integer 0 |) + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| code |) ] + |) + ] + |) + |) in + let range := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "as_ptr_range", + [] + |), + [ M.read (| code |) ] + |) + |) in + 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_ := + M.copy (| + M.SubPointer.get_struct_record_field (| range, "core::ops::range::Range", "end" |) + |) in + let _ := + M.loop (| + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| M.read (| iterator |), M.read (| end_ |) |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let opcode := M.copy (| M.read (| iterator |) |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| + M.get_constant (| + "revm_interpreter::opcode::JUMPDEST" + |) + |), + M.read (| opcode |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "bitvec::slice::BitSlice") + [ Ty.path "u8"; Ty.path "bitvec::order::Lsb0" ], + "set_unchecked", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path "bitvec::vec::BitVec") + [ Ty.path "u8"; Ty.path "bitvec::order::Lsb0" ], + [], + "deref_mut", + [] + |), + [ jumps ] + |); + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset_from", + [] + |), + [ M.read (| iterator |); M.read (| start |) ] + |) + |); + M.of_value (| Value.Bool true |) + ] + |) + |) in + let _ := + M.write (| + iterator, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ M.read (| iterator |); M.of_value (| Value.Integer 1 |) ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let push_offset := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "u8", + "wrapping_sub", + [] + |), + [ + M.read (| opcode |); + M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH1" |) + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| push_offset |), + M.of_value (| Value.Integer 32 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + iterator, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| iterator |); + M.rust_cast (| + BinOp.Panic.add (| + Integer.U8, + M.read (| push_offset |), + M.of_value (| Value.Integer 2 |) + |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let _ := + M.write (| + iterator, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "offset", + [] + |), + [ + M.read (| iterator |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |))) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_primitives::bytecode::legacy::jump_map::JumpTable" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::sync::Arc") + [ + Ty.apply + (Ty.path "bitvec::vec::BitVec") + [ Ty.path "u8"; Ty.path "bitvec::order::Lsb0" ]; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ M.read (| jumps |) ] + |)) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + (* + pub fn validate_raw_eof(bytecode: Bytes) -> Result { + let eof = Eof::decode(bytecode)?; + validate_eof(&eof)?; + Ok(eof) + } + *) + Definition validate_raw_eof (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ bytecode ] => + ltac:(M.monadic + (let bytecode := M.alloc (| bytecode |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let eof := + 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 "revm_primitives::bytecode::eof::Eof"; + Ty.path "revm_primitives::bytecode::eof::EofDecodeError" + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::eof::Eof", + "decode", + [] + |), + [ M.read (| bytecode |) ] + |) + ] + |) + |), + [ + 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") + [ + Ty.path "revm_primitives::bytecode::eof::Eof"; + Ty.path + "revm_interpreter::interpreter::analysis::EofError" + ], + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path + "revm_primitives::bytecode::eof::EofDecodeError" + ] + ], + "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.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.tuple []; + Ty.path "revm_interpreter::interpreter::analysis::EofError" + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::analysis::validate_eof", + [] + |), + [ eof ] + |) + ] + |) + |), + [ + 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") + [ + Ty.path "revm_primitives::bytecode::eof::Eof"; + Ty.path + "revm_interpreter::interpreter::analysis::EofError" + ], + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path + "revm_interpreter::interpreter::analysis::EofError" + ] + ], + "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 + M.alloc (| + M.of_value (| + Value.StructTuple "core::result::Result::Ok" [ A.to_value (M.read (| eof |)) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn validate_eof(eof: &Eof) -> Result<(), EofError> { + // clone is cheap as it is Bytes and a header. + let mut queue = vec![eof.clone()]; + + while let Some(eof) = queue.pop() { + // iterate over types + validate_eof_codes(&eof)?; + // iterate over containers, convert them to Eof and add to analyze_eof + for container in eof.body.container_section { + queue.push(Eof::decode(container)?); + } + } + + // Eof is valid + Ok(()) + } + *) + Definition validate_eof (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ eof ] => + ltac:(M.monadic + (let eof := M.alloc (| eof |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let queue := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "revm_primitives::bytecode::eof::Eof" ], + "into_vec", + [ Ty.path "alloc::alloc::Global" ] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply + (Ty.path "array") + [ Ty.path "revm_primitives::bytecode::eof::Eof" ]; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_primitives::bytecode::eof::Eof", + [], + "clone", + [] + |), + [ M.read (| eof |) ] + |)) + ] + |) + |) + ] + |) + |) + |) + ] + |) + |) in + let _ := + M.loop (| + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "revm_primitives::bytecode::eof::Eof"; + Ty.path "alloc::alloc::Global" + ], + "pop", + [] + |), + [ queue ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let eof := M.copy (| γ0_0 |) in + let _ := + 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.tuple []; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::analysis::validate_eof_codes", + [] + |), + [ eof ] + |) + ] + |) + |), + [ + 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") + [ + Ty.tuple []; + Ty.path + "revm_interpreter::interpreter::analysis::EofError" + ], + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ] + ], + "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 + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "alloc::alloc::Global" + ], + [], + "into_iter", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + eof, + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "container_section" + |) + |) + ] + |) + |), + [ + 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 "alloc::vec::into_iter::IntoIter") + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "alloc::alloc::Global" + ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let container := M.copy (| γ0_0 |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path + "revm_primitives::bytecode::eof::Eof"; + Ty.path "alloc::alloc::Global" + ], + "push", + [] + |), + [ + queue; + M.read (| + 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 + "revm_primitives::bytecode::eof::Eof"; + Ty.path + "revm_primitives::bytecode::eof::EofDecodeError" + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_primitives::bytecode::eof::Eof", + "decode", + [] + |), + [ M.read (| container |) ] + |) + ] + |) + |), + [ + 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") + [ + Ty.tuple []; + Ty.path + "revm_interpreter::interpreter::analysis::EofError" + ], + [ + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.path + "core::convert::Infallible"; + Ty.path + "revm_primitives::bytecode::eof::EofDecodeError" + ] + ], + "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 + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + |))) + ] + |)))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| M.read (| M.break (||) |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |))) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + pub fn validate_eof_codes(eof: &Eof) -> Result<(), EofValidationError> { + let mut queued_codes = vec![false; eof.body.code_section.len()]; + if eof.body.code_section.len() != eof.body.types_section.len() { + return Err(EofValidationError::InvalidTypesSection); + } + + if eof.body.code_section.is_empty() { + // no code sections. This should be already checked in decode. + return Err(EofValidationError::NoCodeSections); + } + // first section is default one. + queued_codes[0] = true; + + // the first code section must have a type signature + // (0, 0x80, max_stack_height) (0 inputs non-returning function) + let first_types = &eof.body.types_section[0]; + if first_types.inputs != 0 || first_types.outputs != EOF_NON_RETURNING_FUNCTION { + return Err(EofValidationError::InvalidTypesSection); + } + + // start validation from code section 0. + let mut queue = vec![0]; + while let Some(index) = queue.pop() { + let code = &eof.body.code_section[index]; + let accessed_codes = validate_eof_code( + code, + eof.header.data_size as usize, + index, + eof.body.container_section.len(), + &eof.body.types_section, + )?; + + // queue accessed codes. + accessed_codes.into_iter().for_each(|i| { + if !queued_codes[i] { + queued_codes[i] = true; + queue.push(i); + } + }); + } + // iterate over accessed codes and check if all are accessed. + if queued_codes.into_iter().any(|x| !x) { + return Err(EofValidationError::CodeSectionNotAccessed); + } + + Ok(()) + } + *) + Definition validate_eof_codes (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ eof ] => + ltac:(M.monadic + (let eof := M.alloc (| eof |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let queued_codes := + M.alloc (| + M.call_closure (| + M.get_function (| "alloc::vec::from_elem", [ Ty.path "bool" ] |), + [ + M.of_value (| Value.Bool false |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "alloc::alloc::Global" + ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "code_section" + |) + ] + |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "alloc::alloc::Global" + ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "code_section" + |) + ] + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path + "revm_primitives::bytecode::eof::types_section::TypesSection"; + Ty.path "alloc::alloc::Global" + ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "types_section" + |) + ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::InvalidTypesSection" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "alloc::alloc::Global" + ], + "is_empty", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "code_section" + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::NoCodeSections" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "bool"; Ty.path "alloc::alloc::Global" ], + [ Ty.path "usize" ], + "index_mut", + [] + |), + [ queued_codes; M.of_value (| Value.Integer 0 |) ] + |), + M.of_value (| Value.Bool true |) + |) in + let first_types := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "revm_primitives::bytecode::eof::types_section::TypesSection"; + Ty.path "alloc::alloc::Global" + ], + [ Ty.path "usize" ], + "index", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "types_section" + |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| first_types |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "inputs" + |) + |), + M.of_value (| Value.Integer 0 |) + |), + ltac:(M.monadic + (BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| first_types |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "outputs" + |) + |), + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::analysis::EOF_NON_RETURNING_FUNCTION" + |) + |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::InvalidTypesSection" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let queue := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "usize" ], + "into_vec", + [ Ty.path "alloc::alloc::Global" ] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply (Ty.path "array") [ Ty.path "usize" ]; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.alloc (| + M.of_value (| + Value.Array [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |) + |) + ] + |) + |) + |) + ] + |) + |) in + let _ := + M.loop (| + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ], + "pop", + [] + |), + [ queue ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let index := M.copy (| γ0_0 |) in + let code := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "alloc::alloc::Global" + ], + [ Ty.path "usize" ], + "index", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "code_section" + |); + M.read (| index |) + ] + |) + |) in + let accessed_codes := + 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.apply + (Ty.path "std::collections::hash::set::HashSet") + [ + Ty.path "usize"; + Ty.path "std::hash::random::RandomState" + ]; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_function (| + "revm_interpreter::interpreter::analysis::validate_eof_code", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "bytes::bytes::Bytes", + [], + "deref", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "deref", + [] + |), + [ M.read (| code |) ] + |) + ] + |); + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "header" + |), + "revm_primitives::bytecode::eof::header::EofHeader", + "data_size" + |) + |) + |); + M.read (| index |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "alloy_primitives::bytes_::Bytes"; + Ty.path "alloc::alloc::Global" + ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "container_section" + |) + ] + |); + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path + "revm_primitives::bytecode::eof::types_section::TypesSection"; + Ty.path "alloc::alloc::Global" + ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| eof |), + "revm_primitives::bytecode::eof::Eof", + "body" + |), + "revm_primitives::bytecode::eof::body::EofBody", + "types_section" + |) + ] + |) + ] + |) + ] + |) + |), + [ + 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") + [ + Ty.tuple []; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ], + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ] + ], + "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.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "std::collections::hash::set::IntoIter") + [ Ty.path "usize" ], + [], + "for_each", + [ Ty.function [ Ty.tuple [ Ty.path "usize" ] ] (Ty.tuple []) ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "std::collections::hash::set::HashSet") + [ + Ty.path "usize"; + Ty.path "std::hash::random::RandomState" + ], + [], + "into_iter", + [] + |), + [ M.read (| accessed_codes |) ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let i := M.copy (| γ |) in + M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path + "alloc::vec::Vec") + [ + Ty.path "bool"; + Ty.path + "alloc::alloc::Global" + ], + [ Ty.path "usize" ], + "index", + [] + |), + [ + queued_codes; + M.read (| i |) + ] + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply + (Ty.path + "alloc::vec::Vec") + [ + Ty.path "bool"; + Ty.path + "alloc::alloc::Global" + ], + [ Ty.path "usize" ], + "index_mut", + [] + |), + [ queued_codes; M.read (| i |) + ] + |), + M.of_value (| Value.Bool true |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::vec::Vec") + [ + Ty.path "usize"; + Ty.path + "alloc::alloc::Global" + ], + "push", + [] + |), + [ queue; M.read (| i |) ] + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| M.read (| M.break (||) |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |))) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "alloc::vec::into_iter::IntoIter") + [ Ty.path "bool"; Ty.path "alloc::alloc::Global" ], + [], + "any", + [ Ty.function [ Ty.tuple [ Ty.path "bool" ] ] (Ty.path "bool") ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "bool"; Ty.path "alloc::alloc::Global" ], + [], + "into_iter", + [] + |), + [ M.read (| queued_codes |) ] + |) + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let x := M.copy (| γ |) in + UnOp.Pure.not (| M.read (| x |) |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::CodeSectionNotAccessed" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + (* + Enum EofError + { + ty_params := []; + variants := + [ + { + name := "Decode"; + item := StructTuple [ Ty.path "revm_primitives::bytecode::eof::EofDecodeError" ]; + discriminant := None; + }; + { + name := "Validation"; + item := + StructTuple [ Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" ]; + discriminant := None; + } + ]; + } + *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter::analysis::EofError::Decode", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_tuple_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Decode" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter::analysis::EofError::Validation", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_tuple_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Validation" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_hash_Hash_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofError" ] + |), + [ M.read (| self |) ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "isize", + [], + "hash", + [ __H ] + |), + [ __self_tag; M.read (| state |) ] + |) + |) in + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter::analysis::EofError::Decode", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "revm_primitives::bytecode::eof::EofDecodeError", + [], + "hash", + [ __H ] + |), + [ M.read (| __self_0 |); M.read (| state |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter::analysis::EofError::Validation", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError", + [], + "hash", + [ __H ] + |), + [ M.read (| __self_0 |); M.read (| state |) ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofError" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofError" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| + LogicalOp.and (| + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), + ltac:(M.monadic + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), + [ + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::interpreter::analysis::EofError::Decode", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::interpreter::analysis::EofError::Decode", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_primitives::bytecode::eof::EofDecodeError", + [ Ty.path "revm_primitives::bytecode::eof::EofDecodeError" ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::interpreter::analysis::EofError::Validation", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::interpreter::analysis::EofError::Validation", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError", + [ + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::intrinsics::unreachable", [] |), + [] + |) + |) + |))) + ] + |) + |))) + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_cmp_PartialOrd_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + (* PartialOrd *) + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofError" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofError" ] + |), + [ M.read (| other |) ] + |) + |) in + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), + [ + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::interpreter::analysis::EofError::Decode", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::interpreter::analysis::EofError::Decode", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "revm_primitives::bytecode::eof::EofDecodeError", + [ Ty.path "revm_primitives::bytecode::eof::EofDecodeError" ], + "partial_cmp", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::interpreter::analysis::EofError::Validation", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::interpreter::analysis::EofError::Validation", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError", + [ Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" + ], + "partial_cmp", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "isize", + [ Ty.path "isize" ], + "partial_cmp", + [] + |), + [ __self_tag; __arg1_tag ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialOrd" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("partial_cmp", InstanceField.Method partial_cmp) ]. + End Impl_core_cmp_PartialOrd_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_cmp_Ord_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + (* Ord *) + Definition cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofError" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofError" ] + |), + [ M.read (| other |) ] + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "isize", [], "cmp", [] |), + [ __self_tag; __arg1_tag ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), + [ + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::interpreter::analysis::EofError::Decode", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::interpreter::analysis::EofError::Decode", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "revm_primitives::bytecode::eof::EofDecodeError", + [], + "cmp", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::interpreter::analysis::EofError::Validation", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::interpreter::analysis::EofError::Validation", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError", + [], + "cmp", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::intrinsics::unreachable", [] |), + [] + |) + |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Ord" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("cmp", InstanceField.Method cmp) ]. + End Impl_core_cmp_Ord_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.read (| self |))) ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_marker_Copy_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_convert_From_revm_primitives_bytecode_eof_EofDecodeError_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + (* + fn from(err: EofDecodeError) -> Self { + EofError::Decode(err) + } + *) + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ err ] => + ltac:(M.monadic + (let err := M.alloc (| err |) in + M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofError::Decode" + [ A.to_value (M.read (| err |)) ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::convert::From" + Self + (* Trait polymorphic types *) + [ (* T *) Ty.path "revm_primitives::bytecode::eof::EofDecodeError" ] + (* Instance *) [ ("from", InstanceField.Method from) ]. + End Impl_core_convert_From_revm_primitives_bytecode_eof_EofDecodeError_for_revm_interpreter_interpreter_analysis_EofError. + + Module Impl_core_convert_From_revm_interpreter_interpreter_analysis_EofValidationError_for_revm_interpreter_interpreter_analysis_EofError. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::analysis::EofError". + + (* + fn from(err: EofValidationError) -> Self { + EofError::Validation(err) + } + *) + Definition from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ err ] => + ltac:(M.monadic + (let err := M.alloc (| err |) in + M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofError::Validation" + [ A.to_value (M.read (| err |)) ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::convert::From" + Self + (* Trait polymorphic types *) + [ (* T *) Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" ] + (* Instance *) [ ("from", InstanceField.Method from) ]. + End Impl_core_convert_From_revm_interpreter_interpreter_analysis_EofValidationError_for_revm_interpreter_interpreter_analysis_EofError. + + (* + Enum EofValidationError + { + ty_params := []; + variants := + [ + { + name := "FalsePossitive"; + item := StructTuple []; + discriminant := None; + }; + { + name := "UnknownOpcode"; + item := StructTuple []; + discriminant := None; + }; + { + name := "OpcodeDisabled"; + item := StructTuple []; + discriminant := None; + }; + { + name := "InstructionNotForwardAccessed"; + item := StructTuple []; + discriminant := None; + }; + { + name := "MissingImmediateBytes"; + item := StructTuple []; + discriminant := None; + }; + { + name := "MissingRJUMPVImmediateBytes"; + item := StructTuple []; + discriminant := None; + }; + { + name := "JumpToImmediateBytes"; + item := StructTuple []; + discriminant := None; + }; + { + name := "BackwardJumpToImmediateBytes"; + item := StructTuple []; + discriminant := None; + }; + { + name := "RJUMPVZeroMaxIndex"; + item := StructTuple []; + discriminant := None; + }; + { + name := "JumpZeroOffset"; + item := StructTuple []; + discriminant := None; + }; + { + name := "EOFCREATEInvalidIndex"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CodeSectionOutOfBounds"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CALLFNonReturningFunction"; + item := StructTuple []; + discriminant := None; + }; + { + name := "StackOverflow"; + item := StructTuple []; + discriminant := None; + }; + { + name := "JUMPFEnoughOutputs"; + item := StructTuple []; + discriminant := None; + }; + { + name := "JUMPFStackHigherThanOutputs"; + item := StructTuple []; + discriminant := None; + }; + { + name := "DataLoadOutOfBounds"; + item := StructTuple []; + discriminant := None; + }; + { + name := "RETFBiggestStackNumMoreThenOutputs"; + item := StructTuple []; + discriminant := None; + }; + { + name := "StackUnderflow"; + item := StructTuple []; + discriminant := None; + }; + { + name := "TypesStackUnderflow"; + item := StructTuple []; + discriminant := None; + }; + { + name := "JumpUnderflow"; + item := StructTuple []; + discriminant := None; + }; + { + name := "JumpOverflow"; + item := StructTuple []; + discriminant := None; + }; + { + name := "BackwardJumpBiggestNumMismatch"; + item := StructTuple []; + discriminant := None; + }; + { + name := "BackwardJumpSmallestNumMismatch"; + item := StructTuple []; + discriminant := None; + }; + { + name := "LastInstructionNotTerminating"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CodeSectionNotAccessed"; + item := StructTuple []; + discriminant := None; + }; + { + name := "InvalidTypesSection"; + item := StructTuple []; + discriminant := None; + }; + { + name := "InvalidFirstTypesSection"; + item := StructTuple []; + discriminant := None; + }; + { + name := "MaxStackMismatch"; + item := StructTuple []; + discriminant := None; + }; + { + name := "NoCodeSections"; + item := StructTuple []; + discriminant := None; + } + ]; + } + *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), + [ + M.read (| f |); + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "FalsePossitive" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "UnknownOpcode" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "OpcodeDisabled" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| + M.of_value (| Value.String "InstructionNotForwardAccessed" |) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "MissingImmediateBytes" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "MissingRJUMPVImmediateBytes" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "JumpToImmediateBytes" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| + M.of_value (| Value.String "BackwardJumpToImmediateBytes" |) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "RJUMPVZeroMaxIndex" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "JumpZeroOffset" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "EOFCREATEInvalidIndex" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "CodeSectionOutOfBounds" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "CALLFNonReturningFunction" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "StackOverflow" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "JUMPFEnoughOutputs" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "JUMPFStackHigherThanOutputs" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "DataLoadOutOfBounds" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| + M.of_value (| Value.String "RETFBiggestStackNumMoreThenOutputs" |) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "StackUnderflow" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "TypesStackUnderflow" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "JumpUnderflow" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "JumpOverflow" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| + M.of_value (| Value.String "BackwardJumpBiggestNumMismatch" |) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| + M.of_value (| Value.String "BackwardJumpSmallestNumMismatch" |) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| + M.of_value (| Value.String "LastInstructionNotTerminating" |) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "CodeSectionNotAccessed" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "InvalidTypesSection" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "InvalidFirstTypesSection" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "MaxStackMismatch" |) |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.read (| M.of_value (| Value.String "NoCodeSections" |) |) + |))) + ] + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_analysis_EofValidationError. + + Module Impl_core_hash_Hash_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" ] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "isize", [], "hash", [ __H ] |), + [ __self_tag; M.read (| state |) ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_interpreter_analysis_EofValidationError. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_analysis_EofValidationError. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_analysis_EofValidationError. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_analysis_EofValidationError. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_analysis_EofValidationError. + + Module Impl_core_cmp_PartialOrd_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + (* PartialOrd *) + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "isize", + [ Ty.path "isize" ], + "partial_cmp", + [] + |), + [ __self_tag; __arg1_tag ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialOrd" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("partial_cmp", InstanceField.Method partial_cmp) ]. + End Impl_core_cmp_PartialOrd_for_revm_interpreter_interpreter_analysis_EofValidationError. + + Module Impl_core_cmp_Ord_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + (* Ord *) + Definition cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter::analysis::EofValidationError" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "isize", [], "cmp", [] |), + [ __self_tag; __arg1_tag ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Ord" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("cmp", InstanceField.Method cmp) ]. + End Impl_core_cmp_Ord_for_revm_interpreter_interpreter_analysis_EofValidationError. + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| M.read (| self |) |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_analysis_EofValidationError. + + Module Impl_core_marker_Copy_for_revm_interpreter_interpreter_analysis_EofValidationError. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::EofValidationError". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_interpreter_analysis_EofValidationError. + + (* + pub fn validate_eof_code( + code: &[u8], + data_size: usize, + this_types_index: usize, + num_of_containers: usize, + types: &[TypesSection], + ) -> Result, EofValidationError> { + let mut accessed_codes = HashSet::::new(); + let this_types = &types[this_types_index]; + + #[derive(Debug, Copy, Clone)] + struct InstructionInfo { + /// Is immediate byte, jumps can't happen on this part of code. + is_immediate: bool, + /// Have forward jump to this opcode. Used to check if opcode + /// after termination is accessed. + is_jumpdest: bool, + /// Smallest number of stack items accessed by jumps or sequential opcodes. + smallest: i32, + /// Biggest number of stack items accessed by jumps or sequential opcodes. + biggest: i32, + } + + impl InstructionInfo { + #[inline] + fn mark_as_immediate(&mut self) -> Result<(), EofValidationError> { + if self.is_jumpdest { + // Jump to immediate bytes. + return Err(EofValidationError::JumpToImmediateBytes); + } + self.is_immediate = true; + Ok(()) + } + } + + impl Default for InstructionInfo { + fn default() -> Self { + Self { + is_immediate: false, + is_jumpdest: false, + smallest: i32::MAX, + biggest: i32::MIN, + } + } + } + + // all bytes that are intermediate. + let mut jumps = vec![InstructionInfo::default(); code.len()]; + let mut is_after_termination = false; + + let mut next_smallest = this_types.inputs as i32; + let mut next_biggest = this_types.inputs as i32; + + let mut i = 0; + // We can check validity and jump destinations in one pass. + while i < code.len() { + let op = code[i]; + let opcode = &OPCODE_INFO_JUMPTABLE[op as usize]; + + let Some(opcode) = opcode else { + // err unknown opcode. + return Err(EofValidationError::UnknownOpcode); + }; + + if opcode.is_disabled_in_eof() { + // Opcode is disabled in EOF + return Err(EofValidationError::OpcodeDisabled); + } + + let this_instruction = &mut jumps[i]; + + // update biggest/smallest values for next instruction only if it is not after termination. + if !is_after_termination { + this_instruction.smallest = core::cmp::min(this_instruction.smallest, next_smallest); + this_instruction.biggest = core::cmp::max(this_instruction.biggest, next_biggest); + } + + let this_instruction = *this_instruction; + + // Opcodes after termination should be accessed by forward jumps. + if is_after_termination && !this_instruction.is_jumpdest { + // opcode after termination was not accessed. + return Err(EofValidationError::InstructionNotForwardAccessed); + } + is_after_termination = opcode.is_terminating(); + + // mark immediate as non-jumpable. RJUMPV is special case covered later. + if opcode.immediate_size() != 0 { + // check if the opcode immediate are within the bounds of the code + if i + opcode.immediate_size() as usize >= code.len() { + // Malfunctional code + return Err(EofValidationError::MissingImmediateBytes); + } + + // mark immediate bytes as non-jumpable. + for imm in 1..opcode.immediate_size() as usize + 1 { + // SAFETY: immediate size is checked above. + jumps[i + imm].mark_as_immediate()?; + } + } + // IO diff used to generate next instruction smallest/biggest value. + let mut stack_io_diff = opcode.io_diff() as i32; + // how many stack items are required for this opcode. + let mut stack_requirement = opcode.inputs() as i32; + // additional immediate bytes for RJUMPV, it has dynamic vtable. + let mut rjumpv_additional_immediates = 0; + // If opcodes is RJUMP, RJUMPI or RJUMPV then this will have absolute jumpdest. + let mut absolute_jumpdest = vec![]; + match op { + opcode::RJUMP | opcode::RJUMPI => { + let offset = unsafe { read_i16(code.as_ptr().add(i + 1)) } as isize; + absolute_jumpdest = vec![offset + 3 + i as isize]; + // RJUMP is considered a terminating opcode. + } + opcode::RJUMPV => { + // code length for RJUMPV is checked with immediate size. + let max_index = code[i + 1] as usize; + let len = max_index + 1; + // and max_index+1 is to get size of vtable as index starts from 0. + rjumpv_additional_immediates = len * 2; + + // +1 is for max_index byte + if i + 1 + rjumpv_additional_immediates >= code.len() { + // Malfunctional code RJUMPV vtable is not complete + return Err(EofValidationError::MissingRJUMPVImmediateBytes); + } + + // Mark vtable as immediate, max_index was already marked. + for imm in 0..rjumpv_additional_immediates { + // SAFETY: immediate size is checked above. + jumps[i + 2 + imm].mark_as_immediate()?; + } + + let mut jumps = Vec::with_capacity(len); + for vtablei in 0..len { + let offset = + unsafe { read_i16(code.as_ptr().add(i + 2 + 2 * vtablei)) } as isize; + jumps.push(offset + i as isize + 2 + rjumpv_additional_immediates as isize); + } + absolute_jumpdest = jumps + } + opcode::CALLF => { + let section_i = unsafe { read_u16(code.as_ptr().add(i + 1)) } as usize; + let Some(target_types) = types.get(section_i) else { + // code section out of bounds. + return Err(EofValidationError::CodeSectionOutOfBounds); + }; + + if target_types.outputs == EOF_NON_RETURNING_FUNCTION { + // callf to non returning function is not allowed + return Err(EofValidationError::CALLFNonReturningFunction); + } + // stack input for this opcode is the input of the called code. + stack_requirement = target_types.inputs as i32; + // stack diff depends on input/output of the called code. + stack_io_diff = target_types.io_diff(); + // mark called code as accessed. + accessed_codes.insert(section_i); + + // we decrement by `types.inputs` as they are considered as send + // to the called code and included in types.max_stack_size. + if this_instruction.biggest - stack_requirement + target_types.max_stack_size as i32 + > STACK_LIMIT as i32 + { + // if stack max items + called code max stack size + return Err(EofValidationError::StackOverflow); + } + } + opcode::JUMPF => { + let target_index = unsafe { read_u16(code.as_ptr().add(i + 1)) } as usize; + // targeted code needs to have zero outputs (be non returning). + let Some(target_types) = types.get(target_index) else { + // code section out of bounds. + return Err(EofValidationError::CodeSectionOutOfBounds); + }; + + // we decrement types.inputs as they are considered send to the called code. + // and included in types.max_stack_size. + if this_instruction.biggest - target_types.inputs as i32 + + target_types.max_stack_size as i32 + > STACK_LIMIT as i32 + { + // stack overflow + return Err(EofValidationError::StackOverflow); + } + accessed_codes.insert(target_index); + + if target_types.outputs == EOF_NON_RETURNING_FUNCTION { + // if it is not returning + stack_requirement = target_types.inputs as i32; + } else { + // check if target code produces enough outputs. + if this_types.outputs < target_types.outputs { + return Err(EofValidationError::JUMPFEnoughOutputs); + } + + stack_requirement = this_types.outputs as i32 + target_types.inputs as i32 + - target_types.outputs as i32; + + // Stack requirement needs to more than this instruction biggest stack number. + if this_instruction.biggest > stack_requirement { + return Err(EofValidationError::JUMPFStackHigherThanOutputs); + } + + // if this instruction max + target_types max is more then stack limit. + if this_instruction.biggest + stack_requirement > STACK_LIMIT as i32 { + return Err(EofValidationError::StackOverflow); + } + } + } + opcode::EOFCREATE => { + let index = code[i + 1] as usize; + if index >= num_of_containers { + // code section out of bounds. + return Err(EofValidationError::EOFCREATEInvalidIndex); + } + } + opcode::DATALOADN => { + let index = unsafe { read_u16(code.as_ptr().add(i + 1)) } as isize; + if data_size < 32 || index > data_size as isize - 32 { + // data load out of bounds. + return Err(EofValidationError::DataLoadOutOfBounds); + } + } + opcode::RETF => { + stack_requirement = this_types.outputs as i32; + if this_instruction.biggest > stack_requirement { + return Err(EofValidationError::RETFBiggestStackNumMoreThenOutputs); + } + } + opcode::DUPN => { + stack_requirement = code[i + 1] as i32 + 1; + } + opcode::SWAPN => { + stack_requirement = code[i + 1] as i32 + 2; + } + opcode::EXCHANGE => { + let imm = code[i + 1]; + let n = (imm >> 4) + 1; + let m = (imm & 0x0F) + 1; + stack_requirement = n as i32 + m as i32 + 1; + } + _ => {} + } + // check if stack requirement is more than smallest stack items. + if stack_requirement > this_instruction.smallest { + // opcode requirement is more than smallest stack items. + return Err(EofValidationError::StackUnderflow); + } + + next_smallest = this_instruction.smallest + stack_io_diff; + next_biggest = this_instruction.biggest + stack_io_diff; + + // check if jumpdest are correct and mark forward jumps. + for absolute_jump in absolute_jumpdest { + if absolute_jump < 0 { + // jump out of bounds. + return Err(EofValidationError::JumpUnderflow); + } + if absolute_jump >= code.len() as isize { + // jump to out of bounds + return Err(EofValidationError::JumpOverflow); + } + // fine to cast as bounds are checked. + let absolute_jump = absolute_jump as usize; + + let target_jump = &mut jumps[absolute_jump]; + if target_jump.is_immediate { + // Jump target is immediate byte. + return Err(EofValidationError::BackwardJumpToImmediateBytes); + } + + // needed to mark forward jumps. It does not do anything for backward jumps. + target_jump.is_jumpdest = true; + + if absolute_jump <= i { + // backward jumps should have same smallest and biggest stack items. + if target_jump.biggest != next_biggest { + // wrong jumpdest. + return Err(EofValidationError::BackwardJumpBiggestNumMismatch); + } + if target_jump.smallest != next_smallest { + // wrong jumpdest. + return Err(EofValidationError::BackwardJumpSmallestNumMismatch); + } + } else { + // forward jumps can make min even smallest size + // while biggest num is needed to check stack overflow + target_jump.smallest = core::cmp::min(target_jump.smallest, next_smallest); + target_jump.biggest = core::cmp::max(target_jump.biggest, next_biggest); + } + } + + // additional immediate are from RJUMPV vtable. + i += 1 + opcode.immediate_size() as usize + rjumpv_additional_immediates; + } + + // last opcode should be terminating + if !is_after_termination { + // wrong termination. + return Err(EofValidationError::LastInstructionNotTerminating); + } + // TODO integrate max so we dont need to iterate again + let mut max_stack_requirement = 0; + for opcode in jumps { + max_stack_requirement = core::cmp::max(opcode.biggest, max_stack_requirement); + } + + if max_stack_requirement != types[this_types_index].max_stack_size as i32 { + // stack overflow + return Err(EofValidationError::MaxStackMismatch); + } + + Ok(accessed_codes) + } + *) + Definition validate_eof_code (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ code; data_size; this_types_index; num_of_containers; types ] => + ltac:(M.monadic + (let code := M.alloc (| code |) in + let data_size := M.alloc (| data_size |) in + let this_types_index := M.alloc (| this_types_index |) in + let num_of_containers := M.alloc (| num_of_containers |) in + let types := M.alloc (| types |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let accessed_codes := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "std::collections::hash::set::HashSet") + [ Ty.path "usize"; Ty.path "std::hash::random::RandomState" ], + "new", + [] + |), + [] + |) + |) in + let this_types := + M.alloc (| + M.SubPointer.get_array_field (| M.read (| types |), this_types_index |) + |) in + let jumps := + M.alloc (| + M.call_closure (| + M.get_function (| + "alloc::vec::from_elem", + [ + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo" + ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + [], + "default", + [] + |), + [] + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| code |) ] + |) + ] + |) + |) in + let is_after_termination := M.alloc (| M.of_value (| Value.Bool false |) |) in + let next_smallest := + M.alloc (| + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| this_types |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "inputs" + |) + |) + |) + |) in + let next_biggest := + M.alloc (| + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| this_types |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "inputs" + |) + |) + |) + |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let _ := + M.loop (| + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| i |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| code |) ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let op := + M.copy (| + M.SubPointer.get_array_field (| M.read (| code |), i |) + |) in + let opcode := + M.alloc (| + M.SubPointer.get_array_field (| + M.get_constant (| + "revm_interpreter::opcode::OPCODE_INFO_JUMPTABLE" + |), + M.alloc (| M.rust_cast (| M.read (| op |) |) |) + |) + |) in + M.match_operator (| + opcode, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let opcode := M.alloc (| γ1_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "is_disabled_in_eof", + [] + |), + [ M.read (| opcode |) ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::OpcodeDisabled" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let this_instruction := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo"; + Ty.path "alloc::alloc::Global" + ], + [ Ty.path "usize" ], + "index_mut", + [] + |), + [ jumps; M.read (| i |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.read (| is_after_termination |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| this_instruction |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "smallest" + |), + M.call_closure (| + M.get_function (| + "core::cmp::min", + [ Ty.path "i32" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| this_instruction |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "smallest" + |) + |); + M.read (| next_smallest |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| this_instruction |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |), + M.call_closure (| + M.get_function (| + "core::cmp::max", + [ Ty.path "i32" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| this_instruction |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |) + |); + M.read (| next_biggest |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let this_instruction := + M.copy (| M.read (| this_instruction |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.and (| + M.read (| is_after_termination |), + ltac:(M.monadic + (UnOp.Pure.not (| + M.read (| + M.SubPointer.get_struct_record_field (| + this_instruction, + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "is_jumpdest" + |) + |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::InstructionNotForwardAccessed" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + is_after_termination, + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "is_terminating", + [] + |), + [ M.read (| opcode |) ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ M.read (| opcode |) ] + |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ M.read (| opcode |) ] + |) + |) + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| code |) ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::MissingImmediateBytes" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [], + "into_iter", + [] + |), + [ + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 1 + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ M.read (| opcode |) ] + |) + |), + M.of_value (| + Value.Integer 1 + |) + |))) + ] + |) + ] + |) + |), + [ + 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::ops::range::Range") + [ Ty.path "usize" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let imm := + M.copy (| γ0_0 |) in + let _ := + 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.tuple []; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "mark_as_immediate", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply + (Ty.path + "alloc::vec::Vec") + [ + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo"; + Ty.path + "alloc::alloc::Global" + ], + [ + Ty.path + "usize" + ], + "index_mut", + [] + |), + [ + jumps; + BinOp.Panic.add (| + Integer.Usize, + M.read (| + i + |), + M.read (| + imm + |) + |) + ] + |) + ] + |) + ] + |) + |), + [ + 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") + [ + Ty.apply + (Ty.path + "std::collections::hash::set::HashSet") + [ + Ty.path + "usize"; + Ty.path + "std::hash::random::RandomState" + ]; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ], + [ + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.path + "core::convert::Infallible"; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ] + ], + "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 + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + |))) + ] + |)))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let stack_io_diff := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "io_diff", + [] + |), + [ M.read (| opcode |) ] + |) + |) + |) in + let stack_requirement := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "inputs", + [] + |), + [ M.read (| opcode |) ] + |) + |) + |) in + let rjumpv_additional_immediates := + M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let absolute_jumpdest := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "isize"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [] + |) + |) in + let _ := + M.match_operator (| + op, + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 224 + |) in + M.of_value (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 225 + |) in + M.of_value (| Value.Tuple [] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [] => + let offset := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_i16", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*const") + [ Ty.path "u8" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ M.read (| code |) ] + |); + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| + Value.Integer 1 + |) + |) + ] + |) + ] + |) + |) + |) in + let _ := + M.write (| + absolute_jumpdest, + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "isize" ], + "into_vec", + [ Ty.path "alloc::alloc::Global" ] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.read (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::boxed::Box") + [ + Ty.apply + (Ty.path "array") + [ Ty.path "isize" ]; + Ty.path + "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (BinOp.Panic.add (| + Integer.Isize, + BinOp.Panic.add (| + Integer.Isize, + M.read (| + offset + |), + M.of_value (| + Value.Integer + 3 + |) + |), + M.rust_cast (| + M.read (| + i + |) + |) + |)) + ] + |) + |) + ] + |) + |) + |) + ] + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) + | _ => M.impossible (||) + end) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 226 + |) in + 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 |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) + |) + |) + |) in + let len := + M.alloc (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| max_index |), + M.of_value (| Value.Integer 1 |) + |) + |) in + let _ := + M.write (| + rjumpv_additional_immediates, + BinOp.Panic.mul (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| + BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| + Value.Integer 1 + |) + |), + M.read (| + rjumpv_additional_immediates + |) + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| code |) ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::MissingRJUMPVImmediateBytes" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + let _ := + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [], + "into_iter", + [] + |), + [ + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value + (M.read (| + rjumpv_additional_immediates + |))) + ] + |) + ] + |) + |), + [ + 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::ops::range::Range") + [ Ty.path "usize" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let imm := + M.copy (| γ0_0 |) in + let _ := + 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.tuple []; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "mark_as_immediate", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply + (Ty.path + "alloc::vec::Vec") + [ + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo"; + Ty.path + "alloc::alloc::Global" + ], + [ + Ty.path + "usize" + ], + "index_mut", + [] + |), + [ + jumps; + BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| + i + |), + M.of_value (| + Value.Integer + 2 + |) + |), + M.read (| + imm + |) + |) + ] + |) + ] + |) + ] + |) + |), + [ + 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") + [ + Ty.apply + (Ty.path + "std::collections::hash::set::HashSet") + [ + Ty.path + "usize"; + Ty.path + "std::hash::random::RandomState" + ]; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ], + [ + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.path + "core::convert::Infallible"; + Ty.path + "revm_interpreter::interpreter::analysis::EofValidationError" + ] + ], + "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 + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + |))) + ] + |)) in + let jumps := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "isize"; + Ty.path "alloc::alloc::Global" + ], + "with_capacity", + [] + |), + [ M.read (| len |) ] + |) + |) in + let _ := + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [], + "into_iter", + [] + |), + [ + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| + Value.Integer 0 + |))); + ("end_", + A.to_value (M.read (| len |))) + ] + |) + ] + |) + |), + [ + 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::ops::range::Range") + [ Ty.path "usize" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let vtablei := + M.copy (| γ0_0 |) in + let offset := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_i16", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "*const") + [ + Ty.path + "u8" + ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + Ty.path + "u8" + ], + "as_ptr", + [] + |), + [ + M.read (| + code + |) + ] + |); + BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| + i + |), + M.of_value (| + Value.Integer + 2 + |) + |), + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| + Value.Integer + 2 + |), + M.read (| + vtablei + |) + |) + |) + ] + |) + ] + |) + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "alloc::vec::Vec") + [ + Ty.path + "isize"; + Ty.path + "alloc::alloc::Global" + ], + "push", + [] + |), + [ + jumps; + BinOp.Panic.add (| + Integer.Isize, + BinOp.Panic.add (| + Integer.Isize, + BinOp.Panic.add (| + Integer.Isize, + M.read (| + offset + |), + M.rust_cast (| + M.read (| + i + |) + |) + |), + M.of_value (| + Value.Integer + 2 + |) + |), + M.rust_cast (| + M.read (| + rjumpv_additional_immediates + |) + |) + |) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + |))) + ] + |)) in + M.write (| + absolute_jumpdest, + M.read (| jumps |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 227 + |) in + let section_i := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_u16", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*const") + [ Ty.path "u8" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ M.read (| code |) ] + |); + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + ] + |) + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ + Ty.path + "revm_primitives::bytecode::eof::types_section::TypesSection" + ], + "get", + [ Ty.path "usize" ] + |), + [ M.read (| types |); M.read (| section_i |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let target_types := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "outputs" + |) + |), + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::analysis::EOF_NON_RETURNING_FUNCTION" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::CALLFNonReturningFunction" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + let _ := + M.write (| + stack_requirement, + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| target_types |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "inputs" + |) + |) + |) + |) in + let _ := + M.write (| + stack_io_diff, + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_primitives::bytecode::eof::types_section::TypesSection", + "io_diff", + [] + |), + [ M.read (| target_types |) ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "std::collections::hash::set::HashSet") + [ + Ty.path "usize"; + Ty.path + "std::hash::random::RandomState" + ], + "insert", + [] + |), + [ + accessed_codes; + M.read (| section_i |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + BinOp.Panic.add (| + Integer.I32, + BinOp.Panic.sub (| + Integer.I32, + M.read (| + M.SubPointer.get_struct_record_field (| + this_instruction, + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |) + |), + M.read (| + stack_requirement + |) + |), + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "max_stack_size" + |) + |) + |) + |), + M.rust_cast (| + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::stack::STACK_LIMIT" + |) + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::StackOverflow" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 229 + |) in + let target_index := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_u16", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*const") + [ Ty.path "u8" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ M.read (| code |) ] + |); + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + ] + |) + |) + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ + Ty.path + "revm_primitives::bytecode::eof::types_section::TypesSection" + ], + "get", + [ Ty.path "usize" ] + |), + [ + M.read (| types |); + M.read (| target_index |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let target_types := M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + BinOp.Panic.add (| + Integer.I32, + BinOp.Panic.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.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "inputs" + |) + |) + |) + |), + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "max_stack_size" + |) + |) + |) + |), + M.rust_cast (| + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::stack::STACK_LIMIT" + |) + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::StackOverflow" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "std::collections::hash::set::HashSet") + [ + Ty.path "usize"; + Ty.path + "std::hash::random::RandomState" + ], + "insert", + [] + |), + [ + accessed_codes; + M.read (| target_index |) + ] + |) + |) in + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "outputs" + |) + |), + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::analysis::EOF_NON_RETURNING_FUNCTION" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.write (| + stack_requirement, + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| target_types |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "inputs" + |) + |) + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + this_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "outputs" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "outputs" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::JUMPFEnoughOutputs" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + let _ := + M.write (| + stack_requirement, + BinOp.Panic.sub (| + Integer.I32, + BinOp.Panic.add (| + Integer.I32, + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + this_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "outputs" + |) + |) + |), + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "inputs" + |) + |) + |) + |), + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_types + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "outputs" + |) + |) + |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| + M.SubPointer.get_struct_record_field (| + this_instruction, + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |) + |), + M.read (| + stack_requirement + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::JUMPFStackHigherThanOutputs" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + BinOp.Panic.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_requirement + |) + |), + M.rust_cast (| + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::stack::STACK_LIMIT" + |) + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::StackOverflow" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |))) + ] + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 236 + |) in + 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 |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) + |) + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| + M.read (| index |), + M.read (| num_of_containers |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::EOFCREATEInvalidIndex" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 209 + |) in + let index := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_u16", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*const") + [ Ty.path "u8" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ M.read (| code |) ] + |); + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + ] + |) + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + LogicalOp.or (| + BinOp.Pure.lt (| + M.read (| data_size |), + M.of_value (| Value.Integer 32 |) + |), + ltac:(M.monadic + (BinOp.Pure.gt (| + M.read (| index |), + BinOp.Panic.sub (| + Integer.Isize, + M.rust_cast (| + M.read (| data_size |) + |), + M.of_value (| + Value.Integer 32 + |) + |) + |))) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::DataLoadOutOfBounds" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 228 + |) in + let _ := + M.write (| + stack_requirement, + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| this_types |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "outputs" + |) + |) + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| + M.SubPointer.get_struct_record_field (| + this_instruction, + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |) + |), + M.read (| stack_requirement |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::RETFBiggestStackNumMoreThenOutputs" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 230 + |) in + let _ := + M.write (| + stack_requirement, + BinOp.Panic.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 |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) + |) + |), + M.of_value (| Value.Integer 1 |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 231 + |) in + let _ := + M.write (| + stack_requirement, + BinOp.Panic.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 |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) + |) + |), + M.of_value (| Value.Integer 2 |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Integer 232 + |) in + let imm := + M.copy (| + M.SubPointer.get_array_field (| + M.read (| code |), + M.alloc (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) + |) in + let n := + M.alloc (| + BinOp.Panic.add (| + Integer.U8, + BinOp.Panic.shr (| + M.read (| imm |), + M.of_value (| Value.Integer 4 |) + |), + M.of_value (| Value.Integer 1 |) + |) + |) in + let m := + M.alloc (| + BinOp.Panic.add (| + Integer.U8, + BinOp.Pure.bit_and (| + M.read (| imm |), + M.of_value (| Value.Integer 15 |) + |), + M.of_value (| Value.Integer 1 |) + |) + |) in + 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 |) |) + |), + M.of_value (| Value.Integer 1 |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| stack_requirement |), + M.read (| + M.SubPointer.get_struct_record_field (| + this_instruction, + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "smallest" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::StackUnderflow" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + next_smallest, + BinOp.Panic.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 |) + |) + |) in + let _ := + M.write (| + next_biggest, + BinOp.Panic.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 |) + |) + |) in + let _ := + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "isize"; + Ty.path "alloc::alloc::Global" + ], + [], + "into_iter", + [] + |), + [ M.read (| absolute_jumpdest |) ] + |) + |), + [ + 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 + "alloc::vec::into_iter::IntoIter") + [ + Ty.path "isize"; + Ty.path "alloc::alloc::Global" + ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let absolute_jump := + M.copy (| γ0_0 |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| + absolute_jump + |), + M.of_value (| + Value.Integer 0 + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::JumpUnderflow" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| + M.read (| + absolute_jump + |), + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ + Ty.path + "u8" + ], + "len", + [] + |), + [ + M.read (| + code + |) + ] + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::JumpOverflow" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + let absolute_jump := + M.alloc (| + M.rust_cast (| + M.read (| absolute_jump |) + |) + |) in + let target_jump := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply + (Ty.path + "alloc::vec::Vec") + [ + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo"; + Ty.path + "alloc::alloc::Global" + ], + [ Ty.path "usize" ], + "index_mut", + [] + |), + [ + jumps; + M.read (| absolute_jump |) + ] + |) + |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.SubPointer.get_struct_record_field (| + M.read (| + target_jump + |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "is_immediate" + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::BackwardJumpToImmediateBytes" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| target_jump |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "is_jumpdest" + |), + M.of_value (| Value.Bool true |) + |) in + M.match_operator (| + M.alloc (| + M.of_value (| Value.Tuple [] |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.le (| + M.read (| + absolute_jump + |), + M.read (| i |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_jump + |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |) + |), + M.read (| + next_biggest + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| + γ + |), + Value.Bool + true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::BackwardJumpBiggestNumMismatch" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_jump + |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "smallest" + |) + |), + M.read (| + next_smallest + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::BackwardJumpSmallestNumMismatch" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |))); + fun γ => + ltac:(M.monadic + (let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_jump + |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "smallest" + |), + M.call_closure (| + M.get_function (| + "core::cmp::min", + [ Ty.path "i32" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_jump + |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "smallest" + |) + |); + M.read (| + next_smallest + |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_jump + |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |), + M.call_closure (| + M.get_function (| + "core::cmp::max", + [ Ty.path "i32" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| + target_jump + |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |) + |); + M.read (| + next_biggest + |) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |))) + ] + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + |))) + ] + |)) in + let _ := + let β := i in + M.write (| + β, + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.of_value (| Value.Integer 1 |), + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ M.read (| opcode |) ] + |) + |) + |), + M.read (| rjumpv_additional_immediates |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| M.read (| M.break (||) |) |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |))) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| M.read (| is_after_termination |) |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::LastInstructionNotTerminating" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let max_stack_requirement := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let _ := + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo"; + Ty.path "alloc::alloc::Global" + ], + [], + "into_iter", + [] + |), + [ M.read (| jumps |) ] + |) + |), + [ + 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 "alloc::vec::into_iter::IntoIter") + [ + Ty.path + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo"; + Ty.path "alloc::alloc::Global" + ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let opcode := M.copy (| γ0_0 |) in + let _ := + M.write (| + max_stack_requirement, + M.call_closure (| + M.get_function (| + "core::cmp::max", + [ Ty.path "i32" ] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + opcode, + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |) + |); + M.read (| max_stack_requirement |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + |))) + ] + |)) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.read (| max_stack_requirement |), + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_array_field (| + M.read (| types |), + this_types_index + |), + "revm_primitives::bytecode::eof::types_section::TypesSection", + "max_stack_size" + |) + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::MaxStackMismatch" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.read (| accessed_codes |)) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Module validate_eof_code. + (* StructRecord + { + name := "InstructionInfo"; + ty_params := []; + fields := + [ + ("is_immediate", Ty.path "bool"); + ("is_jumpdest", Ty.path "bool"); + ("smallest", Ty.path "i32"); + ("biggest", Ty.path "i32") + ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field4_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "InstructionInfo" |) |); + M.read (| M.of_value (| Value.String "is_immediate" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "is_immediate" + |) + |); + M.read (| M.of_value (| Value.String "is_jumpdest" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "is_jumpdest" + |) + |); + M.read (| M.of_value (| Value.String "smallest" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "smallest" + |) + |); + M.read (| M.of_value (| Value.String "biggest" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "biggest" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + + Module Impl_core_marker_Copy_for_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.read (| self |))) ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + + Module Impl_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo". + + (* + fn mark_as_immediate(&mut self) -> Result<(), EofValidationError> { + if self.is_jumpdest { + // Jump to immediate bytes. + return Err(EofValidationError::JumpToImmediateBytes); + } + self.is_immediate = true; + Ok(()) + } + *) + Definition mark_as_immediate (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "is_jumpdest" + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter::analysis::EofValidationError::JumpToImmediateBytes" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", + "is_immediate" + |), + M.of_value (| Value.Bool true |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_mark_as_immediate : + M.IsAssociatedFunction Self "mark_as_immediate" mark_as_immediate. + End Impl_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + + Module Impl_core_default_Default_for_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo". + + (* + fn default() -> Self { + Self { + is_immediate: false, + is_jumpdest: false, + smallest: i32::MAX, + biggest: i32::MIN, + } + } + *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo" + [ + ("is_immediate", A.to_value (M.of_value (| Value.Bool false |))); + ("is_jumpdest", A.to_value (M.of_value (| Value.Bool false |))); + ("smallest", A.to_value (M.read (| M.get_constant (| "core::num::MAX" |) |))); + ("biggest", A.to_value (M.read (| M.get_constant (| "core::num::MIN" |) |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_interpreter_analysis_validate_eof_code_InstructionInfo. + End validate_eof_code. + End analysis. +End interpreter. diff --git a/CoqOfRust/revm/interpreter/contract.v b/CoqOfRust/revm/interpreter/contract.v new file mode 100644 index 000000000..42918efe0 --- /dev/null +++ b/CoqOfRust/revm/interpreter/contract.v @@ -0,0 +1,721 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter. + Module contract. + (* StructRecord + { + name := "Contract"; + ty_params := []; + fields := + [ + ("input", Ty.path "alloy_primitives::bytes_::Bytes"); + ("bytecode", Ty.path "revm_primitives::bytecode::Bytecode"); + ("hash", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::bits::fixed::FixedBytes" ]); + ("target_address", Ty.path "alloy_primitives::bits::address::Address"); + ("caller", Ty.path "alloy_primitives::bits::address::Address"); + ("call_value", Ty.path "ruint::Uint") + ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_contract_Contract. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::contract::Contract". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::contract::Contract" + [ + ("input", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "input" + |) + ] + |))); + ("bytecode", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_primitives::bytecode::Bytecode", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |))); + ("hash", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::bits::fixed::FixedBytes" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "hash" + |) + ] + |))); + ("target_address", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bits::address::Address", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + ] + |))); + ("caller", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bits::address::Address", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "caller" + |) + ] + |))); + ("call_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "ruint::Uint", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "call_value" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_contract_Contract. + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_contract_Contract. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::contract::Contract". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.read (| + let names := + M.alloc (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "input" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "bytecode" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "hash" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "target_address" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "caller" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "call_value" |) |)) + ] + |) + |) + |) in + let values := + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "input" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "hash" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "target_address" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "caller" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "call_value" + |) + |) + |)) + ] + |) + |) + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_fields_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Contract" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| names |) |); + M.read (| values |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_contract_Contract. + + Module Impl_core_default_Default_for_revm_interpreter_interpreter_contract_Contract. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::contract::Contract". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::contract::Contract" + [ + ("input", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "default", + [] + |), + [] + |))); + ("bytecode", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "revm_primitives::bytecode::Bytecode", + [], + "default", + [] + |), + [] + |))); + ("hash", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::bits::fixed::FixedBytes" ], + [], + "default", + [] + |), + [] + |))); + ("target_address", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "alloy_primitives::bits::address::Address", + [], + "default", + [] + |), + [] + |))); + ("caller", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "alloy_primitives::bits::address::Address", + [], + "default", + [] + |), + [] + |))); + ("call_value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "ruint::Uint", + [], + "default", + [] + |), + [] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_interpreter_contract_Contract. + + Module Impl_revm_interpreter_interpreter_contract_Contract. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::contract::Contract". + + (* + pub fn new( + input: Bytes, + bytecode: Bytecode, + hash: Option, + target_address: Address, + caller: Address, + call_value: U256, + ) -> Self { + let bytecode = to_analysed(bytecode); + + Self { + input, + bytecode, + hash, + target_address, + caller, + call_value, + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ input; bytecode; hash; target_address; caller; call_value ] => + ltac:(M.monadic + (let input := M.alloc (| input |) in + let bytecode := M.alloc (| bytecode |) in + let hash := M.alloc (| hash |) in + let target_address := M.alloc (| target_address |) in + let caller := M.alloc (| caller |) in + let call_value := M.alloc (| call_value |) in + M.read (| + let bytecode := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::interpreter::analysis::to_analysed", [] |), + [ M.read (| bytecode |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::contract::Contract" + [ + ("input", A.to_value (M.read (| input |))); + ("bytecode", A.to_value (M.read (| bytecode |))); + ("hash", A.to_value (M.read (| hash |))); + ("target_address", A.to_value (M.read (| target_address |))); + ("caller", A.to_value (M.read (| caller |))); + ("call_value", A.to_value (M.read (| call_value |))) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn new_env(env: &Env, bytecode: Bytecode, hash: Option) -> Self { + let contract_address = match env.tx.transact_to { + TransactTo::Call(caller) => caller, + TransactTo::Create => Address::ZERO, + }; + Self::new( + env.tx.data.clone(), + bytecode, + hash, + contract_address, + env.tx.caller, + env.tx.value, + ) + } + *) + Definition new_env (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ env; bytecode; hash ] => + ltac:(M.monadic + (let env := M.alloc (| env |) in + let bytecode := M.alloc (| bytecode |) in + let hash := M.alloc (| hash |) in + M.read (| + let contract_address := + M.copy (| + M.match_operator (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| env |), + "revm_primitives::env::Env", + "tx" + |), + "revm_primitives::env::TxEnv", + "transact_to" + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_primitives::env::TransactTo::Call", + 0 + |) in + let caller := M.copy (| γ0_0 |) in + caller)); + fun γ => + ltac:(M.monadic + (M.get_constant (| "alloy_primitives::bits::address::ZERO" |))) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::contract::Contract", + "new", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| env |), + "revm_primitives::env::Env", + "tx" + |), + "revm_primitives::env::TxEnv", + "data" + |) + ] + |); + M.read (| bytecode |); + M.read (| hash |); + M.read (| contract_address |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| env |), + "revm_primitives::env::Env", + "tx" + |), + "revm_primitives::env::TxEnv", + "caller" + |) + |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| env |), + "revm_primitives::env::Env", + "tx" + |), + "revm_primitives::env::TxEnv", + "value" + |) + |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new_env : M.IsAssociatedFunction Self "new_env" new_env. + + (* + pub fn new_with_context( + input: Bytes, + bytecode: Bytecode, + hash: Option, + call_context: &CallInputs, + ) -> Self { + Self::new( + input, + bytecode, + hash, + call_context.target_address, + call_context.caller, + call_context.call_value(), + ) + } + *) + Definition new_with_context (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ input; bytecode; hash; call_context ] => + ltac:(M.monadic + (let input := M.alloc (| input |) in + let bytecode := M.alloc (| bytecode |) in + let hash := M.alloc (| hash |) in + let call_context := M.alloc (| call_context |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::contract::Contract", + "new", + [] + |), + [ + M.read (| input |); + M.read (| bytecode |); + M.read (| hash |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| call_context |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "target_address" + |) + |); + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| call_context |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "caller" + |) + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "call_value", + [] + |), + [ M.read (| call_context |) ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new_with_context : + M.IsAssociatedFunction Self "new_with_context" new_with_context. + + (* + pub fn is_valid_jump(&self, pos: usize) -> bool { + self.bytecode + .legacy_jump_table() + .map(|i| i.is_valid(pos)) + .unwrap_or(false) + } + *) + Definition is_valid_jump (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; pos ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let pos := M.alloc (| pos |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "bool" ], + "unwrap_or", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ + Ty.apply + (Ty.path "&") + [ Ty.path "revm_primitives::bytecode::legacy::jump_map::JumpTable" ] + ], + "map", + [ + Ty.path "bool"; + Ty.function + [ + Ty.tuple + [ + Ty.apply + (Ty.path "&") + [ Ty.path "revm_primitives::bytecode::legacy::jump_map::JumpTable" ] + ] + ] + (Ty.path "bool") + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_primitives::bytecode::Bytecode", + "legacy_jump_table", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::contract::Contract", + "bytecode" + |) + ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let i := M.copy (| γ |) in + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_primitives::bytecode::legacy::jump_map::JumpTable", + "is_valid", + [] + |), + [ M.read (| i |); M.read (| pos |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |); + M.of_value (| Value.Bool false |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_valid_jump : + M.IsAssociatedFunction Self "is_valid_jump" is_valid_jump. + End Impl_revm_interpreter_interpreter_contract_Contract. + End contract. +End interpreter. diff --git a/CoqOfRust/revm/interpreter/shared_memory.v b/CoqOfRust/revm/interpreter/shared_memory.v new file mode 100644 index 000000000..a31dea498 --- /dev/null +++ b/CoqOfRust/revm/interpreter/shared_memory.v @@ -0,0 +1,2278 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter. + Module shared_memory. + (* StructRecord + { + name := "SharedMemory"; + ty_params := []; + fields := + [ + ("buffer", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ]); + ("checkpoints", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ]); + ("last_checkpoint", Ty.path "usize") + ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::shared_memory::SharedMemory" + [ + ("buffer", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |) + ] + |))); + ("checkpoints", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "checkpoints" + |) + ] + |))); + ("last_checkpoint", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "usize", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "last_checkpoint" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ] + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ], + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ] + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "checkpoints" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "checkpoints" + |) + ] + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "last_checkpoint" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "last_checkpoint" + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + + Module Impl_core_hash_Hash_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ], + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "checkpoints" + |); + M.read (| state |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "usize", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "last_checkpoint" + |); + M.read (| state |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + + Definition value_EMPTY_SHARED_MEMORY : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::shared_memory::SharedMemory" + [ + ("buffer", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [] + |))); + ("checkpoints", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ], + "new", + [] + |), + [] + |))); + ("last_checkpoint", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) + |))). + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory". + + (* + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("SharedMemory") + .field("current_len", &self.len()) + .field( + "context_memory", + &crate::primitives::hex::encode(self.context_memory()), + ) + .finish_non_exhaustive() + } + *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "finish_non_exhaustive", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "field", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "field", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "SharedMemory" |) |) + ] + |) + |); + M.read (| M.of_value (| Value.String "current_len" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ M.read (| self |) ] + |) + |) + |) + ] + |); + M.read (| M.of_value (| Value.String "context_memory" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_function (| + "const_hex::encode", + [ Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ] + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "context_memory", + [] + |), + [ M.read (| self |) ] + |) + ] + |) + |) + |) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + + Module Impl_core_default_Default_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory". + + (* + fn default() -> Self { + Self::new() + } + *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "new", + [] + |), + [] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_interpreter_shared_memory_SharedMemory. + + Module Impl_revm_interpreter_interpreter_shared_memory_SharedMemory. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory". + + (* + pub fn new() -> Self { + Self::with_capacity(4 * 1024) // from evmone + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "with_capacity", + [] + |), + [ + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| Value.Integer 4 |), + M.of_value (| Value.Integer 1024 |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn with_capacity(capacity: usize) -> Self { + Self { + buffer: Vec::with_capacity(capacity), + checkpoints: Vec::with_capacity(32), + last_checkpoint: 0, + #[cfg(feature = "memory_limit")] + memory_limit: u64::MAX, + } + } + *) + Definition with_capacity (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ capacity ] => + ltac:(M.monadic + (let capacity := M.alloc (| capacity |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::shared_memory::SharedMemory" + [ + ("buffer", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "with_capacity", + [] + |), + [ M.read (| capacity |) ] + |))); + ("checkpoints", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ], + "with_capacity", + [] + |), + [ M.of_value (| Value.Integer 32 |) ] + |))); + ("last_checkpoint", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_with_capacity : + M.IsAssociatedFunction Self "with_capacity" with_capacity. + + (* + pub fn new_context(&mut self) { + let new_checkpoint = self.buffer.len(); + self.checkpoints.push(new_checkpoint); + self.last_checkpoint = new_checkpoint; + } + *) + Definition new_context (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let new_checkpoint := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ], + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "checkpoints" + |); + M.read (| new_checkpoint |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "last_checkpoint" + |), + M.read (| new_checkpoint |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new_context : M.IsAssociatedFunction Self "new_context" new_context. + + (* + pub fn free_context(&mut self) { + if let Some(old_checkpoint) = self.checkpoints.pop() { + self.last_checkpoint = self.checkpoints.last().cloned().unwrap_or_default(); + // SAFETY: buffer length is less than or equal `old_checkpoint` + unsafe { self.buffer.set_len(old_checkpoint) }; + } + } + *) + Definition free_context (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ], + "pop", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "checkpoints" + |) + ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let old_checkpoint := M.copy (| γ0_0 |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "last_checkpoint" + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], + "unwrap_or_default", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&") [ Ty.path "usize" ] ], + "cloned", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "usize" ], + "last", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "usize"; Ty.path "alloc::alloc::Global" ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "checkpoints" + |) + ] + |) + ] + |) + ] + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "set_len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |); + M.read (| old_checkpoint |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_free_context : + M.IsAssociatedFunction Self "free_context" free_context. + + (* + pub fn len(&self) -> usize { + self.buffer.len() - self.last_checkpoint + } + *) + Definition len (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |) + ] + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "last_checkpoint" + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_len : M.IsAssociatedFunction Self "len" len. + + (* + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + *) + Definition is_empty (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + BinOp.Pure.eq (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ M.read (| self |) ] + |), + M.of_value (| Value.Integer 0 |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_empty : M.IsAssociatedFunction Self "is_empty" is_empty. + + (* + pub fn current_expansion_cost(&self) -> u64 { + crate::gas::memory_gas_for_len(self.len()) + } + *) + Definition current_expansion_cost (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_function (| "revm_interpreter::gas::calc::memory_gas_for_len", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ M.read (| self |) ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_current_expansion_cost : + M.IsAssociatedFunction Self "current_expansion_cost" current_expansion_cost. + + (* + pub fn resize(&mut self, new_size: usize) { + self.buffer.resize(self.last_checkpoint + new_size, 0); + } + *) + Definition resize (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; new_size ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let new_size := M.alloc (| new_size |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "resize", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |); + BinOp.Panic.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.of_value (| Value.Integer 0 |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_resize : M.IsAssociatedFunction Self "resize" resize. + + (* + pub fn slice(&self, offset: usize, size: usize) -> &[u8] { + self.slice_range(offset..offset + size) + } + *) + Definition slice (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; offset; size ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let offset := M.alloc (| offset |) in + let size := M.alloc (| size |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice_range", + [] + |), + [ + M.read (| self |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| offset |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| offset |), + M.read (| size |) + |))) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_slice : M.IsAssociatedFunction Self "slice" slice. + + (* + pub fn slice_range(&self, range @ Range { start, end }: Range) -> &[u8] { + match self.context_memory().get(range) { + Some(slice) => slice, + None => debug_unreachable!("slice OOB: {start}..{end}; len: {}", self.len()), + } + } + *) + Definition slice_range (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; β1 ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let β1 := M.alloc (| β1 |) in + M.match_operator (| + β1, + [ + fun γ => + ltac:(M.monadic + (let range := M.copy (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "core::ops::range::Range", + "start" + |) in + let γ1_1 := + M.SubPointer.get_struct_record_field (| + γ, + "core::ops::range::Range", + "end" + |) in + let start := M.copy (| γ1_0 |) in + let end_ := M.copy (| γ1_1 |) in + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "get", + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "context_memory", + [] + |), + [ M.read (| self |) ] + |); + M.read (| range |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let slice := M.copy (| γ0_0 |) in + M.alloc (| M.read (| slice |) |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: slice OOB: " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ".." |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String "; len: " + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "len", + [] + |), + [ M.read (| self |) ] + |) + |)); + A.to_value start; + A.to_value end_ + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let args := M.copy (| γ |) in + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.read (| + M.SubPointer.get_tuple_field (| + args, + 1 + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.read (| + M.SubPointer.get_tuple_field (| + args, + 2 + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ + M.read (| + M.SubPointer.get_tuple_field (| + args, + 0 + |) + |) + ] + |)) + ] + |) + |))) + ] + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::hint::unreachable_unchecked", + [] + |), + [] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |))) + ] + |) + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_slice_range : M.IsAssociatedFunction Self "slice_range" slice_range. + + (* + pub fn slice_mut(&mut self, offset: usize, size: usize) -> &mut [u8] { + let end = offset + size; + match self.context_memory_mut().get_mut(offset..end) { + Some(slice) => slice, + None => debug_unreachable!("slice OOB: {offset}..{end}"), + } + } + *) + Definition slice_mut (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; offset; size ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let offset := M.alloc (| offset |) in + let size := M.alloc (| size |) in + M.read (| + let end_ := + M.alloc (| + BinOp.Panic.add (| Integer.Usize, M.read (| offset |), M.read (| size |) |) + |) in + M.alloc (| + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "get_mut", + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "context_memory_mut", + [] + |), + [ M.read (| self |) ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| offset |))); + ("end_", A.to_value (M.read (| end_ |))) + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let slice := M.copy (| γ0_0 |) in + M.alloc (| M.read (| slice |) |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: slice OOB: " + |) + |)); + A.to_value + (M.read (| + M.of_value (| Value.String ".." |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ offset ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ Ty.path "usize" ] + |), + [ end_ ] + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::hint::unreachable_unchecked", + [] + |), + [] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |))) + ] + |) + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_slice_mut : M.IsAssociatedFunction Self "slice_mut" slice_mut. + + (* + pub fn get_byte(&self, offset: usize) -> u8 { + self.slice(offset, 1)[0] + } + *) + Definition get_byte (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; offset ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let offset := M.alloc (| offset |) in + M.read (| + M.SubPointer.get_array_field (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice", + [] + |), + [ M.read (| self |); M.read (| offset |); M.of_value (| Value.Integer 1 |) ] + |), + M.alloc (| M.of_value (| Value.Integer 0 |) |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_get_byte : M.IsAssociatedFunction Self "get_byte" get_byte. + + (* + pub fn get_word(&self, offset: usize) -> B256 { + self.slice(offset, 32).try_into().unwrap() + } + *) + Definition get_word (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; offset ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let offset := M.alloc (| offset |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "alloy_primitives::bits::fixed::FixedBytes"; + Ty.path "core::array::TryFromSliceError" + ], + "unwrap", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryInto", + Ty.apply (Ty.path "&") [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ], + [ Ty.path "alloy_primitives::bits::fixed::FixedBytes" ], + "try_into", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice", + [] + |), + [ M.read (| self |); M.read (| offset |); M.of_value (| Value.Integer 32 |) ] + |) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_get_word : M.IsAssociatedFunction Self "get_word" get_word. + + (* + pub fn get_u256(&self, offset: usize) -> U256 { + self.get_word(offset).into() + } + *) + Definition get_u256 (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; offset ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let offset := M.alloc (| offset |) in + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "into", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "get_word", + [] + |), + [ M.read (| self |); M.read (| offset |) ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_get_u256 : M.IsAssociatedFunction Self "get_u256" get_u256. + + (* + pub fn set_byte(&mut self, offset: usize, byte: u8) { + self.set(offset, &[byte]); + } + *) + Definition set_byte (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; offset; byte ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let offset := M.alloc (| offset |) in + let byte := M.alloc (| byte |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set", + [] + |), + [ + M.read (| self |); + M.read (| offset |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| Value.Array [ A.to_value (M.read (| byte |)) ] |) + |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set_byte : M.IsAssociatedFunction Self "set_byte" set_byte. + + (* + pub fn set_word(&mut self, offset: usize, value: &B256) { + self.set(offset, &value[..]); + } + *) + Definition set_word (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; offset; value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let offset := M.alloc (| offset |) in + let value := M.alloc (| value |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set", + [] + |), + [ + M.read (| self |); + M.read (| offset |); + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "core::ops::range::RangeFull" ], + "index", + [] + |), + [ + M.read (| value |); + M.of_value (| Value.StructTuple "core::ops::range::RangeFull" [] |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set_word : M.IsAssociatedFunction Self "set_word" set_word. + + (* + pub fn set_u256(&mut self, offset: usize, value: U256) { + self.set(offset, &value.to_be_bytes::<32>()); + } + *) + Definition set_u256 (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; offset; value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let offset := M.alloc (| offset |) in + let value := M.alloc (| value |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "set", + [] + |), + [ + M.read (| self |); + M.read (| offset |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "to_be_bytes", + [] + |), + [ value ] + |) + |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set_u256 : M.IsAssociatedFunction Self "set_u256" set_u256. + + (* + pub fn set(&mut self, offset: usize, value: &[u8]) { + if !value.is_empty() { + self.slice_mut(offset, value.len()).copy_from_slice(value); + } + } + *) + Definition set (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; offset; value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let offset := M.alloc (| offset |) in + let value := M.alloc (| value |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "is_empty", + [] + |), + [ M.read (| value |) ] + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "copy_from_slice", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice_mut", + [] + |), + [ + M.read (| self |); + M.read (| offset |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| value |) ] + |) + ] + |); + M.read (| value |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set : M.IsAssociatedFunction Self "set" set. + + (* + pub fn set_data(&mut self, memory_offset: usize, data_offset: usize, len: usize, data: &[u8]) { + if data_offset >= data.len() { + // nullify all memory slots + self.slice_mut(memory_offset, len).fill(0); + return; + } + let data_end = min(data_offset + len, data.len()); + let data_len = data_end - data_offset; + debug_assert!(data_offset < data.len() && data_end <= data.len()); + let data = unsafe { data.get_unchecked(data_offset..data_end) }; + self.slice_mut(memory_offset, data_len) + .copy_from_slice(data); + + // nullify rest of memory slots + // SAFETY: Memory is assumed to be valid, and it is commented where this assumption is made. + self.slice_mut(memory_offset + data_len, len - data_len) + .fill(0); + } + *) + Definition set_data (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; memory_offset; data_offset; len; data ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let memory_offset := M.alloc (| memory_offset |) in + let data_offset := M.alloc (| data_offset |) in + let len := M.alloc (| len |) in + let data := M.alloc (| data |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| + M.read (| data_offset |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| data |) ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "fill", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice_mut", + [] + |), + [ + M.read (| self |); + M.read (| memory_offset |); + M.read (| len |) + ] + |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + M.return_ (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + 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 |) + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| data |) ] + |) + ] + |) + |) in + let data_len := + M.alloc (| + BinOp.Panic.sub (| + Integer.Usize, + M.read (| data_end |), + M.read (| data_offset |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.and (| + BinOp.Pure.lt (| + M.read (| data_offset |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| data |) ] + |) + |), + ltac:(M.monadic + (BinOp.Pure.le (| + M.read (| data_end |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| data |) ] + |) + |))) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic", [] |), + [ + M.read (| + M.of_value (| + Value.String + "assertion failed: data_offset < data.len() && data_end <= data.len()" + |) + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let data := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "get_unchecked", + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] + |), + [ + M.read (| data |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| data_offset |))); + ("end_", A.to_value (M.read (| data_end |))) + ] + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "copy_from_slice", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice_mut", + [] + |), + [ M.read (| self |); M.read (| memory_offset |); M.read (| data_len |) ] + |); + M.read (| data |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "fill", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "slice_mut", + [] + |), + [ + 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 |) + |) + ] + |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set_data : M.IsAssociatedFunction Self "set_data" set_data. + + (* + pub fn copy(&mut self, dst: usize, src: usize, len: usize) { + self.context_memory_mut().copy_within(src..src + len, dst); + } + *) + Definition copy (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; dst; src; len ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let dst := M.alloc (| dst |) in + let src := M.alloc (| src |) in + let len := M.alloc (| len |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "copy_within", + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::shared_memory::SharedMemory", + "context_memory_mut", + [] + |), + [ M.read (| self |) ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", A.to_value (M.read (| src |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| src |), + M.read (| len |) + |))) + ] + |); + M.read (| dst |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_copy : M.IsAssociatedFunction Self "copy" copy. + + (* + pub fn context_memory(&self) -> &[u8] { + // SAFETY: access bounded by buffer length + unsafe { + self.buffer + .get_unchecked(self.last_checkpoint..self.buffer.len()) + } + } + *) + Definition context_memory (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "get_unchecked", + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |) + ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "last_checkpoint" + |) + |))); + ("end_", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |) + ] + |))) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_context_memory : + M.IsAssociatedFunction Self "context_memory" context_memory. + + (* + pub fn context_memory_mut(&mut self) -> &mut [u8] { + let buf_len = self.buffer.len(); + // SAFETY: access bounded by buffer length + unsafe { self.buffer.get_unchecked_mut(self.last_checkpoint..buf_len) } + } + *) + Definition context_memory_mut (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let buf_len := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "get_unchecked_mut", + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ], + [], + "deref_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "buffer" + |) + ] + |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::shared_memory::SharedMemory", + "last_checkpoint" + |) + |))); + ("end_", A.to_value (M.read (| buf_len |))) + ] + |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_context_memory_mut : + M.IsAssociatedFunction Self "context_memory_mut" context_memory_mut. + End Impl_revm_interpreter_interpreter_shared_memory_SharedMemory. + + (* + pub const fn num_words(len: u64) -> u64 { + len.saturating_add(31) / 32 + } + *) + Definition num_words (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ len ] => + ltac:(M.monadic + (let len := M.alloc (| len |) in + BinOp.Panic.div (| + Integer.U64, + M.call_closure (| + M.get_associated_function (| Ty.path "u64", "saturating_add", [] |), + [ M.read (| len |); M.of_value (| Value.Integer 31 |) ] + |), + M.of_value (| Value.Integer 32 |) + |))) + | _, _ => M.impossible + end. + End shared_memory. +End interpreter. diff --git a/CoqOfRust/revm/interpreter/stack.v b/CoqOfRust/revm/interpreter/stack.v new file mode 100644 index 000000000..80211c607 --- /dev/null +++ b/CoqOfRust/revm/interpreter/stack.v @@ -0,0 +1,3658 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter. + Module stack. + Definition value_STACK_LIMIT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1024 |) |))). + + (* StructRecord + { + name := "Stack"; + ty_params := []; + fields := + [ + ("data", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ]) + ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_stack_Stack. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::stack::Stack". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Stack" |) |); + M.read (| M.of_value (| Value.String "data" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_stack_Stack. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_stack_Stack. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::stack::Stack". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_stack_Stack. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_stack_Stack. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::stack::Stack". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + [ + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ] + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_stack_Stack. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_stack_Stack. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::stack::Stack". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_stack_Stack. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_stack_Stack. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::stack::Stack". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_stack_Stack. + + Module Impl_core_hash_Hash_for_revm_interpreter_interpreter_stack_Stack. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::stack::Stack". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |); + M.read (| state |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_interpreter_stack_Stack. + + Module Impl_core_fmt_Display_for_revm_interpreter_interpreter_stack_Stack. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::stack::Stack". + + (* + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str("[")?; + for (i, x) in self.data.iter().enumerate() { + if i > 0 { + f.write_str(", ")?; + } + write!(f, "{x}")?; + } + f.write_str("]") + } + *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + 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.tuple []; Ty.path "core::fmt::Error" ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_str", + [] + |), + [ M.read (| f |); M.read (| M.of_value (| Value.String "[" |) |) ] + |) + ] + |) + |), + [ + 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") + [ Ty.tuple []; Ty.path "core::fmt::Error" ], + [ + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.path "core::convert::Infallible"; + Ty.path "core::fmt::Error" + ] + ], + "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.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "core::iter::adapters::enumerate::Enumerate") + [ + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "ruint::Uint" ] + ], + [], + "into_iter", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "ruint::Uint" ], + [], + "enumerate", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "ruint::Uint" ], + "iter", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::Deref", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" + ], + [], + "deref", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |) + ] + |) + ] + |) + ] + |) + |), + [ + 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::iter::adapters::enumerate::Enumerate") + [ + Ty.apply + (Ty.path "core::slice::iter::Iter") + [ Ty.path "ruint::Uint" ] + ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + 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 i := M.copy (| γ1_0 |) in + let x := M.copy (| γ1_1 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| i |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + 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.tuple []; + Ty.path "core::fmt::Error" + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_str", + [] + |), + [ + M.read (| f |); + M.read (| + M.of_value (| + Value.String ", " + |) + |) + ] + |) + ] + |) + |), + [ + 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") + [ + Ty.tuple []; + Ty.path + "core::fmt::Error" + ], + [ + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.path + "core::convert::Infallible"; + Ty.path + "core::fmt::Error" + ] + ], + "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 + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + let _ := + 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.tuple []; Ty.path "core::fmt::Error" ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_fmt", + [] + |), + [ + M.read (| f |); + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ + Ty.path + "ruint::Uint" + ] + ] + |), + [ x ] + |)) + ] + |) + |) + |) + ] + |) + ] + |) + ] + |) + |), + [ + 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") + [ + Ty.tuple []; + Ty.path "core::fmt::Error" + ], + [ + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.path + "core::convert::Infallible"; + Ty.path "core::fmt::Error" + ] + ], + "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 + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + |))) + ] + |)) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_str", + [] + |), + [ M.read (| f |); M.read (| M.of_value (| Value.String "]" |) |) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Display" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Display_for_revm_interpreter_interpreter_stack_Stack. + + Module Impl_core_default_Default_for_revm_interpreter_interpreter_stack_Stack. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::stack::Stack". + + (* + fn default() -> Self { + Self::new() + } + *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "new", + [] + |), + [] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_interpreter_stack_Stack. + + Module Impl_revm_interpreter_interpreter_stack_Stack. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter::stack::Stack". + + (* + pub fn new() -> Self { + Self { + // SAFETY: expansion functions assume that capacity is `STACK_LIMIT`. + data: Vec::with_capacity(STACK_LIMIT), + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter::stack::Stack" + [ + ("data", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "with_capacity", + [] + |), + [ + M.read (| + M.get_constant (| "revm_interpreter::interpreter::stack::STACK_LIMIT" |) + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn len(&self) -> usize { + self.data.len() + } + *) + Definition len (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_len : M.IsAssociatedFunction Self "len" len. + + (* + pub fn is_empty(&self) -> bool { + self.data.is_empty() + } + *) + Definition is_empty (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "is_empty", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_empty : M.IsAssociatedFunction Self "is_empty" is_empty. + + (* + pub fn data(&self) -> &Vec { + &self.data + } + *) + Definition data (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_data : M.IsAssociatedFunction Self "data" data. + + (* + pub fn data_mut(&mut self) -> &mut Vec { + &mut self.data + } + *) + Definition data_mut (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_data_mut : M.IsAssociatedFunction Self "data_mut" data_mut. + + (* + pub fn into_data(self) -> Vec { + self.data + } + *) + Definition into_data (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + self, + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_into_data : M.IsAssociatedFunction Self "into_data" into_data. + + (* + pub fn pop(&mut self) -> Result { + self.data.pop().ok_or(InstructionResult::StackUnderflow) + } + *) + Definition pop (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "ruint::Uint" ], + "ok_or", + [ Ty.path "revm_interpreter::instruction_result::InstructionResult" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "pop", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |); + M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_pop : M.IsAssociatedFunction Self "pop" pop. + + (* + pub unsafe fn pop_unsafe(&mut self) -> U256 { + self.data.pop().unwrap_unchecked() + } + *) + Definition pop_unsafe (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "ruint::Uint" ], + "unwrap_unchecked", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "pop", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_pop_unsafe : M.IsAssociatedFunction Self "pop_unsafe" pop_unsafe. + + (* + pub unsafe fn top_unsafe(&mut self) -> &mut U256 { + let len = self.data.len(); + self.data.get_unchecked_mut(len - 1) + } + *) + Definition top_unsafe (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let len := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "ruint::Uint" ], + "get_unchecked_mut", + [ Ty.path "usize" ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::deref::DerefMut", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + [], + "deref_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_top_unsafe : M.IsAssociatedFunction Self "top_unsafe" top_unsafe. + + (* + pub unsafe fn pop_top_unsafe(&mut self) -> (U256, &mut U256) { + let pop = self.pop_unsafe(); + let top = self.top_unsafe(); + (pop, top) + } + *) + Definition pop_top_unsafe (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let pop := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let top := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| pop |)); A.to_value (M.read (| top |)) ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_pop_top_unsafe : + M.IsAssociatedFunction Self "pop_top_unsafe" pop_top_unsafe. + + (* + pub unsafe fn pop2_unsafe(&mut self) -> (U256, U256) { + let pop1 = self.pop_unsafe(); + let pop2 = self.pop_unsafe(); + (pop1, pop2) + } + *) + Definition pop2_unsafe (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let pop1 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop2 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple [ A.to_value (M.read (| pop1 |)); A.to_value (M.read (| pop2 |)) ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_pop2_unsafe : M.IsAssociatedFunction Self "pop2_unsafe" pop2_unsafe. + + (* + pub unsafe fn pop2_top_unsafe(&mut self) -> (U256, U256, &mut U256) { + let pop1 = self.pop_unsafe(); + let pop2 = self.pop_unsafe(); + let top = self.top_unsafe(); + + (pop1, pop2, top) + } + *) + Definition pop2_top_unsafe (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let pop1 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop2 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let top := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "top_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| pop1 |)); + A.to_value (M.read (| pop2 |)); + A.to_value (M.read (| top |)) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_pop2_top_unsafe : + M.IsAssociatedFunction Self "pop2_top_unsafe" pop2_top_unsafe. + + (* + pub unsafe fn pop3_unsafe(&mut self) -> (U256, U256, U256) { + let pop1 = self.pop_unsafe(); + let pop2 = self.pop_unsafe(); + let pop3 = self.pop_unsafe(); + + (pop1, pop2, pop3) + } + *) + Definition pop3_unsafe (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let pop1 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop2 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop3 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| pop1 |)); + A.to_value (M.read (| pop2 |)); + A.to_value (M.read (| pop3 |)) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_pop3_unsafe : M.IsAssociatedFunction Self "pop3_unsafe" pop3_unsafe. + + (* + pub unsafe fn pop4_unsafe(&mut self) -> (U256, U256, U256, U256) { + let pop1 = self.pop_unsafe(); + let pop2 = self.pop_unsafe(); + let pop3 = self.pop_unsafe(); + let pop4 = self.pop_unsafe(); + + (pop1, pop2, pop3, pop4) + } + *) + Definition pop4_unsafe (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let pop1 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop2 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop3 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop4 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| pop1 |)); + A.to_value (M.read (| pop2 |)); + A.to_value (M.read (| pop3 |)); + A.to_value (M.read (| pop4 |)) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_pop4_unsafe : M.IsAssociatedFunction Self "pop4_unsafe" pop4_unsafe. + + (* + pub unsafe fn pop5_unsafe(&mut self) -> (U256, U256, U256, U256, U256) { + let pop1 = self.pop_unsafe(); + let pop2 = self.pop_unsafe(); + let pop3 = self.pop_unsafe(); + let pop4 = self.pop_unsafe(); + let pop5 = self.pop_unsafe(); + + (pop1, pop2, pop3, pop4, pop5) + } + *) + Definition pop5_unsafe (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let pop1 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop2 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop3 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop4 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + let pop5 := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "pop_unsafe", + [] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value (M.read (| pop1 |)); + A.to_value (M.read (| pop2 |)); + A.to_value (M.read (| pop3 |)); + A.to_value (M.read (| pop4 |)); + A.to_value (M.read (| pop5 |)) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_pop5_unsafe : M.IsAssociatedFunction Self "pop5_unsafe" pop5_unsafe. + + (* + pub fn push_b256(&mut self, value: B256) -> Result<(), InstructionResult> { + self.push(value.into()) + } + *) + Definition push_b256 (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let value := M.alloc (| value |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "push", + [] + |), + [ + M.read (| self |); + M.call_closure (| + M.get_trait_method (| + "core::convert::Into", + Ty.path "alloy_primitives::bits::fixed::FixedBytes", + [ Ty.path "ruint::Uint" ], + "into", + [] + |), + [ M.read (| value |) ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_push_b256 : M.IsAssociatedFunction Self "push_b256" push_b256. + + (* + pub fn push(&mut self, value: U256) -> Result<(), InstructionResult> { + // Allows the compiler to optimize out the `Vec::push` capacity check. + assume!(self.data.capacity() == STACK_LIMIT); + if self.data.len() == STACK_LIMIT { + return Err(InstructionResult::StackOverflow); + } + self.data.push(value); + Ok(()) + } + *) + Definition push (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; value ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let value := M.alloc (| value |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" + ], + "capacity", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |), + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::stack::STACK_LIMIT" + |) + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::panicking::panic_fmt", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: self.data.capacity() == STACK_LIMIT" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "none", + [] + |), + [] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::hint::unreachable_unchecked", + [] + |), + [] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |), + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::stack::STACK_LIMIT" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackOverflow" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "push", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |); + M.read (| value |) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_push : M.IsAssociatedFunction Self "push" push. + + (* + pub fn peek(&self, no_from_top: usize) -> Result { + if self.data.len() > no_from_top { + Ok(self.data[self.data.len() - no_from_top - 1]) + } else { + Err(InstructionResult::StackUnderflow) + } + } + *) + Definition peek (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; no_from_top ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let no_from_top := M.alloc (| no_from_top |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |), + M.read (| no_from_top |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ + A.to_value + (M.read (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + [ Ty.path "usize" ], + "index", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |); + BinOp.Panic.sub (| + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "ruint::Uint"; + Ty.path "alloc::alloc::Global" + ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |), + M.read (| no_from_top |) + |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |)) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_peek : M.IsAssociatedFunction Self "peek" peek. + + (* + pub fn dup(&mut self, n: usize) -> Result<(), InstructionResult> { + assume!(n > 0, "attempted to dup 0"); + let len = self.data.len(); + if len < n { + Err(InstructionResult::StackUnderflow) + } else if len + 1 > STACK_LIMIT { + Err(InstructionResult::StackOverflow) + } else { + // SAFETY: check for out of bounds is done above and it makes this safe to do. + unsafe { + let ptr = self.data.as_mut_ptr().add(len); + ptr::copy_nonoverlapping(ptr.sub(n), ptr, 1); + self.data.set_len(len + 1); + } + Ok(()) + } + } + *) + Definition dup (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; n ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let n := M.alloc (| n |) in + M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + BinOp.Pure.gt (| M.read (| n |), M.of_value (| Value.Integer 0 |) |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: attempted to dup 0" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "none", + [] + |), + [] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::hint::unreachable_unchecked", + [] + |), + [] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let len := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (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 + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |), + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::stack::STACK_LIMIT" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackOverflow" + [] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := + let ptr := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "ruint::Uint" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ + Ty.path "ruint::Uint"; + Ty.path "alloc::alloc::Global" + ], + "as_mut_ptr", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |); + M.read (| len |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::copy_nonoverlapping", + [ Ty.path "ruint::Uint" ] + |), + [ + (* MutToConstPointer *) + M.pointer_coercion (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "ruint::Uint" ], + "sub", + [] + |), + [ M.read (| ptr |); M.read (| n |) ] + |) + |); + M.read (| ptr |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "set_len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |); + BinOp.Panic.add (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_dup : M.IsAssociatedFunction Self "dup" dup. + + (* + pub fn swap(&mut self, n: usize) -> Result<(), InstructionResult> { + self.exchange(0, n) + } + *) + Definition swap (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; n ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let n := M.alloc (| n |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter::stack::Stack", + "exchange", + [] + |), + [ M.read (| self |); M.of_value (| Value.Integer 0 |); M.read (| n |) ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_swap : M.IsAssociatedFunction Self "swap" swap. + + (* + pub fn exchange(&mut self, n: usize, m: usize) -> Result<(), InstructionResult> { + assume!(m > 0, "overlapping exchange"); + let len = self.data.len(); + let n_m_index = n + m; + if n_m_index >= len { + return Err(InstructionResult::StackUnderflow); + } + // SAFETY: `n` and `n_m` are checked to be within bounds, and they don't overlap. + unsafe { + // NOTE: `ptr::swap_nonoverlapping` is more efficient than `slice::swap` or `ptr::swap` + // because it operates under the assumption that the pointers do not overlap, + // eliminating an intemediate copy, + // which is a condition we know to be true in this context. + let top = self.data.as_mut_ptr().add(len - 1); + core::ptr::swap_nonoverlapping(top.sub(n), top.sub(n_m_index), 1); + } + Ok(()) + } + *) + Definition exchange (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; n; m ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let n := M.alloc (| n |) in + let m := M.alloc (| m |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + BinOp.Pure.gt (| + M.read (| m |), + M.of_value (| Value.Integer 0 |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| M.of_value (| Value.Bool true |) |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::panicking::panic_fmt", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: overlapping exchange" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "none", + [] + |), + [] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| + "core::hint::unreachable_unchecked", + [] + |), + [] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let len := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |) + |) in + let n_m_index := + M.alloc (| + BinOp.Panic.add (| Integer.Usize, M.read (| n |), M.read (| m |) |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| M.read (| n_m_index |), M.read (| len |) |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + let top := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "ruint::Uint" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "as_mut_ptr", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |); + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 1 |) + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::ptr::swap_nonoverlapping", + [ Ty.path "ruint::Uint" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "ruint::Uint" ], + "sub", + [] + |), + [ M.read (| top |); M.read (| n |) ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "ruint::Uint" ], + "sub", + [] + |), + [ M.read (| top |); M.read (| n_m_index |) ] + |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_exchange : M.IsAssociatedFunction Self "exchange" exchange. + + (* + pub fn push_slice(&mut self, slice: &[u8]) -> Result<(), InstructionResult> { + if slice.is_empty() { + return Ok(()); + } + + let n_words = (slice.len() + 31) / 32; + let new_len = self.data.len() + n_words; + if new_len > STACK_LIMIT { + return Err(InstructionResult::StackOverflow); + } + + // SAFETY: length checked above. + unsafe { + let dst = self.data.as_mut_ptr().add(self.data.len()).cast::(); + self.data.set_len(new_len); + + let mut i = 0; + + // write full words + let words = slice.chunks_exact(32); + let partial_last_word = words.remainder(); + for word in words { + // Note: we unroll `U256::from_be_bytes` here to write directly into the buffer, + // instead of creating a 32 byte array on the stack and then copying it over. + for l in word.rchunks_exact(8) { + dst.add(i).write(u64::from_be_bytes(l.try_into().unwrap())); + i += 1; + } + } + + if partial_last_word.is_empty() { + return Ok(()); + } + + // write limbs of partial last word + let limbs = partial_last_word.rchunks_exact(8); + let partial_last_limb = limbs.remainder(); + for l in limbs { + dst.add(i).write(u64::from_be_bytes(l.try_into().unwrap())); + i += 1; + } + + // write partial last limb by padding with zeros + if !partial_last_limb.is_empty() { + let mut tmp = [0u8; 8]; + tmp[8 - partial_last_limb.len()..].copy_from_slice(partial_last_limb); + dst.add(i).write(u64::from_be_bytes(tmp)); + i += 1; + } + + debug_assert_eq!((i + 3) / 4, n_words, "wrote too much"); + + // zero out upper bytes of last word + let m = i % 4; // 32 / 8 + if m != 0 { + dst.add(i).write_bytes(0, 4 - m); + } + } + + Ok(()) + } + *) + Definition push_slice (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; slice ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let slice := M.alloc (| slice |) in + M.catch_return (| + ltac:(M.monadic + (M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "is_empty", + [] + |), + [ M.read (| slice |) ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let n_words := + M.alloc (| + BinOp.Panic.div (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| slice |) ] + |), + M.of_value (| Value.Integer 31 |) + |), + M.of_value (| Value.Integer 32 |) + |) + |) in + let new_len := + M.alloc (| + BinOp.Panic.add (| + Integer.Usize, + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |), + M.read (| n_words |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.read (| new_len |), + M.read (| + M.get_constant (| + "revm_interpreter::interpreter::stack::STACK_LIMIT" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackOverflow" + [] + |)) + ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + let dst := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "ruint::Uint" ], + "cast", + [ Ty.path "u64" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "ruint::Uint" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "as_mut_ptr", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |) + ] + |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "set_len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |); + M.read (| new_len |) + ] + |) + |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let words := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "chunks_exact", + [] + |), + [ M.read (| slice |); M.of_value (| Value.Integer 32 |) ] + |) + |) in + let partial_last_word := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::ChunksExact") [ Ty.path "u8" ], + "remainder", + [] + |), + [ words ] + |) + |) in + let _ := + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "core::slice::iter::ChunksExact") + [ Ty.path "u8" ], + [], + "into_iter", + [] + |), + [ M.read (| words |) ] + |) + |), + [ + 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::ChunksExact") + [ Ty.path "u8" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let word := M.copy (| γ0_0 |) in + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path + "core::slice::iter::RChunksExact") + [ Ty.path "u8" ], + [], + "into_iter", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "rchunks_exact", + [] + |), + [ + M.read (| word |); + M.of_value (| Value.Integer 8 |) + ] + |) + ] + |) + |), + [ + 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::RChunksExact") + [ Ty.path "u8" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let l := M.copy (| γ0_0 |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*mut") + [ Ty.path "u64" ], + "write", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*mut") + [ Ty.path "u64" + ], + "add", + [] + |), + [ + M.read (| dst |); + M.read (| i |) + ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "u64", + "from_be_bytes", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.apply + (Ty.path + "array") + [ + Ty.path + "u8" + ]; + Ty.path + "core::array::TryFromSliceError" + ], + "unwrap", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryInto", + Ty.apply + (Ty.path + "&") + [ + Ty.apply + (Ty.path + "slice") + [ + Ty.path + "u8" + ] + ], + [ + Ty.apply + (Ty.path + "array") + [ + Ty.path + "u8" + ] + ], + "try_into", + [] + |), + [ + M.read (| + l + |) + ] + |) + ] + |) + ] + |) + ] + |) + |) in + let _ := + let β := i in + M.write (| + β, + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| + Value.Integer 1 + |) + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + |))) + ] + |)))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + |))) + ] + |)) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "is_empty", + [] + |), + [ M.read (| partial_last_word |) ] + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let limbs := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "rchunks_exact", + [] + |), + [ M.read (| partial_last_word |); M.of_value (| Value.Integer 8 |) ] + |) + |) in + let partial_last_limb := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::slice::iter::RChunksExact") [ Ty.path "u8" ], + "remainder", + [] + |), + [ limbs ] + |) + |) in + let _ := + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "core::slice::iter::RChunksExact") + [ Ty.path "u8" ], + [], + "into_iter", + [] + |), + [ M.read (| limbs |) ] + |) + |), + [ + 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::RChunksExact") + [ Ty.path "u8" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let l := M.copy (| γ0_0 |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u64" ], + "write", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*mut") + [ Ty.path "u64" ], + "add", + [] + |), + [ M.read (| dst |); M.read (| i |) ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "u64", + "from_be_bytes", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::result::Result") + [ + Ty.apply + (Ty.path "array") + [ Ty.path "u8" ]; + Ty.path + "core::array::TryFromSliceError" + ], + "unwrap", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::convert::TryInto", + Ty.apply + (Ty.path "&") + [ + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ] + ], + [ + Ty.apply + (Ty.path "array") + [ Ty.path "u8" ] + ], + "try_into", + [] + |), + [ M.read (| l |) ] + |) + ] + |) + ] + |) + ] + |) + |) in + let _ := + let β := i in + M.write (| + β, + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + |))) + ] + |)) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "is_empty", + [] + |), + [ M.read (| partial_last_limb |) ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let tmp := + M.alloc (| repeat (| M.of_value (| Value.Integer 0 |), 8 |) |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "copy_from_slice", + [] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply (Ty.path "array") [ Ty.path "u8" ], + [ + Ty.apply + (Ty.path "core::ops::range::RangeFrom") + [ Ty.path "usize" ] + ], + "index_mut", + [] + |), + [ + tmp; + M.of_value (| + Value.StructRecord + "core::ops::range::RangeFrom" + [ + ("start", + A.to_value + (BinOp.Panic.sub (| + Integer.Usize, + M.of_value (| Value.Integer 8 |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| partial_last_limb |) ] + |) + |))) + ] + |) + ] + |); + M.read (| partial_last_limb |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u64" ], + "write", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u64" ], + "add", + [] + |), + [ M.read (| dst |); M.read (| i |) ] + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "u64", + "from_be_bytes", + [] + |), + [ M.read (| tmp |) ] + |) + ] + |) + |) in + let _ := + let β := i in + M.write (| + β, + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use (M.alloc (| M.of_value (| Value.Bool true |) |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + let _ := + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.alloc (| + BinOp.Panic.div (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 3 |) + |), + M.of_value (| Value.Integer 4 |) + |) + |)); + A.to_value n_words + ] + |) + |), + [ + 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 left_val := M.copy (| γ0_0 |) in + let right_val := M.copy (| γ0_1 |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + BinOp.Pure.eq (| + M.read (| M.read (| left_val |) |), + M.read (| M.read (| right_val |) |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let kind := + M.alloc (| + M.of_value (| + Value.StructTuple + "core::panicking::AssertKind::Eq" + [] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_function (| + "core::panicking::assert_failed", + [ Ty.path "usize"; Ty.path "usize" ] + |), + [ + M.read (| kind |); + M.read (| left_val |); + M.read (| right_val |); + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "wrote too much" + |) + |)) + ] + |) + |) + |) + ] + |)) + ] + |) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let m := + M.alloc (| + BinOp.Panic.rem (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 4 |) + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.read (| m |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u64" ], + "write_bytes", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*mut") [ Ty.path "u64" ], + "add", + [] + |), + [ M.read (| dst |); M.read (| i |) ] + |); + M.of_value (| Value.Integer 0 |); + BinOp.Panic.sub (| + Integer.Usize, + M.of_value (| Value.Integer 4 |), + M.read (| m |) + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_push_slice : M.IsAssociatedFunction Self "push_slice" push_slice. + + (* + pub fn set(&mut self, no_from_top: usize, val: U256) -> Result<(), InstructionResult> { + if self.data.len() > no_from_top { + let len = self.data.len(); + self.data[len - no_from_top - 1] = val; + Ok(()) + } else { + Err(InstructionResult::StackUnderflow) + } + } + *) + Definition set (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; no_from_top; val ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let no_from_top := M.alloc (| no_from_top |) in + let val := M.alloc (| val |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.gt (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |), + M.read (| no_from_top |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let len := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |) + ] + |) + |) in + let _ := + M.write (| + M.call_closure (| + M.get_trait_method (| + "core::ops::index::IndexMut", + Ty.apply + (Ty.path "alloc::vec::Vec") + [ Ty.path "ruint::Uint"; Ty.path "alloc::alloc::Global" ], + [ Ty.path "usize" ], + "index_mut", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter::stack::Stack", + "data" + |); + BinOp.Panic.sub (| + Integer.Usize, + BinOp.Panic.sub (| + Integer.Usize, + M.read (| len |), + M.read (| no_from_top |) + |), + M.of_value (| Value.Integer 1 |) + |) + ] + |), + M.read (| val |) + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Ok" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::result::Result::Err" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + [] + |)) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_set : M.IsAssociatedFunction Self "set" set. + End Impl_revm_interpreter_interpreter_stack_Stack. + End stack. +End interpreter. diff --git a/CoqOfRust/revm/interpreter_action.v b/CoqOfRust/revm/interpreter_action.v new file mode 100644 index 000000000..57a6963c7 --- /dev/null +++ b/CoqOfRust/revm/interpreter_action.v @@ -0,0 +1,899 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter_action. + (* + Enum InterpreterAction + { + ty_params := []; + variants := + [ + { + name := "Call"; + item := + StructRecord + [ + ("inputs", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ]) + ]; + discriminant := None; + }; + { + name := "Create"; + item := + StructRecord + [ + ("inputs", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs"; + Ty.path "alloc::alloc::Global" + ]) + ]; + discriminant := None; + }; + { + name := "EOFCreate"; + item := + StructRecord + [ + ("inputs", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput"; + Ty.path "alloc::alloc::Global" + ]) + ]; + discriminant := None; + }; + { + name := "Return"; + item := + StructRecord [ ("result", Ty.path "revm_interpreter::interpreter::InterpreterResult") ]; + discriminant := None; + }; + { + name := "None"; + item := StructTuple []; + discriminant := None; + } + ]; + } + *) + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_InterpreterAction. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter_action::InterpreterAction". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Call", + "inputs" + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Call" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Create", + "inputs" + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Create" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::create_inputs::CreateInputs"; + Ty.path "alloc::alloc::Global" + ], + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::EOFCreate", + "inputs" + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::EOFCreate" + [ + ("inputs", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput"; + Ty.path "alloc::alloc::Global" + ], + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Return", + "result" + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::InterpreterAction::Return" + [ + ("result", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_interpreter::interpreter::InterpreterResult", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |))) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::InterpreterAction::None" + [] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_InterpreterAction. + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_InterpreterAction. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter_action::InterpreterAction". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Call", + "inputs" + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Call" |) |); + M.read (| M.of_value (| Value.String "inputs" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Create", + "inputs" + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Create" |) |); + M.read (| M.of_value (| Value.String "inputs" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::EOFCreate", + "inputs" + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "EOFCreate" |) |); + M.read (| M.of_value (| Value.String "inputs" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Return", + "result" + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Return" |) |); + M.read (| M.of_value (| Value.String "result" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_str", + [] + |), + [ M.read (| f |); M.read (| M.of_value (| Value.String "None" |) |) ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_InterpreterAction. + + Module Impl_core_default_Default_for_revm_interpreter_interpreter_action_InterpreterAction. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter_action::InterpreterAction". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructTuple "revm_interpreter::interpreter_action::InterpreterAction::None" [] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_interpreter_action_InterpreterAction. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_InterpreterAction. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter_action::InterpreterAction". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_InterpreterAction. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_InterpreterAction. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter_action::InterpreterAction". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter_action::InterpreterAction" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter_action::InterpreterAction" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| + LogicalOp.and (| + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), + ltac:(M.monadic + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), + [ + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::interpreter_action::InterpreterAction::Call", + "inputs" + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_record_field (| + γ0_1, + "revm_interpreter::interpreter_action::InterpreterAction::Call", + "inputs" + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ] + ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::interpreter_action::InterpreterAction::Create", + "inputs" + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_record_field (| + γ0_1, + "revm_interpreter::interpreter_action::InterpreterAction::Create", + "inputs" + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::create_inputs::CreateInputs"; + Ty.path "alloc::alloc::Global" + ], + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::create_inputs::CreateInputs"; + Ty.path "alloc::alloc::Global" + ] + ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::interpreter_action::InterpreterAction::EOFCreate", + "inputs" + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_record_field (| + γ0_1, + "revm_interpreter::interpreter_action::InterpreterAction::EOFCreate", + "inputs" + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput"; + Ty.path "alloc::alloc::Global" + ], + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput"; + Ty.path "alloc::alloc::Global" + ] + ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_record_field (| + γ0_0, + "revm_interpreter::interpreter_action::InterpreterAction::Return", + "result" + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_record_field (| + γ0_1, + "revm_interpreter::interpreter_action::InterpreterAction::Return", + "result" + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::interpreter::InterpreterResult", + [ Ty.path "revm_interpreter::interpreter::InterpreterResult" ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool true |) |))) + ] + |) + |))) + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_InterpreterAction. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_InterpreterAction. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter_action::InterpreterAction". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_InterpreterAction. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_InterpreterAction. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter_action::InterpreterAction". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_InterpreterAction. + + Module Impl_revm_interpreter_interpreter_action_InterpreterAction. + Definition Self : Ty.t := Ty.path "revm_interpreter::interpreter_action::InterpreterAction". + + (* + pub fn is_call(&self) -> bool { + matches!(self, InterpreterAction::Call { .. }) + } + *) + Definition is_call (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_call : M.IsAssociatedFunction Self "is_call" is_call. + + (* + pub fn is_create(&self) -> bool { + matches!(self, InterpreterAction::Create { .. }) + } + *) + Definition is_create (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_create : M.IsAssociatedFunction Self "is_create" is_create. + + (* + pub fn is_return(&self) -> bool { + matches!(self, InterpreterAction::Return { .. }) + } + *) + Definition is_return (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_return : M.IsAssociatedFunction Self "is_return" is_return. + + (* + pub fn is_none(&self) -> bool { + matches!(self, InterpreterAction::None) + } + *) + Definition is_none (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_none : M.IsAssociatedFunction Self "is_none" is_none. + + (* + pub fn is_some(&self) -> bool { + !self.is_none() + } + *) + Definition is_some (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + UnOp.Pure.not (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::InterpreterAction", + "is_none", + [] + |), + [ M.read (| self |) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_some : M.IsAssociatedFunction Self "is_some" is_some. + + (* + pub fn into_result_return(self) -> Option { + match self { + InterpreterAction::Return { result } => Some(result), + _ => None, + } + } + *) + Definition into_result_return (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Return", + "result" + |) in + let result := M.copy (| γ0_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| result |)) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_into_result_return : + M.IsAssociatedFunction Self "into_result_return" into_result_return. + End Impl_revm_interpreter_interpreter_action_InterpreterAction. +End interpreter_action. diff --git a/CoqOfRust/revm/interpreter_action/call_inputs.v b/CoqOfRust/revm/interpreter_action/call_inputs.v new file mode 100644 index 000000000..a8359e002 --- /dev/null +++ b/CoqOfRust/revm/interpreter_action/call_inputs.v @@ -0,0 +1,2336 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter_action. + Module call_inputs. + (* StructRecord + { + name := "CallInputs"; + ty_params := []; + fields := + [ + ("input", Ty.path "alloy_primitives::bytes_::Bytes"); + ("return_memory_offset", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ]); + ("gas_limit", Ty.path "u64"); + ("bytecode_address", Ty.path "alloy_primitives::bits::address::Address"); + ("target_address", Ty.path "alloy_primitives::bits::address::Address"); + ("caller", Ty.path "alloy_primitives::bits::address::Address"); + ("value", Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue"); + ("scheme", Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme"); + ("is_static", Ty.path "bool"); + ("is_eof", Ty.path "bool") + ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_inputs::CallInputs" + [ + ("input", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "input" + |) + ] + |))); + ("return_memory_offset", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "return_memory_offset" + |) + ] + |))); + ("gas_limit", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "u64", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "gas_limit" + |) + ] + |))); + ("bytecode_address", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bits::address::Address", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "bytecode_address" + |) + ] + |))); + ("target_address", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bits::address::Address", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "target_address" + |) + ] + |))); + ("caller", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bits::address::Address", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "caller" + |) + ] + |))); + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "value" + |) + ] + |))); + ("scheme", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "scheme" + |) + ] + |))); + ("is_static", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_static" + |) + ] + |))); + ("is_eof", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "bool", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_eof" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.read (| + let names := + M.alloc (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "input" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "return_memory_offset" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "gas_limit" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "bytecode_address" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "target_address" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "caller" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "value" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "scheme" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "is_static" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "is_eof" |) |)) + ] + |) + |) + |) in + let values := + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "input" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "return_memory_offset" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "gas_limit" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "bytecode_address" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "target_address" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "caller" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "value" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "scheme" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_static" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_eof" + |) + |) + |)) + ] + |) + |) + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_fields_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "CallInputs" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| names |) |); + M.read (| values |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bytes_::Bytes", + [ Ty.path "alloy_primitives::bytes_::Bytes" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "input" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "input" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [ + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ] + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "return_memory_offset" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "return_memory_offset" + |) + ] + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "gas_limit" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "gas_limit" + |) + |) + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bits::address::Address", + [ Ty.path "alloy_primitives::bits::address::Address" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "bytecode_address" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "bytecode_address" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bits::address::Address", + [ Ty.path "alloy_primitives::bits::address::Address" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "target_address" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "target_address" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bits::address::Address", + [ Ty.path "alloy_primitives::bits::address::Address" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "caller" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "caller" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue", + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue" + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "value" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "value" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme", + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "scheme" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "scheme" + |) + ] + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_static" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_static" + |) + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_eof" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_eof" + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| + Value.DeclaredButUndefined + |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |))) + ] + |))) + ] + |))) + ] + |))) + ] + |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + + Module Impl_core_hash_Hash_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "input" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "return_memory_offset" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "gas_limit" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "alloy_primitives::bits::address::Address", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "bytecode_address" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "alloy_primitives::bits::address::Address", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "target_address" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "alloy_primitives::bits::address::Address", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "caller" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "value" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "scheme" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "bool", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_static" + |); + M.read (| state |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "is_eof" + |); + M.read (| state |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_interpreter_action_call_inputs_CallInputs. + + Module Impl_revm_interpreter_interpreter_action_call_inputs_CallInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs". + + (* + pub fn new(tx_env: &TxEnv, gas_limit: u64) -> Option { + let TransactTo::Call(target_address) = tx_env.transact_to else { + return None; + }; + Some(CallInputs { + input: tx_env.data.clone(), + gas_limit, + target_address, + bytecode_address: target_address, + caller: tx_env.caller, + value: CallValue::Transfer(tx_env.value), + scheme: CallScheme::Call, + is_static: false, + is_eof: false, + return_memory_offset: 0..0, + }) + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ tx_env; gas_limit ] => + ltac:(M.monadic + (let tx_env := M.alloc (| tx_env |) in + let gas_limit := M.alloc (| gas_limit |) in + M.read (| + M.match_operator (| + M.SubPointer.get_struct_record_field (| + M.read (| tx_env |), + "revm_primitives::env::TxEnv", + "transact_to" + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_primitives::env::TransactTo::Call", + 0 + |) in + let target_address := M.copy (| γ0_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_inputs::CallInputs" + [ + ("input", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| tx_env |), + "revm_primitives::env::TxEnv", + "data" + |) + ] + |))); + ("gas_limit", A.to_value (M.read (| gas_limit |))); + ("target_address", A.to_value (M.read (| target_address |))); + ("bytecode_address", + A.to_value (M.read (| target_address |))); + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| tx_env |), + "revm_primitives::env::TxEnv", + "caller" + |) + |))); + ("value", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer" + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| tx_env |), + "revm_primitives::env::TxEnv", + "value" + |) + |)) + ] + |))); + ("scheme", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallScheme::Call" + [] + |))); + ("is_static", A.to_value (M.of_value (| Value.Bool false |))); + ("is_eof", A.to_value (M.of_value (| Value.Bool false |))); + ("return_memory_offset", + A.to_value + (M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value (M.of_value (| Value.Integer 0 |))); + ("end_", + A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |))) + ] + |)) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn new_boxed(tx_env: &TxEnv, gas_limit: u64) -> Option> { + Self::new(tx_env, gas_limit).map(Box::new) + } + *) + Definition new_boxed (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ tx_env; gas_limit ] => + ltac:(M.monadic + (let tx_env := M.alloc (| tx_env |) in + let gas_limit := M.alloc (| gas_limit |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs" ], + "map", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ]; + Ty.function + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs" ] + (Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "new", + [] + |), + [ M.read (| tx_env |); M.read (| gas_limit |) ] + |); + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new_boxed : M.IsAssociatedFunction Self "new_boxed" new_boxed. + + (* + pub fn transfers_value(&self) -> bool { + self.value.transfer().is_some_and(|x| x > U256::ZERO) + } + *) + Definition transfers_value (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::option::Option") [ Ty.path "ruint::Uint" ], + "is_some_and", + [ Ty.function [ Ty.tuple [ Ty.path "ruint::Uint" ] ] (Ty.path "bool") ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue", + "transfer", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "value" + |) + ] + |); + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let x := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "gt", + [] + |), + [ x; M.get_constant (| "ruint::ZERO" |) ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_transfers_value : + M.IsAssociatedFunction Self "transfers_value" transfers_value. + + (* + pub const fn transfer_value(&self) -> Option { + self.value.transfer() + } + *) + Definition transfer_value (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue", + "transfer", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "value" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_transfer_value : + M.IsAssociatedFunction Self "transfer_value" transfer_value. + + (* + pub const fn apparent_value(&self) -> Option { + self.value.apparent() + } + *) + Definition apparent_value (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue", + "apparent", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "value" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_apparent_value : + M.IsAssociatedFunction Self "apparent_value" apparent_value. + + (* + pub const fn transfer_from(&self) -> Address { + self.caller + } + *) + Definition transfer_from (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "caller" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_transfer_from : + M.IsAssociatedFunction Self "transfer_from" transfer_from. + + (* + pub const fn transfer_to(&self) -> Address { + self.target_address + } + *) + Definition transfer_to (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "target_address" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_transfer_to : M.IsAssociatedFunction Self "transfer_to" transfer_to. + + (* + pub const fn call_value(&self) -> U256 { + self.value.get() + } + *) + Definition call_value (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue", + "get", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_inputs::CallInputs", + "value" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_call_value : M.IsAssociatedFunction Self "call_value" call_value. + End Impl_revm_interpreter_interpreter_action_call_inputs_CallInputs. + + (* + Enum CallScheme + { + ty_params := []; + variants := + [ + { + name := "Call"; + item := StructTuple []; + discriminant := None; + }; + { + name := "CallCode"; + item := StructTuple []; + discriminant := None; + }; + { + name := "DelegateCall"; + item := StructTuple []; + discriminant := None; + }; + { + name := "StaticCall"; + item := StructTuple []; + discriminant := None; + } + ]; + } + *) + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| M.read (| self |) |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + + Module Impl_core_marker_Copy_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), + [ + M.read (| f |); + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "Call" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "CallCode" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "DelegateCall" |) |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + M.alloc (| M.read (| M.of_value (| Value.String "StaticCall" |) |) |))) + ] + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |) |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| Value.Tuple [] |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + + Module Impl_core_hash_Hash_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallScheme" ] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "isize", [], "hash", [ __H ] |), + [ __self_tag; M.read (| state |) ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_interpreter_action_call_inputs_CallScheme. + + (* + Enum CallValue + { + ty_params := []; + variants := + [ + { + name := "Transfer"; + item := StructTuple [ Ty.path "ruint::Uint" ]; + discriminant := None; + }; + { + name := "Apparent"; + item := StructTuple [ Ty.path "ruint::Uint" ]; + discriminant := None; + } + ]; + } + *) + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "ruint::Uint", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "ruint::Uint", + [], + "clone", + [] + |), + [ M.read (| __self_0 |) ] + |)) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_tuple_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Transfer" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_tuple_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "Apparent" |) |); + (* Unsize *) M.pointer_coercion (| __self_0 |) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue" ] + |), + [ M.read (| self |) ] + |) + |) in + let __arg1_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue" ] + |), + [ M.read (| other |) ] + |) + |) in + M.alloc (| + LogicalOp.and (| + BinOp.Pure.eq (| M.read (| __self_tag |), M.read (| __arg1_tag |) |), + ltac:(M.monadic + (M.read (| + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ A.to_value (M.read (| self |)); A.to_value (M.read (| other |)) ] + |) + |), + [ + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + 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 γ0_0 := M.read (| γ0_0 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_0, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent", + 0 + |) in + let __self_0 := M.alloc (| γ2_0 |) in + let γ0_1 := M.read (| γ0_1 |) in + let γ2_0 := + M.SubPointer.get_struct_tuple_field (| + γ0_1, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent", + 0 + |) in + let __arg1_0 := M.alloc (| γ2_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ M.read (| __self_0 |); M.read (| __arg1_0 |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::intrinsics::unreachable", [] |), + [] + |) + |) + |))) + ] + |) + |))) + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + + Module Impl_core_hash_Hash_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let __self_tag := + M.alloc (| + M.call_closure (| + M.get_function (| + "core::intrinsics::discriminant_value", + [ Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue" ] + |), + [ M.read (| self |) ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "isize", + [], + "hash", + [ __H ] + |), + [ __self_tag; M.read (| state |) ] + |) + |) in + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "ruint::Uint", + [], + "hash", + [ __H ] + |), + [ M.read (| __self_0 |); M.read (| state |) ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent", + 0 + |) in + let __self_0 := M.alloc (| γ1_0 |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "ruint::Uint", + [], + "hash", + [ __H ] + |), + [ M.read (| __self_0 |); M.read (| state |) ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + + Module Impl_core_default_Default_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue". + + (* + fn default() -> Self { + CallValue::Transfer(U256::ZERO) + } + *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructTuple + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer" + [ A.to_value (M.read (| M.get_constant (| "ruint::ZERO" |) |)) ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_interpreter_action_call_inputs_CallValue. + + Module Impl_revm_interpreter_interpreter_action_call_inputs_CallValue. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_inputs::CallValue". + + (* + pub const fn get(&self) -> U256 { + match *self { + Self::Transfer(value) | Self::Apparent(value) => value, + } + } + *) + Definition get (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.read (| self |), + [ + fun γ => + ltac:(M.monadic + (M.find_or_pattern (| + γ, + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer", + 0 + |) in + let value := M.copy (| γ0_0 |) in + M.of_value (| Value.Tuple [ A.to_value value ] |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent", + 0 + |) in + let value := M.copy (| γ0_0 |) in + M.of_value (| Value.Tuple [ A.to_value value ] |))) + ], + M.closure (| + fun γ => + ltac:(M.monadic + match γ with | [ value ] => value | _ => M.impossible (||) end) + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. + + (* + pub const fn transfer(&self) -> Option { + match *self { + Self::Transfer(transfer) => Some(transfer), + Self::Apparent(_) => None, + } + } + *) + Definition transfer (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.read (| self |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer", + 0 + |) in + let transfer := M.copy (| γ0_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| transfer |)) ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent", + 0 + |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer. + + (* + pub const fn is_transfer(&self) -> bool { + matches!(self, Self::Transfer(_)) + } + *) + Definition is_transfer (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer", + 0 + |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_transfer : M.IsAssociatedFunction Self "is_transfer" is_transfer. + + (* + pub const fn apparent(&self) -> Option { + match *self { + Self::Transfer(_) => None, + Self::Apparent(apparent) => Some(apparent), + } + } + *) + Definition apparent (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.read (| self |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Transfer", + 0 + |) in + M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent", + 0 + |) in + let apparent := M.copy (| γ0_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ A.to_value (M.read (| apparent |)) ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_apparent : M.IsAssociatedFunction Self "apparent" apparent. + + (* + pub const fn is_apparent(&self) -> bool { + matches!(self, Self::Apparent(_)) + } + *) + Definition is_apparent (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallValue::Apparent", + 0 + |) in + M.alloc (| M.of_value (| Value.Bool true |) |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_apparent : M.IsAssociatedFunction Self "is_apparent" is_apparent. + End Impl_revm_interpreter_interpreter_action_call_inputs_CallValue. + End call_inputs. +End interpreter_action. diff --git a/CoqOfRust/revm/interpreter_action/call_outcome.v b/CoqOfRust/revm/interpreter_action/call_outcome.v new file mode 100644 index 000000000..e3c1501ba --- /dev/null +++ b/CoqOfRust/revm/interpreter_action/call_outcome.v @@ -0,0 +1,426 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter_action. + Module call_outcome. + (* StructRecord + { + name := "CallOutcome"; + ty_params := []; + fields := + [ + ("result", Ty.path "revm_interpreter::interpreter::InterpreterResult"); + ("memory_offset", Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ]) + ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_outcome::CallOutcome" + [ + ("result", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_interpreter::interpreter::InterpreterResult", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "result" + |) + ] + |))); + ("memory_offset", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "memory_offset" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field2_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "CallOutcome" |) |); + M.read (| M.of_value (| Value.String "result" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "result" + |) + |); + M.read (| M.of_value (| Value.String "memory_offset" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "memory_offset" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::interpreter::InterpreterResult", + [ Ty.path "revm_interpreter::interpreter::InterpreterResult" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "result" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "result" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "memory_offset" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "memory_offset" + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + + Module Impl_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::call_outcome::CallOutcome". + + (* + pub fn new(result: InterpreterResult, memory_offset: Range) -> Self { + Self { + result, + memory_offset, + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ result; memory_offset ] => + ltac:(M.monadic + (let result := M.alloc (| result |) in + let memory_offset := M.alloc (| memory_offset |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::call_outcome::CallOutcome" + [ + ("result", A.to_value (M.read (| result |))); + ("memory_offset", A.to_value (M.read (| memory_offset |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn instruction_result(&self) -> &InstructionResult { + &self.result.result + } + *) + Definition instruction_result (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "result" + |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_instruction_result : + M.IsAssociatedFunction Self "instruction_result" instruction_result. + + (* + pub fn gas(&self) -> Gas { + self.result.gas + } + *) + Definition gas (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "result" + |), + "revm_interpreter::interpreter::InterpreterResult", + "gas" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_gas : M.IsAssociatedFunction Self "gas" gas. + + (* + pub fn output(&self) -> &Bytes { + &self.result.output + } + *) + Definition output (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "result" + |), + "revm_interpreter::interpreter::InterpreterResult", + "output" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_output : M.IsAssociatedFunction Self "output" output. + + (* + pub fn memory_start(&self) -> usize { + self.memory_offset.start + } + *) + Definition memory_start (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "memory_offset" + |), + "core::ops::range::Range", + "start" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_memory_start : + M.IsAssociatedFunction Self "memory_start" memory_start. + + (* + pub fn memory_length(&self) -> usize { + self.memory_offset.len() + } + *) + Definition memory_length (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::exact_size::ExactSizeIterator", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [], + "len", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::call_outcome::CallOutcome", + "memory_offset" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_memory_length : + M.IsAssociatedFunction Self "memory_length" memory_length. + End Impl_revm_interpreter_interpreter_action_call_outcome_CallOutcome. + End call_outcome. +End interpreter_action. diff --git a/CoqOfRust/revm/interpreter_action/create_inputs.v b/CoqOfRust/revm/interpreter_action/create_inputs.v new file mode 100644 index 000000000..16b839fb9 --- /dev/null +++ b/CoqOfRust/revm/interpreter_action/create_inputs.v @@ -0,0 +1,810 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter_action. + Module create_inputs. + (* StructRecord + { + name := "CreateInputs"; + ty_params := []; + fields := + [ + ("caller", Ty.path "alloy_primitives::bits::address::Address"); + ("scheme", Ty.path "revm_primitives::env::CreateScheme"); + ("value", Ty.path "ruint::Uint"); + ("init_code", Ty.path "alloy_primitives::bytes_::Bytes"); + ("gas_limit", Ty.path "u64") + ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::create_inputs::CreateInputs" + [ + ("caller", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bits::address::Address", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "caller" + |) + ] + |))); + ("scheme", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_primitives::env::CreateScheme", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "scheme" + |) + ] + |))); + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "ruint::Uint", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "value" + |) + ] + |))); + ("init_code", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "init_code" + |) + ] + |))); + ("gas_limit", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "u64", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "gas_limit" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field5_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "CreateInputs" |) |); + M.read (| M.of_value (| Value.String "caller" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "caller" + |) + |); + M.read (| M.of_value (| Value.String "scheme" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "scheme" + |) + |); + M.read (| M.of_value (| Value.String "value" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "value" + |) + |); + M.read (| M.of_value (| Value.String "init_code" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "init_code" + |) + |); + M.read (| M.of_value (| Value.String "gas_limit" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "gas_limit" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bits::address::Address", + [ Ty.path "alloy_primitives::bits::address::Address" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "caller" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "caller" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_primitives::env::CreateScheme", + [ Ty.path "revm_primitives::env::CreateScheme" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "scheme" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "scheme" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "value" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "value" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bytes_::Bytes", + [ Ty.path "alloy_primitives::bytes_::Bytes" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "init_code" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "init_code" + |) + ] + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "gas_limit" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "gas_limit" + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))) + ] + |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + + Module Impl_core_hash_Hash_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "alloy_primitives::bits::address::Address", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "caller" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "revm_primitives::env::CreateScheme", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "scheme" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "ruint::Uint", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "value" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "init_code" + |); + M.read (| state |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "gas_limit" + |); + M.read (| state |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + + Module Impl_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs". + + (* + pub fn new(tx_env: &TxEnv, gas_limit: u64) -> Option { + let TransactTo::Create = tx_env.transact_to else { + return None; + }; + + Some(CreateInputs { + caller: tx_env.caller, + scheme: CreateScheme::Create, + value: tx_env.value, + init_code: tx_env.data.clone(), + gas_limit, + }) + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ tx_env; gas_limit ] => + ltac:(M.monadic + (let tx_env := M.alloc (| tx_env |) in + let gas_limit := M.alloc (| gas_limit |) in + M.read (| + M.match_operator (| + M.SubPointer.get_struct_record_field (| + M.read (| tx_env |), + "revm_primitives::env::TxEnv", + "transact_to" + |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::create_inputs::CreateInputs" + [ + ("caller", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| tx_env |), + "revm_primitives::env::TxEnv", + "caller" + |) + |))); + ("scheme", + A.to_value + (M.of_value (| + Value.StructTuple + "revm_primitives::env::CreateScheme::Create" + [] + |))); + ("value", + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| tx_env |), + "revm_primitives::env::TxEnv", + "value" + |) + |))); + ("init_code", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bytes_::Bytes", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| tx_env |), + "revm_primitives::env::TxEnv", + "data" + |) + ] + |))); + ("gas_limit", A.to_value (M.read (| gas_limit |))) + ] + |)) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn new_boxed(tx_env: &TxEnv, gas_limit: u64) -> Option> { + Self::new(tx_env, gas_limit).map(Box::new) + } + *) + Definition new_boxed (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ tx_env; gas_limit ] => + ltac:(M.monadic + (let tx_env := M.alloc (| tx_env |) in + let gas_limit := M.alloc (| gas_limit |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs" ], + "map", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs"; + Ty.path "alloc::alloc::Global" + ]; + Ty.function + [ Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs" ] + (Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs"; + Ty.path "alloc::alloc::Global" + ]) + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "new", + [] + |), + [ M.read (| tx_env |); M.read (| gas_limit |) ] + |); + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.path "revm_interpreter::interpreter_action::create_inputs::CreateInputs"; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new_boxed : M.IsAssociatedFunction Self "new_boxed" new_boxed. + + (* + pub fn created_address(&self, nonce: u64) -> Address { + match self.scheme { + CreateScheme::Create => self.caller.create(nonce), + CreateScheme::Create2 { salt } => self + .caller + .create2_from_code(salt.to_be_bytes(), &self.init_code), + } + } + *) + Definition created_address (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; nonce ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let nonce := M.alloc (| nonce |) in + M.read (| + M.match_operator (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "scheme" + |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "create", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "caller" + |); + M.read (| nonce |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_record_field (| + γ, + "revm_primitives::env::CreateScheme::Create2", + "salt" + |) in + let salt := M.copy (| γ0_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "alloy_primitives::bits::address::Address", + "create2_from_code", + [ + Ty.apply (Ty.path "array") [ Ty.path "u8" ]; + Ty.apply (Ty.path "&") [ Ty.path "alloy_primitives::bytes_::Bytes" ] + ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "caller" + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "ruint::Uint", + "to_be_bytes", + [] + |), + [ salt ] + |); + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_inputs::CreateInputs", + "init_code" + |) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_created_address : + M.IsAssociatedFunction Self "created_address" created_address. + End Impl_revm_interpreter_interpreter_action_create_inputs_CreateInputs. + End create_inputs. +End interpreter_action. diff --git a/CoqOfRust/revm/interpreter_action/create_outcome.v b/CoqOfRust/revm/interpreter_action/create_outcome.v new file mode 100644 index 000000000..bb45b1a09 --- /dev/null +++ b/CoqOfRust/revm/interpreter_action/create_outcome.v @@ -0,0 +1,373 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter_action. + Module create_outcome. + (* StructRecord + { + name := "CreateOutcome"; + ty_params := []; + fields := + [ + ("result", Ty.path "revm_interpreter::interpreter::InterpreterResult"); + ("address", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::bits::address::Address" ]) + ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_outcome::CreateOutcome". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field2_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "CreateOutcome" |) |); + M.read (| M.of_value (| Value.String "result" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "result" + |) + |); + M.read (| M.of_value (| Value.String "address" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "address" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_outcome::CreateOutcome". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome" + [ + ("result", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_interpreter::interpreter::InterpreterResult", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "result" + |) + ] + |))); + ("address", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::bits::address::Address" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "address" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_outcome::CreateOutcome". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_outcome::CreateOutcome". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::interpreter::InterpreterResult", + [ Ty.path "revm_interpreter::interpreter::InterpreterResult" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "result" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "result" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::bits::address::Address" ], + [ + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "alloy_primitives::bits::address::Address" ] + ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "address" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "address" + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_outcome::CreateOutcome". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_outcome::CreateOutcome". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + + Module Impl_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::create_outcome::CreateOutcome". + + (* + pub fn new(result: InterpreterResult, address: Option
) -> Self { + Self { result, address } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ result; address ] => + ltac:(M.monadic + (let result := M.alloc (| result |) in + let address := M.alloc (| address |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome" + [ + ("result", A.to_value (M.read (| result |))); + ("address", A.to_value (M.read (| address |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn instruction_result(&self) -> &InstructionResult { + &self.result.result + } + *) + Definition instruction_result (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "result" + |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_instruction_result : + M.IsAssociatedFunction Self "instruction_result" instruction_result. + + (* + pub fn output(&self) -> &Bytes { + &self.result.output + } + *) + Definition output (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "result" + |), + "revm_interpreter::interpreter::InterpreterResult", + "output" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_output : M.IsAssociatedFunction Self "output" output. + + (* + pub fn gas(&self) -> &Gas { + &self.result.gas + } + *) + Definition gas (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::create_outcome::CreateOutcome", + "result" + |), + "revm_interpreter::interpreter::InterpreterResult", + "gas" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_gas : M.IsAssociatedFunction Self "gas" gas. + End Impl_revm_interpreter_interpreter_action_create_outcome_CreateOutcome. + End create_outcome. +End interpreter_action. diff --git a/CoqOfRust/revm/interpreter_action/eof_create_inputs.v b/CoqOfRust/revm/interpreter_action/eof_create_inputs.v new file mode 100644 index 000000000..69c025d4d --- /dev/null +++ b/CoqOfRust/revm/interpreter_action/eof_create_inputs.v @@ -0,0 +1,675 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter_action. + Module eof_create_inputs. + (* StructRecord + { + name := "EOFCreateInput"; + ty_params := []; + fields := + [ + ("caller", Ty.path "alloy_primitives::bits::address::Address"); + ("created_address", Ty.path "alloy_primitives::bits::address::Address"); + ("value", Ty.path "ruint::Uint"); + ("eof_init_code", Ty.path "revm_primitives::bytecode::eof::Eof"); + ("gas_limit", Ty.path "u64"); + ("return_memory_range", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ]) + ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.read (| + let names := + M.alloc (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value (M.read (| M.of_value (| Value.String "caller" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "created_address" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "value" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "eof_init_code" |) |)); + A.to_value (M.read (| M.of_value (| Value.String "gas_limit" |) |)); + A.to_value + (M.read (| M.of_value (| Value.String "return_memory_range" |) |)) + ] + |) + |) + |) in + let values := + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "caller" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "created_address" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "value" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "eof_init_code" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "gas_limit" + |) + |)); + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "return_memory_range" + |) + |) + |)) + ] + |) + |) + |) + |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_fields_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "EOFCreateInput" |) |); + (* Unsize *) M.pointer_coercion (| M.read (| names |) |); + M.read (| values |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + + Module Impl_core_default_Default_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput" + [ + ("caller", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "alloy_primitives::bits::address::Address", + [], + "default", + [] + |), + [] + |))); + ("created_address", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "alloy_primitives::bits::address::Address", + [], + "default", + [] + |), + [] + |))); + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "ruint::Uint", + [], + "default", + [] + |), + [] + |))); + ("eof_init_code", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "revm_primitives::bytecode::eof::Eof", + [], + "default", + [] + |), + [] + |))); + ("gas_limit", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u64", + [], + "default", + [] + |), + [] + |))); + ("return_memory_range", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [], + "default", + [] + |), + [] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput" + [ + ("caller", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bits::address::Address", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "caller" + |) + ] + |))); + ("created_address", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bits::address::Address", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "created_address" + |) + ] + |))); + ("value", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "ruint::Uint", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "value" + |) + ] + |))); + ("eof_init_code", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_primitives::bytecode::eof::Eof", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "eof_init_code" + |) + ] + |))); + ("gas_limit", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "u64", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "gas_limit" + |) + ] + |))); + ("return_memory_range", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "return_memory_range" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bits::address::Address", + [ Ty.path "alloy_primitives::bits::address::Address" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "caller" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "caller" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bits::address::Address", + [ Ty.path "alloy_primitives::bits::address::Address" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "created_address" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "created_address" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "ruint::Uint", + [ Ty.path "ruint::Uint" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "value" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "value" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_primitives::bytecode::eof::Eof", + [ Ty.path "revm_primitives::bytecode::eof::Eof" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "eof_init_code" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "eof_init_code" + |) + ] + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "gas_limit" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "gas_limit" + |) + |) + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "return_memory_range" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput", + "return_memory_range" + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |))) + ] + |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + + Module Impl_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput". + + (* + pub fn new( + caller: Address, + created_address: Address, + value: U256, + eof_init_code: Eof, + gas_limit: u64, + return_memory_range: Range, + ) -> EOFCreateInput { + EOFCreateInput { + caller, + created_address, + value, + eof_init_code, + gas_limit, + return_memory_range, + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ caller; created_address; value; eof_init_code; gas_limit; return_memory_range ] => + ltac:(M.monadic + (let caller := M.alloc (| caller |) in + let created_address := M.alloc (| created_address |) in + let value := M.alloc (| value |) in + let eof_init_code := M.alloc (| eof_init_code |) in + let gas_limit := M.alloc (| gas_limit |) in + let return_memory_range := M.alloc (| return_memory_range |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::eof_create_inputs::EOFCreateInput" + [ + ("caller", A.to_value (M.read (| caller |))); + ("created_address", A.to_value (M.read (| created_address |))); + ("value", A.to_value (M.read (| value |))); + ("eof_init_code", A.to_value (M.read (| eof_init_code |))); + ("gas_limit", A.to_value (M.read (| gas_limit |))); + ("return_memory_range", A.to_value (M.read (| return_memory_range |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + End Impl_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInput. + End eof_create_inputs. +End interpreter_action. diff --git a/CoqOfRust/revm/interpreter_action/eof_create_outcome.v b/CoqOfRust/revm/interpreter_action/eof_create_outcome.v new file mode 100644 index 000000000..c5385bfb0 --- /dev/null +++ b/CoqOfRust/revm/interpreter_action/eof_create_outcome.v @@ -0,0 +1,466 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module interpreter_action. + Module eof_create_outcome. + (* StructRecord + { + name := "EOFCreateOutcome"; + ty_params := []; + fields := + [ + ("result", Ty.path "revm_interpreter::interpreter::InterpreterResult"); + ("address", Ty.path "alloy_primitives::bits::address::Address"); + ("return_memory_range", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ]) + ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct_field3_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "EOFCreateOutcome" |) |); + M.read (| M.of_value (| Value.String "result" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "result" + |) + |); + M.read (| M.of_value (| Value.String "address" |) |); + (* Unsize *) + M.pointer_coercion (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "address" + |) + |); + M.read (| M.of_value (| Value.String "return_memory_range" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "return_memory_range" + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + + Module Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome" + [ + ("result", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "revm_interpreter::interpreter::InterpreterResult", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "result" + |) + ] + |))); + ("address", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.path "alloy_primitives::bits::address::Address", + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "address" + |) + ] + |))); + ("return_memory_range", + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "return_memory_range" + |) + ] + |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "revm_interpreter::interpreter::InterpreterResult", + [ Ty.path "revm_interpreter::interpreter::InterpreterResult" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "result" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "result" + |) + ] + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.path "alloy_primitives::bits::address::Address", + [ Ty.path "alloy_primitives::bits::address::Address" ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "address" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "address" + |) + ] + |))) + |), + ltac:(M.monadic + (M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [ Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ] ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "return_memory_range" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "return_memory_range" + |) + ] + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + + Module Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + + Module Impl_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + Definition Self : Ty.t := + Ty.path "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome". + + (* + pub fn new( + result: InterpreterResult, + address: Address, + return_memory_range: Range, + ) -> Self { + Self { + result, + address, + return_memory_range, + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ result; address; return_memory_range ] => + ltac:(M.monadic + (let result := M.alloc (| result |) in + let address := M.alloc (| address |) in + let return_memory_range := M.alloc (| return_memory_range |) in + M.of_value (| + Value.StructRecord + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome" + [ + ("result", A.to_value (M.read (| result |))); + ("address", A.to_value (M.read (| address |))); + ("return_memory_range", A.to_value (M.read (| return_memory_range |))) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn instruction_result(&self) -> &InstructionResult { + &self.result.result + } + *) + Definition instruction_result (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "result" + |), + "revm_interpreter::interpreter::InterpreterResult", + "result" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_instruction_result : + M.IsAssociatedFunction Self "instruction_result" instruction_result. + + (* + pub fn output(&self) -> &Bytes { + &self.result.output + } + *) + Definition output (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "result" + |), + "revm_interpreter::interpreter::InterpreterResult", + "output" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_output : M.IsAssociatedFunction Self "output" output. + + (* + pub fn gas(&self) -> &Gas { + &self.result.gas + } + *) + Definition gas (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.SubPointer.get_struct_record_field (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "result" + |), + "revm_interpreter::interpreter::InterpreterResult", + "gas" + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_gas : M.IsAssociatedFunction Self "gas" gas. + + (* + pub fn return_range(&self) -> Range { + self.return_memory_range.clone() + } + *) + Definition return_range (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_trait_method (| + "core::clone::Clone", + Ty.apply (Ty.path "core::ops::range::Range") [ Ty.path "usize" ], + [], + "clone", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::interpreter_action::eof_create_outcome::EOFCreateOutcome", + "return_memory_range" + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_return_range : + M.IsAssociatedFunction Self "return_range" return_range. + End Impl_revm_interpreter_interpreter_action_eof_create_outcome_EOFCreateOutcome. + End eof_create_outcome. +End interpreter_action. diff --git a/CoqOfRust/revm/opcode.v b/CoqOfRust/revm/opcode.v new file mode 100644 index 000000000..776ae4c2a --- /dev/null +++ b/CoqOfRust/revm/opcode.v @@ -0,0 +1,26619 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module opcode. + Axiom Instruction : + forall (H : Ty.t), + (Ty.apply (Ty.path "revm_interpreter::opcode::Instruction") [ H ]) = + (Ty.function + [ + Ty.apply (Ty.path "&mut") [ Ty.path "revm_interpreter::interpreter::Interpreter" ]; + Ty.apply (Ty.path "&mut") [ H ] + ] + (Ty.tuple [])). + + Axiom InstructionTable : + forall (H : Ty.t), + (Ty.apply (Ty.path "revm_interpreter::opcode::InstructionTable") [ H ]) = + (Ty.apply + (Ty.path "array") + [ + Ty.function + [ + Ty.apply (Ty.path "&mut") [ Ty.path "revm_interpreter::interpreter::Interpreter" ]; + Ty.apply (Ty.path "&mut") [ H ] + ] + (Ty.tuple []) + ]). + + Axiom BoxedInstruction : + forall (H : Ty.t), + (Ty.apply (Ty.path "revm_interpreter::opcode::BoxedInstruction") [ H ]) = + (Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn + [ + ("existential predicate with variables", []); + ("existential predicate with variables", []) + ]; + Ty.path "alloc::alloc::Global" + ]). + + Axiom BoxedInstructionTable : + forall (H : Ty.t), + (Ty.apply (Ty.path "revm_interpreter::opcode::BoxedInstructionTable") [ H ]) = + (Ty.apply + (Ty.path "array") + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn + [ + ("existential predicate with variables", []); + ("existential predicate with variables", []) + ]; + Ty.path "alloc::alloc::Global" + ] + ]). + + (* + Enum InstructionTables + { + ty_params := [ "H" ]; + variants := + [ + { + name := "Plain"; + item := + StructTuple + [ + Ty.apply + (Ty.path "array") + [ + Ty.function + [ + Ty.apply + (Ty.path "&mut") + [ Ty.path "revm_interpreter::interpreter::Interpreter" ]; + Ty.apply (Ty.path "&mut") [ H ] + ] + (Ty.tuple []) + ] + ]; + discriminant := None; + }; + { + name := "Boxed"; + item := + StructTuple + [ + Ty.apply + (Ty.path "array") + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn + [ + ("existential predicate with variables", []); + ("existential predicate with variables", []) + ]; + Ty.path "alloc::alloc::Global" + ] + ] + ]; + discriminant := None; + } + ]; + } + *) + + Module Impl_revm_interpreter_opcode_InstructionTables_H. + Definition Self (H : Ty.t) : Ty.t := + Ty.apply (Ty.path "revm_interpreter::opcode::InstructionTables") [ H ]. + + (* + pub const fn new_plain() -> Self { + Self::Plain(make_instruction_table::()) + } + *) + Definition new_plain (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self H in + match τ, α with + | [ SPEC ], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::InstructionTables::Plain" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "revm_interpreter::opcode::make_instruction_table", + [ H; SPEC ] + |), + [] + |)) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new_plain : + forall (H : Ty.t), + M.IsAssociatedFunction (Self H) "new_plain" (new_plain H). + (* + pub fn insert_boxed(&mut self, opcode: u8, instruction: BoxedInstruction<'a, H>) { + // first convert the table to boxed variant + self.convert_boxed(); + + // now we can insert the instruction + match self { + Self::Plain(_) => { + unreachable!("we already converted the table to boxed variant"); + } + Self::Boxed(table) => { + table[opcode as usize] = Box::new(instruction); + } + } + } + *) + Definition insert_boxed (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self H in + match τ, α with + | [], [ self; opcode; instruction ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let opcode := M.alloc (| opcode |) in + let instruction := M.alloc (| instruction |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "revm_interpreter::opcode::InstructionTables") [ H ], + "convert_boxed", + [] + |), + [ M.read (| self |) ] + |) + |) in + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::opcode::InstructionTables::Plain", + 0 + |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "internal error: entered unreachable code: we already converted the table to boxed variant" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "none", + [] + |), + [] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::opcode::InstructionTables::Boxed", + 0 + |) in + let table := M.alloc (| γ1_0 |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + M.read (| table |), + M.alloc (| M.rust_cast (| M.read (| opcode |) |) |) + |), + (* Unsize *) + M.pointer_coercion (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn + [ + ("existential predicate with variables", []); + ("existential predicate with variables", []) + ]; + Ty.path "alloc::alloc::Global" + ]; + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ M.read (| instruction |) ] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_insert_boxed : + forall (H : Ty.t), + M.IsAssociatedFunction (Self H) "insert_boxed" (insert_boxed H). + + (* + pub fn insert(&mut self, opcode: u8, instruction: Instruction) { + match self { + Self::Plain(table) => { + table[opcode as usize] = instruction; + } + Self::Boxed(table) => { + table[opcode as usize] = Box::new(instruction); + } + } + } + *) + Definition insert (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self H in + match τ, α with + | [], [ self; opcode; instruction ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let opcode := M.alloc (| opcode |) in + let instruction := M.alloc (| instruction |) in + M.read (| + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::opcode::InstructionTables::Plain", + 0 + |) in + let table := M.alloc (| γ1_0 |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + M.read (| table |), + M.alloc (| M.rust_cast (| M.read (| opcode |) |) |) + |), + M.read (| instruction |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::opcode::InstructionTables::Boxed", + 0 + |) in + let table := M.alloc (| γ1_0 |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + M.read (| table |), + M.alloc (| M.rust_cast (| M.read (| opcode |) |) |) + |), + (* Unsize *) + M.pointer_coercion (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.function + [ + Ty.apply + (Ty.path "&mut") + [ Ty.path "revm_interpreter::interpreter::Interpreter" ]; + Ty.apply (Ty.path "&mut") [ H ] + ] + (Ty.tuple []); + Ty.path "alloc::alloc::Global" + ], + "new", + [] + |), + [ M.read (| instruction |) ] + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_insert : + forall (H : Ty.t), + M.IsAssociatedFunction (Self H) "insert" (insert H). + + (* + pub fn convert_boxed(&mut self) { + match self { + Self::Plain(table) => { + *self = Self::Boxed(core::array::from_fn(|i| { + let instruction: BoxedInstruction<'a, H> = Box::new(table[i]); + instruction + })); + } + Self::Boxed(_) => {} + }; + } + *) + Definition convert_boxed (H : Ty.t) (τ : list Ty.t) (α : list A.t) : M := + let Self : Ty.t := Self H in + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let _ := + M.match_operator (| + self, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::opcode::InstructionTables::Plain", + 0 + |) in + let table := M.alloc (| γ1_0 |) in + let _ := + M.write (| + M.read (| self |), + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::InstructionTables::Boxed" + [ + A.to_value + (M.call_closure (| + M.get_function (| + "core::array::from_fn", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn + [ + ("existential predicate with variables", []); + ("existential predicate with variables", []) + ]; + Ty.path "alloc::alloc::Global" + ]; + Ty.function + [ Ty.tuple [ Ty.path "usize" ] ] + (Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn + [ + ("existential predicate with variables", []); + ("existential predicate with variables", []) + ]; + Ty.path "alloc::alloc::Global" + ]) + ] + |), + [ + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let i := M.copy (| γ |) in + (* Unsize *) + M.pointer_coercion (| + M.read (| + let instruction := + M.alloc (| + (* Unsize *) + M.pointer_coercion (| + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.function + [ + Ty.apply + (Ty.path "&mut") + [ + Ty.path + "revm_interpreter::interpreter::Interpreter" + ]; + Ty.apply + (Ty.path "&mut") + [ H ] + ] + (Ty.tuple []); + Ty.path + "alloc::alloc::Global" + ], + "new", + [] + |), + [ + M.read (| + M.SubPointer.get_array_field (| + M.read (| table |), + i + |) + |) + ] + |) + |) + |) in + instruction + |) + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |)) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "revm_interpreter::opcode::InstructionTables::Boxed", + 0 + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_convert_boxed : + forall (H : Ty.t), + M.IsAssociatedFunction (Self H) "convert_boxed" (convert_boxed H). + End Impl_revm_interpreter_opcode_InstructionTables_H. + + + (* + pub const fn make_instruction_table() -> InstructionTable { + // Force const-eval of the table creation, making this function trivial. + // TODO: Replace this with a `const {}` block once it is stable. + struct ConstTable { + _host: core::marker::PhantomData, + _spec: core::marker::PhantomData, + } + impl ConstTable { + const NEW: InstructionTable = { + let mut tables: InstructionTable = [control::unknown; 256]; + let mut i = 0; + while i < 256 { + tables[i] = instruction::(i as u8); + i += 1; + } + tables + }; + } + ConstTable::::NEW + } + *) + Definition make_instruction_table (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [] => + ltac:(M.monadic + (M.read (| M.get_constant (| "revm_interpreter::opcode::make_instruction_table::NEW" |) |))) + | _, _ => M.impossible + end. + + Module make_instruction_table. + (* StructRecord + { + name := "ConstTable"; + ty_params := [ "H"; "SPEC" ]; + fields := + [ + ("_host", Ty.apply (Ty.path "core::marker::PhantomData") [ H ]); + ("_spec", Ty.apply (Ty.path "core::marker::PhantomData") [ SPEC ]) + ]; + } *) + + Module Impl_revm_interpreter_opcode_make_instruction_table_ConstTable_H_SPEC. + Definition Self (H SPEC : Ty.t) : Ty.t := + Ty.apply + (Ty.path "revm_interpreter::opcode::make_instruction_table::ConstTable") + [ H; SPEC ]. + + (* + const NEW: InstructionTable = { + let mut tables: InstructionTable = [control::unknown; 256]; + let mut i = 0; + while i < 256 { + tables[i] = instruction::(i as u8); + i += 1; + } + tables + }; + *) + (* Ty.apply + (Ty.path "array") + [ + Ty.function + [ + Ty.apply (Ty.path "&mut") [ Ty.path "revm_interpreter::interpreter::Interpreter" ]; + Ty.apply (Ty.path "&mut") [ H ] + ] + (Ty.tuple []) + ] *) + Definition value_NEW (H SPEC : Ty.t) : A.t := + let Self : Ty.t := Self H SPEC in + M.run + ltac:(M.monadic + (let tables := + M.alloc (| + repeat (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::unknown", [ H ] |) + |), + 256 + |) + |) in + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let _ := + M.loop (| + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| i |), + M.of_value (| Value.Integer 256 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| tables, i |), + M.call_closure (| + M.get_function (| + "revm_interpreter::opcode::instruction", + [ H; SPEC ] + |), + [ M.rust_cast (| M.read (| i |) |) ] + |) + |) in + let _ := + let β := i in + M.write (| + β, + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + M.of_value (| Value.Integer 1 |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |))) + |) in + tables)). + + Axiom AssociatedConstant_value_NEW : + forall (H SPEC : Ty.t), + M.IsAssociatedConstant (Self H SPEC) "value_NEW" (value_NEW H SPEC). + End Impl_revm_interpreter_opcode_make_instruction_table_ConstTable_H_SPEC. + End make_instruction_table. + + (* + pub fn make_boxed_instruction_table<'a, H, SPEC, FN>( + table: InstructionTable, + mut outer: FN, + ) -> BoxedInstructionTable<'a, H> + where + H: Host, + SPEC: Spec + 'a, + FN: FnMut(Instruction) -> BoxedInstruction<'a, H>, + { + core::array::from_fn(|i| outer(table[i])) + } + *) + Definition make_boxed_instruction_table (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC; FN ], [ table; outer ] => + ltac:(M.monadic + (let table := M.alloc (| table |) in + let outer := M.alloc (| outer |) in + M.call_closure (| + M.get_function (| + "core::array::from_fn", + [ + Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn + [ + ("existential predicate with variables", []); + ("existential predicate with variables", []) + ]; + Ty.path "alloc::alloc::Global" + ]; + Ty.function + [ Ty.tuple [ Ty.path "usize" ] ] + (Ty.apply + (Ty.path "alloc::boxed::Box") + [ + Ty.dyn + [ + ("existential predicate with variables", []); + ("existential predicate with variables", []) + ]; + Ty.path "alloc::alloc::Global" + ]) + ] + |), + [ + M.closure (| + fun γ => + ltac:(M.monadic + match γ with + | [ α0 ] => + M.match_operator (| + M.alloc (| α0 |), + [ + fun γ => + ltac:(M.monadic + (let i := M.copy (| γ |) in + M.call_closure (| + M.get_trait_method (| + "core::ops::function::FnMut", + FN, + [ + Ty.tuple + [ + Ty.function + [ + Ty.apply + (Ty.path "&mut") + [ Ty.path "revm_interpreter::interpreter::Interpreter" + ]; + Ty.apply (Ty.path "&mut") [ H ] + ] + (Ty.tuple []) + ] + ], + "call_mut", + [] + |), + [ + outer; + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.SubPointer.get_array_field (| table, i |) |)) + ] + |) + ] + |))) + ] + |) + | _ => M.impossible (||) + end) + |) + ] + |))) + | _, _ => M.impossible + end. + + (* StructTuple + { + name := "OpCodeError"; + ty_params := []; + fields := [ Ty.tuple [] ]; + } *) + + Module Impl_core_fmt_Debug_for_revm_interpreter_opcode_OpCodeError. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeError". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_tuple_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "OpCodeError" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeError", + 0 + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_opcode_OpCodeError. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_opcode_OpCodeError. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeError". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_opcode_OpCodeError. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_opcode_OpCodeError. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeError". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.call_closure (| + M.get_trait_method (| "core::cmp::PartialEq", Ty.tuple [], [ Ty.tuple [] ], "eq", [] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeError", + 0 + |); + M.SubPointer.get_struct_tuple_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeError", + 0 + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_opcode_OpCodeError. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_opcode_OpCodeError. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeError". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_opcode_OpCodeError. + + Module Impl_core_cmp_Eq_for_revm_interpreter_opcode_OpCodeError. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeError". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_opcode_OpCodeError. + + Module Impl_core_fmt_Display_for_revm_interpreter_opcode_OpCodeError. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeError". + + (* + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str("invalid opcode") + } + *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), + [ M.read (| f |); M.read (| M.of_value (| Value.String "invalid opcode" |) |) ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Display" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Display_for_revm_interpreter_opcode_OpCodeError. + + Module Impl_core_error_Error_for_revm_interpreter_opcode_OpCodeError. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeError". + + Axiom Implements : + M.IsTraitInstance + "core::error::Error" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_error_Error_for_revm_interpreter_opcode_OpCodeError. + + (* StructTuple + { + name := "OpCode"; + ty_params := []; + fields := [ Ty.path "u8" ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.read (| self |))) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_marker_Copy_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_fmt_Debug_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* Debug *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_tuple_field1_finish", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "OpCode" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCode", + 0 + |) + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_default_Default_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* Default *) + Definition default (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [] => + ltac:(M.monadic + (M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ + A.to_value + (M.call_closure (| + M.get_trait_method (| + "core::default::Default", + Ty.path "u8", + [], + "default", + [] + |), + [] + |)) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::default::Default" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("default", InstanceField.Method default) ]. + End Impl_core_default_Default_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCode", + 0 + |) + |), + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCode", + 0 + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_cmp_Eq_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_cmp_PartialOrd_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* PartialOrd *) + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "u8", + [ Ty.path "u8" ], + "partial_cmp", + [] + |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCode", + 0 + |); + M.SubPointer.get_struct_tuple_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCode", + 0 + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialOrd" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("partial_cmp", InstanceField.Method partial_cmp) ]. + End Impl_core_cmp_PartialOrd_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_cmp_Ord_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* Ord *) + Definition cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "u8", [], "cmp", [] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCode", + 0 + |); + M.SubPointer.get_struct_tuple_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCode", + 0 + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Ord" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("cmp", InstanceField.Method cmp) ]. + End Impl_core_cmp_Ord_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_hash_Hash_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCode", + 0 + |); + M.read (| state |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_fmt_Display_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let n = self.get(); + if let Some(val) = OPCODE_INFO_JUMPTABLE[n as usize] { + f.write_str(val.name()) + } else { + write!(f, "UNKNOWN(0x{n:02X})") + } + } + *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.read (| + let n := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "get", + [] + |), + [ M.read (| M.read (| self |) |) ] + |) + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.SubPointer.get_array_field (| + M.get_constant (| "revm_interpreter::opcode::OPCODE_INFO_JUMPTABLE" |), + M.alloc (| M.rust_cast (| M.read (| n |) |) |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let val := M.copy (| γ0_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_str", + [] + |), + [ + M.read (| f |); + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "name", + [] + |), + [ val ] + |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "write_fmt", + [] + |), + [ + M.read (| f |); + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1_formatted", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| M.of_value (| Value.String "UNKNOWN(0x" |) |)); + A.to_value (M.read (| M.of_value (| Value.String ")" |) |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_upper_hex", + [ Ty.path "u8" ] + |), + [ n ] + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.UnicodeChar 32 |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Alignment::Unknown" + [] + |); + M.of_value (| Value.Integer 8 |); + M.of_value (| + Value.StructTuple "core::fmt::rt::Count::Implied" [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ A.to_value (M.of_value (| Value.Integer 2 |)) ] + |) + ] + |)) + ] + |) + |) + |); + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::UnsafeArg", + "new", + [] + |), + [] + |) + ] + |) + ] + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Display" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Display_for_revm_interpreter_opcode_OpCode. + + Module Impl_core_str_traits_FromStr_for_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* type Err = OpCodeError; *) + Definition _Err : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeError". + + (* + fn from_str(s: &str) -> Result { + Self::parse(s).ok_or(OpCodeError(())) + } + *) + Definition from_str (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ s ] => + ltac:(M.monadic + (let s := M.alloc (| s |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.path "revm_interpreter::opcode::OpCode" ], + "ok_or", + [ Ty.path "revm_interpreter::opcode::OpCodeError" ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "parse", + [] + |), + [ M.read (| s |) ] + |); + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCodeError" + [ A.to_value (M.of_value (| Value.Tuple [] |)) ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::str::traits::FromStr" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("Err", InstanceField.Ty _Err); ("from_str", InstanceField.Method from_str) ]. + End Impl_core_str_traits_FromStr_for_revm_interpreter_opcode_OpCode. + + Module Impl_revm_interpreter_opcode_OpCode. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCode". + + (* + pub const fn new(opcode: u8) -> Option { + match OPCODE_INFO_JUMPTABLE[opcode as usize] { + Some(_) => Some(Self(opcode)), + None => None, + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ opcode ] => + ltac:(M.monadic + (let opcode := M.alloc (| opcode |) in + M.read (| + M.match_operator (| + M.SubPointer.get_array_field (| + M.get_constant (| "revm_interpreter::opcode::OPCODE_INFO_JUMPTABLE" |), + M.alloc (| M.rust_cast (| M.read (| opcode |) |) |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.read (| opcode |)) ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub fn parse(s: &str) -> Option { + NAME_TO_OPCODE.get(s).copied() + } + *) + Definition parse (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ s ] => + ltac:(M.monadic + (let s := M.alloc (| s |) in + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "core::option::Option") + [ Ty.apply (Ty.path "&") [ Ty.path "revm_interpreter::opcode::OpCode" ] ], + "copied", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "phf::map::Map") + [ + Ty.apply (Ty.path "&") [ Ty.path "str" ]; + Ty.path "revm_interpreter::opcode::OpCode" + ], + "get", + [ Ty.path "str" ] + |), + [ + M.read (| M.get_constant (| "revm_interpreter::opcode::NAME_TO_OPCODE" |) |); + M.read (| s |) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_parse : M.IsAssociatedFunction Self "parse" parse. + + (* + pub const fn is_jumpdest(&self) -> bool { + self.0 == JUMPDEST + } + *) + Definition is_jumpdest (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCode", + 0 + |) + |), + M.read (| M.get_constant (| "revm_interpreter::opcode::JUMPDEST" |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_jumpdest : M.IsAssociatedFunction Self "is_jumpdest" is_jumpdest. + + (* + pub const fn is_jumpdest_by_op(opcode: u8) -> bool { + if let Some(opcode) = Self::new(opcode) { + opcode.is_jumpdest() + } else { + false + } + } + *) + Definition is_jumpdest_by_op (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ opcode ] => + ltac:(M.monadic + (let opcode := M.alloc (| opcode |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "new", + [] + |), + [ M.read (| opcode |) ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let opcode := M.copy (| γ0_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "is_jumpdest", + [] + |), + [ opcode ] + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_jumpdest_by_op : + M.IsAssociatedFunction Self "is_jumpdest_by_op" is_jumpdest_by_op. + + (* + pub const fn is_jump(self) -> bool { + self.0 == JUMP + } + *) + Definition is_jump (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_tuple_field (| self, "revm_interpreter::opcode::OpCode", 0 |) + |), + M.read (| M.get_constant (| "revm_interpreter::opcode::JUMP" |) |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_jump : M.IsAssociatedFunction Self "is_jump" is_jump. + + (* + pub const fn is_jump_by_op(opcode: u8) -> bool { + if let Some(opcode) = Self::new(opcode) { + opcode.is_jump() + } else { + false + } + } + *) + Definition is_jump_by_op (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ opcode ] => + ltac:(M.monadic + (let opcode := M.alloc (| opcode |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "new", + [] + |), + [ M.read (| opcode |) ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let opcode := M.copy (| γ0_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "is_jump", + [] + |), + [ M.read (| opcode |) ] + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_jump_by_op : + M.IsAssociatedFunction Self "is_jump_by_op" is_jump_by_op. + + (* + pub const fn is_push(self) -> bool { + self.0 >= PUSH1 && self.0 <= PUSH32 + } + *) + Definition is_push (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + LogicalOp.and (| + BinOp.Pure.ge (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "revm_interpreter::opcode::OpCode", + 0 + |) + |), + M.read (| M.get_constant (| "revm_interpreter::opcode::PUSH1" |) |) + |), + ltac:(M.monadic + (BinOp.Pure.le (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + self, + "revm_interpreter::opcode::OpCode", + 0 + |) + |), + M.read (| M.get_constant (| "revm_interpreter::opcode::PUSH32" |) |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_push : M.IsAssociatedFunction Self "is_push" is_push. + + (* + pub fn is_push_by_op(opcode: u8) -> bool { + if let Some(opcode) = Self::new(opcode) { + opcode.is_push() + } else { + false + } + } + *) + Definition is_push_by_op (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ opcode ] => + ltac:(M.monadic + (let opcode := M.alloc (| opcode |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "new", + [] + |), + [ M.read (| opcode |) ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let opcode := M.copy (| γ0_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "is_push", + [] + |), + [ M.read (| opcode |) ] + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Bool false |) |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_push_by_op : + M.IsAssociatedFunction Self "is_push_by_op" is_push_by_op. + + (* + pub unsafe fn new_unchecked(opcode: u8) -> Self { + Self(opcode) + } + *) + Definition new_unchecked (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ opcode ] => + ltac:(M.monadic + (let opcode := M.alloc (| opcode |) in + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.read (| opcode |)) ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new_unchecked : + M.IsAssociatedFunction Self "new_unchecked" new_unchecked. + + (* + pub const fn as_str(self) -> &'static str { + self.info().name() + } + *) + Definition as_str (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "name", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "info", + [] + |), + [ self ] + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_as_str : M.IsAssociatedFunction Self "as_str" as_str. + + (* + pub const fn name_by_op(opcode: u8) -> &'static str { + if let Some(opcode) = Self::new(opcode) { + opcode.as_str() + } else { + "Unknown" + } + } + *) + Definition name_by_op (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ opcode ] => + ltac:(M.monadic + (let opcode := M.alloc (| opcode |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "new", + [] + |), + [ M.read (| opcode |) ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let opcode := M.copy (| γ0_0 |) in + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "as_str", + [] + |), + [ M.read (| opcode |) ] + |) + |))); + fun γ => ltac:(M.monadic (M.of_value (| Value.String "Unknown" |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_name_by_op : M.IsAssociatedFunction Self "name_by_op" name_by_op. + + (* + pub const fn inputs(&self) -> u8 { + self.info().inputs() + } + *) + Definition inputs (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "inputs", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "info", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_inputs : M.IsAssociatedFunction Self "inputs" inputs. + + (* + pub const fn outputs(&self) -> u8 { + self.info().outputs() + } + *) + Definition outputs (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "outputs", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "info", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_outputs : M.IsAssociatedFunction Self "outputs" outputs. + + (* + pub const fn io_diff(&self) -> i16 { + self.info().io_diff() + } + *) + Definition io_diff (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "io_diff", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "info", + [] + |), + [ M.read (| self |) ] + |) + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_io_diff : M.IsAssociatedFunction Self "io_diff" io_diff. + + (* + pub const fn info_by_op(opcode: u8) -> Option { + if let Some(opcode) = Self::new(opcode) { + Some(opcode.info()) + } else { + None + } + } + *) + Definition info_by_op (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ opcode ] => + ltac:(M.monadic + (let opcode := M.alloc (| opcode |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "new", + [] + |), + [ M.read (| opcode |) ] + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let opcode := M.copy (| γ0_0 |) in + M.alloc (| + M.of_value (| + Value.StructTuple + "core::option::Option::Some" + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "info", + [] + |), + [ opcode ] + |)) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.of_value (| Value.StructTuple "core::option::Option::None" [] |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_info_by_op : M.IsAssociatedFunction Self "info_by_op" info_by_op. + + (* + pub const fn info(&self) -> OpCodeInfo { + if let Some(t) = OPCODE_INFO_JUMPTABLE[self.0 as usize] { + t + } else { + panic!("opcode not found") + } + } + *) + Definition info (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.SubPointer.get_array_field (| + M.get_constant (| "revm_interpreter::opcode::OPCODE_INFO_JUMPTABLE" |), + M.alloc (| + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_tuple_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCode", + 0 + |) + |) + |) + |) + |) in + let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let t := M.copy (| γ0_0 |) in + t)); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "opcode not found" |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_info : M.IsAssociatedFunction Self "info" info. + + (* + pub const fn input_output(&self) -> (u8, u8) { + let info = self.info(); + (info.inputs, info.outputs) + } + *) + Definition input_output (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCode", + "info", + [] + |), + [ M.read (| self |) ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + info, + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |) + |)); + A.to_value + (M.read (| + M.SubPointer.get_struct_record_field (| + info, + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |) + |)) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_input_output : M.IsAssociatedFunction Self "input_output" input_output. + + (* + pub const fn get(self) -> u8 { + self.0 + } + *) + Definition get (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_tuple_field (| self, "revm_interpreter::opcode::OpCode", 0 |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_get : M.IsAssociatedFunction Self "get" get. + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_STOP : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 0 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_STOP : M.IsAssociatedConstant Self "value_STOP" value_STOP. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_ADD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 1 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_ADD : M.IsAssociatedConstant Self "value_ADD" value_ADD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_MUL : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 2 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_MUL : M.IsAssociatedConstant Self "value_MUL" value_MUL. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SUB : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 3 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SUB : M.IsAssociatedConstant Self "value_SUB" value_SUB. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DIV : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 4 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DIV : M.IsAssociatedConstant Self "value_DIV" value_DIV. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SDIV : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 5 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SDIV : M.IsAssociatedConstant Self "value_SDIV" value_SDIV. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_MOD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 6 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_MOD : M.IsAssociatedConstant Self "value_MOD" value_MOD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SMOD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 7 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SMOD : M.IsAssociatedConstant Self "value_SMOD" value_SMOD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_ADDMOD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 8 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_ADDMOD : M.IsAssociatedConstant Self "value_ADDMOD" value_ADDMOD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_MULMOD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 9 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_MULMOD : M.IsAssociatedConstant Self "value_MULMOD" value_MULMOD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EXP : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 10 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EXP : M.IsAssociatedConstant Self "value_EXP" value_EXP. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SIGNEXTEND : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 11 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SIGNEXTEND : + M.IsAssociatedConstant Self "value_SIGNEXTEND" value_SIGNEXTEND. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_LT : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 16 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_LT : M.IsAssociatedConstant Self "value_LT" value_LT. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_GT : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 17 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_GT : M.IsAssociatedConstant Self "value_GT" value_GT. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SLT : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 18 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SLT : M.IsAssociatedConstant Self "value_SLT" value_SLT. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SGT : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 19 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SGT : M.IsAssociatedConstant Self "value_SGT" value_SGT. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EQ : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 20 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EQ : M.IsAssociatedConstant Self "value_EQ" value_EQ. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_ISZERO : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 21 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_ISZERO : M.IsAssociatedConstant Self "value_ISZERO" value_ISZERO. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_AND : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 22 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_AND : M.IsAssociatedConstant Self "value_AND" value_AND. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_OR : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 23 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_OR : M.IsAssociatedConstant Self "value_OR" value_OR. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_XOR : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 24 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_XOR : M.IsAssociatedConstant Self "value_XOR" value_XOR. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_NOT : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 25 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_NOT : M.IsAssociatedConstant Self "value_NOT" value_NOT. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_BYTE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 26 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_BYTE : M.IsAssociatedConstant Self "value_BYTE" value_BYTE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SHL : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 27 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SHL : M.IsAssociatedConstant Self "value_SHL" value_SHL. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SHR : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 28 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SHR : M.IsAssociatedConstant Self "value_SHR" value_SHR. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SAR : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 29 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SAR : M.IsAssociatedConstant Self "value_SAR" value_SAR. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_KECCAK256 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 32 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_KECCAK256 : + M.IsAssociatedConstant Self "value_KECCAK256" value_KECCAK256. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_ADDRESS : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 48 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_ADDRESS : + M.IsAssociatedConstant Self "value_ADDRESS" value_ADDRESS. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_BALANCE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 49 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_BALANCE : + M.IsAssociatedConstant Self "value_BALANCE" value_BALANCE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_ORIGIN : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 50 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_ORIGIN : M.IsAssociatedConstant Self "value_ORIGIN" value_ORIGIN. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CALLER : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 51 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CALLER : M.IsAssociatedConstant Self "value_CALLER" value_CALLER. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CALLVALUE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 52 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CALLVALUE : + M.IsAssociatedConstant Self "value_CALLVALUE" value_CALLVALUE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CALLDATALOAD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 53 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CALLDATALOAD : + M.IsAssociatedConstant Self "value_CALLDATALOAD" value_CALLDATALOAD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CALLDATASIZE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 54 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CALLDATASIZE : + M.IsAssociatedConstant Self "value_CALLDATASIZE" value_CALLDATASIZE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CALLDATACOPY : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 55 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CALLDATACOPY : + M.IsAssociatedConstant Self "value_CALLDATACOPY" value_CALLDATACOPY. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CODESIZE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 56 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CODESIZE : + M.IsAssociatedConstant Self "value_CODESIZE" value_CODESIZE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CODECOPY : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 57 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CODECOPY : + M.IsAssociatedConstant Self "value_CODECOPY" value_CODECOPY. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_GASPRICE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 58 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_GASPRICE : + M.IsAssociatedConstant Self "value_GASPRICE" value_GASPRICE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EXTCODESIZE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 59 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EXTCODESIZE : + M.IsAssociatedConstant Self "value_EXTCODESIZE" value_EXTCODESIZE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EXTCODECOPY : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 60 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EXTCODECOPY : + M.IsAssociatedConstant Self "value_EXTCODECOPY" value_EXTCODECOPY. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_RETURNDATASIZE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 61 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_RETURNDATASIZE : + M.IsAssociatedConstant Self "value_RETURNDATASIZE" value_RETURNDATASIZE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_RETURNDATACOPY : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 62 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_RETURNDATACOPY : + M.IsAssociatedConstant Self "value_RETURNDATACOPY" value_RETURNDATACOPY. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EXTCODEHASH : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 63 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EXTCODEHASH : + M.IsAssociatedConstant Self "value_EXTCODEHASH" value_EXTCODEHASH. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_BLOCKHASH : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 64 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_BLOCKHASH : + M.IsAssociatedConstant Self "value_BLOCKHASH" value_BLOCKHASH. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_COINBASE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 65 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_COINBASE : + M.IsAssociatedConstant Self "value_COINBASE" value_COINBASE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_TIMESTAMP : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 66 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_TIMESTAMP : + M.IsAssociatedConstant Self "value_TIMESTAMP" value_TIMESTAMP. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_NUMBER : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 67 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_NUMBER : M.IsAssociatedConstant Self "value_NUMBER" value_NUMBER. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DIFFICULTY : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 68 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DIFFICULTY : + M.IsAssociatedConstant Self "value_DIFFICULTY" value_DIFFICULTY. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_GASLIMIT : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 69 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_GASLIMIT : + M.IsAssociatedConstant Self "value_GASLIMIT" value_GASLIMIT. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CHAINID : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 70 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CHAINID : + M.IsAssociatedConstant Self "value_CHAINID" value_CHAINID. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SELFBALANCE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 71 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SELFBALANCE : + M.IsAssociatedConstant Self "value_SELFBALANCE" value_SELFBALANCE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_BASEFEE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 72 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_BASEFEE : + M.IsAssociatedConstant Self "value_BASEFEE" value_BASEFEE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_BLOBHASH : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 73 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_BLOBHASH : + M.IsAssociatedConstant Self "value_BLOBHASH" value_BLOBHASH. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_BLOBBASEFEE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 74 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_BLOBBASEFEE : + M.IsAssociatedConstant Self "value_BLOBBASEFEE" value_BLOBBASEFEE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_POP : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 80 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_POP : M.IsAssociatedConstant Self "value_POP" value_POP. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_MLOAD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 81 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_MLOAD : M.IsAssociatedConstant Self "value_MLOAD" value_MLOAD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_MSTORE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 82 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_MSTORE : M.IsAssociatedConstant Self "value_MSTORE" value_MSTORE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_MSTORE8 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 83 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_MSTORE8 : + M.IsAssociatedConstant Self "value_MSTORE8" value_MSTORE8. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SLOAD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 84 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SLOAD : M.IsAssociatedConstant Self "value_SLOAD" value_SLOAD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SSTORE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 85 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SSTORE : M.IsAssociatedConstant Self "value_SSTORE" value_SSTORE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_JUMP : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 86 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_JUMP : M.IsAssociatedConstant Self "value_JUMP" value_JUMP. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_JUMPI : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 87 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_JUMPI : M.IsAssociatedConstant Self "value_JUMPI" value_JUMPI. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PC : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 88 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PC : M.IsAssociatedConstant Self "value_PC" value_PC. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_MSIZE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 89 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_MSIZE : M.IsAssociatedConstant Self "value_MSIZE" value_MSIZE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_GAS : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 90 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_GAS : M.IsAssociatedConstant Self "value_GAS" value_GAS. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_JUMPDEST : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 91 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_JUMPDEST : + M.IsAssociatedConstant Self "value_JUMPDEST" value_JUMPDEST. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_TLOAD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 92 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_TLOAD : M.IsAssociatedConstant Self "value_TLOAD" value_TLOAD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_TSTORE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 93 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_TSTORE : M.IsAssociatedConstant Self "value_TSTORE" value_TSTORE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_MCOPY : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 94 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_MCOPY : M.IsAssociatedConstant Self "value_MCOPY" value_MCOPY. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH0 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 95 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH0 : M.IsAssociatedConstant Self "value_PUSH0" value_PUSH0. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH1 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 96 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH1 : M.IsAssociatedConstant Self "value_PUSH1" value_PUSH1. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH2 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 97 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH2 : M.IsAssociatedConstant Self "value_PUSH2" value_PUSH2. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH3 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 98 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH3 : M.IsAssociatedConstant Self "value_PUSH3" value_PUSH3. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH4 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 99 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH4 : M.IsAssociatedConstant Self "value_PUSH4" value_PUSH4. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH5 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 100 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH5 : M.IsAssociatedConstant Self "value_PUSH5" value_PUSH5. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH6 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 101 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH6 : M.IsAssociatedConstant Self "value_PUSH6" value_PUSH6. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH7 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 102 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH7 : M.IsAssociatedConstant Self "value_PUSH7" value_PUSH7. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH8 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 103 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH8 : M.IsAssociatedConstant Self "value_PUSH8" value_PUSH8. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH9 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 104 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH9 : M.IsAssociatedConstant Self "value_PUSH9" value_PUSH9. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH10 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 105 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH10 : M.IsAssociatedConstant Self "value_PUSH10" value_PUSH10. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH11 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 106 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH11 : M.IsAssociatedConstant Self "value_PUSH11" value_PUSH11. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH12 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 107 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH12 : M.IsAssociatedConstant Self "value_PUSH12" value_PUSH12. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH13 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 108 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH13 : M.IsAssociatedConstant Self "value_PUSH13" value_PUSH13. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH14 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 109 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH14 : M.IsAssociatedConstant Self "value_PUSH14" value_PUSH14. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH15 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 110 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH15 : M.IsAssociatedConstant Self "value_PUSH15" value_PUSH15. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH16 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 111 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH16 : M.IsAssociatedConstant Self "value_PUSH16" value_PUSH16. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH17 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 112 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH17 : M.IsAssociatedConstant Self "value_PUSH17" value_PUSH17. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH18 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 113 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH18 : M.IsAssociatedConstant Self "value_PUSH18" value_PUSH18. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH19 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 114 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH19 : M.IsAssociatedConstant Self "value_PUSH19" value_PUSH19. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH20 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 115 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH20 : M.IsAssociatedConstant Self "value_PUSH20" value_PUSH20. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH21 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 116 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH21 : M.IsAssociatedConstant Self "value_PUSH21" value_PUSH21. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH22 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 117 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH22 : M.IsAssociatedConstant Self "value_PUSH22" value_PUSH22. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH23 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 118 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH23 : M.IsAssociatedConstant Self "value_PUSH23" value_PUSH23. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH24 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 119 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH24 : M.IsAssociatedConstant Self "value_PUSH24" value_PUSH24. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH25 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 120 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH25 : M.IsAssociatedConstant Self "value_PUSH25" value_PUSH25. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH26 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 121 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH26 : M.IsAssociatedConstant Self "value_PUSH26" value_PUSH26. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH27 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 122 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH27 : M.IsAssociatedConstant Self "value_PUSH27" value_PUSH27. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH28 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 123 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH28 : M.IsAssociatedConstant Self "value_PUSH28" value_PUSH28. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH29 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 124 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH29 : M.IsAssociatedConstant Self "value_PUSH29" value_PUSH29. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH30 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 125 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH30 : M.IsAssociatedConstant Self "value_PUSH30" value_PUSH30. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH31 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 126 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH31 : M.IsAssociatedConstant Self "value_PUSH31" value_PUSH31. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_PUSH32 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 127 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_PUSH32 : M.IsAssociatedConstant Self "value_PUSH32" value_PUSH32. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP1 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 128 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP1 : M.IsAssociatedConstant Self "value_DUP1" value_DUP1. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP2 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 129 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP2 : M.IsAssociatedConstant Self "value_DUP2" value_DUP2. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP3 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 130 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP3 : M.IsAssociatedConstant Self "value_DUP3" value_DUP3. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP4 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 131 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP4 : M.IsAssociatedConstant Self "value_DUP4" value_DUP4. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP5 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 132 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP5 : M.IsAssociatedConstant Self "value_DUP5" value_DUP5. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP6 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 133 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP6 : M.IsAssociatedConstant Self "value_DUP6" value_DUP6. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP7 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 134 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP7 : M.IsAssociatedConstant Self "value_DUP7" value_DUP7. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP8 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 135 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP8 : M.IsAssociatedConstant Self "value_DUP8" value_DUP8. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP9 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 136 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP9 : M.IsAssociatedConstant Self "value_DUP9" value_DUP9. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP10 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 137 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP10 : M.IsAssociatedConstant Self "value_DUP10" value_DUP10. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP11 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 138 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP11 : M.IsAssociatedConstant Self "value_DUP11" value_DUP11. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP12 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 139 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP12 : M.IsAssociatedConstant Self "value_DUP12" value_DUP12. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP13 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 140 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP13 : M.IsAssociatedConstant Self "value_DUP13" value_DUP13. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP14 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 141 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP14 : M.IsAssociatedConstant Self "value_DUP14" value_DUP14. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP15 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 142 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP15 : M.IsAssociatedConstant Self "value_DUP15" value_DUP15. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUP16 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 143 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUP16 : M.IsAssociatedConstant Self "value_DUP16" value_DUP16. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP1 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 144 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP1 : M.IsAssociatedConstant Self "value_SWAP1" value_SWAP1. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP2 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 145 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP2 : M.IsAssociatedConstant Self "value_SWAP2" value_SWAP2. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP3 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 146 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP3 : M.IsAssociatedConstant Self "value_SWAP3" value_SWAP3. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP4 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 147 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP4 : M.IsAssociatedConstant Self "value_SWAP4" value_SWAP4. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP5 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 148 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP5 : M.IsAssociatedConstant Self "value_SWAP5" value_SWAP5. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP6 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 149 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP6 : M.IsAssociatedConstant Self "value_SWAP6" value_SWAP6. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP7 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 150 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP7 : M.IsAssociatedConstant Self "value_SWAP7" value_SWAP7. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP8 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 151 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP8 : M.IsAssociatedConstant Self "value_SWAP8" value_SWAP8. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP9 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 152 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP9 : M.IsAssociatedConstant Self "value_SWAP9" value_SWAP9. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP10 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 153 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP10 : M.IsAssociatedConstant Self "value_SWAP10" value_SWAP10. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP11 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 154 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP11 : M.IsAssociatedConstant Self "value_SWAP11" value_SWAP11. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP12 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 155 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP12 : M.IsAssociatedConstant Self "value_SWAP12" value_SWAP12. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP13 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 156 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP13 : M.IsAssociatedConstant Self "value_SWAP13" value_SWAP13. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP14 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 157 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP14 : M.IsAssociatedConstant Self "value_SWAP14" value_SWAP14. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP15 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 158 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP15 : M.IsAssociatedConstant Self "value_SWAP15" value_SWAP15. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAP16 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 159 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAP16 : M.IsAssociatedConstant Self "value_SWAP16" value_SWAP16. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_LOG0 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 160 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_LOG0 : M.IsAssociatedConstant Self "value_LOG0" value_LOG0. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_LOG1 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 161 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_LOG1 : M.IsAssociatedConstant Self "value_LOG1" value_LOG1. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_LOG2 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 162 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_LOG2 : M.IsAssociatedConstant Self "value_LOG2" value_LOG2. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_LOG3 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 163 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_LOG3 : M.IsAssociatedConstant Self "value_LOG3" value_LOG3. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_LOG4 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 164 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_LOG4 : M.IsAssociatedConstant Self "value_LOG4" value_LOG4. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DATALOAD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 208 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DATALOAD : + M.IsAssociatedConstant Self "value_DATALOAD" value_DATALOAD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DATALOADN : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 209 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DATALOADN : + M.IsAssociatedConstant Self "value_DATALOADN" value_DATALOADN. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DATASIZE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 210 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DATASIZE : + M.IsAssociatedConstant Self "value_DATASIZE" value_DATASIZE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DATACOPY : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 211 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DATACOPY : + M.IsAssociatedConstant Self "value_DATACOPY" value_DATACOPY. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_RJUMP : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 224 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_RJUMP : M.IsAssociatedConstant Self "value_RJUMP" value_RJUMP. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_RJUMPI : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 225 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_RJUMPI : M.IsAssociatedConstant Self "value_RJUMPI" value_RJUMPI. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_RJUMPV : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 226 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_RJUMPV : M.IsAssociatedConstant Self "value_RJUMPV" value_RJUMPV. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CALLF : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 227 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CALLF : M.IsAssociatedConstant Self "value_CALLF" value_CALLF. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_RETF : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 228 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_RETF : M.IsAssociatedConstant Self "value_RETF" value_RETF. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_JUMPF : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 229 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_JUMPF : M.IsAssociatedConstant Self "value_JUMPF" value_JUMPF. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DUPN : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 230 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DUPN : M.IsAssociatedConstant Self "value_DUPN" value_DUPN. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SWAPN : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 231 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SWAPN : M.IsAssociatedConstant Self "value_SWAPN" value_SWAPN. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EXCHANGE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 232 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EXCHANGE : + M.IsAssociatedConstant Self "value_EXCHANGE" value_EXCHANGE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EOFCREATE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 236 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EOFCREATE : + M.IsAssociatedConstant Self "value_EOFCREATE" value_EOFCREATE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_TXCREATE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 237 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_TXCREATE : + M.IsAssociatedConstant Self "value_TXCREATE" value_TXCREATE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_RETURNCONTRACT : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 238 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_RETURNCONTRACT : + M.IsAssociatedConstant Self "value_RETURNCONTRACT" value_RETURNCONTRACT. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CREATE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 240 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CREATE : M.IsAssociatedConstant Self "value_CREATE" value_CREATE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CALL : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 241 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CALL : M.IsAssociatedConstant Self "value_CALL" value_CALL. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CALLCODE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 242 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CALLCODE : + M.IsAssociatedConstant Self "value_CALLCODE" value_CALLCODE. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_RETURN : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 243 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_RETURN : M.IsAssociatedConstant Self "value_RETURN" value_RETURN. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_DELEGATECALL : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 244 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_DELEGATECALL : + M.IsAssociatedConstant Self "value_DELEGATECALL" value_DELEGATECALL. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_CREATE2 : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 245 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_CREATE2 : + M.IsAssociatedConstant Self "value_CREATE2" value_CREATE2. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_RETURNDATALOAD : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 247 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_RETURNDATALOAD : + M.IsAssociatedConstant Self "value_RETURNDATALOAD" value_RETURNDATALOAD. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EXTCALL : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 248 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EXTCALL : + M.IsAssociatedConstant Self "value_EXTCALL" value_EXTCALL. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EXFCALL : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 249 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EXFCALL : + M.IsAssociatedConstant Self "value_EXFCALL" value_EXFCALL. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_STATICCALL : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 250 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_STATICCALL : + M.IsAssociatedConstant Self "value_STATICCALL" value_STATICCALL. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_EXTSCALL : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 251 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_EXTSCALL : + M.IsAssociatedConstant Self "value_EXTSCALL" value_EXTSCALL. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_REVERT : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 253 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_REVERT : M.IsAssociatedConstant Self "value_REVERT" value_REVERT. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_INVALID : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 254 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_INVALID : + M.IsAssociatedConstant Self "value_INVALID" value_INVALID. + + (* pub const $name: Self = Self($val); *) + (* Ty.path "revm_interpreter::opcode::OpCode" *) + Definition value_SELFDESTRUCT : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.of_value (| + Value.StructTuple + "revm_interpreter::opcode::OpCode" + [ A.to_value (M.of_value (| Value.Integer 255 |)) ] + |) + |))). + + Axiom AssociatedConstant_value_SELFDESTRUCT : + M.IsAssociatedConstant Self "value_SELFDESTRUCT" value_SELFDESTRUCT. + End Impl_revm_interpreter_opcode_OpCode. + + (* StructRecord + { + name := "OpCodeInfo"; + ty_params := []; + fields := + [ + ("name_ptr", Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ]); + ("name_len", Ty.path "u8"); + ("inputs", Ty.path "u8"); + ("outputs", Ty.path "u8"); + ("immediate_size", Ty.path "u8"); + ("not_eof", Ty.path "bool"); + ("terminating", Ty.path "bool") + ]; + } *) + + Module Impl_core_clone_Clone_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + (* Clone *) + Definition clone (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ fun γ => ltac:(M.monadic (M.read (| self |))) ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::clone::Clone" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("clone", InstanceField.Method clone) ]. + End Impl_core_clone_Clone_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_core_marker_Copy_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + Axiom Implements : + M.IsTraitInstance + "core::marker::Copy" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_Copy_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_core_marker_StructuralPartialEq_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralPartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralPartialEq_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_core_cmp_PartialEq_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + (* PartialEq *) + Definition eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + LogicalOp.and (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialEq", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], + [ Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ] ], + "eq", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_ptr" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "name_ptr" + |) + ] + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_len" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "name_len" + |) + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |) + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |) + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size" + |) + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "not_eof" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "not_eof" + |) + |) + |))) + |), + ltac:(M.monadic + (BinOp.Pure.eq (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "terminating" + |) + |), + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "terminating" + |) + |) + |))) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("eq", InstanceField.Method eq) ]. + End Impl_core_cmp_PartialEq_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_core_marker_StructuralEq_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + Axiom Implements : + M.IsTraitInstance + "core::marker::StructuralEq" + Self + (* Trait polymorphic types *) [] + (* Instance *) []. + End Impl_core_marker_StructuralEq_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_core_cmp_Eq_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + (* Eq *) + Definition assert_receiver_is_total_eq (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.of_value (| Value.DeclaredButUndefined |), + [ + fun γ => + ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))) + ] + |))) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Eq" + Self + (* Trait polymorphic types *) [] + (* Instance *) + [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ]. + End Impl_core_cmp_Eq_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_core_cmp_PartialOrd_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + (* PartialOrd *) + Definition partial_cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], + [ Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ] ], + "partial_cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_ptr" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "name_ptr" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "u8", + [ Ty.path "u8" ], + "partial_cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_len" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "name_len" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "u8", + [ Ty.path "u8" ], + "partial_cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "u8", + [ Ty.path "u8" ], + "partial_cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "u8", + [ Ty.path "u8" ], + "partial_cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "bool", + [ Ty.path "bool" ], + "partial_cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "not_eof" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "not_eof" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::PartialOrd", + Ty.path "bool", + [ Ty.path "bool" ], + "partial_cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "terminating" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "terminating" + |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::PartialOrd" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("partial_cmp", InstanceField.Method partial_cmp) ]. + End Impl_core_cmp_PartialOrd_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_core_cmp_Ord_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + (* Ord *) + Definition cmp (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; other ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let other := M.alloc (| other |) in + M.read (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], + [], + "cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_ptr" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "name_ptr" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::cmp::Ord", Ty.path "u8", [], "cmp", [] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_len" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "name_len" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "u8", + [], + "cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "u8", + [], + "cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "u8", + [], + "cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "bool", + [], + "cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "not_eof" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "not_eof" + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::cmp::Ord", + Ty.path "bool", + [], + "cmp", + [] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "terminating" + |); + M.SubPointer.get_struct_record_field (| + M.read (| other |), + "revm_interpreter::opcode::OpCodeInfo", + "terminating" + |) + ] + |) + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |))); + fun γ => + ltac:(M.monadic + (let cmp := M.copy (| γ |) in + cmp)) + ] + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::cmp::Ord" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("cmp", InstanceField.Method cmp) ]. + End Impl_core_cmp_Ord_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_core_hash_Hash_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + (* Hash *) + Definition hash (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ __H ], [ self; state ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let state := M.alloc (| state |) in + M.read (| + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::hash::Hash", + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], + [], + "hash", + [ __H ] + |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_ptr" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_len" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size" + |); + M.read (| state |) + ] + |) + |) in + let _ := + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "not_eof" + |); + M.read (| state |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), + [ + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "terminating" + |); + M.read (| state |) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::hash::Hash" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("hash", InstanceField.Method hash) ]. + End Impl_core_hash_Hash_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_core_fmt_Debug_for_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + (* + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("OpCodeInfo") + .field("name", &self.name()) + .field("inputs", &self.inputs()) + .field("outputs", &self.outputs()) + .field("not_eof", &self.is_disabled_in_eof()) + .field("terminating", &self.is_terminating()) + .field("immediate_size", &self.immediate_size()) + .finish() + } + *) + Definition fmt (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self; f ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + let f := M.alloc (| f |) in + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "finish", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "field", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "field", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "field", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "field", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "field", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::builders::DebugStruct", + "field", + [] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Formatter", + "debug_struct", + [] + |), + [ + M.read (| f |); + M.read (| M.of_value (| Value.String "OpCodeInfo" |) |) + ] + |) + |); + M.read (| M.of_value (| Value.String "name" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "name", + [] + |), + [ M.read (| self |) ] + |) + |) + |) + ] + |); + M.read (| M.of_value (| Value.String "inputs" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "inputs", + [] + |), + [ M.read (| self |) ] + |) + |) + |) + ] + |); + M.read (| M.of_value (| Value.String "outputs" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "outputs", + [] + |), + [ M.read (| self |) ] + |) + |) + |) + ] + |); + M.read (| M.of_value (| Value.String "not_eof" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "is_disabled_in_eof", + [] + |), + [ M.read (| self |) ] + |) + |) + |) + ] + |); + M.read (| M.of_value (| Value.String "terminating" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "is_terminating", + [] + |), + [ M.read (| self |) ] + |) + |) + |) + ] + |); + M.read (| M.of_value (| Value.String "immediate_size" |) |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ M.read (| self |) ] + |) + |) + |) + ] + |) + ] + |))) + | _, _ => M.impossible + end. + + Axiom Implements : + M.IsTraitInstance + "core::fmt::Debug" + Self + (* Trait polymorphic types *) [] + (* Instance *) [ ("fmt", InstanceField.Method fmt) ]. + End Impl_core_fmt_Debug_for_revm_interpreter_opcode_OpCodeInfo. + + Module Impl_revm_interpreter_opcode_OpCodeInfo. + Definition Self : Ty.t := Ty.path "revm_interpreter::opcode::OpCodeInfo". + + (* + pub const fn new(name: &'static str) -> Self { + assert!(name.len() < 256, "opcode name is too long"); + Self { + name_ptr: unsafe { NonNull::new_unchecked(name.as_ptr().cast_mut()) }, + name_len: name.len() as u8, + inputs: 0, + outputs: 0, + not_eof: false, + terminating: false, + immediate_size: 0, + } + } + *) + Definition new (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ name ] => + ltac:(M.monadic + (let name := M.alloc (| name |) in + M.read (| + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + BinOp.Pure.lt (| + M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ M.read (| name |) ] + |), + M.of_value (| Value.Integer 256 |) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String "opcode name is too long" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.alloc (| + M.of_value (| + Value.StructRecord + "revm_interpreter::opcode::OpCodeInfo" + [ + ("name_ptr", + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], + "new_unchecked", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "*const") [ Ty.path "u8" ], + "cast_mut", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| Ty.path "str", "as_ptr", [] |), + [ M.read (| name |) ] + |) + ] + |) + ] + |))); + ("name_len", + A.to_value + (M.rust_cast (| + M.call_closure (| + M.get_associated_function (| Ty.path "str", "len", [] |), + [ M.read (| name |) ] + |) + |))); + ("inputs", A.to_value (M.of_value (| Value.Integer 0 |))); + ("outputs", A.to_value (M.of_value (| Value.Integer 0 |))); + ("not_eof", A.to_value (M.of_value (| Value.Bool false |))); + ("terminating", A.to_value (M.of_value (| Value.Bool false |))); + ("immediate_size", A.to_value (M.of_value (| Value.Integer 0 |))) + ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new. + + (* + pub const fn name(&self) -> &'static str { + // SAFETY: `self.name_*` can only be initialized with a valid `&'static str`. + unsafe { + // TODO: Use `str::from_raw_parts` when it's stable. + let slice = core::slice::from_raw_parts(self.name_ptr.as_ptr(), self.name_len as usize); + core::str::from_utf8_unchecked(slice) + } + } + *) + Definition name (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + let slice := + M.alloc (| + M.call_closure (| + M.get_function (| "core::slice::raw::from_raw_parts", [ Ty.path "u8" ] |), + [ + (* MutToConstPointer *) + M.pointer_coercion (| + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "core::ptr::non_null::NonNull") [ Ty.path "u8" ], + "as_ptr", + [] + |), + [ + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_ptr" + |) + |) + ] + |) + |); + M.rust_cast (| + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "name_len" + |) + |) + |) + ] + |) + |) in + M.alloc (| + M.call_closure (| + M.get_function (| "core::str::converts::from_utf8_unchecked", [] |), + [ M.read (| slice |) ] + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_name : M.IsAssociatedFunction Self "name" name. + + (* + pub const fn io_diff(&self) -> i16 { + self.outputs as i16 - self.inputs as i16 + } + *) + Definition io_diff (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + BinOp.Panic.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.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |) + |) + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_io_diff : M.IsAssociatedFunction Self "io_diff" io_diff. + + (* + pub const fn inputs(&self) -> u8 { + self.inputs + } + *) + Definition inputs (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_inputs : M.IsAssociatedFunction Self "inputs" inputs. + + (* + pub const fn outputs(&self) -> u8 { + self.outputs + } + *) + Definition outputs (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_outputs : M.IsAssociatedFunction Self "outputs" outputs. + + (* + pub const fn is_disabled_in_eof(&self) -> bool { + self.not_eof + } + *) + Definition is_disabled_in_eof (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "not_eof" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_disabled_in_eof : + M.IsAssociatedFunction Self "is_disabled_in_eof" is_disabled_in_eof. + + (* + pub const fn is_terminating(&self) -> bool { + self.terminating + } + *) + Definition is_terminating (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "terminating" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_is_terminating : + M.IsAssociatedFunction Self "is_terminating" is_terminating. + + (* + pub const fn immediate_size(&self) -> u8 { + self.immediate_size + } + *) + Definition immediate_size (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ self ] => + ltac:(M.monadic + (let self := M.alloc (| self |) in + M.read (| + M.SubPointer.get_struct_record_field (| + M.read (| self |), + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size" + |) + |))) + | _, _ => M.impossible + end. + + Axiom AssociatedFunction_immediate_size : + M.IsAssociatedFunction Self "immediate_size" immediate_size. + End Impl_revm_interpreter_opcode_OpCodeInfo. + + (* + pub const fn not_eof(mut op: OpCodeInfo) -> OpCodeInfo { + op.not_eof = true; + op + } + *) + Definition not_eof (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ op ] => + ltac:(M.monadic + (let op := M.alloc (| op |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + op, + "revm_interpreter::opcode::OpCodeInfo", + "not_eof" + |), + M.of_value (| Value.Bool true |) + |) in + op + |))) + | _, _ => M.impossible + end. + + (* + pub const fn immediate_size(mut op: OpCodeInfo, n: u8) -> OpCodeInfo { + op.immediate_size = n; + op + } + *) + Definition immediate_size (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ op; n ] => + ltac:(M.monadic + (let op := M.alloc (| op |) in + let n := M.alloc (| n |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + op, + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size" + |), + M.read (| n |) + |) in + op + |))) + | _, _ => M.impossible + end. + + (* + pub const fn terminating(mut op: OpCodeInfo) -> OpCodeInfo { + op.terminating = true; + op + } + *) + Definition terminating (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ op ] => + ltac:(M.monadic + (let op := M.alloc (| op |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + op, + "revm_interpreter::opcode::OpCodeInfo", + "terminating" + |), + M.of_value (| Value.Bool true |) + |) in + op + |))) + | _, _ => M.impossible + end. + + (* + pub const fn stack_io(mut op: OpCodeInfo, inputs: u8, outputs: u8) -> OpCodeInfo { + op.inputs = inputs; + op.outputs = outputs; + op + } + *) + Definition stack_io (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ op; inputs; outputs ] => + ltac:(M.monadic + (let op := M.alloc (| op |) in + let inputs := M.alloc (| inputs |) in + let outputs := M.alloc (| outputs |) in + M.read (| + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + op, + "revm_interpreter::opcode::OpCodeInfo", + "inputs" + |), + M.read (| inputs |) + |) in + let _ := + M.write (| + M.SubPointer.get_struct_record_field (| + op, + "revm_interpreter::opcode::OpCodeInfo", + "outputs" + |), + M.read (| outputs |) + |) in + op + |))) + | _, _ => M.impossible + end. + + Definition value_NOP : A.t := + M.run ltac:(M.monadic (M.get_constant (| "revm_interpreter::opcode::JUMPDEST" |))). + + Definition value_STOP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 0 |) |))). + + Definition value_ADD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 1 |) |))). + + Definition value_MUL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 2 |) |))). + + Definition value_SUB : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 3 |) |))). + + Definition value_DIV : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 4 |) |))). + + Definition value_SDIV : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 5 |) |))). + + Definition value_MOD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 6 |) |))). + + Definition value_SMOD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 7 |) |))). + + Definition value_ADDMOD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 8 |) |))). + + Definition value_MULMOD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 9 |) |))). + + Definition value_EXP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 10 |) |))). + + Definition value_SIGNEXTEND : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 11 |) |))). + + Definition value_LT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 16 |) |))). + + Definition value_GT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 17 |) |))). + + Definition value_SLT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 18 |) |))). + + Definition value_SGT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 19 |) |))). + + Definition value_EQ : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 20 |) |))). + + Definition value_ISZERO : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 21 |) |))). + + Definition value_AND : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 22 |) |))). + + Definition value_OR : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 23 |) |))). + + Definition value_XOR : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 24 |) |))). + + Definition value_NOT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 25 |) |))). + + Definition value_BYTE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 26 |) |))). + + Definition value_SHL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 27 |) |))). + + Definition value_SHR : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 28 |) |))). + + Definition value_SAR : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 29 |) |))). + + Definition value_KECCAK256 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 32 |) |))). + + Definition value_ADDRESS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 48 |) |))). + + Definition value_BALANCE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 49 |) |))). + + Definition value_ORIGIN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 50 |) |))). + + Definition value_CALLER : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 51 |) |))). + + Definition value_CALLVALUE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 52 |) |))). + + Definition value_CALLDATALOAD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 53 |) |))). + + Definition value_CALLDATASIZE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 54 |) |))). + + Definition value_CALLDATACOPY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 55 |) |))). + + Definition value_CODESIZE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 56 |) |))). + + Definition value_CODECOPY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 57 |) |))). + + Definition value_GASPRICE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 58 |) |))). + + Definition value_EXTCODESIZE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 59 |) |))). + + Definition value_EXTCODECOPY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 60 |) |))). + + Definition value_RETURNDATASIZE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 61 |) |))). + + Definition value_RETURNDATACOPY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 62 |) |))). + + Definition value_EXTCODEHASH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 63 |) |))). + + Definition value_BLOCKHASH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 64 |) |))). + + Definition value_COINBASE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 65 |) |))). + + Definition value_TIMESTAMP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 66 |) |))). + + Definition value_NUMBER : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 67 |) |))). + + Definition value_DIFFICULTY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 68 |) |))). + + Definition value_GASLIMIT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 69 |) |))). + + Definition value_CHAINID : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 70 |) |))). + + Definition value_SELFBALANCE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 71 |) |))). + + Definition value_BASEFEE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 72 |) |))). + + Definition value_BLOBHASH : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 73 |) |))). + + Definition value_BLOBBASEFEE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 74 |) |))). + + Definition value_POP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 80 |) |))). + + Definition value_MLOAD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 81 |) |))). + + Definition value_MSTORE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 82 |) |))). + + Definition value_MSTORE8 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 83 |) |))). + + Definition value_SLOAD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 84 |) |))). + + Definition value_SSTORE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 85 |) |))). + + Definition value_JUMP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 86 |) |))). + + Definition value_JUMPI : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 87 |) |))). + + Definition value_PC : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 88 |) |))). + + Definition value_MSIZE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 89 |) |))). + + Definition value_GAS : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 90 |) |))). + + Definition value_JUMPDEST : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 91 |) |))). + + Definition value_TLOAD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 92 |) |))). + + Definition value_TSTORE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 93 |) |))). + + Definition value_MCOPY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 94 |) |))). + + Definition value_PUSH0 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 95 |) |))). + + Definition value_PUSH1 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 96 |) |))). + + Definition value_PUSH2 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 97 |) |))). + + Definition value_PUSH3 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 98 |) |))). + + Definition value_PUSH4 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 99 |) |))). + + Definition value_PUSH5 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 100 |) |))). + + Definition value_PUSH6 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 101 |) |))). + + Definition value_PUSH7 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 102 |) |))). + + Definition value_PUSH8 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 103 |) |))). + + Definition value_PUSH9 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 104 |) |))). + + Definition value_PUSH10 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 105 |) |))). + + Definition value_PUSH11 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 106 |) |))). + + Definition value_PUSH12 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 107 |) |))). + + Definition value_PUSH13 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 108 |) |))). + + Definition value_PUSH14 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 109 |) |))). + + Definition value_PUSH15 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 110 |) |))). + + Definition value_PUSH16 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 111 |) |))). + + Definition value_PUSH17 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 112 |) |))). + + Definition value_PUSH18 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 113 |) |))). + + Definition value_PUSH19 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 114 |) |))). + + Definition value_PUSH20 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 115 |) |))). + + Definition value_PUSH21 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 116 |) |))). + + Definition value_PUSH22 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 117 |) |))). + + Definition value_PUSH23 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 118 |) |))). + + Definition value_PUSH24 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 119 |) |))). + + Definition value_PUSH25 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 120 |) |))). + + Definition value_PUSH26 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 121 |) |))). + + Definition value_PUSH27 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 122 |) |))). + + Definition value_PUSH28 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 123 |) |))). + + Definition value_PUSH29 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 124 |) |))). + + Definition value_PUSH30 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 125 |) |))). + + Definition value_PUSH31 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 126 |) |))). + + Definition value_PUSH32 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 127 |) |))). + + Definition value_DUP1 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 128 |) |))). + + Definition value_DUP2 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 129 |) |))). + + Definition value_DUP3 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 130 |) |))). + + Definition value_DUP4 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 131 |) |))). + + Definition value_DUP5 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 132 |) |))). + + Definition value_DUP6 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 133 |) |))). + + Definition value_DUP7 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 134 |) |))). + + Definition value_DUP8 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 135 |) |))). + + Definition value_DUP9 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 136 |) |))). + + Definition value_DUP10 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 137 |) |))). + + Definition value_DUP11 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 138 |) |))). + + Definition value_DUP12 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 139 |) |))). + + Definition value_DUP13 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 140 |) |))). + + Definition value_DUP14 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 141 |) |))). + + Definition value_DUP15 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 142 |) |))). + + Definition value_DUP16 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 143 |) |))). + + Definition value_SWAP1 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 144 |) |))). + + Definition value_SWAP2 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 145 |) |))). + + Definition value_SWAP3 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 146 |) |))). + + Definition value_SWAP4 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 147 |) |))). + + Definition value_SWAP5 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 148 |) |))). + + Definition value_SWAP6 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 149 |) |))). + + Definition value_SWAP7 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 150 |) |))). + + Definition value_SWAP8 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 151 |) |))). + + Definition value_SWAP9 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 152 |) |))). + + Definition value_SWAP10 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 153 |) |))). + + Definition value_SWAP11 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 154 |) |))). + + Definition value_SWAP12 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 155 |) |))). + + Definition value_SWAP13 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 156 |) |))). + + Definition value_SWAP14 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 157 |) |))). + + Definition value_SWAP15 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 158 |) |))). + + Definition value_SWAP16 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 159 |) |))). + + Definition value_LOG0 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 160 |) |))). + + Definition value_LOG1 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 161 |) |))). + + Definition value_LOG2 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 162 |) |))). + + Definition value_LOG3 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 163 |) |))). + + Definition value_LOG4 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 164 |) |))). + + Definition value_DATALOAD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 208 |) |))). + + Definition value_DATALOADN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 209 |) |))). + + Definition value_DATASIZE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 210 |) |))). + + Definition value_DATACOPY : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 211 |) |))). + + Definition value_RJUMP : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 224 |) |))). + + Definition value_RJUMPI : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 225 |) |))). + + Definition value_RJUMPV : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 226 |) |))). + + Definition value_CALLF : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 227 |) |))). + + Definition value_RETF : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 228 |) |))). + + Definition value_JUMPF : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 229 |) |))). + + Definition value_DUPN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 230 |) |))). + + Definition value_SWAPN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 231 |) |))). + + Definition value_EXCHANGE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 232 |) |))). + + Definition value_EOFCREATE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 236 |) |))). + + Definition value_TXCREATE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 237 |) |))). + + Definition value_RETURNCONTRACT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 238 |) |))). + + Definition value_CREATE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 240 |) |))). + + Definition value_CALL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 241 |) |))). + + Definition value_CALLCODE : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 242 |) |))). + + Definition value_RETURN : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 243 |) |))). + + Definition value_DELEGATECALL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 244 |) |))). + + Definition value_CREATE2 : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 245 |) |))). + + Definition value_RETURNDATALOAD : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 247 |) |))). + + Definition value_EXTCALL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 248 |) |))). + + Definition value_EXFCALL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 249 |) |))). + + Definition value_STATICCALL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 250 |) |))). + + Definition value_EXTSCALL : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 251 |) |))). + + Definition value_REVERT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 253 |) |))). + + Definition value_INVALID : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 254 |) |))). + + Definition value_SELFDESTRUCT : A.t := + M.run ltac:(M.monadic (M.alloc (| M.of_value (| Value.Integer 255 |) |))). + + + Definition value_OPCODE_INFO_JUMPTABLE : A.t := + M.run + ltac:(M.monadic + (let map := + M.alloc (| + repeat (| M.of_value (| Value.StructTuple "core::option::Option::None" [] |), 256 |) + |) in + let prev := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let val := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "STOP" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::terminating", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 0 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 1 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "ADD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 1 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 2 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "MUL" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 2 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 3 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SUB" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 3 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 4 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DIV" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 4 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 5 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SDIV" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 5 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 6 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "MOD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 6 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 7 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SMOD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 7 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 8 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "ADDMOD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 8 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 9 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "MULMOD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 9 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 10 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EXP" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 10 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 11 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SIGNEXTEND" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 11 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 16 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "LT" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 16 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 17 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "GT" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 17 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 18 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SLT" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 18 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 19 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SGT" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 19 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 20 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EQ" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 20 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 21 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "ISZERO" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 21 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 22 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "AND" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 22 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 23 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "OR" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 23 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 24 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "XOR" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 24 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 25 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "NOT" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 25 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 26 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "BYTE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 26 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 27 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SHL" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 27 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 28 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SHR" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 28 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 29 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SAR" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 29 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 32 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "KECCAK256" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 32 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 48 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "ADDRESS" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 48 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 49 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "BALANCE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 49 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 50 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "ORIGIN" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 50 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 51 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CALLER" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 51 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 52 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CALLVALUE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 52 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 53 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CALLDATALOAD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 53 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 54 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CALLDATASIZE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 54 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 55 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CALLDATACOPY" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 55 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 56 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CODESIZE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 56 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 57 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CODECOPY" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 57 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 58 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "GASPRICE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 58 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 59 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EXTCODESIZE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 59 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 60 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EXTCODECOPY" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 4 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 60 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 61 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "RETURNDATASIZE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 61 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 62 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "RETURNDATACOPY" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 62 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 63 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EXTCODEHASH" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 63 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 64 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "BLOCKHASH" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 64 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 65 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "COINBASE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 65 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 66 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "TIMESTAMP" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 66 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 67 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "NUMBER" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 67 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 68 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DIFFICULTY" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 68 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 69 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "GASLIMIT" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 69 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 70 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CHAINID" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 70 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 71 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SELFBALANCE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 71 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 72 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "BASEFEE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 72 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 73 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "BLOBHASH" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 73 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 74 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "BLOBBASEFEE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 74 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 80 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "POP" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 80 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 81 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "MLOAD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 81 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 82 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "MSTORE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 82 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 83 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "MSTORE8" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 83 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 84 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SLOAD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 84 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 85 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SSTORE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 85 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 86 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "JUMP" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 86 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 87 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "JUMPI" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 87 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 88 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PC" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 88 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 89 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "MSIZE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 89 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 90 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "GAS" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 90 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 91 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "JUMPDEST" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 91 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 92 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "TLOAD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 92 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 93 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "TSTORE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 93 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 94 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "MCOPY" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 94 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 95 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH0" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 95 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 96 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH1" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 1 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 96 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 97 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH2" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 2 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 97 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 98 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH3" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 3 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 98 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 99 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH4" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 4 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| map, M.alloc (| M.of_value (| Value.Integer 99 |) |) |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 100 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH5" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 5 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 100 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 101 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH6" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 6 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 101 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 102 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH7" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 7 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 102 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 103 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH8" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 8 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 103 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 104 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH9" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 9 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 104 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 105 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH10" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 10 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 105 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 106 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH11" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 11 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 106 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 107 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH12" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 12 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 107 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 108 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH13" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 13 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 108 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 109 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH14" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 14 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 109 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 110 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH15" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 15 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 110 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 111 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH16" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 16 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 111 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 112 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH17" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 17 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 112 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 113 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH18" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 18 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 113 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 114 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH19" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 19 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 114 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 115 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH20" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 20 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 115 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 116 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH21" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 21 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 116 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 117 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH22" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 22 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 117 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 118 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH23" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 23 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 118 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 119 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH24" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 24 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 119 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 120 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH25" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 25 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 120 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 121 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH26" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 26 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 121 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 122 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH27" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 27 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 122 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 123 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH28" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 28 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 123 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 124 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH29" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 29 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 124 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 125 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH30" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 30 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 125 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 126 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH31" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 31 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 126 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 127 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "PUSH32" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 32 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 127 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 128 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP1" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 2 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 128 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 129 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP2" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 3 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 129 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 130 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP3" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 4 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 130 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 131 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP4" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 4 |); + M.of_value (| Value.Integer 5 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 131 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 132 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP5" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 5 |); + M.of_value (| Value.Integer 6 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 132 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 133 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP6" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 6 |); + M.of_value (| Value.Integer 7 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 133 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 134 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP7" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 7 |); + M.of_value (| Value.Integer 8 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 134 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 135 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP8" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 8 |); + M.of_value (| Value.Integer 9 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 135 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 136 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP9" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 9 |); + M.of_value (| Value.Integer 10 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 136 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 137 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP10" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 10 |); + M.of_value (| Value.Integer 11 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 137 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 138 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP11" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 11 |); + M.of_value (| Value.Integer 12 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 138 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 139 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP12" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 12 |); + M.of_value (| Value.Integer 13 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 139 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 140 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP13" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 13 |); + M.of_value (| Value.Integer 14 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 140 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 141 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP14" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 14 |); + M.of_value (| Value.Integer 15 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 141 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 142 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP15" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 15 |); + M.of_value (| Value.Integer 16 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 142 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 143 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUP16" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 16 |); + M.of_value (| Value.Integer 17 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 143 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 144 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP1" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 2 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 144 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 145 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP2" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 3 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 145 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 146 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP3" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 4 |); + M.of_value (| Value.Integer 4 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 146 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 147 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP4" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 5 |); + M.of_value (| Value.Integer 5 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 147 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 148 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP5" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 6 |); + M.of_value (| Value.Integer 6 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 148 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 149 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP6" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 7 |); + M.of_value (| Value.Integer 7 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 149 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 150 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP7" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 8 |); + M.of_value (| Value.Integer 8 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 150 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 151 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP8" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 9 |); + M.of_value (| Value.Integer 9 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 151 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 152 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP9" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 10 |); + M.of_value (| Value.Integer 10 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 152 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 153 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP10" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 11 |); + M.of_value (| Value.Integer 11 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 153 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 154 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP11" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 12 |); + M.of_value (| Value.Integer 12 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 154 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 155 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP12" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 13 |); + M.of_value (| Value.Integer 13 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 155 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 156 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP13" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 14 |); + M.of_value (| Value.Integer 14 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 156 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 157 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP14" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 15 |); + M.of_value (| Value.Integer 15 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 157 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 158 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP15" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 16 |); + M.of_value (| Value.Integer 16 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 158 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 159 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAP16" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 17 |); + M.of_value (| Value.Integer 17 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 159 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 160 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "LOG0" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 160 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 161 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "LOG1" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 161 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 162 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "LOG2" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 4 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 162 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 163 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "LOG3" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 5 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 163 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 164 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "LOG4" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 6 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 164 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 208 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DATALOAD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 208 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 209 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DATALOADN" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 2 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 209 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 210 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DATASIZE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 210 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 211 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DATACOPY" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 211 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 224 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "RJUMP" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 2 |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::terminating", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 224 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 225 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "RJUMPI" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 2 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 225 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 226 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "RJUMPV" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 1 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 226 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 227 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CALLF" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 2 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 227 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 228 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "RETF" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::terminating", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 228 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 229 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "JUMPF" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 2 |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::terminating", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 229 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 230 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DUPN" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 1 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 230 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 231 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SWAPN" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 1 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 231 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 232 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EXCHANGE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 1 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 232 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 236 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EOFCREATE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 4 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 1 |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 236 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 237 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "TXCREATE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 5 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 237 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 238 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "RETURNCONTRACT" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), + [ M.read (| info |); M.of_value (| Value.Integer 1 |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::terminating", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 238 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 240 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CREATE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 240 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 241 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CALL" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 7 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 241 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 242 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CALLCODE" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 7 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 242 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 243 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "RETURN" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::terminating", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 243 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 244 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "DELEGATECALL" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 6 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 244 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 245 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "CREATE2" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 4 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 245 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 247 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "RETURNDATALOAD" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 247 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 248 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EXTCALL" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 4 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 248 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 249 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EXFCALL" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 249 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 250 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "STATICCALL" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 6 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 250 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 251 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "EXTSCALL" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 3 |); + M.of_value (| Value.Integer 1 |) + ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 251 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 253 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "REVERT" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 2 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::terminating", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 253 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 254 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "INVALID" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 0 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::terminating", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 254 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + let val := M.alloc (| M.of_value (| Value.Integer 255 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + UnOp.Pure.not (| + LogicalOp.or (| + BinOp.Pure.eq (| M.read (| val |), M.of_value (| Value.Integer 0 |) |), + ltac:(M.monadic + (BinOp.Pure.gt (| M.read (| val |), M.read (| prev |) |))) + |) + |) + |)) in + let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + M.alloc (| + M.never_to_any (| + M.call_closure (| + M.get_function (| "core::panicking::panic_fmt", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "opcodes must be sorted in ascending order" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) + |))); + fun γ => ltac:(M.monadic (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := M.write (| prev, M.read (| val |) |) in + let info := + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "new", + [] + |), + [ M.read (| M.of_value (| Value.String "SELFDESTRUCT" |) |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::stack_io", [] |), + [ + M.read (| info |); + M.of_value (| Value.Integer 1 |); + M.of_value (| Value.Integer 0 |) + ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::not_eof", [] |), + [ M.read (| info |) ] + |) + |) in + let info := + M.alloc (| + M.call_closure (| + M.get_function (| "revm_interpreter::opcode::terminating", [] |), + [ M.read (| info |) ] + |) + |) in + let _ := + M.write (| + M.SubPointer.get_array_field (| + map, + M.alloc (| M.of_value (| Value.Integer 255 |) |) + |), + M.of_value (| + Value.StructTuple "core::option::Option::Some" [ A.to_value (M.read (| info |)) ] + |) + |) in + M.match_operator (| prev, [ fun γ => ltac:(M.monadic map) ] |))). + + Definition value_NAME_TO_OPCODE : A.t := + M.run + ltac:(M.monadic + (M.alloc (| + M.alloc (| + M.of_value (| + Value.StructRecord + "phf::map::Map" + [ + ("key", A.to_value (M.of_value (| Value.Integer 12913932095322966823 |))); + ("disps", + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 27 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 155 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 153 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 26 |)); + A.to_value (M.of_value (| Value.Integer 134 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 135 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 123 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 70 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 100 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 4 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 111 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 33 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 0 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 154 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 8 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 49 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 1 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 7 |)); + A.to_value (M.of_value (| Value.Integer 29 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 39 |)); + A.to_value (M.of_value (| Value.Integer 151 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 77 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 55 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 17 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 75 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 15 |)); + A.to_value (M.of_value (| Value.Integer 42 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 3 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 2 |)); + A.to_value (M.of_value (| Value.Integer 32 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 5 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 1 |)); + A.to_value (M.of_value (| Value.Integer 18 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 0 |)); + A.to_value (M.of_value (| Value.Integer 2 |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value (M.of_value (| Value.Integer 69 |)); + A.to_value (M.of_value (| Value.Integer 21 |)) + ] + |)) + ] + |) + |) + |))); + ("entries", + A.to_value + (* Unsize *) + (M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "RETURN" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::RETURN" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH15" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH15" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP6" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP6" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH27" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH27" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "JUMPDEST" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::JUMPDEST" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "TIMESTAMP" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::TIMESTAMP" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH7" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH7" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "SELFDESTRUCT" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::SELFDESTRUCT" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "ISZERO" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::ISZERO" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SLOAD" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SLOAD" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP1" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP1" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH20" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH20" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "RETURNDATACOPY" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::RETURNDATACOPY" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "EXTSCALL" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::EXTSCALL" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "JUMPI" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::JUMPI" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DATASIZE" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::DATASIZE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP15" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP15" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP10" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP10" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP1" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP1" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH30" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH30" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CREATE2" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::CREATE2" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "LOG3" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::LOG3" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CALL" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::CALL" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP9" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP9" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "BLOCKHASH" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::BLOCKHASH" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "BLOBHASH" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::BLOBHASH" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "LOG1" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::LOG1" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP2" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP2" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "EQ" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::EQ" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "MCOPY" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::MCOPY" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "RJUMP" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::RJUMP" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "GAS" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::GAS" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "LOG0" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::LOG0" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "EXTCODEHASH" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::EXTCODEHASH" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH12" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH12" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "CALLDATACOPY" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::CALLDATACOPY" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "RETURNDATALOAD" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::RETURNDATALOAD" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH17" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH17" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "BASEFEE" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::BASEFEE" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "MLOAD" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::MLOAD" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "TXCREATE" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::TXCREATE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP15" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP15" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SMOD" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SMOD" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "EOFCREATE" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::EOFCREATE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP10" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP10" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "ADDMOD" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::ADDMOD" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "RJUMPI" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::RJUMPI" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "GASPRICE" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::GASPRICE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH23" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH23" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP12" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP12" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP7" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP7" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "EXTCALL" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::EXTCALL" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "LT" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::LT" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH3" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH3" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SDIV" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SDIV" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "EXTCODESIZE" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::EXTCODESIZE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP4" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP4" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "CALLDATALOAD" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::CALLDATALOAD" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH13" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH13" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "JUMP" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::JUMP" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP6" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP6" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "MOD" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::MOD" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "INVALID" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::INVALID" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH31" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH31" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH29" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH29" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP8" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP8" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CALLER" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::CALLER" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH25" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH25" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH2" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH2" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP16" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP16" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP14" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP14" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH14" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH14" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUPN" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUPN" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DATALOADN" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::DATALOADN" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CHAINID" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::CHAINID" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH10" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH10" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH9" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH9" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP3" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP3" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "EXCHANGE" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::EXCHANGE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP2" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP2" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "EXTCODECOPY" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::EXTCODECOPY" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "MULMOD" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::MULMOD" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH11" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH11" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "ORIGIN" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::ORIGIN" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "POP" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::POP" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP13" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP13" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "AND" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::AND" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH21" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH21" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH16" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH16" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "TSTORE" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::TSTORE" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "TLOAD" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::TLOAD" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DIFFICULTY" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::DIFFICULTY" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP5" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP5" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP11" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP11" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CALLF" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::CALLF" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "MUL" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::MUL" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SHL" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SHL" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH6" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH6" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "GASLIMIT" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::GASLIMIT" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH28" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH28" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CREATE" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::CREATE" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CALLVALUE" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::CALLVALUE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DATALOAD" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::DATALOAD" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH4" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH4" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "RETURNCONTRACT" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::RETURNCONTRACT" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "JUMPF" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::JUMPF" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DATACOPY" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::DATACOPY" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "KECCAK256" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::KECCAK256" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "RJUMPV" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::RJUMPV" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "BYTE" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::BYTE" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SGT" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SGT" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "RETF" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::RETF" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH22" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH22" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "MSIZE" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::MSIZE" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP14" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP14" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "REVERT" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::REVERT" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "MSTORE8" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::MSTORE8" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH5" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH5" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SUB" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SUB" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP5" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP5" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH32" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH32" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP11" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP11" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SHR" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SHR" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP3" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP3" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "NUMBER" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::NUMBER" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PC" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PC" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH8" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH8" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH0" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH0" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "MSTORE" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::MSTORE" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP16" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP16" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "BALANCE" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::BALANCE" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "ADD" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::ADD" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH19" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH19" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "STOP" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::STOP" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "BLOBBASEFEE" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::BLOBBASEFEE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "GT" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::GT" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DIV" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DIV" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH26" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH26" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "NOT" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::NOT" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "OR" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::OR" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "ADDRESS" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::ADDRESS" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAPN" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAPN" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SAR" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SAR" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "CALLDATASIZE" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::CALLDATASIZE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "DELEGATECALL" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::DELEGATECALL" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "EXFCALL" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::EXFCALL" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH18" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH18" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CODESIZE" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::CODESIZE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP13" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP13" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP12" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP12" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SIGNEXTEND" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::SIGNEXTEND" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CALLCODE" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::CALLCODE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP7" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP7" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "XOR" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::XOR" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SLT" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SLT" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "CODECOPY" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::CODECOPY" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "LOG4" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::LOG4" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "COINBASE" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::COINBASE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH1" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH1" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "STATICCALL" |) |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::STATICCALL" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "LOG2" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::LOG2" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SSTORE" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SSTORE" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "RETURNDATASIZE" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::RETURNDATASIZE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP9" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP9" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "DUP4" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::DUP4" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "EXP" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::EXP" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| + M.of_value (| Value.String "SELFBALANCE" |) + |)); + A.to_value + (M.read (| + M.get_constant (| + "revm_interpreter::opcode::SELFBALANCE" + |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "PUSH24" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::PUSH24" |) + |)) + ] + |)); + A.to_value + (M.of_value (| + Value.Tuple + [ + A.to_value + (M.read (| M.of_value (| Value.String "SWAP8" |) |)); + A.to_value + (M.read (| + M.get_constant (| "revm_interpreter::opcode::SWAP8" |) + |)) + ] + |)) + ] + |) + |) + |))) + ] + |) + |) + |))). + + (* + pub const fn instruction(opcode: u8) -> Instruction { + match opcode { + $($name => $f,)* + _ => control::unknown, + } + } + *) + Definition instruction (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [ H; SPEC ], [ opcode ] => + ltac:(M.monadic + (let opcode := M.alloc (| opcode |) in + M.read (| + M.match_operator (| + opcode, + [ + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::stop", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::arithmetic::add", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 2 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::arithmetic::mul", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 3 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::arithmetic::sub", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 4 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::arithmetic::div", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 5 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::arithmetic::sdiv", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 6 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::arithmetic::rem", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 7 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::arithmetic::smod", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 8 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::arithmetic::addmod", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 9 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::arithmetic::mulmod", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 10 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::arithmetic::exp", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 11 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::arithmetic::signextend", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 16 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::lt", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 17 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::gt", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 18 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::slt", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 19 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::sgt", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 20 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::eq", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 21 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::iszero", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 22 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::bitand", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 23 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::bitor", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 24 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::bitxor", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 25 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::not", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 26 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::bitwise::byte", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 27 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::bitwise::shl", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 28 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::bitwise::shr", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 29 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::bitwise::sar", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 32 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::system::keccak256", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 48 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::system::address", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 49 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::balance", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 50 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::host_env::origin", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 51 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::system::caller", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 52 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::system::callvalue", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 53 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::system::calldataload", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 54 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::system::calldatasize", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 55 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::system::calldatacopy", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 56 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::system::codesize", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 57 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::system::codecopy", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 58 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::gasprice", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 59 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::extcodesize", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 60 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::extcodecopy", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 61 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::system::returndatasize", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 62 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::system::returndatacopy", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 63 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::extcodehash", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 64 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::blockhash", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 65 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::coinbase", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 66 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::timestamp", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 67 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::block_number", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 68 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::difficulty", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 69 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::gaslimit", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 70 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::chainid", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 71 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::selfbalance", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 72 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::basefee", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 73 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::blob_hash", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 74 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host_env::blob_basefee", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 80 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::pop", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 81 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::memory::mload", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 82 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::memory::mstore", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 83 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::memory::mstore8", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 84 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::sload", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 85 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::sstore", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 86 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::jump", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 87 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::jumpi", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 88 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::pc", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 89 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::memory::msize", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 90 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::system::gas", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 91 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::control::jumpdest_or_nop", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 92 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::tload", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 93 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::tstore", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 94 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::memory::mcopy", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 95 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::stack::push0", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 96 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 97 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 98 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 99 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 100 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 101 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 102 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 103 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 104 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 105 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 106 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 107 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 108 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 109 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 110 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 111 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 112 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 113 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 114 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 115 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 116 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 117 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 118 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 119 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 120 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 121 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 122 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 123 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 124 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 125 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 126 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 127 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::push", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 128 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 129 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 130 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 131 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 132 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 133 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 134 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 135 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 136 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 137 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 138 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 139 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 140 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 141 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 142 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 143 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dup", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 144 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 145 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 146 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 147 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 148 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 149 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 150 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 151 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 152 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 153 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 154 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 155 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 156 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 157 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 158 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 159 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swap", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 160 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::host::log", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 161 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::host::log", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 162 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::host::log", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 163 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::host::log", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 164 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::host::log", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 208 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::data::data_load", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 209 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::data::data_loadn", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 210 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::data::data_size", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 211 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::data::data_copy", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 224 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::rjump", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 225 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::rjumpi", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 226 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::rjumpv", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 227 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::callf", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 228 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::retf", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 229 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::jumpf", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 230 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::dupn", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 231 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::swapn", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 232 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::stack::exchange", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 236 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::eofcreate", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 237 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::txcreate", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 238 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::return_contract", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 240 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::create", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 241 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::call", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 242 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::call_code", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 243 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::ret", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 244 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::delegate_call", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 245 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::create", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 247 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::system::returndataload", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 248 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::extcall", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 249 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::extdcall", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 250 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::static_call", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 251 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::contract::extscall", + [ H ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 253 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::control::revert", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 254 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::invalid", [ H ] |) + |) + |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 255 |) in + M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| + "revm_interpreter::instructions::host::selfdestruct", + [ H; SPEC ] + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + (* ReifyFnPointer *) + M.pointer_coercion (| + M.get_function (| "revm_interpreter::instructions::control::unknown", [ H ] |) + |) + |))) + ] + |) + |))) + | _, _ => M.impossible + end. +End opcode. diff --git a/CoqOfRust/revm/opcode/eof_printer.v b/CoqOfRust/revm/opcode/eof_printer.v new file mode 100644 index 000000000..0a2196088 --- /dev/null +++ b/CoqOfRust/revm/opcode/eof_printer.v @@ -0,0 +1,1140 @@ +(* Generated by coq-of-rust *) +Require Import CoqOfRust.CoqOfRust. + +Module opcode. + Module eof_printer. + (* + pub fn print_eof_code(code: &[u8]) { + use super::*; + use crate::instructions::utility::read_i16; + use revm_primitives::hex; + + // We can check validity and jump destinations in one pass. + let mut i = 0; + while i < code.len() { + let op = code[i]; + let opcode = &OPCODE_INFO_JUMPTABLE[op as usize]; + + let Some(opcode) = opcode else { + println!("Unknown opcode: 0x{:02X}", op); + i += 1; + continue; + }; + + if opcode.immediate_size() != 0 { + // check if the opcode immediate are within the bounds of the code + if i + opcode.immediate_size() as usize >= code.len() { + println!("Malformed code: immediate out of bounds"); + break; + } + } + + print!("{}", opcode.name()); + if opcode.immediate_size() != 0 { + print!( + " : 0x{:}", + hex::encode(&code[i + 1..i + 1 + opcode.immediate_size() as usize]) + ); + } + + let mut rjumpv_additional_immediates = 0; + if op == RJUMPV { + let max_index = code[i + 1] as usize; + let len = max_index + 1; + // and max_index+1 is to get size of vtable as index starts from 0. + rjumpv_additional_immediates = len * 2; + + // +1 is for max_index byte + if i + 1 + rjumpv_additional_immediates >= code.len() { + println!("Malformed code: immediate out of bounds"); + break; + } + + for vtablei in 0..len { + let offset = unsafe { read_i16(code.as_ptr().add(i + 2 + 2 * vtablei)) } as isize; + println!("RJUMPV[{vtablei}]: 0x{offset:04X}({offset})"); + } + } + + i += 1 + opcode.immediate_size() as usize + rjumpv_additional_immediates; + } + } + *) + Definition print_eof_code (τ : list Ty.t) (α : list A.t) : M := + match τ, α with + | [], [ code ] => + ltac:(M.monadic + (let code := M.alloc (| code |) in + M.read (| + let i := M.alloc (| M.of_value (| Value.Integer 0 |) |) in + M.loop (| + ltac:(M.monadic + (M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.lt (| + M.read (| i |), + M.call_closure (| + M.get_associated_function (| + Ty.apply (Ty.path "slice") [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| code |) ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in + let op := + M.copy (| M.SubPointer.get_array_field (| M.read (| code |), i |) |) in + let opcode := + M.alloc (| + M.SubPointer.get_array_field (| + M.get_constant (| + "revm_interpreter::opcode::OPCODE_INFO_JUMPTABLE" + |), + M.alloc (| M.rust_cast (| M.read (| op |) |) |) + |) + |) in + M.match_operator (| + opcode, + [ + fun γ => + ltac:(M.monadic + (let γ := M.read (| γ |) in + let γ1_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let opcode := M.alloc (| γ1_0 |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ M.read (| opcode |) ] + |), + M.of_value (| Value.Integer 0 |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ M.read (| opcode |) ] + |) + |) + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| code |) ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "std::io::stdio::_print", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Malformed code: immediate out of bounds +" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in + M.break (||) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| "std::io::stdio::_print", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| Value.String "" |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::rt::Argument", + "new_display", + [ + Ty.apply + (Ty.path "&") + [ Ty.path "str" ] + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "name", + [] + |), + [ M.read (| opcode |) ] + |) + |) + ] + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ne (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ M.read (| opcode |) ] + |), + M.of_value (| 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", [] |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path "core::fmt::Arguments", + "new_v1", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String " : 0x" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "alloc::string::String" + ] + |), + [ + M.alloc (| + M.call_closure (| + M.get_function (| + "const_hex::encode", + [ + Ty.apply + (Ty.path "&") + [ + Ty.apply + (Ty.path + "slice") + [ Ty.path "u8" + ] + ] + ] + |), + [ + M.call_closure (| + M.get_trait_method (| + "core::ops::index::Index", + Ty.apply + (Ty.path + "slice") + [ Ty.path "u8" + ], + [ + Ty.apply + (Ty.path + "core::ops::range::Range") + [ + Ty.path + "usize" + ] + ], + "index", + [] + |), + [ + M.read (| code |); + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + M.read (| + i + |), + M.of_value (| + Value.Integer + 1 + |) + |))); + ("end_", + A.to_value + (BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| + i + |), + M.of_value (| + Value.Integer + 1 + |) + |), + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path + "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ + M.read (| + opcode + |) + ] + |) + |) + |))) + ] + |) + ] + |) + ] + |) + |) + ] + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let rjumpv_additional_immediates := + M.alloc (| M.of_value (| Value.Integer 0 |) |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.eq (| + M.read (| op |), + M.read (| + M.get_constant (| + "revm_interpreter::opcode::RJUMPV" + |) + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + 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 |), + M.of_value (| Value.Integer 1 |) + |) + |) + |) + |) + |) + |) in + let len := + M.alloc (| + BinOp.Panic.add (| + Integer.Usize, + M.read (| max_index |), + M.of_value (| Value.Integer 1 |) + |) + |) in + let _ := + M.write (| + rjumpv_additional_immediates, + BinOp.Panic.mul (| + Integer.Usize, + M.read (| len |), + M.of_value (| Value.Integer 2 |) + |) + |) in + let _ := + M.match_operator (| + M.alloc (| M.of_value (| Value.Tuple [] |) |), + [ + fun γ => + ltac:(M.monadic + (let γ := + M.use + (M.alloc (| + BinOp.Pure.ge (| + BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| Value.Integer 1 |) + |), + M.read (| + rjumpv_additional_immediates + |) + |), + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "slice") + [ Ty.path "u8" ], + "len", + [] + |), + [ M.read (| code |) ] + |) + |) + |)) in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.alloc (| + M.never_to_any (| + M.read (| + let _ := + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "std::io::stdio::_print", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_const", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "Malformed code: immediate out of bounds +" + |) + |)) + ] + |) + |) + |) + ] + |) + ] + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |) in + M.break (||) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "core::ops::range::Range") + [ Ty.path "usize" ], + [], + "into_iter", + [] + |), + [ + M.of_value (| + Value.StructRecord + "core::ops::range::Range" + [ + ("start", + A.to_value + (M.of_value (| Value.Integer 0 |))); + ("end_", A.to_value (M.read (| len |))) + ] + |) + ] + |) + |), + [ + 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::ops::range::Range") + [ Ty.path "usize" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + 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 (| + γ, + "core::option::Option::Some", + 0 + |) in + let vtablei := + M.copy (| γ0_0 |) in + let offset := + M.alloc (| + M.rust_cast (| + M.call_closure (| + M.get_function (| + "revm_interpreter::instructions::utility::read_i16", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path "*const") + [ Ty.path "u8" ], + "add", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "slice") + [ Ty.path "u8" + ], + "as_ptr", + [] + |), + [ + M.read (| + code + |) + ] + |); + BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.read (| i |), + M.of_value (| + Value.Integer + 2 + |) + |), + BinOp.Panic.mul (| + Integer.Usize, + M.of_value (| + Value.Integer + 2 + |), + M.read (| + vtablei + |) + |) + |) + ] + |) + ] + |) + |) + |) in + let _ := + let _ := + M.alloc (| + M.call_closure (| + M.get_function (| + "std::io::stdio::_print", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::Arguments", + "new_v1_formatted", + [] + |), + [ + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.read (| + M.of_value (| + Value.String + "RJUMPV[" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + "]: 0x" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + "(" + |) + |)); + A.to_value + (M.read (| + M.of_value (| + Value.String + ") +" + |) + |)) + ] + |) + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.match_operator (| + M.alloc (| + M.of_value (| + Value.Tuple + [ + A.to_value + vtablei; + A.to_value + offset + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let + args := + M.copy (| + γ + |) in + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "usize" + ] + |), + [ + M.read (| + M.SubPointer.get_tuple_field (| + args, + 0 + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_upper_hex", + [ + Ty.path + "isize" + ] + |), + [ + M.read (| + M.SubPointer.get_tuple_field (| + args, + 1 + |) + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Argument", + "new_display", + [ + Ty.path + "isize" + ] + |), + [ + M.read (| + M.SubPointer.get_tuple_field (| + args, + 1 + |) + |) + ] + |)) + ] + |) + |))) + ] + |) + |); + (* Unsize *) + M.pointer_coercion (| + M.alloc (| + M.of_value (| + Value.Array + [ + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| + Value.Integer + 0 + |); + M.of_value (| + Value.UnicodeChar + 32 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Alignment::Unknown" + [] + |); + M.of_value (| + Value.Integer + 0 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| + Value.Integer + 1 + |); + M.of_value (| + Value.UnicodeChar + 32 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Alignment::Unknown" + [] + |); + M.of_value (| + Value.Integer + 8 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Is" + [ + A.to_value + (M.of_value (| + Value.Integer + 4 + |)) + ] + |) + ] + |)); + A.to_value + (M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::Placeholder", + "new", + [] + |), + [ + M.of_value (| + Value.Integer + 2 + |); + M.of_value (| + Value.UnicodeChar + 32 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Alignment::Unknown" + [] + |); + M.of_value (| + Value.Integer + 0 + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |); + M.of_value (| + Value.StructTuple + "core::fmt::rt::Count::Implied" + [] + |) + ] + |)) + ] + |) + |) + |); + M.call_closure (| + M.get_associated_function (| + Ty.path + "core::fmt::rt::UnsafeArg", + "new", + [] + |), + [] + |) + ] + |) + ] + |) + |) in + M.alloc (| + M.of_value (| + Value.Tuple [] + |) + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + ] + |) in + M.alloc (| + M.of_value (| Value.Tuple [] |) + |))) + |))) + ] + |)))); + fun γ => + ltac:(M.monadic + (M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |) in + let _ := + let β := i in + M.write (| + β, + BinOp.Panic.add (| + Integer.Usize, + M.read (| β |), + BinOp.Panic.add (| + Integer.Usize, + BinOp.Panic.add (| + Integer.Usize, + M.of_value (| Value.Integer 1 |), + M.rust_cast (| + M.call_closure (| + M.get_associated_function (| + Ty.path "revm_interpreter::opcode::OpCodeInfo", + "immediate_size", + [] + |), + [ M.read (| opcode |) ] + |) + |) + |), + M.read (| rjumpv_additional_immediates |) + |) + |) + |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |))) + ] + |))); + fun γ => + ltac:(M.monadic + (M.alloc (| + M.never_to_any (| + M.read (| + let _ := + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in + M.alloc (| M.of_value (| Value.Tuple [] |) |) + |) + |) + |))) + ] + |))) + |) + |))) + | _, _ => M.impossible + end. + End eof_printer. +End opcode. diff --git a/CoqOfRust/simulations/M.v b/CoqOfRust/simulations/M.v index 15d2a557d..01d451329 100644 --- a/CoqOfRust/simulations/M.v +++ b/CoqOfRust/simulations/M.v @@ -1,15 +1,116 @@ Require Import CoqOfRust.CoqOfRust. -Class ToValue (A : Set) : Set := { +Class ToTy (A : Set) : Set := { Φ : Ty.t; - φ : A -> Value.t; }. Arguments Φ _ {_}. -(** For tuples we provide a canonical way to convert to values. *) +Class ToValue (A : Set) : Set := { + φ : A -> Value.t; +}. + +Module A. + Definition make {A : Set} `{ToValue A} (value : A): A.t := + A.Make (to_value := φ) value. +End A. + +Module Immediate. + Inductive t (A : Set) `{ToValue A} : Set := + | Make : A -> t A. + Arguments Make {_ _}. + + Global Instance IsToValue {A : Set} `{ToValue A} : ToValue (t A) := { + φ '(Make x) := Value.Pointer (Pointer.Immediate (φ x)); + }. + + Definition of_value {A : Set} `{ToValue A} (x : A) : + Value.Pointer (Pointer.Immediate (A.to_value (A.make x))) = + φ (Make x) := + eq_refl. +End Immediate. + +Global Instance ZIsToValue : ToValue Z := { + φ z := Value.Integer z; +}. + +Module TupleIsToTy. + Global Instance I0 : ToTy unit := { + Φ := Ty.tuple []; + }. + + Global Instance I2 (A1 A2 : Set) + (_ : ToTy A1) + (_ : ToTy A2) : + ToTy (A1 * A2) := { + Φ := Ty.tuple [Φ A1; Φ A2]; + }. + + Global Instance I3 (A1 A2 A3 : Set) + (_ : ToTy A1) + (_ : ToTy A2) + (_ : ToTy A3) : + ToTy (A1 * A2 * A3) := { + Φ := Ty.tuple [Φ A1; Φ A2; Φ A3]; + }. + + Global Instance I4 (A1 A2 A3 A4 : Set) + (_ : ToTy A1) + (_ : ToTy A2) + (_ : ToTy A3) + (_ : ToTy A4) : + ToTy (A1 * A2 * A3 * A4) := { + Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4]; + }. + + Global Instance I5 (A1 A2 A3 A4 A5 : Set) + (_ : ToTy A1) + (_ : ToTy A2) + (_ : ToTy A3) + (_ : ToTy A4) + (_ : ToTy A5) : + ToTy (A1 * A2 * A3 * A4 * A5) := { + Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4; Φ A5]; + }. + + Global Instance I6 (A1 A2 A3 A4 A5 A6 : Set) + (_ : ToTy A1) + (_ : ToTy A2) + (_ : ToTy A3) + (_ : ToTy A4) + (_ : ToTy A5) + (_ : ToTy A6) : + ToTy (A1 * A2 * A3 * A4 * A5 * A6) := { + Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4; Φ A5; Φ A6]; + }. + + Global Instance I7 (A1 A2 A3 A4 A5 A6 A7 : Set) + (_ : ToTy A1) + (_ : ToTy A2) + (_ : ToTy A3) + (_ : ToTy A4) + (_ : ToTy A5) + (_ : ToTy A6) + (_ : ToTy A7) : + ToTy (A1 * A2 * A3 * A4 * A5 * A6 * A7) := { + Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4; Φ A5; Φ A6; Φ A7]; + }. + + Global Instance I8 (A1 A2 A3 A4 A5 A6 A7 A8 : Set) + (_ : ToTy A1) + (_ : ToTy A2) + (_ : ToTy A3) + (_ : ToTy A4) + (_ : ToTy A5) + (_ : ToTy A6) + (_ : ToTy A7) + (_ : ToTy A8) : + ToTy (A1 * A2 * A3 * A4 * A5 * A6 * A7 * A8) := { + Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4; Φ A5; Φ A6; Φ A7; Φ A8]; + }. +End TupleIsToTy. + Module TupleIsToValue. Global Instance I0 : ToValue unit := { - Φ := Ty.tuple []; φ 'tt := Value.Tuple []; }. @@ -17,7 +118,6 @@ Module TupleIsToValue. (_ : ToValue A1) (_ : ToValue A2) : ToValue (A1 * A2) := { - Φ := Ty.tuple [Φ A1; Φ A2]; φ '(x1, x2) := Value.Tuple [φ x1; φ x2]; }. @@ -26,7 +126,6 @@ Module TupleIsToValue. (_ : ToValue A2) (_ : ToValue A3) : ToValue (A1 * A2 * A3) := { - Φ := Ty.tuple [Φ A1; Φ A2; Φ A3]; φ '(x1, x2, x3) := Value.Tuple [φ x1; φ x2; φ x3]; }. @@ -37,7 +136,6 @@ Module TupleIsToValue. (_ : ToValue A3) (_ : ToValue A4) : ToValue (A1 * A2 * A3 * A4) := { - Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4]; φ '(x1, x2, x3, x4) := Value.Tuple [φ x1; φ x2; φ x3; φ x4]; }. @@ -49,7 +147,6 @@ Module TupleIsToValue. (_ : ToValue A4) (_ : ToValue A5) : ToValue (A1 * A2 * A3 * A4 * A5) := { - Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4; Φ A5]; φ '(x1, x2, x3, x4, x5) := Value.Tuple [φ x1; φ x2; φ x3; φ x4; φ x5]; }. @@ -62,7 +159,6 @@ Module TupleIsToValue. (_ : ToValue A5) (_ : ToValue A6) : ToValue (A1 * A2 * A3 * A4 * A5 * A6) := { - Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4; Φ A5; Φ A6]; φ '(x1, x2, x3, x4, x5, x6) := Value.Tuple [φ x1; φ x2; φ x3; φ x4; φ x5; φ x6]; }. @@ -76,7 +172,6 @@ Module TupleIsToValue. (_ : ToValue A6) (_ : ToValue A7) : ToValue (A1 * A2 * A3 * A4 * A5 * A6 * A7) := { - Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4; Φ A5; Φ A6; Φ A7]; φ '(x1, x2, x3, x4, x5, x6, x7) := Value.Tuple [φ x1; φ x2; φ x3; φ x4; φ x5; φ x6; φ x7]; }. @@ -91,7 +186,6 @@ Module TupleIsToValue. (_ : ToValue A7) (_ : ToValue A8) : ToValue (A1 * A2 * A3 * A4 * A5 * A6 * A7 * A8) := { - Φ := Ty.tuple [Φ A1; Φ A2; Φ A3; Φ A4; Φ A5; Φ A6; Φ A7; Φ A8]; φ '(x1, x2, x3, x4, x5, x6, x7, x8) := Value.Tuple [φ x1; φ x2; φ x3; φ x4; φ x5; φ x6; φ x7; φ x8]; }. diff --git a/lib/src/expression.rs b/lib/src/expression.rs index baf4e49df..1867e208b 100644 --- a/lib/src/expression.rs +++ b/lib/src/expression.rs @@ -43,7 +43,6 @@ pub(crate) enum CallKind { #[derive(Debug, Eq, PartialEq)] pub(crate) struct LiteralInteger { - pub(crate) name: String, pub(crate) negative_sign: bool, pub(crate) value: u128, } @@ -141,7 +140,7 @@ pub(crate) enum Expr { impl Expr { pub(crate) fn tt() -> Rc { - Rc::new(Expr::Tuple { elements: vec![] }).alloc() + Expr::Tuple { elements: vec![] }.of_value().alloc() } pub(crate) fn local_var(name: &str) -> Rc { @@ -173,6 +172,22 @@ impl Expr { }) } + pub(crate) fn of_value(self) -> Rc { + Rc::new(Expr::Call { + func: Expr::local_var("M.of_value"), + args: vec![Rc::new(self)], + kind: CallKind::Effectful, + }) + } + + pub(crate) fn to_value(self: &Rc) -> Rc { + Rc::new(Expr::Call { + func: Expr::local_var("A.to_value"), + args: vec![self.clone()], + kind: CallKind::Pure, + }) + } + pub(crate) fn read(self: &Rc) -> Rc { // If we read an allocated expression, we just return the expression. if let Some(expr) = self.clone().match_simple_call(&["M.alloc"]) { @@ -389,17 +404,13 @@ impl Literal { Literal::Bool(b) => coq::Expression::just_name("Value.Bool") .apply(&coq::Expression::just_name(b.to_string().as_str())), Literal::Integer(LiteralInteger { - name, negative_sign, value, - }) => coq::Expression::just_name("Value.Integer").apply_many(&[ - coq::Expression::just_name(format!("Integer.{name}").as_str()), - if *negative_sign { - coq::Expression::just_name(format!("(-{value})").as_str()) - } else { - coq::Expression::just_name(value.to_string().as_str()) - }, - ]), + }) => coq::Expression::just_name("Value.Integer").apply(&if *negative_sign { + coq::Expression::just_name(format!("(-{value})").as_str()) + } else { + coq::Expression::just_name(value.to_string().as_str()) + }), Literal::Char(c) => coq::Expression::just_name("Value.UnicodeChar").apply( &coq::Expression::just_name((*c as u32).to_string().as_str()), ), @@ -493,7 +504,7 @@ impl Expr { }; } - coq::Expression::just_name("M.closure").apply(&coq::Expression::Function { + coq::Expression::just_name("M.closure").monadic_apply(&coq::Expression::Function { parameters: vec![coq::Expression::just_name("γ")], body: Rc::new(coq::Expression::monadic(&coq::Expression::Match { scrutinees: vec![coq::Expression::just_name("γ")], diff --git a/lib/src/render.rs b/lib/src/render.rs index c763fe6fc..82a205071 100644 --- a/lib/src/render.rs +++ b/lib/src/render.rs @@ -144,11 +144,3 @@ where text("]"), ]) } - -pub(crate) fn capitalize(s: &str) -> String { - let mut chars = s.chars(); - match chars.next() { - None => String::new(), - Some(f) => f.to_uppercase().collect::() + chars.as_str(), - } -} diff --git a/lib/src/thir_expression.rs b/lib/src/thir_expression.rs index 410d88c8b..682ba4a80 100644 --- a/lib/src/thir_expression.rs +++ b/lib/src/thir_expression.rs @@ -2,7 +2,6 @@ use crate::env::*; use crate::expression::*; use crate::path::*; use crate::pattern::*; -use crate::render::*; use crate::thir_ty::*; use crate::ty::CoqType; use rustc_hir::def::DefKind; @@ -12,25 +11,48 @@ use rustc_middle::thir::{AdtExpr, LogicalOp}; use rustc_middle::ty::TyKind; use std::rc::Rc; -fn path_of_bin_op(bin_op: &BinOp) -> (&'static str, CallKind) { +fn path_of_bin_op( + env: &Env, + span: &rustc_span::Span, + bin_op: &BinOp, + lhs_ty: &rustc_middle::ty::Ty, +) -> (&'static str, Vec>) { + let integer_ty_name = crate::ty::get_integer_ty_name(lhs_ty); + let additional_args = match bin_op { + BinOp::Add | BinOp::Sub | BinOp::Mul | BinOp::Div | BinOp::Rem => match integer_ty_name { + Some(integer_ty_name) => vec![Expr::local_var(integer_ty_name.as_str())], + None => { + emit_warning_with_note( + env, + span, + "Expected an integer type for the parameters", + Some("Please report 🙏"), + ); + + vec![Expr::local_var("Integer.Usize")] + } + }, + _ => vec![], + }; + match bin_op { - BinOp::Add => ("BinOp.Panic.add", CallKind::Effectful), - BinOp::Sub => ("BinOp.Panic.sub", CallKind::Effectful), - BinOp::Mul => ("BinOp.Panic.mul", CallKind::Effectful), - BinOp::Div => ("BinOp.Panic.div", CallKind::Effectful), - BinOp::Rem => ("BinOp.Panic.rem", CallKind::Effectful), - BinOp::BitXor => ("BinOp.Pure.bit_xor", CallKind::Pure), - BinOp::BitAnd => ("BinOp.Pure.bit_and", CallKind::Pure), - BinOp::BitOr => ("BinOp.Pure.bit_or", CallKind::Pure), - BinOp::Shl => ("BinOp.Panic.shl", CallKind::Effectful), - BinOp::Shr => ("BinOp.Panic.shr", CallKind::Effectful), - BinOp::Eq => ("BinOp.Pure.eq", CallKind::Pure), - BinOp::Ne => ("BinOp.Pure.ne", CallKind::Pure), - BinOp::Lt => ("BinOp.Pure.lt", CallKind::Pure), - BinOp::Le => ("BinOp.Pure.le", CallKind::Pure), - BinOp::Ge => ("BinOp.Pure.ge", CallKind::Pure), - BinOp::Gt => ("BinOp.Pure.gt", CallKind::Pure), - BinOp::Offset => ("BinOp.Pure.offset", CallKind::Pure), + BinOp::Add => ("BinOp.Panic.add", additional_args), + BinOp::Sub => ("BinOp.Panic.sub", additional_args), + BinOp::Mul => ("BinOp.Panic.mul", additional_args), + BinOp::Div => ("BinOp.Panic.div", additional_args), + BinOp::Rem => ("BinOp.Panic.rem", additional_args), + BinOp::BitXor => ("BinOp.Pure.bit_xor", additional_args), + BinOp::BitAnd => ("BinOp.Pure.bit_and", additional_args), + BinOp::BitOr => ("BinOp.Pure.bit_or", additional_args), + BinOp::Shl => ("BinOp.Panic.shl", additional_args), + BinOp::Shr => ("BinOp.Panic.shr", additional_args), + BinOp::Eq => ("BinOp.Pure.eq", additional_args), + BinOp::Ne => ("BinOp.Pure.ne", additional_args), + BinOp::Lt => ("BinOp.Pure.lt", additional_args), + BinOp::Le => ("BinOp.Pure.le", additional_args), + BinOp::Ge => ("BinOp.Pure.ge", additional_args), + BinOp::Gt => ("BinOp.Pure.gt", additional_args), + BinOp::Offset => ("BinOp.Pure.offset", additional_args), _ => todo!(), } } @@ -170,12 +192,15 @@ fn build_inner_match( args: vec![("γ".to_string(), None)], body: build_inner_match( vec![("γ".to_string(), pattern.clone())], - Rc::new(Expr::Tuple { + Expr::Tuple { elements: free_vars .iter() - .map(|name| Expr::local_var(name)) + .map(|name| { + Expr::local_var(name).to_value() + }) .collect(), - }), + } + .of_value(), 0, ), }) @@ -396,31 +421,6 @@ fn get_if_conditions<'a>( } } -fn compile_literal_integer( - env: &Env, - span: &rustc_span::Span, - ty: &rustc_middle::ty::Ty, - negative_sign: bool, - integer: u128, -) -> LiteralInteger { - let uncapitalized_name = match ty.kind() { - TyKind::Int(int_ty) => format!("{int_ty:?}"), - TyKind::Uint(uint_ty) => format!("{uint_ty:?}"), - _ => { - emit_warning_with_note(env, span, "Unknown integer type", Some("Please report 🙏")); - - "unknown_kind_of_integer".to_string() - } - }; - let name = capitalize(&uncapitalized_name); - - LiteralInteger { - name, - negative_sign, - value: integer, - } -} - pub(crate) fn compile_expr<'a>( env: &Env<'a>, generics: &'a rustc_middle::ty::Generics, @@ -501,14 +501,15 @@ pub(crate) fn compile_expr<'a>( } thir::ExprKind::Deref { arg } => compile_expr(env, generics, thir, arg).read(), thir::ExprKind::Binary { op, lhs, rhs } => { - let (path, kind) = path_of_bin_op(op); + let lhs_ty = &thir.exprs.get(*lhs).unwrap().ty; + let (path, additional_args) = path_of_bin_op(env, &expr.span, op, lhs_ty); let lhs = compile_expr(env, generics, thir, lhs); let rhs = compile_expr(env, generics, thir, rhs); Rc::new(Expr::Call { func: Expr::local_var(path), - args: vec![lhs.read(), rhs.read()], - kind, + args: [additional_args, vec![lhs.read(), rhs.read()]].concat(), + kind: CallKind::Effectful, }) .alloc() } @@ -528,16 +529,34 @@ pub(crate) fn compile_expr<'a>( .alloc() } thir::ExprKind::Unary { op, arg } => { - let (path, kind) = match op { - UnOp::Not => ("UnOp.Pure.not", CallKind::Pure), - UnOp::Neg => ("UnOp.Panic.neg", CallKind::Effectful), + let (path, additional_args) = match op { + UnOp::Not => ("UnOp.Pure.not", vec![]), + UnOp::Neg => { + let arg_ty = &thir.exprs.get(*arg).unwrap().ty; + let integer_ty_name = crate::ty::get_integer_ty_name(arg_ty); + let additional_args = match integer_ty_name { + Some(integer_ty_name) => vec![Expr::local_var(integer_ty_name.as_str())], + None => { + emit_warning_with_note( + env, + &expr.span, + "Expected an integer type for the parameters", + Some("Please report 🙏"), + ); + + vec![Expr::local_var("Integer.Usize")] + } + }; + + ("UnOp.Panic.neg", additional_args) + } }; let arg = compile_expr(env, generics, thir, arg); Rc::new(Expr::Call { func: Expr::local_var(path), - args: vec![arg.read()], - kind, + args: [additional_args, vec![arg.read()]].concat(), + kind: CallKind::Effectful, }) .alloc() } @@ -548,7 +567,7 @@ pub(crate) fn compile_expr<'a>( Rc::new(Expr::Call { func, args: vec![source.read()], - kind: CallKind::Pure, + kind: CallKind::Effectful, }) .alloc() } @@ -577,7 +596,7 @@ pub(crate) fn compile_expr<'a>( Rc::new(Expr::Call { func, args: vec![source], - kind: CallKind::Pure, + kind: CallKind::Effectful, }), )) .alloc() @@ -642,7 +661,8 @@ pub(crate) fn compile_expr<'a>( }) } thir::ExprKind::AssignOp { op, lhs, rhs } => { - let (path, kind) = path_of_bin_op(op); + let lhs_ty = &thir.exprs.get(*lhs).unwrap().ty; + let (path, additional_args) = path_of_bin_op(env, &expr.span, op, lhs_ty); let lhs = compile_expr(env, generics, thir, lhs); let rhs = compile_expr(env, generics, thir, rhs); @@ -656,8 +676,12 @@ pub(crate) fn compile_expr<'a>( Expr::local_var("β"), Rc::new(Expr::Call { func: Expr::local_var(path), - args: vec![Expr::local_var("β").read(), rhs.read()], - kind, + args: [ + additional_args, + vec![Expr::local_var("β").read(), rhs.read()], + ] + .concat(), + kind: CallKind::Effectful, }), ], kind: CallKind::Effectful, @@ -761,27 +785,28 @@ pub(crate) fn compile_expr<'a>( Rc::new(Expr::Call { func, args, - kind: CallKind::Pure, + kind: CallKind::Effectful, }) .alloc() } - thir::ExprKind::Array { fields } => Rc::new(Expr::Array { + thir::ExprKind::Array { fields } => Expr::Array { elements: fields .iter() - .map(|field| compile_expr(env, generics, thir, field).read()) + .map(|field| compile_expr(env, generics, thir, field).read().to_value()) .collect(), is_internal: false, - }) + } + .of_value() .alloc(), thir::ExprKind::Tuple { fields } => { let elements: Vec<_> = fields .iter() - .map(|field| compile_expr(env, generics, thir, field).read()) + .map(|field| compile_expr(env, generics, thir, field).read().to_value()) .collect(); if elements.is_empty() { Expr::tt() } else { - Rc::new(Expr::Tuple { elements }).alloc() + Expr::Tuple { elements }.of_value().alloc() } } thir::ExprKind::Adt(adt_expr) => { @@ -802,7 +827,9 @@ pub(crate) fn compile_expr<'a>( IsValue::No, variant.fields.get(field.name).unwrap().name.as_str(), ), - compile_expr(env, generics, thir, &field.expr).read(), + compile_expr(env, generics, thir, &field.expr) + .read() + .to_value(), ) }) .collect(); @@ -815,18 +842,19 @@ pub(crate) fn compile_expr<'a>( .map(|base| compile_expr(env, generics, thir, &base.base).read()); if fields.is_empty() { - return Rc::new(Expr::StructTuple { + return Expr::StructTuple { path, fields: vec![], - }) + } + .of_value() .alloc(); } if is_a_tuple { let fields = fields.into_iter().map(|(_, pattern)| pattern).collect(); - Rc::new(Expr::StructTuple { path, fields }).alloc() + Expr::StructTuple { path, fields }.of_value().alloc() } else { - Rc::new(Expr::StructStruct { path, fields, base }).alloc() + Expr::StructStruct { path, fields, base }.of_value().alloc() } } thir::ExprKind::PlaceTypeAscription { source, .. } @@ -890,30 +918,32 @@ pub(crate) fn compile_expr<'a>( } thir::ExprKind::Literal { lit, neg } => match lit.node { rustc_ast::LitKind::Str(symbol, _) => { - Rc::new(Expr::Literal(Rc::new(Literal::String(symbol.to_string())))) + Expr::Literal(Rc::new(Literal::String(symbol.to_string()))).of_value() } rustc_ast::LitKind::Char(c) => { - Rc::new(Expr::Literal(Rc::new(Literal::Char(c)))).alloc() + Expr::Literal(Rc::new(Literal::Char(c))).of_value().alloc() + } + rustc_ast::LitKind::Int(i, _) => { + Expr::Literal(Rc::new(Literal::Integer(LiteralInteger { + negative_sign: *neg, + value: i, + }))) + .of_value() + .alloc() } - rustc_ast::LitKind::Int(i, _) => Rc::new(Expr::Literal(Rc::new(Literal::Integer( - compile_literal_integer(env, &expr.span, &expr.ty, *neg, i), - )))) - .alloc(), rustc_ast::LitKind::Bool(c) => { - Rc::new(Expr::Literal(Rc::new(Literal::Bool(c)))).alloc() + Expr::Literal(Rc::new(Literal::Bool(c))).of_value().alloc() } - _ => Rc::new(Expr::Literal(Rc::new(Literal::Error))), + _ => Expr::Literal(Rc::new(Literal::Error)).of_value(), }, - thir::ExprKind::NonHirLiteral { lit, .. } => Rc::new(Expr::Literal(Rc::new( - Literal::Integer(compile_literal_integer( - env, - &expr.span, - &expr.ty, - false, - lit.try_to_uint(lit.size()).unwrap(), - )), - ))) - .alloc(), + thir::ExprKind::NonHirLiteral { lit, .. } => { + Expr::Literal(Rc::new(Literal::Integer(LiteralInteger { + negative_sign: false, + value: lit.try_to_uint(lit.size()).unwrap(), + }))) + .of_value() + .alloc() + } thir::ExprKind::ZstLiteral { .. } => { match &expr.ty.kind() { TyKind::FnDef(def_id, generic_args) => { @@ -1012,7 +1042,7 @@ pub(crate) fn compile_expr<'a>( Rc::new(Expr::Call { func: Expr::local_var("M.constructor_as_closure"), args: vec![Rc::new(Expr::InternalString(path.to_string()))], - kind: CallKind::Pure, + kind: CallKind::Effectful, }) .alloc() } @@ -1133,7 +1163,7 @@ fn compile_stmts<'a>( } => { let init = match initializer { Some(initializer) => compile_expr(env, generics, thir, initializer), - None => Expr::local_var("Value.DeclaredButUndefined"), + None => Expr::LocalVar("Value.DeclaredButUndefined".to_string()).of_value(), }; let pattern = crate::thir_pattern::compile_pattern(env, pattern); diff --git a/lib/src/thir_pattern.rs b/lib/src/thir_pattern.rs index f794fe1bc..b60c46d60 100644 --- a/lib/src/thir_pattern.rs +++ b/lib/src/thir_pattern.rs @@ -2,7 +2,6 @@ use crate::env::*; use crate::expression::*; use crate::path::*; use crate::pattern::*; -use crate::render::*; use rustc_middle::thir::{Pat, PatKind}; use rustc_type_ir::TyKind; use std::rc::Rc; @@ -117,13 +116,12 @@ pub(crate) fn compile_pattern(env: &Env, pat: &Pat) -> Rc { } // And for the rest... match &ty.kind() { - rustc_middle::ty::TyKind::Int(int_ty) => { + rustc_middle::ty::TyKind::Int(_) => { let uint_value = constant.try_to_scalar().unwrap().assert_int(); let int_value = uint_value.try_to_int(uint_value.size()).unwrap(); return Rc::new(Pattern::Literal(Rc::new(Literal::Integer( LiteralInteger { - name: capitalize(&format!("{int_ty:?}")), negative_sign: int_value < 0, // The `unsigned_abs` method is necessary to get the minimal int128's // absolute value. @@ -131,12 +129,11 @@ pub(crate) fn compile_pattern(env: &Env, pat: &Pat) -> Rc { }, )))); } - rustc_middle::ty::TyKind::Uint(uint_ty) => { + rustc_middle::ty::TyKind::Uint(_) => { let uint_value = constant.try_to_scalar().unwrap().assert_int(); return Rc::new(Pattern::Literal(Rc::new(Literal::Integer( LiteralInteger { - name: capitalize(&format!("{uint_ty:?}")), negative_sign: false, value: uint_value.assert_bits(uint_value.size()), }, diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index 4edbe2eaa..32522ce0e 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -1205,7 +1205,7 @@ impl FunDefinition { coq::Expression::just_name("list") .apply(&coq::Expression::just_name("Ty.t")), coq::Expression::just_name("list") - .apply(&coq::Expression::just_name("Value.t")), + .apply(&coq::Expression::just_name("A.t")), ], image: Rc::new(coq::Expression::just_name("M")), }), @@ -1280,7 +1280,7 @@ impl FunDefinition { idents: vec!["α".to_string()], ty: Some( coq::Expression::just_name("list") - .apply(&coq::Expression::just_name("Value.t")), + .apply(&coq::Expression::just_name("A.t")), ), }, coq::ArgSpecKind::Explicit, @@ -1344,7 +1344,7 @@ impl ImplItemKind { }, coq::ArgSpecKind::Explicit, )], - image: Rc::new(coq::Expression::just_name("Value.t")), + image: Rc::new(coq::Expression::just_name("A.t")), }, }, )), @@ -1362,7 +1362,7 @@ impl ImplItemKind { }, coq::ArgSpecKind::Explicit, )], - ty: Some(coq::Expression::just_name("Value.t")), + ty: Some(coq::Expression::just_name("A.t")), body: if !generic_tys.is_empty() { coq::Expression::Let { name: Some("Self".to_string()), @@ -1585,7 +1585,7 @@ impl TopLevelItem { None => vec![coq::TopLevelItem::Definition(coq::Definition::new( name, &coq::DefinitionKind::Assumption { - ty: coq::Expression::just_name("Value.t"), + ty: coq::Expression::just_name("A.t"), }, ))], Some(value) => { @@ -1593,7 +1593,7 @@ impl TopLevelItem { name, &coq::DefinitionKind::Alias { args: vec![], - ty: Some(coq::Expression::just_name("Value.t")), + ty: Some(coq::Expression::just_name("A.t")), body: coq::Expression::just_name("M.run") .apply(&coq::Expression::monadic(&value.to_coq())), }, diff --git a/lib/src/ty.rs b/lib/src/ty.rs index 644fa3723..a6674092d 100644 --- a/lib/src/ty.rs +++ b/lib/src/ty.rs @@ -131,6 +131,34 @@ pub(crate) fn compile_path_ty_params( } } +pub(crate) fn get_integer_ty_name(ty: &rustc_middle::ty::Ty) -> Option { + match ty.kind() { + rustc_middle::ty::Int(int_ty) => Some( + match int_ty { + rustc_middle::ty::IntTy::Isize => "Integer.Isize", + rustc_middle::ty::IntTy::I8 => "Integer.I8", + rustc_middle::ty::IntTy::I16 => "Integer.I16", + rustc_middle::ty::IntTy::I32 => "Integer.I32", + rustc_middle::ty::IntTy::I64 => "Integer.I64", + rustc_middle::ty::IntTy::I128 => "Integer.I128", + } + .to_string(), + ), + rustc_middle::ty::Uint(uint_ty) => Some( + match uint_ty { + rustc_middle::ty::UintTy::Usize => "Integer.Usize", + rustc_middle::ty::UintTy::U8 => "Integer.U8", + rustc_middle::ty::UintTy::U16 => "Integer.U16", + rustc_middle::ty::UintTy::U32 => "Integer.U32", + rustc_middle::ty::UintTy::U64 => "Integer.U64", + rustc_middle::ty::UintTy::U128 => "Integer.U128", + } + .to_string(), + ), + _ => None, + } +} + impl CoqType { pub(crate) fn to_coq(&self) -> coq::Expression { match self {